+2004-10-09 Jan Nieuwenhuizen <janneke@gnu.org>
+
+ The grand \paper -> \layout, \bookpaper -> \paper renaming.
+
2004-10-10 Graham Percival <gperlist@shaw.ca>
- * Documentation/user/notation.itely: add raggedright to a whole bunch of places.
+ * Documentation/user/notation.itely: add raggedright to a whole
+ bunch of places.
2004-10-10 Han-Wen Nienhuys <hanwen@xs4all.nl>
The adjustments of the previous subsections (@ref{Changing context
properties on the fly}, @ref{Modifying context plug-ins} and
@ref{Layout tunings within contexts}) can also be entered separate
-from the music, in the @code{\paper} block,
+from the music, in the @code{\layout} block,
@example
-\paper @{
+\layout @{
@dots{}
\context @{
\Staff
Other contexts can be modified analogously.
-The @code{\set} keyword is optional within the @code{\paper} block, so
+The @code{\set} keyword is optional within the @code{\layout} block, so
@example
\context @{
to indicate improvisation in Jazz pieces,
@lilypond[raggedright]
- \paper { \context {
+ \layout { \context {
\name ImproVoice
\type "Engraver_group_engraver"
\consists "Note_heads_engraver"
These settings are again done within a @code{\context} block inside a
-@code{\paper} block,
+@code{\layout} block,
@example
- \paper @{
+ \layout @{
\context @{
@dots{}
@}
}
@end verbatim
-Putting both into a @code{\paper} block, like
+Putting both into a @code{\layout} block, like
@example
- \paper @{
+ \layout @{
\context @{
\name ImproVoice
@dots{}
and is passed similarly to lyric syllables.
If no @code{\encoding} has been specified, then the encoding is taken
-from the @code{\paper} block (or @code{\bookpaper}, if @code{\paper}
+from the @code{\layout} block (or @code{\paper}, if @code{\layout}
does not specify encoding). The variable @code{inputencoding} may be
set to a string or symbol specifying the encoding, e.g.
@verbatim
- \paper {
+ \layout {
inputencoding = "latin1"
}
@end verbatim
@end verbatim
@noindent
-or set @code{inputencoding} in the @code{\bookpaper} block.
+or set @code{inputencoding} in the @code{\paper} block.
There is a special encoding, called @code{TeX}. This encoding does not
reencode text for the font used. Rather, it tries to guess the width
@subsection Nested scores
It is possible to nest music inside markups, by adding a @code{\score}
-block to markup expression. Such a score must contain a @code{\paper}
+block to markup expression. Such a score must contain a @code{\layout}
block.
@lilypond[verbatim,raggedright]
c4 d^\markup {
\score {
\relative { c4 d e f }
- \paper { }
+ \layout { }
}
}
e f
* Multiple movements::
* Creating titles::
* Page breaking::
-* Paper size::
+* paper size::
* Page layout::
@end menu
@cindex font size, setting
@cindex staff size, setting
-@cindex @code{paper} file
+@cindex @code{layout} file
The Feta font provides musical symbols at eight different
sizes. Each font is tuned for a different staff size: at a smaller size
@cindex @code{linewidth}
The most basic settings influencing the spacing are @code{indent} and
-@code{linewidth}. They are set in the @code{\paper} block. They
+@code{linewidth}. They are set in the @code{\layout} block. They
control the indentation of the first line of music, and the lengths of
the lines.
-If @code{raggedright} is set to true in the @code{\paper}
+If @code{raggedright} is set to true in the @code{\layout}
block, then the lines are justified at their natural length. This
useful for short fragments, and for checking how tight the natural
spacing is.
}
{ c'1 }
}
- \bookpaper {
+ \paper {
linewidth = 8.0 \cm
}
}
A more advanced option is to change the Scheme functions
@code{make-book-title} and @code{make-score-title} functions, defined
-in the @code{\bookpaper} of the @code{\book} block. These functions
+in the @code{\paper} of the @code{\book} block. These functions
create a block of titling, given the information in the
@code{\header}. The init file @file{ly/titling.scm} shows how the
default format is created, and it may be used as a template for
different styles.
-@cindex \bookpaper
+@cindex \paper
@cindex header
@cindex footer
@cindex page layout
a line break.
Page breaks are computed by the @code{page-breaking} function in the
-@code{\bookpaper} block.
+@code{\paper} block.
@refcommands
@cindex @code{\noPageBreak}
@code{\noPageBreak}
-@node Paper size
-@subsection Paper size
+@node paper size
+@subsection paper size
@cindex paper size
@cindex page size
To change the paper size, there are two commands,
@example
#(set-default-paper-size "a4")
- \paper@{
+ \layout@{
#(set-paper-size "a4")
@}
@end example
-The second one sets the size of the @code{\paper} block that it is in.
+The second one sets the size of the @code{\layout} block that it is in.
The following paper sizes are supported.
footers to each page.
The default layout responds to the following settings in the
-@code{\bookpaper} block
+@code{\paper} block
-@cindex \bookpaper
+@cindex \paper
@table @code
@item firstpagenumber
@item leftmargin
Margin between the left side of the page and the beginning of the music.
@item linewidth
- The length of the paper line.
+ The length of the systems.
@item headsep
Distance between top-most music system and the page header
@item footsep
@end table
@example
- \bookpaper@{
+ \paper@{
hsize = 2\cm
topmargin = 3\cm
bottommargin = 3\cm
You can also define these values in scheme. In that case @code{mm},
@code{in}, @code{pt} and @code{cm} are variables defined in
-@file{book-paper-defaults.ly} with values in millimeters. That's why the
+@file{paper-defaults.ly} with values in millimeters. That's why the
value has to be multiplied in the example above.
@example
- \bookpaper@{
+ \paper@{
#(define bottommargin (* 2 cm))
@}
@end example
can.}
The header and footer are created by the functions @code{make-footer}
-and @code{make-header}, defined in @code{\bookpaper}. The default
+and @code{make-header}, defined in @code{\paper}. The default
implementations are in @file{scm/page-layout.scm}.
The following settings influence the header and footer layout.
@end table
The page layout itself is done by two functions in the
-@code{\bookpaper}, @code{page-music-height} and
+@code{\paper}, @code{page-music-height} and
@code{page-make-stencil}. The former tells the line-breaking algorithm
how much space can be spent on a page, the latter creates the actual
page given the system to put on it.
toplevel expressions is one of the following
@itemize @bullet
-@item An output definition, such as @code{\bookpaper}, @code{\midi}
-and @code{\paper}. Such a definition at toplevel changes the default
+@item An output definition, such as @code{\paper}, @code{\midi}
+and @code{\layout}. Such a definition at toplevel changes the default
settings for the block entered.
@item An @code{\header} block. This sets the global header block. This
The following example shows three things which may be entered at
toplevel
@verbatim
- \paper {
+ \layout {
% movements are non-justified by default
raggedright = ##t
}
\score{
\new Staff \melody
- \paper { }
+ \layout { }
\midi { \tempo 4=60 }
}
}
\lyricsto "one" \new Lyrics \text
>>
- \paper { }
+ \layout { }
\midi { \tempo 4=60 }
}
\context Staff = one \melody
>>
- \paper{ }
+ \layout{ }
\midi { \tempo 4=60}
}
}
\lyricsto "one" \new Lyrics \text
>>
- \paper { }
+ \layout { }
\midi { \tempo 4=60}
}
\context Staff = upper \upper
\context Staff = lower \lower
>>
- \paper { }
+ \layout { }
\midi { \tempo 4=60 }
}
\context Staff = lower \lower
>>
>>
- \paper {
+ \layout {
\context { \RemoveEmptyStaffContext }
}
\midi { \tempo 4=60}
>>
\context Dynamics=pedal \pedal
>>
- \paper {
+ \layout {
\context {
\type "Engraver_group_engraver"
\name Dynamics
\new Staff << \global \viola >>
\new Staff << \global \cello >>
>>
- \paper { }
+ \layout { }
\midi { \tempo 4=60}
}
\context Lyrics = basses \lyricsto basses \bassWords
>>
- \paper {
+ \layout {
\context {
% a little smaller so lyrics can be closer to the staff.
\Staff minimumVerticalExtent = #'(-3 . 3)
\context Voice = bassusNotes << \global \bassusNotes >>
\context Lyrics = bassusLyrics \lyricsto bassusNotes { \bassusLyrics }
>>
- \paper {
+ \layout {
\context {
\Score
\override BarLine #'transparent = ##t
\new DrumStaff { \drumContents }
>>
>>
- \paper {
+ \layout {
\context { \RemoveEmptyStaffContext }
\context {
\Score
}
\score {
\chant
- \paper{ }
+ \layout{ }
\midi { \tempo 4=60 }
}
\score {
\topVoice
- \paper {
+ \layout {
\context {
\Voice
\remove "Stem_engraver"
\score {
\topVoice
- \paper {
+ \layout {
\context {
\Voice
\remove "Stem_engraver"
\score {
\topVoice
- \paper {
+ \layout {
\context {
\Voice
\remove "Stem_engraver"
\score {
\topVoice
- \paper {
+ \layout {
\context {
\Voice
\remove "Phrasing_slur_engraver"
@subsection Additional parameters
The @code{lilypond} program responds to several parameters specified
-in a @code{\paper} section of the input file. They can be overridden
+in a @code{\layout} section of the input file. They can be overridden
by supplying a @code{--set} command line option.
@table @code
@item orientation
Set orientation. Choices are @code{portrait} or @code{landscape}. Is
-read from the @code{\paper} block, if set.
+read from the @code{\layout} block, if set.
@item textheight
The vertical extension of the music on the page. It is normally
calculated automatically, based on the paper size.
@item linewidth
- The music line width. It is normally read from the @code{\paper}
+ The music line width. It is normally read from the @code{\layout}
block.
@item papersize
The paper size (as a name, e.g. @code{a4}). It is normally read from
-the @code{\paper} block.
+the @code{\layout} block.
@item fontenc
The font encoding, should be set identical to the @code{font-encoding}
enteredby = "JCN"
instrument = "instrument"
}
-\paper { linewidth = -1. }
+\layout { linewidth = -1. }
\relative c'' { a b c d }
\end{lilypond}
@node Integrating LaTeX and music
@section Integrating LaTeX and music
-La@TeX{} is the de facto standard for publishing papers in the exact
+La@TeX{} is the de facto standard for publishing layouts in the exact
sciences. It is built on top of the @TeX{} typesetting engine, so it
provides the best typography available anywhere.
@end example
@noindent
-without @code{\paper}, @code{\score} or other red tape.
+without @code{\layout}, @code{\score} or other red tape.
@item indent=@var{size}\@var{unit}
sets indentation of the first music system to @var{size},
"(For LilyPond version " (lilypond-version) ")"))
s2
}
- \paper {
+ \layout {
indent = 0.0\pt
raggedright = ##t
}
c'1
\break < d' a' f''>1
}
- \paper {
+ \layout {
\context {
\Staff
\consists Custos_engraver
r\longa*1/4 r\breve *1/2
r1 r2 r4 r8 r16 r32 r64 r64
}
- \paper {
+ \layout {
raggedright = ##t
\context {
\Staff
#(set-time-signature 5 8 '(3 2))
a4. g4
}
- \paper {
+ \layout {
\context {
\Staff
\consists "Measure_grouping_engraver"
@end example
In the MIDI output, they are interpreted as a tempo change. In the
-paper output, a metronome marking is printed
+layout output, a metronome marking is printed
@cindex @code{\tempo}
@lilypond[quote,raggedright,verbatim,fragment]
\tempo 8.=120 c''1
c4\startGroup
c4\stopGroup\stopGroup
}
- \paper {
+ \layout {
\context {
\Staff \consists "Horizontal_bracket_engraver"
}}}
@example
\score @{
@var{..music..}
- \paper @{ .. @}
+ \layout @{ .. @}
@}
\score @{
\unfoldrepeats @var{..music..}
} \mus
\context Lyrics \nam
>>
- \paper {
+ \layout {
%% need to do this, because of indented @itemize
linewidth= 9 \cm
\context { \Score
for example,
@example
- \paper @{
+ \layout @{
\context @{
\Voice
\consists Ambitus_engraver
This results in the following output
@lilypond[quote,raggedright]
-\paper {
+\layout {
\context {
\Staff
\consists Ambitus_engraver
@end lilypond
For longer instrument names, it may be useful to increase the
-@code{indent} setting in the @code{\paper} block.
+@code{indent} setting in the @code{\layout} block.
@seealso
@lilypond[quote,raggedright,verbatim]
-\paper {
+\layout {
\context { \RemoveEmptyStaffContext }
}
>
}
}
-\paper {
+\layout {
interscoreline = 1
\context { \Score \remove "Bar_number_engraver" }
\context { \Staff
following table
@lilypond[quote,raggedright]
-\paper {
+\layout {
indent = 0.0
\context { \Staff
\remove Staff_symbol_engraver
used in different flavors of notational style.
For typesetting custodes, just put a @internalsref{Custos_engraver} into the
-@internalsref{Staff} context when declaring the @code{\paper} block,
+@internalsref{Staff} context when declaring the @code{\layout} block,
as shown in the following example
@example
-\paper @{
+\layout @{
\context @{
\Staff
\consists Custos_engraver
\break
g'
}
-\paper {
+\layout {
\context { \Staff \consists Custos_engraver }
}
}
There is limited support for white mensural ligatures.
-To engrave white mensural ligatures, in the paper block the
+To engrave white mensural ligatures, in the layout block the
@internalsref{Mensural_ligature_engraver} has to be put into the
@internalsref{Voice} context, and remove the
@internalsref{Ligature_bracket_engraver}
@example
-\paper @{
+\layout @{
\context @{
\Voice
\remove Ligature_bracket_engraver
s4
\[ e1 f1 a\breve g\longa \]
}
- \paper {
+ \layout {
\context {
\Voice
\remove Ligature_bracket_engraver
@b{Figurae@*Liquescentes Auctae} @tab
@b{Figurae@*Liquescentes Deminutae}
-@c TODO: \paper block is identical in all of the below examples.
+@c TODO: \layout block is identical in all of the below examples.
@c Therefore, it should somehow be included rather than duplicated all
@c the time. --jr
\[ \inclinatum b \]
\noBreak s^\markup {"b"}
}
-\paper { \neumeDemoPaper }}
+\layout { \neumeDemoLayout }}
@end lilypond
@tab
@lilypond[quote,noindent,staffsize=26,nofragment,linewidth=2.5\cm]
\[ \inclinatum \auctum b \]
\noBreak s^\markup {"e"}
}
-\paper { \neumeDemoPaper }}
+\layout { \neumeDemoLayout }}
@end lilypond
@tab
@lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
\[ \inclinatum \deminutum b \]
\noBreak s^\markup {"f"}
}
-\paper { \neumeDemoPaper }}
+\layout { \neumeDemoLayout }}
@end lilypond
@item
\[ \virga b \]
\noBreak s^\markup {"g"}
}
-\paper { \neumeDemoPaper }}
+\layout { \neumeDemoLayout }}
@end lilypond
@tab
@tab
\[ \stropha b \]
\noBreak s^\markup {"h"}
}
-\paper { \neumeDemoPaper }}
+\layout { \neumeDemoLayout }}
@end lilypond
@tab
@lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
\[ \stropha \auctum b \]
\noBreak s^\markup {"i"}
}
-\paper { \neumeDemoPaper }}
+\layout { \neumeDemoLayout }}
@end lilypond
@tab
\[ \oriscus b \]
\noBreak s^\markup {"j"}
}
-\paper { \neumeDemoPaper }}
+\layout { \neumeDemoLayout }}
@end lilypond
@tab
@tab
\[ b \flexa g \]
s^\markup {"k"}
}
-\paper { \neumeDemoPaper }}
+\layout { \neumeDemoLayout }}
@end lilypond
@tab
@lilypond[quote,noindent,staffsize=26,nofragment,linewidth=2.0\cm]
\[ b \flexa \auctum \ascendens g \]
\noBreak s^\markup {"m"}
}
-\paper { \neumeDemoPaper }}
+\layout { \neumeDemoLayout }}
@end lilypond
@tab
@lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
\[ b \flexa \deminutum g \]
s^\markup {"n"}
}
-\paper { \neumeDemoPaper }}
+\layout { \neumeDemoLayout }}
@end lilypond
@item
\[ g \pes b \]
s^\markup {"o"}
}
-\paper { \neumeDemoPaper }}
+\layout { \neumeDemoLayout }}
@end lilypond
@tab
@lilypond[quote,noindent,staffsize=26,nofragment,linewidth=2.0\cm]
\[ g \pes \auctum \ascendens b \]
\noBreak s^\markup {"q"}
}
-\paper { \neumeDemoPaper }}
+\layout { \neumeDemoLayout }}
@end lilypond
@tab
@lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
\[ g \pes \deminutum b \]
s^\markup {"r"}
}
-\paper { \neumeDemoPaper }}
+\layout { \neumeDemoLayout }}
@end lilypond
@item
\[ \oriscus g \pes \virga b \]
s^\markup {"s"}
}
-\paper { \neumeDemoPaper }}
+\layout { \neumeDemoLayout }}
@end lilypond
@tab
@lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
\[ \oriscus g \pes \auctum \descendens b \]
s^\markup {"t"}
}
-\paper { \neumeDemoPaper }}
+\layout { \neumeDemoLayout }}
@end lilypond
@tab
\[ \quilisma g \pes b \]
s^\markup {"u"}
}
-\paper { \neumeDemoPaper }}
+\layout { \neumeDemoLayout }}
@end lilypond
@tab
@lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
\[ \quilisma g \pes \auctum \descendens b \]
s^\markup {"v"}
}
-\paper { \neumeDemoPaper }}
+\layout { \neumeDemoLayout }}
@end lilypond
@tab
\[ \deminutum g \pes b \]
s^\markup {"w"}
}
-\paper { \neumeDemoPaper }}
+\layout { \neumeDemoLayout }}
@end lilypond
@tab
@lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
\[ \deminutum g \pes \auctum \descendens b \]
s^\markup {"x"}
}
-\paper { \neumeDemoPaper }}
+\layout { \neumeDemoLayout }}
@end lilypond
@tab
\[ a \pes b \flexa g \]
s^\markup {"y"}
}
-\paper { \neumeDemoPaper }}
+\layout { \neumeDemoLayout }}
@end lilypond
@tab
@lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
\[ a \pes b \flexa \auctum \descendens g \]
s^\markup {"z"}
}
-\paper { \neumeDemoPaper }}
+\layout { \neumeDemoLayout }}
@end lilypond
@tab
@lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
\[ a \pes b \flexa \deminutum g \]
s^\markup {"A"}
}
-\paper { \neumeDemoPaper }}
+\layout { \neumeDemoLayout }}
@end lilypond
@item
\[ \deminutum a \pes b \flexa g \]
s^\markup {"B"}
}
-\paper { \neumeDemoPaper }}
+\layout { \neumeDemoLayout }}
@end lilypond
@tab
@lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
\[ \deminutum a \pes b \flexa \auctum \descendens g \]
s^\markup {"C"}
}
-\paper { \neumeDemoPaper }}
+\layout { \neumeDemoLayout }}
@end lilypond
@tab
@lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
\[ \deminutum a \pes b \flexa \deminutum g \]
s^\markup {"D"}
}
-\paper { \neumeDemoPaper }}
+\layout { \neumeDemoLayout }}
@end lilypond
@item
\[ a \flexa g \pes b \]
s^\markup {"E"}
}
-\paper { \neumeDemoPaper }}
+\layout { \neumeDemoLayout }}
@end lilypond
@tab
@lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
\[ a \flexa g \pes \auctum \descendens b \]
s^\markup {"F"}
}
-\paper { \neumeDemoPaper }}
+\layout { \neumeDemoLayout }}
@end lilypond
@tab
@lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
\[ a \flexa g \pes \deminutum b \]
s^\markup {"G"}
}
-\paper { \neumeDemoPaper }}
+\layout { \neumeDemoLayout }}
@end lilypond
@item
\[ \virga b \inclinatum a \inclinatum g \]
s^\markup {"H"}
}
- \paper { \neumeDemoPaper }
+ \layout { \neumeDemoLayout }
}
@end lilypond
@tab
\[ \virga b \inclinatum a \inclinatum \auctum g \]
s^\markup {"I"}
}
-\paper { \neumeDemoPaper }}
+\layout { \neumeDemoLayout }}
@end lilypond
@tab
@lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
\[ \virga b \inclinatum a \inclinatum \deminutum g \]
s^\markup {"J"}
}
-\paper { \neumeDemoPaper }}
+\layout { \neumeDemoLayout }}
@end lilypond
@item
\[ g \pes a \virga b \]
s^\markup {"K"}
}
-\paper { \neumeDemoPaper }}
+\layout { \neumeDemoLayout }}
@end lilypond
@tab
@lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
\[ g \pes a \pes \auctum \descendens b \]
s^\markup {"L"}
}
-\paper { \neumeDemoPaper }}
+\layout { \neumeDemoLayout }}
@end lilypond
@tab
@lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
\[ g \pes a \pes \deminutum b \]
s^\markup {"M"}
}
-\paper { \neumeDemoPaper }}
+\layout { \neumeDemoLayout }}
@end lilypond
@item
\[ g \oriscus a \pes \virga b \]
s^\markup {"N"}
}
-\paper { \neumeDemoPaper }}
+\layout { \neumeDemoLayout }}
@end lilypond
@tab
@lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
\[ g \oriscus a \pes \auctum \descendens b \]
s^\markup {"O"}
}
-\paper { \neumeDemoPaper }}
+\layout { \neumeDemoLayout }}
@end lilypond
@tab
\[ \stropha b \stropha b \stropha a \]
s^\markup {"P"}
}
- \paper { \neumeDemoPaper }
+ \layout { \neumeDemoLayout }
}
@end lilypond
@tab
context.
@verbatim
-\paper{
+\layout{
\context{ \Score \remove "Timing_engraver" }
\context{ \Staff \consists "Timing_engraver" }
}
@end verbatim
@lilypond[quote,raggedright]
-\paper{
+\layout{
\context{ \Score \remove "Timing_engraver" }
\context{ \Staff \consists "Timing_engraver" }
}
@menu
* Balloon help::
-* Blank music paper::
+* Blank music layout::
* Hidden notes::
* Easy Notation note heads::
@end menu
-@node Blank music paper
-@subsection Blank music paper
+@node Blank music layout
+@subsection Blank music layout
-A blank music paper can be produced also by using invisible notes, and
+A blank music layout can be produced also by using invisible notes, and
removing @code{Bar_number_engraver}.
@noindent
There is also a form of scoping: in the following example, the
-@code{\paper} block also contains a @code{traLaLa} variable, which is
+@code{\layout} block also contains a @code{traLaLa} variable, which is
independent of the outer @code{\traLaLa}.
@example
traLaLa = @{ c'4 d'4 @}
- \paper @{ traLaLa = 1.0 @}
+ \layout @{ traLaLa = 1.0 @}
@end example
@c
In effect, each input file is a scope, and all @code{\header},
-@code{\midi} and @code{\paper} blocks are scopes nested inside that
+@code{\midi} and @code{\layout} blocks are scopes nested inside that
toplevel scope.
Both variables and scoping are implemented in the GUILE module system.
@section Markup programmer interface
Markups implemented as special Scheme functions. When applied with as
-arguments an output definition (@code{\paper} or @code{\bookpaper}),
+arguments an output definition (@code{\layout} or @code{\paper}),
and a list of properties and other arguments, produce a Stencil
object.
@example
(apply raise-markup
- @var{\paper object}
+ @var{\layout object}
@var{list of property alists}
0.5
@var{the "foo" markup})
New markup commands can be defined
with the @code{def-markup-command} scheme macro.
@lisp
-(def-markup-command (@var{command-name} @var{paper} @var{props} @var{arg1} @var{arg2} ...)
+(def-markup-command (@var{command-name} @var{layout} @var{props} @var{arg1} @var{arg2} ...)
(@var{arg1-type?} @var{arg2-type?} ...)
..command body..)
@end lisp
@var{i}th command argument
@item argi-type?
a type predicate for the i@var{th} argument
-@item paper
-the `paper' definition
+@item layout
+the `layout' definition
@item props
a list of alists, containing all active properties.
@end table
take a single argument, of markup type. Therefore, the start of the
definition should read
@example
- (def-markup-command (smallcaps paper props argument) (markup?)
+ (def-markup-command (smallcaps layout props argument) (markup?)
@end example
@noindent
the @code{argument} as a markup, i.e.
@example
- (interpret-markup paper @dots{} argument)
+ (interpret-markup layout @dots{} argument)
@end example
@noindent
defined @code{\smallcaps} command:
@verbatim
-#(def-markup-command (character paper props name) (string?)
+#(def-markup-command (character layout props name) (string?)
"Print the character name in small caps, translated to the left and
top. Syntax: \\character #\"name\""
- (interpret-markup paper props
+ (interpret-markup layout props
(markup "" #:translate (cons -4 2) #:smallcaps name)))
@end verbatim
@end verbatim
@lilypond[raggedright]
-#(def-markup-command (smallcaps paper props str) (string?)
+#(def-markup-command (smallcaps layout props str) (string?)
"Print the string argument in small caps. Syntax: \\smallcaps #\"string\""
- (interpret-markup paper props
+ (interpret-markup layout props
(make-line-markup
(map (lambda (s)
(if (= (string-length s) 0)
#:tiny (string-upcase (substring s 1)))))
(string-split str #\Space)))))
-#(def-markup-command (character paper props name) (string?)
+#(def-markup-command (character layout props name) (string?)
"Print the character name in small caps, translated to the left and
top. Syntax: \\character #\"name\""
- (interpret-markup paper props
+ (interpret-markup layout props
(markup "" #:translate (cons -4 0) #:smallcaps name)))
{ \fatText
letter a little larger:
@example
-#(def-markup-command (smallcaps paper props str) (string?)
+#(def-markup-command (smallcaps layout props str) (string?)
"Print the string argument in small caps."
- (interpret-markup paper props
+ (interpret-markup layout props
(make-line-markup
(map (lambda (s)
(if (= (string-length s) 0)
translated to the left (@code{#:translate (cons -0.6 0) ...}). Then,
the markups built for each token are put in a line by
@code{(make-line-markup ...)}. Finally, the resulting markup is passed
-to the @code{interpret-markup} function, with the @code{paper} and
+to the @code{interpret-markup} function, with the @code{layout} and
@code{props} arguments.
If there is a @code{\midi} command in a @code{\score}, only MIDI will
-be produced. When notation is needed too, a @code{\paper} block must
+be produced. When notation is needed too, a @code{\layout} block must
be added
@example
\score @{
@var{...music...}
\midi @{ \tempo 4=72 @}
- \paper @{ @}
+ \layout @{ @}
@}
@end example
-@cindex paper block
+@cindex layout block
@cindex MIDI block
-The MIDI block is analogous to the paper block, but it is somewhat
+The MIDI block is analogous to the layout block, but it is somewhat
simpler. The @code{\midi} block can contain
@cindex MIDI block
@cindex context definition
Context definitions follow precisely the same syntax as within the
-\paper block. Translation modules for sound are called performers.
+\layout block. Translation modules for sound are called performers.
The contexts for MIDI output are defined in @file{ly/performer-init.ly}.
@example
width = 4.5\cm
name = "Wendy"
- aFivePaper = \paper @{ paperheight = 21.0 \cm @}
+ aFivePaper = \layout @{ paperheight = 21.0 \cm @}
@end example
Depending on its contents, the identifier can be used in different
places. The following example uses the above variables
@example
- \paper @{
+ \layout @{
\aFivePaper
linewidth = \width
@}
PACKAGE_NAME=LilyPond
MAJOR_VERSION=2
MINOR_VERSION=3
-PATCH_LEVEL=21
-MY_PATCH_LEVEL=
+PATCH_LEVEL=22
+MY_PATCH_LEVEL=pre-jcn2
file.write ('\skip 8 \\break\n')
file.write (r"""
}
- \paper{
+ \layout{
interscoreline = 1.0
indent = 0.0 \cm
\context {
+lilypond (2.3.20-1) unstable; urgency=low
+
+ * New upstream release.
+
+ -- Jan Nieuwenhuizen <janneke@gnu.org> Thu, 7 Oct 2004 00:38:49 +0200
+
lilypond (1.9.8-1) unstable; urgency=low
* New upstream release.
sdesc: "A program for printing sheet music"
category: Publishing
-requires: bash cygwin fileutils findutils ghostscript libguile12 libiconv2 libintl2 libkpathsea3 python tetex-bin tetex-tiny _update-info-dir
+requires: bash cygwin fileutils findutils ghostscript libguile16 libiconv2 libintl2 libkpathsea3 python tetex-bin tetex-tiny _update-info-dir
#requires: tetex-bin, tetex-tiny | tetex-base
#suggests: emacs gsview lilypond-doc rxvt tetex-x11 XFree86-serv
ldesc: "A program for printing sheet music.
cygwin=cygwin
cd $src || exit 1
install -d -m755 $inst/$cygdocdir
- install -m644 $cygwin/changelog $inst/$cygdocdir/changelog.Cygwin
+ install -m644 $cygwin/changelog $inst/$packagedocdir/changelog.Cygwin
cd $build || exit 1
install -m644 $cygwin/out/README $inst/$packagedocdir/README.Cygwin
crosscache () {
cat <<EOF > config.cache
ac_cv_c_bigendian=\${ac_cv_c_bigendian=no}
+ac_cv_c_long_size_t=\${ac_cv_c_long_size_t=no}
+ac_cv_c_long_time_t=\${ac_cv_c_long_time_t=yes}
+ac_cv_sizeof___int64=\${ac_cv_sizeof___int64=0}
ac_cv_sizeof_char=\${ac_cv_sizeof_char=1}
ac_cv_sizeof_char_p=\${ac_cv_sizeof_char_p=4}
ac_cv_sizeof_double=\${ac_cv_sizeof_double=8}
ac_cv_sizeof_float=\${ac_cv_sizeof_float=4}
ac_cv_sizeof_int=\${ac_cv_sizeof_int=4}
+ac_cv_sizeof_intmax_t=\${ac_cv_sizeof_intmax_t=8}
+ac_cv_sizeof_intptr_t=\${ac_cv_sizeof_intptr_t=4}
ac_cv_sizeof_long=\${ac_cv_sizeof_long=4}
ac_cv_sizeof_long_double=\${ac_cv_sizeof_long_double=12}
ac_cv_sizeof_long_long=\${ac_cv_sizeof_long_long=8}
+ac_cv_sizeof_ptrdiff_t=\${ac_cv_sizeof_ptrdiff_t=4}
ac_cv_sizeof_short=\${ac_cv_sizeof_short=2}
+ac_cv_sizeof_size_t=\${ac_cv_sizeof_size_t=4}
+ac_cv_sizeof_uintptr_t=\${ac_cv_sizeof_uintptr_t=4}
+ac_cv_sizeof_unsigned___int64=\${ac_cv_sizeof_unsigned___int64=0}
+ac_cv_sizeof_unsigned_char=\${ac_cv_sizeof_unsigned_char=1}
+ac_cv_sizeof_unsigned_int=\${ac_cv_sizeof_unsigned_int=4}
+ac_cv_sizeof_unsigned_long=\${ac_cv_sizeof_unsigned_long=4}
+ac_cv_sizeof_unsigned_long_long=\${ac_cv_sizeof_unsigned_long_long=8}
+ac_cv_sizeof_unsigned_short=\${ac_cv_sizeof_unsigned_short=2}
ac_cv_sizeof_void_p=\${ac_cv_sizeof_void_p=4}
-ac_cv_c_long_size_t=\${ac_cv_c_long_size_t=no}
-ac_cv_c_long_time_t=\${ac_cv_c_long_time_t=yes}
ac_16bit_type=\${ac_16bit_type=short}
ac_32bit_type=\${ac_32bit_type=int}
ac_64bit_type=\${ac_64bit_type=none}
-ac_cv_sys_restartable_syscalls=\${ac_cv_sys_restartable_syscalls=no}
+ac_cv_sys_restartable_syscalls=\${ac_cv_sys_restartable_syscalls=yes}
ac_cv_sprintf_count=\${ac_cv_sprintf_count=yes}
ac_cv_spinlocks=\${ac_cv_spinlocks=no}
ac_cv_func_getpgrp_void=\${ac_cv_func_getpgrp_void=yes}
doc_split () {
mkdir -p ./$docprefix || exit 1
- #mv $inst/$infodir ./$infodir
+ mv $inst/$infodir ./$infodir
true
}
-\version "2.3.16"
+\version "2.3.22"
% A simple scale in LilyPond
%
\context Voice \relative c {
c' d e f g a b c
}
- \paper { }
+ \layout { }
\midi { }
}
-\version "2.3.16"
+\version "2.3.22"
% Some beamed and slurred notes of different taste in LilyPond
%
% Type:
\context Voice \relative c {
a''2 ~ a4( e8[ )e] a,16[ a a a]
}
- \paper { }
+ \layout { }
\midi { }
}
#(ly:set-option 'old-relative)
-\version "2.3.16"
+\version "2.3.22"
one = \relative c{
c'' d e f
\one
\two
>>
- \paper{}
+ \layout{}
\midi{}
}
#(ly:set-option 'old-relative)
-\version "2.3.17"
+\version "2.3.22"
\encoding "latin1"
\header {
composer = "ARTHUR GRAY"
\bassTwo
>>
>>
- \paper {
+ \layout {
\context {
\Score
pedalSustainStrings = #'("Ped." "*Ped." "*")
-\version "2.3.16"
+\version "2.3.22"
\header {
title = "Title"
subtitle = "Subtitle"
copyright = "Public Domain"
}
-\version "2.3.16"
+\version "2.3.22"
\include "nederlands.ly"
#(override-auto-beam-setting '(end 1 8 * *) 1 4)
#(override-auto-beam-setting '(end 1 16 * *) 1 4)
>>
- \paper {
+ \layout {
\context {
\Score
\override SpacingSpanner #'spacing-increment = #3
}
-\version "2.3.17"
+\version "2.3.22"
manuscriptBreak = { \break }
#(set-global-staff-size (/ (* 5.8 72.27) 25.4))
-\bookpaper {
+\paper {
%#(set-global-staff-size (* 5.8 mm))
linewidth = #(* mm 160)
indent = 8\mm
>>
>>
- \paper {
+ \layout {
\context {
\Lyrics
minimumVerticalExtent = #'(-1.0 . 0)
footer = "Mutopia-2001/04/27-xx"
}
-\version "2.3.17"
+\version "2.3.22"
dynamicUp = \override DynamicLineSpanner #'direction = #1
dynamicRevert = \revert DynamicLineSpanner #'direction
\bassStaff
>>
>>
- \paper {
+ \layout {
% Use
% textheight = 280.\mm
% linewidth = 190.\mm
-\version "2.3.17"
+\version "2.3.22"
% #(ly:set-point-and-click 'line-column)
>>
% size perversions
-smallerPaper = \paper {
+smallerPaper = \layout {
\context { \Staff
fontSize = #-1
\override StaffSymbol #'staff-space = #0.8
linewidth = 146.8 \mm
}
-\bookpaper {
+\paper {
raggedbottom = ##t
indent = 7. \mm
linewidth =183.5 \mm
\score{
\sarabandeCelloStaff
\midi{ \tempo 4 = 40 }
- \paper { }
+ \layout { }
\header{
opus= ""
piece ="Sarabande" }
#(ly:set-option 'old-relative)
-\version "2.3.17"
+\version "2.3.22"
%{
Header for Petites Preludes.
\context Voice = iv \four
>>
>>
- \paper{
+ \layout{
linewidth = 17.0 \cm
\context {
\Score
%}
-\version "2.3.17"
+\version "2.3.22"
\header{
opus = "BWV 847"
}
- \paper {}
+ \layout {}
\midi {
\tempo 4 =84
}
}
- \bookpaper {
+ \paper {
linewidth = 18.0 \cm
}
}
#(set-global-staff-size 16)
-\version "2.3.17"
+\version "2.3.22"
\header {
title = "Romanzen"
<< \global \context Voice=lva \lefta \context Voice=lvb \leftb >>
}
>>
- \paper {
+ \layout {
interscoreline = 0.0
interscorelinefill = 1
indent = 0.5 \in
%}
-\version "2.3.16"
+\version "2.3.22"
\include "mozart-hrn3-defs.ily"
\include "mozart-hrn3-allegro.ily"
\include "mozart-hrn3-romanze.ily"
\include "mozart-hrn3-rondo.ily"
-\bookpaper {
+\paper {
betweensystempadding = 0.0
betweensystemspace = 20 \mm
}
\score
{
{ \transpose c' bes \allegro }
- \paper{ }
+ \layout{ }
\header { piece = "allegro" opus = "" }
\midi{ \tempo 4=90 }
}
{ \transpose c' bes \romanze }
\header { piece = "romanze" opus = "" }
\midi{ \tempo 4 = 70 }
- \paper{}
+ \layout{}
}
{ \transpose c' bes \rondo }
\header { piece = "rondo" opus = "" }
\midi{ \tempo 4 = 100 }
- \paper { }
+ \layout { }
}
-\version "2.3.4"
+\version "2.3.22"
\include "mozart-hrn3-defs.ily"
allegro =
endlonggrace = \revert Stem #'stroke-style
ritenuto = \markup { \italic "rit." }
-\version "2.3.4"
+\version "2.3.22"
cresc = {
#(ly:export (make-event-chord (list (make-span-event 'CrescendoEvent START))))
\stopGraceMusic
}
-\paper {
+\layout {
\context {
\Score
skipBars = ##t
}
}
-\bookpaper{
+\paper{
% #(define fonts my-sheet)
-\version "2.3.4"
+\version "2.3.22"
\include "mozart-hrn3-defs.ily"
romanze = \relative c' {
-\version "2.3.4"
+\version "2.3.22"
% \include "mozart-hrn3-defs.ily"
-\version "2.3.16"
+\version "2.3.22"
\header {
-\version "2.3.16"
+\version "2.3.22"
\header {
-\version "2.3.16"
+\version "2.3.22"
\header{
filename = "denneboom.ly"
enteredby = "jcn"
\verseTwo
-denneboomShape = \paper{
- \paperTwenty
+denneboomShape = \layout{
+ \layoutTwenty
indent = 20. \mm
% UGH -- THIS IS HAIRY
\oldaddlyrics
\context Staff { \time 3/4 \melody }
\context Lyrics \verseOne
- \paper{
+ \layout{
\denneboomShape
}
\midi{ \tempo 4 = 90 }
-\version "2.3.16"
+\version "2.3.22"
\header {
texidoc = "a staff should really die, if no one's referencing it."
-\version "2.3.16"
+\version "2.3.22"
\header{
-\version "2.3.16"
+\version "2.3.22"
\header{
-\version "2.3.16"
+\version "2.3.22"
\header{
-\version "2.3.16"
+\version "2.3.22"
\header {
texidoc = "@cindex Dynamic Absolute Volume
Absolute dynamics have an effect on MIDI files.
a\fff
a\sf
}
-\paper{ raggedright = ##t }
+\layout{ raggedright = ##t }
\midi{
\tempo 1 = 60
}
-\version "2.3.16"
+\version "2.3.22"
\header {
texidoc = "@cindex Embedded scm
\score {
\relative c' { c }
- \paper {raggedright = ##t}
+ \layout {raggedright = ##t}
}
#(ly:set-option 'old-relative)
-\version "2.3.16"
+\version "2.3.22"
\header{ texidoc = "Tests MIDI output with grace notes. " }
\score {
d4 d d d d
}
- \paper { }
+ \layout { }
\midi { }
}
-\version "2.3.16"
+\version "2.3.22"
\header {
texidoc = "Lyrics in MIDI are aligned to ties and beams:
}
\lyricsto "A" \lyricmode\new Lyrics { bla bla | bla bla | bla bla | bla }
>>
- \paper {}
+ \layout {}
\midi {}
}
-\version "2.3.16"
+\version "2.3.22"
% candidate for regression. -gp
\header {
texidoc="Converting LilyPond input to MIDI and then again back with
\score {
\context Voice \scales
- \paper { }
+ \layout { }
\midi { }
}
#(ly:set-option 'old-relative)
-\version "2.3.16"
+\version "2.3.22"
\header { texidoc = "@cindex Transposing
The transposing property leaves output invariant, but has effect on MIDI. "
\set Staff.transposing = #12 c
}
- \paper { raggedright = ##t }
+ \layout { raggedright = ##t }
\midi { }
}
#(ly:set-option 'old-relative)
-\version "2.3.16"
+\version "2.3.22"
\header {
texidoc = "
\times 3/5 { c8 c8 c8 c8 c8 }
}
- \paper { }
+ \layout { }
\midi { }
}
#(ly:set-option 'old-relative)
-\version "2.3.16"
+\version "2.3.22"
\header {
texidoc = "@cindex Midi Volume Equaliser
The full orchestra plays a notes, where groups stop one after
>>
>>
- \paper {
- \paperSixteen
+ \layout {
+ \layoutSixteen
indent=100.0\mm
linewidth=150.0\mm
\context {
-\version "2.3.16"
+\version "2.3.22"
% Test parser error
-\version "2.3.16"
+\version "2.3.22"
% Test parser error
-\version "2.3.16"
+\version "2.3.22"
% Test parser error
-\version "2.3.16"
+\version "2.3.22"
% Test parser error
-\version "2.3.16"
+\version "2.3.22"
%If you specify two different key sigs at one point, a
%warning is printed.
-\version "2.3.16"
+\version "2.3.22"
\header {
texidoc = "The @code{Recording_group_engraver} will record events
#(define (notice-the-events context lst)
(map (lambda (x) (display x) (newline)) lst))
-listener = \paper {
+listener = \layout {
\context {
\Voice
\type "Recording_group_engraver"
-\version "2.3.16"
+\version "2.3.22"
\header{
-\version "2.3.16"
+\version "2.3.22"
\header{
-\version "2.3.16"
+\version "2.3.22"
\header{
texidoc = "This should not survive lilypond --safe-mode
-\version "2.3.16"
+\version "2.3.22"
\header{
-\version "2.3.16"
+\version "2.3.22"
\header{
texidoc="crashes lily"
}
c2. r8 c8 \< \break \! c1
}
}
-\paper { linewidth = 5.\cm}
+\layout { linewidth = 5.\cm}
}
-\version "2.3.16"
+\version "2.3.22"
fooBar = { << c''4 \\ g'4 >> }
-\version "2.3.16"
+\version "2.3.22"
\header {
title = "Puer natus est nobis (excerptum)"
subtitle = "Antiphona ad introitum VII"
et fi -- li -- us da -- tus est no -- bis:
}
-\bookpaper {
+\paper {
linethickness = \staffspace / 7.0
}
\cantus
\lyricsto "cantus" \verba
>>
- \paper {
+ \layout {
linewidth = 137.0\mm
width = 137.0\mm
indent = 0.0
-\version "2.3.17"
+\version "2.3.22"
%% +.ly: Be the first .ly file for lys-to-tely.py.
%% Better to make lys-to-tely.py include "introduction.texi" or
%% other .texi documents too?
-\version "2.3.17"
+\version "2.3.22"
\header {
texidoc = "Cautionary accidentals are indicated using either
}
-\paper { raggedright = ##t }
+\layout { raggedright = ##t }
{
c''4
-\version "2.3.17"
+\version "2.3.22"
\header {
texidoc = "If two forced accidentals happen at the same time, only one
sharp sign is printed."
\context Voice=vb { \stemDown c fis! }
>>
- \paper { raggedright= ##t }
+ \layout { raggedright= ##t }
}
-\version "2.3.17"
+\version "2.3.22"
\header {
-\version "2.3.17"
+\version "2.3.22"
\header {
texidoc="
}
-\version "2.3.17"
+\version "2.3.22"
-\paper
+\layout
{
raggedright = ##t
}
-\version "2.3.17"
+\version "2.3.22"
\header {
<bes! c d f >
<bes,! c d f >
}
- \paper {
+ \layout {
raggedright = ##t
}
texidoc = "Quarter tone notation is supported, including
threequarters flat."
}
-\version "2.3.17"
+\version "2.3.22"
\score {
\relative c'' {
cisih
cisis
}
- \paper { raggedright = ##t }
+ \layout { raggedright = ##t }
}
-\version "2.3.17"
+\version "2.3.22"
\header{
texidoc="
A sharp sign after a double sharp sign, as well as a flat sign
\thenotes
}
>>
-\paper { raggedright = ##t }
+\layout { raggedright = ##t }
}
-\version "2.3.17"
+\version "2.3.22"
\header {
\new NoteNames \mus
\new Voice { \key g \major \mus }
>>
- \paper {
+ \layout {
raggedright = ##t
}
}
wreak havoc in the spacing when unbroken."
}
-\version "2.3.17"
+\version "2.3.22"
rechts = \relative c' {
\clef treble
\score {
\rechts
- \paper {
+ \layout {
raggedright = ##t
}
}
-\version "2.3.17"
+\version "2.3.22"
\header{
texidoc="
}
>>
-\paper { raggedright = ##t }
+\layout { raggedright = ##t }
}
-\version "2.3.17"
+\version "2.3.22"
\header{
texidoc="
<< \foo
\context NoteNames \foo
>>
-\paper { raggedright = ##t }
+\layout { raggedright = ##t }
}
-\version "2.3.17"
+\version "2.3.22"
\header{
texidoc="
"
}
-\version "2.3.17"
+\version "2.3.22"
-\paper {
+\layout {
raggedright = ##t
\context {
\Voice
-\version "2.3.17"
+\version "2.3.22"
\header {
}
- \paper { raggedright= ##t }
+ \layout { raggedright= ##t }
\score { \relative c'' {
-\version "2.3.17"
+\version "2.3.22"
\header {
texidoc = "The @code{\applyoutput} expression is the most flexible way to
}
}
-\paper { raggedright = ##t
+\layout { raggedright = ##t
% outputscale = 5
}
}
-\version "2.3.17"
+\version "2.3.22"
\header{
texidoc="
A square bracket on the left indicates that the player should not
<fis, d a >\arpeggio
}
- \paper { raggedright= ##t }
+ \layout { raggedright= ##t }
}
-\version "2.3.17"
+\version "2.3.22"
\header {
texidoc = "Arpeggio stays clear of accidentals and flipped note heads."
<fis, g d a>\arpeggio
<fis'' g d a>\arpeggio
}
- \paper {
+ \layout {
raggedright = ##t
\context{
\Staff
-\version "2.3.17"
+\version "2.3.22"
\header{
texidoc="
Arpeggios are supported, both cross-staff and broken single staff.
<g b d>\arpeggio
}
>>
- \paper { raggedright= ##t }
+ \layout { raggedright= ##t }
}
-\version "2.3.17"
+\version "2.3.22"
\header{
texidoc="No auto beams will be put over (manual) repeat bars."
\time 3/4
a'4 b' c''8 \bar ":|:" d''8
}
- \paper{
+ \layout{
raggedright = ##t
}
}
}
-\version "2.3.17"
-\paper {
+\version "2.3.22"
+\layout {
raggedright = ##t
}
texidoc = "Automatic beaming is also done on tuplets."
}
-\version "2.3.17"
+\version "2.3.22"
\score{
\relative c''{
c8 c c c
\times 4/6 { c c c c c c}
}
- \paper { raggedright= ##t }
+ \layout { raggedright= ##t }
}
-\version "2.3.17"
+\version "2.3.22"
\header {
texidoc = "Tuplet-spanner should not put (visible) brackets on
f8[ f f ] f8[ f f ] f f f f f f
}
}
- \paper { raggedright= ##t }
+ \layout { raggedright= ##t }
}
beam."
}
-\version "2.3.17"
+\version "2.3.22"
-\paper { raggedright = ##t }
+\layout { raggedright = ##t }
\score {
\relative c'' {
a\longa a\breve
a1 a2 a4 a8 a16 a32 a64 a64
}
- \paper {
+ \layout {
\context {
\Staff
\remove "Clef_engraver"
-\version "2.3.17"
+\version "2.3.22"
\header {
"
}
- \paper { raggedright= ##t }
+ \layout { raggedright= ##t }
\score {
\context PianoStaff <<
texidoc = "With balloon texts, objects in the output can be marked,
with lines and explanatory text added."
}
-\version "2.3.17"
+\version "2.3.22"
\score {
{
c8
}
}
- \paper{ raggedright = ##t }
+ \layout{ raggedright = ##t }
}
-\version "2.3.17"
+\version "2.3.22"
\header {
texidoc = "The meaning of @code{|} is stored in the
identifier @code{pipeSymbol}."
pipeSymbol = \bar "||"
-\paper { raggedright = ##t }
+\layout { raggedright = ##t }
{ c'2 | c'2 | }
-\version "2.3.17"
+\version "2.3.22"
\header {
\override Score.BarNumber #'padding = #3
c1 c
}
- \paper {
+ \layout {
raggedright = ##t
\context {
\Score
-\version "2.3.17"
+\version "2.3.22"
\header{
texidoc="
"
}
-\paper { raggedright = ##t }
+\layout { raggedright = ##t }
onestaff = \new Staff\relative c'' {
\set Staff.instr = instr
-\version "2.3.17"
+\version "2.3.22"
\header{ texidoc="A knee is made automatically when a horizontal
beam fits in a gap between note heads that is larger than a predefined
c'8[ c,,] c8[ e']
c,16[ e g c e g c c,,]
}
- \paper{
+ \layout{
raggedright = ##t
}
}
-\version "2.3.17"
+\version "2.3.22"
\header{
texidoc = "@cindex Beaming Presets
There are presets for the @code{auto-beam} engraver in the case of common
c8 c c c c c c c c
c16 c c c c c c c c c c c c c c c c c
}
- \paper{
+ \layout{
}
}
"
}
-\version "2.3.17"
-\paper { raggedright= ##t }
+\version "2.3.22"
+\layout { raggedright= ##t }
\score { \relative c'' {
\set Score.allowBeamBreak = ##t
-\version "2.3.17"
+\version "2.3.22"
\header{
texidoc="Simple beams on middle staffline are allowed to be
a''[ f]
f[ a]
}
- \paper{
+ \layout{
raggedright = ##t
indent = 0
}
texidoc = "Beams that are not strictly concave are damped
according to their concaveness. "
}
-\version "2.3.17"
-\paper {
+\version "2.3.22"
+\layout {
raggedright = ##t
}
-\version "2.3.17"
+\version "2.3.22"
\header{
texidoc = "Fully concave beams should be horizontal. Informally spoken,
\rossBeams
}
- \paper{
+ \layout{
raggedright = ##t
#(define debug-beam-quanting #t)
}
-\version "2.3.17"
+\version "2.3.22"
\header{
s2.
}
>>
- \paper{
+ \layout{
raggedright = ##t
}
}
-\version "2.3.17"
+\version "2.3.22"
\header {
texidoc = "Cross staff (kneed) beams do not cause extreme slopes."
}
\context Staff = down {
\time 3/8 \clef bass s4.*3 }
>>
- \paper { raggedright = ##t}
+ \layout { raggedright = ##t}
}
-\version "2.3.17"
+\version "2.3.22"
\header{
texidoc="
Beams can be typeset over fixed distance aligned staves, beam
-\version "2.3.17"
+\version "2.3.22"
\header { texidoc = "@cindex Beam Damp
Beams are less steep than the notes they encompass. " }
d'[ c b a]
a[ b c d]
}
- \paper{
+ \layout{
raggedright = ##t
}
}
-\version "2.3.17"
+\version "2.3.22"
\header{
texidoc="Beamed stems have standard lengths if possible. Quantization is switched off in this example."
f4 f8[ f] f16[ f] f32[ f] f64[ f] f128[ f]
}
- \paper{ raggedright = ##t}
+ \layout{ raggedright = ##t}
}
% junkme?
-\version "2.3.17"
+\version "2.3.22"
\header {
texidoc = "@cindex Beam Dir Functions
"
}
-\paper { raggedright = ##t}
+\layout { raggedright = ##t}
\score {
\relative c'' {\time 3/4
\override Beam #'dir-function = #beam-dir-majority
\override Beam #'dir-function = #beam-dir-median
c[ c g]
}
-\paper{raggedright = ##t}
+\layout{raggedright = ##t}
}
%% Local variables:
-\version "2.3.17"
+\version "2.3.22"
\header{
texidoc="
Beams should behave reasonably well, even under extreme circumstances.
\extreme
%}
}
- \paper{
+ \layout{
% raggedright = ##t
raggedright = ##t
}
-\version "2.3.17"
+\version "2.3.22"
\header {
c8[ c16 e16 g8]
}
- \paper { raggedright= ##t }
+ \layout { raggedright= ##t }
}
-\version "2.3.17"
+\version "2.3.22"
\header {
texidoc=" Funky kneed beams with beamlets also work. The beamlets
c16 c,,8 c16
}
- \paper { raggedright = ##t}
+ \layout { raggedright = ##t}
}
-\version "2.3.17"
+\version "2.3.22"
\header {
texidoc = "In complex configurations of knee beaming, according to
g''' g,,,] } }
}
-\paper { raggedright = ##t}
+\layout { raggedright = ##t}
}
-\version "2.3.17"
+\version "2.3.22"
\header{
texidoc="@cindex Beam Isknee
s2
}
>>
- \paper{
+ \layout{
raggedright = ##t
}
}
-\version "2.3.17"
+\version "2.3.22"
\header {
texidoc = "Point-symmetric beams should receive the same
a8[ b'' a,, b'']
b8[ a,, b'' a,,]
}
- \paper{
+ \layout{
raggedright = ##t
}
}
-\version "2.3.17"
+\version "2.3.22"
\header{
texidoc="
Beams should look the same.
"
}
- \paper { raggedright= ##t }
+ \layout { raggedright= ##t }
\score {
-\version "2.3.17"
+\version "2.3.22"
\header {
#'beaming = #(cons (list 0 2 4) (list 0 1 4))
c c c]
}
- \paper{
+ \layout{
raggedright = ##t
}
}
-\version "2.3.17"
+\version "2.3.22"
\header {
texidoc = "Kneed beams (often happens with cross-staff beams)
}
>>
- \paper { raggedright= ##t }
+ \layout { raggedright= ##t }
}
-\version "2.3.17"
+\version "2.3.22"
\header {
texidoc = "Explicit beams may cross barlines. "
}
\score {
\relative c'' { c2. c8[ c8 c8 c8] }
- \paper { raggedright= ##t }
+ \layout { raggedright= ##t }
}
-\version "2.3.17"
+\version "2.3.22"
\header{
texidoc=" Beams on ledgered notes should always reach the middle staff
f8[ f]
}
- \paper {
+ \layout {
raggedright = ##t
}
\midi { }
-\version "2.3.17"
+\version "2.3.22"
\header {
texidoc = "Beams and ties may be entered in postfix notation, separating the
notes and the brackets with a dash."
}
- \paper { raggedright= ##t }
+ \layout { raggedright= ##t }
\score
}
-\version "2.3.17"
+\version "2.3.22"
-\paper {
+\layout {
raggedright = ##t
#(define debug-beam-quanting #t)
}
-\version "2.3.17"
+\version "2.3.22"
\score {
\relative c''{
c32[ d] b[ d]
a'32[ a] g[ g] f[ f] e[ e] d[ d] c[ c]
}
-\paper { }
+\layout { }
}
-\version "2.3.17"
+\version "2.3.22"
\header{
-\version "2.3.17"
+\version "2.3.22"
\header
{
texidoc= "Quarter notes may be beamed: the beam is halted momentarily."
\score { \relative c'' {
c8[ c4 c8] % should warn here!
}
-\paper { raggedright = ##t}
+\layout { raggedright = ##t}
}
texidoc = "The number of beams does not change on a rest."
}
-\version "2.3.17"
+\version "2.3.22"
\score { \relative c, {
\clef bass
e8[ r16 f d'8 e16 e16] c8[ c16 r16 bes8 r16 c16] |
}
-\paper { raggedright = ##t}
+\layout { raggedright = ##t}
}
-\version "2.3.17"
+\version "2.3.22"
\header{
texidoc="
Engraving second intervals is tricky. We used to have problems with seconds
b16[ c]
a'[ b]
}
- \paper{
+ \layout{
raggedright = ##t
}
}
-\version "2.3.17"
+\version "2.3.22"
\header{
texidoc="Beams in unnatural direction, have shortened stems, but do not look too short."
\stemUp
f'4 f8[ f] f16[ f] f32[ f] f64[ f] f128[ f]
}
- \paper{ raggedright = ##t}
+ \layout{ raggedright = ##t}
}
-\version "2.3.17"
+\version "2.3.22"
\header{
texidoc = "Hairy case for beam, chord, and automatic knees."
%be fixed by uncommenting \stemUp"
}
-\paper { raggedright= ##t }
+\layout { raggedright= ##t }
\score{
-\version "2.3.17"
+\version "2.3.22"
\header {
texidoc = "Automatic beaming works also in ternary time sigs."
}
\time 6/8
c8.[ c16 c16 c16]
}
-\paper { raggedright = ##t}
+\layout { raggedright = ##t}
}
-\version "2.3.17"
+\version "2.3.22"
\header{
texidoc="
-\version "2.3.17"
+\version "2.3.22"
\header {
texidoc = "Beaming can be also given explicitly."
}
- \paper { raggedright= ##t }
+ \layout { raggedright= ##t }
\score {
\relative c'
-\version "2.3.17"
+\version "2.3.22"
\header{
texidoc="
c1 \noBreak c1 \noBreak \mark "nobreak" c1 \noBreak
c1 \break \mark "break" c1 \break \mark "break" c1
}
- \paper {
+ \layout {
indent = 0.0
linewidth = 4.0\cm}
}
-\version "2.3.17"
+\version "2.3.22"
\header{
texidoc="
#(ly:set-option 'old-relative)
-\version "2.3.17"
+\version "2.3.22"
\header{
texidoc="
Breathing signs are available in different tastes: commas (default),
-\version "2.3.17"
+\version "2.3.22"
\header{
texidoc="Property chordChanges: display chord names only when
>>
\context Staff \transpose c c' \scheme
>>
- \paper{ raggedright = ##t }
+ \layout{ raggedright = ##t }
}
-\version "2.3.17"
+\version "2.3.22"
\header {
}
-\paper { raggedright = ##t }
+\layout { raggedright = ##t }
\chordmode { c:13 c:13.11 c:m13 }
-\version "2.3.17"
+\version "2.3.22"
\header {
-\version "2.3.17"
+\version "2.3.22"
\header { texidoc = "The property @code{chordNameExceptions} can used
to store a list of special notations for specific chords.
-\version "2.3.17"
+\version "2.3.22"
\header {
texidoc = "The layout of the major 7 can be tuned with
@code{majorSevenSymbol}."
-\version "2.3.17"
+\version "2.3.22"
\header {
-\version "2.3.17"
+\version "2.3.22"
\header {
texidoc = "Scripts can also be attached to chord elements."
-\version "2.3.17"
+\version "2.3.22"
\header {
texidoc = "
Tremolo repeats can be constructed for short tremolos (total duration smaller than 1/4) too. Only some of the beams are connected to the stems.
\stemDown
\repeat "tremolo" 2 { c32 e32 }
}
- \paper { raggedright = ##t }
+ \layout { raggedright = ##t }
}
-\version "2.3.17"
+\version "2.3.22"
\header{
texidoc="
}
\midi { }
- \paper {}
+ \layout {}
}
-\version "2.3.17"
+\version "2.3.22"
\header {
-\version "2.3.17" \header {
+\version "2.3.22" \header {
texidoc = "Octavation signs may be added to clefs. These
octavation signs may be placed below or above (meaning an octave
\clef "G^9"
c4
}
- \paper { raggedright = ##t }
+ \layout { raggedright = ##t }
}
-\version "2.3.17"
+\version "2.3.22"
\header{
\override Staff.Clef #'full-size-change = ##t
\clef "treble" c'1^"full-size-change = \#t" \bar "|."
}
- \paper{
+ \layout{
raggedright = ##t
}
}
}
-\version "2.3.17"
+\version "2.3.22"
\score {
\new PianoStaff <<
{ \clef bass s1 * 2 }
>>
>>
- \paper {
+ \layout {
raggedright= ##t
}
}
-\version "2.3.17"
+\version "2.3.22"
\header {
texidoc = "Clusters are a device to denote that a complete range of
notes is to be played."
\new Staff \fragment
\new Staff \applymusic #notes-to-clusters \fragment
>>
- \paper { raggedright = ##t }
+ \layout { raggedright = ##t }
}
-\version "2.3.17"
+\version "2.3.22"
\header {
texidoc = "Single head notes may collide. "
}
- \paper { raggedright= ##t }
+ \layout { raggedright= ##t }
\score {
}
-\paper { raggedright = ##t }
+\layout { raggedright = ##t }
-\version "2.3.17"
+\version "2.3.22"
\relative <<
\new Staff {
dots: notes with dots should go to the right, if there could be
confusion to which notes the dots belong."
}
-\version "2.3.17"
+\version "2.3.22"
\score {
\relative c'' {
<< <a c>2\\ { <b d>4 <b d>4 } >>
<< { <a c>2 } \\ { <b d>4. <b e>8 } >>
}
- \paper { raggedright = ##t }
+ \layout { raggedright = ##t }
}
-\version "2.3.17"
+\version "2.3.22"
\header {
texidoc = "If collision resolution finds dotted note head must
}
-\paper { raggedright = ##t }
+\layout { raggedright = ##t }
\score {
\relative c {
on the right side."
}
-\version "2.3.17"
-\paper { raggedright= ##t }
+\version "2.3.22"
+\layout { raggedright= ##t }
% todo: b2 (up) + b8 down looks strange compared to c2up + b8. (down)
\score{
-\version "2.3.17"
+\version "2.3.22"
\header {
texidoc = "Note heads in collisions should be merged if
they have the same positions in the extreme note heads.
c4
<< { c4 d4 <c d>8 <c d> <c d> } \\ { c4 c <a b>8 <b c> <c d>8 } >>
}
-\paper {raggedright = ##t}
+\layout {raggedright = ##t}
}
-\version "2.3.17"
+\version "2.3.22"
\header {
texidoc =
}
-\paper { raggedright= ##t }
+\layout { raggedright= ##t }
\score {
-\version "2.3.17"
+\version "2.3.22"
\header {
texidoc = "If NoteCollision has merge-differently-dotted = ##t note
}
-\paper { raggedright= ##t }
+\layout { raggedright= ##t }
\score {
\context Staff \relative c'' <<
texidoc = "When merging heads, the dots are merged too."
}
-\version "2.3.17"
+\version "2.3.22"
\score {
{
}
}
-\paper { raggedright = ##t }}
+\layout { raggedright = ##t }}
-\version "2.3.17"
+\version "2.3.22"
\header {
texidoc = "Oppositely stemmed chords, meshing into each other,
are resolved."
}
- \paper { raggedright= ##t }
+ \layout { raggedright= ##t }
\score {
#(ly:set-option 'old-relative)
-\version "2.3.17"
+\version "2.3.22"
\header{
texidoc="
In addition to normal collision rules, there is support for polyphony,
-\version "2.3.17"
+\version "2.3.22"
\header {
texidoc = "Completion heads are broken across bar lines. This was
{ c2. a8 g4 f4. g4 f }
>>
- \paper {
+ \layout {
\context{
\Voice
\remove "Note_heads_engraver"
-\version "2.3.17"
+\version "2.3.22"
\header{
texidoc="
"
}
-\paper { raggedright= ##t }
+\layout { raggedright= ##t }
c2. c8 d4 e f g a b c2.. b8 a g16 f4 e d c8. c2
}
- \paper{
+ \layout{
\context{
\Voice
\remove "Note_heads_engraver"
-\version "2.3.17"
+\version "2.3.22"
\header {
texidoc = "Custodes may be engraved in various styles."
}
c'1^"mensural"
\break < d' a' f''>1
}
- \paper {
+ \layout {
\context {
\Staff
\consists Custos_engraver
-\version "2.3.17"
+\version "2.3.22"
\header {
texidoc = "Dots move to the right when a collision with the (up)flag happens."
}
g''16.
a,4. a8 a8. a16. c,16. g16.
}
- \paper { raggedright = ##t}
+ \layout { raggedright = ##t}
}
-\version "2.3.17" \header{
+\version "2.3.22" \header{
texidoc=" Noteheads can have dots, and rests too.
}
- \paper { }
+ \layout { }
\midi { }
}
}
-\version "2.3.17"
+\version "2.3.22"
drh = \drummode { cymc4.^"crash" hhc16^"h.h." hh \repeat "unfold" 5 {hhc8 hho hhc8 hh16 hh} hhc4 r4 r2 }
drl = \drummode {\repeat "unfold" 3 {bd4 sn8 bd bd4 << bd ss >> } bd8 tommh tommh bd toml toml bd tomfh16 tomfh }
>>
>>
}
- \paper {}
+ \layout {}
%% broken:
\midi{ \tempo 4=120 }
-\version "2.3.17"
+\version "2.3.22"
\header{
texidoc = "Broken crescendi should be open on one side."
}
\score { \relative c'' {
c1 \< \break c1\! \> \break c1\!
}
- \paper {
+ \layout {
linewidth = 4.\cm
}
}
-\version "2.3.17"
+\version "2.3.22"
\header {texidoc = "Dynamic letters are kerned, and their weight
matches that of the hairpin signs. The dynamic scripts should be
respectively."
}
-\version "2.3.17"
+\version "2.3.22"
-\paper { raggedright = ##t }
+\layout { raggedright = ##t }
\relative c'' {
c4 \< c4 \!
-\version "2.3.17"
+\version "2.3.22"
\header{
texidoc=" Dynamics appear below or above the staff. If multiple
dynamics are linked with (de)crescendi, they should be on the same
a
}
-\paper{
+\layout{
}
\midi{
\tempo 1 = 60
-\version "2.3.17"
+\version "2.3.22"
\header {
texidoc = "Crescendi may start off-notes, however, they should not collapse into flat lines."
<< f''1 { s4 s4 \< s4\! \> s4\! } >>
}}
-\paper { raggedright = ##t}
+\layout { raggedright = ##t}
}
-\version "2.3.17"
+\version "2.3.22"
\header {
texidoc = " Easy-notation (or Ez-notation) prints names in note heads.
\override NoteHead #'note-names = ##("U" "V" "W" "X" "Y" "Z" "z")
c'2 e'4 f' | b'1
}
- \paper {
+ \layout {
raggedright = ##t
}
}
-\version "2.3.17"
+\version "2.3.22"
\header { texidoc = "
Fermatas over multimeasure rests are positioned as over normal rests.
" }
-\paper {
+\layout {
raggedright = ##t
}
\relative c' {
-\version "2.3.17"
+\version "2.3.22"
\header {
texidoc = "
Figured bass is created by the FiguredBass context which eats
last bass figure.
" }
-\paper { raggedright = ##t }
+\layout { raggedright = ##t }
<<
\figures {
<3 [5 7]>
-\version "2.3.17"
+\version "2.3.22"
\header {
texidoc = "With the new chord syntax, it is possible to associate
easier to process."
}
- \paper { raggedright= ##t }
+ \layout { raggedright= ##t }
\score {
-\version "2.3.17"
+\version "2.3.22"
\header {
texidoc = "Automatic fingering tries to put fingering instructions
"
}
- \paper { raggedright= ##t }
+ \layout { raggedright= ##t }
\score {
-\version "2.3.17"
+\version "2.3.22"
\header{
texidoc = "
The line-spanners connects to the Y position of the note on the next line.
}
\context Staff=two { \clef bass \skip 1*2 }
>>
- \paper{
+ \layout{
raggedright = ##t
}
}
-\version "2.3.17"
+\version "2.3.22"
\header { texidoc = "The magnification can be set for any font. Note
that this does not change variable symbols such as beams or slurs.
" }
-\version "2.3.17"
+\version "2.3.22"
\header {
R1*21^"Wait for Utopia Italic"
}
- \paper { raggedright = ##t }
+ \layout { raggedright = ##t }
}
the scheme-function @code{make-century-schoolbook-tree}."
}
-\version "2.3.17"
+\version "2.3.22"
-\bookpaper
+\paper
{
#(define text-font-defaults
'((font-encoding . latin1)
% this file.
#(system "afm2tfm `kpsewhich uncb8a.afm` uncb8a.tfm")
-\paper {
+\layout {
linewidth = 160 \mm - 2.0 * 9.0 \mm
-\version "2.3.17"
+\version "2.3.22"
\header{
texidoc="
\mark \default
e
}
-\paper{
+\layout{
raggedright = ##t
}
}
#(ly:set-option 'old-relative)
-\version "2.3.17"
+\version "2.3.22"
\header{
\override Glissando #'style = #'zigzag
c4 \glissando c,, \glissando c' \glissando d
}
- \paper{
+ \layout{
linewidth = 50.\mm indent = 0
\context{
\Staff
-\version "2.3.17"
+\version "2.3.22"
\header
{
texidoc = "The autobeamer is not confused by grace notes."
\grace a8 g16 f e f \grace a8 g16 f e f \grace a8 g16 f e f
\grace a8 g16 f e f |
}
- \paper { raggedright = ##t }
+ \layout { raggedright = ##t }
}
-\version "2.3.17"
+\version "2.3.22"
\header {
texidoc = "Bar line should come before the grace note."
}
\score { \relative c' \context Staff {
f1 \grace { a'16[ f] } g1 }
- \paper { raggedright = ##t}
+ \layout { raggedright = ##t}
}
-\version "2.3.17"
+\version "2.3.22"
\header {
texidoc = "Grace notes do tricky things with timing. If a measure
\grace c8
c1 }
-\paper { raggedright = ##t }
+\layout { raggedright = ##t }
}
"
}
- \paper { raggedright= ##t }
+ \layout { raggedright= ##t }
-\version "2.3.17"
+\version "2.3.22"
\score { \relative c'' { c4 d8[ \grace { e32[ d c d] } e8] e[ e \grace { f16 } e8 e] }}
-\version "2.3.17"
+\version "2.3.22"
\header {
texidoc="@cindex Grace End
c4 \grace { d16[ d16] }
}
- \paper {
+ \layout {
raggedright = ##t
}
\midi { }
-\version "2.3.17"
+\version "2.3.22"
\header {
texidoc = "Grace code should not be confused by nested sequential musics, containing grace notes; practically speaking, this means that the end-bar and measure bar coincide in this example."
{
c''2 { \grace b'16 c''2 } \bar "|."
}
- \paper {
+ \layout {
raggedright = ##t
}
-\version "2.3.17"
+\version "2.3.22"
\header {
texidoc = "Grace code should not be confused by nested sequential musics, containing grace notes; practically speaking, this means that the end-bar and measure bar coincide in this example."
}
- \paper { raggedright= ##t }
+ \layout { raggedright= ##t }
\score{
{ c''2 { \grace b'16 c''2 } \bar "|." }
- \paper {
+ \layout {
}
}
-\version "2.3.17"
+\version "2.3.22"
\header {
texidoc = "Grace code should not be confused by nested sequential musics, containing grace notes; practically speaking, this means that the end-bar and measure bar coincide in this example."
}
- \paper { raggedright= ##t }
+ \layout { raggedright= ##t }
\score { \context Voice {
{ \grace b'8 c''2 }
-\version "2.3.17"
+\version "2.3.22"
\header {
texidoc = "In nested syntax, graces are still properly handled."
}
- \paper { raggedright= ##t }
+ \layout { raggedright= ##t }
\score { \relative c'' {
f1
-\version "2.3.17"
+\version "2.3.22"
\header {
texidoc = "Also in the nested syntax here, grace notes appear rightly."
}
>>
\grace c16 c2. \bar "|."
}
- \paper { raggedright = ##t }
+ \layout { raggedright = ##t }
}
-\version "2.3.17"
+\version "2.3.22"
\header {
texidoc = "Graces notes may have the same duration as the main note."
}
\grace g e4
}
- \paper { raggedright = ##t }
+ \layout { raggedright = ##t }
}
-\version "2.3.17"
+\version "2.3.22"
\header {
texidoc = "Grace notes may be put in a @code{partcombine}r."
}
-\paper { raggedright= ##t }
+\layout { raggedright= ##t }
\score {
\new Staff
-\version "2.3.17"
+\version "2.3.22"
\header{
texidoc = "Stripped version of trip.ly. Staves should be of correct length."
}
- \paper { raggedright= ##t }
+ \layout { raggedright= ##t }
\score{
\context PianoStaff \relative c'' <<
}
}
>>
- \paper { }
+ \layout { }
}
-\version "2.3.17"
+\version "2.3.22"
\header {
texidoc = "Pieces may begin with grace notes."
}
\grace { a16[ bes] } c1
\bar "||" % test if | and || are synced.
}
- \paper { raggedright = ##t}
+ \layout { raggedright = ##t}
}
would lead to beam quanting program. "
}
-\version "2.3.17"
+\version "2.3.22"
-\paper {
+\layout {
raggedright = ##t
% "debug-beam-quanting" = ##t
-\version "2.3.17"
+\version "2.3.22"
\header{
texidoc = "Here @code{startGraceMusic} should set @code{no-stem-extend} to
true; the two grace beams should be the same here.
a4
}
- \paper {
+ \layout {
raggedright = ##t
}
\midi { }
-\version "2.3.17"
+\version "2.3.22"
\header {
texidoc = "Grace notes in different voices/staves are synchronized."
}
c4) c4 }
\new Staff { c2 c4 c4 \bar "|." }
>>
- \paper { raggedright = ##t}
+ \layout { raggedright = ##t}
}
-\version "2.3.17"
+\version "2.3.22"
\header {
texidoc = "There are three different kinds of grace types: the base
grace switches to smaller type, the appoggiatura inserts also a slur, and the
acciaccatura inserts a slur and slashes the stem."
}
-\paper {
+\layout {
raggedright = ##t
}
-\version "2.3.17"
+\version "2.3.22"
\header {
texidoc = "When grace notes are entered with unfolded repeats,
line breaks take place before grace notes.
-\version "2.3.17"
+\version "2.3.22"
\header {
}
- \paper { raggedright= ##t }
+ \layout { raggedright= ##t }
\score {\relative c' {
\repeat volta 2 {
-\version "2.3.17"
+\version "2.3.22"
\header {
}
}
- \paper { raggedright = ##t}
+ \layout { raggedright = ##t}
}
-\version "2.3.17"
+\version "2.3.22"
\header{
texidoc="
%%\grace { \set Grace.graceAlignPosition = \right c16} c4
c4 \grace { c16 } c4
}
-\paper {raggedright = ##t}
+\layout {raggedright = ##t}
\midi{ }
}
-\version "2.3.17"
+\version "2.3.22"
\header {
texidoc ="Hairpin crescendi may be dashed. "
-\version "2.3.17"
+\version "2.3.22"
\header {
\score {
\relative c'' { c4 \> c4 c4\! c4_\ff \> c4 c4\!\p }
-\paper { raggedright = ##t}
+\layout { raggedright = ##t}
}
-\version "2.3.17"
+\version "2.3.22"
\header { texidoc =
}
-\paper { raggedright= ##t }
+\layout { raggedright= ##t }
\score { \transpose c c''
\new Staff { d4 d d d s1 s1 s1 s1 }
\new Staff { e4 e e e s1 e4 e e e s1 }
>>
- \paper {
+ \layout {
\context {
\RemoveEmptyStaffContext
}
}
-\version "2.3.17"
+\version "2.3.22"
textFlat = \markup {\smaller \flat}
{ c''1 \break c'' }
}
- \paper { raggedright = ##t }
+ \layout { raggedright = ##t }
}
-\version "2.3.17"
+\version "2.3.22"
\header {
texidoc = "Instrument names are also printed on partial starting measures."
}
\score {
\relative c'' { \set Staff.instrument = "foo" \partial 4 c4 c1 }
- \paper { raggedright = ##t }
+ \layout { raggedright = ##t }
}
-\version "2.3.17"
+\version "2.3.22"
\header{
texidoc="
Staff margins are also markings attached to barlines. They should be
\set Staff.instrument = "Right " { c''4 }}
\context Staff = bass { \set Staff.instrument = "Left " \clef bass c4 }>>
-\paper {
+\layout {
raggedright = ##t
}}
-\version "2.3.17"
+\version "2.3.22"
\header { texidoc = "Each clef have own accidental placing rules. " }
#(set-global-staff-size 16)
}
-\version "2.3.17"
+\version "2.3.22"
-\paper {
+\layout {
raggedright = ##t
}
-\version "2.3.17"
+\version "2.3.22"
\header { texidoc = "By setting @code{Staff.keySignature} directly,
key signatures can be set invidually per pitch.
-\version "2.3.17"
+\version "2.3.22"
\header{
texidoc="
Key signatures may appear on key changes, even without a barline.
texidoc = "Ledger lines are shortened when they are very close. This ensures
that ledgers lines stay separate."
}
-\version "2.3.17"
+\version "2.3.22"
-\paper {
+\layout {
raggedright = ##t
}
}
-\version "2.3.17"
-\paper { raggedright = ##t }
+\version "2.3.22"
+\layout { raggedright = ##t }
withPaddingA = #(def-music-function (location padding music) (number? ly:music?)
#{ \override TextScript #'padding = #$padding
-\version "2.3.17"
+\version "2.3.22"
\header {
texidoc = "With the @code{\\lyricsto} mechanism, individual lyric
-\version "2.3.17"
+\version "2.3.22"
\header {
texidoc ="Polyphonic rhythms and rests do not disturb
}
>>
}
- \paper { raggedright = ##t}
+ \layout { raggedright = ##t}
}
-\version "2.3.17"
+\version "2.3.22"
\header{
texidoc= "Lyrics can be set to a melody automatically. Excess lyrics will be
to work."
}
-\paper { raggedright= ##t }
+\layout { raggedright= ##t }
-\version "2.3.17"
+\version "2.3.22"
\header
{
}
\lyricsto A \context Lyrics \lyricmode { a __ a __ ha }
>>
- \paper {
+ \layout {
raggedright = ##t
}
}
-\version "2.3.17"
+\version "2.3.22"
\header {
}
-\paper { raggedright = ##t }
+\layout { raggedright = ##t }
\relative c''{
d8( e f) r4.
f4
-\version "2.3.17"
+\version "2.3.22"
\header {
bla -- bla -- bla -- bla8 --
bla16 -- bla -- bla
}>>
- \paper {
+ \layout {
indent = 0.0 \cm
linewidth = 3.4 \cm
-\version "2.3.17"
+\version "2.3.22"
\header {
bla -- bla -- bla -- bla
}>>
- \paper {
+ \layout {
indent = 0.0 \cm
linewidth = 3.4 \cm
-\version "2.3.17"
+\version "2.3.22"
\header {
texidoc = "In lyrics, hyphens may be used."
}
-\paper {
+\layout {
raggedright= ##t
}
-\version "2.3.17"
+\version "2.3.22"
\header {
texidoc = "
izzz
}
>>
- \paper { raggedright = ##t }
+ \layout { raggedright = ##t }
}
-\version "2.3.17"
+\version "2.3.22"
\header{
texidoc="
>>
\new Staff { b1 b1 }
>>
- \paper {
+ \layout {
raggedright = ##t
\context {
\Score
-\version "2.3.17"
+\version "2.3.22"
\header
{
texidoc = "Melismata are triggered by manual beams."
\lyricsto "" \new Lyrics \lyricmode { bla bla bla }
>>
- \paper { raggedright = ##t }
+ \layout { raggedright = ##t }
}
texidoc = "Lyrics are not lowered despite the presence of an octavation 8."
}
-\version "2.3.17"
-\paper {
+\version "2.3.22"
+\layout {
\context {
\Staff
minimumVerticalExtent = ##f
texidoc = "The note markup function may be used to make metronome
markings. It works for a variety of flag, dot and duration settings."
}
-\version "2.3.17"
+\version "2.3.22"
\score { { c4^\markup {
\note #"1" #1
texidoc = "Use \\score block as markup command."
}
-\version "2.3.17"
+\version "2.3.22"
tuning = \markup {
\score {
} {
\clef bass <c, g, d g>1
}
- \paper { raggedright = ##t }
+ \layout { raggedright = ##t }
}
}
-\version "2.3.17"
+\version "2.3.22"
\header {texidoc="Markup scripts may be stacked."}
-\paper { raggedright = ##t}
+\layout { raggedright = ##t}
\score { { c''^\markup { "a" \column < "1" \bold "2" "3" > } } }
}
-\version "2.3.17" % to be updated
+\version "2.3.22" % to be updated
#(def-markup-command (upcase paper props str) (string?)
"Upcase the string characters. Syntax: \\upcase #\"string\""
c''-\markup \upcase #"hello world"
% produces a "HELLO WORLD" markup
}
- \paper { raggedright = ##t }
+ \layout { raggedright = ##t }
}
}
-\version "2.3.17"
+\version "2.3.22"
%% TODO: should have 2/4 + 5/8 time sig style.
#(set-time-signature 5 8 '(3 2))
g8 a4 g a4.->
}
- \paper {
+ \layout {
raggedright = ##t
\context { \Staff
\consists "Measure_grouping_engraver"
-\version "2.3.17"
+\version "2.3.22"
\header {
texidoc = "There is limited support for mensural notation: note head
}
-\version "2.3.17"
+\version "2.3.22"
\score { \relative c'' { \tempo \breve = 100 c1 c1 \tempo 8.. = 50 c1 }
-\paper { raggedright = ##t }
+\layout { raggedright = ##t }
}
-\version "2.3.17"
+\version "2.3.22"
\header{
texidoc="
-\version "2.3.17"
+\version "2.3.22"
\header { texidoc=" You can write stencil callbacks in Scheme, thus
providing custom glyphs for notation elements. A simple example is
parenthesize-stencil)
-\paper { raggedright = ##t }
+\layout { raggedright = ##t }
\relative c' {
c4 e
-\version "2.3.17"
+\version "2.3.22"
\header
{
texidoc = "The multimeasure rest is centered exactly between bar lines."
c'1 R1*20 c'1
}
- \paper { raggedright = ##t}
+ \layout { raggedright = ##t}
}
-\version "2.3.17"
+\version "2.3.22"
\header {
texidoc= "Multi-measure rests are centered also in the case of grace notes."
}
-\paper { raggedright = ##t }
+\layout { raggedright = ##t }
<<
\new Staff { R1 R1 R1*3 }
-\version "2.3.17"
+\version "2.3.22"
\header {
texidoc = "There are both long and short instrument names.
\set Staff.instr = "instr"
{c''1 \break R1 }
>>
- \paper {
+ \layout {
raggedright = ##t
\context {
\Staff
independent on prefatory matter in other staves."
}
-\version "2.3.17"
+\version "2.3.22"
\score {
<< \new Staff { R1 }
>>
-\paper { raggedright = ##t }
+\layout { raggedright = ##t }
}
texidoc = "By setting texts starting with a multi-measure rest, an
extra spacing column is created. This should not cause problems."
}
-\version "2.3.17"
+\version "2.3.22"
\score {
<<
<< { R1*40 } { s1*0_"bla" }>>
}
>>
- \paper {
+ \layout {
raggedright = ##t
}
}
-\version "2.3.17"
+\version "2.3.22"
\header {
-\version "2.3.17"
+\version "2.3.22"
\header{
texidoc="
\time 8/4 R1*2
}
- \paper {
+ \layout {
\context {
\Score
skipBars = ##t
which can be used to extend music syntax seamlessly."
}
-\version "2.3.17"
+\version "2.3.22"
#(define myBar
(ly:make-music-function
}
-\version "2.3.17"
+\version "2.3.22"
#(define (notes-to-skip m)
"Convert all stuff with duration (notes, lyrics, bass figures, etc.) to skips.
)
- \paper { raggedright= ##t }
+ \layout { raggedright= ##t }
foobar = \transpose c c' { c4\>-^ c4-^ c4\!-^ c4-^ }
texts using a similar syntax as @code{\\markup}."
}
-\version "2.3.17"
+\version "2.3.22"
\score {
{
\fatText
#:smaller #:smaller #:smaller "A")
#:sub "alike")
}
- \paper {
+ \layout {
raggedright = ##t
indent = #0
\context {
texidoc = "With the new markup syntax, text may be written in various manners."
}
-\version "2.3.17"
+\version "2.3.22"
\score {
texidoc = "Scoring based slur formatting."
}
-\version "2.3.17"
-\paper {
+\version "2.3.22"
+\layout {
raggedright = ##t
% #(define debug-slur-scoring #t)
}
texidoc = "newlyrics, multiple stanzas, multiple lyric voices."
}
-\paper { raggedright = ##t }
+\layout { raggedright = ##t }
<<
\new Staff \relative {
d'2 d c4 bes a2 \break
}
>>
-\version "2.3.17"
+\version "2.3.22"
-\version "2.3.17"
+\version "2.3.22"
% possible rename to staff-something. -gp
\header{ texidoc = "@cindex Staff Remove
\score {
{ c4 d4 e8 d8 }
- \paper {
+ \layout {
raggedright = ##t
\context {
\Staff
-\version "2.3.17"
+\version "2.3.22"
\header{
texidoc=" By default, text is set with empty horizontal dimensions.
\fatText
c_"very wide and long text" c
}
- \paper {
+ \layout {
linewidth = 3.0\cm
}
}
-\version "2.3.17"
+\version "2.3.22"
\header {
c4\stopGroup\stopGroup
}
- \paper {
+ \layout {
\context {
\Staff \consists "Horizontal_bracket_engraver"
}
-\version "2.3.17"
+\version "2.3.22"
\header {
texidoc = "Note heads are flipped on the stem to prevent collisions.
}
- \paper { raggedright= ##t }
+ \layout { raggedright= ##t }
\score { \relative c''
\context Voice {
Harmonic heads do not get dots. If @code{harmonicAccidentals} is unset, they also don't get accidentals."
}
-\version "2.3.17"
+\version "2.3.22"
\score {
{
< dis'' gis''\harmonic >8
}
- \paper {
+ \layout {
raggedright = ##t
}
}
-\version "2.3.17"
+\version "2.3.22"
\header{
texidoc="
Note head shapes may be set from several choices.
\break
}
- \paper {
+ \layout {
indent = 0.0
raggedright = ##t
}
-\version "2.3.17"
+\version "2.3.22"
\header {
texidoc = "Note head lines (e.g. glissando)
\clef F s1*4
}
>>
-\paper {
+\layout {
linewidth = 8.0 \cm
}
}
-\version "2.3.17"
+\version "2.3.22"
\header{
texidoc=" The number of stafflines of a staff can be set. Ledger
\context Voice \relative c {
c' c c c | g' g g g \bar ":|"
}
- \paper {
+ \layout {
\context { \Staff
\override StaffSymbol #'line-count = #3
}
-\version "2.3.17"
+\version "2.3.22"
-\paper { raggedright = ##t }
+\layout { raggedright = ##t }
\relative c''' {
a2 b
#(set-octavation 1)
"
}
-\version "2.3.17"
+\version "2.3.22"
% . There must be a minimum distance between the octavation line and the
% topmost staff line, taking into account the height of the closing
% by the user). The same holds for `8va' and `15ma'.
-\paper { raggedright = ##t}
+\layout { raggedright = ##t}
\score {
\relative c''' {
a b c a
#(ly:set-point-and-click 'line-column)
-\version "2.3.17"
+\version "2.3.22"
\header {
-\version "2.3.17"
+\version "2.3.22"
-\header{ texidoc = "This shows how different settings on \bookpaper
-modify the general page layout. Basically \bookpaper will set the
-values for the whole paper while \paper for each \score block." }
+\header{ texidoc = "This shows how different settings on \paper
+modify the general page layout. Basically \paper will set the
+values for the whole paper while \layout for each \score block." }
\header {
title = "Title"
instrument = "Instrument"
}
-\bookpaper {
+\paper {
%hsize = 2\cm
%vsize = 2\cm
topmargin = 2\cm
}
}
\header {piece = "Piece I"}
- \paper {linewidth = 13\cm}
+ \layout {linewidth = 13\cm}
}
\score {
\relative c'' {
}
}
\header {piece = "Piece II"}
- \paper {linewidth = 9\cm}
+ \layout {linewidth = 9\cm}
}
}
-\version "2.3.17"
+\version "2.3.22"
\header {
texidoc ="The a2 string is printed only on notes (i.e. not on rests),
and only after chords, solo or polyphony."
"
}
-\version "2.3.17"
+\version "2.3.22"
vone = \relative a' { g4 g f f e e d d }
vtwo = \relative a' { e4 e f f g g a a }
\score {
\partcombine \vone \vtwo
- \paper { raggedright = ##t }
+ \layout { raggedright = ##t }
}
"
}
-\version "2.3.17"
+\version "2.3.22"
vone =
\header { texidoc = " Multimeasure rests are printed after solos, both
for solo1 and for solo2." }
-\version "2.3.17"
+\version "2.3.22"
-\paper { raggedright = ##t }
+\layout { raggedright = ##t }
\new Staff
\partcombine
\relative c''{ R1*2 | c4 r2. | c2 r | R1 }
other one. Unfortunately, the multi-rest does not get printed."
}
-\version "2.3.17"
-\paper { raggedright = ##t }
+\version "2.3.22"
+\layout { raggedright = ##t }
<<
\new Staff
}
-\version "2.3.17"
+\version "2.3.22"
\score {
\new Staff
vone = \relative a' { d4 r8 d8 d8 r8 d8 r8 d2 ~ d2 ~ d4 }
vtwo = \relative g' { g4. g8 r2 g4 r4 r2 g4 }
-\version "2.3.17"
+\version "2.3.22"
\score {
}
-\version "2.3.17"
+\version "2.3.22"
vone = \relative a' { R1 a2 r4 r a a a a }
vtwo = \relative a' { R1 f4 f4 f4 f f f a a }
"
}
-\version "2.3.17"
+\version "2.3.22"
vone = \relative a' { g2 g g g4 g f' c c( c) c c c ~ c
c2. c4 c
\score {
\partcombine \vone \vtwo
- \paper { raggedright = ##t }
+ \layout { raggedright = ##t }
}
-\version "2.3.17"
+\version "2.3.22"
\header {
c4 d \unaCorda e f g
b | \break c b c \treCorde c
}
- \paper { raggedright = ##t }
+ \layout { raggedright = ##t }
}
-\version "2.3.17"
+\version "2.3.22"
\header {
texidoc = "Unterminated piano pedal brackets run to the end of the piece. "
c4 \sustainDown
\bar "|."
}
- \paper { raggedright = ##t }
+ \layout { raggedright = ##t }
}
-\version "2.3.17"
+\version "2.3.22"
\header
{
texidoc = "The standard piano pedals style comes with Ped symbols.
-\version "2.3.17"
+\version "2.3.22"
\header{
texidoc="@code{PhrasingSlur}s go over normal slurs."
}
-\paper { raggedright = ##t }
+\layout { raggedright = ##t }
\relative c''{
c8 \( (d e f) g ( a b c)
-\version "2.3.17"
+\version "2.3.22"
\header {
}
-\paper { raggedright= ##t }
+\layout { raggedright= ##t }
\score{ {
a a a a \break
-\version "2.3.17"
+\version "2.3.22"
\header {
texidoc = "Distances between prefatory items (e.g. clef, bar,
\key g \minor
c1
}
-\paper { raggedright = ##t}
+\layout { raggedright = ##t}
}
not interfere with the overrides and reverts from polyphony."
}
-\paper { raggedright = ##t }
+\layout { raggedright = ##t }
-\version "2.3.17"
+\version "2.3.22"
\relative c'' {
<<
{ \grace e8 d2 }
-\version "2.3.17"
+\version "2.3.22"
\header {
texidoc = "Once properties take effect during a single time step only."
}
-\paper { raggedright = ##t }
+\layout { raggedright = ##t }
\relative c' {
c4
}
-\version "2.3.17"
+\version "2.3.22"
A = \relative c' { c4 d e f | << R1 \\
\quote "qB" 1 >> | }
B = \relative c' { << R1 \\
\addquote "qA" \A
\addquote "qB" \B
-\paper { raggedright = ##t }
+\layout { raggedright = ##t }
<<
\context Staff = "A" \A
}
-\version "2.3.17"
+\version "2.3.22"
-\paper { raggedright = ##t }
+\layout { raggedright = ##t }
\addquote clarinet {
@code{rest-event} is not in @code{quotedEventTypes}."
}
-\version "2.3.17"
-\paper {
+\version "2.3.22"
+\layout {
raggedright = ##t
}
with @code{\mark NUMBER}, or with @code{Score.rehearsalMark}."
}
-\version "2.3.17"
+\version "2.3.22"
\score { \relative c'' {
c1 \mark \default
c1 \mark #7
}
-\version "2.3.17"
+\version "2.3.22"
\score {
\relative c''{
\set Score.markFormatter = #format-mark-numbers
-\version "2.3.17"
+\version "2.3.22"
\header{
texidoc="
-\version "2.3.17"
+\version "2.3.22"
\header{
texidoc="
"
}
- \paper { raggedright= ##t }
+ \layout { raggedright= ##t }
\score {
-\version "2.3.17"
+\version "2.3.22"
\header {
texidoc = "Percent repeats are not skipped, even when @code{skipBars} is set."
}
- \paper { raggedright= ##t }
+ \layout { raggedright= ##t }
\score {
\context Staff <<
-\version "2.3.17"
+\version "2.3.22"
\header {
texidoc = "Measure repeats may be nested with beat repeats."
}
-\version "2.3.17"
+\version "2.3.22"
\header {
texidoc = "Within a bar, beat repeats denote that a music snippet should be
played again."
\repeat "percent" 2 { g'8 g c, c }
\repeat "percent" 4 { b8 b8 }
}
- \paper { raggedright = ##t }
+ \layout { raggedright = ##t }
}
-\version "2.3.17"
+\version "2.3.22"
\header { texidoc = "Volta repeats may be unfolded through the music
function @code{\unfoldrepeats}."
nots = \relative c' {
c4 \repeat volta 2 c4 \alternative { d e }
}
-\paper {raggedright = ##t}
+\layout {raggedright = ##t}
\context Voice {
\nots
-\version "2.3.17"
+\version "2.3.22"
\header {
texidoc = "Unfolding tremolo repeats. All fragments fill one
}
- \paper { raggedright = ##t }
+ \layout { raggedright = ##t }
}
-\version "2.3.17"
+\version "2.3.22"
\header{
texidoc="
-\version "2.3.17"
+\version "2.3.22"
\header {
texidoc = "When too few alternatives are present, the first
-\version "2.3.17"
+\version "2.3.22"
\header{
texidoc="
% more alts than body
\repeat volta 2 { c^"2$\\times$ 3alt" d } \alternative { e f g }
}
- \paper {}
+ \layout {}
\midi {}
}
texidoc = "Rests under beams are only moved if necessary."
}
-\version "2.3.17"
+\version "2.3.22"
fig = \relative c' {
<a c e>8[ r <c e a> r <e a c> r <a c e>] r |
>>
}
- \paper {
+ \layout {
raggedright = ##t
}
}
-\version "2.3.17"
+\version "2.3.22"
\header{
texidoc="
Rests should not collide with beams, stems and noteheads. Rests may
\scales
\restsII
}
- \paper { raggedright = ##t }
+ \layout { raggedright = ##t }
}
}
-\version "2.3.17"
+\version "2.3.22"
{
\set Score.timing = ##f
-\version "2.3.17"
+\version "2.3.22"
\header {
texidoc = "Whole and half rests moving outside the staff should get
ledger lines."
-\version "2.3.17"
+\version "2.3.22"
\header {
texidoc = "Rests can have pitches--these will be affected by
}
- \paper { raggedright= ##t }
+ \layout { raggedright= ##t }
\score { \relative c''
{
}
-\version "2.3.17"
+\version "2.3.22"
\score {
\new Staff \relative c' {
<< { r8 g''4 g8 r g4 g8 } \\
{ d,4 r d r } >>
}
- \paper { raggedright = ##t }
+ \layout { raggedright = ##t }
}
-\version "2.3.17"
+\version "2.3.22"
\header{
texidoc="
-\version "2.3.17"
+\version "2.3.22"
\header
{
texidoc = "In rhythmic staves stems should go up, and bar lines have the size for a 5 line staff. The whole note hangs from the rhythmic staff."
}
-\paper { raggedright = ##t }
+\layout { raggedright = ##t }
\context RhythmicStaff
{
-\version "2.3.17"
+\version "2.3.22"
\header {
<< { c4^^ }\\
{ d4_^ } >>
}
-\paper { raggedright = ##t}
+\layout { raggedright = ##t}
}
-\version "2.3.17"
+\version "2.3.22"
\header {
texidoc = "Scripts can be stacked. The order is determined by a
priority field, but when objects have the same priority, the input
}
\score{ \relative c'' { c4^"inner up"^"outer up"_"inner down"_"outer down" }
- \paper { raggedright = ##t}
+ \layout { raggedright = ##t}
}
-\version "2.3.17"
+\version "2.3.22"
-\paper { raggedright= ##t }
+\layout { raggedright= ##t }
\header {
texidoc = "Scripts may be stacked."
-\version "2.3.17"
+\version "2.3.22"
\header{
texidoc="
-\version "2.3.17"
+\version "2.3.22"
foollilypondbook = "
\score
"
-\version "2.3.17"
+\version "2.3.22"
foollilypondbook = "
\score
"
-\version "2.3.17"
+\version "2.3.22"
foollilypondbook = "
\score
"
-\version "2.3.17"
+\version "2.3.22"
foollilypondbook = "
\score
"
-\version "2.3.17"
+\version "2.3.22"
foollilypondbook = "
\score
"
-\version "2.3.17"
+\version "2.3.22"
\header {
texidoc = "The area underneath an (up) slur is minimised to improve the shape. "
a8(a a a a a a a)
}
-\paper{
+\layout{
indent=0.0\mm
}
}
-\version "2.3.17"
+\version "2.3.22"
\header{
texidoc="
a8 a(a4)
a4( a8) a
}
- \paper{
+ \layout{
indent = 0.0
linewidth = 100.\mm
}
-\version "2.3.17"
+\version "2.3.22"
\header{
texidoc="
in unbroken state.
"
}
-\paper {
+\layout {
linewidth=40.\mm
indent=0.
}
-\version "2.3.17"
+\version "2.3.22"
\header{
texidoc="
Slurs behave decently when broken across a linebreak.
-\version "2.3.17"
+\version "2.3.22"
\header{
texidoc="Slurs should not get confused by augmentation dots. With a lot
of dots, the problems becomes more visible."
\relative c'' {
c4.............( c)
}
- \paper {
+ \layout {
raggedright = ##t
}
}
texidoc = "Some composers use slurs both above and below chords.
This can be typeset by setting @code{doubleSlurs}"
}
-\version "2.3.17"
+\version "2.3.22"
-\paper { raggedright = ##t }
+\layout { raggedright = ##t }
\relative {
\set doubleSlurs = ##t
<c e>4 ( <d f> <c e> <d f> )
-\version "2.3.17"
+\version "2.3.22"
\header {
Asymmetric slurs are created by setting @code{excentricity}."
}
-\paper {
+\layout {
raggedright = ##t
}
-\version "2.3.17"
+\version "2.3.22"
\header{
texidoc="
Slurs should look nice and symmetric. The curvature may increase
\stemNeutral c ( \stemUp c \stemNeutral c) c ( a c) c( d, c') c( f, c')
\stemDown c( f, c')
}
- \paper{
+ \layout{
linewidth = 120.\mm
}
}
-\version "2.3.17"
+\version "2.3.22"
\header
{
texidoc ="Slurs may be placed over rest. The slur will avoid colliding with
}
-\paper { raggedright = ##t}
+\layout { raggedright = ##t}
}
}
-\version "2.3.17"
+\version "2.3.22"
-\paper { raggedright = ##t }
+\layout { raggedright = ##t }
\relative c''{
\clef alto
For different configurations, the scripts can be moved manually."
}
-\version "2.3.17"
-\paper {
+\version "2.3.22"
+\layout {
raggedright = ##t
}
\relative
-\version "2.3.17"
+\version "2.3.22"
\header
{
texidoc = "Symmetric figures should lead to symmetric slurs."
e,(e e e) e(d d e) e(c c e) e(b b e)
}
>>
- \paper{
+ \layout{
raggedright = ##t
}
}
-\version "2.3.17"
+\version "2.3.22"
\header
{
texidoc = "Symmetric figures should lead to symmetric slurs."
f'8(f f) f(g f) f(a f) f(b f)
}
>>
- \paper{
+ \layout{
raggedright = ##t
}
}
point into one note head, and point over another note head."
}
-\paper {
+\layout {
raggedright = ##t
}
-\version "2.3.17"
+\version "2.3.22"
\relative c'' {
\time 2/4
-\version "2.3.17"
+\version "2.3.22"
\header {
texidoc = "Accidentals in different staves do not affect the
}
{ \key d \major cis4 cis4 cis4 cis!4 } >>
- \paper { raggedright = ##t}
+ \layout { raggedright = ##t}
}
-\version "2.3.17"
+\version "2.3.22"
\header {
texidoc = "Accidentals do not influence the amount of stretchable space.
}
%% not raggedright!!
- \paper { linewidth = 14.\cm
+ \layout { linewidth = 14.\cm
}
}
-\version "2.3.17"
+\version "2.3.22"
\header {
texidoc = "Accidentals sticking out to the left
c2 c2 cis2 cis2 |
c8 c8 cis8 cis8 cis c c c]
}
-\paper { raggedright = ##t}
+\layout { raggedright = ##t}
}
-\version "2.3.17"
+\version "2.3.22"
\header {
texidoc = "Downstem notes following a barline are
printed with some extra space. This is an optical correction similar
\sd c4 \su c4
\sd f c,4 c'4 cis4 \stemUp c4
}
-\paper { raggedright = ##t}
+\layout { raggedright = ##t}
}
-\version "2.3.17"
+\version "2.3.22"
\header {
texidoc = "Clef changes at the start of a line get much more space
c'4 c'4 c'4
}
>>
- \paper {
+ \layout {
raggedright = ##t
\context {
\Staff
-\version "2.3.17"
+\version "2.3.22"
\header {
texidoc ="Broken engraving of a bar at the end of a line does not upset
\time 3/4 \break
e2 e4 | e2 e4 \time 4/4 \break
}
-\paper {
+\layout {
raggedright = ##t }
}
#(ly:set-option 'old-relative)
-\version "2.3.17"
+\version "2.3.22"
\header { texidoc = "
A voicelet (a very short voice to get polyphonic chords correct)
should not confuse the spacing engine."
>>
c4
}}
- \paper { raggedright = ##t }
+ \layout { raggedright = ##t }
}
-\version "2.3.17"
+\version "2.3.22"
\header {
texidoc = "A clef can be folded below notes in a different staff, if
this does not disrupt the flow of the notes."
\new Staff { \clef bass c,2 \clef treble c'2 }
>>
- \paper { raggedright = ##t}
+ \layout { raggedright = ##t}
}
-\version "2.3.17"
+\version "2.3.22"
\header {
texidoc = "A clef can be folded below notes in a different staff, if
\new Staff { \clef bass c,2 \clef treble c'2 }
>>
- \paper { raggedright = ##t
+ \layout { raggedright = ##t
\context { \Score
\override NonMusicalPaperColumn #'print-function = #Paper_column::print
-\version "2.3.17"
+\version "2.3.22"
\header {
texidoc = "Spacing uses the duration of the notes, but disregards
}
- \paper { raggedright = ##t}
+ \layout { raggedright = ##t}
}
-\version "2.3.17"
+\version "2.3.22"
\header {
texidoc = "Grace note spacing. Should it be tuned? "
}
\score {
\context Voice \relative c'' { \grace { c16[ d] } c4 }
- \paper { raggedright = ##t}
+ \layout { raggedright = ##t}
}
-\version "2.3.17"
+\version "2.3.22"
\header {
texidoc = "For knees, the spacing correction is such that the
\override Stem #'thickness = #10
g''8[ g g'' g'']
}
-\paper { raggedright = ##t}
+\layout { raggedright = ##t}
}
-\version "2.3.17"
+\version "2.3.22"
\header{
texidoc = "Concurrent tuplets should be equidistant on all staffs.
\multipart
}
-% \paper { raggedright = ##t }
+% \layout { raggedright = ##t }
}
a8[ a8 a8 a8]
a8 a8 a8 a8
}
-\paper {
+\layout {
raggedright = ##t
}
}
-\version "2.3.17"
+\version "2.3.22"
-\version "2.3.17"
+\version "2.3.22"
\header {
\score {
\relative c'' \new Staff { \repeat unfold 20 { c1 } }
- \paper{
+ \layout{
raggedlast = ##t
}
}
-\version "2.3.17"
+\version "2.3.22"
\header {
texidoc = "Rests get a little less space, since they are narrower.
However, the quarter rest in feta font is relatively wide, causing this
\time 12/4
r4 c4 c4 c4 r4 r4 c4
}
-\paper {
+\layout {
raggedright = ##t
}
}
-\version "2.3.17"
+\version "2.3.22"
\header {
texidoc = "Notes that are shorter than the common shortest note get a
}
- \paper { raggedright = ##t}
+ \layout { raggedright = ##t}
}
-\version "2.3.17"
+\version "2.3.22"
\header {
texidoc = "Upstem notes before a barline are printed with some extra
c c c
e e e
}
-\paper { raggedright = ##t}
+\layout { raggedright = ##t}
}
-\version "2.3.17"
+\version "2.3.22"
\header{
\time 16/4 c''4 c c, c' d, c' e, c' f, c' g c a c b c
}
- \paper {
+ \layout {
raggedright = ##t
}
}
-\version "2.3.17"
+\version "2.3.22"
\header {
texidoc = "For juxtaposed chords with the same direction, a
slight optical correction is used. It is constant, and works only if
f8[
e f e] f[ d f d] f[ c f c] f[ b, f' b,] f'[ a, f' a,]
}
-\paper { raggedright = ##t}
+\layout { raggedright = ##t}
}
-\version "2.3.17"
+\version "2.3.22"
\header {
texidoc ="Space from a normal note (or barline) to a grace note is
}
}
- \paper { raggedright = ##t}
+ \layout { raggedright = ##t}
}
-\version "2.3.17"
+\version "2.3.22"
\header {
texidoc = "
When tightly spaced, the spaces between elements (hinterfleisch?)
\relative c''{
r1 e4 f, e' f,
}
- \paper {
+ \layout {
linewidth = 25.0 \mm
indent = 0.0\mm
}
-\version "2.3.17"
+\version "2.3.22"
\header {
}
\context Staff=down { r r }
>>
- \paper{ raggedright = ##t }
+ \layout{ raggedright = ##t }
}
-\version "2.3.17"
+\version "2.3.22"
\header {
texidoc = "Span bars are drawn only between staff bar lines. By setting
bar lines to transparent, they are shown only between systems.
f1 f1 f1 f1
}
>>
- \paper {
+ \layout {
\context {
\Staff
}
-\version "2.3.17"
+\version "2.3.22"
\header{
\stemDown
e,-. d-. c-. b-. a-. g-.
}
- \paper {
+ \layout {
raggedright = ##t
}
}
\header { texidoc = " Staves starting and ending halfway include clefs
and bar lines. " }
-\version "2.3.17"
+\version "2.3.22"
\score {
\new StaffGroup \relative c'' <<
\new Staff { c4 c c c \bar "||" c c c c }
{ \skip 4 \new Staff { c c c } }
>>
- \paper {}
+ \layout {}
}
}
-\version "2.3.17"
+\version "2.3.22"
\score {
<<
}
>>
- \paper {
+ \layout {
#(paper-set-staff-size 6)
raggedright = ##t
}
-\version "2.3.17"
+\version "2.3.22"
\header {
texidoc = "The staff is a grob (graphical object) which may be adjusted as well, for example, to have 6 thick lines and a slightly large @code{staff-space}.
}
\mus
>>
- \paper {
+ \layout {
raggedright = ##t
}
}
-\version "2.3.17"
+\version "2.3.22"
\header {
texidoc = "Stanza numbers are put left of their lyric. They are aligned in a column."
}
>>
-\paper { raggedright = ##t }
+\layout { raggedright = ##t }
}
-\version "2.3.17"
+\version "2.3.22"
\header{
texidoc="
"
}
-\paper {
+\layout {
raggedright = ##t
}
\context Voice \relative c {
-\version "2.3.17"
+\version "2.3.22"
\header {
<g, e'>2 <b e g> <c e g> <d f g>
}
- \paper {
+ \layout {
raggedright = ##t
}
}
-\version "2.3.17"
+\version "2.3.22"
\header{
texidoc="
\time 12/4 c''4 c c c a f' f, a
}
- \paper {
+ \layout {
raggedright = ##t
}
}
\time 12/4 c''4 c c c a f' f, a
}
- \paper {
+ \layout {
raggedright = ##t
\context { \Score
\override SpacingSpanner #'stem-spacing-correction = #0.0
-\version "2.3.17"
+\version "2.3.22"
\header{
texidoc="
Stem tremolos or rolls are tremolo signs that look like beam segments
-\version "2.3.17"
+\version "2.3.22"
\header {
texidoc = "The size of every system is correctly determined; this
}
-\paper {
+\layout {
\context {
\Score
\override System #'print-function = #box-grob-stencil
-\version "2.3.17"
+\version "2.3.22"
\header { texidoc = "By setting betweensystempadding to a negative
value, it is possible to eliminate the anti-collision constraints.
Then setting @code{betweensystemspace} to a low (nonzero) value,
print systems in overstrike. "
}
-\bookpaper {
+\paper {
raggedbottom =##t
betweensystempadding = - 4\cm
betweensystemspace = 3\mm
-\version "2.3.17"
+\version "2.3.22"
\header {
texidoc =
"
>>
>>
}
- \paper {raggedright = ##t}
+ \layout {raggedright = ##t}
}
}
-\version "2.3.17"
+\version "2.3.22"
\score {
\new TabStaff {
-\version "2.3.17"
+\version "2.3.22"
\header{ texidoc = "@cindex Tabulature
A sample tablature, with both normal staff and tab.
-\version "2.3.17"
+\version "2.3.22"
\header {
texidoc = "The @code{\\tag} command marks music expressions with a
}
-\paper { raggedright= ##t }
+\layout { raggedright= ##t }
common =
\relative c'' {
-\version "2.3.17"
+\version "2.3.22"
\header {
texidoc= "Text spanners should not repeat start text when broken."
}
-\paper {
+\layout {
raggedright = ##t
}
-\version "2.3.17"
+\version "2.3.22"
\header {
texidoc = "Tie engraver uses @code{busyGrobs} to keep track of
{ \voiceThree { b,8 ~ b8 ~ b8 ~ b8 }}
>>
- \paper {
+ \layout {
raggedright = ##t
}
}
-\version "2.3.17"
+\version "2.3.22"
\header{
texidoc="
When tying chords, the outer slurs point outwards, the inner slurs
-\version "2.3.17"
+\version "2.3.22"
\header {
texidoc = "Ties should not collide with dots."
}
-\version "2.3.17"
+\version "2.3.22"
\header {
texidoc = "Tieing a grace to the to a following grace or main note works."
}
- \paper { raggedright= ##t }
+ \layout { raggedright= ##t }
\score { \context Voice \relative c'' {
c4 \grace { c8 ~ c16 ~ } c4
-\version "2.3.17"
+\version "2.3.22"
\header{
texidoc="
The horizontal middle should not overlap with a staffline.
"
}
-\paper{
+\layout{
raggedright= ##t
}
texidoc = "Trill spanner"
}
-\version "2.3.17"
-\paper {
+\version "2.3.22"
+\layout {
raggedright = ##T
}
\relative \new Voice {
-\version "2.3.17"
+\version "2.3.22"
\header {
texidoc = "In combination with a beam, the bracket of the tuplet
the bracket."
}
- \paper { raggedright= ##t }
+ \layout { raggedright= ##t }
\score { \context Voice\relative c'' {
\times 2/3 { r c8[ c8] }
}
-\version "2.3.17"
+\version "2.3.22"
-\paper {
+\layout {
indent = 0.0\mm
raggedright = ##t
}
-\version "2.3.17"
+\version "2.3.22"
\header {
}
}
}
- \paper { raggedright = ##t}
+ \layout { raggedright = ##t}
}
}
-\version "2.3.17"
+\version "2.3.22"
\score {
-\version "2.3.17"
+\version "2.3.22"
\header {
texidoc = "Tuplets may contain rests. "
}
-\version "2.3.17"
+\version "2.3.22"
\score {
\relative c' {
\times 4/5 { bes'''4 bes,, b c cis }
\times 4/5 { a''4 b b c cis }
}
- \paper {
+ \layout {
raggedright = ##t
}
}
-\version "2.3.17"
+\version "2.3.22"
\header {
texidoc = "Horizontal tuplet brackets are shifted vertically
}
- \paper { raggedright= ##t }
+ \layout { raggedright= ##t }
\score { \context Voice\relative c'' {
\times 2/3 { b'4 b b }
-\version "2.3.17"
+\version "2.3.22"
\header{
texidoc="
"
}
-\paper { raggedright= ##t }
+\layout { raggedright= ##t }
\score{
\context Voice \relative c'' {
-\version "2.3.17"
+\version "2.3.22"
\header { texidoc= "
}
\context Staff = two {\clef bass \skip 1*2 }
>>
- \paper{
+ \layout{
raggedright = ##t
}
}
-\version "2.3.17"
+\version "2.3.22"
\header {
texidoc ="Broken volta spanners behave correctly at their left edge in all cases."
}
>>
- \paper { raggedright =##t }
+ \layout { raggedright =##t }
}
also over other staves than the topmost one in a score."
}
-\version "2.3.17"
+\version "2.3.22"
vmus = { \repeat volta 2 c1 \alternative { d e } }
>>
>>
- \paper { raggedright = ##t }
+ \layout { raggedright = ##t }
}
-\version "2.3.16"
+\version "2.3.22"
\header {
title = "Screech and boink"
subtitle = "Random complex notation"
>>
\midi { \tempo 8 = 60 }
- \paper {
+ \layout {
raggedright = ##t
\context {
>>
%% Optional helper for automatic updating by convert-ly. May be omitted.
-\version "2.3.16"
+\version "2.3.22"
}
%% Optional helper for automatic updating by convert-ly. May be omitted.
-\version "2.3.16"
+\version "2.3.22"
-\version "2.3.16"
+\version "2.3.22"
\header {
texidoc ="Polyphonic piano music."
\context Voice = two \lowerTwo
>>
>>
- \paper { }
+ \layout { }
\midi { }
}
-\version "2.3.16"
+\version "2.3.22"
\header {
texidoc ="Lyrics between two staffs."
\lower
>>
>>
- \paper {
+ \layout {
\context {
\GrandStaff
\accepts "Lyrics"
-\version "2.3.17"
+\version "2.3.22"
%% +.ly: Be the first .ly file for lys-to-tely.py.
%% Better to make lys-to-tely.py include "introduction.texi" or
%% other .texi documents too?
-\version "2.3.17"
+\version "2.3.22"
\header {
\relative c'' {
a b \applymusic #(lambda (x) (music-map add-staccato x)) { c c }
}
- \paper{ raggedright = ##t }
+ \layout{ raggedright = ##t }
}
-\version "2.3.17"
+\version "2.3.22"
\header {
texidoc= "@cindex make-music Fingering
\score {
\applymusic #(lambda (x) (add-text-script x "6") (display-music x) x ) { c'4-3 }
- \paper{ raggedright = ##t }
+ \layout{ raggedright = ##t }
}
}
-\version "2.3.17"
+\version "2.3.22"
-\paper {
+\layout {
raggedright = ##t
}
"
}
-\version "2.3.17"
+\version "2.3.22"
\relative c'' {
\time 5/4
-\version "2.3.17"
+\version "2.3.22"
% TODO: split ancient-font into seperate files; possibly in
% different locations.
\header {
>>
>>
-\bookpaper {
+\paper {
linethickness = #(/ staffspace 5.0)
}
\upperStaff
\lowerStaff
>>
- \paper {
+ \layout {
% do we want to keep these settings? -gp
linewidth = 17.25\cm
textheight = 26.0\cm
-\version "2.3.17"
+\version "2.3.22"
% TODO: move stuff from ancient-font into here? See comment
% for ancient-font.ly
\header {
\override Staff.TimeSignature #'style = #'neomensural
s1
}
- \paper {raggedright = ##t}
+ \layout {raggedright = ##t}
}
-\version "2.3.17"
+\version "2.3.22"
\header {
texidoc = "@cindex Bars Always
\set Score.barAlways = ##t
\set Score.defaultBarType = ":|:"
c4 c4 c4 c4 }
- \paper{raggedright = ##t}
+ \layout{raggedright = ##t}
}
-\version "2.3.17"
+\version "2.3.22"
\header { texidoc = "@cindex Bar line lyric only
You can move @code{Bar_engraver} and @code{Span_bar_engraver} to
a different engraving context, if you want, for example, bar lines
>>
- \paper {
+ \layout {
raggedright = ##t
\context {
\Lyrics
-\version "2.3.17"
+\version "2.3.22"
\header {
}
-\paper { raggedright = ##t }
+\layout { raggedright = ##t }
\relative {
c4 \bar "|" \mark \markup { \simple #"|" }
-\version "2.3.17"
+\version "2.3.22"
\header {
texidoc = "@cindex Bar Number Every Fifth Reset
\bar "|."
}
>>
-\paper{raggedright = ##t}
+\layout{raggedright = ##t}
}
" }
-\version "2.3.18"
+\version "2.3.22"
\score {
\context Staff \transpose c c' {
-\version "2.3.17"
+\version "2.3.22"
\header{
texidoc="@cindex Bar Number Show All
By default, bar numbers are printed only in the first measure. This
\break
c c c
}
- \paper{ raggedright = ##t }
+ \layout{ raggedright = ##t }
}
}
-\version "2.3.17"
+\version "2.3.22"
wipeNote = {
\once \override NoteHead #'transparent = ##t
\once \override Stem #'transparent = ##t
}
-\paper { raggedright = ##t }
+\layout { raggedright = ##t }
\relative c''<< {
-\version "2.3.17"
+\version "2.3.22"
% keep for now, although merging into beam-auto-override is a possibility.
\header {
texidoc = "@cindex Auto Beaming 4/8
c8 c c c16 c
}
-\paper{raggedright = ##t}
+\layout{raggedright = ##t}
}
-\version "2.3.17"
+\version "2.3.22"
\header {
texidoc = "@cindex Auto Beaming Override
\set autoBeaming = ##f
c8 c c c
}
- \paper{raggedright = ##t}
+ \layout{raggedright = ##t}
}
-\version "2.3.17"
+\version "2.3.22"
\header{
texidoc="@cindex Beam Position Control
\override Beam #'positions = #'(0 . 1)
c[ c]
}
-\paper{raggedright = ##t}
+\layout{raggedright = ##t}
}
-\version "2.3.17"
+\version "2.3.22"
\header{
texidoc="@cindex Beam Count
" }
-\paper { raggedright = ##t}
+\layout { raggedright = ##t}
\relative {
#(override-auto-beam-setting '(end * * * *) 1 4)
-\version "2.3.18"
+\version "2.3.22"
\header {
texidoc = "@cindex Boxed Stencil
c4. c4 \mark "F" c1
}
-\paper{raggedright = ##t}
+\layout{raggedright = ##t}
}
-\version "2.3.17"
+\version "2.3.22"
\header {
texidoc = "@cindex Capital Letters
The font can be changed to small caps.
\context Lyrics \lyricmode {
what4 is4 \shapeSC The8 Ma -- trix? }
>>
- \paper { raggedright = ##t}
+ \layout { raggedright = ##t}
}
-\version "2.3.17"
+\version "2.3.22"
\header {
texidoc = "@cindex Chord Names German
The english naming of chords (default) can be changed to german
}
-\paper {
+\layout {
raggedright = ##t
\context {\ChordNames \consists Instrument_name_engraver }
}
-\version "2.3.17"
+\version "2.3.22"
\header {
texidoc = " Chord names are generated from a list pitches. The
\new Staff \transpose c c' { \chs }
>>
- \paper {
+ \layout {
indent = 3.\cm
\context {
\ChordNames
-\version "2.3.17"
+\version "2.3.22"
% Ugh, we need to override some LaTeX titling stuff
% ugf, must be here?
-\bookpaper {
+\paper {
indent=10.0\mm
linewidth=150.0\mm
}
\context Staff ="violoncello" \violoncello
>>
>>
- \paper {
+ \layout {
\context {
\RemoveEmptyStaffContext
}
}
}
% this is ignored?
- \bookpaper {
+ \paper {
indent=10.0\mm
linewidth=150.0\mm
}
" }
-\version "2.3.17"
+\version "2.3.22"
\include "gregorian-init.ly"
-\version "2.3.17"
+\version "2.3.22"
% probably should be merged into refman.
\header{
texidoc = "@cindex Dynamic Piu Forte
c2\< c2\!
}
-\paper{raggedright = ##t}
+\layout{raggedright = ##t}
}
-\version "2.3.17"
+\version "2.3.22"
\header {
texidoc = "@cindex Embedded Postscript
By inserting the @TeX{} command \embeddedps, you can
s2
a'1
}
- \paper { linewidth = 70 * 5 \pt
+ \layout { linewidth = 70 * 5 \pt
% raggedright = ##t
}
}
-\version "2.3.17"
+\version "2.3.22"
\header{ texidoc="@cindex Embedded Tex
You can embed Tex commands in your score. "}
-\paper { raggedright = ##t}
+\layout { raggedright = ##t}
-\paper {
+\layout {
raggedright = ##t
inputencoding = "TeX"
}
-\version "2.3.17"
+\version "2.3.22"
\header {
texidoc ="In polyphonic notation, many voices can share a staff: In
-\version "2.3.17"
+\version "2.3.22"
\header {
texidoc = "The notation problem, creating a certain symbol,
"
}
-\paper { raggedright = ##t }
+\layout { raggedright = ##t }
\include "engraver-example.lyinc"
\score {
\topVoice
- \paper {
+ \layout {
\context { \MyStaff }
\context { \MyVoice }
}
\score {
\topVoice
- \paper {
+ \layout {
\context { \MyStaff }
\context { \MyVoice }
}
\score {
\topVoice
- \paper {
+ \layout {
\context { \MyStaff }
\context { \MyVoice }
}
\score {
\topVoice
- \paper {
+ \layout {
\context { \MyStaff }
\context { \MyVoice }
}
\score {
\topVoice
- \paper {
+ \layout {
\context { \MyStaff }
\context { \MyVoice }
}
\score {
\topVoice
- \paper {
+ \layout {
\context { \MyStaff }
\context { \MyVoice }
}
\score {
\topVoice
- \paper {
+ \layout {
\context { \MyStaff }
\context { \MyVoice }
}
}
\score {
\topVoice
- \paper {
+ \layout {
\context { \MyStaff }
\context { \MyVoice }
}
-\version "2.3.17"
+\version "2.3.22"
% definitely wil be renamed to something.
%{
c
}
>>
- \paper {
+ \layout {
raggedright = ##t
\context{
\Score
texidoc = "Frets are supported as markup commands."
}
-\version "2.3.17"
+\version "2.3.22"
\score {
<<
g' ^\markup \override #'(dot-color . white) {\fret-diagram-terse #'"3 5;2 3 5;2 4 5;2 4 5;3 5;2 3;" }
}
>>
- \paper{ raggedright = ##t }
+ \layout{ raggedright = ##t }
}
-\version "2.3.17"
+\version "2.3.22"
\header {
texidoc = "@cindex Gregorian Scripts
\include "gregorian-init.ly"
-\bookpaper {
+\paper {
linethickness = \staffspace / 5.0
}
\[ a \episemInitium \pes b \flexa a \episemFinis \]
}
}
- \paper {
+ \layout {
linewidth = 70.0
width = 60.0
indent = 0.0
-\version "2.3.17"
+\version "2.3.22"
#(if (not (defined? 'pieceTagLine))
"
}
-\paper {raggedright=##t}
+\layout {raggedright=##t}
{ c'4 }
-\version "2.3.17"
+\version "2.3.22"
\header { texidoc = "
d2 a
}
>>
- \paper{
+ \layout{
linewidth=140.\mm
\context {
\Voice
-\version "2.3.17"
+\version "2.3.22"
\header { texidoc = "@cindex Instrument Name Grandstaff
You can have a name for the whole @code{GrandStaff} in addition to
individual @code{Staff}s. " }
\context Staff = bass { \set Staff.instrument = " vn II" c''4 }>>
-\paper {
+\layout {
raggedright = ##t
\context { \GrandStaff \consists "Instrument_name_engraver" }
}}
-\version "2.3.17"
+\version "2.3.22"
\header { texidoc = "@cindex Ancient Vaticana
Vaticana ligature uses four staff lines, special clef, and
Al- le- lu- ia.
}
-\bookpaper {
+\paper {
linethickness = \staffspace / 7.0
}
\cantus
\lyricsto "cantus" \verba
>>
- \paper {
+ \layout {
linewidth = 137.0 \mm
width = 137.0 \mm
indent = 0.0
-\version "2.3.17"
+\version "2.3.22"
% MERGE with title.ly -gp
%{
-\version "2.3.17"
+\version "2.3.22"
% TODO:
% check with ancient- stuff. rename, merge, something. -gp
\bar "||"
}
-\bookpaper {
+\paper {
linethickness = \staffspace / 5.0
}
\score {
>>
>>
>>
- \paper {
+ \layout {
\context {
\Voice
\name MensuralVoice
-\version "2.3.17"
+\version "2.3.22"
\header {
texidoc ="@cindex Ancient Mensural Note Heads
c\longa*1/4 c\breve*1/2 c1 c2 c4 c8
}
}
- \paper{raggedright=##t}
+ \layout{raggedright=##t}
}
-\version "2.3.17"
+\version "2.3.22"
% possible rename to scheme- or something like that. -gp
\header { texidoc = "@cindex Scheme Move Text
Objects, like text, can be moved around by using some Scheme code.
'extra-offset '(-3.5 . -4.5))
a^2^"m.d."
}
- \paper { raggedright = ##t}
+ \layout { raggedright = ##t}
}
-\version "2.3.17"
+\version "2.3.22"
\include "deutsch.ly"
% possible rename to scheme- something. -gp
% TODO: ask if it needs to have so many empty bars in the middle. -gp
-\version "2.3.17"
+\version "2.3.22"
pat = \transpose c c' \repeat unfold 2 {
<< { \context Staff=up {r8 e16 f g e f g } }
}
>>
- \paper {
+ \layout {
\context {
\PianoStaff
\override VerticalAlignment #'forced-distance = #10
-\version "2.3.17"
+\version "2.3.22"
% possible rename to scheme- something. -gp
\header { texidoc = "@cindex Scheme Music Creation
(make-note (list (make-note-req (ly:make-pitch 1 1 0) (ly:make-duration 2 0))))))
\score { \fooMusic
-\paper { raggedright = ##t }
+\layout { raggedright = ##t }
}
-\version "2.3.17"
+\version "2.3.22"
% possible rename to bar-lines-foo. -gp
\header{ texidoc = "@cindex Bar Lines Remove
a b c d
d c b a
}
- \paper {
+ \layout {
raggedright = ##t
\context {
\Staff
-\version "2.3.17"
+\version "2.3.22"
\header {
texidoc = "@cindex Key Signature End of Line
@code{RemoveEmptyStaffContext} take out the unused parts.
" }
-\version "2.3.17"
+\version "2.3.22"
\score {
\relative c''
>>
- \paper {
+ \layout {
raggedright= ##t
\context {\RemoveEmptyStaffContext}
\context {
-\version "2.3.17"
+\version "2.3.22"
% check with invisible-notes or blank-notes. possible rename. -gp
\header{ texidoc = "@cindex Partial Blank
When entering partially typeset music (i.e. for students to be
>>
\new Staff {\clef F s1*4}
>>
-\paper {}
+\layout {}
}
}
-\version "2.3.17"
+\version "2.3.22"
#(define ((futz-alignment-callback distance count) grob axis)
\skip 1 }
>>
- \paper { raggedright = ##T }
+ \layout { raggedright = ##T }
}
-\version "2.3.17"
+\version "2.3.22"
\header { texidoc = "
@cindex Preset Extent
\override LyricText #'X-extent = #'(-10.0 . 10.0)
bar baz
}
- \paper { raggedright = ##t}
+ \layout { raggedright = ##t}
}
-\version "2.3.17"
+\version "2.3.22"
\header {
texidoc = "@cindex Rests
"
}
-\paper {
+\layout {
indent = 0.0
raggedright = ##t
}
-\version "2.3.17"
+\version "2.3.22"
% possible rename to scheme-something.
\header { texidoc="@cindex Scheme Reverse Music
Symmetric, or palindromical music can be produced, first, by printing
\music
\applymusic #reverse-music \music
}
- \paper { raggedright = ##t}
+ \layout { raggedright = ##t}
}
% this chart is used in the manual too.
-\version "2.3.17"
+\version "2.3.22"
\header { texidoc = "@cindex Script Abbreviations
Some articulations may be entered using an abbreviation.
-\version "2.3.17"
+\version "2.3.22"
% this chart is used in the manual too.
coda__ varcoda__
}
>>
- \paper {
+ \layout {
linewidth = 5.1\in
indent = 0.0\mm
}
-\version "2.3.17"
+\version "2.3.22"
\header {texidoc = "@cindex Slur, dotted
The appearance of slurs may be changed from solid to dotted or dashed.
"
\slurSolid
c( d e c) |
}
- \paper{ raggedright=##t }
+ \layout{ raggedright=##t }
}
-\version "2.3.17"
+\version "2.3.22"
\header {
f' c as' f c'4)
}>>
>>
- \paper { }
+ \layout { }
}
-\version "2.3.17"
+\version "2.3.22"
\header { texidoc = "@cindex Slur Minimum Length
By setting the minimum length of a slur, notes are more separated. "
-\version "2.3.17"
+\version "2.3.22"
\header {
texidoc="@cindex Smart Transpose
\transpose c deses \music
\applymusic #naturalise \transpose c deses \music
}
- \paper { raggedright = ##t}
+ \layout { raggedright = ##t}
}
-\version "2.3.17"
+\version "2.3.22"
\header{ texidoc="@cindex Nested Staff Groups
Staffs can be nested in various combinations. Here, @code{StaffGroup}
>>
- \paper { raggedright = ##t}
+ \layout { raggedright = ##t}
}
-\version "2.3.17"
+\version "2.3.22"
\header {
}
>>
- \paper {
+ \layout {
\context {
\Score
\accepts StaffContainer
-\version "2.3.17"
+\version "2.3.22"
\header {
\lower
}
>>
- \paper { raggedright=##t}
+ \layout { raggedright=##t}
}
-\version "2.3.17"
+\version "2.3.22"
\header { texidoc = "@cindex Staff Size
}
-\paper { raggedright = ##t}
+\layout { raggedright = ##t}
\relative c' <<
% \new Staff \relative c'' { \dynamicDown c4 \ff c c c }
-\version "2.3.17"
+\version "2.3.22"
\header { texidoc = "@cindex Stem Extend
Extending stems to the center line may be prevented using @code{no-stem-extend}.
>>
}
- \paper { raggedright = ##t}
+ \layout { raggedright = ##t}
}
-\version "2.3.17"
+\version "2.3.22"
\header {texidoc = "@cindex Tablature hammer
A hammer in tablature can be faked with slurs. "
}
d(c)
}
>>
- \paper{ raggedright = ##t}
+ \layout{ raggedright = ##t}
}
-\version "2.3.17"
+\version "2.3.22"
\header {
c4 d e f |
}
}
- \paper {
+ \layout {
\context {
\Score
\consists Span_bar_engraver
}
-\version "2.3.17"
+\version "2.3.22"
\score {
\new Staff \relative c'' {
c4 c4 }
-\paper { raggedright = ##t }
+\layout { raggedright = ##t }
}
-\version "2.3.17"
+\version "2.3.22"
\header { texidoc = "@cindex text spanner
Text spanners can be used in the similar manner than markings for pedals
or octavation.
"
}
-\paper{ raggedright = ##t}
+\layout{ raggedright = ##t}
\relative c''{
\override TextSpanner #'edge-text = #'("bla" . "blu")
-\version "2.3.17"
+\version "2.3.22"
%{
Markup titles also available for direct PostScript output:
%}
-\paper{
+\layout{
#(define page-breaking ly:optimal-page-breaks)
%% Ughr, this breaks TeX output...
%% fonts = #(make-century-schoolbook-tree 1.0)
\context Staff \relative c' {
c2-\sizeTest c2-\spaceTest
}
- \paper {
+ \layout {
#(paper-set-staff-size (* 11.0 pt))
}
}
opus = "opus 1"
piece = "Second"
}
- \paper {
+ \layout {
}
}
}
-\version "2.3.17"
+\version "2.3.22"
\header {
-\version "2.3.17"
+\version "2.3.22"
% TODO: huh? what's this file about? -gp
\header { texidoc = "
g1
}
>>
- \paper{
+ \layout{
raggedright = ##t
}
}
#(ly:set-option 'old-relative)
-\version "2.3.16"
+\version "2.3.22"
\header{
filename = "twinkle-pop.ly"
xtitle = "Ah, vous dirais-je, maman "
\header{
title = "Ah, vous dirais-je, maman "
}
- \paper { }
+ \layout { }
}
\score {
\header{
piece = "clarinet in B$\flat$"
}
- \paper { }
+ \layout { }
}
-\version "2.3.18"
+\version "2.3.22"
\header {
texidoc = "Wilhelmus van Nassouwe"
myBreak = { \bar "" \break }
-\paper {
+\layout {
indent = 0.0\mm
linewidth = 120.0\mm
textheight = 270.0\mm
\column < { \number "1" } { \smaller \smaller \note #"2" #-0.5 } >
}
-\paper {
+\layout {
raggedright = ##t
\context {
\text
}
>>
- \paper {}
+ \layout {}
\midi {}
}
(ly_symbol2scm ("font-size"),
scm_int2num (-2))),
ac);
- fm = select_font (me->get_paper (), ac);
+ fm = select_font (me->get_layout (), ac);
}
else
fm = Font_interface::get_default_font (me);
if (pmin < pmax)
{
- Real linethickness = me->get_paper ()->get_dimension (ly_symbol2scm ("linethickness"))
+ Real linethickness = me->get_layout ()->get_dimension (ly_symbol2scm ("linethickness"))
* robust_scm2double (me->get_property ("thickness"), 1.0);
- Real blotdiameter = me->get_paper ()->get_dimension (ly_symbol2scm ("blotdiameter"));
+ Real blotdiameter = me->get_layout ()->get_dimension (ly_symbol2scm ("blotdiameter"));
Interval x_extent = 0.5 * linethickness *Interval (-1,1);
Interval y_extent = Interval (pmin, pmax);
Box line_box (x_extent, y_extent);
heads.unite (iv + ss->relative_coordinate (common, Y_AXIS) - my_y);
}
- Real lt = me->get_paper ()->get_dimension (ly_symbol2scm ("linethickness"));
+ Real lt = me->get_layout ()->get_dimension (ly_symbol2scm ("linethickness"));
Real sp = 1.5 * Staff_symbol_referencer::staff_space (me);
Real dy = heads.length () + sp;
Real x = 0.7;
SCM chain = Font_interface::text_font_alist_chain (me);
chain = scm_cons (me->get_property ("balloon-text-props"), chain);
- SCM text = Text_interface::interpret_markup (me->get_paper ()->self_scm (),
+ SCM text = Text_interface::interpret_markup (me->get_layout ()->self_scm (),
chain, bt);
Stencil *text_stil = unsmob_stencil (text);
Real hair = robust_scm2double (me->get_property ("hair-thickness"), 1);
Real fatline = robust_scm2double (me->get_property ("thick-thickness"), 1);
- Real staffline = me->get_paper ()->get_dimension (ly_symbol2scm ("linethickness"));
+ Real staffline = me->get_layout ()->get_dimension (ly_symbol2scm ("linethickness"));
Real staff_space = Staff_symbol_referencer::staff_space (me);
kern *= staffline;
Real w,
Real h)
{
- Real blot = me->get_paper ()->get_dimension (ly_symbol2scm ("blotdiameter"));
+ Real blot = me->get_layout ()->get_dimension (ly_symbol2scm ("blotdiameter"));
return Lookup::round_filled_box (Box (Interval (0,w), Interval (-h/2, h/2)), blot);
}
#if DEBUG_QUANTING
SCM inspect_quants = me->get_property ("inspect-quants");
- if (to_boolean (me->get_paper ()->lookup_variable (ly_symbol2scm ("debug-beam-quanting")))
+ if (to_boolean (me->get_layout ()->lookup_variable (ly_symbol2scm ("debug-beam-quanting")))
&& scm_is_pair (inspect_quants))
{
Drul_array<Real> ins = ly_scm2interval (inspect_quants);
ly_interval2scm (Drul_array<Real> (qscores[best_idx].yl,
qscores[best_idx].yr)));
#if DEBUG_QUANTING
- if (to_boolean (me->get_paper ()->lookup_variable (ly_symbol2scm ("debug-beam-quanting"))))
+ if (to_boolean (me->get_layout ()->lookup_variable (ly_symbol2scm ("debug-beam-quanting"))))
{
qscores[best_idx].score_card_ += to_string ("i%d", best_idx);
Real gap_length = robust_scm2double (me->get_property ("gap"), 0.0);
Stencil the_beam;
- Real lt = me->get_paper ()->get_dimension (ly_symbol2scm ("linethickness"));
+ Real lt = me->get_layout ()->get_dimension (ly_symbol2scm ("linethickness"));
for (int i = 0; i<= stems.size (); i++)
{
w += stem_width/ 2 ;
- Real blot = me->get_paper ()->get_dimension (ly_symbol2scm ("blotdiameter"));
+ Real blot = me->get_layout ()->get_dimension (ly_symbol2scm ("blotdiameter"));
Stencil whole = Lookup::beam (slope, w, thick, blot);
Stencil gapped;
#if (DEBUG_QUANTING)
SCM quant_score = me->get_property ("quant-score");
- if (to_boolean (me->get_paper ()->lookup_variable (ly_symbol2scm ("debug-beam-quanting")))
+ if (to_boolean (me->get_layout ()->lookup_variable (ly_symbol2scm ("debug-beam-quanting")))
&& scm_is_string (quant_score))
{
Direction stem_dir = stems.size() ? to_dir (stems[0]->get_property ("direction")) : UP;
Stencil tm = *unsmob_stencil (Text_interface::interpret_markup
- (me->get_paper ()->self_scm (), properties, quant_score));
+ (me->get_layout ()->self_scm (), properties, quant_score));
the_beam.add_at_edge (Y_AXIS, stem_dir, tm, 1.0, 0);
}
#endif
Although this might seem cand_idates to SCM-ify, it is not all clear
which parameters (ie. h_inf, r_0, F (.)) should be candidates for
- this. At present h_inf and r_0 come from paper settings, but we did
+ this. At present h_inf and r_0 come from layout settings, but we did
no experiments for determining the best combinations of F, h_inf and
r_0.
+++ /dev/null
-/*
- book-paper-def.cc -- implement Output_def
-
- source file of the GNU LilyPond music typesetter
-
- (c) 2004 Han-Wen Nienhuys <hanwen@xs4all.nl>
-*/
-
-#include "dimensions.hh"
-#include "font-metric.hh"
-#include "ly-module.hh"
-#include "output-def.hh"
-#include "modified-font-metric.hh"
-#include "virtual-font-metric.hh"
-
-Real
-output_scale (Output_def *od)
-{
- return scm_to_double (od->lookup_variable (ly_symbol2scm ("outputscale")));
-}
-
-/* TODO: should add nesting for Output_def here too. */
-Font_metric *
-find_scaled_font (Output_def *mod,
- Font_metric *f, Real m, SCM input_enc_name)
-{
- if (mod->parent_)
- return find_scaled_font (mod->parent_, f, m, input_enc_name);
-
- Real lookup_mag = m;
- if (!dynamic_cast<Virtual_font_metric*> (f))
- lookup_mag /= output_scale (mod);
-
- SCM font_table = mod->lookup_variable (ly_symbol2scm ("scaled-fonts"));
- if (scm_hash_table_p (font_table) != SCM_BOOL_T)
- {
- font_table = scm_c_make_hash_table (11);
- mod->set_variable (ly_symbol2scm ("scaled-fonts"), font_table);
- }
-
- SCM sizes = scm_hashq_ref (font_table, f->self_scm (), SCM_BOOL_F);
- if (sizes != SCM_BOOL_F)
- {
- SCM met = scm_assoc (scm_make_real (lookup_mag), sizes);
- if (scm_is_pair (met))
- return unsmob_metrics (scm_cdr (met));
- }
- else
- sizes = SCM_EOL;
-
- /* Hmm. We're chaining font - metrics. Should consider whether to
- merge virtual-font and scaled_font. */
- SCM val = SCM_EOL;
- if (Virtual_font_metric * vf = dynamic_cast<Virtual_font_metric*> (f))
- {
- /* For fontify_atom (), the magnification and name must be known
- at the same time. That's impossible for
-
- Scaled (Virtual_font (Font1,Font2))
-
- so we replace by
-
- Virtual_font (Scaled (Font1), Scaled (Font2)) */
- SCM lst = SCM_EOL;
- SCM *t = &lst;
- for (SCM s = vf->get_font_list (); scm_is_pair (s); s = scm_cdr (s))
- {
- Font_metric *scaled = find_scaled_font (mod,
- unsmob_metrics (scm_car (s)),
- m, input_enc_name);
- *t = scm_cons (scaled->self_scm (), SCM_EOL);
- t = SCM_CDRLOC (*t);
- }
-
- vf = new Virtual_font_metric (lst);
- val = vf->self_scm ();
- }
- else
- {
- val = Modified_font_metric::make_scaled_font_metric (input_enc_name,
- f, lookup_mag);
- }
-
- sizes = scm_acons (scm_make_real (lookup_mag), val, sizes);
- scm_gc_unprotect_object (val);
- scm_hashq_set_x (font_table, f->self_scm (), sizes);
- return unsmob_metrics (val);
-}
-
-/* TODO: this is a nasty interface. During formatting,
- the Output_def should be scaled to the output_scale_
- specified in the toplevel Output_def. */
-Output_def *
-scale_output_def (Output_def *o, Real amount)
-{
- SCM proc = ly_scheme_function ("scale-paper");
- SCM new_pap = scm_call_2 (proc, o->self_scm (), scm_double2num (amount));
- scm_gc_protect_object (new_pap);
-
- return unsmob_output_def (new_pap);
-}
-
-LY_DEFINE (ly_bookpaper_fonts, "ly:bookpaper-fonts",
- 1, 0, 0,
- (SCM bp),
- "Return fonts scaled up BP")
-{
- Output_def *b = unsmob_output_def (bp);
-
- SCM font_table = b->lookup_variable (ly_symbol2scm ("scaled-fonts"));
-
- SCM_ASSERT_TYPE (b, bp, SCM_ARG1, __FUNCTION__, "bookpaper");
-
- SCM ell = SCM_EOL;
- if (scm_hash_table_p (font_table) == SCM_BOOL_T)
- {
- SCM func = ly_scheme_function ("hash-table->alist");
-
- for (SCM s = scm_call_1 (func, font_table); scm_is_pair (s);
- s = scm_cdr (s))
- {
- SCM entry = scm_car (s);
- for (SCM t = scm_cdr (entry); scm_is_pair (t); t = scm_cdr (t))
- {
- Font_metric *fm = unsmob_metrics (scm_cdar (t));
-
- if (dynamic_cast<Modified_font_metric*> (fm))
- ell = scm_cons (fm->self_scm (), ell);
- }
- }
- }
- return ell;
-}
Book::Book ()
: Input ()
{
- bookpaper_ = 0;
+ paper_ = 0;
header_ = SCM_EOL;
assert (!scores_.size ());
smobify_self ();
for (int i = 0; i < score_count; i++)
scm_gc_mark (book->scores_[i]->self_scm ());
- if (book->bookpaper_)
- scm_gc_mark (book->bookpaper_->self_scm ());
+ if (book->paper_)
+ scm_gc_mark (book->paper_->self_scm ());
return book->header_;
}
return 0;
Paper_book *paper_book = new Paper_book ();
- Real scale = scm_to_double (bookpaper_->c_variable ("outputscale"));
+ Real scale = scm_to_double (paper_->c_variable ("outputscale"));
- Output_def * scaled_bookdef = scale_output_def (bookpaper_, scale);
+ Output_def * scaled_bookdef = scale_output_def (paper_, scale);
- paper_book->bookpaper_ = scaled_bookdef;
+ paper_book->paper_ = scaled_bookdef;
scm_gc_unprotect_object (scaled_bookdef->self_scm());
paper_book->header_ = header_;
for (int i = 0; i < score_count; i++)
{
SCM systems = scores_[i]->book_rendering (outname,
- paper_book->bookpaper_,
+ paper_book->paper_,
default_def);
/* If the score is empty, generate no output. Should we
}
LY_DEFINE(ly_make_book, "ly:make-book",
- 2, 0, 1, (SCM bookpaper, SCM header, SCM scores),
- "Make a \\book of @var{bookpaper} and @var{header} (which may be #f as well) "
+ 2, 0, 1, (SCM paper, SCM header, SCM scores),
+ "Make a \\book of @var{paper} and @var{header} (which may be #f as well) "
"containing @code{\\scores}.")
{
- Output_def * odef = unsmob_output_def (bookpaper);
- SCM_ASSERT_TYPE (odef, bookpaper,
+ Output_def * odef = unsmob_output_def (paper);
+ SCM_ASSERT_TYPE (odef, paper,
SCM_ARG1, __FUNCTION__, "Output_def");
Book *book = new Book;
- book->bookpaper_ = odef;
+ book->paper_ = odef;
if (ly_c_module_p (header))
book->header_ = header;
if (Item::is_breakable (all[i]))
retval.push (i);
- if (linewidth_ <=0)
- while (retval.size () >2)
+ if (linewidth_ <= 0)
+ while (retval.size () > 2)
retval.del (1);
return retval;
if (Item::is_breakable (all[i]))
retval.push (all[i]);
- if (linewidth_ <=0)
+ if (linewidth_ <= 0)
while (retval.size () >2)
retval.del (1);
Break_algorithm::set_pscore (Paper_score*s)
{
pscore_ = s;
- linewidth_ = s->paper_->get_dimension (ly_symbol2scm ("linewidth"));
+ linewidth_ = s->layout_->get_dimension (ly_symbol2scm ("linewidth"));
}
Array<Column_x_positions>
else
staff_size = 0.0;
- Real blotdiameter = me->get_paper ()->get_dimension (ly_symbol2scm ("blotdiameter"));
+ Real blotdiameter = me->get_layout ()->get_dimension (ly_symbol2scm ("blotdiameter"));
/*
* Draw a small vertical line through the uppermost (or, depending
else
staff_size = 0.0;
- Real blotdiameter = me->get_paper ()->get_dimension (ly_symbol2scm ("blotdiameter"));
+ Real blotdiameter = me->get_layout ()->get_dimension (ly_symbol2scm ("blotdiameter"));
/*
* Draw a vertical line that is vertically centered in the staff
else
staff_size = 0.0;
- Real blotdiameter = me->get_paper ()->get_dimension (ly_symbol2scm ("blotdiameter"));
+ Real blotdiameter = me->get_layout ()->get_dimension (ly_symbol2scm ("blotdiameter"));
// like a "|" type bar
Interval xdim (0, thickness);
else
staff_size = 0.0;
- Real blotdiameter = me->get_paper ()->get_dimension (ly_symbol2scm ("blotdiameter"));
+ Real blotdiameter = me->get_layout ()->get_dimension (ly_symbol2scm ("blotdiameter"));
// like a "||" type bar
Interval xdim (0, thickness);
Spanner *spanner = dynamic_cast<Spanner*> (me);
Grob *common = spanner->get_bound (LEFT)->common_refpoint (spanner->get_bound (RIGHT), X_AXIS);
- Output_def * paper = me->get_paper ();
+ Output_def * layout = me->get_layout ();
Interval span_points;
Drul_array<bool> broken;
SCM text = index_get_cell (edge_text, d);
if (Text_interface::markup_p (text))
- edge[d] = *unsmob_stencil (Text_interface::interpret_markup (paper->self_scm (), properties, text));
+ edge[d] = *unsmob_stencil (Text_interface::interpret_markup (layout->self_scm (), properties, text));
if (!edge[d].is_empty ())
edge[d].align_to (Y_AXIS, CENTER);
{
SCM chain = music_font_alist_chain (me);
- fm = select_font (me->get_paper (), chain);
+ fm = select_font (me->get_layout (), chain);
me->set_property ("font", fm->self_scm ());
}
Font_interface::music_font_alist_chain (Grob *g)
{
SCM defaults
- = g->get_paper ()->lookup_variable (ly_symbol2scm ("font-defaults"));
+ = g->get_layout ()->lookup_variable (ly_symbol2scm ("font-defaults"));
return g->get_property_alist_chain (defaults);
}
Font_interface::text_font_alist_chain (Grob *g)
{
SCM defaults
- = g->get_paper ()->lookup_variable (ly_symbol2scm ("text-font-defaults"));
+ = g->get_layout ()->lookup_variable (ly_symbol2scm ("text-font-defaults"));
return g->get_property_alist_chain (defaults);
}
}
LY_DEFINE (ly_paper_get_number, "ly:paper-get-number", 2, 0, 0,
- (SCM paper_smob, SCM name),
- "Return the paper variable @var{name}.")
+ (SCM layout_smob, SCM name),
+ "Return the layout variable @var{name}.")
{
- Output_def *paper = unsmob_output_def (paper_smob);
- SCM_ASSERT_TYPE (paper, paper_smob, SCM_ARG1,
- __FUNCTION__, "paper definition");
- return scm_make_real (paper->get_dimension (name));
+ Output_def *layout = unsmob_output_def (layout_smob);
+ SCM_ASSERT_TYPE (layout, layout_smob, SCM_ARG1,
+ __FUNCTION__, "layout definition");
+ return scm_make_real (layout->get_dimension (name));
}
bool
design size is specced in advance.
*/
Font_metric *
-get_font_by_design_size (Output_def *paper, Real requested,
+get_font_by_design_size (Output_def *layout, Real requested,
SCM font_vector, SCM input_encoding)
{
int n = SCM_VECTOR_LENGTH (font_vector);
Font_metric *fm = unsmob_metrics (scm_force (SCM_VECTOR_REF (font_vector,
i)));
- return find_scaled_font (paper, fm, requested / size, input_encoding);
+ return find_scaled_font (layout, fm, requested / size, input_encoding);
}
Font_metric*
-get_font_by_mag_step (Output_def *paper, Real requested_step,
+get_font_by_mag_step (Output_def *layout, Real requested_step,
SCM font_vector, Real default_size,
SCM input_encoding)
{
- return get_font_by_design_size (paper, default_size
+ return get_font_by_design_size (layout, default_size
* pow (2.0, requested_step / 6.0),
font_vector, input_encoding);
}
}
Font_metric *
-select_encoded_font (Output_def *paper, SCM chain, SCM input_encoding)
+select_encoded_font (Output_def *layout, SCM chain, SCM input_encoding)
{
SCM name = ly_assoc_chain (ly_symbol2scm ("font-name"), chain);
if (!scm_is_pair (name) || !scm_is_string (scm_cdr (name)))
{
- SCM fonts = paper->lookup_variable (ly_symbol2scm ("fonts"));
+ SCM fonts = layout->lookup_variable (ly_symbol2scm ("fonts"));
name = properties_to_font_size_family (fonts, chain);
}
else
: 1);
Font_metric *fm = all_fonts_global->find_font (ly_scm2string (name));
- return find_scaled_font (paper, fm, rmag, input_encoding);
+ return find_scaled_font (layout, fm, rmag, input_encoding);
}
else if (scm_instance_p (name))
{
if (scm_is_pair (font_size))
req = scm_to_double (scm_cdr (font_size));
- return get_font_by_mag_step (paper, req, vec, scm_to_double (base_size),
+ return get_font_by_mag_step (layout, req, vec, scm_to_double (base_size),
input_encoding);
}
}
Font_metric *
-select_font (Output_def *paper, SCM chain)
+select_font (Output_def *layout, SCM chain)
{
- return select_encoded_font (paper, chain, SCM_EOL);
+ return select_encoded_font (layout, chain, SCM_EOL);
}
Break_node first_node ;
optimal_paths.push (first_node);
- bool ragged_right = to_boolean (pscore_->paper_->c_variable ("raggedright"));
- bool ragged_last = to_boolean (pscore_->paper_->c_variable ("raggedlast"));
+ bool ragged_right = to_boolean (pscore_->layout_->c_variable ("raggedright"));
+ bool ragged_last = to_boolean (pscore_->layout_->c_variable ("raggedlast"));
Real worst_force = 0.0;
for (int break_idx = 1; break_idx< breaks.size (); break_idx++)
cp.cols_ = line;
Interval line_dims
- = line_dimensions_int (pscore_->paper_, optimal_paths[start_idx].line_);
+ = line_dimensions_int (pscore_->layout_, optimal_paths[start_idx].line_);
Simple_spacer_wrapper * sp = generate_spacing_problem (line, line_dims);
bool last_line = break_idx == breaks.size ()-1;
bool ragged = ragged_right
/* TODO: make difference between scaled and unscalead variable in
calling (i.e different funcs.) */
-LY_DEFINE (ly_grob_paper, "ly:grob-paper",
+LY_DEFINE (ly_grob_layout, "ly:grob-layout",
1, 0, 0, (SCM g),
- "Get @code{\\paper} definition from grob @var{g}.")
+ "Get @code{\\layout} definition from grob @var{g}.")
{
Grob * sc = unsmob_grob (g);
SCM_ASSERT_TYPE (sc, g, SCM_ARG1, __FUNCTION__, "grob");
- return sc->get_paper ()->self_scm ();
+ return sc->get_layout ()->self_scm ();
}
LY_DEFINE (ly_grob_alist_chain, "ly:grob-alist-chain",
1, 1, 0, (SCM g, SCM global),
"Get an alist chain for grob @var{g}, with @var{global} as the "
"global default. If unspecified, @code{font-defaults} "
- "from the paper block is taken. ")
+ "from the layout block is taken. ")
{
Grob *sc = unsmob_grob (g);
SCM_ASSERT_TYPE (sc, g, SCM_ARG1, __FUNCTION__, "grob");
if (global == SCM_UNDEFINED)
global
- = sc->get_paper ()->lookup_variable (ly_symbol2scm ("font-defaults"));
+ = sc->get_layout ()->lookup_variable (ly_symbol2scm ("font-defaults"));
return sc->get_property_alist_chain (global);
}
}
Output_def *
-Grob::get_paper () const
+Grob::get_layout () const
{
- return pscore_ ? pscore_->paper_ : 0;
+ return pscore_ ? pscore_->layout_ : 0;
}
public:
SCM header_;
- Output_def *bookpaper_;
+ Output_def *paper_;
Link_array<Score> scores_;
Book ();
void warning (String) const;
void programming_error (String) const;
- Output_def *get_paper () const;
+ Output_def *get_layout () const;
void add_dependency (Grob*);
virtual System *get_system () const;
Lily_parser (Sources *sources);
Lily_parser (Lily_parser const&);
- DECLARE_SCHEME_CALLBACK (paper_description, ());
+ DECLARE_SCHEME_CALLBACK (layout_description, ());
Input here_input () const;
Input pop_spot ();
SCM ly_parser_bookify (SCM, SCM);
SCM ly_parser_scorify (SCM, SCM);
-Output_def *get_paper (Lily_parser *parser);
+Output_def *get_layout (Lily_parser *parser);
Output_def *get_midi (Lily_parser *parser);
-Output_def *get_bookpaper (Lily_parser *parser);
+Output_def *get_paper (Lily_parser *parser);
#endif /* MY_LILY_PARSER_HH */
class Paper_column;
class Paper_outputter;
class Paper_score;
-class Paper_stream;
class Paper_system;
class Performance;
class Performer;
/* options */
extern Array<String> dump_header_fieldnames_global;
-extern bool no_paper_global_b;
+extern bool no_layout_global_b;
extern String output_format_global;
extern String output_name_global;
extern bool safe_global_b;
#include "font-metric.hh"
-/* Perhaps junk this, and move this to paper_def as interface? */
+/* Perhaps junk this, and move this to layout_def as interface? */
struct Modified_font_metric : public Font_metric
{
public:
This devolved into a rather empty class. The distinction between
various instances is made in the parser, which creates
- midi/paper/bookpaper blocks depending on the keyword read.
+ midi/layout/paper blocks depending on the keyword read.
The data structure is set up as recursive: the definitions not
- supplied in paper are looked up in bookpaper. This is done through
+ supplied in layout are looked up in paper. This is done through
the parent_ field of Output_def. However, such nesting is limited to
two levels,
of output block.
* Second, because the prime benefit of multiple levels
- (eg. bookpaper containing paper for a score, containing paper of a
+ (eg. paper containing layout for a score, containing layout of a
\score embedded in \markup) requires scaling the Stencils (eg. the
one coming from score at markup level)
Interval line_dimensions_int (Output_def*def, int);
-Font_metric *select_encoded_font (Output_def *paper, SCM input_encoding, SCM chain);
-Font_metric *select_font (Output_def *paper, SCM chain);
+Font_metric *select_encoded_font (Output_def *layout, SCM input_encoding, SCM chain);
+Font_metric *select_font (Output_def *layout, SCM chain);
DECLARE_UNSMOB (Output_def, output_def);
public:
SCM header_;
Array<Score_systems> score_systems_;
- Output_def *bookpaper_;
+ Output_def *paper_;
Paper_book ();
#include "lily-guile.hh"
#include "protected-scm.hh"
-/* PAPER output */
+/* LAYOUT output */
class Paper_score : public Music_output
{
public:
- Output_def *paper_;
+ Output_def *layout_;
System *system_;
Paper_score ();
* Mensural_ligature_engraver) to the proper translator
* (e.g. VoiceContext) to choose between various representations.
* Since adding/removing an engraver to a translator is a global
- * action in the paper block, you can not mix various representations
+ * action in the layout block, you can not mix various representations
* _within_ the same score. Hence, for selecting a representation,
* one would rather like to have a property that can be set e.g. for
* several staves individually. However, it seems that this approach
{"alternative", ALTERNATIVE},
{"bar", BAR},
{"book", BOOK},
- {"bookpaper", BOOKPAPER},
{"change", CHANGE},
{"chords", CHORDS},
{"chordmode", CHORDMODE},
{"grobdescriptions", GROBDESCRIPTIONS},
{"header", HEADER},
{"key", KEY},
+ {"layout", LAYOUT},
{"lyricmode", LYRICMODE},
{"lyricsto", LYRICSTO},
{"lyrics", LYRICS},
}
Output_def*
-get_paper (Lily_parser *parser)
+get_layout (Lily_parser *parser)
{
- SCM id = parser->lexer_->lookup_identifier ("$defaultpaper");
- Output_def *paper = unsmob_output_def (id);
- paper = paper ? paper->clone () : new Output_def;
- paper->set_variable (ly_symbol2scm ("is-paper"), SCM_BOOL_T);
+ SCM id = parser->lexer_->lookup_identifier ("$defaultlayout");
+ Output_def *layout = unsmob_output_def (id);
+ layout = layout ? layout->clone () : new Output_def;
+ layout->set_variable (ly_symbol2scm ("is-layout"), SCM_BOOL_T);
- return paper;
+ return layout;
}
get_midi (Lily_parser *parser)
{
SCM id = parser->lexer_->lookup_identifier ("$defaultmidi");
- Output_def *paper = unsmob_output_def (id);
- paper = paper ? paper->clone () : new Output_def;
- paper->set_variable (ly_symbol2scm ("is-midi"), SCM_BOOL_T);
- return paper;
+ Output_def *layout = unsmob_output_def (id);
+ layout = layout ? layout->clone () : new Output_def;
+ layout->set_variable (ly_symbol2scm ("is-midi"), SCM_BOOL_T);
+ return layout;
}
Output_def*
-get_bookpaper (Lily_parser *parser)
+get_paper (Lily_parser *parser)
{
- SCM id = parser->lexer_->lookup_identifier ("$defaultbookpaper");
- Output_def *paper = unsmob_output_def (id);
+ SCM id = parser->lexer_->lookup_identifier ("$defaultpaper");
+ Output_def *layout = unsmob_output_def (id);
- paper = paper ? dynamic_cast<Output_def*> (paper->clone ()) : new Output_def;
- paper->set_variable (ly_symbol2scm ("is-bookpaper"), SCM_BOOL_T);
- return paper;
+ layout = layout ? dynamic_cast<Output_def*> (layout->clone ()) : new Output_def;
+ layout->set_variable (ly_symbol2scm ("is-paper"), SCM_BOOL_T);
+ return layout;
}
(*c)++;
SCM os = scm_makfrom0str (outname.to_string ().to_str0 ());
- SCM bookpaper = get_bookpaper (parser)->self_scm ();
+ SCM paper = get_paper (parser)->self_scm ();
for (int i = 0; i < score->defs_.size (); i++)
default_rendering (score->get_music (), score->defs_[i]->self_scm (),
- bookpaper,
+ paper,
header, os);
if (score->defs_.is_empty ())
{
- Output_def *paper = get_paper (parser);
- default_rendering (score->get_music(), paper->self_scm (),
- get_bookpaper (parser)->self_scm (),
+ Output_def *layout = get_layout (parser);
+ default_rendering (score->get_music(), layout->self_scm (),
+ get_paper (parser)->self_scm (),
header, os);
- scm_gc_unprotect_object (paper->self_scm ());
+ scm_gc_unprotect_object (layout->self_scm ());
}
return SCM_UNSPECIFIED;
}
{
Lily_parser *parser = unsmob_my_lily_parser (parser_smob);
Book *book = unsmob_book (book_smob);
- Output_def *bp = unsmob_output_def (parser->lexer_->lookup_identifier ("$defaultbookpaper"));
+ Output_def *bp = unsmob_output_def (parser->lexer_->lookup_identifier ("$defaultpaper"));
SCM_ASSERT_TYPE (parser, parser_smob, SCM_ARG1, __FUNCTION__, "Lilypond parser");
SCM_ASSERT_TYPE (book, book_smob, SCM_ARG2, __FUNCTION__, "Book");
/* ugh. changing argument.*/
- book->bookpaper_ = bp;
+ book->paper_ = bp;
File_name outname (parser->output_basename_);
int *c = &parser->book_count_;
outname.base_ += "-" + to_string (*c);
(*c)++;
- Output_def *paper = get_paper (parser);
+ Output_def *layout = get_layout (parser);
- Paper_book* pb = book->process (outname.to_string (), paper);
+ Paper_book* pb = book->process (outname.to_string (), layout);
if (pb)
{
pb->output (outname.to_string ());
scm_gc_unprotect_object (pb->self_scm ());
}
- scm_gc_unprotect_object (paper->self_scm ());
+ scm_gc_unprotect_object (layout->self_scm ());
return SCM_UNSPECIFIED;
}
ly_symbol2scm ("fetaMusic")),
SCM_UNDEFINED);
- Font_metric *fm = select_font (me->get_paper (),
+ Font_metric *fm = select_font (me->get_layout (),
scm_cons (style_alist,
alist_chain));
Stencil m = fm->find_by_name ("scripts-trill-element");
common = common->common_refpoint (right_text, X_AXIS);
common = common->common_refpoint (me->get_bound (RIGHT), X_AXIS);
- Real sl = me->get_paper ()->get_dimension (ly_symbol2scm ("linethickness"));
+ Real sl = me->get_layout ()->get_dimension (ly_symbol2scm ("linethickness"));
Link_array<Grob> heads (Pointer_group_interface__extract_grobs (me, (Grob*)0,
"heads"));
}
while (flip (&d) != LEFT);
- Real lt = me->get_paper ()->get_dimension (ly_symbol2scm ("linethickness"));
+ Real lt = me->get_layout ()->get_dimension (ly_symbol2scm ("linethickness"));
Real th = robust_scm2double (me->get_property ("thickness"), 1) * lt ;
Real h = robust_scm2double (me->get_property ("height"), 0.5);
/* Name of initialisation file. */
String init_name_global;
-/* Do not calculate and write paper output? */
-bool no_paper_global_b = false;
+/* Do not calculate and write layout output? */
+bool no_layout_global_b = false;
/* Selected output format.
One of tex, ps, scm, as. */
{_i ("FIELD"), "header", 'H', _i ("write header field to BASENAME.FIELD")},
{_i ("DIR"), "include", 'I', _i ("add DIR to search path")},
{_i ("FILE"), "init", 'i', _i ("use FILE as init file")},
- {0, "no-paper", 'm', _i ("produce MIDI output only")},
+ {0, "no-layout", 'm', _i ("produce MIDI output only")},
{_i ("FILE"), "output", 'o', _i ("write output to FILE")},
{0, "preview", 'p', _i ("generate a preview")},
{0, "png", 0, _i ("generate PNG")},
safe_global_b = true;
break;
case 'm':
- no_paper_global_b = true;
+ no_layout_global_b = true;
break;
case 'p':
make_preview = true;
Rational where (0);
for (SCM s = grouping; scm_is_pair (s);
- where += Rational (scm_to_int (scm_car (s))) * bl,
+ where += Rational ((int) scm_to_int (scm_car (s))) * bl,
s = scm_cdr (s)
)
{
Array<Grob_info> primitives)
{
Real thickness = robust_scm2double (ligature->get_property ("thickness"), 1.4);
- thickness *= ligature->get_paper ()->get_dimension (ly_symbol2scm ("linethickness"));
+ thickness *= ligature->get_layout ()->get_dimension (ly_symbol2scm ("linethickness"));
Real head_width =
Font_interface::get_default_font (ligature)->
int join_left = scm_to_int (join_left_scm);
if (!join_left)
programming_error (_f ("Mensural_ligature: (join_left == 0)"));
- Real blotdiameter = (me->get_paper ()->get_dimension (ly_symbol2scm ("blotdiameter")));
+ Real blotdiameter = (me->get_layout ()->get_dimension (ly_symbol2scm ("blotdiameter")));
Interval x_extent = Interval (0, thickness);
Interval y_extent = (join_left > 0) ?
Interval (-join_left * 0.5 * staff_space, 0) :
Real staff_space = Staff_symbol_referencer::staff_space (me);
Font_metric *musfont
- = select_font (me->get_paper (), alist_chain);
+ = select_font (me->get_layout (), alist_chain);
SCM sml = me->get_property ("use-breve-rest");
if (measures == 1)
Real ss = Staff_symbol_referencer::staff_space (me);
- Real slt = me->get_paper ()->get_dimension (ly_symbol2scm ("linethickness"));
+ Real slt = me->get_layout ()->get_dimension (ly_symbol2scm ("linethickness"));
Real y = slt * thick_thick/2 * ss;
Real ythick = hair_thick * slt * ss;
Box b (Interval (0, 0 >? (width - 2 * ythick)), Interval (-y, y));
Interval span_points;
Grob *common = me->get_bound (LEFT)->common_refpoint (me->get_bound (RIGHT), X_AXIS);
- Output_def * paper = me->get_paper ();
+ Output_def * layout = me->get_layout ();
Drul_array<bool> broken;
Direction d = LEFT;
SCM markup = me->get_property ("text");
Stencil text;
if (Text_interface::markup_p (markup))
- text = *unsmob_stencil (Text_interface::interpret_markup (paper->self_scm (), properties, markup));
+ text = *unsmob_stencil (Text_interface::interpret_markup (layout->self_scm (), properties, markup));
Drul_array<Real> shorten = robust_scm2interval (me->get_property ("shorten-pair"),
Output_def *mo = (Output_def*) SCM_CELL_WORD_1 (m);
/* FIXME: why is this necessary?
- all bookpaper_ should be protected by themselves. */
+ all paper_ should be protected by themselves. */
if (mo->parent_)
scm_gc_mark (mo->parent_->self_scm ());
scm_module_define (scope_, sym, val);
}
-LY_DEFINE (ly_paper_lookup, "ly:output-def-lookup",
+LY_DEFINE (ly_layout_lookup, "ly:output-def-lookup",
2, 0, 0, (SCM pap, SCM sym),
"Lookup @var{sym} in @var{pap}. "
"Return the value or @code{'()} if undefined.")
}
/* FIXME. This is broken until we have a generic way of
- putting lists inside the \paper block. */
+ putting lists inside the \layout block. */
Interval
line_dimensions_int (Output_def *def, int n)
{
return Interval (ind, lw);
}
-LY_DEFINE (ly_paper_def_p, "ly:paper-def?",
+LY_DEFINE (ly_layout_def_p, "ly:layout-def?",
1, 0, 0, (SCM def),
- "Is @var{def} a paper definition?")
+ "Is @var{def} a layout definition?")
{
return ly_bool2scm (unsmob_output_def (def));
}
-LY_DEFINE (ly_bookpaper_outputscale, "ly:bookpaper-outputscale",
+LY_DEFINE (ly_paper_outputscale, "ly:paper-outputscale",
1, 0, 0, (SCM bp),
"Get outputscale for BP.")
{
Output_def *b = unsmob_output_def (bp);
- SCM_ASSERT_TYPE (b, bp, SCM_ARG1, __FUNCTION__, "bookpaper");
+ SCM_ASSERT_TYPE (b, bp, SCM_ARG1, __FUNCTION__, "paper");
return scm_make_real (output_scale (b));
}
systems_ = SCM_BOOL_F;
header_ = SCM_EOL;
- bookpaper_ = 0;
+ paper_ = 0;
smobify_self ();
}
for (int i = 0; i < b->score_systems_.size (); i++)
b->score_systems_[i].gc_mark ();
- if (b->bookpaper_)
- scm_gc_mark (b->bookpaper_->self_scm ());
+ if (b->paper_)
+ scm_gc_mark (b->paper_->self_scm ());
scm_gc_mark (b->header_);
scm_gc_mark (b->pages_);
return b->systems_;
LY_DEFINE (ly_paper_book_scopes, "ly:paper-book-scopes",
1, 0, 0, (SCM book),
- "Return pages in paper book @var{book}.")
+ "Return pages in layout book @var{book}.")
{
Paper_book *pb = unsmob_paper_book(book);
SCM_ASSERT_TYPE(pb, book, SCM_ARG1, __FUNCTION__, "Paper_book");
return unsmob_paper_book (pb)->systems ();
}
-LY_DEFINE (ly_paper_book_book_paper, "ly:paper-book-book-paper",
+LY_DEFINE (ly_paper_book_paper, "ly:paper-book-paper",
1, 0, 0, (SCM pb),
"Return pages in book PB.")
{
- return unsmob_paper_book (pb)->bookpaper_->self_scm ();
+ return unsmob_paper_book (pb)->paper_->self_scm ();
}
/* TODO: resurrect more complex user-tweaks for titling? */
Stencil
Paper_book::book_title ()
{
- SCM title_func = bookpaper_->lookup_variable (ly_symbol2scm ("book-title"));
+ SCM title_func = paper_->lookup_variable (ly_symbol2scm ("book-title"));
Stencil title;
SCM scopes = SCM_EOL;
SCM tit = SCM_EOL;
if (ly_c_procedure_p (title_func))
tit = scm_call_2 (title_func,
- bookpaper_->self_scm (),
+ paper_->self_scm (),
scopes);
if (unsmob_stencil (tit))
Stencil
Paper_book::score_title (int i)
{
- SCM title_func = bookpaper_->lookup_variable (ly_symbol2scm ("score-title"));
+ SCM title_func = paper_->lookup_variable (ly_symbol2scm ("score-title"));
Stencil title;
SCM tit = SCM_EOL;
if (ly_c_procedure_p (title_func))
tit = scm_call_2 (title_func,
- bookpaper_->self_scm (),
+ paper_->self_scm (),
scopes);
if (unsmob_stencil (tit))
return pages_;
pages_ = SCM_EOL;
- SCM proc = bookpaper_->c_variable ("page-breaking");
+ SCM proc = paper_->c_variable ("page-breaking");
pages_ = scm_apply_0 (proc, scm_list_2 (systems (), self_scm ()));
return pages_;
}
String r = to_string (Paper_column::get_rank (me));
SCM properties = Font_interface::text_font_alist_chain (me);
- SCM scm_mol = Text_interface::interpret_markup (me->get_paper ()->self_scm (),
+ SCM scm_mol = Text_interface::interpret_markup (me->get_layout ()->self_scm (),
properties,
scm_makfrom0str (r.to_str0 ()));
Stencil t = *unsmob_stencil (scm_mol);
--- /dev/null
+/*
+ paper-def.cc -- implement Paper_def
+
+ source file of the GNU LilyPond music typesetter
+
+ (c) 2004 Han-Wen Nienhuys <hanwen@xs4all.nl>
+*/
+
+#include "dimensions.hh"
+#include "font-metric.hh"
+#include "ly-module.hh"
+#include "output-def.hh"
+#include "modified-font-metric.hh"
+#include "virtual-font-metric.hh"
+
+Real
+output_scale (Output_def *od)
+{
+ return scm_to_double (od->lookup_variable (ly_symbol2scm ("outputscale")));
+}
+
+/* TODO: should add nesting for Output_def here too. */
+Font_metric *
+find_scaled_font (Output_def *mod,
+ Font_metric *f, Real m, SCM input_enc_name)
+{
+ if (mod->parent_)
+ return find_scaled_font (mod->parent_, f, m, input_enc_name);
+
+ Real lookup_mag = m;
+ if (!dynamic_cast<Virtual_font_metric*> (f))
+ lookup_mag /= output_scale (mod);
+
+ SCM font_table = mod->lookup_variable (ly_symbol2scm ("scaled-fonts"));
+ if (scm_hash_table_p (font_table) != SCM_BOOL_T)
+ {
+ font_table = scm_c_make_hash_table (11);
+ mod->set_variable (ly_symbol2scm ("scaled-fonts"), font_table);
+ }
+
+
+ SCM sizes = scm_hashq_ref (font_table, f->self_scm (), SCM_BOOL_F);
+ if (sizes != SCM_BOOL_F)
+ {
+ SCM met = scm_assoc (scm_make_real (lookup_mag), sizes);
+ if (scm_is_pair (met))
+ return unsmob_metrics (scm_cdr (met));
+ }
+ else
+ sizes = SCM_EOL;
+
+ /* Hmm. We're chaining font - metrics. Should consider whether to
+ merge virtual-font and scaled_font. */
+ SCM val = SCM_EOL;
+ if (Virtual_font_metric * vf = dynamic_cast<Virtual_font_metric*> (f))
+ {
+ /* For fontify_atom (), the magnification and name must be known
+ at the same time. That's impossible for
+
+ Scaled (Virtual_font (Font1,Font2))
+
+ so we replace by
+
+ Virtual_font (Scaled (Font1), Scaled (Font2)) */
+ SCM lst = SCM_EOL;
+ SCM *t = &lst;
+ for (SCM s = vf->get_font_list (); scm_is_pair (s); s = scm_cdr (s))
+ {
+ Font_metric *scaled = find_scaled_font (mod,
+ unsmob_metrics (scm_car (s)),
+ m, input_enc_name);
+ *t = scm_cons (scaled->self_scm (), SCM_EOL);
+ t = SCM_CDRLOC (*t);
+ }
+
+ vf = new Virtual_font_metric (lst);
+ val = vf->self_scm ();
+ }
+ else
+ {
+ val = Modified_font_metric::make_scaled_font_metric (input_enc_name,
+ f, lookup_mag);
+ }
+
+ sizes = scm_acons (scm_make_real (lookup_mag), val, sizes);
+ scm_gc_unprotect_object (val);
+ scm_hashq_set_x (font_table, f->self_scm (), sizes);
+ return unsmob_metrics (val);
+}
+
+/* TODO: this is a nasty interface. During formatting,
+ the Output_def should be scaled to the output_scale_
+ specified in the toplevel Output_def. */
+Output_def *
+scale_output_def (Output_def *o, Real amount)
+{
+ SCM proc = ly_scheme_function ("scale-layout");
+ SCM new_pap = scm_call_2 (proc, o->self_scm (), scm_double2num (amount));
+ scm_gc_protect_object (new_pap);
+
+ return unsmob_output_def (new_pap);
+}
+
+LY_DEFINE (ly_paper_fonts, "ly:paper-fonts",
+ 1, 0, 0,
+ (SCM bp),
+ "Return fonts scaled up BP")
+{
+ Output_def *b = unsmob_output_def (bp);
+
+ SCM font_table = b->lookup_variable (ly_symbol2scm ("scaled-fonts"));
+
+ SCM_ASSERT_TYPE (b, bp, SCM_ARG1, __FUNCTION__, "paper");
+
+ SCM ell = SCM_EOL;
+ if (scm_hash_table_p (font_table) == SCM_BOOL_T)
+ {
+ SCM func = ly_scheme_function ("hash-table->alist");
+
+ for (SCM s = scm_call_1 (func, font_table); scm_is_pair (s);
+ s = scm_cdr (s))
+ {
+ SCM entry = scm_car (s);
+ for (SCM t = scm_cdr (entry); scm_is_pair (t); t = scm_cdr (t))
+ {
+ Font_metric *fm = unsmob_metrics (scm_cdar (t));
+
+ if (dynamic_cast<Modified_font_metric*> (fm))
+ ell = scm_cons (fm->self_scm (), ell);
+ }
+ }
+ }
+ return ell;
+}
Paper_outputter *
get_paper_outputter (String outname, String f)
{
- progress_indication (_f ("Paper output to `%s'...",
+ progress_indication (_f ("Layout output to `%s'...",
outname == "-" ? String ("<stdout>") : outname));
return new Paper_outputter (outname, f);
}
Paper_score::Paper_score ()
{
- paper_ = 0;
+ layout_ = 0;
system_ = 0;
}
%token ALTERNATIVE
%token BAR
%token BOOK
-%token BOOKPAPER
%token CHANGE
%token CHORDMODIFIERS
%token CHORDS
%token HYPHEN
%token INVALID
%token KEY
+%token LAYOUT
%token LYRICS
%token LYRICMODE
%token MARK
%type <music> tempo_event
%type <outputdef> output_def_body output_def_head
-%type <outputdef> output_def book_paper_block
+%type <outputdef> output_def paper_block
%type <scm> Music_list
%type <scm> chord_body_elements
id = ly_symbol2scm ("$defaultpaper");
else if ($1->c_variable ("is-midi") == SCM_BOOL_T)
id = ly_symbol2scm ("$defaultmidi");
- else if ($1->c_variable ("is-bookpaper") == SCM_BOOL_T)
- id = ly_symbol2scm ("$defaultbookpaper");
+ else if ($1->c_variable ("is-layout") == SCM_BOOL_T)
+ id = ly_symbol2scm ("$defaultlayout");
THIS->lexer_->set_identifier (id, od->self_scm ());
scm_gc_unprotect_object (od->self_scm ());
/* FIXME:
* Use 'handlers' like for toplevel-* stuff?
- * grok \paper and \midi? */
+ * grok \layout and \midi? */
book_body:
{
$$ = new Book;
$$->set_spot (THIS->here_input ());
- $$->bookpaper_ = dynamic_cast<Output_def*> (unsmob_output_def (THIS->lexer_->lookup_identifier ("$defaultbookpaper"))->clone ());
- scm_gc_unprotect_object ($$->bookpaper_->self_scm ());
+ $$->paper_ = dynamic_cast<Output_def*> (unsmob_output_def (THIS->lexer_->lookup_identifier ("$defaultpaper"))->clone ());
+ scm_gc_unprotect_object ($$->paper_->self_scm ());
$$->header_ = THIS->lexer_->lookup_identifier ("$globalheader");
}
- | book_body book_paper_block {
- $$->bookpaper_ = $2;
+ | book_body paper_block {
+ $$->paper_ = $2;
scm_gc_unprotect_object ($2->self_scm ());
}
| book_body score_block {
$$->header_ = $2;
}
| book_body error {
- $$->bookpaper_ = 0;
+ $$->paper_ = 0;
$$->scores_.clear();
}
;
$$->header_ = $2;
}
| score_body output_def {
- if ($2->lookup_variable (ly_symbol2scm ("is-bookpaper")) == SCM_BOOL_T)
+ if ($2->lookup_variable (ly_symbol2scm ("is-paper")) == SCM_BOOL_T)
{
- THIS->parser_error (_("\\bookpaper cannot be in \\score. Use \\paper instead"));
+ THIS->parser_error (_("\\paper cannot be in \\score. Use \\layout instead"));
}
else
OUTPUT DEF
*/
-book_paper_block:
+paper_block:
output_def {
$$ = $1;
- if ($$->lookup_variable (ly_symbol2scm ("is-bookpaper")) != SCM_BOOL_T)
+ if ($$->lookup_variable (ly_symbol2scm ("is-paper")) != SCM_BOOL_T)
{
- THIS->parser_error (_("Need \\bookpaper for bookpaper block."));
- $$ = get_bookpaper (THIS);
+ THIS->parser_error (_("Need \\paper for paper block."));
+ $$ = get_paper (THIS);
}
}
;
;
output_def_head:
- BOOKPAPER {
- $$ = get_bookpaper (THIS);
+ PAPER {
+ $$ = get_paper (THIS);
$$->input_origin_ = THIS->here_input ();
THIS->lexer_->add_scope ($$->scope_);
}
$$ = p;
THIS->lexer_->add_scope (p->scope_);
}
- | PAPER {
- Output_def *p = get_paper (THIS);
+ | LAYOUT {
+ Output_def *p = get_layout (THIS);
THIS->lexer_->add_scope (p->scope_);
$$ = p;
pscore_ = new Paper_score;
- pscore_->paper_ = dynamic_cast<Output_def*> (get_output_def ());
+ pscore_->layout_ = dynamic_cast<Output_def*> (get_output_def ());
SCM props = updated_grob_properties (context (), ly_symbol2scm ("System"));
Output_def *bpd = unsmob_output_def (book_outputdef);
/* ugh. */
- if (bpd->c_variable ("is-bookpaper") == SCM_BOOL_T)
+ if (bpd->c_variable ("is-paper") == SCM_BOOL_T)
{
Real scale = scm_to_double (bpd->c_variable ("outputscale"));
/* ugh, this is strange, Paper_book without a Book object. */
Paper_book *paper_book = new Paper_book ();
paper_book->header_ = header;
- paper_book->bookpaper_ = unsmob_output_def (scaled_bookdef);
+ paper_book->paper_ = unsmob_output_def (scaled_bookdef);
Score_systems sc;
sc.systems_ = systems;
Format score, return systems. OUTNAME is still passed to create a midi
file.
-PAPERBOOK should be scaled already.
+LAYOUTBOOK should be scaled already.
*/
SCM
Score::book_rendering (String outname,
- Output_def *paperbook,
+ Output_def *layoutbook,
Output_def *default_def)
{
if (error_found_)
SCM scaled_bookdef = SCM_EOL;
Real scale = 1.0;
- if (paperbook && paperbook->c_variable ("is-bookpaper") == SCM_BOOL_T)
- scale = scm_to_double (paperbook->c_variable ("outputscale"));
+ if (layoutbook && layoutbook->c_variable ("is-paper") == SCM_BOOL_T)
+ scale = scm_to_double (layoutbook->c_variable ("outputscale"));
SCM out = scm_makfrom0str (outname.to_str0 ());
SCM systems = SCM_EOL;
{
Output_def *def = outdef_count ? defs_[i] : default_def;
SCM scaled = SCM_EOL;
- if (def->c_variable ("is-paper") == SCM_BOOL_T)
+ if (def->c_variable ("is-layout") == SCM_BOOL_T)
{
def = scale_output_def (def, scale);
- def->parent_ = paperbook;
+ def->parent_ = layoutbook;
scaled = def->self_scm ();
scm_gc_unprotect_object (scaled);
}
- /* TODO: fix or junk --no-paper. */
+ /* TODO: fix or junk --no-layout. */
SCM context = ly_run_translator (music_, def->self_scm ());
if (dynamic_cast<Global_context*> (unsmob_context (context)))
{
LY_DEFINE (ly_score_embedded_format, "ly:score-embedded-format",
- 2, 0, 0, (SCM score, SCM paper),
- "Run @var{score} through @var{paper}, an output definition, "
+ 2, 0, 0, (SCM score, SCM layout),
+ "Run @var{score} through @var{layout}, an output definition, "
"scaled to correct outputscale already, "
- "return a list of paper-lines.")
+ "return a list of layout-lines.")
{
Score * sc = unsmob_score (score);
- Output_def *od = unsmob_output_def (paper);
+ Output_def *od = unsmob_output_def (layout);
if (sc->error_found_)
{
}
SCM_ASSERT_TYPE (sc, score, SCM_ARG1, __FUNCTION__, "Score");
- SCM_ASSERT_TYPE (od, paper, SCM_ARG2, __FUNCTION__, "Output_def");
+ SCM_ASSERT_TYPE (od, layout, SCM_ARG2, __FUNCTION__, "Output_def");
Output_def * score_def = 0;
- /* UGR, FIXME, these are default \paper blocks once again. They
+ /* UGR, FIXME, these are default \layout blocks once again. They
suck. */
for (int i = 0; !score_def && i < sc->defs_.size (); i++)
- if (sc->defs_[i]->c_variable ("is-paper") == SCM_BOOL_T)
+ if (sc->defs_[i]->c_variable ("is-layout") == SCM_BOOL_T)
score_def = sc->defs_[i];
if (!score_def)
}
staff_space_ = Staff_symbol_referencer::staff_space (me);
- Real lt = me->get_paper ()->get_dimension (ly_symbol2scm ("linethickness"));
+ Real lt = me->get_layout ()->get_dimension (ly_symbol2scm ("linethickness"));
thickness_ = robust_scm2double (me->get_property ("thickness"), 1.0) * lt;
dir_ = get_grob_direction (me);
#if DEBUG_SLUR_SCORING
SCM inspect_quants = slur_->get_property ("inspect-quants");
- if (to_boolean (slur_->get_paper ()
+ if (to_boolean (slur_->get_layout ()
->lookup_variable (ly_symbol2scm ("debug-slur-scoring")))
&& scm_is_pair (inspect_quants))
{
#if DEBUG_SLUR_SCORING
SCM quant_score = me->get_property ("quant-score");
- if (to_boolean (me->get_paper ()
+ if (to_boolean (me->get_layout ()
->lookup_variable (ly_symbol2scm ("debug-slur-scoring")))
&& scm_is_string (quant_score))
{
SCM properties = Font_interface::text_font_alist_chain (me);
Stencil tm = *unsmob_stencil (Text_interface::interpret_markup
- (me->get_paper ()->self_scm (), properties,
+ (me->get_layout ()->self_scm (), properties,
quant_score));
a.add_at_edge (Y_AXIS, get_grob_direction (me), tm, 1.0, 0);
}
*/
compound_fixed_note_space = compound_fixed_note_space <? compound_note_space;
- bool packed = to_boolean (me->get_paper ()->c_variable ("packed"));
+ bool packed = to_boolean (me->get_layout ()->c_variable ("packed"));
Real strength, distance;
/*
Grob *st = get_staff_symbol (me);
if (st)
return Staff_symbol::get_line_thickness (st);
- return me->get_paper ()->get_dimension (ly_symbol2scm ("linethickness"));
+ return me->get_layout ()->get_dimension (ly_symbol2scm ("linethickness"));
}
Real
--hwn.
*/
- Real t = me->get_paper ()->get_dimension (ly_symbol2scm ("linethickness"));
+ Real t = me->get_layout ()->get_dimension (ly_symbol2scm ("linethickness"));
t *= robust_scm2double (me->get_property ("thickness"), 1.0);
Direction d = LEFT;
Real
Staff_symbol::get_line_thickness (Grob* me)
{
- Real lt = me->get_paper ()->get_dimension (ly_symbol2scm ("linethickness"));
+ Real lt = me->get_layout ()->get_dimension (ly_symbol2scm ("linethickness"));
return robust_scm2double (me->get_property ("thickness"), 1.0) * lt;
}
Real ss = Staff_symbol_referencer::staff_space (me);
Real thick = robust_scm2double (me->get_property ("beam-thickness"),1);
Real width = robust_scm2double (me->get_property ("beam-width"),1);
- Real blot = me->get_paper ()->get_dimension (ly_symbol2scm ("blotdiameter"));
+ Real blot = me->get_layout ()->get_dimension (ly_symbol2scm ("blotdiameter"));
width *= ss;
thick *= ss;
// URG
Real stem_width = thickness (me);
Real blot =
- me->get_paper ()->get_dimension (ly_symbol2scm ("blotdiameter"));
+ me->get_layout ()->get_dimension (ly_symbol2scm ("blotdiameter"));
Box b = Box (Interval (-stem_width/2, stem_width/2),
Interval (stem_y[DOWN]*dy, stem_y[UP]*dy));
Stencil
System_start_delimiter::simple_bar (Grob*me,Real h)
{
- Real lt =me->get_paper ()->get_dimension (ly_symbol2scm ("linethickness")) ;
+ Real lt =me->get_layout ()->get_dimension (ly_symbol2scm ("linethickness")) ;
Real w = lt * robust_scm2double (me->get_property ("thickness"), 1);
return Lookup::round_filled_box (Box (Interval (0,w), Interval (-h/2, h/2)),
lt);
SCM fam = scm_cons (ly_symbol2scm ("font-encoding"), ly_symbol2scm ("fetaBraces"));
SCM alist = scm_list_n (fam, SCM_UNDEFINED);
- fm = select_font (me->get_paper (), scm_list_n (alist, SCM_UNDEFINED));
+ fm = select_font (me->get_layout (), scm_list_n (alist, SCM_UNDEFINED));
int lo = 0;
MAKE_SCHEME_CALLBACK (Text_interface, interpret_string, 4)
SCM
-Text_interface::interpret_string (SCM paper_smob,
+Text_interface::interpret_string (SCM layout_smob,
SCM props, SCM input_encoding, SCM markup)
{
- Output_def *paper = unsmob_output_def (paper_smob);
+ Output_def *layout = unsmob_output_def (layout_smob);
- SCM_ASSERT_TYPE (paper, paper_smob, SCM_ARG1,
- __FUNCTION__, "Paper definition");
+ SCM_ASSERT_TYPE (layout, layout_smob, SCM_ARG1,
+ __FUNCTION__, "Layout definition");
SCM_ASSERT_TYPE (scm_is_string (markup), markup, SCM_ARG3,
__FUNCTION__, "string");
SCM_ASSERT_TYPE (input_encoding == SCM_EOL || scm_is_symbol (input_encoding),
String str = ly_scm2string (markup);
if (!scm_is_symbol (input_encoding))
{
- SCM enc = paper->lookup_variable (ly_symbol2scm ("inputencoding"));
+ SCM enc = layout->lookup_variable (ly_symbol2scm ("inputencoding"));
if (scm_is_string (enc))
input_encoding = scm_string_to_symbol (enc);
else if (scm_is_symbol (enc))
input_encoding = enc;
}
- Font_metric *fm = select_encoded_font (paper, props, input_encoding);
+ Font_metric *fm = select_encoded_font (layout, props, input_encoding);
SCM lst = SCM_EOL;
Box b;
MAKE_SCHEME_CALLBACK (Text_interface, interpret_markup, 3)
SCM
-Text_interface::interpret_markup (SCM paper_smob, SCM props, SCM markup)
+Text_interface::interpret_markup (SCM layout_smob, SCM props, SCM markup)
{
if (scm_is_string (markup))
- return interpret_string (paper_smob, props, SCM_EOL, markup);
+ return interpret_string (layout_smob, props, SCM_EOL, markup);
else if (scm_is_pair (markup))
{
SCM func = scm_car (markup);
if (!markup_p (markup))
programming_error ("Markup head has no markup signature.");
- return scm_apply_2 (func, paper_smob, props, args);
+ return scm_apply_2 (func, layout_smob, props, args);
}
return SCM_EOL;
}
SCM t = me->get_property ("text");
SCM chain = Font_interface::text_font_alist_chain (me);
- return interpret_markup (me->get_paper ()->self_scm (), chain, t);
+ return interpret_markup (me->get_layout ()->self_scm (), chain, t);
}
/* Ugh. Duplicated from Scheme. */
/* Ugh, must be same as Hairpin::print. */
Grob *common = spanner->get_bound (LEFT)->common_refpoint (spanner->get_bound (RIGHT), X_AXIS);
- Output_def * paper = me->get_paper ();
+ Output_def * layout = me->get_layout ();
SCM flare = me->get_property ("bracket-flare");
SCM shorten = me->get_property ("shorten-pair");
SCM text = index_get_cell (edge_text, d);
if (Text_interface::markup_p (text))
- edge[d] = *unsmob_stencil (Text_interface::interpret_markup (paper->self_scm (), properties, text));
+ edge[d] = *unsmob_stencil (Text_interface::interpret_markup (layout->self_scm (), properties, text));
if (!edge[d].is_empty ())
edge[d].align_to (Y_AXIS, CENTER);
ly_symbol2scm ("fetaNumber"))),
chain);
- SCM sn = Text_interface::interpret_markup (me->get_paper ()->self_scm (), chain,
+ SCM sn = Text_interface::interpret_markup (me->get_layout ()->self_scm (), chain,
scm_makfrom0str (to_string (num).to_str0 ()));
- SCM sd = Text_interface::interpret_markup (me->get_paper ()->self_scm (), chain,
+ SCM sd = Text_interface::interpret_markup (me->get_layout ()->self_scm (), chain,
scm_makfrom0str (to_string (den).to_str0 ()));
Stencil n = *unsmob_stencil (sn);
SCM number = me->get_property ("text");
- Output_def *pap = me->get_paper ();
+ Output_def *pap = me->get_layout ();
Stencil num;
if (scm_is_string (number) && number_visibility)
{
dynamic_cast<Item*> (primitives[0].grob_)->get_column ();
Real join_thickness =
- thickness * column->get_paper ()->get_dimension (ly_symbol2scm ("linethickness"));
+ thickness * column->get_layout ()->get_dimension (ly_symbol2scm ("linethickness"));
/*
* Amount of extra space two put between some particular
Real thickness = robust_scm2double ( me->get_property ("thickness"), 1);
Real line_thickness =
- thickness * me->get_paper ()->get_dimension (ly_symbol2scm ("linethickness"));
+ thickness * me->get_layout ()->get_dimension (ly_symbol2scm ("linethickness"));
Real blotdiameter =
- (me->get_paper ()->get_dimension (ly_symbol2scm ("blotdiameter")));
+ (me->get_layout ()->get_dimension (ly_symbol2scm ("blotdiameter")));
int pos = Staff_symbol_referencer::get_rounded_position (me);
/*
- passing DEF is ughish. Should move into paperdef?
+ passing DEF is ughish. Should move into layoutdef?
*/
Virtual_font_metric::Virtual_font_metric (SCM font_list)
{
(strcmp (cs,":|")!=0 && strcmp (cs,"|:")!=0 && strcmp (cs,"|.")!=0
&& strcmp (cs,":|:")!=0 && strcmp (cs,".|")!=0);
- Output_def * paper =me->get_paper ();
+ Output_def * layout =me->get_layout ();
Real half_space = 0.5;
Item * bound = dynamic_cast<Spanner*> (me)->get_bound (LEFT);
{
SCM text = me->get_property ("text");
SCM properties = me->get_property_alist_chain (SCM_EOL);
- SCM snum = Text_interface::interpret_markup (paper->self_scm (), properties, text);
+ SCM snum = Text_interface::interpret_markup (layout->self_scm (), properties, text);
Stencil num = *unsmob_stencil (snum);
mol.add_at_edge (X_AXIS, LEFT, num, - num.extent (X_AXIS).length ()
+++ /dev/null
-\version "2.3.16"
-
-\bookpaper {
-
- %%%%%%%%%%%%%%
- %%%%
- %%%% WARNING
-
- %%% if you add any new dimensions, don't forget to update
- %%% the dimension-variables variable. see paper.scm
-
- unit = #(ly:unit)
- mm = 1.0
- in = 25.4
- pt = #(/ in 72.27)
- cm = #(* 10 mm)
-
- %% This is weird; `everyone' uses LATIN1? How does I select TeX
- %% input encoding in EMACS? -- jcn
- %%%%inputencoding = #"TeX"
- inputencoding = #"latin1"
- printpagenumber = ##t
-
- %%
- %% 20pt staff, 5 pt = 1.75 mm
- %%
-
- outputscale = #1.7573
-
- #(define-public score-title default-score-title)
- #(define-public user-title default-user-title)
- #(define-public book-title default-book-title)
-
- %
- % ugh. hard coded?
- %
-
- #(paper-set-staff-size (* 20.0 pt))
-
- %
- % this dimension includes the extent of the
- % staves themselves.
- %
- betweensystemspace = #(* 20 mm)
-
- %
- % fixed space between systems.
- %
- betweensystempadding = #(* 4 mm)
-
- aftertitlespace = 5 \mm
- beforetitlespace = 10 \mm
- betweentitlespace = 2 \mm
-
-
- raggedbottom = ##f
-
- %
- % looks best for shorter scores.
- %
- raggedlastbottom= ##t
-
- %% ugh. Should use /etc/papersize and set explicitely for
- %% documentation.
- papersize = "a4"
-
- #(define font-defaults
- '((font-encoding . fetaMusic)))
-
- #(define text-font-defaults
- '((font-encoding . ec)
- (baseline-skip . 2)
- (word-space . 0.6)))
-
- #(define page-breaking ly:optimal-page-breaks)
- #(define page-music-height default-page-music-height )
- #(define page-make-stencil default-page-make-stencil )
-
- #(define make-header plain-header)
- #(define make-footer plain-footer)
- #(set-paper-dimension-variables (current-module))
-
-}
\include "grace-init.ly"
\include "midi-init.ly"
-\include "book-paper-defaults.ly"
+\include "paper-defaults.ly"
-\paper {
- mm = #(ly:output-def-lookup $defaultbookpaper 'mm)
- unit = #(ly:output-def-lookup $defaultbookpaper 'unit)
+\layout {
+ mm = #(ly:output-def-lookup $defaultpaper 'mm)
+ unit = #(ly:output-def-lookup $defaultpaper 'unit)
in = #(* 25.4 mm)
pt = #(/ in 72.27)
#(set-default-paper-size "a4")
-partCombineListener = \paper {
+partCombineListener = \layout {
\context {
\Voice
\consists Note_heads_engraver
You cannot explicitly instantiate a Score context (since it is
not contained in any other context). It is instantiated
automatically when an output definition (a @code{\score} or
- @code{\paper} block) is processed."
+ @code{\layout} block) is processed."
\consists "Repeat_acknowledge_engraver"
\consists "Staff_collecting_engraver"
%climacus = #(def-climacus-function startSequentialMusic stopSequentialMusic)
%
-% example paper block for gregorian chant notation
+% example layout block for gregorian chant notation
%
-neumeDemoPaper = \paper {
+neumeDemoLayout = \layout {
interscoreline = 1
\context {
\Score
#(if (pair? toplevel-scores)
(ly:parser-print-book parser
- (apply ly:make-book $defaultbookpaper $globalheader (reverse toplevel-scores))))
+ (apply ly:make-book $defaultpaper $globalheader (reverse toplevel-scores))))
--- /dev/null
+\version "2.3.16"
+
+\paper {
+
+ %%%% WARNING
+
+ %%% if you add any new dimensions, don't forget to update
+ %%% the dimension-variables variable. see paper.scm
+
+ unit = #(ly:unit)
+ mm = 1.0
+ in = 25.4
+ pt = #(/ in 72.27)
+ cm = #(* 10 mm)
+
+ %% This is weird; `everyone' uses LATIN1? How does I select TeX
+ %% input encoding in EMACS? -- jcn
+ %%%%inputencoding = #"TeX"
+ inputencoding = #"latin1"
+ printpagenumber = ##t
+
+ %%
+ %% 20pt staff, 5 pt = 1.75 mm
+ %%
+
+ outputscale = #1.7573
+
+ #(define-public score-title default-score-title)
+ #(define-public user-title default-user-title)
+ #(define-public book-title default-book-title)
+
+ %%
+ %% ugh. hard coded?
+ %%
+
+ #(layout-set-staff-size (* 20.0 pt))
+
+ %%
+ %% this dimension includes the extent of the
+ %% staves themselves.
+ %%
+ betweensystemspace = #(* 20 mm)
+
+ %%
+ %% fixed space between systems.
+ %%
+ betweensystempadding = #(* 4 mm)
+
+ aftertitlespace = 5 \mm
+ beforetitlespace = 10 \mm
+ betweentitlespace = 2 \mm
+
+
+ raggedbottom = ##f
+
+ %%
+ %% looks best for shorter scores.
+ %%
+ raggedlastbottom= ##t
+
+ %% ugh. Should use /etc/papersize and set explicitely for
+ %% documentation.
+ papersize = "a4"
+
+ #(define font-defaults
+ '((font-encoding . fetaMusic)))
+
+ #(define text-font-defaults
+ '((font-encoding . ec)
+ (baseline-skip . 2)
+ (word-space . 0.6)))
+
+ #(define page-breaking ly:optimal-page-breaks)
+ #(define page-music-height default-page-music-height )
+ #(define page-make-stencil default-page-make-stencil )
+
+ #(define make-header plain-header)
+ #(define make-footer plain-footer)
+ #(set-paper-dimension-variables (current-module))
+}
(let*
((posns (ly:grob-property beam 'positions))
(thick (ly:grob-property beam 'thickness))
- (paper (ly:grob-paper beam))
- (lthick (ly:output-def-lookup paper 'linethickness))
+ (layout (ly:grob-layout beam))
+ (lthick (ly:output-def-lookup layout 'linethickness))
(staff-thick lthick) ; fixme.
(quant->coord (lambda (p q)
(if (= 2 (abs q))
(font-family . number)
;; We must do this, other BFs in
- ;; paper16 become too small.
+ ;; layout16 become too small.
(font-size . -4)
(kern . 0.2)
(meta . ((interfaces . (text-interface rhythmic-grob-interface
;; syntax, description and example.
-(def-markup-command (stencil paper props stil) (ly:stencil?)
+(def-markup-command (stencil layout props stil) (ly:stencil?)
"Stencil as markup"
stil)
-(def-markup-command (score paper props score) (ly:score?)
+(def-markup-command (score layout props score) (ly:score?)
(let*
- ((systems (ly:score-embedded-format score paper)))
+ ((systems (ly:score-embedded-format score layout)))
(if (= 0 (vector-length systems))
(begin
- (ly:warn "No systems found in \\score markup. Did you forget \\paper?")
+ (ly:warn "No systems found in \\score markup. Did you forget \\layout?")
empty-markup)
(begin
(let*
(ly:stencil-align-to! stencil Y CENTER)
stencil)))))
-(def-markup-command (simple paper props str) (string?)
+(def-markup-command (simple layout props str) (string?)
"A simple text string; @code{\\markup @{ foo @}} is equivalent with
@code{\\markup @{ \\simple #\"foo\" @}}."
- (interpret-markup paper props str))
+ (interpret-markup layout props str))
-(def-markup-command (encoded-simple paper props sym str) (symbol? string?)
+(def-markup-command (encoded-simple layout props sym str) (symbol? string?)
"A text string, encoded with encoding @var{sym}. See
@usermanref{Text encoding} for more information."
- (Text_interface::interpret_string paper
+ (Text_interface::interpret_string layout
props sym str))
(make-simple-markup ""))
-(def-markup-command (postscript paper props str) (string?)
+(def-markup-command (postscript layout props str) (string?)
"This inserts @var{str} directly into the output as a PostScript
command string. Due to technicalities of the output backends,
(list 'embedded-ps str)
'(0 . 0) '(0 . 0) ))
-;;(def-markup-command (fill-line paper props line-width markups)
+;;(def-markup-command (fill-line layout props line-width markups)
;; (number? markup-list?)
;; no parser tag -- should make number? markuk-list? thingy
-(def-markup-command (fill-line paper props markups)
+(def-markup-command (fill-line layout props markups)
(markup-list?)
"Put @var{markups} in a horizontal line of width @var{line-width}.
The markups are spaced/flushed to fill the entire line."
- (let* ((stencils (map (lambda (x) (interpret-markup paper props x))
+ (let* ((stencils (map (lambda (x) (interpret-markup layout props x))
markups))
(text-width (apply + (map interval-length
(map (lambda (x)
(/ (- line-width text-width)
(if (= word-count 1) 2 (- word-count 1)))))
(line-stencils (if (= word-count 1)
- (map (lambda (x) (interpret-markup paper props x))
+ (map (lambda (x) (interpret-markup layout props x))
(list (make-simple-markup "")
(make-stencil-markup (car stencils))
(make-simple-markup "")))
(stack-stencil-line fill-space line-stencils)))
(define (font-markup qualifier value)
- (lambda (paper props arg)
- (interpret-markup paper
+ (lambda (layout props arg)
+ (interpret-markup layout
(prepend-alist-chain qualifier value props)
arg)))
-(def-markup-command (line paper props args) (markup-list?)
+(def-markup-command (line layout props args) (markup-list?)
"Put @var{args} in a horizontal line. The property @code{word-space}
determines the space between each markup in @var{args}."
(stack-stencil-line
(chain-assoc-get 'word-space props)
- (map (lambda (m) (interpret-markup paper props m)) args)))
+ (map (lambda (m) (interpret-markup layout props m)) args)))
-(def-markup-command (combine paper props m1 m2) (markup? markup?)
+(def-markup-command (combine layout props m1 m2) (markup? markup?)
"Print two markups on top of each other."
(let*
- ((s1 (interpret-markup paper props m1))
- (s2 (interpret-markup paper props m2)))
+ ((s1 (interpret-markup layout props m1))
+ (s2 (interpret-markup layout props m2)))
(ly:stencil-add s1 s2)))
-(def-markup-command (finger paper props arg) (markup?)
+(def-markup-command (finger layout props arg) (markup?)
"Set the argument as small numbers."
- (interpret-markup paper
+ (interpret-markup layout
(cons '((font-size . -5) (font-encoding . fetaNumber)) props)
arg))
-(def-markup-command (fontsize paper props mag arg) (number? markup?)
+(def-markup-command (fontsize layout props mag arg) (number? markup?)
"This sets the relative font size, e.g.
@example
A \\fontsize #2 @{ B C @} D
This will enlarge the B and the C by two steps.
"
(interpret-markup
- paper
+ layout
(prepend-alist-chain 'font-size mag props)
arg))
-(def-markup-command (magnify paper props sz arg) (number? markup?)
+(def-markup-command (magnify layout props sz arg) (number? markup?)
"This sets the font magnification for the its argument. In the following
example, the middle A will be 10% larger:
@example
Use @code{\\fontsize} otherwise."
(interpret-markup
- paper
+ layout
(prepend-alist-chain 'font-magnification sz props)
arg))
-(def-markup-command (bold paper props arg) (markup?)
+(def-markup-command (bold layout props arg) (markup?)
"Switch to bold font-series"
- (interpret-markup paper (prepend-alist-chain 'font-series 'bold props) arg))
+ (interpret-markup layout (prepend-alist-chain 'font-series 'bold props) arg))
-(def-markup-command (sans paper props arg) (markup?)
+(def-markup-command (sans layout props arg) (markup?)
"Switch to the sans serif family"
- (interpret-markup paper (prepend-alist-chain 'font-family 'sans props) arg))
+ (interpret-markup layout (prepend-alist-chain 'font-family 'sans props) arg))
-(def-markup-command (number paper props arg) (markup?)
+(def-markup-command (number layout props arg) (markup?)
"Set font family to @code{number}, which yields the font used for
time signatures and fingerings. This font only contains numbers and
some punctuation. It doesn't have any letters. "
- (interpret-markup paper (prepend-alist-chain 'font-encoding 'fetaNumber props) arg))
+ (interpret-markup layout (prepend-alist-chain 'font-encoding 'fetaNumber props) arg))
-(def-markup-command (roman paper props arg) (markup?)
+(def-markup-command (roman layout props arg) (markup?)
"Set font family to @code{roman}."
- (interpret-markup paper (prepend-alist-chain 'font-family 'roman props) arg))
+ (interpret-markup layout (prepend-alist-chain 'font-family 'roman props) arg))
-(def-markup-command (huge paper props arg) (markup?)
+(def-markup-command (huge layout props arg) (markup?)
"Set font size to +2."
- (interpret-markup paper (prepend-alist-chain 'font-size 2 props) arg))
+ (interpret-markup layout (prepend-alist-chain 'font-size 2 props) arg))
-(def-markup-command (large paper props arg) (markup?)
+(def-markup-command (large layout props arg) (markup?)
"Set font size to +1."
- (interpret-markup paper (prepend-alist-chain 'font-size 1 props) arg))
+ (interpret-markup layout (prepend-alist-chain 'font-size 1 props) arg))
-(def-markup-command (normalsize paper props arg) (markup?)
+(def-markup-command (normalsize layout props arg) (markup?)
"Set font size to default."
- (interpret-markup paper (prepend-alist-chain 'font-size 0 props) arg))
+ (interpret-markup layout (prepend-alist-chain 'font-size 0 props) arg))
-(def-markup-command (small paper props arg) (markup?)
+(def-markup-command (small layout props arg) (markup?)
"Set font size to -1."
- (interpret-markup paper (prepend-alist-chain 'font-size -1 props) arg))
+ (interpret-markup layout (prepend-alist-chain 'font-size -1 props) arg))
-(def-markup-command (tiny paper props arg) (markup?)
+(def-markup-command (tiny layout props arg) (markup?)
"Set font size to -2."
- (interpret-markup paper (prepend-alist-chain 'font-size -2 props) arg))
+ (interpret-markup layout (prepend-alist-chain 'font-size -2 props) arg))
-(def-markup-command (teeny paper props arg) (markup?)
+(def-markup-command (teeny layout props arg) (markup?)
"Set font size to -3."
- (interpret-markup paper (prepend-alist-chain 'font-size -3 props) arg))
+ (interpret-markup layout (prepend-alist-chain 'font-size -3 props) arg))
-(def-markup-command (caps paper props arg) (markup?)
+(def-markup-command (caps layout props arg) (markup?)
"Set @code{font-shape} to @code{caps}."
- (interpret-markup paper (prepend-alist-chain 'font-shape 'caps props) arg))
+ (interpret-markup layout (prepend-alist-chain 'font-shape 'caps props) arg))
-;(def-markup-command (latin-i paper props arg) (markup?)
+;(def-markup-command (latin-i layout props arg) (markup?)
; "TEST latin1 encoding."
-; (interpret-markup paper (prepend-alist-chain 'font-shape 'latin1 props) arg))
+; (interpret-markup layout (prepend-alist-chain 'font-shape 'latin1 props) arg))
-(def-markup-command (dynamic paper props arg) (markup?)
+(def-markup-command (dynamic layout props arg) (markup?)
"Use the dynamic font. This font only contains @b{s}, @b{f}, @b{m},
@b{z}, @b{p}, and @b{r}. When producing phrases, like ``pi@`{u} @b{f}'', the
normal words (like ``pi@`{u}'') should be done in a different font. The
recommend font for this is bold and italic"
(interpret-markup
- paper (prepend-alist-chain 'font-encoding 'fetaDynamic props) arg))
+ layout (prepend-alist-chain 'font-encoding 'fetaDynamic props) arg))
-(def-markup-command (italic paper props arg) (markup?)
+(def-markup-command (italic layout props arg) (markup?)
"Use italic @code{font-shape} for @var{arg}. "
- (interpret-markup paper (prepend-alist-chain 'font-shape 'italic props) arg))
+ (interpret-markup layout (prepend-alist-chain 'font-shape 'italic props) arg))
-(def-markup-command (typewriter paper props arg) (markup?)
+(def-markup-command (typewriter layout props arg) (markup?)
"Use @code{font-family} typewriter for @var{arg}."
(interpret-markup
- paper (prepend-alist-chain 'font-family 'typewriter props) arg))
+ layout (prepend-alist-chain 'font-family 'typewriter props) arg))
-(def-markup-command (upright paper props arg) (markup?)
+(def-markup-command (upright layout props arg) (markup?)
"Set font shape to @code{upright}."
(interpret-markup
- paper (prepend-alist-chain 'font-shape 'upright props) arg))
+ layout (prepend-alist-chain 'font-shape 'upright props) arg))
-(def-markup-command (doublesharp paper props) ()
+(def-markup-command (doublesharp layout props) ()
"Draw a double sharp symbol."
- (interpret-markup paper props (markup #:musicglyph "accidentals-4")))
-(def-markup-command (sesquisharp paper props) ()
+ (interpret-markup layout props (markup #:musicglyph "accidentals-4")))
+(def-markup-command (sesquisharp layout props) ()
"Draw a 3/2 sharp symbol."
- (interpret-markup paper props (markup #:musicglyph "accidentals-3")))
+ (interpret-markup layout props (markup #:musicglyph "accidentals-3")))
-(def-markup-command (sharp paper props) ()
+(def-markup-command (sharp layout props) ()
"Draw a sharp symbol."
- (interpret-markup paper props (markup #:musicglyph "accidentals-2")))
-(def-markup-command (semisharp paper props) ()
+ (interpret-markup layout props (markup #:musicglyph "accidentals-2")))
+(def-markup-command (semisharp layout props) ()
"Draw a semi sharp symbol."
- (interpret-markup paper props (markup #:musicglyph "accidentals-1")))
-(def-markup-command (natural paper props) ()
+ (interpret-markup layout props (markup #:musicglyph "accidentals-1")))
+(def-markup-command (natural layout props) ()
"Draw a natural symbol."
- (interpret-markup paper props (markup #:musicglyph "accidentals-0")))
-(def-markup-command (semiflat paper props) ()
+ (interpret-markup layout props (markup #:musicglyph "accidentals-0")))
+(def-markup-command (semiflat layout props) ()
"Draw a semiflat."
- (interpret-markup paper props (markup #:musicglyph "accidentals--1")))
-(def-markup-command (flat paper props) ()
+ (interpret-markup layout props (markup #:musicglyph "accidentals--1")))
+(def-markup-command (flat layout props) ()
"Draw a flat symbol."
- (interpret-markup paper props (markup #:musicglyph "accidentals--2")))
-(def-markup-command (sesquiflat paper props) ()
+ (interpret-markup layout props (markup #:musicglyph "accidentals--2")))
+(def-markup-command (sesquiflat layout props) ()
"Draw a 3/2 flat symbol."
- (interpret-markup paper props (markup #:musicglyph "accidentals--3")))
-(def-markup-command (doubleflat paper props) ()
+ (interpret-markup layout props (markup #:musicglyph "accidentals--3")))
+(def-markup-command (doubleflat layout props) ()
"Draw a double flat symbol."
- (interpret-markup paper props (markup #:musicglyph "accidentals--4")))
+ (interpret-markup layout props (markup #:musicglyph "accidentals--4")))
-(def-markup-command (column paper props args) (markup-list?)
+(def-markup-command (column layout props args) (markup-list?)
"Stack the markups in @var{args} vertically."
(stack-lines
-1 0.0 (chain-assoc-get 'baseline-skip props)
- (map (lambda (m) (interpret-markup paper props m)) args)))
+ (map (lambda (m) (interpret-markup layout props m)) args)))
-(def-markup-command (dir-column paper props args) (markup-list?)
+(def-markup-command (dir-column layout props args) (markup-list?)
"Make a column of args, going up or down, depending on the setting
of the @code{#'direction} layout property."
(let* ((dir (chain-assoc-get 'direction props)))
(if (number? dir) dir -1)
0.0
(chain-assoc-get 'baseline-skip props)
- (map (lambda (x) (interpret-markup paper props x)) args))))
+ (map (lambda (x) (interpret-markup layout props x)) args))))
-(def-markup-command (center-align paper props args) (markup-list?)
+(def-markup-command (center-align layout props args) (markup-list?)
"Put @code{args} in a centered column. "
- (let* ((mols (map (lambda (x) (interpret-markup paper props x)) args))
+ (let* ((mols (map (lambda (x) (interpret-markup layout props x)) args))
(cmols (map (lambda (x) (ly:stencil-align-to! x X CENTER)) mols)))
(stack-lines -1 0.0 (chain-assoc-get 'baseline-skip props) mols)))
-(def-markup-command (vcenter paper props arg) (markup?)
+(def-markup-command (vcenter layout props arg) (markup?)
"Align @code{arg} to its center. "
- (let* ((mol (interpret-markup paper props arg)))
+ (let* ((mol (interpret-markup layout props arg)))
(ly:stencil-align-to! mol Y CENTER)
mol))
-(def-markup-command (right-align paper props arg) (markup?)
- (let* ((m (interpret-markup paper props arg)))
+(def-markup-command (right-align layout props arg) (markup?)
+ (let* ((m (interpret-markup layout props arg)))
(ly:stencil-align-to! m X RIGHT)
m))
-(def-markup-command (left-align paper props arg) (markup?)
+(def-markup-command (left-align layout props arg) (markup?)
"Align @var{arg} on its left edge. "
- (let* ((m (interpret-markup paper props arg)))
+ (let* ((m (interpret-markup layout props arg)))
(ly:stencil-align-to! m X LEFT)
m))
-(def-markup-command (general-align paper props axis dir arg) (integer? number? markup?)
+(def-markup-command (general-align layout props axis dir arg) (integer? number? markup?)
"Align @var{arg} in @var{axis} direction to the @var{dir} side."
- (let* ((m (interpret-markup paper props arg)))
+ (let* ((m (interpret-markup layout props arg)))
(ly:stencil-align-to! m axis dir)
m
))
-(def-markup-command (halign paper props dir arg) (number? markup?)
+(def-markup-command (halign layout props dir arg) (number? markup?)
"Set horizontal alignment. If @var{dir} is @code{-1}, then it is
left-aligned, while @code{+1} is right. Values in between interpolate
alignment accordingly."
- (let* ((m (interpret-markup paper props arg)))
+ (let* ((m (interpret-markup layout props arg)))
(ly:stencil-align-to! m X dir)
m))
-(def-markup-command (musicglyph paper props glyph-name) (string?)
+(def-markup-command (musicglyph layout props glyph-name) (string?)
"This is converted to a musical symbol, e.g. @code{\\musicglyph
#\"accidentals-0\"} will select the natural sign from the music font.
See @usermanref{The Feta font} for a complete listing of the possible glyphs.
"
(ly:find-glyph-by-name
- (ly:paper-get-font paper (cons '((font-encoding . fetaMusic))
+ (ly:paper-get-font layout (cons '((font-encoding . fetaMusic))
props))
glyph-name))
-(def-markup-command (lookup paper props glyph-name) (string?)
+(def-markup-command (lookup layout props glyph-name) (string?)
"Lookup a glyph by name."
- (ly:find-glyph-by-name (ly:paper-get-font paper props)
+ (ly:find-glyph-by-name (ly:paper-get-font layout props)
glyph-name))
-(def-markup-command (char paper props num) (integer?)
+(def-markup-command (char layout props num) (integer?)
"Produce a single character, e.g. @code{\\char #65} produces the
letter 'A'."
- (ly:get-glyph (ly:paper-get-font paper props) num))
+ (ly:get-glyph (ly:paper-get-font layout props) num))
-(def-markup-command (raise paper props amount arg) (number? markup?)
+(def-markup-command (raise layout props amount arg) (number? markup?)
"
This raises @var{arg}, by the distance @var{amount}.
A negative @var{amount} indicates lowering:
and/or @code{extra-offset} properties. "
- (ly:stencil-translate-axis (interpret-markup paper props arg)
+ (ly:stencil-translate-axis (interpret-markup layout props arg)
amount Y))
-(def-markup-command (fraction paper props arg1 arg2) (markup? markup?)
+(def-markup-command (fraction layout props arg1 arg2) (markup? markup?)
"Make a fraction of two markups."
- (let* ((m1 (interpret-markup paper props arg1))
- (m2 (interpret-markup paper props arg2)))
+ (let* ((m1 (interpret-markup layout props arg1))
+ (m2 (interpret-markup layout props arg2)))
(ly:stencil-align-to! m1 X CENTER)
(ly:stencil-align-to! m2 X CENTER)
(let* ((x1 (ly:stencil-extent m1 X))
;; TODO: better syntax.
-(def-markup-command (note-by-number paper props log dot-count dir) (number? number? number?)
+(def-markup-command (note-by-number layout props log dot-count dir) (number? number? number?)
"Construct a note symbol, with stem. By using fractional values for
@var{dir}, you can obtain longer or shorter stems."
- (let* ((font (ly:paper-get-font paper (cons '((font-encoding . fetaMusic)) props)))
+ (let* ((font (ly:paper-get-font layout (cons '((font-encoding . fetaMusic)) props)))
(size (chain-assoc-get 'font-size props 0))
(stem-length (* (magstep size) (max 3 (- log 1))))
(head-glyph (ly:find-glyph-by-name
(if dots (string-length dots) 0)))
(error "This is not a valid duration string:" duration-string))))
-(def-markup-command (note paper props duration dir) (string? number?)
+(def-markup-command (note layout props duration dir) (string? number?)
"This produces a note with a stem pointing in @var{dir} direction, with
the @var{duration} for the note head type and augmentation dots. For
example, @code{\\note #\"4.\" #-0.75} creates a dotted quarter note, with
a shortened down stem."
(let ((parsed (parse-simple-duration duration)))
- (note-by-number-markup paper props (car parsed) (cadr parsed) dir)))
+ (note-by-number-markup layout props (car parsed) (cadr parsed) dir)))
-(def-markup-command (normal-size-super paper props arg) (markup?)
+(def-markup-command (normal-size-super layout props arg) (markup?)
"Set @var{arg} in superscript with a normal font size."
(ly:stencil-translate-axis (interpret-markup
- paper
+ layout
props arg)
(* 0.5 (chain-assoc-get 'baseline-skip props))
Y))
-(def-markup-command (super paper props arg) (markup?)
+(def-markup-command (super layout props arg) (markup?)
"
@cindex raising text
@cindex lowering text
(ly:stencil-translate-axis
(interpret-markup
- paper
+ layout
(cons `((font-size . ,(- (chain-assoc-get 'font-size props 0) 3))) props)
arg)
(* 0.5 (chain-assoc-get 'baseline-skip props))
Y))
-(def-markup-command (translate paper props offset arg) (number-pair? markup?)
+(def-markup-command (translate layout props offset arg) (number-pair? markup?)
"This translates an object. Its first argument is a cons of numbers
@example
A \\translate #(cons 2 -3) @{ B C @} D
"
- (ly:stencil-translate (interpret-markup paper props arg)
+ (ly:stencil-translate (interpret-markup layout props arg)
offset))
-(def-markup-command (sub paper props arg) (markup?)
+(def-markup-command (sub layout props arg) (markup?)
"Set @var{arg} in subscript."
(ly:stencil-translate-axis
(interpret-markup
- paper
+ layout
(cons `((font-size . ,(- (chain-assoc-get 'font-size props 0) 3))) props)
arg)
(* -0.5 (chain-assoc-get 'baseline-skip props))
Y))
-(def-markup-command (normal-size-sub paper props arg) (markup?)
+(def-markup-command (normal-size-sub layout props arg) (markup?)
"Set @var{arg} in subscript, in a normal font size."
(ly:stencil-translate-axis
- (interpret-markup paper props arg)
+ (interpret-markup layout props arg)
(* -0.5 (chain-assoc-get 'baseline-skip props))
Y))
-(def-markup-command (hbracket paper props arg) (markup?)
+(def-markup-command (hbracket layout props arg) (markup?)
"Draw horizontal brackets around @var{arg}."
(let ((th 0.1) ;; todo: take from GROB.
- (m (interpret-markup paper props arg)))
+ (m (interpret-markup layout props arg)))
(bracketify-stencil m X th (* 2.5 th) th)))
-(def-markup-command (bracket paper props arg) (markup?)
+(def-markup-command (bracket layout props arg) (markup?)
"Draw vertical brackets around @var{arg}."
(let ((th 0.1) ;; todo: take from GROB.
- (m (interpret-markup paper props arg)))
+ (m (interpret-markup layout props arg)))
(bracketify-stencil m Y th (* 2.5 th) th)))
;; todo: fix negative space
-(def-markup-command (hspace paper props amount) (number?)
+(def-markup-command (hspace layout props amount) (number?)
"This produces a invisible object taking horizontal space.
@example
\\markup @{ A \\hspace #2.0 B @}
(ly:make-stencil "" (cons 0 amount) '(-1 . 1) )
(ly:make-stencil "" (cons amount amount) '(-1 . 1))))
-(def-markup-command (override paper props new-prop arg) (pair? markup?)
+(def-markup-command (override layout props new-prop arg) (pair? markup?)
"Add the first argument in to the property list. Properties may be
any sort of property supported by @internalsref{font-interface} and
@internalsref{text-interface}, for example
@end verbatim
"
- (interpret-markup paper (cons (list new-prop) props) arg))
+ (interpret-markup layout (cons (list new-prop) props) arg))
-(def-markup-command (smaller paper props arg) (markup?)
+(def-markup-command (smaller layout props arg) (markup?)
"Decrease the font size relative to current setting"
(let* ((fs (chain-assoc-get 'font-size props 0))
(entry (cons 'font-size (- fs 1))))
- (interpret-markup paper (cons (list entry) props) arg)))
+ (interpret-markup layout (cons (list entry) props) arg)))
-(def-markup-command (bigger paper props arg) (markup?)
+(def-markup-command (bigger layout props arg) (markup?)
"Increase the font size relative to current setting"
(let* ((fs (chain-assoc-get 'font-size props 0))
(entry (cons 'font-size (+ fs 1))))
- (interpret-markup paper (cons (list entry) props) arg)))
+ (interpret-markup layout (cons (list entry) props) arg)))
(def-markup-command larger (markup?)
bigger-markup)
-(def-markup-command (box paper props arg) (markup?)
+(def-markup-command (box layout props arg) (markup?)
"Draw a box round @var{arg}. Looks at @code{thickness} and
@code{box-padding} properties to determine line thickness and padding
around the markup."
(let ((th (chain-assoc-get 'thickness props 0.1))
(pad (chain-assoc-get 'box-padding props 0.2))
- (m (interpret-markup paper props arg)))
+ (m (interpret-markup layout props arg)))
(box-stencil m th pad)))
;FIXME: is this working?
-(def-markup-command (strut paper props) ()
+(def-markup-command (strut layout props) ()
"Create a box of the same height as the space in the current font."
- (let ((m (Text_interface::interpret_markup paper props " ")))
+ (let ((m (Text_interface::interpret_markup layout props " ")))
(ly:stencil-set-extent! m X '(1000 . -1000))
m))
(make-string 1 (vector-ref number->mark-letter-vector n)))))
-(def-markup-command (markletter paper props num) (integer?)
+(def-markup-command (markletter layout props num) (integer?)
"Make a markup letter for @var{num}. The letters start with A to Z
(skipping I), and continues with double letters."
- (Text_interface::interpret_markup paper props (number->markletter-string num)))
+ (Text_interface::interpret_markup layout props (number->markletter-string num)))
-(def-markup-command (bracketed-y-column paper props indices args)
+(def-markup-command (bracketed-y-column layout props indices args)
(list? markup-list?)
"Make a column of the markups in @var{args}, putting brackets around
the elements marked in @var{indices}, which is a list of numbers."
((stencils
(map (lambda (x)
(interpret-markup
- paper
+ layout
props
x)) args))
(leading
(if in-which-contexts
(let*
- ((paper-alist (ly:output-description $defaultpaper))
- (context-description-alist (map cdr paper-alist))
+ ((layout-alist (ly:output-description $defaultlayout))
+ (context-description-alist (map cdr layout-alist))
(contexts
(apply append
(map
(define (all-contexts-doc)
(let* (
- (paper-alist
- (sort (ly:output-description $defaultpaper)
+ (layout-alist
+ (sort (ly:output-description $defaultlayout)
(lambda (x y) (symbol<? (car x) (car y)))))
- (names (sort (map symbol->string (map car paper-alist)) string<?))
- (contexts (map cdr paper-alist))
+ (names (sort (map symbol->string (map car layout-alist)) string<?))
+ (contexts (map cdr layout-alist))
)
(make <texi-node>
(define (gnome-main book)
- (let* ((book-paper (ly:paper-book-book-paper book))
- (hsize (ly:output-def-lookup book-paper 'hsize))
- (vsize (ly:output-def-lookup book-paper 'vsize))
+ (let* ((paper (ly:paper-book-paper book))
+ (hsize (ly:output-def-lookup paper 'hsize))
+ (vsize (ly:output-def-lookup paper 'vsize))
(page-width (inexact->exact (ceiling (* OUTPUT-SCALE hsize))))
(page-height (inexact->exact (ceiling (* OUTPUT-SCALE vsize))))
;;(page-width (inexact->exact (ceiling hsize)))
(equal? (substring fontname 0 2) "cm")
(equal? (substring fontname 0 2) "ec")))
-(define (load-fonts bookpaper)
- (let* ((fonts (ly:bookpaper-fonts bookpaper))
+(define (load-fonts paper)
+ (let* ((fonts (ly:paper-fonts paper))
(font-names (uniq-list (sort (map ly:font-filename fonts) string<?)))
(pfas (map
(lambda (x)
(string-join pfas "\n")))
-(define (define-fonts bookpaper)
+(define (define-fonts paper)
- (define font-list (ly:bookpaper-fonts bookpaper))
+ (define font-list (ly:paper-fonts paper))
(define (define-font command fontname scaling)
(string-append
"/" command " { /" fontname " findfont "
(plain (ps-font-command font #f))
(designsize (ly:font-design-size font))
(magnification (* (ly:font-magnification font)))
- (ops (ly:output-def-lookup bookpaper 'outputscale))
+ (ops (ly:output-def-lookup paper 'outputscale))
(scaling (* ops magnification designsize)))
;; Bluesky pfbs have UPCASE names (sigh.)
;; FIXME: duplicated in other output backends
;; FIXME: silly interface name
-(define (output-variables paper)
- ;; FIXME: duplicates output-paper's scope-entry->string, mostly
+(define (output-variables layout)
+ ;; FIXME: duplicates output-layout's scope-entry->string, mostly
(define (value->string val)
(cond
((string? val) (string-append "(" val ")"))
(define (output-entry ps-key ly-key)
(string-append
"/" ps-key " "
- (value->string (ly:output-def-lookup paper ly-key)) " def \n"))
+ (value->string (ly:output-def-lookup layout ly-key)) " def \n"))
(string-append
"/lily-output-units " (number->string mm-to-bigpoint) " def %% milimeter \n"
(output-entry "paper-size" 'papersize)
(output-entry "staff-height" 'staffheight) ;junkme.
"/output-scale "
- (number->string (ly:output-def-lookup paper 'outputscale))
+ (number->string (ly:output-def-lookup layout 'outputscale))
" lily-output-units mul def \n"
(output-entry "page-height" 'vsize)
(output-entry "page-width" 'hsize)
(ly:outputter-dump-stencil outputter page)
(ly:outputter-dump-string outputter "} stop-system \nshowpage\n"))
-(define (eps-header bookpaper bbox)
+(define (eps-header paper bbox)
(string-append "%!PS-Adobe-2.0 EPSF-2.0\n"
"%%Creator: creator time-stamp\n"
"%%BoundingBox: "
(string-join (map number->string bbox) " ") "\n"
"%%Orientation: "
- (if (eq? (ly:output-def-lookup bookpaper 'landscape) #t)
+ (if (eq? (ly:output-def-lookup paper 'landscape) #t)
"Landscape\n"
"Portrait\n")
"%%EndComments\n"))
-(define (page-header bookpaper page-count)
+(define (page-header paper page-count)
(string-append "%!PS-Adobe-3.0\n"
"%%Creator: creator time-stamp\n"
"%%Pages: " (number->string page-count) "\n"
"%%PageOrder: Ascend\n"
"%%Orientation: "
- (if (eq? (ly:output-def-lookup bookpaper 'landscape) #t)
+ (if (eq? (ly:output-def-lookup paper 'landscape) #t)
"Landscape\n"
"Portrait\n")
- "%%DocumentPaperSizes: "
- (ly:output-def-lookup bookpaper 'papersize) "\n"))
+ "%%DocumentLayoutSizes: "
+ (ly:output-def-lookup paper 'papersize) "\n"))
-(define (preamble bookpaper)
+(define (preamble paper)
(list
- (output-variables bookpaper)
+ (output-variables paper)
(ly:gulp-file "music-drawing-routines.ps")
(ly:gulp-file "lilyponddefs.ps")
- (load-fonts bookpaper)
- (define-fonts bookpaper)
+ (load-fonts paper)
+ (define-fonts paper)
))
(define-public (output-framework outputter book scopes fields basename)
- (let* ((bookpaper (ly:paper-book-book-paper book))
+ (let* ((paper (ly:paper-book-paper book))
(pages (ly:paper-book-pages book))
- (landscape? (eq? (ly:output-def-lookup bookpaper 'landscape) #t))
- (page-number (1- (ly:output-def-lookup bookpaper 'firstpagenumber)))
+ (landscape? (eq? (ly:output-def-lookup paper 'landscape) #t))
+ (page-number (1- (ly:output-def-lookup paper 'firstpagenumber)))
(page-count (length pages)))
(for-each
(lambda (x)
(ly:outputter-dump-string outputter x))
(cons
- (page-header bookpaper page-count)
- (preamble bookpaper)))
+ (page-header paper page-count)
+ (preamble paper)))
(for-each
(lambda (page)
(ly:outputter-dump-string outputter "%%Trailer\n%%EOF\n")))
(define-public (output-preview-framework outputter book scopes fields basename)
- (let* ((bookpaper (ly:paper-book-book-paper book))
+ (let* ((paper (ly:paper-book-paper book))
(systems (ly:paper-book-systems book))
- (scale (ly:output-def-lookup bookpaper 'outputscale ))
+ (scale (ly:output-def-lookup paper 'outputscale ))
(titles (take-while ly:paper-system-title? systems))
(non-title (find (lambda (x)
(not (ly:paper-system-title? x))) systems))
(lambda (x)
(ly:outputter-dump-string outputter x))
(cons
- (eps-header bookpaper
+ (eps-header paper
(map
(lambda (x)
(inexact->exact
(round (* x scale mm-to-bigpoint))))
(list (car xext) (car yext)
(cdr xext) (cdr yext))))
- (preamble bookpaper)))
+ (preamble paper)))
(ly:outputter-dump-string outputter
(define-public (convert-to-pdf book name)
(let*
- ((defs (ly:paper-book-book-paper book))
+ ((defs (ly:paper-book-paper book))
(size (ly:output-def-lookup defs 'papersize)))
(if (equal? name "-")
(define-public (convert-to-png book name)
(let*
- ((defs (ly:paper-book-book-paper book))
+ ((defs (ly:paper-book-paper book))
(resolution (ly:output-def-lookup defs 'pngresolution)))
(postscript->png (if (number? resolution) resolution 90)
(string-encode-integer
(inexact->exact (round (* 1000 (ly:font-magnification font)))))))
-(define (font-load-command bookpaper font)
+(define (font-load-command paper font)
(let* ((coding-alist (ly:font-encoding-alist font))
- (font-encoding (assoc-get 'output-name coding-alist))
- )
+ (font-encoding (assoc-get 'output-name coding-alist)))
+
(string-append
"\\font\\lilypond" (tex-font-command font) "="
(ly:font-filename font)
(ly:number->string (inexact->exact
(round (* 1000
(ly:font-magnification font)
- (ly:bookpaper-outputscale bookpaper)))))
+ (ly:paper-outputscale paper)))))
"\n"
"\\def\\" (tex-font-command font) "{%\n"
;; UGH. Should be handled via alist.
)))
-(define (define-fonts bookpaper)
+(define (define-fonts paper)
(string-append
;; UGH. FIXME.
"\\def\\lilypondpaperunit{mm}\n"
(tex-number-def "lilypondpaper" 'outputscale
(number->string (exact->inexact
- (ly:bookpaper-outputscale bookpaper))))
+ (ly:paper-outputscale paper))))
(tex-string-def "lilypondpaper" 'papersize
- (eval 'papersize (ly:output-def-scope bookpaper)))
+ (eval 'papersize (ly:output-def-scope paper)))
+ ;; paper/layout?
(tex-string-def "lilypondpaper" 'inputencoding
- (eval 'inputencoding (ly:output-def-scope bookpaper)))
+ (eval 'inputencoding (ly:output-def-scope paper)))
(apply string-append
- (map (lambda (x) (font-load-command bookpaper x))
- (ly:bookpaper-fonts bookpaper)))))
+ (map (lambda (x) (font-load-command paper x))
+ (ly:paper-fonts paper)))))
(define (header-to-file fn key val)
(set! key (symbol->string key))
(string-append "\\def\\" prefix (symbol->tex-key key)
"{" (sanitize-tex-string str) "}%\n")))
-(define (header bookpaper page-count classic?)
- (let ((scale (ly:output-def-lookup bookpaper 'outputscale))
+(define (header paper page-count classic?)
+ (let ((scale (ly:output-def-lookup paper 'outputscale))
(texpaper (string-append
- (ly:output-def-lookup bookpaper 'papersizename)
+ (ly:output-def-lookup paper 'papersizename)
"paper"))
- (landscape? (eq? #t (ly:output-def-lookup bookpaper 'landscape)))
- )
+ (landscape? (eq? #t (ly:output-def-lookup paper 'landscape))))
(string-append
"% Generated by LilyPond "
(tex-string-def
"lilypondpaper" 'linewidth
- (ly:number->string (* scale (ly:output-def-lookup bookpaper 'linewidth))))
+ (ly:number->string (* scale (ly:output-def-lookup paper 'linewidth))))
"\\def\\lilyponddocumentclassoptions{"
texpaper
(if landscape? ",landscape" "")
(tex-string-def
"lilypondpaper" 'interscoreline
(ly:number->string
- (* scale (ly:output-def-lookup bookpaper 'interscoreline)))))))
+ (* scale (ly:output-def-lookup paper 'interscoreline)))))))
(define (header-end)
(string-append
"}\\vss\n}\n\\vfill\\lilypondpagebreak\n")))
(define-public (output-framework outputter book scopes fields basename )
- (let* ((bookpaper (ly:paper-book-book-paper book))
+ (let* ((paper (ly:paper-book-paper book))
(pages (ly:paper-book-pages book))
(last-page (car (last-pair pages)))
(with-extents
- (eq? #t (ly:output-def-lookup bookpaper 'dump-extents)))
+ (eq? #t (ly:output-def-lookup paper 'dump-extents)))
)
(for-each
(lambda (x)
(ly:outputter-dump-string outputter x))
(list
- (header bookpaper (length pages) #f)
- (define-fonts bookpaper)
+ (header paper (length pages) #f)
+ (define-fonts paper)
(header-end)))
(ly:outputter-dump-string outputter "\\lilypondnopagebreak")
(for-each
(define-public (output-classic-framework
outputter book scopes fields basename)
- (let* ((bookpaper (ly:paper-book-book-paper book))
+ (let* ((paper (ly:paper-book-paper book))
(lines (ly:paper-book-systems book))
(last-line (car (last-pair lines))))
(for-each
(ly:outputter-dump-string outputter x))
(list
;;FIXME
- (header bookpaper (length lines) #f)
+ (header paper (length lines) #f)
"\\def\\lilypondclassic{1}%\n"
(output-scopes scopes fields basename)
- (define-fonts bookpaper)
+ (define-fonts paper)
(header-end)))
(for-each
(define-public (output-preview-framework
outputter book scopes fields basename )
- (let* ((bookpaper (ly:paper-book-book-paper book))
+ (let* ((paper (ly:paper-book-paper book))
(lines (ly:paper-book-systems book)))
(for-each
(lambda (x)
(ly:outputter-dump-string outputter x))
(list
;;FIXME
- (header bookpaper (length lines) #f)
+ (header paper (length lines) #f)
"\\def\\lilypondclassic{1}%\n"
(output-scopes scopes fields basename)
- (define-fonts bookpaper)
+ (define-fonts paper)
(header-end)))
(dump-line outputter (car lines) #t)
(define-public (convert-to-pdf book name)
(let*
- ((defs (ly:paper-book-book-paper book))
+ ((defs (ly:paper-book-paper book))
(size (ly:output-def-lookup defs 'papersize)))
(postscript->pdf (if (string? size) size "a4")
(define-public (convert-to-png book name)
(let*
- ((defs (ly:paper-book-book-paper book))
+ ((defs (ly:paper-book-paper book))
(resolution (ly:output-def-lookup defs 'pngresolution)))
(postscript->png
(third this-list)))
(subtract-base-fret base-fret (cdr dot-list))))))
-(define (sans-serif-stencil paper props mag text)
-"create a stencil in sans-serif font based on @var{paper} and @var{props}
+(define (sans-serif-stencil layout props mag text)
+"create a stencil in sans-serif font based on @var{layout} and @var{props}
with magnification @varr{mag} of the string @var{text}."
(let* ((my-props (prepend-alist-chain 'font-size (stepmag mag)
(prepend-alist-chain 'font-family 'sans props))))
- (interpret-markup paper my-props text)))
+ (interpret-markup layout my-props text)))
-(define (sans-serif-stencil-white paper props mag text)
-"create a stencil with white text in sans-serif font based on @var{paper} and @var{props}
+(define (sans-serif-stencil-white layout props mag text)
+"create a stencil with white text in sans-serif font based on @var{layout} and @var{props}
with magnification @varr{mag} of the string @var{text}."
- (let* ((text-stencil (sans-serif-stencil paper props mag text))
+ (let* ((text-stencil (sans-serif-stencil layout props mag text))
(x-extent (ly:stencil-extent text-stencil X))
(y-extent (ly:stencil-extent text-stencil Y))
(c `(white-text ,(* 2 mag) ,text))) ;urg -- workaround for using ps font
x-extent y-extent)))
-(define (draw-frets paper props fret-range string-count th size)
+(define (draw-frets layout props fret-range string-count th size)
"Draw the frets (horizontal lines) for a fret diagram with @var{string-count} strings and frets as indicated
in @var{fret-range}. Line thickness is given by @var{th}, fret & string spacing by @var{size}. "
(let* ((fret-count (+ (- (cadr fret-range) (car fret-range)) 1))
output-stencil)))
; (ly:stencil-align-to (ly:stencil-align-to text-stencil X 0) Y 0))))
-(define (draw-dots paper props string-count fret-range size finger-code dot-position dot-radius dot-list)
+(define (draw-dots layout props string-count fret-range size finger-code dot-position dot-radius dot-list)
"Make dots for fret diagram."
(let* ((scale-dot-radius (* size dot-radius))
(dot-color (chain-assoc-get 'dot-color props 'black))
(ly:stencil-translate-axis
(ly:stencil-translate-axis
(if (eq? dot-color 'white)
- (centered-stencil (sans-serif-stencil paper props dot-label-font-mag finger))
- (centered-stencil (sans-serif-stencil-white paper props
+ (centered-stencil (sans-serif-stencil layout props dot-label-font-mag finger))
+ (centered-stencil (sans-serif-stencil-white layout props
dot-label-font-mag finger)))
xpos X)
ypos Y)
positioned-dot
(ly:stencil-translate-axis
(ly:stencil-translate-axis
- (centered-stencil (sans-serif-stencil paper props
+ (centered-stencil (sans-serif-stencil layout props
string-label-font-mag finger)) xpos X)
(* size finger-yoffset) Y))
;unknown finger-code
(if (null? restlist)
labeled-dot-stencil
(ly:stencil-add
- (draw-dots paper props string-count fret-range size finger-code
+ (draw-dots layout props string-count fret-range size finger-code
dot-position dot-radius restlist)
labeled-dot-stencil))))
-(define (draw-xo paper props string-count fret-range size xo-list)
+(define (draw-xo layout props string-count fret-range size xo-list)
"Put open and mute string indications on diagram, as contained in @var{xo-list}."
(let* ((fret-count (+ (- (cadr fret-range) (car fret-range) 1)))
; (xo-font-mag (* size (chain-assoc-get 'xo-font-magnification props 0.5)))
(glyph-string (if (eq? (car mypair) 'mute) "X" "O"))
(xpos (+ (* (- string-count (cadr mypair)) size) xo-horizontal-offset ))
(glyph-stencil (ly:stencil-translate-axis
- (sans-serif-stencil paper props (* size xo-font-mag) glyph-string) xpos X)))
+ (sans-serif-stencil layout props (* size xo-font-mag) glyph-string) xpos X)))
(if (null? restlist)
glyph-stencil
(ly:stencil-add
- (draw-xo paper props string-count fret-range size restlist)
+ (draw-xo layout props string-count fret-range size restlist)
glyph-stencil))))
(define (make-bezier-sandwich-list left right bottom height thickness)
(list (cons x1 bottom-control-point-height) (cons x2 bottom-control-point-height) (cons right bottom) (cons left bottom)
(cons x2 top-control-point-height) (cons x1 top-control-point-height) (cons left bottom) (cons right bottom))))
-(define (draw-barre paper props string-count fret-range size finger-code dot-position dot-radius barre-list)
+(define (draw-barre layout props string-count fret-range size finger-code dot-position dot-radius barre-list)
"Create barre indications for a fret diagram"
(if (not (null? barre-list))
(let* ((string1 (caar barre-list))
(cons bottom (+ bottom (* size bezier-height)))))))
(if (not (null? (cdr barre-list)))
(ly:stencil-add barre-stencil
- (draw-barre paper props string-count fret-range size finger-code
+ (draw-barre layout props string-count fret-range size finger-code
dot-position dot-radius (cdr barre-list)))
barre-stencil ))))
"Calculate the font step necessary to get a desired magnification"
(* 6 (/ (log mag) (log 2))))
-(define (label-fret paper props string-count fret-range size)
+(define (label-fret layout props string-count fret-range size)
"Label the base fret on a fret diagram"
(let* ((base-fret (car fret-range))
; (label-font-mag (chain-assoc-get 'label-font-mag props 0.7))
((equal? 'arabic number-type) (format #f "~d" base-fret))
(else (format #f "~(~:@r~)" base-fret)))))
(ly:stencil-translate-axis
- (sans-serif-stencil paper props (* size label-font-mag) label-text)
+ (sans-serif-stencil layout props (* size label-font-mag) label-text)
(* size (+ fret-count label-vertical-offset)) Y)))
-(def-markup-command (fret-diagram-verbose paper props marking-list)
+(def-markup-command (fret-diagram-verbose layout props marking-list)
(list?)
"Make a fret diagram containing the symbols indicated in @var{marking-list}
@var{finger-code}. There is no limit to the number of fret indications per string.
@end table
"
- (make-fret-diagram paper props marking-list))
+ (make-fret-diagram layout props marking-list))
-(define (make-fret-diagram paper props marking-list)
+(define (make-fret-diagram layout props marking-list)
" Make a fret diagram markup"
(let* (
; note: here we get items from props that are needed in this routine, or that are needed in more than one
(default-dot-position (if (eq? finger-code 'in-dot) (- 0.95 default-dot-radius) 0.6)) ; move up to make room for bigger if labeled
(dot-radius (chain-assoc-get 'dot-radius props default-dot-radius)) ; needed for both draw-dots and draw-barre
(dot-position (chain-assoc-get 'dot-position props default-dot-position)) ; needed for both draw-dots and draw-barre
- (th (* (ly:output-def-lookup paper 'linethickness)
+ (th (* (ly:output-def-lookup layout 'linethickness)
(chain-assoc-get 'thickness props 0.5))) ; needed for both draw-frets and draw-strings
(alignment (chain-assoc-get 'align-dir props -0.4)) ; needed only here
(barre-list (cdr (assoc 'barre-list parameters)))
(fret-diagram-stencil (ly:stencil-add
(draw-strings string-count fret-range th size)
- (draw-frets paper props fret-range string-count th size))))
+ (draw-frets layout props fret-range string-count th size))))
(if (not (null? barre-list))
(set! fret-diagram-stencil (ly:stencil-add
- (draw-barre paper props string-count fret-range size finger-code
+ (draw-barre layout props string-count fret-range size finger-code
dot-position dot-radius barre-list)
fret-diagram-stencil)))
(if (not (null? dot-list))
(set! fret-diagram-stencil (ly:stencil-add
- (draw-dots paper props string-count fret-range size finger-code
+ (draw-dots layout props string-count fret-range size finger-code
dot-position dot-radius dot-list)
fret-diagram-stencil)))
(if (not (null? xo-list))
(set! fret-diagram-stencil (ly:stencil-combine-at-edge
fret-diagram-stencil Y UP
- (draw-xo paper props string-count fret-range size xo-list) xo-padding 0)))
+ (draw-xo layout props string-count fret-range size xo-list) xo-padding 0)))
(if (> (car fret-range) 1)
(set! fret-diagram-stencil
(ly:stencil-combine-at-edge fret-diagram-stencil X label-dir
- (label-fret paper props string-count fret-range size) label-space 0)))
+ (label-fret layout props string-count fret-range size) label-space 0)))
(ly:stencil-align-to! fret-diagram-stencil X alignment)
fret-diagram-stencil))
-(def-markup-command (fret-diagram paper props definition-string)
+(def-markup-command (fret-diagram layout props definition-string)
(string?)
"
Example
"
(let ((definition-list (fret-parse-definition-string props definition-string)))
- (make-fret-diagram paper (car definition-list) (cdr definition-list))))
+ (make-fret-diagram layout (car definition-list) (cdr definition-list))))
(define (fret-parse-definition-string props definition-string)
"parse a fret diagram string and return a pair containing:
(cons* numeric-value (numerify (cdr mylist)))
(cons* (car (string->list (car mylist))) (numerify (cdr mylist)))))))
-(def-markup-command (fret-diagram-terse paper props definition-string)
+(def-markup-command (fret-diagram-terse layout props definition-string)
(string?)
"Make a fret diagram markup using terse string-based syntax.
@end itemize"
;TODO -- change syntax to fret\string-finger
(let ((definition-list (fret-parse-terse-definition-string props definition-string)))
- (make-fret-diagram paper (car definition-list) (cdr definition-list))))
+ (make-fret-diagram layout (car definition-list) (cdr definition-list))))
(define (fret-parse-terse-definition-string props definition-string)
"parse a fret diagram string that uses terse syntax; return a pair containing:
;; parser stuff.
(define-public (print-music-as-book parser music)
(let* ((head (ly:parser-lookup parser '$globalheader))
- (book (ly:make-book (ly:parser-lookup parser $defaultbookpaper)
+ (book (ly:make-book (ly:parser-lookup parser $defaultpaper)
head score)))
(ly:parser-print-book parser book)))
(define-public (print-score-as-book parser score)
(let*
((head (ly:parser-lookup parser '$globalheader))
- (book (ly:make-book (ly:parser-lookup parser $defaultbookpaper)
+ (book (ly:make-book (ly:parser-lookup parser $defaultpaper)
head score)))
(ly:parser-print-book parser book)))
(define-public (print-score parser score)
(let* ((head (ly:parser-lookup parser '$globalheader))
- (book (ly:make-book (ly:parser-lookup parser $defaultbookpaper)
+ (book (ly:make-book (ly:parser-lookup parser $defaultpaper)
head score)))
(ly:parser-print-score parser book)))
To add a function, use the def-markup-command utility.
- (def-markup-command (mycommand paper prop arg1 ...) (arg1-type? ...)
+ (def-markup-command (mycommand layout prop arg1 ...) (arg1-type? ...)
\"my command usage and description\"
...function body...)
* define a make-COMMAND-markup function.
Syntax:
- (def-markup-command (COMMAND paper props arg1 arg2 ...) (arg1-type? arg2-type? ...)
+ (def-markup-command (COMMAND layout props arg1 arg2 ...) (arg1-type? arg2-type? ...)
\"documentation string\"
...command body...)
or:
;; FIXME: a hammer is not a slur.
;;
(ly:make-stencil '() '(0 . 0) '(0 . 0)))
- (paper (ly:grob-paper grob))
+ (layout (ly:grob-layout grob))
(text (interpret-markup
- paper
- (ly:grob-alist-chain grob (ly:output-def-lookup paper 'text-font-defaults))
+ layout
+ (ly:grob-alist-chain grob (ly:output-def-lookup layout 'text-font-defaults))
letter)))
(let ((x (/ (- (cdr (ly:stencil-extent slur 0))
(draw-line th x1 0 x2 0))
(define (lily-def key val)
- (let ((prefix "lilypondpaper"))
+ (let ((prefix "lilypondlayout"))
(if (string=?
(substring key 0 (min (string-length prefix) (string-length key)))
prefix)
(define (comment s)
(string-append "<!-- " s " -->\n"))
-(define (define-fonts paper font-list)
+(define (define-fonts layout font-list)
(comment (format #f "Fonts used: ~S" font-list)))
(define (filledbox breapth width depth height)
(define (header-end)
(comment "header-end"))
-(define (header creator time-stamp paper page-count- classic?)
+(define (header creator time-stamp layout page-count- classic?)
(string-append
xml-header
(comment creator)
;; FIXME: duplicated in other output backends
;; FIXME: silly interface name
-(define (output-scopes paper scopes fields basename)
+(define (output-scopes layout scopes fields basename)
(format (current-error-port) "TODO: FIX ps/tex/interface\n"))
;; FIXME: duplictates output-scopes, duplicated in other backends
;; FIXME: silly interface name
-(define (output-paper-def pd)
+(define (output-layout-def pd)
(format (current-error-port) "TODO: FIX ps/tex/interface\n"))
(define (lily-def key val)
;; TODO: take <optimally-broken-page-node> iso. page-number
;; for all of these functions ?
-(define-public (plain-header paper scopes page-number last?)
+(define-public (plain-header layout scopes page-number last?)
"Standard header for a part: page number --outside-- and instrument--centered."
- (let* ((props (page-properties paper))
+ (let* ((props (page-properties layout))
(pnum
- (if (ly:output-def-lookup paper 'printpagenumber)
+ (if (ly:output-def-lookup layout 'printpagenumber)
(markup #:bold (number->string page-number))
""))
(instr (ly:modules-lookup scopes 'instrument))
(if (even? page-number)
(set! line (reverse line)))
- (if ((if (ly:output-def-lookup paper 'printfirstpagenumber)
+ (if ((if (ly:output-def-lookup layout 'printfirstpagenumber)
<=
<)
- (ly:output-def-lookup paper 'firstpagenumber) page-number)
- (interpret-markup paper props (make-fill-line-markup line))
+ (ly:output-def-lookup layout 'firstpagenumber) page-number)
+ (interpret-markup layout props (make-fill-line-markup line))
'())))
;; TODO: add publisher ID on non-first page.
-(define-public (plain-footer paper scopes page-number last?)
+(define-public (plain-footer layout scopes page-number last?)
"Standard footer. Empty, save for first (copyright) and last (tagline) page."
(let*
- ((props (page-properties paper))
+ ((props (page-properties layout))
(copyright (ly:modules-lookup scopes 'copyright))
(tagline-var (ly:modules-lookup scopes 'tagline))
(tagline (if (markup? tagline-var) tagline-var TAGLINE))
(if last?
(set! stencil
(ly:stencil-combine-at-edge
- stencil Y DOWN (interpret-markup paper props tagline)
+ stencil Y DOWN (interpret-markup layout props tagline)
0.0
)))
(set! stencil
(ly:stencil-combine-at-edge
- stencil Y DOWN (interpret-markup paper props copyright)
+ stencil Y DOWN (interpret-markup layout props copyright)
0.0
)))
stencil))
-(define (page-headfoot paper scopes number sym sepsym dir last?)
+(define (page-headfoot layout scopes number sym sepsym dir last?)
"Create a stencil including separating space."
(let*
- ((header-proc (ly:output-def-lookup paper sym))
- (sep (ly:output-def-lookup paper sepsym))
+ ((header-proc (ly:output-def-lookup layout sym))
+ (sep (ly:output-def-lookup layout sepsym))
(stencil (ly:make-stencil "" '(0 . 0) '(0 . 0)))
(head-stencil
(if (procedure? header-proc)
- (header-proc paper scopes number last?)
+ (header-proc layout scopes number last?)
#f)))
(if (and (number? sep) (ly:stencil? head-stencil))
head-stencil))
-(define-public (default-page-music-height paper scopes number last?)
+(define-public (default-page-music-height layout scopes number last?)
"Printable area for music and titles; matches default-page-make-stencil."
(let*
- ((h (- (ly:output-def-lookup paper 'vsize)
- (ly:output-def-lookup paper 'topmargin)
- (ly:output-def-lookup paper 'bottommargin)))
- (head (page-headfoot paper scopes number 'make-header 'headsep UP last?))
- (foot (page-headfoot paper scopes number 'make-footer 'footsep DOWN last?)))
+ ((h (- (ly:output-def-lookup layout 'vsize)
+ (ly:output-def-lookup layout 'topmargin)
+ (ly:output-def-lookup layout 'bottommargin)))
+ (head (page-headfoot layout scopes number 'make-header 'headsep UP last?))
+ (foot (page-headfoot layout scopes number 'make-footer 'footsep DOWN last?)))
(- h (if (ly:stencil? head)
(interval-length (ly:stencil-extent head Y))
0)
(define-public (default-page-make-stencil
- lines offsets paper scopes number last? )
+ lines offsets layout scopes number last? )
"Construct a stencil representing the page from LINES. "
(let*
- ((topmargin (ly:output-def-lookup paper 'topmargin))
+ ((topmargin (ly:output-def-lookup layout 'topmargin))
;; TODO: naming vsize/hsize not analogous to TeX.
- (vsize (ly:output-def-lookup paper 'vsize))
- (hsize (ly:output-def-lookup paper 'hsize))
+ (vsize (ly:output-def-lookup layout 'vsize))
+ (hsize (ly:output-def-lookup layout 'hsize))
- (lmargin (ly:output-def-lookup paper 'leftmargin))
+ (lmargin (ly:output-def-lookup layout 'leftmargin))
(leftmargin (if lmargin
lmargin
(/ (- hsize
- (ly:output-def-lookup paper 'linewidth)) 2)))
+ (ly:output-def-lookup layout 'linewidth)) 2)))
- (rightmargin (ly:output-def-lookup paper 'rightmargin))
+ (rightmargin (ly:output-def-lookup layout 'rightmargin))
(bottom-edge (- vsize
- (ly:output-def-lookup paper 'bottommargin)))
+ (ly:output-def-lookup layout 'bottommargin)))
- (head (page-headfoot paper scopes number 'make-header 'headsep UP last?))
- (foot (page-headfoot paper scopes number 'make-footer 'footsep DOWN last?))
+ (head (page-headfoot layout scopes number 'make-header 'headsep UP last?))
+ (foot (page-headfoot layout scopes number 'make-footer 'footsep DOWN last?))
(head-height (if (ly:stencil? head)
(interval-length (ly:stencil-extent head Y))
0.0))
(line-stencils (map ly:paper-system-stencil lines))
- (height-proc (ly:output-def-lookup paper 'page-music-height))
+ (height-proc (ly:output-def-lookup layout 'page-music-height))
(page-stencil (ly:make-stencil '()
(cons leftmargin hsize)
(define MAXPENALTY 1e9)
- (define bookpaper (ly:paper-book-book-paper paper-book))
+ (define paper (ly:paper-book-paper paper-book))
(define scopes (ly:paper-book-scopes paper-book))
(define (page-height page-number last?)
(let
- ((p (ly:output-def-lookup bookpaper 'page-music-height)))
+ ((p (ly:output-def-lookup paper 'page-music-height)))
(if (procedure? p)
- (p bookpaper scopes page-number last?)
+ (p paper scopes page-number last?)
10000)))
(define (get-path node done)
(prev-penalty (if (null? best-paths)
0.0
(node-penalty (car best-paths))))
- (inter-system-space (ly:output-def-lookup bookpaper 'betweensystemspace))
+ (inter-system-space (ly:output-def-lookup paper 'betweensystemspace))
(force-equalization-factor 0.3)
(relative-force (/ force inter-system-space))
(abs-relative-force (abs relative-force))
(define (space-systems page-height lines ragged?)
(let*
((inter-system-space
- (ly:output-def-lookup bookpaper 'betweensystemspace))
+ (ly:output-def-lookup paper 'betweensystemspace))
(system-vector (list->vector
(append lines
(if (= (length lines) 1)
(- (car (vector-ref real-extents (1- no-systems))))
))
- (fixed-dist (ly:output-def-lookup bookpaper 'betweensystempadding))
+ (fixed-dist (ly:output-def-lookup paper 'betweensystempadding))
(calc-spring
(lambda (idx)
(let*
(ideal (+
(cond
((and title2? title1?)
- (ly:output-def-lookup bookpaper 'betweentitlespace))
+ (ly:output-def-lookup paper 'betweentitlespace))
(title1?
- (ly:output-def-lookup bookpaper 'aftertitlespace))
+ (ly:output-def-lookup paper 'aftertitlespace))
(title2?
- (ly:output-def-lookup bookpaper 'beforetitlespace))
+ (ly:output-def-lookup paper 'beforetitlespace))
(else inter-system-space))
fixed))
(hooke (/ 1 (- ideal fixed)))
CURRENT-BEST is the best result sofar, or #f."
(let* ((this-page-num (if (null? best-paths)
- (ly:output-def-lookup bookpaper 'firstpagenumber)
+ (ly:output-def-lookup paper 'firstpagenumber)
(1+ (node-page-number (car best-paths)))))
- (ragged? (or (eq? #t (ly:output-def-lookup bookpaper 'raggedbottom))
- (and (eq? #t (ly:output-def-lookup bookpaper 'raggedlastbottom))
+ (ragged? (or (eq? #t (ly:output-def-lookup paper 'raggedbottom))
+ (and (eq? #t (ly:output-def-lookup paper 'raggedlastbottom))
last?)))
(page-height (page-height this-page-num last?))
(vertical-spacing (space-systems page-height current-lines ragged?))
; create stencils.
(map (lambda (node)
- ((ly:output-def-lookup bookpaper 'page-make-stencil)
+ ((ly:output-def-lookup paper 'page-make-stencil)
(node-lines node)
(node-configuration node)
- bookpaper
+ paper
scopes
(node-page-number node)
(eq? node best-break-node)))
-;;;; paper.scm -- manipulate the paper block.
+;;;; paper.scm -- manipulate the paper and layout block.
;;;;
;;;; source file of the GNU LilyPond music typesetter
;;;;
staffspace linethickness ledgerlinethickness
blotdiameter interscoreline leftmargin rightmargin)))
-(define-public (paper-set-staff-size sz)
- "Function to be called inside a \\paper{} block to set the staff size."
+(define-public (layout-set-staff-size sz)
+ "Function to be called inside a \\layout{} block to set the staff size."
(let* ((m (current-module))
(ss (/ sz 4))
(pt (eval 'pt m))
(module-define! m 'linethickness lt)
(module-define! m 'ledgerlinethickness (+ (* 0.5 pt) (/ ss 10)))
(module-define! m 'blotdiameter (* 0.35 pt))
- (module-define! m 'interscoreline (* 4 mm))
-
- ))
+ (module-define! m 'interscoreline (* 4 mm))))
(define-public (set-global-staff-size sz)
"Set the default staff size, where SZ is thought to be in PT."
(let* ((old-mod (current-module))
- (pap (eval '$defaultbookpaper old-mod))
- (in-paper? (or (module-defined? old-mod 'is-bookpaper)
- (module-defined? old-mod 'is-paper)))
+ (pap (eval '$defaultpaper old-mod))
+ (in-layout? (or (module-defined? old-mod 'is-paper)
+ (module-defined? old-mod 'is-layout)))
; maybe not necessary.
; but let's be paranoid. Maybe someone still refers to the
(new-scope (ly:output-def-scope new-paper)))
- (if in-paper?
+ (if in-layout?
(ly:warn "Not in toplevel scope"))
(set-current-module new-scope)
- (paper-set-staff-size (* sz (eval 'pt new-scope)))
+ (layout-set-staff-size (* sz (eval 'pt new-scope)))
(set-current-module old-mod)
- (module-define! old-mod '$defaultbookpaper new-paper)))
+ (module-define! old-mod '$defaultpaper new-paper)))
(define paper-alist
'(("a6" . (cons (* 105 mm) (* 148.95 mm)))
;; todo: take dimension arguments.
(define (set-paper-dimensions m w h)
- "M is a module (i.e. paper->scope_ )"
+ "M is a module (i.e. layout->scope_ )"
(let* ((mm (eval 'mm m)))
(module-define! m 'hsize w)
(module-define! m 'vsize h)
(cons (cdr x) (car x)))
(let* ((entry (assoc name paper-alist))
- (is-bookpaper? (module-defined? module 'is-bookpaper))
+ (is-paper? (module-defined? module 'is-paper))
(mm (eval 'mm module)))
(cond
- ((not is-bookpaper?)
- (ly:warning "This is not a \\paper {} object, ~S"
+ ((not is-paper?)
+ (ly:warning "This is not a \\layout {} object, ~S"
module))
((pair? entry)
(module-define! module 'papersize name)
(module-define! module 'papersizename name)
(if landscape?
- (module-define! module 'landscape #t))
- )
+ (module-define! module 'landscape #t)))
(else
- (ly:warn (string-append "Unknown papersize: " name))))
-
- ))
+ (ly:warn (string-append "Unknown papersize: " name))))))
(define-public (set-default-paper-size name . rest)
(internal-set-paper-size
- (ly:output-def-scope (eval '$defaultbookpaper (current-module)))
+ (ly:output-def-scope (eval '$defaultpaper (current-module)))
name
- (memq 'landscape rest)
- ))
+ (memq 'landscape rest)))
(define-public (set-paper-size name . rest)
- (if (module-defined? (current-module) 'is-bookpaper)
+ (if (module-defined? (current-module) 'is-paper)
(internal-set-paper-size (current-module) name
(memq 'landscape rest))
;;; TODO: should raise (generic) exception with throw, and catch
;;; that in parse-scm.cc
- (ly:warn "Must use #(set-paper-size .. ) within \\bookpaper { ... }")))
+ (ly:warn "Must use #(set-paper-size .. ) within \\paper { ... }")))
-(define-public (scale-paper pap scale)
- (let*
- ((new-pap (ly:output-def-clone pap))
- (dim-vars (ly:output-def-lookup pap 'dimension-variables))
- (old-scope (ly:output-def-scope pap))
- (scope (ly:output-def-scope new-pap)))
+(define-public (scale-layout pap scale)
+ (let* ((new-pap (ly:output-def-clone pap))
+ (dim-vars (ly:output-def-lookup pap 'dimension-variables))
+ (old-scope (ly:output-def-scope pap))
+ (scope (ly:output-def-scope new-pap)))
(for-each
(lambda (v)
- (let*
- ((var (module-variable old-scope v))
- (val (if (variable? var) (variable-ref var) #f)))
+ (let* ((var (module-variable old-scope v))
+ (val (if (variable? var) (variable-ref var) #f)))
(if (number? val)
(module-define! scope v
(/ val scale))
- ;; spurious warnings, eg. for hsize, vsize.
-; (ly:warn "not a number, ~S = ~S " v val)
- )))
+ ;; spurious warnings, eg. for hsize, vsize.
+ ;; (ly:warn "not a number, ~S = ~S " v val)
+ )))
dim-vars)
-
- new-pap
- ))
+
+ new-pap))
ly:grob-alist-chain
ly:grob-extent
ly:grob-original
- ly:grob-paper
+ ly:grob-layout
ly:grob-parent
ly:grob-pq-less?
ly:grob-property
ly:output-def-scope
ly:output-description
ly:paper-book?
- ly:paper-def?
+ ly:layout-def?
ly:paper-get-font
ly:paper-get-number
ly:paper-system-break-penalty
set-global-staff-size
;; FIXME: cannot change staff size in --safe-mode
- ;;$defaultbookpaper
- ;;$defaultmidi
;;$defaultpaper
+ ;;$defaultmidi
+ ;;$defaultlayout
;; need these for parsing init files:
;; todo: should have a macro define-safe-public
;;;; (c) 2004 Jan Nieuwenhuizen <janneke@gnu.org>
;;;; Han-Wen Nienhuys <hanwen@cs.uu.nl>
-(define-public (page-properties paper)
+(define-public (page-properties layout)
(list (append `((linewidth . ,(ly:paper-get-number
- paper 'linewidth)))
- (ly:output-def-lookup paper 'text-font-defaults))))
+ layout 'linewidth)))
+ (ly:output-def-lookup layout 'text-font-defaults))))
;;;;;;;;;;;;;;;;;;
; titling.
-(define-public (default-book-title paper scopes)
+(define-public (default-book-title layout scopes)
"Generate book title from header strings."
(define (has sym)
(markup? (ly:modules-lookup scopes sym)))
- (let ((props (page-properties paper)))
+ (let ((props (page-properties layout)))
(interpret-markup
- paper props
+ layout props
(make-override-markup
'(baseline-skip . 4)
(make-column-markup
))))))))))
-(define-public (default-user-title paper markup)
+(define-public (default-user-title layout markup)
"Generate book title from header markup."
(if (markup? markup)
- (let ((props (page-properties paper))
+ (let ((props (page-properties layout))
(baseline-skip (chain-assoc-get 'baseline-skip props 2)) )
(stack-lines DOWN 0 BASELINE-SKIP
- (list (interpret-markup paper props markup))))))
+ (list (interpret-markup layout props markup))))))
-(define-public (default-score-title paper scopes)
+(define-public (default-score-title layout scopes)
"Generate score title from header strings."
(define (get sym)
(define (has sym)
(markup? (ly:modules-lookup scopes sym)))
- (let ((props (page-properties paper)))
+ (let ((props (page-properties layout)))
(interpret-markup
- paper props
+ layout props
(make-override-markup
'(baseline-skip . 4)
(make-column-markup
<score>
<music></music>
- <paperoutput>
- </paperoutput>
+ <layoutoutput>
+ </layoutoutput>
</score>
"
for i in range (len (lyrics)):
outf.write ( lyrics [i])
outf.write ("\n")
- outf.write(" >>\n \\paper{}\n}\n")
+ outf.write(" >>\n \\layout{}\n}\n")
def dump_default_bar (outf):
"""
outf.write("\n\t { \\words%sV%s }" % ( m, l) )
outf.write ( "\n\t>>\n" )
outf.write ("\n >>")
- outf.write ("\n\t\\paper {\n")
+ outf.write ("\n\t\\layout {\n")
if part_names:
outf.write ("\t \\translator \n\t {\n")
outf.write ("\t\t\\StaffContext\n")
conv,
'''Text_item -> Text_interface''' ))
+def conv (str):
+ str = re.sub (r'\\paper', r'\\layout', str)
+ str = re.sub (r'\\bookpaper', r'\\paper', str)
+ return str
+
+conversions.append (((2, 3, 22),
+ conv,
+ '''paper -> layout
+ bookpaper -> paper''' ))
+
################################
# END OF CONVERSIONS
################################
#
AFTER = 'after'
BEFORE = 'before'
-BOOKPAPER = 'bookpaper'
EXAMPLEINDENT = 'exampleindent'
FILTER = 'filter'
FRAGMENT = 'fragment'
HTML = 'html'
INDENT = 'indent'
LATEX = 'latex'
+LAYOUT = 'layout'
LINEWIDTH = 'linewidth'
NOFRAGMENT = 'nofragment'
NOINDENT = 'noindent'
NOTES: {
RELATIVE: r'''\relative c%(relative_quotes)s''',
},
- BOOKPAPER: {
+ PAPER: {
INDENT : r'''
indent = %(indent)s''',
'linewidth' : r'''
},
##
- PAPER: {
+ LAYOUT: {
EXAMPLEINDENT : '',
NOTIME : r'''
p (ly:music-scorify m p))
))
%(preamble_string)s
-\bookpaper {
+\paper {
#(define dump-extents #t)
- %(bookpaper_string)s
+ %(paper_string)s
}
-\paper { %(paper_string)s
+\layout { %(layout_string)s
}
"""
relative = 1
staffsize = 16
override = {}
- override.update (default_ly_options)
#FIXME: where to get sane value for exampleindent?
override[EXAMPLEINDENT] = r'9.0 \mm'
+ override[LINEWIDTH] = None
+ override.update (default_ly_options)
option_string = string.join (options, ',')
options_dict = {}
- option_types = [NOTES, PREAMBLE, PAPER, BOOKPAPER]
+ option_types = [NOTES, PREAMBLE, LAYOUT, PAPER]
for a in option_types:
options_dict[a] = []
relative_quotes += "'" * relative
program_name = __main__.program_name
-
+
paper_string = string.join (options_dict[PAPER], '\n ') % override
- bookpaper_string = string.join (options_dict[BOOKPAPER], '\n ') % override
+ layout_string = string.join (options_dict[LAYOUT], '\n ') % override
notes_string = string.join (options_dict[NOTES], '\n ') % vars ()
preamble_string = string.join (options_dict[PREAMBLE], '\n ') % override
return (PREAMBLE_LY + body) % vars ()
% textwidth
elif format == TEXINFO:
for (k, v) in texinfo_linewidths.items ():
- # FIXME: @paper is usually not in chunk #0:
+ # FIXME: @layout is usually not in chunk #0:
# \input texinfo @c -*-texinfo-*-
# bluntly search first K of source
# s = chunks[0].replacement_text ()
#junkme?
('', '', 'no-lily', _ ("don't run LilyPond")),
#junkme?
- ('', 'm', 'no-paper', _ ("produce MIDI output only")),
+ ('', 'm', 'no-layout', _ ("produce MIDI output only")),
(_ ("FILE"), 'o', 'output', _ ("write output to FILE")),
(_ ('RES'), '', 'preview-resolution',
header_fields = extra_init.keys ()
include_path = ['.']
-paper_p = 1
+layout_p = 1
output_name = ''
## UGHr
if pseudo_filter_p:
opts += ' --output=lelie'
- if paper_p:
+ if layout_p:
opts += ' ' + string.join (map (lambda x : '--header=' + x,
header_fields))
else:
- opts = opts + ' --no-paper'
+ opts = opts + ' --no-layout'
if safe_mode_p:
opts = opts + ' --safe-mode'
# search only the first 10k
s = s[:10240]
for x in header_fields:
- m = re.search (r'\\def\\lilypondpaper%s{([^}]*)}' % x, s)
+ m = re.search (r'\\def\\lilypondlayout%s{([^}]*)}' % x, s)
if m:
set_setting (extra, x, m.group (1))
targets.append ('PNG')
elif o == '--preview-resolution':
preview_resolution = string.atoi (a)
- elif o == '--no-paper' or o == '-m':
+ elif o == '--no-layout' or o == '-m':
targets = ['MIDI']
- paper_p = 0
+ layout_p = 0
elif o == '--output' or o == '-o':
output_name = a
elif o == '--safe-mode' or o == '-s':
\score {
<<%s
>>
- \paper {}
+ \layout {}
\midi {}
}
''' % refs