Enum pandoc::PandocOption
source · #[non_exhaustive]pub enum PandocOption {
Show 85 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(String, Option<String>),
Var(String, Option<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>),
Sandbox,
EOL(String),
}
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
DataDir(PathBuf)
–data-dir=DIRECTORY
Defaults(PathBuf)
–defaults=FILE
Strict
–strict
ParseRaw
-R –parse-raw
Smart
-S –smart
OldDashes
–old-dashes
BaseHeaderLevel(u32)
–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(String, Option<String>)
-M KEY[:VALUE] –metadata=KEY[:VALUE]
Var(String, Option<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
ReferenceLinks
–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)
–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()),
]));
Sandbox
–sandbox
This option is strongly recommended for any use-case
involving untrusted user
input. Note
that it does require a pandoc binary compiled with the
embed_data_files
option, in order to process some formats
such as docx without external file access.
EOL(String)
Manually specify line endings: crlf (Windows), lf (macOS/Linux/UNIX), or native (line endings appropriate to the OS on which pandoc is being run). The default is native.
Trait Implementations§
source§impl Clone for PandocOption
impl Clone for PandocOption
source§fn clone(&self) -> PandocOption
fn clone(&self) -> PandocOption
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for PandocOption
impl Debug for PandocOption
source§impl PartialEq for PandocOption
impl PartialEq for PandocOption
source§fn eq(&self, other: &PandocOption) -> bool
fn eq(&self, other: &PandocOption) -> bool
self
and other
values to be equal, and is used
by ==
.