lilypond-user
[Top][All Lists]
Advanced

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

Re: Black borders with table using \markuplist and please center


From: Adam Good
Subject: Re: Black borders with table using \markuplist and please center
Date: Sun, 21 Feb 2021 22:13:25 -0500

Hi Pierre,
Thank you very much for this solution. My numbers were just thrown in for an example and in reality I have varying strings on text so line length would need to be played with.

Adam

On Sun, Feb 21, 2021 at 3:46 PM Pierre Perol-Schneider <pierre.schneider.paris@gmail.com> wrote:
Oops, forget the 'baseline-skip...
Again:

\version "2.22.0"

cell = \markup
  \override #'(line-join-style . miter)
  \override #'(line-cap-style . square)
  \path #.3 #'((moveto -1.5 -1.5)(lineto -1.5 3)(lineto 3 3)(lineto 3 -1.5))


\markup \fill-line {
  \column
  \override #'(padding . -.3)
  \table #'(0 0 0)
    {
      %\underline { right-aligned center-aligned left-aligned }
      { \combine\cell "1" }{ \combine\cell "3" }{ \combine\cell "3" }
      { \combine\cell "4" }{ \combine\cell "" }{ \combine\cell "6" }
      { \combine\cell "7" }{ \combine\cell "8" }{ \combine\cell "6" }
      { \combine\cell "10" }{ \combine\cell "" }{ \combine\cell "12" }
      \with-dimensions-from\null
      \override #'(line-cap-style . square)
      \path #.3 #'((moveto -2.25 1.8)(lineto 11.25 1.8))
    }
}

Cheers,
Pierre

Le dim. 21 févr. 2021 à 21:43, Pierre Perol-Schneider <pierre.schneider.paris@gmail.com> a écrit :
Hi Adam,
Here's my attempt:

\version "2.22.0"

cell = \markup
  \override #'(line-join-style . miter)
  \override #'(line-cap-style . square)
  \path #.3 #'((moveto -1.5 -1.5)(lineto -1.5 3)(lineto 3 3)(lineto 3 -1.5))


\markup \fill-line {
  \column
  \override #'(baseline-skip . -.3)
  \override #'(padding . -.3)
  \table #'(0 0 0)
    {
      %\underline { right-aligned center-aligned left-aligned }
      { \combine\cell "1" }{ \combine\cell "3" }{ \combine\cell "3" }
      { \combine\cell "4" }{ \combine\cell "" }{ \combine\cell "6" }
      { \combine\cell "7" }{ \combine\cell "8" }{ \combine\cell "6" }
      { \combine\cell "10" }{ \combine\cell "" }{ \combine\cell "12" }
      \with-dimensions-from\null
      \override #'(line-cap-style . square)
      \path #.3 #'((moveto -2.25 1.3)(lineto 11.25 1.3))
    }
}

Cheers,
Pierre

Le dim. 21 févr. 2021 à 21:03, Adam Good <goodadamgood@gmail.com> a écrit :
Harm thank you very much! I feel centered.

If anyone could come up with a solution for borders it would be a nice option.

best,
Adam

On Sun, Feb 21, 2021 at 11:57 AM Thomas Morley <thomasmorley65@gmail.com> wrote:
Am So., 21. Feb. 2021 um 17:24 Uhr schrieb Adam Good <goodadamgood@gmail.com>:
>
> Hi Everyone,
> I can make this pretty little table, see below but could someone please help me add borders / gridlines around the cells? And, I'd like to be able to center the table to the middle of the page.
>
> Thank you in advance!
> Adam
>
> %%%
> \markuplist {
>   \override #'(padding . 4)
>   \table #'(0 0 0)
>     {
>       %\underline { right-aligned center-aligned left-aligned }
>       "1" "2" "3"
>       "4" "" "6"
>       "7" "8" ""
>       "10" "" "12"
>     }
> }

Borders / gridlines are not yet coded for \table, maybe I should have
done so, at least as an option.
Currently I've no time to delve into it maybe someone else can step in.

If you don't mind loosing the page breaking option, centering is as simple as:

\markup \fill-line {
  \column
  \override #'(padding . 4)
  \table #'(0 0 0)
    {
      %\underline { right-aligned center-aligned left-aligned }
      "1" "2" "3"
      "4" "" "6"
      "7" "8" ""
      "10" "" "12"
    }
}

Cheers,
  Harm

reply via email to

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