[ << Changing defaults ] | [Top][Contents][Index][ ? ] | [ Interfaces for programmers >> ] | ||
[ < Input modes ] | [ Up : Useful concepts and properties ] | [ Distances and measurements > ] |
5.4.2 Direction and placement
In typesetting music the direction and placement of many items is a matter of choice. For example, the stems of notes can be directed up or down; lyrics, dynamics, and other expressive marks may be placed above or below the staff; text may be aligned left, right or center; etc. Most of these choices may be left to be determined automatically by LilyPond, but in some cases it may be desirable to force a particular direction or placement.
Default actions
By default some directions are always up or always down (e.g. dynamics or fermata), while other things can alternate between up or down based on the stem direction (like slurs or accents).
Context layout order
Contexts are normally positioned in a system from top to bottom in the order in which they are encountered. Note, however, that a context will be created implicitly if a command is encountered when there is no suitable context available to contain it. When contexts are nested, the outer context will exclude inner contexts which are not included in its “accepts” list; excluded contexts will be repositioned below the outer context.
The default order in which contexts are laid out and the “accepts” list can be changed, see Aligning contexts.
Articulation direction indicators
When adding articulations to notes the direction indicator,
^
(meaning “up”), _
(meaning “down”) or
-
(meaning “use default direction”), can usually be
omitted, in which case -
is assumed. But a direction
indicator is always required before
-
\tweak
commands -
\markup
commands -
\tag
commands - string markups, e.g. -"string"
- fingering instructions, e.g.
-1
- articulation shortcuts, e.g.
-.
,->
,--
The direction property
The position or direction of many layout objects is controlled
by the direction
property.
The value of the direction
property may be
set to 1
, meaning “up” or “above”, or to -1
,
meaning “down” or “below”. The symbols UP
and
DOWN
may be used instead of 1
and -1
respectively. The default direction may be specified by setting
direction
to 0
or CENTER
. Alternatively,
in many cases predefined commands
exist to specify the direction. These are all of the form
\xxxUp
, xxxDown
, xxxNeutral
where xxxNeutral
means “use the default direction”.
See
Within-staff objects.
In a few cases, arpeggio being the only common example, the value
of the direction
property specifies whether the object
is to be placed to the right or left of the parent object. In
this case -1
or LEFT
means “to the left” and
1
or RIGHT
means “to the right”. 0
or CENTER
means “use the default” direction, as before.
[ << Changing defaults ] | [Top][Contents][Index][ ? ] | [ Interfaces for programmers >> ] | ||
[ < Input modes ] | [ Up : Useful concepts and properties ] | [ Distances and measurements > ] |
Other languages: espaƱol.