summaryrefslogtreecommitdiff
path: root/Documentation/snippets/volta-text-markup-using-repeatcommands.ly
blob: e543300d7350026382cadde7be5af7a4b3fe46f0 (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
%% DO NOT EDIT this file manually; it is automatically
%% generated from LSR http://lsr.di.unimi.it
%% Make any changes in LSR itself, or in Documentation/snippets/new/ ,
%% and then run scripts/auxiliar/makelsr.py
%%
%% This file is in the public domain.
\version "2.18.0"

\header {
  lsrtags = "repeats, symbols-and-glyphs, text"

  texidoc = "
Though volte are best specified using @code{\\repeat volta}, the
context property @code{repeatCommands} must be used in cases where the
volta text needs more advanced formatting with @code{\\markup}.


Since @code{repeatCommands} takes a list, the simplest method of
including markup is to use an identifier for the text and embed it in
the command list using the Scheme syntax @code{#(list (list 'volta
textIdentifier))}. Start- and end-repeat commands can be added as
separate list elements:

"
  doctitle = "Volta text markup using repeatCommands"
} % begin verbatim


voltaAdLib = \markup { 1. 2. 3... \text \italic { ad lib. } }

\relative c'' {
  c1
  \set Score.repeatCommands = #(list (list 'volta voltaAdLib) 'start-repeat)
  c4 b d e
  \set Score.repeatCommands = #'((volta #f) (volta "4.") end-repeat)
  f1
  \set Score.repeatCommands = #'((volta #f))
}