【发布时间】:2017-07-12 17:39:56
【问题描述】:
我想在 sphinx 中包含乳胶文档。 sphinx html 构建不包括使用 .. raw:: latex 指令链接的乳胶文件。我有
这是我的目录结构
docs/
source/
importlatex.rst
index.rst
build/
tex/
texfile.tex
index.rst 看起来像
Welcome to documentation!
=========================
Contents:
.. toctree::
:maxdepth: 2
icnludelatex
and-other-stuff
icnludelatex.rst 看起来像:
Include Latex
=============
.. raw:: latex
:file: ../tex/texfile.tex
this reference 给出了包含 html 的示例
.. raw:: html
:file: inclusion.html
为什么会这样?
【问题讨论】:
-
Sphinx 没有为该包含引发任何错误。它创建一个带有标题的页面(我在单独的 .rst 中有标题)
-
tex/位于source/目录之外,因此请将其移入或添加到您的conf.py作为源文件的附加路径。 -
建议创建一个MCVE,并将其推送到公共回购,以便我可以重现该问题。
标签: python latex python-sphinx docstring