Enum pandoc::PandocOption[][src]

#[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

Tuple Fields of DataDir

0: PathBuf
Defaults(PathBuf)

–defaults=FILE

Tuple Fields of Defaults

0: PathBuf
Strict

–strict

ParseRaw

-R –parse-raw

Smart

-S –smart

OldDashes

–old-dashes

BaseHeaderLevel(u32)
👎 Deprecated:

replaced by ShiftHeadingLevelBy

–base-header-level=NUMBER

Tuple Fields of BaseHeaderLevel

0: u32
👎 Deprecated:

replaced by ShiftHeadingLevelBy

ShiftHeadingLevelBy(i32)

–shift-heading-level-by=NUMBER,

Tuple Fields of ShiftHeadingLevelBy

0: i32
IndentedCodeClasses(String)

–indented-code-classes=STRING

Tuple Fields of IndentedCodeClasses

0: String
Filter(PathBuf)

-F PROGRAM –filter=PROGRAM

Tuple Fields of Filter

0: PathBuf
LuaFilter(PathBuf)

-L SCRIPT –lua-filter=SCRIPT

Tuple Fields of LuaFilter

0: PathBuf
Normalize

–normalize

PreserveTabs

-p –preserve-tabs

TabStop(u32)

–tab-stop=NUMBER

Tuple Fields of TabStop

0: u32
TrackChanges(TrackChanges)

–track-changes=accept|reject|all

Tuple Fields of TrackChanges

0: TrackChanges
ExtractMedia(PathBuf)

–extract-media=PATH

Tuple Fields of ExtractMedia

0: PathBuf
Standalone

-s –standalone

Template(PathBuf)

–template=FILENAME

Tuple Fields of Template

0: PathBuf

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

Tuple Fields of Meta

0: String1: Option<String>

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

Tuple Fields of Var

0: String1: Option<String>
PrintDefaultTemplate(String)

-D FORMAT –print-default-template=FORMAT

Tuple Fields of PrintDefaultTemplate

0: String
PrintDefaultDataFile(PathBuf)

–print-default-data-file=FILE

Tuple Fields of PrintDefaultDataFile

0: PathBuf
NoWrap

–no-wrap

Columns(u32)

–columns=NUMBER

Tuple Fields of Columns

0: u32
TableOfContents

–toc, –table-of-contents

TableOfContentsDepth(u32)

–toc-depth=NUMBER

Tuple Fields of TableOfContentsDepth

0: u32
NoHighlight

–no-highlight

HighlightStyle(String)

–highlight-style=STYLE

Tuple Fields of HighlightStyle

0: String
IncludeInHeader(PathBuf)

-H FILENAME –include-in-header=FILENAME

Tuple Fields of IncludeInHeader

0: PathBuf
IncludeBeforeBody(PathBuf)

-B FILENAME –include-before-body=FILENAME

Tuple Fields of IncludeBeforeBody

0: PathBuf
IncludeAfterBody(PathBuf)

-A FILENAME –include-after-body=FILENAME

Tuple Fields of IncludeAfterBody

0: PathBuf
SelfContained

–self-contained

Offline

–offline

Html5

-5 –html5

HtmlQTags

–html-q-tags

Ascii

–ascii

–reference-links

AtxHeaders

–atx-headers

TopLevelDivision(Tld)

–top-level-division=

Tuple Fields of TopLevelDivision

0: Tld
NumberSections

-N –number-sections

NumberOffset(Vec<u32>)

–number-offset=NUMBERS

Tuple Fields of NumberOffset

0: Vec<u32>
NoTexLigatures

–no-tex-ligatures

Listings

–listings

Incremental

-i –incremental

SlideLevel(u32)

–slide-level=NUMBER

Tuple Fields of SlideLevel

0: u32
SectionDivs

–section-divs

DefaultImageExtension(String)

–default-image-extension=extension

Tuple Fields of DefaultImageExtension

