Am Donnerstag, 20. Juni 2024, 07:02:48 MESZ schrieb Werner LEMBERG: > Folks, > > > is it possible to access markup properties like `baseline-skip` via > \tweak? It is often necessary to define a markup command that gets in > turn wrapped into a music function, and for such situations a > tweak-like command would be quite handy. > > In the example below, I want to set the markup property `bar` as a > tweak to influence `\foo`. > > [I know about an alternative solution to define an optional argument > for function `foo`. I also know about another solution by simply > defining, say, function `foox` that explicitly adds `\override` right > after `\markup`.] > > > Werner
Hello Werner, you could of course do something like %%% #(define-markup-command (foo-markup layout props) () #:properties ((bar #f) (details '())) (interpret-markup layout props #{ \markup \fontsize #(or bar (assoc-get 'bar (assoc-get 'props details '()) 10)) \natural #})) foo = #(define-music-function () () #{ \tweak parent-alignment-X #CENTER \tweak self-alignment-X #CENTER -\markup \foo-markup #}) { f'2-\foo f'2-\tweak details.props.bar #5 \foo } %%% Valentin
signature.asc
Description: This is a digitally signed message part.