🤦🏻‍♂️ Not sure how I missed that. Thanks Lukas!

-Edon
On Mar 27, 2025 at 2:15 PM -0500, Lukas-Fabian Moser <l...@gmx.de>, wrote:
> Hi Edon,
>
> Am 26.03.25 um 18:34 schrieb Edon Valdman:
> > I’m having trouble getting a markup list table centered on a page. All
> > I can get to work is to use commands that wrap the entire thing in a
> > regular \markup, but then the table content won’t be able to be split
> > onto separate pages (which is extremely important in this scenario). I
> > also would rather the entire table be not spread out such that each
> > column is up against the edges of the page.
> >
> > I’ve tried making each row its own markup block so I can center it
> > then put it in a column with the other rows, but this means that each
> > column is sized differently on the X axis, because each row is a
> > separate table, so each row doesn’t take the sizes of the other rows’
> > columns into account.
>
> I hope I understand your problem correctly.
>
> The trick is to use a simple markup function that centers its argument
> on a line. If such a function is applied to a markup list, it gets
> applied to the individual markups in the list.
>
> \version "2.24.3"
>
> #(define-markup-command (center-line layout props content) (markup?)
>    (interpret-markup layout props
>                      (markup #:fill-line (content))))
>
> \markuplist \center-line {
>   \override #'(padding . 2)
>   \override #'(baseline-skip . 50)
>   \table #'(-1 1) {
>     "1. Left-Aligned"
>     "Right-Aligned .1"
>
>     "2. Left-Aligned"
>     "Right-Aligned .2"
>
>     "1. Left-Aligned"
>     "Right-Aligned .1"
>
>     "2. Left-Aligned"
>     "Right-Aligned .2"
>
>     "1. Left-Aligned"
>     "Right-Aligned .1"
>
>     "2. Left-Aligned"
>     "Right-Aligned .2"
>
>     "1. Left-Aligned"
>     "Right-Aligned .1"
>
>     "2. Left-Aligned"
>     "Right-Aligned .2"
>   }
> }
>
> Lukas
>

Reply via email to