lilypond-user
[Top][All Lists]

## Re: Problems with \table in \markuplist

 From: Peter Toye Subject: Re: Problems with \table in \markuplist Date: Mon, 2 Dec 2019 15:52:06 +0000

Hi Harm,

-------------------------
Monday, December 2, 2019, 1:31:09 PM, Thomas Morley wrote:

> Am Mo., 2. Dez. 2019 um 13:00 Uhr schrieb Peter
> Toye <

>> I'm trying to lay out text using a \table and have found (to date) two problems.

>> Firstly, the wordwrap feature doesn't seem to work. See Table 1. I've tried using \wordwrap-lines but the result is the same. Obviously I'm missing something but can't see what.

> You do:
> \wordwrap {"a very very very very very very very very long row 3"}
> i.e. wordwrap gets a markup-list with exactly one entry, a line-break
> will never happen this way.

> Either use wordwrap-string like:
> \markup
>   \override #'(line-width . 12)
>   \wordwrap-string
>     "a very very very very very very very very
> very very very very long text 3"

> Or wardwrap with a suitable markuplist:
> \markup
>   \override #'(line-width . 12)
>   \wordwrap
>     {
>      a very very very very very very very very
> very very very very long text 3
>     }

Ah thanks, that works fine. \wordwrap-string doesn't seem to work in tables.

>> Secondly, the spacing between rows in a table doesn't seem quite right when I use columns. In Table 2, Row 2 the columns have the expected spacing but the space between the last line and row 3 is too small. It's correct for the gap between rows 3 and 4.

> Has nothing to do with the
> table-markup-list-command but with \column
> and similar markup-commands.
> See:
> \markup
>   \column {
>     \box \column { a b }
>     \box \column { a b }
>   }

> This minimal is fixable with:
> \markup
>   \override #'(baseline-skip . 6)
>   \column {
>     \box \override #'(baseline-skip . 3) \column { a b }
>     \box \override #'(baseline-skip . 3) \column { a b }
>   }

> Though I've currently no good idea how to do so in \table

I agree you can do it in a \markup. But I need it in the table. I've now tried to add \vspace after the columns, but t the results are not encouraging. There is now extra space between the bottom of the column and the next row, even with \vspace #0.

\version "2.19.52"

\language "english"

\markuplist  {
"Table 2"
\override #'( padding . 3 )
\override #'( baseline-skip .  4 )
\table #'(-1 -1)
{
"Row 1"
"Text 1"
\column {
"a column"
"row 2"
}
\override #'( baseline-skip . 2.5 )
{\column {
"a "
"slightly"
"but not much"
"but sort of"
"getting there"
"longer"
"text 2"
}
}
\vspace #0
\vspace #0
"Row 3"
"Text 3"
"Row 4"
"Text 4"
}
}

>> Two further questions that I can't find the answers to:

>> Is there a way of ensuring that two items in a markup list are not broken by a page break? For example, the title of a table and the first row.

> No, at least I know none.

Oh well, I can always add some vspace to bring the table title to the top of the next page.

>> How can I increase the distance between the page header and the first line of markup text following a page break?  Setting top-markup-spacing.basic-distance doesn't seem to work.

> Here again I'm sorry being of no help.

> Though this behaviour bugs me as well, here a less complex example:

Looks like this should be an issue. I imagine that markuplist isn't treated as markup here.

The major issue is that LP doesn't have proper word-processing facilities - nor should it - but trying to integrate documents with both text and music doesn't seem that easy. I've never looked at LATEX and would prefer not to have to at this stage in my life.

> Cheers,
>   Harm
reply via email to