sphinx-traceability-extension icon indicating copy to clipboard operation
sphinx-traceability-extension copied to clipboard

Matrix sources on same line in PDF

Open petsuter opened this issue 10 years ago • 4 comments

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.

petsuter avatar Sep 25 '14 13:09 petsuter

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?

ociu avatar Sep 26 '14 23:09 ociu

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.

petsuter avatar Sep 27 '14 12:09 petsuter

Might be that this is a general Sphinx issue: https://bitbucket.org/birkenfeld/sphinx/issue/1580/paragraphs-in-longtable-dont-work-in-latex

petsuter avatar Sep 27 '14 13:09 petsuter

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.)

petsuter avatar Oct 08 '14 09:10 petsuter