0: String
EmailObfuscation(EmailObfuscation)

–email-obfuscation=none|javascript|references

Tuple Fields of EmailObfuscation

0: EmailObfuscation
IdPrefix(String)

–id-prefix=STRING

Tuple Fields of IdPrefix

0: String
TitlePrefix(String)

-T STRING –title-prefix=STRING

Tuple Fields of TitlePrefix

0: String
Css(URL)

-c URL –css=URL

Tuple Fields of Css

0: URL
ReferenceOdt(PathBuf)

–reference-odt=FILENAME

Tuple Fields of ReferenceOdt

0: PathBuf
ReferenceDocx(PathBuf)
👎 Deprecated:

replaced by ReferenceDoc

–reference-docx=FILENAME

Tuple Fields of ReferenceDocx

0: PathBuf
👎 Deprecated:

replaced by ReferenceDoc

ReferenceDoc(PathBuf)

–reference-doc=FILENAME

Tuple Fields of ReferenceDoc

0: PathBuf
EpubStylesheet(PathBuf)

–epub-stylesheet=FILENAME

Tuple Fields of EpubStylesheet

0: PathBuf
EpubCoverImage(PathBuf)

–epub-cover-image=FILENAME

Tuple Fields of EpubCoverImage

0: PathBuf
EpubMetadata(PathBuf)

–epub-metadata=FILENAME

Tuple Fields of EpubMetadata

0: PathBuf
EpubEmbedFont(PathBuf)

–epub-embed-font=FILE

Tuple Fields of EpubEmbedFont

0: PathBuf
EpubChapterLevel(u32)

–epub-chapter-level=NUMBER

Tuple Fields of EpubChapterLevel

0: u32
PdfEngine(PathBuf)

–pdf-engine=PROGRAM

Tuple Fields of PdfEngine

0: PathBuf
PdfEngineOpt(String)

–pdf-engine-opt=STRING

Tuple Fields of PdfEngineOpt

0: String
Citeproc

–citeproc

Bibliography(PathBuf)

–bibliography=FILE

Tuple Fields of Bibliography

0: PathBuf
Csl(PathBuf)

–csl=FILE

Tuple Fields of Csl

0: PathBuf
CitationAbbreviations(PathBuf)

–citation-abbreviations=FILE

Tuple Fields of CitationAbbreviations

0: PathBuf
Natbib

–natbib

Biblatex

–biblatex

LatexMathML(Option<URL>)

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

Tuple Fields of LatexMathML

0: Option<URL>
AsciiMathML(Option<URL>)

–asciimathml[=URL]

Tuple Fields of AsciiMathML

0: Option<URL>
MathML(Option<URL>)

–mathml[=URL]

Tuple Fields of MathML

0: Option<URL>
MimeTex(Option<URL>)

–mimetex[=URL]

Tuple Fields of MimeTex

0: Option<URL>
WebTex(Option<URL>)

–webtex[=URL]

Tuple Fields of WebTex

0: Option<URL>
JsMath(Option<URL>)

–jsmath[=URL]

Tuple Fields of JsMath

0: Option<URL>
MathJax(Option<URL>)

–mathjax[=URL]

Tuple Fields of MathJax

0: Option<URL>
Katex(Option<URL>)

–katex[=URL]

Tuple Fields of Katex

0: Option<URL>
KatexStylesheet(URL)

–katex-stylesheet=URL

Tuple Fields of KatexStylesheet

0: URL
GladTex

-gladtex

Trace

–trace

DumpArgs

–dump-args

IgnoreArgs

–ignore-args

Verbose

–verbose

ResourcePath(Vec<PathBuf>)

–resource-path=PATH

Tuple Fields of ResourcePath

0: Vec<PathBuf>

+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()),
]));

Tuple Fields of RuntimeSystem

0: Vec<PandocRuntimeSystemOption>

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

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

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

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

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

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.