lilypond-user
[Top][All Lists]
Advanced

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

Re: printing "a 2" at the beginning of staves automatically


From: Jean Abou Samra
Subject: Re: printing "a 2" at the beginning of staves automatically
Date: Mon, 23 May 2022 12:26:10 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.1

Le 23/05/2022 à 08:55, Werner LEMBERG a écrit :
Aaand some nits :-)
* Contrary to Valentin's solution, the first 'a 2' text is not
   left-aligned to the left edge of the note head.  This is especially
   visible with whole notes (see attached image).  It is not clear to
   me why this is so, given that text is left-aligned if I do

   ```
   \override TextSpanner.bound-details.left.text = "rit."
   c’1\startTextSpan
   ```

   for example.



See the attached file, fixing that problem and making it
per-voice.



* `\tweak` doesn't work right before `\set Staff.staffAnnotation`.
   Instead, I have to use `\once \override`, AFAICS.



It actually never makes sense to \tweak a \set. \tweak
takes an event and changes a property of any grob that
has been created from this event. The \set merely modifies
a context property. It doesn't itself lead to the grob:
the engraver notices that the property has been modified
(it could have been modified with means other than \set,
like ly:context-set-property! in another engraver), and
that leads it to decide it should create a grob. The underlying
problem is that this functionality should really be implemented
with an event, but there is currently no interface for
defining new event types (you have to tamper with internals
in ways that are not proof to upgrades), so I prefer to avoid
it if possible.



   Hopefully, I'm missing something.  Otherwise both Valentin's and
   Jeans' solutions are heavily limited because it happens quite often
   that the 'a 2' string must be positioned individually without
   affecting other rehearsal marks – or text spanners.


What do you mean by 'positioned individually'? Can
you give an example?


This question also still stands:


Very nice, thanks!  Besides the (hopefully) harmless warning

```
programming error: Spanner `TextSpanner' is not fully contained
                    in parent spanner.  Ignoring orphaned part
continuing, cross fingers
```

it seems to work fine.


     Werner


Can you give an example where it occurs?



Best,
Jean




reply via email to

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