]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/snippets/controlling-spanner-visibility-after-a-line-break.ly
LSR: Update.
[lilypond.git] / Documentation / snippets / controlling-spanner-visibility-after-a-line-break.ly
1 % Do not edit this file; it is automatically
2 % generated from Documentation/snippets/new
3 % This file is in the public domain.
4 %% Note: this file works from version 2.13.1
5 \version "2.13.4"
6
7 \header {
8   lsrtags = "expressive-marks, tweaks-and-overrides"
9   texidoc = "The visibility of spanners which end on the first note
10 following a line break is controlled by the @code{after-line-breaking}
11 callback @code{ly:spanner::kill-zero-spanned-time}.
12
13 For objects such as glissandos and hairpins, the default behaviour is
14 to hide the spanner after a break; disabling the callback will allow
15 the left-broken span to be shown.
16
17 Conversely, spanners which are usually visible, such as text spans,
18 can be hidden by enabling the callback.
19 "
20
21   doctitle = "Controlling spanner visibility after a line break"
22 } % begin verbatim
23
24
25 \paper { ragged-right = ##t }
26
27 \relative c'' {
28   \override Hairpin #'to-barline = ##f
29   \override Glissando #'breakable = ##t
30   % show hairpin
31   \override Hairpin #'after-line-breaking = ##t
32   % hide text span
33   \override TextSpanner #'after-line-breaking =
34     #ly:spanner::kill-zero-spanned-time
35   e2\<\startTextSpan
36   % show glissando
37   \override Glissando #'after-line-breaking = ##t
38   f2\glissando
39   \break
40   f,1\!\stopTextSpan
41 }
42