|
From: | Simon Albrecht |
Subject: | Re: Text centralized above a TextSpan |
Date: | Wed, 23 Sep 2015 12:12:54 +0200 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 |
On 23.09.2015 01:20, David Kastrup wrote:
Simon Albrecht <address@hidden> writes:I made an essay on a simpler input interface, which redefines \startTextSpan as a music function. That would be much preferable at least in my eyes. What do you think? (I hope there wouldn’t be any merge conflicts here…) However, I’m having a problem with this syntax: the attached file gives lots of "text-spanner-inner-text-lyric-mode.ly:615:5: error: wrong type for argument 3. Expecting music, found #<Music function #<procedure #f (arg)>> c1 \startTextSpan \lyricmode { ral -- len -- tan -- do }" upon compiling. And I don’t know what my mistake would be…It's the last line before %%% EXAMPLES where you enter some strange recursion. You probably should first save the old value of \startTextSpan in some differently named variable and use that. But really: reusing an existing command name is a bad idea to start with.
I think it’s eventually a good idea to replace the definition of \startTextSpan, firstly because it’s the most convenient sort of interface for this custom function. And secondly: _Any_ sensible use of text spanners now requires a quite complicated \override, even most common cases:
%%%%%%%%%%% \relative { \override TextSpanner.bound-details.left.text = "rit." b'1\startTextSpan e,\stopTextSpan } %%%%%%%%%%% Being able to input the same as %%%%%%%%%%% \relative { b'1\startTextSpan \lyricmode { rit. } e,\stopTextSpan } %%%%%%%%%%% would be a huge improvement IMO. I think it’s not often that one only needs a text to end the spanner, so \startTextSpan \lyricmode { "" -- "back to normal" } would be acceptable. Drawback: it’s impossible to provide backward compatibility then, isn’t it?But you were right and storing the default value in an extra variable solved the problem. I overlooked that I was introducing a recursion instead of redefining a variable. Thanks.
Yours, Simon
[Prev in Thread] | Current Thread | [Next in Thread] |