Issues

Issue #166 resolved

Invalid latex output for bullet list within table

Anonymous created an issue

The generated latex output is invalid (PDF conversion fails) when there is bullet list within the table:

Source {{{ +------------------------+------------+---------------------+ | Header 1 | Header 2 | Header 3 | +========================+============+=====================+ | test | test | - item1 | | | | - item2 | | | | - item3 | +------------------------+------------+---------------------+ }}}

Issue {{{ ! LaTeX Error: Something's wrong--perhaps a missing \item. }}}

This issue may be duplicate to <<issue 55>>

Comments (8)

  1. Georg Brandl repo owner

    Sadly, it seems that there is no way to get automatic table columns and itemize working together.

    For tables that have lists/enumerations in them, you need to set explicit column specs with ".. tabularcolumns".

  2. Juha Mustonen

    I'm fine with the workaround, but I fail to find correct usage of tabularcolumns.

    Can you provide an example what kind of spec needs to be used with bullet lists - I've found the documentation but all I see is setting the widths/alignment. Also, directive does not seem to have content (as I was expecting).

    This might be something to improve on the actual documentation, instead of keeping the info only in here. For example, following does not work:

    .. tabularcolumns:: |L|
    
    +--------------------+
    | Testing            |
    +====================+
    | * bullet           |
    | * item             |
    +--------------------+
    

    But what does?

  3. Anonymous

    Well, 'L' does set for an automatic width, and as Georg said, this is not going to work. But you can use 'p{}', 'm{}', or 'b{}' with giving a fixed width in the curly bracket, e.g. 'p{3cm}', for all columns that have lists in them. You can use 'L','R','C','J' though for all other columns that don't have a list, even in the same table.

    -- Wolfram

  4. Anonymous

    I realize this is an old topic, but has anyone made any progress on beautifying latex tables?

  5. Log in to comment