1

I am working on a larger documentation project using Python-Sphinx. I just got started and managed to get over the first hurdles and created a folder structure oriented along individual subprojects contributing to the overall project:

.../source/
    conf.py
    index.rst (braket file for everything)
    /OverViewDocumentation/
        overview.rst
    /Subprojects/
        /sub1/
            index.rst
            sub1Docu.rst
        /sub2/
            indexfile.rst
            sub2Docu.rst

What I would like to see is that this structure is accessible through one single html structure, but the leaf-documents become individual LaTeX/PDF documents.

Can that be achieved?

My conf.py looks as follows:

latex_documents = [
    (master_doc,
     'TexDoc1.tex',
     'Title1',
     'author1',
     'Custom docclass'),
    ('abolute\\path\\to\\other\\indexfile.rst',
     'TexDoc2.tex',
     'Title2',
     'author2',
     'Custom docclass'), 
]

But I always get the error message:

WARNING: "latex_documents" config value references unknown document <pathto>\indexfile

Note the error comes up no matter if I use absolute or relative path.

WolfiG
  • 1,059
  • 14
  • 31
  • Is this what you are looking for? https://stackoverflow.com/a/15879277/407651 – mzjn Apr 17 '19 at 13:31
  • ...maybe - I tried to adjust my conf.py, but always got error messages that Sphinx doesn't find the document I want to have broken out of the main document. – WolfiG Apr 17 '19 at 14:37
  • The "startdocname" item should be a relative path. Something like `'Subprojects/sub1/index'`. See http://www.sphinx-doc.org/en/stable/usage/configuration.html#confval-latex_documents – mzjn Apr 17 '19 at 15:36
  • I tried a relative path too didn't work – WolfiG Apr 17 '19 at 15:41

1 Answers1

1

Thanks to mzjn's hints I found the solution.

The error was in the file conf.py. The working file looks like this:

latex_documents = [
    (master_doc,
     'TexDoc1.tex',
     'Title1',
     'author1',
     'Custom docclass'),
    ('relative/path/to/other/indexfile',
     'TexDoc2.tex',
     'Title2',
     'author2',
     'Custom docclass'), 
]

In the file above, I had the following issues

  • use of backslash instead of slash (I am working on a Window system)
  • use of absolute path
  • use of explicit file extension for indexfile
WolfiG
  • 1,059
  • 14
  • 31