+2004-03-10 Han-Wen Nienhuys <hanwen@xs4all.nl>
+
+ * Documentation/user/*.itely: user manual edits.
+
2004-03-09 Han-Wen Nienhuys <hanwen@xs4all.nl>
* Documentation/user/converters.itely (Invoking musedata2ly):
@menu
* Tuning objects::
* Constructing a tweak::
+* Selecting font sizes::
* Font selection::
@end menu
c'4
@end lilypond
-The following example gives exactly the same result as the previous
-one (assuming the system default for stem thickness is 1.3):
-@c
-@lilypond[verbatim]
- c'4 \override Stem #'thickness = #4.0
- c'4
- c'4 \override Stem #'thickness = #1.3
- c'4
-@end lilypond
+
Reverting a setting which was not set in the first place has no
effect.
Three pieces of information are required to use @code{\override} and
@code{\set}: the name of the layout object, the context and the name
of the property. We demonstrate how to glean this information from
-the notation manual and the generated documentation.
+the notation manual and the program reference.
The generated documentation is a set of HTML pages which should be
included if you installed a binary distribution, typically in
@file{/usr/share/doc/lilypond}. They are also available on the web:
go to the @uref{http://lilypond.org,LilyPond website}, click
-``Documentation'', select the correct version, and click then
+``Documentation'', select the correct version, and then click
``Program reference.'' It is advisable to bookmark the local HTML
-files. They will load faster than the ones on the web. If you use the
-version from the web, you must check whether the documentation matches
-the program version: it is generated from the definitions that the
-program uses, and therefore it is strongly tied to the LilyPond
-version.
+files. They will load faster than the ones on the web and matches the
+version of LilyPond you are using.
+
@c [TODO: revise for new site.]
-Suppose we want to move the fingering indication in the fragment below:
+Suppose we want to move the fingering indication in the fragment
+below:
@lilypond[relative=2,verbatim]
c-2
(@internalsref{item-interface}), the symbol is a piece of text
(@internalsref{text-interface}), whose font can be set
(@internalsref{font-interface}). It is centered horizontally
-(@internalsref{self-alignment-interface}), it is placed next to other
-objects (@internalsref{side-position-interface}) vertically, and its
-placement is coordinated with other scripts
+(@internalsref{self-alignment-interface}), it is placed vertically
+next to other objects (@internalsref{side-position-interface}), and
+its placement is coordinated with other scripts
(@internalsref{text-script-interface}). It also has the standard
@internalsref{grob-interface} (grob stands for Graphical object)
@cindex grob
to tweak by browsing the internals document.
-
-
-@node Font selection
-@subsection Font selection
+@node Selecting font sizes
+@subsection Selecting font sizes
The most common thing to change about the appearance of fonts is their
size. The font size of any context can be easily changed by setting
example is given below:
@c
@lilypond[fragment,relative=1,verbatim]
- c4 c4 \set fontSize = #-1
+ c4 c4 \set fontSize = #-3
f4 g4
@end lilypond
-This command will set @code{font-size} (see below), and does
-not change the size of variable symbols, such as beams or slurs.
+This command will set @code{font-size} (see below) in all layout
+objects in the current context. It does not change the size of
+variable symbols, such as beams or slurs.
+
+The font size is set by modifying the @code{font-size} property. Its
+value is a number indicating the size relative to the standard size.
+Each step up is an increase of approximately 12% of the font size. Six
+steps is exactly a factor two. The Scheme function @code{magstep}
+converts a @code{font-size} number to a scaling factor.
+
+LilyPond has fonts in different design sizes: the music fonts for
+smaller sizes are chubbier, while the text fonts are relatively wider.
+Font size changes are achieved by scaling the design size that is
+closest to the desired size.
+
+The @code{font-size} mechanism does not work for fonts selected
+through @code{font-name}. These may be scaled with
+@code{font-magnification}.
+
One of the uses of @code{fontSize} is to get smaller symbols for cue
notes. An elaborate example of those is in
@inputfileref{input/test,cue-notes.ly}.
+@cindex @code{font-style}
+
+@refcommands
+
+The following commands set @code{fontSize} for the current voice.
+
+@cindex @code{\tiny}
+@code{\tiny},
+@cindex @code{\small}
+@code{\small},
+@cindex @code{\normalsize}
+@code{\normalsize}.
+
+
+
@cindex magnification
@cindex cue notes
-The font used for printing a object can be selected by setting
-@code{font-name}, e.g.
-@example
- \override Staff.TimeSignature
- #'font-name = #"cmr17"
-@end example
-
-@noindent
-Any font can be used, as long as it is available to @TeX{}. Possible
-fonts include foreign fonts or fonts that do not belong to the
-Computer Modern font family. The size of fonts selected in this way
-can be changed with the @code{font-magnification} property. For
-example, @code{2.0} blows up all letters by a factor 2 in both
-directions.
-@cindex font size
-@cindex font magnification
+@node Font selection
+@subsection Font selection
Font selection for the standard fonts, @TeX{}'s Computer Modern fonts,
can also be adjusted with a more fine-grained mechanism. By setting
@code{font-interface}:
-@table @code
-@item font-family
+@itemize @bullet
+@item @code{font-family}
is a symbol indicating the general class of the typeface. Supported are
@code{roman} (Computer Modern), @code{braces} (for piano staff
braces), @code{music} (the standard music font, including ancient
glyphs), @code{dynamic} (for dynamic signs) and @code{typewriter}.
-@item font-shape
+@item @code{font-shape}
is a symbol indicating the shape of the font, there are typically several
font shapes available for each font family. Choices are @code{italic},
@code{caps} and @code{upright}.
-@item font-series
+@item @code{font-series}
is a symbol indicating the series of the font. There are typically several
font series for each font family and shape. Choices are @code{medium}
and @code{bold}.
@end table
-For any of these properties, the value @code{*} (i.e. the symbol
-@code{*}, entered as @code{#'*}), acts as a wildcard. This can be used
-to override default setting, which are always present. For example:
-@example
- \override Lyrics .LyricText #'font-series = #'bold
- \override Lyrics .LyricText #'font-family = #'typewriter
- \override Lyrics .LyricText #'font-shape = #'*
-@end example
-
-@cindex @code{font-style}
-The font size is set by modifying the @code{font-size} property. Its
-value is a number indicating the size relative to the standard size.
-Each step up is an increase of approximately 12% of the font size. Six
-steps is exactly a factor two. The Scheme function @code{magstep}
-converts a @code{font-size} number to a scaling factor.
+Fonts selected in the way sketched above come from a predefined style
+sheet.
-LilyPond has fonts in different design sizes: the music fonts for
-smaller sizes are chubbier, while the text fonts are relatively wider.
-Font size changes are achieved by scaling the design size that is
-closest to the desired size.
+ The font used for printing a object can be selected by setting
+@code{font-name}, e.g.
+@example
+ \override Staff.TimeSignature
+ #'font-name = #"cmr17"
+@end example
-The @code{font-size} mechanism does not work for fonts selected
-through @code{font-name}. These may be scaled with
-@code{font-magnification}.
+@noindent
+Any font can be used, as long as it is available to @TeX{}. Possible
+fonts include foreign fonts or fonts that do not belong to the
+Computer Modern font family. The size of fonts selected in this way
+can be changed with the @code{font-magnification} property. For
+example, @code{2.0} blows up all letters by a factor 2 in both
+directions.
-@refcommands
+@cindex font size
+@cindex font magnification
-The following commands set @code{fontSize} for the current voice.
-@cindex @code{\tiny}
-@code{\tiny},
-@cindex @code{\small}
-@code{\small},
-@cindex @code{\normalsize}
-@code{\normalsize}.
@seealso
@refbugs
-There is no style sheet provided for other fonts besides the @TeX{}
+No style sheet is provided for other fonts besides the @TeX{}
Computer Modern family.
@cindex font selection
any effects of alignments applied to their markup arguments as a
whole. For example, the @internalsref{RehearsalMark} is horizontally
centered, so using @code{\mark \markup @{ \left-align .. @}} has no
-effect. Similarly, whole texts over notes cannot be moved vertically
-with @code{\raise}. For moving and aligning complete objects, grob
-properties should be used.
+effect.
+
+Similarly, for moving whole texts over notes with
+@code{\raise}, use the following trick:
+@example
+ "" \raise #0.5 raised
+@end example
+
+The text @code{raised} is now raised relative to the empty string
+@code{""} which is not visible. Alternatively, complete objects can
+be moved with layout properties such as @code{padding} and
+@code{extra-offset}.
@node Font Size
@subsection Font size
+
@cindex font size, setting
@cindex staff size, setting
@cindex @code{paper} file
-The Feta font provides musical symbols at eight seven different
+The Feta font provides musical symbols at eight different
sizes. Each font is tuned for a different staff size: at smaller sizes
the font gets heavier, to match the relatively heavier staff lines.
The recommended font sizes are listed in the following table:
@multitable @columnfractions .25 .25 .25 .25
-@item @b{name}
+@item @b{font name}
@tab @b{staff height (pt)}
@tab @b{staff height (mm)}
@tab @b{use}
@tab pocket scores
@item feta13
-@tab 12.60pt
-@tab 4.4mm
+@tab 12.60
+@tab 4.4
@tab
@item feta14
-@tab 14.14pt
-@tab 5.0mm
+@tab 14.14
+@tab 5.0
@tab
@item feta16
-@tab 15.87pt
-@tab 5.6mm
+@tab 15.87
+@tab 5.6
@tab
@item feta18
-@tab 17.82pt
-@tab 6.3mm
+@tab 17.82
+@tab 6.3
@tab song books
@item feta20
-@tab 17.82pt
-@tab 7.0mm
+@tab 17.82
+@tab 7.0
@tab standard parts
@item feta23
-@tab 22.45 pt
-@tab 7.9mm
+@tab 22.45
+@tab 7.9
@tab
@item feta20
-@tab 25.2 pt
-@tab 8.9mm
+@tab 25.2
+@tab 8.9
@tab
@c modern rental material ?
This sets the global default size to 14pt staff height, and scales all
fonts accordingly.
+@seealso
+
+This manual: @ref{Selecting font sizes}.
@node Line breaking
engine: variables controlling page layout are passed to the output,
and are further interpreted by @code{lilypond} wrapper program. It
responds to the following variables in the @code{\paper} block. The
-variable @code{textheight} sets the total height of the music on each
-page. The spacing between systems is controlled with
-@code{interscoreline}, its default is 16pt. The distance between the
-score lines will stretch in order to fill the full page
-@code{interscorelinefill} is set to a positive number. In that case
-@code{interscoreline} specifies the minimum spacing.
+spacing between systems is controlled with @code{interscoreline}, its
+default is 16pt. The distance between the score lines will stretch in
+order to fill the full page @code{interscorelinefill} is set to a
+positive number. In that case @code{interscoreline} specifies the
+minimum spacing.
@cindex @code{textheight}
@cindex @code{interscoreline}
the musical input. The idea of this approach is to separate the
musical aspects of the input from the notation style of the output.
This way, the same input can be reused to typeset the same music in a
-different style of Gregorian chant notation such as Hufnagel (also
-known as German gothic neumes) or Medicaea (kind of a very simple
-forerunner of the Editio Vaticana). As soon as Hufnagel ligature
-engraver and Medicaea ligature engraver will have been implemented, it
-will be as simple as replacing the ligature engraver in the
-@internalsref{Voice} context to get the desired notation style from
-the same input.
+different style of Gregorian chant notation.
The following table shows the code fragments that produce the
ligatures in the above neumes table. The letter in the first column
@code{\flexa} infix commands for a rising and falling line of melody,
respectively.
-@refbugs
-Trigonus: apply equal spacing, regardless of pitch.
+
+@node Vaticana style contexts
+@subsection Vaticana style contexts
+
+@cindex VaticanaVoiceContext
+@cindex VaticanaStaffContext
+
+The predefined @code{VaticanaVoiceContext} and
+@code{VaticanaStaffContext} can be used to easily engrave a piece of
+Gregorian Chant in the style of the Editio Vaticana. These contexts
+initialize all relevant context properties and grob properties to
+proper values. With these contexts, you can immediately go ahead
+entering the chant, as the following short excerpt demonstrates:
+
+@lilypond[raggedright,verbatim,noindent]
+\include "gregorian-init.ly"
+\score {
+<<
+ \context VaticanaVoice = "cantus" {
+ \override Score.BarNumber #'transparent = ##t
+ \notes {
+ \[ c'\melisma c' \flexa a \]
+ \[ a \flexa \deminutum g\melismaEnd \]
+ f \divisioMinima
+ \[ f\melisma \pes a c' c' \pes d'\melismaEnd \]
+ c' \divisioMinima \break
+ \[ c'\melisma c' \flexa a \]
+ \[ a \flexa \deminutum g\melismaEnd \] f \divisioMinima
+ }
+ }
+ \lyricsto "cantus" \new Lyrics \lyrics {
+ San- ctus, San- ctus, San- ctus
+ } >>
+
+}
+@end lilypond
@node Figured bass
@subsection Figured bass
Slash notation for alterations is not supported.
-
-@node Vaticana style contexts
-@subsection Vaticana style contexts
-
-@cindex VaticanaVoiceContext
-@cindex VaticanaStaffContext
-
-The predefined @code{VaticanaVoiceContext} and
-@code{VaticanaStaffContext} can be used to easily engrave a piece of
-Gregorian Chant in the style of the Editio Vaticana. These contexts
-initialize all relevant context properties and grob properties to
-proper values. With these contexts, you can immediately go ahead
-entering the chant, as the following short excerpt demonstrates:
-
-@lilypond[raggedright,verbatim,noindent]
-\include "gregorian-init.ly"
-\score {
-<<
- \context VaticanaVoice = "cantus" {
- \override Score.BarNumber #'transparent = ##t
- \notes {
- \[ c'\melisma c' \flexa a \] \[ a \flexa \deminutum g\melismaEnd \] f \divisioMinima
- \[ f\melisma \pes a c' c' \pes d'\melismaEnd \] c' \divisioMinima \break
- \[ c'\melisma c' \flexa a \] \[ a \flexa \deminutum g\melismaEnd \] f \divisioMinima
- }
- }
- \lyricsto "cantus" \new Lyrics \lyrics {
- San- ctus, San- ctus, San- ctus
- } >>
-
-}
-@end lilypond
-
-
@node Contemporary notation
@section Contemporary notation
@lilypondfile[]{cluster.ly}
-By default, @internalsref{Cluster_spanner_engraver} is in the
-@internalsref{Voice} context. This allows putting ordinary notes and
-clusters together in the same staff, even simultaneously. In such a
-case no attempt is made to automatically avoid collisions between
-ordinary notes and clusters.
+Ordinary notes and clusters can be put together in the same staff,
+even simultaneously. In such a case no attempt is made to
+automatically avoid collisions between ordinary notes and clusters.
@seealso
r
}
\context Lyrics \lyrics {
+ \override LyricText #'font = #'typewriter
"shortfermata" "fermata" "longfermata" "verylongfermata"
} >>
}
@cindex easy notation
@cindex Hal Leonard
-The `easy play' note head includes a note name inside the head. It is
-used in music aimed at beginners:
+The `easy play' note head includes a name inside the head. It is
+used in music for beginners:
@lilypond[raggedright,verbatim,staffsize=26]
-\score {
- \notes { c'2 e'4 f' | g'1 }
- \paper { \context { \EasyNotation } }
-}
+ \setEasyHeads
+ c'2 e'4 f' | g'1
@end lilypond
-The @code{EasyNotation} variable overrides a @internalsref{Score} @c
-context. To make the letters readable, it has to be printed in a
-large font size. To print with a larger font, see @ref{Font Size}.
+The command @code{\setEasyHeads} overrides settings for the
+@internalsref{NoteHead} object. To make the letters readable, it has
+to be printed in a large font size. To print with a larger font, see
+@ref{Font Size}.
@cindex Xdvi
@cindex ghostscript
the letters. Printing the PostScript file obtained does produce the
correct result.
+@refcommands
+
+@cindex \setEasyHeads
+@code{\setEasyHeads}
@node Sound
@section Sound
@cindex Sound
Entered music can also be converted to MIDI output. The performance
-is good enough for proof-hearing the music for errors.
+is intented for proof-hearing the music for errors.
Ties, dynamics and tempo changes are interpreted. Dynamic marks,
crescendi and decrescendi translate into MIDI volume levels. Dynamic
The MIDI output allocates a channel for each Staff, and one for global
settings. Hence, the MIDI file should not have more than 15 staves
-(or 14 if you do not use drums).
+(or 14 if you do not use drums). Other staves will remain silent.
@menu
@item context definitions.
@end itemize
-Assignments in the @code{\midi} block are not allowed.
-
A number followed by a period is interpreted as a real number, so
for setting the tempo for dotted notes, an extra space should be
inserted, for example:
@node Markup command definition
@appendixsubsec Markup command definition
-New markup commands can be defined thanks to the @code{def-markup-command} scheme macro.
+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} ...)
(@var{arg1-type?} @var{arg2-type?} ...)
..command body..)
+@end lisp
- @var{argi}: i@var{th} command argument
- @var{argi-type?}: a type predicate for the i@var{th} argument
- @var{paper}: the `paper' definition
- @var{props}: a list of alists, containing all active properties.
+The arguments signify
+
+@table @var
+@item argi
+@var{i}th command argument
+@item argi-type?
+a type predicate for the i@var{th} argument
+@item paper
+the `paper' definition
+@item props
+a list of alists, containing all active properties.
@end lisp
As a simple example, we show how to add a @code{\smallcaps} command,
@noindent
This interpretation should add @code{'(font-shape . caps)} to the active
-properties, so we substitute the the following for the @dots{} in the
+properties, so we substitute the following for the @dots{} in the
above example:
@example
The variable @code{props} is a list of alists, and we prepend to it by
consing a list with the extra setting.
-However, suppose that we are using a font that does not have a
-small-caps variant. In that case, we have to fake the small caps font,
-by setting a string in upcase, with the first letter a little larger:
-@example
-#(def-markup-command (smallcaps paper props str) (string?)
- "Print the string argument in small caps. Syntax: \\smallcaps #\"string\""
- (interpret-markup paper props
- (make-line-markup
- (map (lambda (s)
- (if (= (string-length s) 0)
- s
- (markup #:large (string-upcase (substring s 0 1))
- #:translate (cons -0.6 0)
- #:tiny (string-upcase (substring s 1)))))
- (string-split str #\Space)))))
-@end example
-
-The @code{smallcaps} command first splits its string argument into
-tokens separated by spaces (@code{(string-split str #\Space)}); for
-each token, a markup is built with the first letter made large and
-upcased (@code{#:large (string-upcase (substring s 0 1))}), and a
-second markup built with the following letters made tiny and upcased
-(@code{#:tiny (string-upcase (substring s 1))}). As LilyPond
-introduces a space between markups on a line, the second markup is
-translated to the left (@code{#:translate (cons -0.6 0) ...}). Then,
-the markups built for each token are put in a line
-(@code{(make-line-markup ...)}). Finally, the resulting markup is
-passed to the @code{interpret-markup} function, with the @code{paper}
-and @code{props} arguments.
-
-Finally, suppose that we are typesetting a recitative in an opera, and
+Suppose that we are typesetting a recitative in an opera, and
we would like to define a command that will show character names in a
custom manner. Names should be printed with small caps and translated a
bit to the left and top. We will define a @code{\character} command
}
@end lilypond
+We have used the @code{caps} font shape, but suppose that our font
+that does not have a small-caps variant. In that case, we have to fake
+the small caps font, by setting a string in upcase, with the first
+letter a little larger:
+
+@example
+#(def-markup-command (smallcaps paper props str) (string?)
+ "Print the string argument in small caps. Syntax: \\smallcaps #\"string\""
+ (interpret-markup paper props
+ (make-line-markup
+ (map (lambda (s)
+ (if (= (string-length s) 0)
+ s
+ (markup #:large (string-upcase (substring s 0 1))
+ #:translate (cons -0.6 0)
+ #:tiny (string-upcase (substring s 1)))))
+ (string-split str #\Space)))))
+@end example
+
+The @code{smallcaps} command first splits its string argument into
+tokens separated by spaces (@code{(string-split str #\Space)}); for
+each token, a markup is built with the first letter made large and
+upcased (@code{#:large (string-upcase (substring s 0 1))}), and a
+second markup built with the following letters made tiny and upcased
+(@code{#:tiny (string-upcase (substring s 1))}). As LilyPond
+introduces a space between markups on a line, the second markup is
+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
+@code{props} arguments.
+
@node Contexts for programmers
-@node Applyoutput
-@appendixsubsec Applyoutput
+@node Running a function on all layout objects
+@appendixsubsec Running a function on all layout objects
The most versatile way of tuning an object is @code{\applyoutput}. Its
syntax is
@internalsref{NoteHead} event, and for a @internalsref{Stem} object,
this is a @internalsref{NoteHead} object.
-Here is a simple example of @code{\applyoutput}; it blanks note-heads on the
-center-line:
+Here is a function to use for @code{\applyoutput}; it blanks
+note-heads on the center-line:
+
@example
(define (blanker grob grob-origin context)
(if (and (memq (ly:grob-property grob 'interfaces)
note-head-interface)
(eq? (ly:grob-property grob 'staff-position) 0))
- (ly:grob-set-property! grob 'transparent #t)))
+ (set! (ly:grob-property grob 'transparent) #t)))
@end example
tieDotted = \override Tie #'dashed = #1
tieSolid = \revert Tie #'dashed
+setEasyHeads = \sequential {
+ \override NoteHead #'print-function = #Note_head::brew_ez_stencil
+ \override NoteHead #'Y-extent-callback = #'()
+ \override NoteHead #'X-extent-callback = #'()
+}
dynamicUp = {
\override DynamicText #'direction = #1
(interpret-markup paper (prepend-alist-chain 'font-shape 'latin1 props) arg))
(def-markup-command (dynamic paper props arg) (markup?)
- "Use the dynamic font. This font only contains s, f, m, z, p, and
-r. When producing phrases, like ``piu f'', the normal words (like
-``piu'') should be done in a different font. The recommend font for
-this is bold and italic
-"
+ "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 ``piu @b{f}'', the
+normal words (like ``piu'') should be done in a different font. The
+recommend font for this is bold and italic"
(interpret-markup
paper (prepend-alist-chain 'font-family 'dynamic props) arg))
(def-markup-command (italic paper props arg) (markup?)
+ "Use italic @code{font-shape} for @var{arg}. "
(interpret-markup paper (prepend-alist-chain 'font-shape 'italic props) arg))
(def-markup-command (typewriter paper props arg) (markup?)
+ "Use @code{font-family} typewriter for @var{arg}."
(interpret-markup
paper (prepend-alist-chain 'font-family 'typewriter props) arg))
paper (prepend-alist-chain 'font-shape 'upright props) arg))
(def-markup-command (doublesharp paper props) ()
+ "Draw a double sharp symbol."
+
(interpret-markup paper props (markup #:musicglyph "accidentals-4")))
-(def-markup-command (threeqsharp paper props) ()
+(def-markup-command (sesquisharp paper props) ()
+ "Draw a 3/2 sharp symbol."
(interpret-markup paper props (markup #:musicglyph "accidentals-3")))
+
(def-markup-command (sharp paper props) ()
+ "Draw a sharp symbol."
(interpret-markup paper props (markup #:musicglyph "accidentals-2")))
(def-markup-command (semisharp paper props) ()
+ "Draw a semi sharp symbol."
(interpret-markup paper props (markup #:musicglyph "accidentals-1")))
(def-markup-command (natural paper props) ()
+ "Draw a natural symbol."
+
(interpret-markup paper props (markup #:musicglyph "accidentals-0")))
(def-markup-command (semiflat paper props) ()
+ "Draw a semiflat."
(interpret-markup paper props (markup #:musicglyph "accidentals--1")))
(def-markup-command (flat paper props) ()
+ "Draw a flat symbol."
+
(interpret-markup paper props (markup #:musicglyph "accidentals--2")))
-(def-markup-command (threeqflat paper props) ()
+(def-markup-command (sesquiflat paper props) ()
+ "Draw a 3/2 flat symbol."
+
(interpret-markup paper props (markup #:musicglyph "accidentals--3")))
(def-markup-command (doubleflat paper props) ()
+ "Draw a double flat symbol."
+
(interpret-markup paper props (markup #:musicglyph "accidentals--4")))
(def-markup-command (column paper props args) (markup-list?)
+ "Stack the markups in @var{args} vertically."
(stack-lines
-1 0.0 (cdr (chain-assoc 'baseline-skip props))
(map (lambda (m) (interpret-markup paper props m)) args)))
(def-markup-command (dir-column paper props args) (markup-list?)
"Make a column of args, going up or down, depending on the setting
-of the #'direction layout property."
+of the @code{#'direction} layout property."
(let* ((dir (cdr (chain-assoc 'direction props))))
(stack-lines
(if (number? dir) dir -1)
(map (lambda (x) (interpret-markup paper props x)) args))))
(def-markup-command (center-align paper props args) (markup-list?)
+ "Put @code{args} in a centered column. "
(let* ((mols (map (lambda (x) (interpret-markup paper props x)) args))
(cmols (map (lambda (x) (ly:stencil-align-to! x X CENTER)) mols)))
(stack-lines -1 0.0 (cdr (chain-assoc 'baseline-skip props)) mols)))
m))
(def-markup-command (left-align paper props arg) (markup?)
+ "Align @var{arg} on its left edge. "
+
(let* ((m (interpret-markup paper props arg)))
(ly:stencil-align-to! m X LEFT)
m))
(def-markup-command (halign paper props dir arg) (number? markup?)
- "Set horizontal alignment. @var{dir} = -1 is left, @var{dir} = 1 is
-right, values in between vary alignment accordingly."
+ "Set horizontal alignment. If @var{dir} is -1, then it is
+left-aligned, while+1 is right. Values in between interpolate alignment
+accordingly."
(let* ((m (interpret-markup paper props arg)))
amount Y))
(def-markup-command (fraction paper props arg1 arg2) (markup? markup?)
- "Make a fraction of two markups.
-
-Syntax: \\fraction MARKUP1 MARKUP2."
+ "Make a fraction of two markups."
+
(let* ((m1 (interpret-markup paper props arg1))
(m2 (interpret-markup paper props arg2)))
(ly:stencil-align-to! m1 X CENTER)
;; TODO: better syntax.
(def-markup-command (note-by-number paper props log dot-count dir) (number? number? number?)
- "Syntax: \\note-by-number #LOG #DOTS #DIR. By using fractional values
-for DIR, you can obtain longer or shorter stems."
+ "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-family . music)) props)))
(stemlen (max 3 (- log 1)))
(headgl (ly:find-glyph-by-name
(def-markup-command (normal-size-super paper props arg) (markup?)
"A superscript which does not use a smaller font."
+
(ly:stencil-translate-axis (interpret-markup
paper
props arg)
offset))
(def-markup-command (sub paper props arg) (markup?)
- "Syntax: \\sub MARKUP."
+ "Set @var{arg} in subscript."
+
(ly:stencil-translate-axis
(interpret-markup
paper
Y))
(def-markup-command (normal-size-sub paper props arg) (markup?)
+ "Set @var{arg} in subscript, in a normal font size."
+
(ly:stencil-translate-axis
(interpret-markup paper props arg)
(* -0.5 (cdr (chain-assoc 'baseline-skip props)))
Y))
(def-markup-command (hbracket paper props arg) (markup?)
- "Horizontal brackets around @var{arg}."
+ "Draw horizontal brackets around @var{arg}."
(let ((th 0.1) ;; todo: take from GROB.
(m (interpret-markup paper props arg)))
(bracketify-stencil m X th (* 2.5 th) th)))
(def-markup-command (bracket paper props arg) (markup?)
- "Vertical brackets around @var{arg}."
+ "Draw vertical brackets around @var{arg}."
(let ((th 0.1) ;; todo: take from GROB.
(m (interpret-markup paper props arg)))
(bracketify-stencil m Y th (* 2.5 th) th)))
conversions.append (((2,1,29), conv,
'\\center -> \\center-align, \\translator -> \\context'))
+
+def conv (str):
+ str = re.sub (r'\\threeq(flat|sharp)', r'\\sesqui\1', str)
+ return str
+
+conversions.append (((2,1,30), conv,
+ '\\threeq{flat,sharp} -> \\sesqui{flat,sharp}'))
+
################################
# END OF CONVERSIONS
################################