sphinx-traceability-extension
sphinx-traceability-extension copied to clipboard
Matrix sources on same line in PDF
When using the item-matrix
to produce HTML, and one target item has multiple source items, each source is on its own line.
But when generating latex / a PDF, these source items are all one the same line, and can create ugly wide tables that overflow the page borders.
Can't reproduce in Sphinx 1.2.2. One source item per line in PDFs also. Please, could you indicate which Sphinx version was used and provide a sample document?
Thanks for checking. You are right, it works in simple cases.
It breaks once \begin{longtable}
gets used instead of \begin{tabulary}
, which seems to happen with 30 target items or more.
Example: https://gist.github.com/petsuter/55dcb1fb7b7ccf55ac5c
I used Sphinx 1.2.3 now, but I think I got the same with Sphinx 1.2.2 before.
Might be that this is a general Sphinx issue: https://bitbucket.org/birkenfeld/sphinx/issue/1580/paragraphs-in-longtable-dont-work-in-latex
As a workaround I can apparently add
.. tabularcolumns:: |p{0.45\linewidth}|p{0.45\linewidth}|
before the .. item-matrix::
. Maybe this could somehow be added automatically in traceability.py
? (But I'm not sure what the relation to the left_colspec
and right_colspec
is that is already added.)