Thanks Vaclav, exactly what I was looking for. I'll try to adapt your solution to my LaTeX project.
(.. and sorry for the long answer delay) Oben On Dec 19 2010, 10:26 pm, Václav Šmilauer <oty...@gmail.com> wrote: > > But, I would like to integrate the generatedLatexfiles within an > > already existingLatexproject (more precise: in the appendix of a > > book). In particular I want the Sphinx-generated documentation pages > > to have the header, footer and section heading styles of the parent > > document. I guess I could somehow transfer the relevant parts by > > manually removing unneeded stuff and adjusting various options in the > > tex files generated by Sphinx. However, probably this is going to be a > > very tedious fiddling taking too much of my time (thinking of > > conflicting packages and options I have to detect and fix). Ideally > > Sphinx would just output some package and command declarations I can > > include in the preamble of the existingLaTeXdocument and the actual > > content which can be included anywhere in the document area. > > Hi, I was doing the same half year ago in my thesis. What I did was to > cut the sphinx-generatedLaTeXsource file in pieces, and then include > them at appropriate places; a part of the sphinx-generated preamble > was to be included in the global preamble. > > I had to replace a few things with regexps, such as hyper-references > to sphinx bibliography by \cite{...} (Sphinx references were generated > from a .bib files, and those .bib files were then included directly in > the resulting doc). > > You can browse the code > athttp://bazaar.launchpad.net/~eudoxos/+junk/thesis/files > ; you will be particularly interested in build.py (which cuts the > sphinx doc in chunks, does the substitutions and saves them) and > thesis.tex, which is the master document. The sphinx preamble is > included at line 12, and the sections from sphinx start from 190. > > The final pdf is available > fromhttp://beta.arcig.cz/~eudoxos/smilauer2010-phd-thesis.pdf > , the sphinx sections are chapters 5, 6, 7 (pg. 69-148) and appendices > C, D (161-240). The HTML sphinx doc is (the version online is updated, > so does not correspond exactly) athttp://www.yade-dem.org/sphinx/ > (chapter 2 of the thesis was originally written inLaTeX, then > converted to sphinx, so is part of the HTML docs now). > > HTH, Vaclav -- You received this message because you are subscribed to the Google Groups "sphinx-dev" group. To post to this group, send email to sphinx-dev@googlegroups.com. To unsubscribe from this group, send email to sphinx-dev+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sphinx-dev?hl=en.