lilypond-user
[Top][All Lists]
Advanced

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

Re: tagGroup question


From: Jean Abou Samra
Subject: Re: tagGroup question
Date: Fri, 28 Jan 2022 14:49:45 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0

Le 28/01/2022 à 13:45, Simon Albrecht a écrit :
Dear list,

I have encountered some unexpected behaviour with tags and tagGroups. In the following example, I thought the two staffs should look the same, even without the \removeWithTag command, but they don’t:

%%%%%%%%%%%%%%%%%%%%%%%%
\version "2.23.5"
% tested with 2.23.5 (guile2-build) and 2.22.0

\tagGroup sol,mi
\tagGroup withCClefs,noCClefs

\keepWithTag mi,noCClefs
%\removeWithTag withCClefs
<<
  {
    \tag mi,withCClefs \clef alto
    1
    \tag mi,noCClefs \clef bass
    1
  }
  {
    \tag withCClefs \clef alto
    1
    \tag noCClefs \clef bass
    1
  }
>>
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


How come the other tagGroup interferes? Is this a bug?


There was a lot of discussion about this on
https://gitlab.com/lilypond/lilypond/-/issues/4083
and https://codereview.appspot.com/137920043.
In the end, it was decided that \keepWithTag
keeps all music that has one matching tag
(and removes other tagged music iff any of its
tag is in the same group as one of the tags
passed to \keepWithTag). This has the consequence
that

  \keepWithTag mi,noCClefs ...

and

  \keepWithTag mi \keepWithTag noCClefs ...

are different things. You want the latter one
here.

Best,
Jean






reply via email to

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