Debian Codegraph @

test/data/help/rst2html.rst

raw ◀ ▶
1 Debian patch touch this file
1 Usage
2 =====
3 rst2html [options] [<source> [<destination>]]
4
5 Generate HTML documents from standalone reStructuredText sources
6 <https://docutils.sourceforge.io/docs/user/html.html#html>. Reads from
7 <source> (default is stdin) and writes to <destination> (default is stdout).
8 See https://docutils.sourceforge.io/docs/user/config.html for a detailed
9 settings reference.
10
11 Options
12 =======
13 General Docutils Options
14 ------------------------
15 --output-path=<destination>, --output=<destination>
16 Output destination name. Obsoletes the <destination>
17 positional argument. Default: None (stdout).
18 --title=<title> Specify the document title as metadata.
19 --generator, -g Include a "Generated by Docutils" credit and link.
20 --no-generator Do not include a generator credit.
21 --date, -d Include the date at the end of the document (UTC).
22 --time, -t Include the time & date (UTC).
23 --no-datestamp Do not include a datestamp of any kind.
24 --root-prefix=<path> Base directory for absolute paths when reading from
25 the local filesystem. Default "".
26 --source-link, -s Include a "View document source" link.
27 --source-url=<URL> Use <URL> for a source link; implies --source-link.
28 --no-source-link Do not include a "View document source" link.
29 --toc-entry-backlinks Link from section headers to TOC entries. (default)
30 --toc-top-backlinks Link from section headers to the top of the TOC.
31 --no-toc-backlinks Disable backlinks to the table of contents.
32 --footnote-backlinks Link from footnotes/citations to references. (default)
33 --no-footnote-backlinks
34 Disable backlinks from footnotes and citations.
35 --section-numbering Enable section numbering by Docutils. (default)
36 --no-section-numbering Disable section numbering by Docutils.
37 --strip-comments Remove comment elements from the document tree.
38 --leave-comments Leave comment elements in the document tree. (default)
39 --strip-elements-with-class=<class>
40 Remove all elements with classes="<class>" from the
41 document tree. Warning: potentially dangerous; use
42 with caution. (Multiple-use option.)
43 --strip-class=<class> Remove all classes="<class>" attributes from elements
44 in the document tree. Warning: potentially dangerous;
45 use with caution. (Multiple-use option.)
46 --report=<level>, -r <level>
47 Report system messages at or higher than <level>:
48 "info" or "1", "warning"/"2" (default), "error"/"3",
49 "severe"/"4", "none"/"5"
50 --verbose, -v Report all system messages. (Same as "--report=1".)
51 --quiet, -q Report no system messages. (Same as "--report=5".)
52 --halt=<level> Halt execution at system messages at or above <level>.
53 Levels as in --report. Default: 4 (severe).
54 --strict Halt at the slightest problem. Same as "--halt=info".
55 --exit-status=<level> Enable a non-zero exit status for non-halting system
56 messages at or above <level>. Default: 5 (disabled).
57 --debug Enable debug-level system messages and diagnostics.
58 --no-debug Disable debug output. (default)
59 --warnings=<file> Send the output of system messages to <file>.
60 --traceback Enable Python tracebacks when Docutils is halted.
61 --no-traceback Disable Python tracebacks. (default)
62 --input-encoding=<name[:handler]>
63 Specify the encoding and optionally the error handler
64 of input text. Default: utf-8.
65 --output-encoding=<name[:handler]>
66 Specify the text encoding and optionally the error
67 handler for output. Default: utf-8.
68 --error-encoding=<name[:handler]>, -e <name[:handler]>
69 Specify text encoding and optionally the error handler
•70 for error output. Default: system encoding.
71 --language=<tag>, -l <tag>
72 Specify the language (as BCP 47 language tag).
73 Default: en.
74 --record-dependencies=<file>
75 Write output file dependencies to <file>.
76 --config=<file> Read configuration settings from <file>, if it exists.
77 --version, -V Show this program's version number and exit.
78 --help, -h Show this help message and exit.
79
80 Generic Parser Options
81 ----------------------
82 --no-file-insertion Disable directives that insert the contents of an
83 external file; replaced with a "warning" system
84 message.
85 --file-insertion-enabled
86 Enable directives that insert the contents of an
87 external file. (default)
88 --no-raw Disable the "raw" directive; replaced with a "warning"
89 system message.
90 --raw-enabled Enable the "raw" directive. (default)
91 --line-length-limit=<length>
92 Maximal number of characters in an input line. Default
93 10 000.
94 --legacy-ids Keep identifiers backwards compatible. Default.
95 --matching-ids Explicit targets use identifiers matching the
96 reference name.
97 --validate Validate the document tree after parsing.
98 --no-validation Do not validate the document tree. (default)
99
100 reStructuredText Parser Options
101 -------------------------------
102 --pep-references Recognize and link to standalone PEP references (like
103 "PEP 258").
104 --pep-base-url=<URL> Base URL for PEP references (default
105 "https://peps.python.org/").
106 --pep-file-url-template=<URL>
107 Template for PEP file part of URL. (default
108 "pep-%04d")
109 --rfc-references Recognize and link to standalone RFC references (like
110 "RFC 822").
111 --rfc-base-url=<URL> Base URL for RFC references (default
112 "https://tools.ietf.org/html/").
113 --tab-width=<width> Set number of spaces for tab expansion (default 8).
114 --trim-footnote-reference-space
115 Remove spaces before footnote references.
116 --leave-footnote-reference-space
117 Leave spaces before footnote references.
118 --syntax-highlight=<format>
119 Token name set for parsing code with Pygments: one of
120 "long", "short", or "none" (no parsing). Default is
121 "long".
122 --smart-quotes=<yes/no/alt>
123 Change straight quotation marks to typographic form:
124 one of "yes", "no", "alt[ernative]" (default "no").
125 --smartquotes-locales=<language:quotes[,language:quotes,...]>
126 Characters to use as "smart quotes" for <language>.
127 --word-level-inline-markup
128 Inline markup recognized at word boundaries only
129 (adjacent to punctuation or whitespace). Force
130 character-level inline markup recognition with "\ "
131 (backslash + space). Default.
132 --character-level-inline-markup
133 Inline markup recognized anywhere, regardless of
134 surrounding characters. Backslash-escapes must be used
135 to avoid unwanted markup recognition. Useful for East
136 Asian languages. Experimental.
137
138 Standalone Reader Options
139 -------------------------
140 --no-doc-title Disable the promotion of a lone top-level section
141 title to document title (and subsequent section title
142 to document subtitle promotion; enabled by default).
143 --no-doc-info Disable the bibliographic field list transform
144 (enabled by default).
145 --section-subtitles Activate the promotion of lone subsection titles to
146 section subtitles (disabled by default).
147 --no-section-subtitles Deactivate the promotion of lone subsection titles.
148
149 HTML Writer Options
150 -------------------
151 --template=<file> Template file. (UTF-8 encoded, default: [...])
152 --stylesheet=<URL[,URL,...]>
153 Comma separated list of stylesheet URLs. Overrides
154 previous --stylesheet and --stylesheet-path settings.
155 --stylesheet-path=<file[,file,...]>
156 Comma separated list of stylesheet paths. Relative
157 paths are expanded if a matching file is found in the
158 --stylesheet-dirs. With --link-stylesheet, the path is
159 rewritten relative to the output HTML file. (default:
160 "html4css1.css")
161 --stylesheet-dirs=<dir[,dir,...]>
162 Comma-separated list of directories where stylesheets
163 are found. Used by --stylesheet-path when expanding
164 relative path arguments. (default: [...])
165 --embed-stylesheet Embed the stylesheet(s) in the output HTML file. The
166 stylesheet files must be accessible during processing.
167 (default)
168 --link-stylesheet Link to the stylesheet(s) in the output HTML file.
169 --initial-header-level=<level>
170 Specify the initial header level. Does not affect
171 document title & subtitle (see --no-doc-title).
172 (default: 1 for "<h1>")
173 --footnote-references=<format>
174 Format for footnote references: one of "superscript"
175 or "brackets". (default: "brackets")
176 --attribution=<format> Format for block quote attributions: one of "dash"
177 (em-dash prefix), "parentheses"/"parens", or "none".
178 (default: "dash")
179 --compact-lists Remove extra vertical whitespace between items of
180 "simple" bullet lists and enumerated lists. (default)
181 --no-compact-lists Disable compact simple bullet and enumerated lists.
182 --compact-field-lists Remove extra vertical whitespace between items of
183 simple field lists. (default)
184 --no-compact-field-lists
185 Disable compact simple field lists.
186 --table-style=<style> Class value(s) assigned to all tables. Defined styles:
187 borderless, booktabs, align-left, align-center, align-
188 right, colwidths-auto, colwidths-grid.
189 --math-output=<format [option(s)]>
190 Math output format (one of "MathML", "HTML",
191 "MathJax", or "LaTeX") and option(s). (default: "HTML
192 math.css")
193 --xml-declaration Prepend an XML declaration (default).
194 --no-xml-declaration Omit the XML declaration.
195 --cloak-email-addresses
196 Obfuscate email addresses to confuse harvesters while
197 still keeping email links usable with standards-
198 compliant browsers.
199
200 HTML4 Writer Options
201 --------------------
202 --field-name-limit=<level>
203 Specify the maximum width (in characters) for one-
204 column field names. Longer field names will span an
205 entire row of the table used to render the field list.
206 Default is 14 characters. Use 0 for "no limit".
207 --option-limit=<level> Specify the maximum width (in characters) for options
208 in option lists. Longer options will span an entire
209 row of the table used to render the option list.
210 Default is 14 characters. Use 0 for "no limit".