python-sphinx

How to include an internal reference in a code block?

女生的网名这么多〃 提交于 2021-02-07 06:14:10
问题 In my Sphinx .rst document I have a code block containing a tree view of the structure of my product using the UNIX tree command: |── parent | |── child | |── grandchild It's in a code block so that Sphinx preserves the whitespaces. I want readers to be able to click on each node to follow an internal hyperlink to the part of the document that describes that node. However, adding a :ref: inside the code block doesn't work (see below). Does anyone know how to achieve this? This doesn't work: .

How to include an internal reference in a code block?

China☆狼群 提交于 2021-02-07 06:13:13
问题 In my Sphinx .rst document I have a code block containing a tree view of the structure of my product using the UNIX tree command: |── parent | |── child | |── grandchild It's in a code block so that Sphinx preserves the whitespaces. I want readers to be able to click on each node to follow an internal hyperlink to the part of the document that describes that node. However, adding a :ref: inside the code block doesn't work (see below). Does anyone know how to achieve this? This doesn't work: .

How to include an internal reference in a code block?

折月煮酒 提交于 2021-02-07 06:12:02
问题 In my Sphinx .rst document I have a code block containing a tree view of the structure of my product using the UNIX tree command: |── parent | |── child | |── grandchild It's in a code block so that Sphinx preserves the whitespaces. I want readers to be able to click on each node to follow an internal hyperlink to the part of the document that describes that node. However, adding a :ref: inside the code block doesn't work (see below). Does anyone know how to achieve this? This doesn't work: .

How do I include the homepage in the Sphinx TOC?

余生长醉 提交于 2021-02-06 09:40:08
问题 Let’s say I’ve got a Sphinx project with the following sources: index.rst installation.rst templating/ index.rst module.rst fieldtype.rst index.rst (the homepage) has the following TOC tree: .. toctree:: :titlesonly: installation templating/index I want my template to include a sidebar that lists all 3 top-level pages (homepage, installation, templating/index). I've tried adding a second, hidden TOC tree in the homepage: .. toctree:: :hidden: index .. toctree:: :titlesonly: installation

How to right-align columns content in reStructuredText simple tables?

瘦欲@ 提交于 2021-02-06 07:24:12
问题 I'm editing the documentation for a project of mine using Sphinx, which in turn uses reStructuredText as markup language. I have a simple table (as opposed to grid table ) in which the rightmost column reports contains numbers that I would like to right-align, but I couldn't find how to achieve that. ============ ===================== Event Score variation ============ ===================== Event 1 +100 Event 2 -25 Event 3 -400 ============ ===================== I would be happy to switch to

How to right-align columns content in reStructuredText simple tables?

主宰稳场 提交于 2021-02-06 07:22:04
问题 I'm editing the documentation for a project of mine using Sphinx, which in turn uses reStructuredText as markup language. I have a simple table (as opposed to grid table ) in which the rightmost column reports contains numbers that I would like to right-align, but I couldn't find how to achieve that. ============ ===================== Event Score variation ============ ===================== Event 1 +100 Event 2 -25 Event 3 -400 ============ ===================== I would be happy to switch to

How to right-align columns content in reStructuredText simple tables?

你。 提交于 2021-02-06 07:20:59
问题 I'm editing the documentation for a project of mine using Sphinx, which in turn uses reStructuredText as markup language. I have a simple table (as opposed to grid table ) in which the rightmost column reports contains numbers that I would like to right-align, but I couldn't find how to achieve that. ============ ===================== Event Score variation ============ ===================== Event 1 +100 Event 2 -25 Event 3 -400 ============ ===================== I would be happy to switch to

How to right-align columns content in reStructuredText simple tables?

廉价感情. 提交于 2021-02-06 07:20:49
问题 I'm editing the documentation for a project of mine using Sphinx, which in turn uses reStructuredText as markup language. I have a simple table (as opposed to grid table ) in which the rightmost column reports contains numbers that I would like to right-align, but I couldn't find how to achieve that. ============ ===================== Event Score variation ============ ===================== Event 1 +100 Event 2 -25 Event 3 -400 ============ ===================== I would be happy to switch to

Include __main__.py in sphinx-apidoc generated files

回眸只為那壹抹淺笑 提交于 2021-02-05 08:27:33
问题 I am not able to add my __main__.py file correctly and its functions while generating RST file with sphinx-apidoc . Other files and classes are generated correctly. I works only if I run sphinx-apidoc with -P parameter which includes private modules. But I do not want to add private methods of other modules, I need these from __main__.py only. __main__.py looks like this: def main(): """ main() description here """ f1() f2() if __name__ == '__main__': main() I would like to have main() , f1()

I'm having problems with the project building on Read the Docs

生来就可爱ヽ(ⅴ<●) 提交于 2021-02-05 06:30:50
问题 Created sphinx project with sphinx-quickstart. Ran "make html" and no errors produced. Pushed all the code to GitHub. I tried to import and build project on Read the Docs, but get the following errors. I haven't problems when using a Mac- it builds and renders the code on Read the Docs. This time I'm using Windows 10. Traceback (most recent call last): File "/home/docs/checkouts/readthedocs.org/user_builds/thirddocs/envs/latest/lib/python3.7/site-packages/sphinx/cmd/build.py", line 304, in