-combined vertical positions of the notes. The first two measures are
-printed with this correction, the last two measures without. The notes
-in the last two measures form down-stem/up-stems clumps of notes.
-
-@node Typography and program architecture
-@section Typography and program architecture
-
-Producing good engraving requires skill and knowledge. As the
-previous examples show, there is a lot of subtlety involved in music
-engraving, and unfortunately, only a small fraction of these details
-are documented. Master engraver must learn all these details from
-experience or from other engravers, which is why it takes so long to
-become a master. As an engraver gets older and wiser, he will be able
-to produce better and more complex pieces. A similar situation is
-present when putting typographical knowledge into a computer program.
-It is not possible to come up with a definitive solution for a problem
-at the first try. Instead, we start out with simple solution that
-might cover 75% of the cases, and gradually refine that solution over
-the course of months or years, so 90 or 95 % of the cases are
-handled.
-
-This has an important implication for the design of the program: at
-any time, almost every piece of formatting code must be considered as
-temporary. When the need arises, it is to be replaced a solution that
-will cover even more cases. is A ``plug-in'' architecture is a clean
-way to accomplish this. This is an architecture where new pieces of
-code can be inserted in the program dynamically. In such a program, a
-new solution can be developed along-side the existing code. For
-testing, it is plugged in, but for production use, the old solution is
-used. The new module can be perfected separately until it is better
-than the existing solution, at which point it replaces the old one.
-
-Until that time, users must have a way to deal with imperfections:
-these 25%, 10% or 5% of the cases that are not handled
-automatically. In these cases, a user must be able to override
-formatting decisions. A way to accomplish this, is to store decisions
-in generic variables, and let the user manipulate these variables.
-For example, consider the following fragment of notation.
-
-@lilypond
-\score { \notes \relative c'' {
-\stemUp
- c4-\f f4
- }
-\paper { raggedright = ##t }
- }
+combined vertical positions of the notes. The first two measures are
+printed with this correction, the last two measures without. The notes
+in the last two measures form down-stem/@/up-stem clumps of notes.
+
+@cindex typography
+
+Musicians are usually more absorbed with performing than with studying
+the looks of a piece of music, so nitpicking about typographical details
+may seem academical. But it is not. In larger pieces with monotonous
+rhythms, spacing corrections lead to subtle variations in the layout
+of every line, giving each one a distinct visual signature. Without
+this signature all lines would look the same, and they become like a
+labyrinth. If a musician looks away once or has a lapse in
+concentration, the lines might lose their place on the page.
+
+Similarly, the strong visual look of bold symbols on heavy staff lines
+stands out better when the music is far away from the reader, for example,
+if it is on a music stand. A careful distribution of white space allows
+music to be set very tightly without cluttering symbols together. The
+result minimizes the number of page turns, which is a great advantage.
+
+This is a common characteristic of typography. Layout should be
+pretty, not only for its own sake, but especially because it helps the
+reader in her task. For performance material like sheet music, this is
+of double importance: musicians have a limited amount of attention. The
+less attention they need for reading, the more they can focus on
+playing the music. In other words, better typography translates to better
+performances.
+
+These examples demonstrate that music typography is an art that is
+subtle and complex, and that producing it requires considerable
+expertise, which musicians usually do not have. LilyPond is our
+effort to bring the graphical excellence of hand-engraved music to the
+computer age, and make it available to normal musicians. We have
+tuned our algorithms, font-designs, and program settings to produce
+prints that match the quality of the old editions we love to see and
+love to play from.
+
+
+
+
+@node Automated engraving
+@section Automated engraving
+
+How do we go about implementing typography? If craftsmen need over
+ten years to become true masters, how could we simple hackers ever
+write a program to take over their jobs?
+
+The answer is: we cannot. Typography relies on human judgment of
+appearance, so people cannot be replaced completely. However, much of
+the dull work can be automated. If LilyPond solves most of the common
+situations correctly, this will be a huge improvement over existing
+software. The remaining cases can be tuned by hand. Over the course
+of years, the software can be refined to do more and more things
+automatically, so manual overrides are less and less necessary.
+
+When we started, we wrote the LilyPond program entirely in the C++
+programming language; the program's functionality was set in stone by
+the developers. That proved to be unsatisfactory for a number of
+reasons:
+
+@itemize @bullet
+@item When LilyPond makes mistakes,
+users need to override formatting decisions. Therefore, the user must
+have access to the formatting engine. Hence, rules and settings cannot
+be fixed by us at compile-time but must be accessible for users at
+run-time.
+
+@item Engraving is a matter of visual judgment, and therefore a matter of
+taste. As knowledgeable as we are, users can disagree with our
+personal decisions. Therefore, the definitions of typographical style
+must also be accessible to the user.
+
+@item Finally, we continually refine the formatting algorithms, so we
+need a flexible approach to rules. The C++ language forces a certain
+method of grouping rules that do not match well with how music
+notation works.
+@end itemize
+
+These problems have been addressed by integrating an interpreter for
+the Scheme programming language and rewriting parts of LilyPond in
+Scheme. The current formatting architecture is built around the
+notion of graphical objects, described by Scheme variables and
+functions. This architecture encompasses formatting rules,
+typographical style and individual formatting decisions. The user has
+direct access to most of these controls.
+
+Scheme variables control layout decisions. For example, many
+graphical objects have a direction variable that encodes the choice
+between up and down (or left and right). Here you see two chords,
+with accents and arpeggios. In the first chord, the graphical objects
+have all directions down (or left). The second chord has all
+directions up (right).
+
+@lilypond[quote,raggedright,relative=1]
+\new Score \with {
+ \override SpacingSpanner #'spacing-increment = #3
+ \override TimeSignature #'transparent = ##t
+} {
+ \stemDown <e g b>4_>-\arpeggio
+ \override Arpeggio #'direction = #RIGHT
+ \stemUp <e g b>4^>-\arpeggio
+}