On 09/22/2018 08:02 PM, [email protected] wrote:
That is only part of a table that is 19x19. Hence, the width of the columns is the same as in the original one. The first column is text, while the rest are numeric. At the end of the day, both, the numeric and the text columns are going to wrap.

Julio Rojas
[email protected] <mailto:[email protected]>


On Sat, Sep 22, 2018 at 3:39 PM Paul A. Rubin <[email protected] <mailto:[email protected]>> wrote:

    On 09/22/2018 12:40 PM, [email protected]
    <mailto:[email protected]> wrote:
    Dear all,

    I want to repost my previous question but with a different
    context and with a working example. As you can see on the
    attached file, I have a landscape long table, for which each
    column has a predefined width. The resulting PDF shows that the
    text in the cells of this table has a line spacing wider than
    expected. This behavior is the same in a vertical (regular) long
    table, as well as in a table in a float. It seems as if reducing
    the size of the font does not affect the line spacing.

    Trying to set line spacing up in the paragraph settings menu,
    only worsens the problem, as extra spacing is added on the top
    and bottom of the text.

    Is there any way to do this? Why is this the behavior in Lyx?

    Thanks in advance. Regards,

    Julio Rojas
    [email protected] <mailto:[email protected]>
    Do you need the overall width of the table to be that narrow (and,
    in particular, do you need it narrow enough that the line of text
    in each cell of the right column has to wrap)?

    Paul

Bear with me, this gets a bit funky. I don't think the issue is with LyX; I think it has something to do with using \tiny (or presumably other font size commands) inside table cells. I tried the following fix on one copy of the table, which I think gets what you want.

1. I highlighted the whole table and reset the font size.
2. I removed "(1)", "(2)" etc. from the first column (more on that below).
3. I put "{\tiny " (note the trailing space) in ERT outside the table
   and immediately before it and "}" in ERT outside and immediately
   after the table.
4. The table compiled without extra vertical spacing.

Regarding step 2, the way you did the font resizing wrapped the content of each cell in LaTeX braces. Without those braces, starting the cell contents with a left parenthesis produced a lot of undefined command errors. I don't know why -- maybe some artifact of the longtable package? It turns out you can leave the "(1)" etc. in if your precede each one with a hard space (again, no idea why that works). You can also wrap each cell of the left column in braces by inserting an opening brace in ERT and a closing brace in ERT. It's possible sacrificing a small animal as an offering to the LaTeX gods would also work, but PETA already has me on their watch list, so I didn't try that.

Paul


Reply via email to