-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error when building multiple latex documents #1035
Comments
Thanks for reporting the bug. Does it work, when you do not use And what version of Sphinx-Needs are you using? |
Yes, when I set Sphinx version we use is currently 6.2.1. |
Oh sorry, you asked for the Sphinx-Needs version. That is 1.3.0. With the previous version 1.2.2 we had the same error. |
I'm having the same problem here. I think I've the code that causes this (without actually having any idea how the code works, got here by adding print statements and comparing output with a diff viewer). The function sphinx-needs/sphinx_needs/needs.py Lines 278 to 283 in 150bcd6
If I just remove the if statement the problem is solved and everything works as expected. If I set |
Good finding. @chrisjsewell : Do you maybe have an idea, what's going wrong here? |
Not sure, I will have a look |
If I put a random sphinx-needs directive in the alternative index document, it is included in this collection. However, generating documentation from the normal document root fails with the error below. If I only generate the alternative document root the expected PDF document is generated without any errors.
I catched the exception in
Then, if I include a reference to the alternative index in the normal document root index everything works! Except for the fact of course that the 'normal' generated documentation now contains two tables of contents. |
I am sorry, I appreciate all the work everyone is doing, but is there a fix available? Right now I cannot generate multiple latex documents. |
I have stripped my documentation files and done some testing. The documentation files in my stripped project are:
Both files Generating latex from I added two print statements before the statements pointed out by @staalb in the post above to see what data is in the variables. The output was
The function I hope this helps. Please let me know if I can assist. |
Hi, any updates on this issue? I desperately need to generate multiple PDF documents. |
Hi all, sorry for the huge delay in the communication. Is there a chance to get a test case from someone of you, which reproduces the problem? This would also help us to test related PR #1208. |
Hi, I have stripped my documentation files even more now, so you can reproduce the problem. I flattened the directory structure as well. So all files can be recreated in the root of conf.py
index.rst
part.rst
requirements.rst
I believe the error occurs during writing of the LaTeX output and before conversion from LaTeX to PDF. So, the following command should be sufficient to build the documention: Note: I you disable the second document ( |
When I configure latex_documents[] in conf.py to output multiple documents, the following warning is generated and finally an exception occurs:
The latex_documents[] is setup to output two documents: 1) a document with the full output including all Sphinx pages, 2) a document with only a subset of the Sphinx pages.
Both documents contain a page with the following sphinx-needs construct:
When I delete above statements from the .rst file, the file being completely empty, the build succeeds without errors.
Also when I remove the second document with the partial output from latex_documents[], the build succeeds.
The text was updated successfully, but these errors were encountered: