There are several ways to write tables. Use standard reStructuredText tables as explained here. They work fine in HTML output, however, there are some gotchas when using tables for LaTeX output.
simple table: | Simple tables can be written as follows: which gives:
| |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
complex table: | gives:
| |||||||||||||
another way: | gives:
|
Cheat Sheet¶ If you are viewing the online version of this documentation, you can click here for our Security Onion Cheat Sheet. This was based on a cheat sheet originally created by Chris Sanders which can be found here.
- ReST & Sphinx cheat sheet ¶. ReST & Sphinx cheat sheet. Every reST (.rst) file should use these underlining styles. In reST, you can use different styles in any order you want. These are our conventions for TYPO3 documentation. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19. DocTitle Then use underlining only:. header1: Header 1 Header 1.1 - Header 1.1.1.
- Sphinx cheat sheet¶ Here is a quick and dirty cheat sheet for some common stuff you want to do in sphinx and ReST. You can see the literal source for this sheet here This file. More basic documentation can be found at this resources: Documentation guide; ReST syntax; More advanced topics are.
Note
table and latex documents are not yet compatible in sphinx, and you should therefore precede them with the a special directive (. htmlonly::)
The previous examples work fine in HTML output, however there are some gotchas when using tables in LaTeX: the column width is hard to determine correctly automatically. For this reason, the following directive exists:
This directive gives a “column spec” for the next table occurring in the source file. It can have values like:
which means three left-adjusted (LaTeX syntax). By default, Sphinx uses a table layout with L for every column. This code:
Aol desktop for mac mojave. gives
title | ||
---|---|---|
simple text | 2 | 3 |
The rst Cheatsheet covers a wide range ofrst markup. It and its contents are CC licensed .
Inline Markup ¶
Inline markup allows words and phrases within text to have character styles (like italics and boldface) and functionality (like hyperlinks).
emphasis |
strong emphasis |
The rendering and meaning of interpreted textis domain- or application-dependent. |
|
inline internal target |
The result is substituted in from thesubstitution definition. |
footnote reference 1 |
citation reference [CIT2002] |
Escaping with Backslashes ¶
reStructuredText uses backslashes (“') to override the special meaning given to markup characters and getthe literal characters themselves. To get a literal backslash, use an escaped backslash (“”). For example:
escape |
*escape* ``with`` “' |
Lists ¶
|
|
|
|
|
Section Structure ¶
Title Titles are underlined (or over- and underlined) witha nonalphanumeric character at least as long as thetext. A lone top-level section is lifted up to be thedocument’s title. Any non-alphanumeric character can be used, butPython convention is:
|
Blocks ¶
This is a paragraph. Paragraphs line up at their leftedges, and are normally separatedby blank lines. |
A paragraph containing only two colonsindicates that the following indentedor quoted text is a literal block. You can also tack the Per-line quoting can also be used forunindented blocks: |
verse, and adornment-free lists. Each new line begins with a are preserved. Continuation lines are wrappedportions of long lines; they beginwith spaces in place of vertical bars. |
Block quotes are just:
|
Doctest blocks are interactivePython sessions. They begin with“ |
A transition marker is a horizontal lineof 4 or more repeated punctuationcharacters. A transition should not begin or end asection or document, nor should twotransitions be immediately adjacent. |
Sphinx Cheat Sheet Pdf
Tables ¶
There are two syntaxes for tables in reStructuredText. Grid tables are complete but cumbersome to create. Simpletables are easy to create but limited (no row spans, etc.).
| ||||||||||||||||||
|
Explicit Markup ¶
Explicit markup blocks are used for constructs which float (footnotes), have no direct paper-document representation(hyperlink targets, comments), or require specialized processing (directives).They all begin with two periods and whitespace, the “explicit markup start”.
Footnote references, like 5 .Note that footnotes may getrearranged, e.g., to the bottom ofthe “page”.
| |
Autonumbered footnotes arepossible, like using 1 and 2 .
They may be assigned ‘autonumberlabels’ - for instance, 4 and 3 .
| |
Auto-symbol footnotes are alsopossible, like this: * and † .
| |
Citation references, like [CIT2002] .Note that citations may getrearranged, e.g., to the bottom ofthe “page”.
Citation labels contain alphanumerics,underlines, hyphens and fullstops.Case is not significant. Given a citation like [this] , onecan also refer to it like this .
| |
External hyperlinks, like Python . | |
External hyperlinks, like Python . | |
Internal crossreferences, like example . This is an example crossreference target. | |
Python is my favouriteprogramming language . | |
Titles are targets, too Implict references, like Titles are targets, too . | |
Directives are a general-purpose extension mechanism, a way of adding support for new constructs without addingnew syntax. For a description of all standard directives, see reStructuredText Directives ( http://is.gd/2Ecqh ). | |
For instance: | |
Substitutions are like inline directives, allowing graphics and arbitrary constructs within text. | |
The symbol must be used on containers used todispose of medical waste. | |
Any text which begins with an explicit markup start but doesn’t use the syntax of any of the constructs above, is a comment. | |
An “empty comment” does notconsume following blocks.(An empty comment is “.” withblank lines before and after.)
|
Credits ¶
CP Font from LiquiType: |
Magnetic Balls V2 image by fdecomite: |
Sponsored by Net Managers |
Typeset using rst2pdf |
Riddle Of The Sphinx Cheat Sheets Printable
© 2009 Roberto Alsina <ralsina@netmanagers.com.ar> / Creative Commons Attribution-Noncommercial-Share Alike 2.5 Argentina License | Based on quickref.txt from docutils | Non-Commercial | Share Alike |