[Python Sphinx在生成pdf时跳过第一部分

问题描述 投票:4回答:2

我使用sphynx从静态.rst文件生成文档(不提取文档字符串)。>>

我的存储库中有两个文件:

index.rst

.. toctree::

   intro

intro.rst

Will be skipped
===============

Where is my parent section?
---------------------------

Second section
==============

下面是通过运行sphinx-build -b latex . _build; cd _build; pdflatex *获得的pdf的屏幕截图:

“在此处输入图像描述”

吃惊或什么?

我使用sphynx从静态.rst文件生成文档(不提取文档字符串)。我的存储库中有两个文件:index.rst .. toctree :: intro和intro.rst将被跳过========= ...

python latex python-sphinx pdflatex toctree
2个回答
4
投票

感谢您提供工作示例。我可以在Windows上使用Sphinx 1.2.3重现您的观察结果。据我所知,HTML输出按预期工作。使用LaTeX构建器,将生成以下文档结构:


1
投票

如果我使用texlive(单独的源目录和构建目录)创建一个新的Sphinx项目,请使用Ubuntu 14.04和sphinx-quickstart,将示例文件拖放到source目录中并使用:

© www.soinside.com 2019 - 2024. All rights reserved.