Enum pandoc::PandocOption[][src]

#[non_exhaustive]pub enum PandocOption {
    DataDir(PathBuf),
    Strict,
    ParseRaw,
    Smart,
    OldDashes,
    BaseHeaderLevel(u32),
    ShiftHeadingLevelBy(i32),
    IndentedCodeClasses(String),
    Filter(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),
    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)

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

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

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

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

-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

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

+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

impl Clone for PandocOption[src]

impl Debug for PandocOption[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.