rst2latex(1)
πΈ NAME πΈ
rst2latex β text processing, and literally the moment. Okay so bestie, this is the little icon that converts reST documents to LaTeX π. That's it, that's the whole job, and she does it flawlessly.
β¨ SYNOPSIS β¨
rst2latex [options] [<source> [<destination>]]
π¦ DESCRIPTION π¦
She generates LaTeX documents from standalone reStructuredText sources β the tea is all documented over at https://docutils.sourceforge.io/docs/user/latex.html if you want to go read it yourself, no cap.
She reads from <source> (and if you don't give her one, default is stdin, she'll just sit there waiting for you to say something) and she writes to <destination> (default is stdout). And if you need the full settings reference, it lives at https://docutils.sourceforge.io/docs/user/config.html. Go forth and read, queen.
π OPTIONS π
π General Docutils Options
--output-path=<destination>,--output=<destination>β The name of where the output goes. This one straight-up obsoletes the<destination>positional argument, like it's too good for it. Default:None(which means stdout, she's just talking out loud).--title=<title>β Set the document title as metadata. A little name tag for your doc.--generator,-gβ Slap a "Generated by Docutils" credit and link on there. Give credit where credit is due π .--no-generatorβ No generator credit. She's humble today.--date,-dβ Include the date at the end of the document (UTC).--time,-tβ Include the time & date (UTC). Both. The full timestamp slay.--no-datestampβ No datestamp of any kind, whatsoever, periodt.--root-prefix=<path>β Base directory for absolute paths when reading from the local filesystem. Default"".--source-link,-sβ Include a "View document source" link.--source-url=<URL>β Use<URL>for a source link. This one implies--source-linkβ it doesn't ask, it just does it.--no-source-linkβ Do not include a "View document source" link.--toc-entry-backlinksβ Link from section headers to TOC entries. This is the default vibe.--toc-top-backlinksβ Link from section headers to the top of the TOC instead.--no-toc-backlinksβ Disable backlinks to the table of contents. Cut off.--footnote-backlinksβ Link from footnotes/citations to references. Default.--no-footnote-backlinksβ Disable backlinks from footnotes and citations.--section-numberingβ Enable section numbering by Docutils. Default.--no-section-numberingβ Disable section numbering by Docutils. Numbers? Never met her.--strip-commentsβ Remove comment elements from the document tree. Gone, deleted, not invited.--leave-commentsβ Leave comment elements in the document tree. Default.--strip-elements-with-class=<class>β Remove all elements withclasses="<class>"from the document tree. β οΈ Warning: potentially dangerous; use with caution. (Multiple-use option β you can stack it.)--strip-class=<class>β Remove allclasses="<class>"attributes from elements in the document tree. β οΈ Warning: potentially dangerous; use with caution. (Multiple-use option.)--report=<level>,-r <level>β Report system messages at or higher than<level>. The levels are:"info"or"1","warning"/"2"(default),"error"/"3","severe"/"4","none"/"5".--verbose,-vβ Report all the system messages. Same as--report=1. She's telling you everything, she's an open book π.--quiet,-qβ Report no system messages. Same as--report=5. Not a single word.--halt=<level>β Halt execution at system messages at or above<level>. Same level scale as--report. Default:4(severe). She stops dead in her tracks.--strictβ Halt at the slightest problem. Same as--halt=info. One tiny thing goes wrong and she's done, she's leaving πͺ.--exit-status=<level>β Enable a non-zero exit status for non-halting system messages at or above<level>. Default:5(disabled).--debugβ Enable debug-level system messages and diagnostics. Chaotic but informative.--no-debugβ Disable debug output. Default.--warnings=<file>β Send the output of system messages to<file>.--tracebackβ Enable Python tracebacks when Docutils is halted. Show me the receipts.--no-tracebackβ Disable Python tracebacks. Default.--input-encoding=<name[:handler]>β Specify the encoding and optionally the error handler of input text. Default:utf-8.--output-encoding=<name[:handler]>β Specify the text encoding and optionally the error handler for output. Default:utf-8.--error-encoding=<name[:handler]>,-e <name[:handler]>β Specify text encoding and optionally the error handler for error output. Default: system encoding.--language=<tag>,-l <tag>β Specify the language (as a BCP 47 language tag). Default:en.--record-dependencies=<file>β Write output file dependencies to<file>.--config=<file>β Read configuration settings from<file>β but only if it exists. If it doesn't, no worries, she moves on.--version,-Vβ Show this program's version number and exit. Iconic behavior.--help,-hβ Show this help message and exit. Hi bestie π.
π§ Generic Parser Options
--no-file-insertionβ Disable directives that insert the contents of an external file; replaced with a"warning"system message. Safety first.--file-insertion-enabledβ Enable directives that insert the contents of an external file. Default.--no-rawβ Disable the"raw"directive; replaced with a"warning"system message. Locked up for your own good.--raw-enabledβ Enable the"raw"directive. Default.--line-length-limit=<length>β Maximal number of characters in an input line. Default10 000.--legacy-idsβ Keep identifiers backwards compatible. Default.--matching-idsβ Explicit targets use identifiers matching the reference name.--validateβ Validate the document tree after parsing. Get it checked.--no-validationβ Do not validate the document tree. Default.
π reStructuredText Parser Options
--pep-referencesβ Recognize and link to standalone PEP references, like"PEP 258".--pep-base-url=<URL>β Base URL for PEP references. Default:https://peps.python.org/.--pep-file-url-template=<URL>β Template for the PEP file part of the URL. Default:"pep-%04d".--rfc-referencesβ Recognize and link to standalone RFC references, like"RFC 822".--rfc-base-url=<URL>β Base URL for RFC references. Default:https://tools.ietf.org/html/.--tab-width=<width>β Set number of spaces for tab expansion. Default8.--trim-footnote-reference-spaceβ Remove spaces before footnote references.--leave-footnote-reference-spaceβ Leave spaces before footnote references.--syntax-highlight=<format>β Token name set for parsing code with Pygments: one of"long","short", or"none"(no parsing at all). Default is"long".--smart-quotes=<yes/no/alt>β Change straight quotation marks to typographic form: one of"yes","no","alt[ernative]". Default"no". Fancy quotes, but only if you say so.--smartquotes-locales=<language:quotes[,language:quotes,...]>β Characters to use as "smart quotes" for<language>.--word-level-inline-markupβ Inline markup recognized at word boundaries only (adjacent to punctuation or whitespace). Force character-level inline markup recognition with""(backslash + space). Default.--character-level-inline-markupβ Inline markup recognized anywhere, regardless of surrounding characters. Backslash-escapes must be used to avoid unwanted markup recognition. Useful for East Asian languages. Experimental. (π tread carefully bestie)
π Standalone Reader Options
--no-doc-titleβ Disable the promotion of a lone top-level section title to document title (and the subsequent section title to document subtitle promotion; this stuff is enabled by default).--no-doc-infoβ Disable the bibliographic field list transform (which is enabled by default).--section-subtitlesβ Activate the promotion of lone subsection titles to section subtitles (disabled by default).--no-section-subtitlesβ Deactivate the promotion of lone subsection titles.
π LaTeX-Specific Options
--documentclass=<documentclass>β Specify LaTeX documentclass. Default:"article".--documentoptions=<options>β Specify document options. Multiple options can be given, separated by commas. Default:"a4paper".--footnote-references=<format>β Format for footnote references: one of"superscript"or"brackets". Default:"superscript".--use-latex-citationsβ Use cite command for citations. (future default β she's coming, get ready).--figure-citationsβ Use figure floats for citations (might get mixed with real figures, so, be aware). (provisional default).--attribution=<format>β Format for block quote attributions: one of"dash"(em-dash prefix),"parentheses"/"parens", or"none". Default:"dash".--stylesheet=<file[,file,...]>β Specify LaTeX packages/stylesheets. A style is referenced with"usepackage"if the extension is".sty"or omitted, and with"input"otherwise. This overrides previous--stylesheetand--stylesheet-pathsettings. She's not negotiating.--stylesheet-path=<file[,file,...]>β Comma separated list of LaTeX packages/stylesheets. Relative paths are expanded if a matching file is found in the--stylesheet-dirs. With--link-stylesheet, the path is rewritten relative to the output *.texfile.
System Message: WARNING/2 (debian/tmp/man/rst2latex.txt:, line 185) Inline emphasis start-string without end-string.
--link-stylesheetβ Link to the stylesheet(s) in the output file. Default.--embed-stylesheetβ Embed the stylesheet(s) in the output file. Stylesheets must be accessible during processing β no showing up empty-handed.--stylesheet-dirs=<dir[,dir,...]>β Comma-separated list of directories where stylesheets are found. Used by--stylesheet-pathwhen expanding relative path arguments. Default:".".--latex-preamble=<preamble>β Customization by LaTeX code in the preamble. Default: select PDF standard fonts (Times, Helvetica, Courier).--template=<file>β Specify the template file. Default:"default.tex".--use-latex-tocβ Table of contents by LaTeX. Default.--use-docutils-tocβ Table of contents by Docutils (without page numbers).--use-part-sectionβ Add parts on top of the section hierarchy. Layered, like a good outfit.--use-docutils-docinfoβ Attach author and date to the document info table. Default.--use-latex-docinfoβ Attach author and date to the document title.--topic-abstractβ Typeset abstract as topic. Default.--use-latex-abstractβ Use LaTeX abstract environment for the document's abstract.--hyperlink-color=<color>β Color of any hyperlinks embedded in text. Default:"blue"(use"false"to disable). π--hyperref-options=<options>β Additional options to the"hyperref"package.--compound-enumeratorsβ Enable compound enumerators for nested enumerated lists (e.g."1.2.a.ii").--no-compound-enumeratorsβ disables compound enumerators for nested enumerated lists. (default, bestie β so this is already the vibe unless you say otherwise π )--section-prefix-for-enumeratorsβ enables section ("."subsection ...) prefixes for compound enumerators. But listen: this has no effect without--compound-enumerators. No cap.--no-section-prefix-for-enumeratorsβ disables section prefixes for compound enumerators. (default β¨)--section-enumerator-separator=<char>β sets the separator between the section number and the enumerator for compound enumerated lists. Default:"-". so cute, so specific.--literal-block-env=<environment>β when possible, use the specified <environment> for literal-blocks. Default:""β and that falls back to"alltt". fallback behavior stays fallback behavior.--table-style=<format>β table style, okay?"standard"gives horizontal and vertical lines."booktabs"is the LaTeX booktabs style β only horizontal lines above and below the table and below the header. Or"borderless". Default:"standard". pick your fighter π--graphicx-option=<option>β LaTeX graphicx package option. Default:"". empty but iconic.--font-encoding=<encoding>β LaTeX font encoding. Possible values are"","T1"(default),"OT1","LGR,T1"or any other combination of options to thefontencpackage. yes, any combo, go off.--reference-label=<commandname>β per default the latex-writer puts the reference title into hyperreferences. Specify"ref"or"pageref"to get the section number or the page number. choose your reference destiny.--use-bibtex=<style,bibfile[,bibfile,...]>β specify style and database(s) for bibtex, for example"--use-bibtex=unsrt,mydb1,mydb2". Provisional! like, do not build your whole personality on this yet, bestie.--legacy-class-functionsβ use legacy functions with class value list forDUtitleandDUadmonition. old-school, but make it classy.--new-class-functionsβ useDUroleand"DUclass"wrappers for class values. Place admonition content in an environment. (default β¨)--legacy-column-widthsβ use legacy algorithm to determine table column widths. (provisional default) so itβs the default, but itβs giving provisional, okay?--new-column-widthsβ use new algorithm to determine table column widths. (future default) manifesting.--docutils-footnotesβ footnotes with numbers/symbols by Docutils. (default π)--latex-footnotesβ footnotes with numbers by LaTeX. let LaTeX handle the little numbers.
Thatβs the rst2latex(1) moment, bestie. Source/version and date? Theyβre chillinβ in the footer, where rst2latex(1) and the date do their little iconic thing. Now go make some LaTeX and slay. π
β¨π
π¦ where this page comes from
- ubuntu stonking: docutils-common 0.23+dfsg-2 Β· LicenseRef-public-domain
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms