Hi Lenz,

I am not sure whether toctree only allows to include files in the same
directory or below – have you tried include instead?

Anyway, you could try another approach.

You can have multiple conf.py files in your project and you can call
sphinxbuild with the option -c to use one of the files, eg:

sphinx-build -c firstdocument.py -b latexpdf sourcedir builddir

and

sphinx-build -c seconddocument.py -b latexpdf sourcedir builddir

Then you have to specify different start files in the configuration
files and different files to be excluded from the build.

That way you have all your files in one directory and build your output
files according to the definitions in the two conf.py-files.

HTH
juh

Am 25.03.2014 15:23, schrieb Lenz Grimmer:
> Hi,
> 
> I've started using Sphinx by converting an existing OpenOffice Document
> into rst/sphinx (using od2sphinx). I now have a directory
> "FirstDocument", that contains all the relevant files, e.g. the
> Makefile, conf.py and the *.rst files that resemble this document.
> 
> Now I'd like to create another document, let's call it "SecondDocument".
> I would like to be able to render both documents as individual PDFs.
> However, SecondDocument will contain a number of chapters that are part
> of the "FirstDocument" folder already.
> To avoid having to maintain the same files in two locations, I was
> thinking of creating a directory "common" on the same level as the
> directories for FirstDocument and SecondDocument and change the
> index.rst files in both directories to include these files by adding
> them as "../common/Filename.rst" in the toctrees. However, this does not
> seem to work, I get the following warning when running "make latexpdf"
> in the document directories: "WARNING: toctree contains reference to
> nonexisting document u'common/Filename' - the resulting PDF does not
> contain the chapters in question.
> 
> Do I need to change some option or is there a better approach for
> creating multiple PDF documents that share some chapters? Any
> suggestions are welcome.
> 
> Thanks!
> 
> Lenz
> 
> -- 
> You received this message because you are subscribed to the Google
> Groups "sphinx-users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to [email protected]
> <mailto:[email protected]>.
> To post to this group, send email to [email protected]
> <mailto:[email protected]>.
> Visit this group at http://groups.google.com/group/sphinx-users.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"sphinx-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sphinx-users.
For more options, visit https://groups.google.com/d/optout.

Reply via email to