[prev in list] [next in list] [prev in thread] [next in thread] 

List:       lilypond-user
Subject:    Re: Black borders with table using \markuplist and please center
From:       Pierre Perol-Schneider <pierre.schneider.paris () gmail ! com>
Date:       2021-02-21 20:43:08
Message-ID: CAPHOTuWFUUcHehqqM5i1AEOkddyoqqWry7MccP0Rdb70wLc=4A () mail ! gmail ! com
[Download RAW message or body]

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
>>
>

[Attachment #3 (text/html)]

<div dir="ltr"><div>Hi Adam,</div><div>Here&#39;s my \
attempt:</div><div><br></div><div>\version &quot;2.22.0&quot;<br><br>cell = \
\markup<br>   \override #&#39;(line-join-style . miter)<br>   \override \
#&#39;(line-cap-style . square)<br>   \path #.3 #&#39;((moveto -1.5 -1.5)(lineto -1.5 \
3)(lineto 3 3)(lineto 3 -1.5))<br><br><br>\markup \fill-line {<br>   \column<br>   \
\override #&#39;(baseline-skip . -.3)<br>   \override #&#39;(padding . -.3)<br>   \
\table #&#39;(0 0 0)<br>      {<br>         %\underline { right-aligned \
center-aligned left-aligned }<br>         { \combine\cell &quot;1&quot; }{ \
\combine\cell &quot;3&quot; }{ \combine\cell &quot;3&quot; }<br>         { \
\combine\cell &quot;4&quot; }{ \combine\cell &quot;&quot; }{ \combine\cell \
&quot;6&quot; }<br>         { \combine\cell &quot;7&quot; }{ \combine\cell \
&quot;8&quot; }{ \combine\cell &quot;6&quot; }<br>         { \combine\cell \
&quot;10&quot; }{ \combine\cell &quot;&quot; }{ \combine\cell &quot;12&quot; }<br>    \
\with-dimensions-from\null<br>         \override #&#39;(line-cap-style . square)<br>  \
\path #.3 #&#39;((moveto -2.25 1.3)(lineto 11.25 1.3))<br>      \
}<br>}</div><div><br></div><div>Cheers,</div><div>Pierre<br></div></div><br><div \
class="gmail_quote"><div dir="ltr" class="gmail_attr">Le  dim. 21 févr. 2021 à  \
21:03, Adam Good &lt;<a \
href="mailto:goodadamgood@gmail.com">goodadamgood@gmail.com</a>&gt; a écrit  \
:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px \
0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Harm \
thank you very  much! I feel centered.<div><br></div><div>If anyone could come up \
with a solution for borders it would be a nice \
option.</div><div><br></div><div>best,</div><div>Adam</div></div><br><div \
class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Feb 21, 2021 at 11:57 \
AM Thomas Morley &lt;<a href="mailto:thomasmorley65@gmail.com" \
target="_blank">thomasmorley65@gmail.com</a>&gt; wrote:<br></div><blockquote \
class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid \
rgb(204,204,204);padding-left:1ex">Am So., 21. Feb. 2021 um 17:24 Uhr schrieb Adam \
Good &lt;<a href="mailto:goodadamgood@gmail.com" \
target="_blank">goodadamgood@gmail.com</a>&gt;:<br> &gt;<br>
&gt; Hi Everyone,<br>
&gt; I can make this pretty little table, see below but could someone please help me \
add borders / gridlines around the cells? And, I&#39;d like to be able to center the \
table to the middle of the page.<br> &gt;<br>
&gt; Thank you in advance!<br>
&gt; Adam<br>
&gt;<br>
&gt; %%%<br>
&gt; \markuplist {<br>
&gt;     \override #&#39;(padding . 4)<br>
&gt;     \table #&#39;(0 0 0)<br>
&gt;        {<br>
&gt;           %\underline { right-aligned center-aligned left-aligned }<br>
&gt;           &quot;1&quot; &quot;2&quot; &quot;3&quot;<br>
&gt;           &quot;4&quot; &quot;&quot; &quot;6&quot;<br>
&gt;           &quot;7&quot; &quot;8&quot; &quot;&quot;<br>
&gt;           &quot;10&quot; &quot;&quot; &quot;12&quot;<br>
&gt;        }<br>
&gt; }<br>
<br>
Borders / gridlines are not yet coded for \table, maybe I should have<br>
done so, at least as an option.<br>
Currently I&#39;ve no time to delve into it maybe someone else can step in.<br>
<br>
If you don&#39;t mind loosing the page breaking option, centering is as simple \
as:<br> <br>
\markup \fill-line {<br>
   \column<br>
   \override #&#39;(padding . 4)<br>
   \table #&#39;(0 0 0)<br>
      {<br>
         %\underline { right-aligned center-aligned left-aligned }<br>
         &quot;1&quot; &quot;2&quot; &quot;3&quot;<br>
         &quot;4&quot; &quot;&quot; &quot;6&quot;<br>
         &quot;7&quot; &quot;8&quot; &quot;&quot;<br>
         &quot;10&quot; &quot;&quot; &quot;12&quot;<br>
      }<br>
}<br>
<br>
Cheers,<br>
   Harm<br>
</blockquote></div>
</blockquote></div>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic