Hendrik Fuß <hend...@kontrafuss.de> writes: > There are paper variables to achieve ragged-right and ragged-last layout. > Is there a way to achieve center-aligned music in a score? Similar to > ragged-left, but equally distribute the space between left and right > borders (aka ragged-both). > > I know it's an unusual request, but I feel it makes sense to my application.
It fails to use the standard line-spacing algorithm but you can try
#(define-markup-command (centered-in-line layout props mup) (markup?) #:properties ((line-width)) (interpret-markup layout props #{ \markup \translate #`(,(/ line-width 2) . 0) \center-align #mup #})) \markuplist \centered-in-line \score-lines { { #@(map (lambda x #{ c'2-"Oh" g'-#(format "A~v{a~}h" (random 20) '(1)) #}) (iota 300)) } \layout { ragged-right = ##t } }
Frankly, the output is awful. -- David Kastrup
_______________________________________________ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user