Hi,

Am 12.04.24 um 17:36 schrieb Kieren MacMillan:
Hi Raphael,

I note that in one solution one uses \remove and in the other \omit to achieve 
the same thing.

Is there any prospect of  moving to a situation where only one operator is used 
to achieve a result, possibly by having a preferred and deprecated options 
first? This is a general point, not just  restricted to this one case.
I wouldn’t think so…

They are two different — both quite useful — commands, used in different 
contexts/situations:

1. \remove is a general function for eliminating an engraver from a whole 
context (in this example, the Time_signature_engraver from the Staff context).

2. \omit is both a handy short form [when used in the identical location as the 
\remove] as well as a one-off function/action (e.g., \once \omit 
Staff.TimeSignature, used “inline” in a music expression).

To elaborate on what Jean already demonstrated:

0) \hide only switches on "invisible ink", so to speak. Which means
everything takes up space as usual.

1) \omit disables the "stencil" callback of a Grob. This means that when
it comes to creating the actual graphical object belonging to the grob,
nothing is produced; in particular, the object does not take up space
anymore (insofar as the spacing takes the actual stencil extent into
account).

2) Removing the engraver completely removes the infrastructure creating
the graphical object. Since an engraver does not only print objects, but
does all sorts of bookkeeping (and maybe even janitorial jobs that other
engravers rely upon), removing an engraver can have all kinds of
(desired or undesired) side effects. Of course, LilyPond is constructed
in a modular way, and we can remove many engravers without actually
harming LilyPond's normal function, but the effect is definitely more
than just refraining from printing some graphical object.

Lukas


Reply via email to