The LilyPond Snippet Repository ♪♫

What's this? Searching the LSR Browse Contributing Snippet database

Results 1−10 of 366 for markup

Using header fields in arbitrary markup [0.42634]

Using header fields in arbitrary markup

This snippet adds a markup function that allows one to use header fields (… …This does not work for toplevel markup or markup inside a score, so \fromproperty returns an empty string in this case. The \markupWithHeader markup function defined in this snippet fixes this problem …

…calling mark-up-title. Also, I don't extract the % markup from the header block, but use the given … …The \fromproperty #'header:field are now properly % interpreted. \markup\markupWithHeader \testMarkup \markup\markupWithHeader { \wordwrap { This is a long text, which …

Using header fields in arbitrary markup

Using lyrics as markup text [0.42634]

Using lyrics as markup text

…snippet allows to re-use the lyrics as a markup, e.g. for extracting a libretto. It defines … …italic ker \nl Du \markup \italic lil -- \markup \italic le fis -- ker } \markup { \override #'(line-width . 40) % set the line-width \override …

…Unnest list one level, but don't flatten markup constructs!" ;; The check for markup? is likely not … …markup \line \bold { With visible line break character } \markup { \override #'(display-nl . #t) \verse #words } %{ %% To have left-aligned word-wrapping with %% long lines, use \markup { \override #`(make-line . ,make-wordwrap-markup) \verse #words } %% (the default …

Using lyrics as markup text

Implementing a counter in markup text [0.42411]

Implementing a counter in markup text

…implement a counter in LilyPond for use in markup texts. Whenever you call the \counter #"name" … …first call will print 1 by default. Example: \markup { Initial value of the counter: \counter #"mycounter". … …snippet also implements a \setcounter #"name" newvalue markup command to set the the counter to a …

…counter-alist (assoc-set! counter-alist name newval)) (interpret-markup layout props (markup (number->string newval))))) #(define-markup-command (setcounter layout props … …mycounter" } \markup { It is increasing: \counter #"mycounter" } \markup { Second counter is increasing: \counter #"myothercounter" } %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % LSR workaround: \markup\vspace #.5

Implementing a counter in markup text

Of the ubiquity of markup objects [0.42411]

Of the ubiquity of markup objects

…as simple strings between double quotes or as \markup blocks that can accept a variety of advanced … …paper block such as evenHeaderMarkup for page numbers. \markup may additionally be used for lyrics, in chord … …dynamics. In fact, it is possible to use \markup to customize the appearance of virtually any object, …

…paper-width = 8\cm paper-height = 8\cm } \header { title = \markup "Header" tagline = \markup "(tagline)" } \markup "Top-level markup" dyn = … …Rest.stencil = #(lambda (grob) (grob-interpret-markup grob #{ \markup "Rest" #})) r4 } } \new Lyrics \lyricmode { \markup "LyricText" 1 } \new Dynamics { s1\dyn } >> }

Of the ubiquity of markup objects

Absolute positioning of markup elements (laying out tables) [0.41964]

Absolute positioning of markup elements (laying out tables)

Positioning markup elements relative to one another is complicated by … …a new markup command which takes a list markup elements, it becomes much easier to lay out complex markup into specific arrangements, such as tables.

…paper { #(set-paper-size "snippet") tagline = ##f indent = 0 } \markup\vspace #.5 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % snippet starts here: %{ Snippet for … …#"6-x;5-x;4-2-2;3-1-1;2-1-1;1-4-4;c:2-3-1;" } } } \markup \null \markup { \overlay { \translate #'(0 . 7) \justify-string #"Musical …

Absolute positioning of markup elements (laying out tables)

Easily enter music expressions in markup [0.41071]

Easily enter music expressions in markup

…add a simple snippet of music into a markup function. Constructing the different notation elements manually can … …out of manually constructing these music expressions in \markup mode. When this command is useful: Creating in-line … …Basically, \ezscore is a wrapper for the \score markup command that puts everything on a RhythmicStaff, but …

…paper { #(set-paper-size "snippet") tagline = ##f indent = 0 } \markup\vspace #.5 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% #(define-markup-command (ezscore layout props … …StaffSymbol.thickness = #(magstep size) } indent = 0 } } } #})) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \markup { Let's try something simple: \note #"8" … …4" #UP } . Yikes! Not so easy by hand. } \markup { Much easier: \note #"8" #UP + \note #"…

Easily enter music expressions in markup

Multi-measure rest markup [0.38839]

Multi-measure rest markup

…To expand a multi-measure rest to fit the markup, use an empty chord with an attached markup before the multi-measure rest. Text attached to an …

\compressMMRests { \textLengthOn <>^\markup { [MAJOR GENERAL] } R1*19 <>_\markup { \italic { Cue: ... it is yours } } <>^\markup { A } R1*30^\markup { [MABEL] } \textLengthOff c4^\markup { CHORUS } d f c }

Multi-measure rest markup

Customizing markup fret diagrams [0.38393]

Customizing markup fret diagrams

…diagram properties can be set through 'fret-diagram-details. For markup fret diagrams, overrides can be applied to the Voice.TextScript object or directly to the markup.

…no barre, using defaults % terse style c'1^\markup { \fret-diagram-terse #"x;3-3;2-2;o;1-1;o;" } %% … …or left, small mute label font c'1^\markup { \override #'(fret-diagram-details . ( (finger-code . below-string) (number-type . arabic) (label-dir . … …dots, fewer frets % label below string d'1^\markup { \override #'(fret-diagram-details . ( (finger-code . below-string) (dot-radius . 0.35) (…

Customizing markup fret diagrams

Using markup for a staff's instrumentName [0.35714]

Using markup for a staff's instrumentName

…staff or a staff group can take arbitrary markup. For example, rather than writing Percussion , you can … …example also shows how to combine several text markup objects and properly shift them before overlaying them.

…Documentation/notation/graphic \new Staff = "Percussion" << %Use a markup as the instrumentName for the staff! \set Staff.instrumentName = \markup { \combine \translate #(cons -1.25 0) \combine \…

Using markup for a staff's instrumentName

Rewriting the Stem stencil using markup paths [0.35714]

Rewriting the Stem stencil using markup paths

This snippet rewrites ly:stem::print using a markup, which can be used as a base to create markup path stems. The example given produces stems shaped …

…interval-length X-ext)) (len (interval-length Y-ext))) (ly:stencil-translate (grob-interpret-markup grob (markup (#:path width (list (list 'moveto 0 0) (list '… …interval-length X-ext)) (len (interval-length Y-ext))) (ly:stencil-translate (grob-interpret-markup grob (markup (#:path width (list (list 'moveto 0 0) (list '…

Rewriting the Stem stencil using markup paths

1 2 3 4 5 6 7 8 9 10 Next ⇨