Hi,
Le 11/11/2019 à 15:21, Libor Jelinek a écrit :
Hello!
The following snippets works great for HTML builder:
.. list-table:: Table containing another table
:widths: 10 5 10 50
:header-rows: 1
:stub-columns: 1
* - List table
- Header 1
- Header 2
- Header 3 long. Lorem ipsum dolor sit amet.
* - Stub Row 1
- Row 1
- Column 2
- Column 3 long. Lorem ipsum dolor sit amet.
.. list-table:: Embedded table
:widths: 10 5 10 50
:header-rows: 1
:stub-columns: 1
* - List table
- Header 1
- Header 2
- Header 3 long. Lorem ipsum dolor sit amet.
* - Stub Row 1
- Row 1
- Column 2
- Column 3 long. Lorem ipsum dolor sit amet.
But when building PDF (make latexpdf) I encounter "Markup is unsupported in LaTeX:
path/to/file:: nested tables are not yet implemented" error.
Are nested tables still unsupported? Is it a lack of Sphinx or LaTeX? Is there
any workaround?
Yes they are still unsupported for LaTeX builder at dev repo.
https://github.com/sphinx-doc/sphinx/issues/2588 and possibly other issues
exist about this.
There are technical difficulties at LaTeX side but to some extent partial
support could be provided.
Currently table rendering is very difficult in LaTeX because the available
packages are not well adapted to automated production. Already Sphinx has added
various advanced LaTeXing via extra macros (see for example the file
sphinxmulticell.sty) to work around deficiencies of available LaTeX packages.
Sphinx is still in a non-satisfactory state of using three different ways of
rendering LaTeX tables:
- tabulary: tries to adjust column widths automatically; incompatible with
code-blocks, does not allow pagebreaks
- tabular: fall-back when tabulary usage is impossible; compatible with cells
containing code-blocks, does not allow pagebreaks either
- longtable: does allows pagebreak, and is compatible with cells containing
code-blocks
All of the above have issues with footnotes and again Sphinx needed some
advanced LaTeXing to work around the problems
Regarding nesting, let's use TY=tabulary, TR=tabular, LT=longtable in table
below
A can be nested in B:
A\B TR TY LT
TR YES YES YES
TY YES NO YES
LT NO NO NO
Some of the above I tested, others are just my expectation. Perhaps the NO for
TY nested in TY has some workaround but it will be expert LaTeX hacking if at
all possible.
Thus at some point yes, Sphinx could support nested tables for LaTeX output.
Jean-François
--
You received this message because you are subscribed to the Google Groups
"sphinx-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/sphinx-users/qqecl6%247jal%241%40blaine.gmane.org.