]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/snippets/time-signature-printing-only-the-numerator-as-a-number-instead-of-the-fraction.ly
Issue 5167/6: Changes: show \markup xxx = ... \etc assignments
[lilypond.git] / Documentation / snippets / time-signature-printing-only-the-numerator-as-a-number-instead-of-the-fraction.ly
1 %% DO NOT EDIT this file manually; it is automatically
2 %% generated from LSR http://lsr.di.unimi.it
3 %% Make any changes in LSR itself, or in Documentation/snippets/new/ ,
4 %% and then run scripts/auxiliar/makelsr.py
5 %%
6 %% This file is in the public domain.
7 \version "2.18.0"
8
9 \header {
10   lsrtags = "rhythms, tweaks-and-overrides"
11
12   texidoc = "
13 Sometimes, a time signature should not print the whole fraction (e.g.
14 7/4), but only the numerator (7 in this case). This can be easily done
15 by using @code{\\override Staff.TimeSignature.style = #'single-digit}
16 to change the style permanently. By using @code{\\revert
17 Staff.TimeSignature.style}, this setting can be reversed. To apply the
18 single-digit style to only one time signature, use the
19 @code{\\override} command and prefix it with a @code{\\once}.
20
21 "
22   doctitle = "Time signature printing only the numerator as a number (instead of the fraction)"
23 } % begin verbatim
24
25 \relative c'' {
26   \time 3/4
27   c4 c c
28   % Change the style permanently
29   \override Staff.TimeSignature.style = #'single-digit
30   \time 2/4
31   c4 c
32   \time 3/4
33   c4 c c
34   % Revert to default style:
35   \revert Staff.TimeSignature.style
36   \time 2/4
37   c4 c
38   % single-digit style only for the next time signature
39   \once \override Staff.TimeSignature.style = #'single-digit
40   \time 5/4
41   c4 c c c c
42   \time 2/4
43   c4 c
44 }