]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/snippets/time-signature-printing-only-the-numerator-as-a-number-instead-of-the-fraction.ly
Merge branch 'lilypond/translation' of ssh://jomand@git.sv.gnu.org/srv/git/lilypond
[lilypond.git] / Documentation / snippets / time-signature-printing-only-the-numerator-as-a-number-instead-of-the-fraction.ly
1 %% Do not edit this file; it is automatically
2 %% generated from LSR http://lsr.dsi.unimi.it
3 %% This file is in the public domain.
4 \version "2.13.4"
5
6 \header {
7   lsrtags = "rhythms, tweaks-and-overrides"
8
9   texidoc = "
10 Sometimes, a time signature should not print the whole fraction (e.g.
11 7/4), but only the numerator (7 in this case). This can be easily done
12 by using \\override Staff.TimeSignature #'style = #'single-digit to
13 change the style permanently. By using \\revert Staff.TimeSignature
14 #'style, this setting can be reversed. To apply the single-digit style
15 to only one time signature, use the \\override command and prefix it
16 with a \\once.
17
18 "
19   doctitle = "Time signature printing only the numerator as a number (instead of the fraction)"
20 } % begin verbatim
21
22 \relative c'' {
23   \time 3/4
24   c4 c c
25   % Change the style permanently
26   \override Staff.TimeSignature #'style = #'single-digit
27   \time 2/4
28   c c
29   \time 3/4
30   c c c
31   % Revert to default style:
32   \revert Staff.TimeSignature #'style
33   \time 2/4
34   c c
35   % single-digit style only for the next time signature
36   \once \override Staff.TimeSignature #'style = #'single-digit
37   \time 5/4
38   c c c c c
39   \time 2/4
40   c c
41 }