| [ << Commandes pour markups ] | [Top][Contents][Index] | [ Tables du manuel de notation >> ] |
| [ < Accordion registers ] | [ Up: Commandes pour markup ] | [ Commandes pour liste de markups > ] |
A.1.8 Other markup commands
\annotate-movingarg (markup) ¶-
Indicate
\vspaceand\hspacemovement with an arrow.The arrow changes its size and thickness depending on the printed length; the maximum size of the arrow head can be controlled with the
sizeproperty. Ifsizeexceeds a third of the length of the final arrow, it falls back to that third.Note that the arrows do not reflect the actual extents of the objects created by
\vspaceand\hspace; you might use\boxfor that.\markup \column { \line { left \annotate-moving \hspace #4 right } \line { left \annotate-moving \hspace #-4 right } \line { \column { top \override #'(size . 0.6) \annotate-moving \vspace #4/3 bottom } \column { top \override #'(size . 2.0) \annotate-moving \vspace #-4/3 bottom } } }
Used properties:
-
size(1) -
color("red")
-
\append-to-tagtag (symbol) more (markup) arg (markup) ¶Append more to all markup in var arg tagged with tag.
It works similar to
\appendToTagfor music, but only with markups.tagged = \markup { \tag #'foo A \tag #'bar B } \markup { \append-to-tag #'foo postfoo \tagged }
Used properties:
-
tags-with-appends-alist(())
-
\auto-footnotemkup (markup) note (markup) ¶Have footnote note act as an annotation to the markup mkup.
\markup { \auto-footnote a b \override #'(padding . 0.2) \auto-footnote c d }
The footnote will be annotated automatically.
Used properties:
-
padding(0.0) -
raise(0.5)
-
\backslashed-digitnum (integer) ¶-
Print number num with the Emmentaler font, crossed through with a backslash.
This is for use in the context of figured bass notation.
\markup { \backslashed-digit #5 \hspace #2 \override #'(thickness . 3) \backslashed-digit #7 }
Used properties:
-
thickness(1.6) -
font-size(0)
-
\charnum (integer) ¶Produce a single Unicode character with code num.
Characters encoded in hexadecimal format require the prefix
#x.\markup { \char #65 \char ##x00a9 }
\eyeglasses¶Prints out eyeglasses, indicating strongly to look at the conductor.
\markup { \eyeglasses }
\first-visibleargs (markup list) ¶Use the first markup in args that yields a non-empty stencil and ignore the rest.
\markup { \first-visible { \fromproperty #'header:composer \italic Unknown } }
\footnotemkup (markup) note (markup) ¶Have footnote note act as an annotation to the markup mkup.
\markup { \footnote a b \override #'(padding . 0.2) \footnote c d }
The footnote will not be annotated automatically.
\fractionarg1 (markup) arg2 (markup) ¶-
Make a fraction of markups arg1 and arg2.
\markup { π ≈ \fraction 355 113 }
Used properties:
-
font-size(0)
-
\frompropertysymbol (symbol) ¶Read symbol from the property settings and produce a stencil from the markup contained within.
If symbol is not defined or is not a markup, return an empty markup.
Currently, the following properties can be accessed.
- Within a
\paperblock defining titles, headers, or footers, or within a\headerblock: all fields from the\headerblock (that produce markup) are available, withheader:as a name prefix. - Within a
\paperblock defining headers or footers: the current page number (symbolpage:page-number-string). - Within the
tocItemMarkuppaper variable (or in custom-made Scheme code that uses functionadd-toc-item!) defining a table of contents entry: the entry’s text and page number are available astoc:textandtoc:page, respectively. An entry’s indentation markup is available astoc:indent.
\header { myTitle = "myTitle" title = \markup { from \italic \fromproperty #'header:myTitle } } \markup { \null }
- Within a
\keep-with-tagtags (symbol list or symbol) arg (markup) ¶Keep markup from arg that is untagged or tagged with tags.
All other parts of arg that are using a different tag are replaced with empty stencils. It works similar to
\keepWithTagfor music, but only with markups.tagged = \markup { untagged \tag #'foo A \tag #'bar B } \markup { \keep-with-tag #'bar \tagged } \markup { \keep-with-tag #'foo \tagged }
Used properties:
-
tags-to-keep(())
-
\left-bracesize (number) ¶-
Print a brace from the music font, of height size (in points).
\markup { \left-brace #35 \hspace #2 \left-brace #45 }
\lookupglyph-name (string) ¶Print a brace glyph with name glyph-name.
This is a historical command;
\left-brace(which looks up the glyph by absolute size and is independent of the font size) is recommended instead.\markup \lookup "brace200"
\markalphabetnum (integer) ¶Make a markup letter for num.
The letters start with A to Z and continue with double letters.
\markup { \markalphabet #8 \hspace #2 \markalphabet #26 }
\markletternum (integer) ¶Make a markup letter for num.
The letters start with A to Z (skipping letter I), and continue with double letters.
\markup { \markletter #8 \hspace #2 \markletter #26 }
\null¶-
An empty markup with extents of a single point.
\markup { \null }
\on-the-flyprocedure (procedure) arg (markup) ¶Apply the procedure markup command to arg.
procedure takes the same arguments as
interpret-markupand returns a stencil.\overridenew-prop (pair) arg (markup) ¶-
Add the argument new-prop to the property list for printing arg.
In general, any property may be overridden that is part of
font-interface(font-interface),text-interface(text-interface), orinstrument-specific-markup-interface(instrument-specific-markup-interface). Additionally, various markup commands listen to other properties, too, as described in a markup function’s documentation.new-prop is either a single alist pair or a non-empty list of alist pairs.
\markup { \undertie "undertied" \override #'(offset . 15) \undertie "offset undertied" \override #'((offset . 15) (thickness . 3)) \undertie "offset thick undertied" }
\page-linkpage-number (number) arg (markup) ¶-
Add a link to a score’s page page-number around arg.
This only works in the PDF backend.
\markup { \page-link #2 { \italic { This links to page 2... } } }
\page-reflabel (symbol) gauge (markup) default (markup) ¶-
Print a page number reference.
label is the label set on the referenced page (using
\labelor\tocItem), gauge a markup used to estimate the maximum width of the page number, and default the value to display when label is not found.If the current book or bookpart is set to use roman numerals for page numbers, the reference will be formatted accordingly – in which case the gauge’s width may require additional tweaking.
Used properties:
-
x-align(1)
-
\patterncount (non-negative, exact integer) axis (non-negative, exact integer) space (number) pattern (markup) ¶Print a pattern markup count times.
Patterns are spaced apart by space (defined as for
\hspaceor\vspace, respectively) and distributed on axis.\markup \column { "Horizontally repeated:" \pattern #7 #X #2 \flat \null "Vertically repeated:" \pattern #3 #Y #0.5 \flat }
\property-recursivesymbol (symbol) ¶Print out a warning when header field markup in symbol contains some recursive markup definition.
\push-to-tagtag (symbol) more (markup) arg (markup) ¶Prepend more to all markup in arg tagged with tag.
It works similar to
\pushToTagfor music, but only with markups.tagged = \markup { \tag #'foo A \tag #'bar B } \markup { \push-to-tag #'foo prefoo \tagged }
Used properties:
-
tags-with-pushes-alist(())
-
\qr-codewidth (non-negative number) str (string) ¶-
Insert a QR code for string str, usually a URL, with a given width.
\markup \vcenter { \center-column { Engraved with LilyPond } \hspace #1.5 \qr-code #10.0 "https://lilypond.org" }
The
error-correction-levelproperty can be set to one of the symbolslow,medium,quarter, orhigh. The higher the level of error correction is, the more the QR code contains redundancy, potentially helping detectors, e.g., in poor lighting conditions; however, a higher correction level also makes the code denser.\markup \vcenter { \center-column { Engraved with LilyPond } \hspace #1.5 \override #'(error-correction-level . high) \qr-code #10.0 "https://lilypond.org" }
The
quiet-zone-sizeproperty specifies the width of the « quiet zone », namely the white area around the QR code. It is expressed as a multiple of the width of one little square inside the QR code. Use at least 4 for best results.Used properties:
-
quiet-zone-size(4) -
error-correction-level(low)
-
\remove-with-tagtags (symbol list or symbol) arg (markup) ¶Remove markup from arg that is tagged with tags.
The removed markup is replaced with empty stencils. It works similar to
\removeWithTagfor music, but only with markups.tagged = \markup { \tag #'foo A \tag #'bar B } \markup { \remove-with-tag #'foo \tagged } \markup { \remove-with-tag #'bar \tagged }
Used properties:
-
tags-to-remove(())
-
\right-bracesize (number) ¶A music brace in point size size, rotated 180 degrees.
\markup { \right-brace #45 \hspace #2 \right-brace #35 }
\slashed-digitnum (integer) ¶-
Print number num with the Emmentaler font, crossed through with a slash.
This is for use in the context of figured bass notation.
\markup { \slashed-digit #5 \hspace #2 \override #'(thickness . 3) \slashed-digit #7 }
Used properties:
-
thickness(1.6) -
font-size(0)
-
\stencilstil (stencil) ¶-
Use stencil stil as markup.
\markup { \stencil #(make-circle-stencil 2 0 #t) }
\strut¶-
Create a box of the same height as the space in the current font.
\tagtags (symbol list or symbol) arg (markup) ¶Tag markup arg with tag.
tag can be one or multiple tags. This allows later on to reference arg; for example, to remove it or to add markup before or after the tagged markup. It works similar to
\tagfor music, but only with markups.tagged = \markup { \tag #'foo A \tag #'bar B } \markup { \keep-with-tag #'bar \tagged } \markup { \keep-with-tag #'foo \tagged }
Used properties:
-
tags-with-appends-alist(()) -
tags-with-pushes-alist(()) -
tags-to-remove(()) -
tags-to-keep(())
-
\transparentarg (markup) ¶Make arg transparent.
\markup { \transparent { invisible text } }
\verbatim-filename (string) ¶Read the contents of file name and include it verbatim.
\markup { \verbatim-file "en/included/simple.ly" }
Use
\withRelativeDiras a prefix to name if the file should be found relative to the input file.\whiteoutarg (markup) ¶-
Provide a white background for arg.
The shape of the white background is determined by the
styleproperty. The default isboxwhich produces a rectangle.rounded-boxproduces a rounded rectangle, andoutlineapproximates the outline of the markup.The color of the background can be controlled with the
colorproperty, defaulting to"white".\markup { \combine \filled-box #'(-1 . 62) #'(-3 . 4) #1 \override #'(line-width . 60) \fill-line { \override #'(thickness . 1.5) \whiteout box \override #'((style . rounded-box) (thickness . 3)) \whiteout rounded-box \override #'((style . outline) (thickness . 3)) \whiteout outline \override #'((color . "red") (style . outline)) \whiteout red-outline } }
Used properties:
-
color("white") -
thickness(()) -
style(box)
-
\with-colorcol (color) arg (markup) ¶-
Use color col to draw arg.
See Coloration d’objets for valid color specifications.
\markup { \with-color #red red \hspace #2 \with-color #green green \hspace #2 \with-color "#0000ff" blue }
\with-dimensionaxis (integer) val (pair of numbers) arg (markup) ¶-
Set the dimension of arg along axis to val.
If axis is equal to
X, set the horizontal dimension. If axis is equal toY, set the vertical dimension. \with-dimension-fromaxis (integer) arg1 (markup) arg2 (markup) ¶-
Print arg2 but replace the dimension along axis with the one from arg1.
If axis is set to
X, replace the horizontal dimension. If axis is set toY, replace the vertical dimension. \with-dimensionsx (pair of numbers) y (pair of numbers) arg (markup) ¶-
Set the horizontal and vertical dimensions of arg to x and y.
\with-dimensions-fromarg1 (markup) arg2 (markup) ¶-
Print arg2 with the horizontal and vertical dimensions of arg1.
\with-linklabel (symbol) arg (markup) ¶-
Add a link to the page holding label label around arg.
This only works in the PDF backend.
\markup { \with-link #'label { \italic { This links to the page containing the label... } } } \with-outlineoutline (markup) arg (markup) ¶-
Print arg with the outline and dimensions of outline.
The outline is used by skylines to resolve collisions (not for whiteout).
\with-true-dimensionaxis (integer) arg (markup) ¶-
Give arg its actual dimension (extent) on axis.
Sometimes, the extents of a markup’s printed ink differs from the default extents. The main case is if glyphs are involved. By default, the extents of a glyph are based on the glyph’s metrics (i.e., a default vertical and horizontal size for the glyph), which, for various reasons, are often not identical to its bounding box (i.e., the smallest rectangle that completely encompasses the glyph’s outline) – in most cases, the outline protrudes the box spanned up by the metrics.
\markup { text \fontsize #10 \override #'((box-padding . 0) (thickness . 0.2)) \box \musicglyph "scripts.trill" text }
For purposes other than setting text, this behavior may not be wanted. You can use
\with-true-dimensionin order to give the markup its actual printed extent.\markup { text \fontsize #10 \override #'((box-padding . 0) (thickness . 0.2)) \box \with-true-dimension #X \musicglyph "scripts.trill" text }
\with-true-dimensionsarg (markup) ¶Give arg its actual dimensions (extents).
Calling
\markup \with-true-dimensions arg
is short for
\markup \with-true-dimension #X \with-true-dimension #Y arg
i.e.,
\with-true-dimensionshas the effect of\with-true-dimensionon both axes.
| [ << Commandes pour markups ] | [Top][Contents][Index] | [ Tables du manuel de notation >> ] |
| [ < Accordion registers ] | [ Up: Commandes pour markup ] | [ Commandes pour liste de markups > ] |