lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Center Table-of-Contents


From: Thomas Morley
Subject: Re: Center Table-of-Contents
Date: Sun, 13 Mar 2022 14:21:27 +0100

Am So., 13. März 2022 um 12:32 Uhr schrieb Valentin Petzel <valentin@petzel.at>:
>
> usually centering markups can be done like this:
>
[...]
> \markup \fill-line {
>      \override #'(line-width . 60)
>      \column
>      \table-of-contents
> }
[...]

This will work, unless the TOC will exceed one page.

Probably:

#(define-markup-list-command (tst layout props args)(markup-list?)
  #:properties ((line-width))
  (let* ((layout-lw (ly:output-def-lookup layout 'line-width))
         (diff-lw (- layout-lw line-width)))
  (map
    (lambda (x) (ly:stencil-translate-axis x (/ diff-lw 2) X))
    (interpret-markup-list layout props args))))

\markuplist
  \override-lines #'(line-width . 60)
  \tst \table-of-contents


Cheers,
  Harm



reply via email to

[Prev in Thread] Current Thread [Next in Thread]