lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Tags template, for markup?


From: David Kastrup
Subject: Re: Tags template, for markup?
Date: Tue, 26 Jun 2018 22:42:57 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

Ben <address@hidden> writes:

> On 6/26/2018 4:15 PM, David Kastrup wrote:
>> Ben <address@hidden> writes:
>>
>>> Hello everyone,
>>>
>>> I'm learning very quickly just how incredibly powerful the tags system
>>> can be, but today my brain just can't get past one hurdle.
>>>
>>> I am hoping someone can help me to grasp this: suppose I would like to
>>> setup a tag template (for my visualizing and learning) so I can add
>>> some markup to one note in an instrument's part, but have it not show
>>> in the full score. I understand how to include things like overrides
>>> and such in a tag area:
>>>
>>> (i.e.
>>>
>>> \tag #'partonlytag { \once \override DynamicLineSpanner.staff-padding = #8 }
>>>
>>>
>>> )
>>>
>>>
>>> but how does this work when the tagged content is something like
>>> markup, which applies *directly* to a note in the stream? I can't
>>> attach the markup tag content without errors,
>> Not?  Why not?
>>
>> Something like
>>
>> { c'1-\tag partonlytag -"hi!" }
>>
>> should work fine.
>
> Wow. That went right over my head the first time. I was trying to
> force everything to always be contained within a separate "{     }"
> with my tagged content. I really didn't even think about the option of
> simply writing the tag and then right into the markup.

It's not "right into the markup" but "right into the text script",
namely - followed by markup (you can tag only music expressions, and a
text script is a music expression while markup isn't).

> This is awesome. No clue how I missed that.
>
> However, then what would be the best way in this example to have
> multiple different markup 'choices' inline, so I can decide which
> tagged markup to use in future score blocks?
>
> i.e.
>
> \version "2.19.81"
>
>
> flute = \new Staff \relative c'
> { c1 d e f c'-\tag partonlytag ^ \markup {\raise #2 \tiny \italic "my
> markup" }    }
>
>
> cello = \new Staff \relative c,
> { \clef bass c1 c c c }
>
>
>
> \score {
>   % this has the markup from the partonlytag
>   << \flute
>         \cello
>   >>
>   \layout {}
>
>
> }
>
>
> \score {
>   % this does not have the markup from the partonlytag
>   \removeWithTag #'partonlytag
>   << \flute
>
>   >>
>   \layout {}
>
>
> }
>
>
> Suppose I'd like to have several different "my markups" texts to pick
> from inline via tags, how would this be possible then if you use your
> approach? I can't see that...

You put two tagged text scripts, one after the other?

I don't really see what the problem is.

-- 
David Kastrup



reply via email to

[Prev in Thread] Current Thread [Next in Thread]