[Top][All Lists]

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

Re: using \pushToTag and \removeWithTag consecutively

From: Gianmaria Lari
Subject: Re: using \pushToTag and \removeWithTag consecutively
Date: Sat, 14 Apr 2018 15:40:20 +0200

On 14 April 2018 at 15:34, Gianmaria Lari <address@hidden> wrote:

On 14 April 2018 at 15:15, David Kastrup <address@hidden> wrote:
Gianmaria Lari <address@hidden> writes:

> I don't understand the behaviour of this code:
> \version "2.19.81"
> var = {a \tag #'here {b} a}
> {\var} %Result: a b a
> {\removeWithTag #'here \var}  %Result: a a
> {\pushToTag #'here b! \removeWithTag #'here \var}  %Result: a a ; Expected:
> a b! a
> The result is:
> a b a - ok!
> a a - ok!
> a a - not ok; shouldn't be "a b! a" ??

\removeWithTag removes the tagged _expression_.  Which includes the tag

This was what I was afraid of :)

Any idea how I can obtain the same effect? I would like to be able to substitute a note in a variable with another one. 
Of course I could use "\pushToTag ... noteA" when I need noteA and  "\pushToTag ... noteB" when i need noteB but I would like that my variable make sense also when I don't use \pushToTag command.
Thank you, g. 

I found a not nice solution but something that work....:

\version "2.19.81"
var = {a \tag #'herea {} \tag #'hereb {b} a}
{\pushToTag #'herea b! \removeWithTag #'hereb \var}

Ciao, g.

reply via email to

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