- (ly:make-stencil
- `(draw-line
- ,th
- 0 0
- ,x ,y)
- (cons (min x 0) (max x 0))
- (cons (min y 0) (max y 0)))))
-
-(define-builtin-markup-command (draw-circle layout props radius thickness fill)
+ (make-line-stencil th 0 0 x y)))
+
+(define-builtin-markup-command (draw-circle layout props radius thickness filled)
- (line (ly:make-stencil
- `(draw-line ,thick ,x1 ,y ,x2 ,y)
- (cons (min x1 0) (max x2 0))
- (cons thick thick))))
+ (line (make-line-stencil thick x1 y x2 y)))
@end verbatim
creates a box extending horizontally from -0.3 to 1.8 and
vertically from -0.3 up to 1.8, with corners formed from a
@end verbatim
creates a box extending horizontally from -0.3 to 1.8 and
vertically from -0.3 up to 1.8, with corners formed from a
@cindex drawing boxes with rounded corners around text
Draw a box with rounded corners around @var{arg}. Looks at @code{thickness},
@code{box-padding} and @code{font-size} properties to determine line
thickness and padding around the markup; the @code{corner-radius} property
@cindex drawing boxes with rounded corners around text
Draw a box with rounded corners around @var{arg}. Looks at @code{thickness},
@code{box-padding} and @code{font-size} properties to determine line
thickness and padding around the markup; the @code{corner-radius} property
-This produces an invisible object taking horizontal space. For example,
-
-@example
-\\markup @{ A \\hspace #2.0 B @}
-@end example
-
-@noindent
-puts extra space between A and@tie{}B, on top of the space that is
-normally inserted before elements on a line.
+Create an invisible object taking up horizontal space @var{amount}.
(/ (+ (car text-widths) (car (cdr text-widths))) 2))
(get-fill-space word-count line-width (cdr text-widths))))))
(/ (+ (car text-widths) (car (cdr text-widths))) 2))
(get-fill-space word-count line-width (cdr text-widths))))))
Strings and simple markups are concatenated on the input level, allowing
ligatures. For example, @code{\\concat @{ \"f\" \\simple #\"i\" @}} is
equivalent to @code{\"fi\"}.
@lilypond[verbatim,quote]
\\markup {
Strings and simple markups are concatenated on the input level, allowing
ligatures. For example, @code{\\concat @{ \"f\" \\simple #\"i\" @}} is
equivalent to @code{\"fi\"}.
@lilypond[verbatim,quote]
\\markup {
Use @code{\\override #'(line-width . @var{X})} to set the line width;
@var{X}@tie{}is the number of staff spaces.
Use @code{\\override #'(line-width . @var{X})} to set the line width;
@var{X}@tie{}is the number of staff spaces.
\\markup {
\\override #'(line-width . 40)
\\wordwrap-string #\"Lorem ipsum dolor sit amet, consectetur
\\markup {
\\override #'(line-width . 40)
\\wordwrap-string #\"Lorem ipsum dolor sit amet, consectetur
- adipisicing elit, sed do eiusmod tempor incididunt ut labore
- et dolore magna aliqua.
-
-
- Ut enim ad minim veniam, quis nostrud exercitation ullamco
- laboris nisi ut aliquip ex ea commodo consequat.
-
-
- Excepteur sint occaecat cupidatat non proident, sunt in culpa
- qui officia deserunt mollit anim id est laborum\"
+ adipisicing elit, sed do eiusmod tempor incididunt ut labore
+ et dolore magna aliqua.
+
+
+ Ut enim ad minim veniam, quis nostrud exercitation ullamco
+ laboris nisi ut aliquip ex ea commodo consequat.
+
+
+ Excepteur sint occaecat cupidatat non proident, sunt in culpa
+ qui officia deserunt mollit anim id est laborum\"
\\markup {
\\override #'(line-width . 40)
\\justify-string #\"Lorem ipsum dolor sit amet, consectetur
\\markup {
\\override #'(line-width . 40)
\\justify-string #\"Lorem ipsum dolor sit amet, consectetur
- adipisicing elit, sed do eiusmod tempor incididunt ut labore
- et dolore magna aliqua.
-
-
- Ut enim ad minim veniam, quis nostrud exercitation ullamco
- laboris nisi ut aliquip ex ea commodo consequat.
-
-
- Excepteur sint occaecat cupidatat non proident, sunt in culpa
- qui officia deserunt mollit anim id est laborum\"
+ adipisicing elit, sed do eiusmod tempor incididunt ut labore
+ et dolore magna aliqua.
+
+
+ Ut enim ad minim veniam, quis nostrud exercitation ullamco
+ laboris nisi ut aliquip ex ea commodo consequat.
+
+
+ Excepteur sint occaecat cupidatat non proident, sunt in culpa
+ qui officia deserunt mollit anim id est laborum\"
- descr = \"Lorem ipsum dolor sit amet, consectetur adipisicing elit,
- sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
- Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris
- nisi ut aliquip ex ea commodo consequat.\"
+ description = \"Lorem ipsum dolor sit amet, consectetur adipisicing
+ elit, sed do eiusmod tempor incididunt ut labore et dolore magna
+ aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco
+ laboris nisi ut aliquip ex ea commodo consequat.\"
- descr = \"Lorem ipsum dolor sit amet, consectetur adipisicing elit,
- sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
- Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris
- nisi ut aliquip ex ea commodo consequat.\"
+ description = \"Lorem ipsum dolor sit amet, consectetur adipisicing
+ elit, sed do eiusmod tempor incididunt ut labore et dolore magna
+ aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco
+ laboris nisi ut aliquip ex ea commodo consequat.\"
-Make a column of args, going up or down, depending on the setting
-of the @code{#'direction} layout property.
+Make a column of @var{args}, going up or down, depending on the
+setting of the @code{direction} layout property.
-(define-builtin-markup-command (center-align layout props args)
+(define (general-column align-dir baseline mols)
+ "Stack @var{mols} vertically, aligned to @var{align-dir} horizontally."
+
+ (let* ((aligned-mols (map (lambda (x) (ly:stencil-aligned-to x X align-dir)) mols)))
+ (stack-lines -1 0.0 baseline aligned-mols)))
+
+(define-builtin-markup-command (center-column layout props args)
+ \\center-column {
+ one
+ two
+ three
+ }
+}
+@end lilypond"
+ (general-column CENTER baseline-skip (interpret-markup-list layout props args)))
+
+(define-builtin-markup-command (left-column layout props args)
+ (markup-list?)
+ align
+ ((baseline-skip))
+ "
+@cindex text columns, left-aligned
+
+Put @code{args} in a left-aligned column.
+
+@lilypond[verbatim,quote]
+\\markup {
+ \\left-column {
- (let* ((mols (interpret-markup-list layout props args))
- (cmols (map (lambda (x) (ly:stencil-aligned-to x X CENTER)) mols)))
- (stack-lines -1 0.0 baseline-skip cmols)))
+ (general-column LEFT baseline-skip (interpret-markup-list layout props args)))
+
+(define-builtin-markup-command (right-column layout props args)
+ (markup-list?)
+ align
+ ((baseline-skip))
+ "
+@cindex text columns, right-aligned
+
+Put @code{args} in a right-aligned column.
+
+@lilypond[verbatim,quote]
+\\markup {
+ \\right-column {
+ one
+ two
+ three
+ }
+}
+@end lilypond"
+ (general-column RIGHT baseline-skip (interpret-markup-list layout props args)))
-Add the first argument in to the property list. Properties may be
-any sort of property supported by @rinternals{font-interface} and
-@rinternals{text-interface}, for example
-
-@example
-\\override #'(font-family . married) \"bla\"
-@end example
+Add the argument @var{new-prop} to the property list. Properties
+may be any property supported by @rinternals{font-interface},
+@rinternals{text-interface} and
+@rinternals{instrument-specific-markup-interface}.
-(define-builtin-markup-command (bigger layout props arg)
- (markup?)
- font
- ()
- "Increase the font size relative to current setting.
-
-@lilypond[verbatim,quote]
-\\markup {
- \\huge {
- huge
- \\hspace #2
- \\bigger {
- bigger
- }
- \\hspace #2
- huge
- }
-}
-@end lilypond"
- (interpret-markup layout props
- `(,fontsize-markup 1 ,arg)))
-time signatures and fingerings. This font only contains numbers and
-some punctuation. It doesn't have any letters.
+time signatures and fingerings. This font contains numbers and
+some punctuation; it has no letters.
(num-y (interval-widen (cons center center) (abs dy)))
(is-sane (and (interval-sane? num-x) (interval-sane? num-y)))
(slash-stencil (if is-sane
(num-y (interval-widen (cons center center) (abs dy)))
(is-sane (and (interval-sane? num-x) (interval-sane? num-y)))
(slash-stencil (if is-sane
- (ly:make-stencil
- `(draw-line ,thickness
- ,(car num-x) ,(- (interval-center num-y) dy)
- ,(cdr num-x) ,(+ (interval-center num-y) dy))
- num-x num-y)
+ (make-line-stencil thickness
+ (car num-x) (- (interval-center num-y) dy)
+ (cdr num-x) (+ (interval-center num-y) dy))
@cindex notes within text by log and dot-count
Construct a note symbol, with stem. By using fractional values for
@cindex notes within text by log and dot-count
Construct a note symbol, with stem. By using fractional values for
-This translates an object. Its first argument is a cons of numbers.
-
-@example
-A \\translate #(cons 2 -3) @{ B C @} D
-@end example
-
-This moves @q{B C} 2@tie{}spaces to the right, and 3 down, relative to its
-surroundings. This command cannot be used to move isolated scripts
-vertically, for the same reason that @code{\\raise} cannot be used for
-that.
+Translate @var{arg} relative to its surroundings. @var{offset}
+is a pair of numbers representing the displacement in the X and Y axis.