\input texinfo @c -*- coding: utf-8; mode: texinfo; -*- @ignore Translation of GIT committish: FILL-IN-HEAD-COMMITTISH When revising a translation, copy the HEAD committish of the version that you are working on. See TRANSLATION for details. @end ignore @node formatting-architecture @unnumberedsec A flexible formatting architecture Remember the music notation problem? Its solution left us with a bunch of objects. The formatting architecture is built on these objects. Each object carries variables: @itemize @item Variables control layout decisions. For example, many objects have a @code{direction} variable that encodes the choice between up and down (or left and right). Here you see two chords, with accents and arpeggio. In the first chord, the objects have all directions down (or left). The second chord has all directions up (right). @divClass{float-center} @divEnd @image{pictures/directions-updown,,,.png} The process of formatting a score consists of reading and writing object variables. @item Some variables have a preset value. For example, the thickness of many lines – a characteristic of typographical style – are preset variables. Changing them gives a different typographical impression: @divClass{float-center} @divEnd @image{pictures/thickness-tweaks,,,.png} @item Formatting rules are also preset variables: each object has variables containing procedures. These procedure perform the actual formatting, and by substituting different ones, we can change behavior. In the following example, the rule that note head objects use to draw their symbol is changed during the music fragment: @divClass{float-center} @divEnd @image{pictures/mc-squared,,,.png} @end itemize @divClass{float-right} @divEnd Next: @ref{scoring-esthetics.html,Beautiful numbers}: how LilyPond participates in the Miss World contests. @bye