[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Text centralized above a TextSpan
From: |
Simon Albrecht |
Subject: |
Re: Text centralized above a TextSpan |
Date: |
Tue, 22 Sep 2015 23:23:58 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 |
On 21.09.2015 18:13, David Nalesnik wrote:
On Mon, Sep 21, 2015 at 8:41 AM, David Kastrup <address@hidden
<mailto:address@hidden>> wrote:
David Nalesnik <address@hidden
<mailto:address@hidden>> writes:
> Here's a preliminary experiment with using \lyricmode as an
input device
> for text spanner details. It could easily be incorporated into
the larger
> function, but I've pared this down to ask a question.
>
> Is it possible to avoid needing to type \lyricmode when calling
\test?
No. Music functions don't get to choose the syntactic mode of their
arguments. It would be rather tricky to figure out when to switch
back
and forth without causing tokens to be lexed in the wrong mode due to
lookahead.
I was initially worried that the presence of the word "lyric" would be
a potential source of confusion for a user--who is not entering
lyrics, after all. But if we're going to use lyricmode, the command
is a useful reminder. And, really, the improvement over the arcane
entry of my last posted version is huge, so who cares about those
extra characters.
I'm attaching a rewrite of the code which allows an easy mix of
markups/strings and interprets hyphens as connectors. Now there's no
need for a TextSpanner.connectors property.
Duration info is easily available, as are skips. I'm unsure at the
moment how to use this info, though: whether there is more to be
gleaned than simply using durations as a guide to relative spacing,
whether using this info to position texts relative to notes is
possible--or desirable.
This version also gives equal space between texts, promised earlier
but not delivered. (This justification looks immensely better when
long texts are mixed with short.)
Great!
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…
Best regards, Simon
text-spanner-inner-text-lyric-mode.ly
Description: Text Data
- Re: Text centralized above a TextSpan, (continued)
- Re: Text centralized above a TextSpan, David Kastrup, 2015/09/21
- Re: Text centralized above a TextSpan, David Nalesnik, 2015/09/21
- Re: Text centralized above a TextSpan, David Nalesnik, 2015/09/21
- Re: Text centralized above a TextSpan, Trevor Daniels, 2015/09/22
- Re: Text centralized above a TextSpan, Simon Albrecht, 2015/09/22
- Re: Text centralized above a TextSpan, David Nalesnik, 2015/09/22
- Re: Text centralized above a TextSpan,
Simon Albrecht <=
- Re: Text centralized above a TextSpan, David Kastrup, 2015/09/22
- Re: Text centralized above a TextSpan, Simon Albrecht, 2015/09/23
- Re: Text centralized above a TextSpan, David Nalesnik, 2015/09/22
- Re: Text centralized above a TextSpan, Simon Albrecht, 2015/09/20
- Re: Text centralized above a TextSpan, David Kastrup, 2015/09/21
Re: Text centralized above a TextSpan, Caio Giovaneti de Barros, 2015/09/03