]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/snippets/controlling-spanner-visibility-after-a-line-break.ly
Release: bump Welcome versions.
[lilypond.git] / Documentation / snippets / controlling-spanner-visibility-after-a-line-break.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 = "expressive-marks, tweaks-and-overrides"
11
12   texidoc = "
13 The visibility of spanners which end on the first note following a line
14 break is controlled by the @code{after-line-breaking} callback
15 @code{ly:spanner::kill-zero-spanned-time}.
16
17 For objects such as glissandos and hairpins, the default behaviour is
18 to hide the spanner after a break; disabling the callback will allow
19 the left-broken span to be shown.
20
21 Conversely, spanners which are usually visible, such as text spans, can
22 be hidden by enabling the callback.
23
24 "
25   doctitle = "Controlling spanner visibility after a line break"
26 } % begin verbatim
27
28 \paper { ragged-right = ##t }
29
30 \relative c'' {
31   \override Hairpin.to-barline = ##f
32   \override Glissando.breakable = ##t
33   % show hairpin
34   \override Hairpin.after-line-breaking = ##t
35   % hide text span
36   \override TextSpanner.after-line-breaking =
37     #ly:spanner::kill-zero-spanned-time
38   e2\<\startTextSpan
39   % show glissando
40   \override Glissando.after-line-breaking = ##t
41   f2\glissando
42   \break
43   f,1\!\stopTextSpan
44 }