python-sphinx

Overriding the default field name limit in sphinx/docutils

☆樱花仙子☆ 提交于 2020-01-10 10:35:09
问题 I am using sphinx for generating html documentation for a project. I make extensive use of field lists. When generating html, each label/value pair is rendered as a single table row with two cells if the lenght of the label is at most 14 characters. If the label of one pair is longer than 14 characters, the label/values are rendered as two table rows. I want to increase the wrapping limit to a larger value (e.g. 40). I have found that the limit is controlled by the --field-name-limit option

How do I get rid of the “Release 1” in the Page Header of the Sphinx Latex Output?

狂风中的少年 提交于 2020-01-10 05:22:05
问题 I'm using the "manual" document class of Sphinx and I'm quite happy with how the Latex Output looks like, except for the page header. It contains the title of my paper, as well as a "Release 1". Since I'm writing a paper and not a documentation, I clearly don't need the release information. Unfortunately, it is very hard to find information on how to customize Sphinx latex output. Does somebody know how to do it? 回答1: To suppress the release info at the top of your Latex output, you need to

Displaying dictionary data in Sphinx documentation

社会主义新天地 提交于 2020-01-10 03:47:26
问题 I have a dictionary in Python project source code which describes default configuration values. The dictionary is quite lengthy. I'd like to see dictionary in Sphinx documentation in other format besides "View source", so that people can quickly check for the default values. Does Sphinx provide options to format dictionary-like variables for human-readable format when used with Sphinx autodoc? I am currently using .. automodule:: to dump out the whole module and I get the dictionary as one

sphinx, kivy and autodoc: warning and issues to create documentation

纵饮孤独 提交于 2020-01-07 03:52:14
问题 I would like to create documentation of my code in Sphinx. I installed everything and made some simple trial that worked fine. (I run sphinx-quickstart, edit the conf.py to include modules' path, work with a tutorial to know how sphinx works etc. etc.) Yet, my code import many kivy libraries. And when I want to create the documentation on module that import kivy, it fails. For instance, if I have my main.py like this: #!/usr/bin/python # -*- coding: utf-8 -*- from kivy.app import App def test

Can multiple paragraphs be substituted into reStructuredText table cells?

此生再无相见时 提交于 2020-01-06 06:31:32
问题 I have a reST formatted table where some cells contain long blocks of text (i.e. multiple paragraphs or bulleted lists) and they get updated periodically, for example: +-------+-----------------------+ |Cat | Chunk that is updated | | | periodically. | | | | | | Line #2, #3, etc | +-------+-----------------------+ |Dog | Substitution means | | | table boilplat static | | | | | | Line #2, #3, etc | +-------+-----------------------+ To avoid maintenance of the table boilerplate every update, I

Printable PDF output with links as footnotes

穿精又带淫゛_ 提交于 2020-01-05 10:03:20
问题 I'm using sphinx to generate the documentation of a python project and I'm making heavy use of external links. I'd like to build html and latexpdf outputs with these as clickable links (which is the default), but also a PDF version that will be printed, with these links showing up in footnotes. In short: is there a way to write external links in a .rst file like this: Ask a question on `my favorite Q&A website <http://stackoverflow.com/>`_. and have a special output that will interpret this

Printable PDF output with links as footnotes

北城以北 提交于 2020-01-05 10:02:11
问题 I'm using sphinx to generate the documentation of a python project and I'm making heavy use of external links. I'd like to build html and latexpdf outputs with these as clickable links (which is the default), but also a PDF version that will be printed, with these links showing up in footnotes. In short: is there a way to write external links in a .rst file like this: Ask a question on `my favorite Q&A website <http://stackoverflow.com/>`_. and have a special output that will interpret this

Format tables in reStructuredText

喜欢而已 提交于 2020-01-05 08:25:33
问题 I have a table issue when using Sphinx with the bootstrap theme ( build html ). Is there a way to format the table such that it wouldn't stretch on the entire screen width? I would like the columns to have the text width and the overall table to be center aligned. What about column alignment? Could I center align some of the columns? Here is a screenshot with how the table looks like right now: http://imgur.com/Q4Idzyd 来源: https://stackoverflow.com/questions/19241651/format-tables-in

Using ReadTheDocs to host Sphinx Docs created with Jupyter

倾然丶 夕夏残阳落幕 提交于 2020-01-05 07:02:13
问题 I continue to have failed builds with ReadTheDocs using a github repository with Jupyter notebooks rendered using sphinx and the readthedocs theme. I am able to render these locally, however when I try with RTD, I get the following fail message: I tried placing the nbsphinx.py file in the repository but things still fail. Link to RTD is here: https://readthedocs.org/projects/calculus-notes/ Github repo is here: https://github.com/jfkoehler/calc_docs 回答1: RTD needs to install nbsphinx . To

Using ReadTheDocs to host Sphinx Docs created with Jupyter

不问归期 提交于 2020-01-05 07:02:11
问题 I continue to have failed builds with ReadTheDocs using a github repository with Jupyter notebooks rendered using sphinx and the readthedocs theme. I am able to render these locally, however when I try with RTD, I get the following fail message: I tried placing the nbsphinx.py file in the repository but things still fail. Link to RTD is here: https://readthedocs.org/projects/calculus-notes/ Github repo is here: https://github.com/jfkoehler/calc_docs 回答1: RTD needs to install nbsphinx . To