[ << Tweaking output ] | [Top][Contents][Index] | [ Templates >> ] |
[ < Properties found in interfaces ] | [ Up : The Internals Reference manual ] | [ Appearance of objects > ] |
5.2.3 Types of properties
So far we have seen two types of property: ‘number’ and
‘symbol’. To be valid, the value given to a property
must be of the correct type and obey the rules for that type.
The type of property is always shown in parentheses after the
property name in the IR. Here is a list of the types you may
need, together with the rules for that type, and some examples.
If you use a Scheme expression you must add a hash symbol, ‘#’,
to the front of these values when they are entered in the
\override
command, even if the value itself already
starts with ‘#’. We only give examples for constants
here: if you want to compute a value using Scheme, see
Calculations in Scheme.
Property type Rules Input examples Boolean either ‘true’ or ‘false’, represented by #t
or#f
##t
,##f
dimension
(in staff spaces)a decimal number (in units of staff spaces) 2.5
,0.34
direction a valid direction constant or its numerical equivalent (value 0
orCENTER
indicate a neutral direction)#LEFT
,#CENTER
,#UP
,1
,-1
integer a whole number 3
,-1
list a sequence of constants or symbols separated by spaces, enclosed in parentheses and preceded by an apostrophe (quote mark) #'(left-edge staff-bar)
,
#'(1)
,#'()
,
#'(1.0 0.25 0.5)
markup any valid markup \markup { \italic "cresc." }
,
"bagpipe"
moment a musical length; this type is distinct from a note duration \musicLength 4.
,
\musicLength { 2 2. }
number any positive or negative, possibly decimal, value 3
,-2.45
pair
(of numbers)two numbers separated by the sequence ‘whitespace’, ‘.’, ‘whitespace’, enclosed in parentheses, and preceded by an apostrophe #'(2 . 3.5)
,
#'(0.1 . -3.2)
symbol any of the set of permitted symbols for that property, preceded by an apostrophe #'italic
,#'inside
unknown a procedure, or #f
to cause no action#bend::print
,
#ly:text-interface::print
,
##f
vector constants enclosed in #(
…)
.##(#t #t #f)
Note that number arguments to markup functions within a
\markup
block need a leading hash mark.
See also
Extending: Scheme tutorial.
[ << Tweaking output ] | [Top][Contents][Index] | [ Templates >> ] |
[ < Properties found in interfaces ] | [ Up : The Internals Reference manual ] | [ Appearance of objects > ] |