How to integrate Sphinx-generated Latex code in existing Latex documents?

浪子不回头ぞ 提交于 2019-12-11 01:49:18

问题


I've used Sphinx to document a Python library. So far this works great, I get nice HTML and LaTeX output. Concerning Latex, Sphinx generates a complete standalone document with lots of special packages and configurations.

But, I would like to integrate the generated Latex files within an already existing Latex project (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).

Does Sphinx' Latex-Builder support such a use case? If not, is there a more general approach how to merge independent Latex-documents?

Thanks for any hints!


回答1:


It seems there is no generally valid answer to this question. I've asked this question on the sphinx mailing list and received an answer which basically says one has to manually extract and partly convert the relevant parts of the latex code generated by sphinx - a less expensive solution does not yet exist.



来源:https://stackoverflow.com/questions/4336335/how-to-integrate-sphinx-generated-latex-code-in-existing-latex-documents

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!