#[non_exhaustive]
pub enum PandocOption {
Show 83 variants DataDir(PathBuf), Defaults(PathBuf), Strict, ParseRaw, Smart, OldDashes, BaseHeaderLevel(u32), ShiftHeadingLevelBy(i32), IndentedCodeClasses(String), Filter(PathBuf), LuaFilter(PathBuf), Normalize, PreserveTabs, TabStop(u32), TrackChanges(TrackChanges), ExtractMedia(PathBuf), Standalone, Template(PathBuf), Meta(StringOption<String>), Var(StringOption<String>), PrintDefaultTemplate(String), PrintDefaultDataFile(PathBuf), NoWrap, Columns(u32), TableOfContents, TableOfContentsDepth(u32), NoHighlight, HighlightStyle(String), IncludeInHeader(PathBuf), IncludeBeforeBody(PathBuf), IncludeAfterBody(PathBuf), SelfContained, Offline, Html5, HtmlQTags, Ascii, ReferenceLinks, AtxHeaders, TopLevelDivision(Tld), NumberSections, NumberOffset(Vec<u32>), NoTexLigatures, Listings, Incremental, SlideLevel(u32), SectionDivs, DefaultImageExtension(String), EmailObfuscation(EmailObfuscation), IdPrefix(String), TitlePrefix(String), Css(URL), ReferenceOdt(PathBuf), ReferenceDocx(PathBuf), ReferenceDoc(PathBuf), EpubStylesheet(PathBuf), EpubCoverImage(PathBuf), EpubMetadata(PathBuf), EpubEmbedFont(PathBuf), EpubChapterLevel(u32), PdfEngine(PathBuf), PdfEngineOpt(String), Citeproc, Bibliography(PathBuf), Csl(PathBuf), CitationAbbreviations(PathBuf), Natbib, Biblatex, LatexMathML(Option<URL>), AsciiMathML(Option<URL>), MathML(Option<URL>), MimeTex(Option<URL>), WebTex(Option<URL>), JsMath(Option<URL>), MathJax(Option<URL>), Katex(Option<URL>), KatexStylesheet(URL), GladTex, Trace, DumpArgs, IgnoreArgs, Verbose, ResourcePath(Vec<PathBuf>), RuntimeSystem(Vec<PandocRuntimeSystemOption>),
}

Variants (Non-exhaustive)

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.

DataDir(PathBuf)

–data-dir=DIRECTORY

Defaults(PathBuf)

–defaults=FILE

Strict

–strict

ParseRaw

-R –parse-raw

Smart

-S –smart

OldDashes

–old-dashes

BaseHeaderLevel(u32)

👎Deprecated:

replaced by ShiftHeadingLevelBy

–base-header-level=NUMBER

ShiftHeadingLevelBy(i32)

–shift-heading-level-by=NUMBER,

IndentedCodeClasses(String)

–indented-code-classes=STRING

Filter(PathBuf)

-F PROGRAM –filter=PROGRAM

LuaFilter(PathBuf)

-L SCRIPT –lua-filter=SCRIPT

Normalize

–normalize

PreserveTabs

-p –preserve-tabs

TabStop(u32)

–tab-stop=NUMBER

TrackChanges(TrackChanges)

–track-changes=accept|reject|all

ExtractMedia(PathBuf)

–extract-media=PATH

Standalone

-s –standalone

Template(PathBuf)

–template=FILENAME

Meta(StringOption<String>)

-M KEY[:VALUE] –metadata=KEY[:VALUE]

Var(StringOption<String>)

-V KEY[:VALUE] –variable=KEY[:VALUE]

PrintDefaultTemplate(String)

-D FORMAT –print-default-template=FORMAT

PrintDefaultDataFile(PathBuf)

–print-default-data-file=FILE

NoWrap

–no-wrap

Columns(u32)

–columns=NUMBER

TableOfContents

–toc, –table-of-contents

TableOfContentsDepth(u32)

