useblocks / sphinx-needs

Adds needs/requirements to sphinx
https://sphinx-needs.readthedocs.io/en/latest/index.html
MIT License
209 stars 66 forks source link

Nested needs break the latex output #1305

Open fournier-p opened 1 week ago

fournier-p commented 1 week ago

Hi,

It seems the nested needs are bugged on the latex output, without using the nested needs, the document is generated properly, but with the nested needs, inside the generated .tex file, it's like all the content of the document before the nested needs is deleted.

I'll try to provide a minimal working example soon.

fournier-p commented 1 week ago

After a bit more investigation, it happens even with just a table in a need.

It's like the depart_table method of sphinx' LaTeXTranslator is not behaving correctly when it is inside the structure of a need, even though the structure of the needs (table, tgroup, tbody, etc) seems to be exactly the same as normal tables

fournier-p commented 1 week ago

here is a minimal rst to test this:

=====
Title
=====

Some text before the requirement

.. req:: Requirement
    :id: req_001

    +----------------+
    | Content        |
    +----------------+

The generated .tex file will not contain the Some text before the requirement part

fournier-p commented 1 week ago

After some more testing, this bug happens with the "complete" layout, but not the "clean" one