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 with classes="<class>" from the document tree. ⚠️ Warning: potentially dangerous; use with caution. (Multiple-use option β€” you can stack it.)
  • --strip-class=<class> β€” Remove all classes="<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. Default 10 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. Default 8.
  • --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 --stylesheet and --stylesheet-path settings. 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 * .tex file.
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-path when 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 the fontenc package. 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 for DUtitle and DUadmonition. old-school, but make it classy.
  • --new-class-functions β€” use DUrole and "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