–toc-depth=NUMBER

NoHighlight

–no-highlight

HighlightStyle(String)

–highlight-style=STYLE

IncludeInHeader(PathBuf)

-H FILENAME –include-in-header=FILENAME

IncludeBeforeBody(PathBuf)

-B FILENAME –include-before-body=FILENAME

IncludeAfterBody(PathBuf)

-A FILENAME –include-after-body=FILENAME

SelfContained

–self-contained

Offline

–offline

Html5

-5 –html5

HtmlQTags

–html-q-tags

Ascii

–ascii

–reference-links

AtxHeaders

–atx-headers

TopLevelDivision(Tld)

–top-level-division=

NumberSections

-N –number-sections

NumberOffset(Vec<u32>)

–number-offset=NUMBERS

NoTexLigatures

–no-tex-ligatures

Listings

–listings

Incremental

-i –incremental

SlideLevel(u32)

–slide-level=NUMBER

SectionDivs

–section-divs

DefaultImageExtension(String)

–default-image-extension=extension

EmailObfuscation(EmailObfuscation)

–email-obfuscation=none|javascript|references

IdPrefix(String)

–id-prefix=STRING

TitlePrefix(String)

-T STRING –title-prefix=STRING

Css(URL)

-c URL –css=URL

ReferenceOdt(PathBuf)

–reference-odt=FILENAME

ReferenceDocx(PathBuf)

👎Deprecated:

replaced by ReferenceDoc

–reference-docx=FILENAME

ReferenceDoc(PathBuf)

–reference-doc=FILENAME

EpubStylesheet(PathBuf)

–epub-stylesheet=FILENAME

EpubCoverImage(PathBuf)

–epub-cover-image=FILENAME

EpubMetadata(PathBuf)

–epub-metadata=FILENAME

EpubEmbedFont(PathBuf)

–epub-embed-font=FILE

EpubChapterLevel(u32)

–epub-chapter-level=NUMBER

PdfEngine(PathBuf)

–pdf-engine=PROGRAM

PdfEngineOpt(String)

–pdf-engine-opt=STRING

Citeproc

–citeproc

Bibliography(PathBuf)

–bibliography=FILE

Csl(PathBuf)

–csl=FILE

CitationAbbreviations(PathBuf)

–citation-abbreviations=FILE

Natbib

–natbib

Biblatex

–biblatex

LatexMathML(Option<URL>)

-mURL –latexmathml[=URL], –asciimathml[=URL]

AsciiMathML(Option<URL>)

–asciimathml[=URL]

MathML(Option<URL>)

–mathml[=URL]

MimeTex(Option<URL>)

–mimetex[=URL]

WebTex(Option<URL>)

–webtex[=URL]

JsMath(Option<URL>)

–jsmath[=URL]

MathJax(Option<URL>)

–mathjax[=URL]

Katex(Option<URL>)

–katex[=URL]

KatexStylesheet(URL)

–katex-stylesheet=URL

GladTex

-gladtex

Trace

–trace

DumpArgs

–dump-args

IgnoreArgs

–ignore-args

Verbose

–verbose

ResourcePath(Vec<PathBuf>)

–resource-path=PATH

RuntimeSystem(Vec<PandocRuntimeSystemOption>)

+RTS OPTIONS -RTS

In Pandoc’s “A note on security” section of the manual (link), there is a recommendation to set a heap size limit to prevent pathological corner cases.

The full list of “RTS” options can be found in the Haskell “Runtime control” section of the manual (link). The Runtime System options are way more extensive than the -M option, and cover a lot of use-cases that aren’t needed while using pandoc in a production setting.

Example Usage
let mut pandoc = pandoc::new();
pandoc.add_option(pandoc::PandocOption::RuntimeSystem(vec![
  // Limit the heap size to 512 MB while processing an arbitrary input file.
  pandoc::PandocRuntimeSystemOption::MaximumHeapMemory("512M".to_string()),
]));

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.