From fa9d87071c06d7bd6894e3115d24a7eab725d924 Mon Sep 17 00:00:00 2001 From: David Kastrup Date: Mon, 15 Jun 2015 19:34:37 +0200 Subject: [PATCH] Issue 4452/2: Fix uses of \context Staff alongside ChordNames context --- Documentation/notation/cheatsheet.itely | 2 +- .../how-to-change-fret-diagram-position.ly | 52 +++++++++++++++++++ input/regression/chord-changes.ly | 6 +-- input/regression/chords-funky-ignatzek.ly | 6 +-- 4 files changed, 59 insertions(+), 7 deletions(-) create mode 100644 Documentation/snippets/new/how-to-change-fret-diagram-position.ly diff --git a/Documentation/notation/cheatsheet.itely b/Documentation/notation/cheatsheet.itely index 8b895bd902..20a258a359 100644 --- a/Documentation/notation/cheatsheet.itely +++ b/Documentation/notation/cheatsheet.itely @@ -276,7 +276,7 @@ twinkle \chordmode { c:dim f:maj7 } @end lilypond -@item @code{\context ChordNames} +@item @code{\new ChordNames} @tab printing chord names @tab @lilypond[relative=2] diff --git a/Documentation/snippets/new/how-to-change-fret-diagram-position.ly b/Documentation/snippets/new/how-to-change-fret-diagram-position.ly new file mode 100644 index 0000000000..39cf3cf470 --- /dev/null +++ b/Documentation/snippets/new/how-to-change-fret-diagram-position.ly @@ -0,0 +1,52 @@ +\version "2.19.22" + +\header { + lsrtags = "fretted-strings, specific-notation, tweaks-and-overrides" + + texidoc = " +If you want to move the position of a fret diagram, for example, to +avoid collision, or to place it between two notes, you have various +possibilities: + +1) modify #'padding or #'extra-offset values (as shown in the first +snippet) + +2) you can add an invisible voice and attach the fret diagrams to the +invisible notes in that voice (as shown in the second example). + + If you need to move the fret according with a rythmic position inside +the bar (in the example, the third beat of the measure) the second +example is better, because the fret is aligned with the third beat +itself. + +" + doctitle = "How to change fret diagram position" +} +harmonies = \chordmode +{ + a8:13 +% THE FOLLOWING IS THE COMMAND TO MOVE THE CHORD NAME + \once \override ChordNames.ChordName.extra-offset = #'(10 . 0) + b8:13 s2. +% THIS LINE IS THE SECOND METHOD + s4 s4 b4:13 +} + +\score +{ + << + \new ChordNames \harmonies + \new Staff + {a8^\markup { \fret-diagram #"6-x;5-0;4-2;3-0;2-0;1-2;" } +% THE FOLLOWING IS THE COMMAND TO MOVE THE FRET DIAGRAM + \once \override TextScript.extra-offset = #'(10 . 0) + b4.~^\markup { \fret-diagram #"6-x;5-2;4-4;3-2;2-2;1-4;" } b4. a8\break +% HERE IS THE SECOND METHOD + << + { a8 b4.~ b4. a8} + { s4 s4 s4^\markup { \fret-diagram #"6-x;5-2;4-4;3-2;2-2;1-4;" } + } + >> + } + >> +} diff --git a/input/regression/chord-changes.ly b/input/regression/chord-changes.ly index 8e308c8a0e..a662e4efc4 100644 --- a/input/regression/chord-changes.ly +++ b/input/regression/chord-changes.ly @@ -1,4 +1,4 @@ -\version "2.16.0" +\version "2.19.22" \header{ texidoc="Property chordChanges: display chord names only when @@ -19,10 +19,10 @@ settings = { } << - \context ChordNames << + \new ChordNames << \scheme \set chordChanges = ##t >> - \context Staff \transpose c c' \scheme + \new Staff \transpose c c' \scheme >> diff --git a/input/regression/chords-funky-ignatzek.ly b/input/regression/chords-funky-ignatzek.ly index b450dfcb7e..ac1d5f263a 100644 --- a/input/regression/chords-funky-ignatzek.ly +++ b/input/regression/chords-funky-ignatzek.ly @@ -1,4 +1,4 @@ -\version "2.16.0" +\version "2.19.22" \header { @@ -26,9 +26,9 @@ chs = << - \context ChordNames { + \new ChordNames { %% #(set-chord-name-style 'ignatzek) \chs } - \context Staff \transpose c c' { \chs } + \new Staff \transpose c c' { \chs } >> -- 2.39.5