@node Top, , ,
@top
-@unnumbered New features in 2.3 since 2.2
+@unnumbered New features in 2.5 since 2.4
@itemize @bullet
-@item The @code{--safe} mode has been revisited: it makes the basic
-ly: interface available, and stops malicious @TeX{} code.
+
+@item
+The PostScript backend is now used by default. This backend requires
+less machinery to run, and gives more consistent results.
+
+Due bugs in GhostScript's PDF handling, it is recommended to upgrade
+to GhostScript 8.x.
+
+@item
+Separator slashes may be inserted between systems in a score. See
+@file{input/regression/system-separator.ly} for an example.
+
+@item
+Locations of errors in the input are now calculated more precisely.
+
+@item
+LilyPond now uses Pango and FontConfig for selecting and rendering
+internationalized text in non-@TeX{} backends. A font may be selected
+by using a FontConfig name,
+
+@example
+\override TextScript #'font-name = #"Serif"
+@end example
+
+
+@noindent
+or using the classic font selection mechanism
+
+@example
+\override TextScript #'font-family = #'roman
+\override TextScript #'font-series = #'bold
+@end example
+
+@noindent
+Input strings encoded in UTF-8 are then rendered through Pango.
+
+@item
+Metrics of blocks of text can be retrieved from (La)@TeX{} directly,
+using the @code{-f texstr} output backend. This provides exact metrics
+for texts, including kerning and accents.
+
+@item
+LilyPond now uses FreeType read the Feta font as an OpenType
+font. This is cleaner design and more robust. A recent version of
+FontForge (11122004 or newer) and Freetype is required.
+
+As a result, the SVG backend is now a fully functional backend.
+
+@item
+A new script, @code{\espressivo} has been added, for a combination of
+crescendo and decrescendo on a single note.
+
+@item
+In markups, expressions stacked with @code{\column},
+@code{\center-align}, etc, are not grouped with @code{< ... >} anymore,
+but with @code{@{ ... @}}, eg:
+@example
+\markup \column @{
+ \line @{ first line @}
+ \line @{ second line @}
+@}
+@end example
+
+@item
+LilyPond will now avoid line breaks that cause long texts to stick
+outside of the page staff.
+
+@item
+Grace notes following a main note, used to be entered by letting the
+grace notes follow a skip in a parallel expression, for example,
+
+@verbatim
+ << { d1 }
+ { s2 \grace { c16[ d] } } >>
+ c4
+@end verbatim
+
+@noindent
+This can now be shortened by doing
+
+@example
+\afterGrace @{ d1 @} @{ c16[ d] @}
+@end example
+
+@item
+Pagebreaks can now be forced or forbidden after title blocks. This is
+achieved by setting @code{breakbefore} in the @code{\header} block to
+true or false.
+
+@item
+Shaped note heads. This feature has been sponsored by Jonathan Walther.
+
+@item
+Layout for titles, page header and footer can now be entered as
+@code{\markup} commands.
+
+@item Positioning of slurs can now be adjusted manually
+
+@item Grace notes are correctly quoted and formatted when using cue notes.
+
+@item Cue notes can now be created with
+
+@example
+\cueDuring #@var{voice-name} #@var{direction} @{ @var{music} @}
+@end example
+
+@noindent
+This will set stem directions and put the cue notes in the @code{cue}
+@code{Voice}
+
+@item Stemlets, short stems over beamed rests, have been added.
+
+@end itemize
+
+
+@unnumbered New features in 2.4 since 2.2
+
+@itemize @bullet
+
+@item Parts that use @code{\quote} can now be transposed.
+
+@item LilyPond does not try to produce output for files that
+have a parse error.
+
+@item @code{lilypond-book} will now remove any output files that
+contain failed music snippets.
+
+@item The mode changing commands (@code{\chords}, @code{\lyrics}, etc.)
+have been renamed to @code{\chordmode}, @code{\lyricmode}, etc. The
+command @code{\chords} is an abbreviation for
+
+@example
+ \new ChordNames \chordmode ...
+@end example
+
+@noindent
+@code{\drums}, @code{\lyrics}, @code{\chords}, @code{\figures}
+function similarly.
+
+@item The types of events quoted with @code{\quote} can now be tuned
+with @code{quotedEventTypes}. By default, only notes and rests end up
+in quotes.
+
+@item LilyPond will try to keep
+staves at the same distances across a page, but it will stretch
+distances to prevent collisions. This results in a more even
+appearance of the page.
+
+@item Key signature cancellations are now printed before the bar line,
+and their appearance has been improved.
+
+@item Different voices that all use @code{\quote} can now refer to
+each other.
+
+
+@item The automatic staff changer, which is invoked with
+@code{\autochange}, now creates the @code{up} and @code{down} staff
+automatically, and uses bass clef for the bottom staff.
+
+@item There is now support for putting two slurs on chords, both above
+and below. This is switched on with the @code{doubleSlurs} property.
+
+@item Running trills now have their own spanner and event,
+
+@example
+ c1\startTrillSpan c4\stopTrillSpan
+@end example
+
+@item There is a new markup command @code{\postscript} that takes a
+string that is dumped as verbatim PostScript in the output.
+
+@item The melody for a @code{\lyricsto} text can be changed during a
+melody by setting the @code{associatedVoice} property.
+
+@item The @code{\lyricsto} keyword now automatically switches on
+lyrics mode.
+
+@item The LilyPond binary now supports output options
+@code{--dvi} @code{--png} @code{--ps} @code{--pdf} and
+@code{--preview}. The old wrapper script for La@TeX{} has been
+renamed to @code{lilypond-latex}.
+
+@item Support for ambitus has been rewritten. The Ambitus object is now
+a grouping object, composed of @code{AmbitusLine},
+@code{AmbitusAccidental} and @code{AmbitusNoteHead}. These objects may
+be tuned similar to accidentals and note heads.
+
+@item Ledger lines are now shortened when the spacing is tight. This
+prevents ledger lines from colliding with each other.
+
+@item Slur formatting has been rewritten. The new slur code
+works similar to the Beam formatter: scores are assigned for all
+esthetic components of a slur. A large number of combinations for
+begin and end points is then tried out. Slurs will now also take into
+account collisions with staff lines, scripts (like staccato and
+accent) and accidentals.
+
+
+@item In the LilyPond emacs mode, entering @code{|} will display the
+ current beat within the measure.
+
+@item Colliding notes are now correctly aligned relative to notes in other staves.
+
+@item An experimental GNOME output backend is available for developers.
+It depends on several unreleased packages such as gnome-guile TLA and
+Pango CVS. The output interface coverage is sparse, but it already
+does support point-and-click on the GNOME Canvas. See also
+@file{scm/output-gnome.scm}.
+
+@item Context definitions are now stored in identifiers that match the
+context name, in other words, to modify a @code{Staff} context, the
+following code may be used.
+
+@example
+\context @{
+ \Staff
+ ..
+@}
+@end example
+
+@item
+The @code{\paper} block has been renamed to @code{\layout}. A new
+@code{\paper} block has been introduced to hold settings for paper
+size and output scaling. Further options include @code{raggedbottom}
+(if set, systems are not vertically filled to reach the bottom of the
+page), and @code{raggedlastbottom}.
+
+
+@item Support for fret diagrams has been contributed by Carl
+D. Sorensen. @file{input/test/fret-diagram.ly} contains an example.
+
+@item The @code{--safe-mode} has been revisited: GUILE evaluation
+is done in the R5RS safe module, with only the basic @code{ly:}
+interface available and malicious @TeX{} code is stopped. However, to
+be reasonably safe, you are advised to use the PostScript backend
+rather than the @TeX{} backend anyway; and if possible use an UML
+sandbox to run gs or latex.
@item Music syntax can now be extended seamlessly. As an example,
here is the new implementation @code{\applymusic},
@item @code{\apply} has been renamed to @code{\applymusic}.
@item Music can be used as a markup.
-When inserting a @code{score} block as part of a @code{\markup},
-it produces a rendered markup of the music.
-
-@example
-@c TODO, see input/test/markup-score.ly
-@end example
-
+When inserting a @code{score} block as part of a @code{\markup}, it
+produces a rendered markup of the music. An example is in
+@file{input/test/markup-score.ly}.
@item LilyPond expressions can be embedded into Scheme. The syntax for
this is @code{#@{ ... #@}}. Within such a block, Scheme forms can be
introduced using a @code{$} character (@code{$$} results in a single
-`$' character). These forms are then printed in the pattern.
+`$' character). These forms are then inserted in the pattern.
@example
#(define (textoffset dx dy)
(ly:export
#@{ \override Voice.TextScript #'extra-offset = #(cons $dx $dy) #@}))
-\score @{
- \notes @{
- c'^"normal text"
- %% the following statement is the same as
- %% \override Voice.TextScript #'extra-offset = #(cons 2 -3)
- #(textoffset 2 -3)
- c'^"text with offset"
- @}
+@{
+ c'^"normal text"
+ %% The following embedded scheme call is the same as
+ %% \override Voice.TextScript #'extra-offset = #(cons 2 -3)
+ #(textoffset 2 -3)
+ c'^"text with offset"
@}
@end example
-@item Music lists are allowed at toplevel.
+@item A music list at toplevel is interpreted as implicit @code{\score}
+a @code{\score} block at toplevel is interpreted as an implicit
+@code{\book} and @code{\notemode} mode is the default lexer mode. The
+result is that
@example
\header @{ title = "The Title" @}
-\notes @{ a b c @}
+@{ a b c @}
@end example
-is the same as
+is interpreted as
@example
\header @{ title = "The Title" @}
\book @{
\score @{
- \notes @{ a b c @}
+ \notemode @{ a b c @}
@}
@}
@end example
-These toplevel forms are handled by
-@code{default-toplevel-music-handler}. Similarly, a @code{score}
-block at toplevel is handled by @code{default-toplevel-score-handler}
-an a @code{book} at toplevel is handled by
-@code{default-toplevel-book-handler}.
+This is handled by the function defined in
+@code{toplevel-music-handler}. Similarly, @code{\score} and
+@code{\book} are handled by @code{toplevel-score-handler} and a
+@code{toplevel-book-handler}. By changing these variables, different
+results can be obtained.
-@ignore
+@item Mode changing commands,
+such as @code{\chordmode} and @code{\figuremode} must now be directly
+followed by delimiters. The following example demonstrates the new
+behavior,
-@c FIXME: un-geekify
-These default handlers have the following effect. A Music list at
-toplevel is encapsulated in a @code{score} block, and a @code{score}
-block at toplevel is encapsulated in a @code{book} block. A
-@code{book} block at toplevel generates printed output.
-@end ignore
+@verbatim
+ \figuremode \context Figures { .. } % wrong
+ \context Figures \figuremode { .. } % right
+@end verbatim
-@item Start pitch for @code{relative} music is optional for music lists.
-The default value is one octave below middle C.
+@item The starting pitch for @code{relative} music is optional for music lists.
+The default value is middle C.
-@c update-me? formal definition of newaddlyrics, once it works
-@item Combining lyrics with music can be @code{\newlyrics}
+@item Combining lyrics with music can be done with @code{\addlyrics}
@example
-<<
\relative @{
\clef bass
d2 d c4 bes a2 \break
@}
- \newlyrics @{
+ \addlyrics @{
My first Li -- ly song,
@}
- \newlyrics @{
+ \addlyrics @{
Not much can go wrong!
@}
->>
@end example
-Syntactically, @code{\newlyrics} acts like an infix operator.
+Syntactically, @code{\addlyrics} is an infix operator. It is a
+shortcut for a combination of @code{\new Lyrics}, @code{\lyricmode}
+and @code{\lyricsto}.
@item The parser is encapsulated in a Scheme function
@code{ly:parse-file}, so the following fragment processes two files
@verbatim
- #(ly:parse-file "another.ly")
- \score { \notes { c4 }}
+#(ly:parse-file "another.ly")
+\score { \notes { c4 }}
@end verbatim
@item The @code{font-encoding} property can now be used to select
@code{\encoding}. The strings for markup texts are translated
automatically.
-@item The toplevel block @code{book} introduces page layout.
-A @code{book} groups @code{score} blocks into one page layout entity.
-Page layout consists of markup titles, headers and footers, and page
-breaking. Two page breaking algorithms are available, the classic
-ragged pages (the default), and optimal page breaking
+@item The toplevel block @code{\book} introduces page layout.
+A @code{\book} groups @code{\score} blocks into one page layout
+entity. For example, two scores are combined in one book with
@example
-\paper @{
- %% Select page breaking function.
- %% #(define page-breaking ly:ragged-page-breaks)
- #(define page-breaking ly:optimal-page-breaks)
-@}
\book @{
\score @{ ... @}
\score @{ ... @}
@}
@end example
-The @code{lilypond} program does not generate La@TeX{} titles or page
-layout. If you need La@TeX{} titles, you can use the
-@code{lilypond-book} program.
+
+@item
+Titling and page breaks are handled by LilyPond. Page breaks may be
+inserted manually with
+
+@example
+ \pageBreak
+@end example
+
+@item
+Invoking @code{lilypond} runs the actual binary, which not use
+La@TeX{} for titling or page layout. If you need La@TeX{} code in
+titles, you can use the @code{lilypond-book} program. The former
+@code{lilypond} script has been retained as @code{lilypond-latex}.
@item There is now less of a noticeable ``hook'' at the end of a long slur.
@end itemize
+
+
+@c ****************************************************************
+
@unnumbered New features in 2.2 since 2.0
@itemize @bullet
for simultaneous music.
To convert your files from <PITCHES> to <<PITCHES>>, use the script
-included in buildscripts/convert-new-chords.py
+included in @file{buildscripts/convert-new-chords.py}.
This change was introduced for the following reasons