+We made our comparison by engraving the last seven measures of the piece
+(28--34) in Finale and LilyPond. This is the point in the piece where
+the subject returns in a three-part stretto and leads into the closing
+section. In the Finale version, we have resisted the temptation to make
+any adjustments to the default output because we are trying to show the
+things that each software package gets right without assistance. The
+only major edits that we made were adjusting the page size to match this
+essay and forcing the music onto two systems to make the comparison
+easier. By default Finale would have engraved two systems of three
+measures each and a final, full-width system containing a single
+measure.
+
+Many of the differences between the two engravings are visible in
+measures 28--29, as shown here with Finale first and LilyPond second:
+
+@iftex
+@sourceimage{pdf/bwv861mm28-29,14cm,,}
+@end iftex
+@ifnottex
+@sourceimage{bwv861mm28-29,,,png}
+@end ifnottex
+
+@lilypond[staffsize=19.5,line-width=14\cm]
+global = {\key g \minor}
+
+partI = \relative c' {
+ \voiceOne
+ fis8 d' ees g, fis4 g
+ r8 a16 bes c8 bes16 a d8 r r4
+}
+
+partII = \relative c' {
+ \voiceTwo
+ d4 r4 r8 d'16 c bes8 c16 d
+ ees8 d c ees a, r r4
+}
+partIII = \relative c' {
+ \voiceOne
+ r2 r8 d ees g, fis4 g r8 a16 bes c8 bes16 a
+}
+partIV = \relative c {
+ \voiceTwo
+ d4 r r2
+ r8 d ees g, fis4 a
+}
+
+\score {
+ <<
+ % \set Score.barNumberVisibility = #all-bar-numbers-visible
+ % required in 2.13
+ \set Score.currentBarNumber = #28
+ \bar ""
+ \new PianoStaff <<
+ \new Staff = "RH" <<
+ \global
+ \new Voice = "voiceI" { \partI }
+ \new Voice = "voiceII" { \partII }
+ >>
+
+ \new Staff = "LH" <<
+ \clef "bass"
+ \global
+ \new Voice = "voiceIII" { \partIII }
+ \new Voice = "voiceIV" { \partIV }
+ >>
+ >>
+ >>
+ \layout {
+ \context {
+ \Staff
+ \remove "Time_signature_engraver"
+ }
+ \context {
+ \PianoStaff
+ \override StaffGrouper #'between-staff-spacing #'padding = #1
+ }
+ }
+}
+@end lilypond
+
+Some shortcomings in the unedited Finale output include:
+@itemize @bullet
+@item Most of the beams extend too far off the staff. A beam that points
+towards the center of the staff should have a length of about one
+octave, but engravers shorten this when the beam points away from the
+staff in multi-voice music. The Finale beaming can be easily improved
+with their Patterson Beams plug-in, but we elected to skip that step for
+this example.
+@item Finale doesn't adjust the positions of interlocking note heads,
+which makes the music extremely difficult to read when the upper and
+lower voices exchange positions temporarily:
+
+@lilypond
+collide = \once \override NoteColumn #'force-hshift = #0
+\new Score <<
+ \new Voice = "sample" \relative c''{
+ \key g \minor
+ <<
+ {\voiceOne g4 \collide g4}
+ \new Voice {\voiceTwo bes \collide bes}
+ >>
+ }
+ \new Lyrics \lyricsto "sample" \lyricmode { "good " " bad" }
+>>
+@end lilypond
+
+@item Finale has placed all of the rests at fixed heights on the staff.
+The user is free to adjust them as needed, but the software makes no
+attempt to consider the content of the other voice. As luck would have
+it, there are no true collisions between notes and rests in this example,
+but that has more to do with the positions of the notes than the rest.
+In other words, Bach deserves more credit for avoiding a complete
+collision than Finale does.
+
+@end itemize
+
+This example is not intended to suggest that Finale cannot be used to
+produce publication-quality output. On the contrary, in the hands of a
+skilled user it can and does, but it requires skill and time. One of the
+fundamental differences between LilyPond and commercial scorewriters is
+that LilyPond hopes to reduce the amount of human intervention to an
+absolute minimum, while other packages try to provide an attractive
+interface in which to make these types of edits.
+
+One particularly glaring omission we found from Finale is a missing flat
+in measure 33:
+
+@quotation
+@iftex
+@sourceimage{pdf/bwv861mm33-34-annotate,7.93cm,,}
+@end iftex
+@ifnottex
+@sourceimage{bwv861mm33-34-annotate,,,png}
+@end ifnottex
+@end quotation
+
+@noindent
+The flat symbol is required to cancel out the natural in the same
+measure, but Finale misses it because it occurred in a different voice.
+So in addition to running a beaming plug-in and checking the spacing on
+the noteheads and rests, the user must also check each measure for
+cross-voice accidentals to avoid interrupting a rehearsal over an
+engraving error.
+
+If you are interested in examining these examples in more detail, the
+full seven-measure excerpt can be found at the end of this essay along
+with four different published engravings. Close examination reveals that
+there is some acceptible variation among the hand-engravings, but that
+LilyPond compares reasonably well to that acceptible range. There are
+still some shortcomings in the LilyPond output, for example, it appears
+a bit too agressive in shortening some of the stems, so there is room
+for further development and fine-tuning.
+
+Of course, 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. 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. Where
+manual adjustments are needed, LilyPond's structure has been designed
+with that flexibility in mind.
+
+@node Building software
+@section Building software
+
+This section describes some of the programming decisions that we made
+when designing LilyPond.
+
+@menu
+* Music representation::
+* What symbols to engrave?::
+* Flexible architecture::
+@end menu
+
+
+@node Music representation
+@unnumberedsubsec Music representation
+
+@cindex syntax
+@cindex recursive structures
+
+Ideally, the input format for any high-level formatting system is
+an abstract description of the content. In this case, that would
+be the music itself. This poses a formidable problem: how can we
+define what music really is? Instead of trying to find an answer,
+we have reversed the question. We write a program capable of
+producing sheet music, and adjust the format to be as lean as
+possible. When the format can no longer be trimmed down, by
+definition we are left with content itself. Our program serves as
+a formal definition of a music document.
+
+The syntax is also the user-interface for LilyPond, hence it is
+easy to type:
+
+@example
+@{
+ c'4 d'8
+@}
+@end example
+
+@noindent
+to create a quarter note on middle C (C1) and an eighth note on
+the D above middle C (D1).
+
+@lilypond[quote]
+{
+ c'4 d'8