2017-04-26 21:09 GMT+02:00 Simon Albrecht <[email protected]>:
> Am 26.04.2017 um 20:47 schrieb Hendrik Fuß:
>>
>> There are paper variables to achieve ragged-right and ragged-last layout.
>> Is there a way to achieve center-aligned music in a score?
>
>
> Not really. One way would be entering each line as a separate \score inside
> \markup \center-column {},
One could do:
\version "2.19.56"
#(define-markup-list-command (center-column-list-args layout props args)
(markup-list?)
#:properties ((baseline-skip))
(let ((stils (interpret-markup-list layout props args))
(line-width (ly:output-def-lookup layout 'line-width)))
(space-lines baseline-skip
(map
(lambda (arg)
(ly:stencil-translate-axis
arg
(/ (- line-width (interval-length (ly:stencil-extent arg X))) 2)
X))
stils))))
%%%%%%%%%%%%%%%%%%%%%%%
%% EXAMPLE
%%%%%%%%%%%%%%%%%%%%%%%
\header {
title = "TITLE"
subtitle = "SUBTITLE"
}
mus = {
a'1 1 1 \break
1 1 \break
1 \break
1 1 \break
1 1 1 \break
}
sc =
\score {
\new Staff \repeat unfold 6 \mus
\layout { ragged-right = ##t indent = 0 }
}
\markuplist \center-column-list-args \score-lines { \sc }
Cheers,
Harm
_______________________________________________
lilypond-user mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/lilypond-user