-@node Constructing a tweak
-@subsection Constructing a tweak
-
-
-@cindex internal documentation
-@cindex finding graphical objects
-@cindex graphical object descriptions
-@cindex tweaking
-@cindex @code{\override}
-@cindex @code{\set}
-@cindex internal documentation
-
-
-
-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 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
-``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.
-
-
-@c [TODO: revise for new site.]
-
-Suppose we want to move the fingering indication in the fragment below:
-
-@lilypond[relative=2,verbatim]
-c-2
-\stemUp
-f
-@end lilypond
-
-If you visit the documentation of @code{Fingering} (in @ref{Fingering
-instructions}), you will notice that there is written:
-
-@quotation
-@seealso
-
-Internals: @internalsref{FingerEvent} and @internalsref{Fingering}.
-
-@end quotation
-
-@separate
-
-@noindent
-In other words, the fingerings once entered, are internally stored as
-@code{FingerEvent} music objects. When printed, a @code{Fingering}
-layout object is created for every @code{FingerEvent}.
-
-The Fingering object has a number of different functions, and each of
-those is captured in an interface. The interfaces are listed under
-@internalsref{Fingering} in the program reference.
-
-
-
-The @code{Fingering} object has a fixed size
-(@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{text-script-interface}). It also has the standard
-@internalsref{grob-interface} (grob stands for Graphical object)
-@cindex grob
-@cindex graphical object
-@cindex layout object
-@cindex object, layout
-with all the variables that come with
-it. Finally, it denotes a fingering instruction, so it has
-@internalsref{finger-interface}.
-
-For the vertical placement, we have to look under
-@code{side-position-interface}:
-@quotation
-@code{side-position-interface}
-
- Position a victim object (this one) next to other objects (the
- support). In this case, the property @code{direction} signifies where to put the
- victim object relative to the support (left or right, up or down?)
-@end quotation
-
-@cindex padding
-@noindent
-below this description, the variable @code{padding} is described as
-@quotation
-@table @code
-@item padding
- (dimension, in staff space)
-
- add this much extra space between objects that are next to each
-other. Default value: @code{0.6}
-@end table
-@end quotation
-
-By increasing the value of @code{padding}, we can move away the
-fingering. The following command inserts 3 staff spaces of white
-between the note and the fingering:
-@example
-\once \property Voice.Fingering \set #'padding = #3
-@end example
-
-Inserting this command before the Fingering object is created,
-i.e. before @code{c2}, yields the following result:
-
-@lilypond[relative=2,fragment,verbatim]
-\once \property Voice.Fingering
- \set #'padding = #3
-c-2
-\stemUp
-f
-@end lilypond
-
-The context name @code{Voice} in the example above can be determined
-as follows. In the documentation for @internalsref{Fingering}, it says
-@quotation
-Fingering grobs are created by: @internalsref{Fingering_engraver}
-@end quotation
-
-Clicking @code{Fingering_engraver} shows the documentation of
-the module responsible for interpreting the fingering instructions and
-translating them to a @code{Fingering} object. Such a module is called
-an @emph{engraver}. The documentation of the @code{Fingering_engraver}
-says
-@example
-Fingering_engraver is part of contexts: Voice
-@end example
-so tuning the settings for Fingering should be done with
-@example
- \property Voice.Fingering \set @dots{}
-@end example
-
-Of course, the tweak may also done in a larger context than
-@code{Voice}, for example, @internalsref{Staff} or
-@internalsref{Score}.
-
-@seealso
-
-Internals: the program reference also contains alphabetical lists of
-@internalsref{Contexts}, @internalsref{All-layout-objects} and
-@internalsref{Music-expressions}, so you can also find which objects
-to tweak by browsing the internals document.
-
-
-@node Applyoutput
-@subsection Applyoutput
-
-The most versatile way of tuning an object is @code{\applyoutput}. Its
-syntax is
-@example
-\applyoutput @var{proc}
-@end example
-
-@noindent
-where @var{proc} is a Scheme function, taking three arguments.
-
-When interpreted, the function @var{proc} is called for every layout
-object found in the context, with the following arguments:
-@itemize @bullet
-@item the layout object itself,
-@item the context where the layout object was created, and
-@item the context where @code{\applyoutput} is processed.
-@end itemize
-
-
-In addition, the cause of the layout object, i.e. the music
-expression or object that was responsible for creating it, is in the
-object property @code{cause}. For example, for a note head, this is a
-@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:
-@example
-(define (blanker grob grob-origin context)
- (if (and (memq (ly:get-grob-property grob 'interfaces)
- note-head-interface)
- (eq? (ly:get-grob-property grob 'staff-position) 0))
-
- (ly:set-grob-property! grob 'transparent #t)))
-@end example
-
-
-
-@node Font selection
-@subsection Font selection
-
-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
-the @code{fontSize} property for that context. Its value is a number:
-negative numbers make the font smaller, positive numbers larger. An
-example is given below:
-@c
-@lilypond[fragment,relative=1,verbatim,quote]
- c4 c4 \property Voice.fontSize = #-1
- 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.
-
-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 magnification
-@cindex cue notes
-
-The font used for printing a object can be selected by setting
-@code{font-name}, e.g.
-@example
- \property Staff.TimeSignature
- \set #'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
-
-Font selection for the standard fonts, @TeX{}'s Computer Modern fonts,
-can also be adjusted with a more fine-grained mechanism. By setting
-the object properties described below, you can select a different font;
-all three mechanisms work for every object that supports
-@code{font-interface}:
-
-
-@table @code
-@item 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
- 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
-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
- \property Lyrics . LyricText \override #'font-series = #'bold
- \property Lyrics . LyricText \override #'font-family = #'typewriter
- \property Lyrics . LyricText \override #'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.
-
-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}.
-
-@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},
-
-@seealso
-
-Init files: @file{ly/paper20.ly} contains hints how new fonts may be
-added to LilyPond.
-
-@refbugs
-
-There is no style sheet provided for other fonts besides the @TeX{}
-family.
-
-@cindex font selection
-@cindex font magnification
-@cindex @code{font-interface}