Next: Constructing a tweak, Up: The \override command
Some overrides are so common that predefined commands are provided as
short-cuts, for example, \slurUp
and \stemDown
. These
commands are described in
the
Notation manual
under the sections for slurs and stems
respectively.
The exact tuning possibilities for each type of layout object are documented in the program reference of the respective object. However, many layout objects share properties, which can be used to apply generic tweaks. We mention a few of these:
extra-offset
property, which
has a pair of numbers as value, moves objects around in the printout.
The first number controls left-right movement; a positive number will
move the object to the right. The second number controls up-down
movement; a positive number will move it higher. The units of these
offsets are staff-spaces. 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] } >>
padding
property for objects with
side-position-interface
can be set to increase the distance between
symbols that are printed above or below notes. We provide two
examples; a more elaborate explanation is in Constructing a tweak:
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.
More specific overrides are also possible. The next section discusses in depth how to figure out these statements for yourself.
This page is for LilyPond-2.6.3 (stable-branch).