On 06.04.2016 23:33, Gianmaria Lari wrote:
>> Why this is not correct:
>>\chordmode {c} \markup {test}
[Carl]
>When you do \chordmode{c}, you have ended the music expression containing
>the c, so you can no longer attach a markup to the c chord. So you just
>move the markup inside the \chormode music expression, where it is
>attached to the chord.
Thank you to David, Carl, Simon and Thomas for your help!!
1 Where I was supposed to find/understand this thing in the manual?
This specific situation isn’t covered, but it would be impossible to
cover all possible situations. The manuals are big enough as they are.
You have to assemble information, such as how to attach markup to a
note, and how sequential music (that’s what’s in {}) works.
2 May I suggest to add a remarks in the manual to avoid this error,
something like Carl noted:
When you do \chordmode{c}, you have ended the music expression
containing
the c, so you can no longer attach a markup to the c chord. So
you just
move the markup inside the \chordmode music expression, where it is
attached to the chord.
As said, this is a far too specific case to be covered in the manuals.
We need to rely on the user knowing that } ends a music expression, and
it isn’t possible to attach a markup to a music expression, only to a
note column.
3 Would it be possible to write in the compiler error a hint for the
user? Something like:
Error: markup outside of text script or \lyricmode
\chordmode {c} _\markup {test}
Maybe you want to do
\chordmode{c _\markup {test}}
?
If I run the wrong example, I get
document.ly:3:18: error: markup outside of text script or \lyricmode
\chordmode {c}
\markup {test}
and no markup shows up. I’d say that’s enough hints.
Best, Simon
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user