One possible solution is to make a hidden voice. The code is a little
more laborious, and you'll get lots of clashing note column warnings
from the terminal, but it produces two separate spanners with individual
start and stop points.
Hope that helps,
David
%%begin duling-spanners
\version "2.13.6"
spanOne = {
\override TextSpanner #'(bound-details left text) = \markup { "span
one" }
}
spanTwo = {
\override TextSpanner #'(bound-details left text) = \markup { "span
two" }
}
\score {
\new Staff {
\clef "bass"
\time 4/4
<<
\new Voice = "visible" {
\relative c {
\oneVoice
\spanOne c4 \startTextSpan c c c
d4 d d d \stopTextSpan
e4 e e e
}
}
\new Voice = "hidden" {
\relative c {
\hideNotes
c4 c \spanTwo c \startTextSpan c
d4 d d d
e4 e \stopTextSpan e e
}
}
>>
}
\layout { }
}
%%end duling-spanners
James W. wrote:
Hello,
Kind of new to Lilypond (been using it for a few months), but love it so far.
My question: Is it possible to have simultaneous text spanners in a single
voice context? In my example below, there are obvious problems with the
two undistinguished \stopTextSpanner commands. But I think it illustrates
what I'm trying to do. If it is not possible this way, how would I go about
doing it? I've read the Learning Manual a couple of times, the Notation
Manual, looked in the archives of this mailing list, etc. Any help will be
greatly appreciated.
% begin example
\version "2.13.6"
spanOne = {
\override TextSpanner #'(bound-details left text) = \markup { "span one" }
}
spanTwo = {
\override TextSpanner #'(bound-details left text) = \markup { "span two" }
}
\score {
\new Staff {
\relative c {
\clef bass
\time 4/4
\spanOne c4 \startTextSpan c \spanTwo c \startTextSpan c
d4 d d d \stopTextSpan
e4 e \stopTextSpan e e
}
}
\layout { }
}
% end example
Thanks,
James Worlton
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user
\version "2.13.6"
spanOne = {
\override TextSpanner #'(bound-details left text) = \markup { "span one" }
}
spanTwo = {
\override TextSpanner #'(bound-details left text) = \markup { "span two" }
}
\score {
\new Staff {
\clef "bass"
\time 4/4
<<
\new Voice = "visible" {
\relative c {
\oneVoice
\spanOne c4 \startTextSpan c c c
d4 d d d \stopTextSpan
e4 e e e
}
}
\new Voice = "hidden" {
\relative c {
\hideNotes
c4 c \spanTwo c \startTextSpan c
d4 d d d
e4 e \stopTextSpan e e
}
}
>>
}
\layout { }
}
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user