[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Center-align a score
From: |
David Kastrup |
Subject: |
Re: Center-align a score |
Date: |
Wed, 26 Apr 2017 23:07:05 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) |
Hendrik Fuß <address@hidden> 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
Re: Center-align a score, Kieren MacMillan, 2017/04/26
Re: Center-align a score,
David Kastrup <=
Re: Center-align a score, Simon Albrecht, 2017/04/27