python-sphinx

WARNING: toctree contains reference to nonexisting document error with Sphinx

浪子不回头ぞ 提交于 2020-12-31 11:50:46
问题 I started using Sphinx a couple of days ago to document a python package, and I'm getting what seems to be a common error, but I cannot find a solution for it. I used the sphinx-quickstart to set everything up. I used "doc/" for the documentation root location. The folder containing my package is setup as: myfolder/ doc/ mypackage/ __init__.py moprob.py ... After the quick start, I edited the path in conf.py to be: import os import sys sys.path.insert(0, os.path.abspath('..')) Then I added

WARNING: toctree contains reference to nonexisting document error with Sphinx

折月煮酒 提交于 2020-12-31 11:47:44
问题 I started using Sphinx a couple of days ago to document a python package, and I'm getting what seems to be a common error, but I cannot find a solution for it. I used the sphinx-quickstart to set everything up. I used "doc/" for the documentation root location. The folder containing my package is setup as: myfolder/ doc/ mypackage/ __init__.py moprob.py ... After the quick start, I edited the path in conf.py to be: import os import sys sys.path.insert(0, os.path.abspath('..')) Then I added

Sphinx: split output html into smaller pages than input files

混江龙づ霸主 提交于 2020-12-10 09:59:36
问题 Suppose I have a Sphinx index file .. toctree:: foo bar And document foo has only one heading *** Foo *** All about foo. while bar has two *** Bar *** All about Bars. ****** Parrot ****** All about ex-parrots. If I compile this to HTML, it will create three pages; index , foo and bar . But suppose I want Parrot to have its own HTML page. Is there a way to achieve this without splitting the bar source file? 回答1: Unfortunately, based on this answer from another question from the ReadTheDocs

Sphinx: split output html into smaller pages than input files

|▌冷眼眸甩不掉的悲伤 提交于 2020-12-10 09:58:55
问题 Suppose I have a Sphinx index file .. toctree:: foo bar And document foo has only one heading *** Foo *** All about foo. while bar has two *** Bar *** All about Bars. ****** Parrot ****** All about ex-parrots. If I compile this to HTML, it will create three pages; index , foo and bar . But suppose I want Parrot to have its own HTML page. Is there a way to achieve this without splitting the bar source file? 回答1: Unfortunately, based on this answer from another question from the ReadTheDocs

Sphinx: split output html into smaller pages than input files

房东的猫 提交于 2020-12-10 09:56:43
问题 Suppose I have a Sphinx index file .. toctree:: foo bar And document foo has only one heading *** Foo *** All about foo. while bar has two *** Bar *** All about Bars. ****** Parrot ****** All about ex-parrots. If I compile this to HTML, it will create three pages; index , foo and bar . But suppose I want Parrot to have its own HTML page. Is there a way to achieve this without splitting the bar source file? 回答1: Unfortunately, based on this answer from another question from the ReadTheDocs

Specifying targets for intersphinx links to numpy, scipy, and matplotlib

旧时模样 提交于 2020-11-30 04:47:11
问题 Following the documentation for setting up Sphinx documentation links between packages, I have added intersphinx_mapping = {'python': ('http://docs.python.org/2', None), 'numpy': ('http://docs.scipy.org/doc/numpy/', None), 'scipy': ('http://docs.scipy.org/doc/scipy/reference/', None), 'matplotlib': ('http://matplotlib.sourceforge.net/', None)} to my conf.py , but can't seem to get links to any project other than Python itself to work. For example :term:`svg graphics <matplotlib:svg>` just

How can I link to a page section in a sphinx toctree

試著忘記壹切 提交于 2020-11-28 03:59:35
问题 I have a .. toctree as part of a sphinx page, which includes relative links to other rst files in my package. How can I include a link to a subsection of a given page, rather than the full page itself? I took a stab at .. toctree:: page#section But that didn't work. Any help is great. 回答1: After much hackery, I've come to the following solution, but I should first state that my goal was to: have the heading NOT appear in the content body have the heading appear in the TOC So basically linking

How can I link to a page section in a sphinx toctree

烈酒焚心 提交于 2020-11-28 03:57:04
问题 I have a .. toctree as part of a sphinx page, which includes relative links to other rst files in my package. How can I include a link to a subsection of a given page, rather than the full page itself? I took a stab at .. toctree:: page#section But that didn't work. Any help is great. 回答1: After much hackery, I've come to the following solution, but I should first state that my goal was to: have the heading NOT appear in the content body have the heading appear in the TOC So basically linking