]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/automated-engraving/formatting-architecture.itexi
Prepare introduction of Waf build system
[lilypond.git] / Documentation / automated-engraving / formatting-architecture.itexi
1 @c -*- coding: utf-8; mode: texinfo; -*-
2 @ignore
3     Translation of GIT committish: FILL-IN-HEAD-COMMITTISH
4
5     When revising a translation, copy the HEAD committish of the
6     version that you are working on.  See TRANSLATION for details.
7 @end ignore
8
9
10
11 @node formatting-architecture 
12
13 @unnumberedsec A flexible formatting architecture
14
15 Remember the music notation problem? Its solution left us with a
16 bunch of objects. The formatting architecture is built on these
17 objects. Each object carries variables:
18
19 @itemize
20 @item
21  Variables control layout decisions.  For example, many objects
22 have a @code{direction} variable that encodes the choice between up
23 and down (or left and right).  Here you see two chords, with accents
24 and arpeggio. In the first chord, the objects have all directions down
25 (or left). The second chord has all directions up (right).
26
27 @divClass{float-center}
28 @sourceimage{directions-updown,,,.png}
29 @divEnd
30
31 The process of formatting a score consists of reading and writing
32 object variables.
33
34
35
36 @item
37 Some variables have a preset value. For example, the thickness of
38  many lines – a characteristic of typographical style – are preset
39  variables. Changing them gives a different typographical impression:
40
41 @divClass{float-center}
42 @sourceimage{thickness-tweaks,,,.png}
43 @divEnd
44
45 @item
46 Formatting rules are also preset variables: each object has
47 variables containing procedures. These procedure perform the actual
48 formatting, and by substituting different ones, we can change
49 behavior. In the following example, the rule that note head objects
50 use to draw their symbol is changed during the music fragment:
51
52 @divClass{float-center}
53 @sourceimage{mc-squared,,,.png}
54 @divEnd
55
56 @end itemize
57
58 @divClass{float-right}
59 Next:
60  @ref{scoring-esthetics,Beautiful numbers}: how
61 LilyPond participates in the Miss World contests.
62 @divEnd