Stacked tensions for chord names
Hello! I’ve done a small modification to achieve stacked tensions for ChordNames. My problem is now that the baseline-skip of the used columns need to change depending on the font size. Does anyone of you have an idea how one can set baseline-skip to be proportional to the font-size? Cheers, Valentin Stacked Chords.pdf Description: Adobe PDF document signature.asc Description: This is a digitally signed message part.
Re: Stacked tensions for chord names
Valentin Petzel wrote: Does anyone of you have an idea how one can set baseline-skip to be proportional to the font-size? Well, when the markup command \fontsize changes the font size, it changes the baseline-skip too, to keep it proportional. But this means that if you are overriding the baseline-skip, you need to take care where you place the override wrt \fontsize. See example 4. \version "2.20.0" \markup \line { \column { A B C 1 } \override #(cons 'baseline-skip 1.2) \column { A B C 2 } \fontsize #-6 "..." \fontsize #-6 \column { A B C 3 } \fontsize #-6 \override #(cons 'baseline-skip 1.2) \column { A B C 4 } \override #(cons 'baseline-skip 1.2) \fontsize #-6 \column { A B C 5 } } Cheers, Robin
Re: Stacked tensions for chord names
Hello Robin, thank you for your reply. The problem here is that \fontsize is never called. The font-size is entirely handled by the grob callback ly:text-interface::print. My problem is that at Position where the markup is defined the fontsize is in fact not known. I’ve solved the issue for the time being by using a on-the-fly call to modify the baseline-skip. So now we are somewhere here. Cheers, Valentin Am Montag, 1. März 2021, 10:50:28 CET schrieb Robin Bannister: > Valentin Petzel wrote: > > Does anyone of you have an idea how one can set baseline-skip to be > > proportional to the font-size? > > Well, when the markup command \fontsize changes the font size, it > changes the baseline-skip too, to keep it proportional. > > But this means that if you are overriding the baseline-skip, you need to > take care where you place the override wrt \fontsize. See example 4. > > > \version "2.20.0" > > \markup \line { > \column { A B C 1 } > \override #(cons 'baseline-skip 1.2) \column { A B C 2 } > \fontsize #-6 "..." > \fontsize #-6 \column { A B C 3 } > \fontsize #-6 \override #(cons 'baseline-skip 1.2) \column { A B C 4 } > \override #(cons 'baseline-skip 1.2) \fontsize #-6 \column { A B C 5 } > } > > > > Cheers, > Robin Ohne Titel2.pdf Description: Adobe PDF document signature.asc Description: This is a digitally signed message part.
Re: Stacked tensions for chord names
Valentin Petzel wrote: My problem is that at Position where the markup is defined the fontsize is in fact not known. I’ve solved the issue for the time being by using a on-the-fly call to modify the baseline-skip. You can fetch the font-size with#:properties ((font-size 0)) as done in \translate-scaled for example. And if you are fed up with baseline-skip you can set it to 0, and it then stays 0 whatever the font-size. In your case it would suffice to insert vertical gaps because your column doesn't need to skip exactly like nearby columns do. \version "2.20.0" vshim = \markup \combine \null \translate-scaled #'(0 . -0.2) \null no-bs = #'(baseline-skip . 0) \markup \line { \column { A B C 6 } \override #no-bs \column { A \vshim B \vshim C \vshim 7 } \fontsize #-6 "..." \fontsize #-6 \override #no-bs \column { A \vshim B \vshim C \vshim 8 } \override #no-bs \fontsize #-6 \column { A \vshim B \vshim C \vshim 9 } } Cheers, Robin
Re: Stacked tensions for chord names
On 2021-03-01 7:13 am, Robin Bannister wrote: And if you are fed up with baseline-skip you can set it to 0, and it then stays 0 whatever the font-size. [...] no-bs = #'(baseline-skip . 0) [...] Was there intention behind that variable name? ;-) -- Aaron Hill
Re: Stacked tensions for chord names
Aaron Hill wrote: [...] no-bs = #'(baseline-skip . 0) [...] Was there intention behind that variable name? ;-) The official reason: very short, to avoid any wrapping of code. It just happened - while culling hyphens - and then seemed fun. Cheers, Robin