Next: Default files, Previous: Fixing overlapping notation, Up: Tweaking output
Some overrides are so common that predefined commands are provided as
short-cuts, such as \slurUp
and \stemDown
. These
commands are described in the Notation Reference under the appropriate
sections.
The complete list of modifications available for each type of object (like slurs or beams) are documented in the Program Reference. However, many layout objects share properties which can be used to apply generic tweaks.
padding
property can be set to increase
(or decrease) the distance between symbols that are printed
above or below notes. This applies to all objects with
side-position-interface
.
c2\fermata \override Script #'padding = #3 b2\fermata
% This will not work, see below: \override MetronomeMark #'padding = #3 \tempo 4=120 c1 % This works: \override Score.MetronomeMark #'padding = #3 \tempo 4=80 d1
Note in the second example how important it is to figure out what
context handles a certain object. Since the MetronomeMark
object
is handled in the Score
context, property changes in the
Voice
context will not be noticed. For more details, see
Constructing a tweak.
extra-offset
property moves objects around
in the output; it requires a pair of numbers. The first number
controls horizontal movement; a positive number will
move the object to the right. The second number controls vertical
movement; a positive number will move it higher. The
extra-offset
property is a low-level feature: the
formatting engine is completely oblivious to these offsets.
In the following example, the second fingering is moved a little to the left, and 1.8 staff space downwards:
\stemUp f-5 \once \override Fingering #'extra-offset = #'(-0.3 . -1.8) f-5
transparent
property will cause an object to be printed
in ‘invisible ink’: the object is not printed, but all its other
behavior is retained. The object still takes up space, it takes part in
collisions, and slurs, ties, and beams can be attached to it.
The following example demonstrates how to connect different voices using ties. Normally, ties only connect two notes in the same voice. By introducing a tie in a different voice,
and blanking the first up-stem in that voice, the tie appears to cross voices:
<< { \once \override Stem #'transparent = ##t b8~ b8\noBeam } \\ { b[ g8] } >>
To make sure that the just blanked stem doesn't squeeze the too much
tie, we also lengthen the stem, by setting the length
to
8
,
<< { \once \override Stem #'transparent = ##t \once \override Stem #'length = #8 b8~ b8\noBeam } \\ { b[ g8] } >>
Distances in LilyPond are measured in staff-spaces, while most
thickness properties are measured in line-thickness. Some
properties are different; for example, the thickness of beams
are measured in staff-spaces. For more information, see the
relevant portion of the program reference.
Next: Default files, Previous: Fixing overlapping notation, Up: Tweaking output
This page is for LilyPond-2.10.33 (stable-branch).