restructuredtext

What is the sphinx directive for including a document into another document?

走远了吗. 提交于 2019-12-24 07:32:07
问题 In my documentation I have an examples directory where I can say, .. literalinclude:: examples/1_basic_usage.py :language: python :linenos: ..which works great, because they're code and they're formatted correctly as code. However, I want to do a literalinclude on non-code documents. At the entire-project level I already have AUTHORS , DESCRIPTION , ATTRIBUTION , etc. defined, and I want to (essentially) paste them in-place but I don't know how. Hopefully it's similar to this NON WORKING

reStructuredText Multilevel

不打扰是莪最后的温柔 提交于 2019-12-24 06:41:04
问题 How can I get such a structur with reStructuredText? Is it even possible? 1. Title 1.1 Subtitle 1.1.2 SubSubtitle 1.1.2.1 SubSubtitle 1.2 2ndSubtitle 1.2.1 2ndSubSubtitle 回答1: Did you look at the Sphinx documentation for nested lists? Your question should show that you made some effort, including what documentation you read, what you tried, what you expected, and what you observed. Nested lists are possible, but be aware that they must be separated from the parent list items by blank lines: *

How do I write the Multiplication Sign in reStructuredText (reST)?

荒凉一梦 提交于 2019-12-24 00:50:10
问题 I'm writing reST documents that will be rendered to HTML and PDF using Sphinx. My source files are UTF-8, and expect my HTML to be displayed as UTF-8. What's the best practice for writing the multiplication sign? That is: ×, not x. I know I can insert it as a Unicode character. If I were writing LaTeX, I'd use \times . In HTML there's × . Is the simple Unicode going to properly survive the conversion process when I render everything with Sphinx? Even if I render to other more exotic formats?

reST image grid with captions?

放肆的年华 提交于 2019-12-24 00:45:47
问题 As an extension to this question: how can you add a description under each of the gridded images using Sphinx and reStructuredText? For example, a table, three images across with a caption centered under each image. 回答1: I am not sure if this is possible with just the figure directive, like it is with the image directive. However, whilst horrible to look at, you could wrap the three figures in a table. For example, the following reStructuredText +-----------------------------------------+----

Javascript API documenting framework with lightweight mark-up

丶灬走出姿态 提交于 2019-12-23 14:07:21
问题 I'm seeking a Javascript API documenting framework with features similar to JSDoc, but would use easy-to-type restructured text or markdown in the code comments (not html) Bonus: would integrate well with Sphinx. However, I don't want to maintain separate documentation, but generate API documentation from comments. http://code.google.com/p/jsdoc-toolkit/ 回答1: I finally found JSDuck the most suitable for the task: https://github.com/senchalabs/jsduck 回答2: InvisibleJS supports markdown and a

Javascript API documenting framework with lightweight mark-up

放肆的年华 提交于 2019-12-23 14:04:49
问题 I'm seeking a Javascript API documenting framework with features similar to JSDoc, but would use easy-to-type restructured text or markdown in the code comments (not html) Bonus: would integrate well with Sphinx. However, I don't want to maintain separate documentation, but generate API documentation from comments. http://code.google.com/p/jsdoc-toolkit/ 回答1: I finally found JSDuck the most suitable for the task: https://github.com/senchalabs/jsduck 回答2: InvisibleJS supports markdown and a

Is it possible to write in a two-columns style in restructuredtext?

五迷三道 提交于 2019-12-23 13:24:46
问题 I would like to write a research paper using restructuredtext, is it possible to have the two-column style inherent to this kind of document? I looked at the specifications but appart using a table wich will be a real pain I haven't be able to find an alternative. Any help would be greatly appreciated, thanks! 回答1: You can output 2-column in any of the formats docutils outputs. If what you want is a 2-column ReST source then it's much harder. Since there are no pages, it may not even make

Python: How I can define in sphinx which .rst files and directories should be used?

帅比萌擦擦* 提交于 2019-12-23 13:12:39
问题 How I can define in sphinx which .rst files and directories should be used? I want to include an automatic documentation generator in my testing/building/documentation script. sphinx-quickstart was executed in my workspace and created an index.rst-file. As sphinx uses restructured text files for documentation I navigated through the workspace and create them manually with sphinx-autogen . It resulted into the tasks.rst file (see below). When I use 'make html' I get several warnings: WARNING :

Best way to align center a paragraph with RestructuredText?

梦想的初衷 提交于 2019-12-23 09:47:18
问题 What is the best way to have a paragraph align in the center of the page using restructuredText for pdf (rst2pdf)? 回答1: You can use the following: .. class:: center This paragraph will be centered. 回答2: If you want to use center tag (as described above) on rst2html.py (Docutils 0.12), you should create a css file, namely mystyle.css by adding the following line to it: .center {text-align: center;} For converting your rst file, namely, myrst.rst to html file, use the following command rst2html

How to force non-breaking space in reStructuredText, in code environment?

夙愿已清 提交于 2019-12-23 08:35:42
问题 I have this snippet in my reStructuredText document: 1. Find the file at ``~/Google Drive/code/mac/install.sh``. Notice the code/quote environment. Notice the space between Google and Drive in the path. When rendered with Sphinx in HTML, there is a line-wrap between Google and Drive , and the space is gone. (Since this is documentation, I need everything in the code environment to appear to the user exactly as it is entered, which includes the space between 'Google' and 'Drive'. Not only