# pandoc <command...>

A universal document converter

## Arguments

NameDescription
commandfilepaths

## Options

NameDescription
-f,-r,--from,--read <command>Specify input format
-t,-w,--to,--write <command>Specify output format
-o,--output <command>Write output to FILE instead of stdout
--data-dir <command>Specify the user data directory to search for pandoc data files
-d,--defaults <command>Specify a set of default option settings
--bash-completionGenerate a bash completion script
--verboseGive verbose debugging output
--quietSuppress warning messages
--fail-if-warningsExit with error status if there are any warnings
--log <command>Write log messages in machine-readable JSON format to FILE
--list-input-formatsList supported input formats, one per line
--list-output-formatsList supported output formats, one per line
--list-extensions [command]List supported extensions for FORMAT, one per line, preceded by a + or - indicating whether it is enabled by default in FORMAT
--list-highlight-languagesList supported languages for syntax highlighting, one per line
--list-highlight-stylesList supported styles for syntax highlighting, one per line
-v,--versionPrint version
-h,--helpShow usage message
--shift-heading-level-by <command>Shift heading levels by a positive or negative integer
--indented-code-classes <command>Specify classes to use for indented code blocks–for example, perl,numberLines or haskell. Multiple classes may be separated by spaces or commas
--default-image-extension <command>Specify a default extension to use when image paths/URLs have no extension. This allows you to use the same source for formats that require different kinds of images. Currently this option only affects the Markdown and LaTeX readers
--file-scopeParse each file individually before combining for multifile documents. This will allow footnotes in different files with the same identifiers to work as expected
-F,--filter <command>Specify an executable to be used as a filter transforming the pandoc AST after the input is parsed and before the output is written
-L,--lua-filter <command>Transform the document in a similar fashion as JSON filters, but use pandoc’s built-in Lua filtering system
-M,--metadata <command> [command]Set the metadata field KEY to the value VAL
--metadata-file <command>Read metadata from the supplied YAML (or JSON) file
-p,--preserve-tabsPreserve tabs instead of converting them to spaces
--tab-stop <command>Specify the number of spaces per tab
--track-changes <command>Specifies what to do with insertions, deletions, and comments produced by the MS Word Track Changes feature
--extract-media <command>Extract images and other media contained in or linked from the source document to the path DIR, creating it if necessary, and adjust the images references in the document so they point to the extracted files
--abbreviations <command>Specifies a custom abbreviations file, with abbreviations one to a line. If this option is not specified, pandoc will read the data file abbreviations from the user data directory or fall back on a system default
-s,--standaloneProduce output with an appropriate header and footer (e.g. a standalone HTML, LaTeX, TEI, or RTF file, not a fragment). This option is set automatically for pdf, epub, epub3, fb2, docx, and odt output
--template <command>Use the specified file as a custom template for the generated document
-V,--variable <command> [command]Set the template variable KEY to the value VAL when rendering the document in standalone mode. If no VAL is specified, the key will be given the value true
-D,--print-default-template <command>Print the system default template for an output FORMAT. Templates in the user data directory are ignored
--print-default-data-file <command>Print a system default data file. Files in the user data directory are ignored
--eol <command>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
--dpi <command>Specify the default dpi (dots per inch) value for conversion from pixels to inch/centimeters and vice versa
--wrap <command>Determine how text is wrapped in the output (the source code, not the rendered version)
--columns <command>Specify length of lines in characters. This affects text wrapping in the generated source code
--toc,--table-of-contentsInclude an automatically generated table of contents (or, in the case of latex, context, docx, odt, opendocument, rst, or ms, an instruction to create one) in the output document. It has no effect on man, docbook4, docbook5, or jats output
--toc-depth <command>Specify the number of section levels to include in the table of contents
--strip-commentsStrip out HTML comments in the Markdown or Textile source, rather than passing them on to Markdown, Textile or HTML output as raw HTML. This does not apply to HTML comments inside raw HTML blocks when the markdown_in_html_blocks extension is not set
--no-highlightDisables syntax highlighting for code blocks and inlines, even when a language attribute is given
--highlight-style <command>Specifies the coloring style to be used in highlighted source code
--print-highlight-style <command>Prints a JSON version of a highlighting style, which can be modified, saved with a .theme extension, and used with --highlight-style
--syntax-definition <command>Instructs pandoc to load a KDE XML syntax definition file, which will be used for syntax highlighting of appropriately marked code blocks
-H,--include-in-header <command>Include contents of FILE, verbatim, at the end of the header
-B,--include-before-body <command>Include contents of FILE, verbatim, at the beginning of the document body
-A,--include-after-body <command>Include contents of FILE, verbatim, at the end of the document body
--resource-path <command>List of paths to search for images and other resources. If --resource-path is not specified, the default resource path is the working directory
--request-header <command>Set the request header NAME to the value VAL when making HTTP requests. If you’re behind a proxy, you also need to set the environment variable http_proxy to http://
--no-check-certificateDisable the certificate verification to allow access to unsecure HTTP resources
--self-containedProduce a standalone HTML file with no external dependencies, using data: URIs to incorporate the contents of linked scripts, stylesheets, images, and videos
--html-q-tagsUse <q> tags for quotes in HTML. This option only has an effect if the smart extension is enabled
--asciiUse only ASCII characters in output. Currently supported for XML, HTML formats, CommonMark, gfm, Markdown, roff ms , and to a limited degree LaTeX, roff man output uses ASCII by default
--reference-linksUse reference-style links, rather than inline links, in writing Markdown or reStructuredText
--reference-location <command>Specify whether footnotes (and references, if reference-links is set) are placed at the end of the current (top-level) block, the current section, or the document. Currently only affects the markdown writer
--markdown-headings <command>Specify whether to use ATX-style (#-prefixed) or Setext-style (underlined) headings for level 1 and 2 headings in Markdown output
--atx-headersDeprecated synonym for --markdown-headings=atx
--top-level-division <command>Treat top-level headings as the given division type in LaTeX, ConTeXt, DocBook, and TEI output
-N,--number-sectionsNumber section headings in LaTeX, ConTeXt, HTML, Docx, ms, or EPUB output. By default, sections are not numbered
--number-offset <command...>Offset for section headings in HTML output (ignored in other output formats)
--listingsUse the listings package for LaTeX code blocks. The package does not support multi-byte encoding for source code. To handle UTF-8 you would need to use a custom template
-i,--incrementalMake list items in slide shows display incrementally
--slide-level <command>Specifies that headings with the specified level create slides (for beamer, s5, slidy, slideous, dzslides). Headings above this level in the hierarchy are used to divide the slide show into sections; headings below this level create subheads within a slide
--section-divsWrap sections in <section> tags (or <div> tags for html4), and attach identifiers to the enclosing <section> (or <div>) rather than the heading itself
--email-obfuscation <command>Specify a method for obfuscating mailto: links in HTML documents references . The default is none
--id-prefix <command>Specify a prefix to be added to all identifiers and internal links in HTML and DocBook output, and to footnote numbers in Markdown and Haddock output
-T,--title-prefix <command>Specify STRING as a prefix at the beginning of the title that appears in the HTML header (but not in the title as it appears at the beginning of the HTML body)
-c,--css <command>Link to a CSS style sheet. This option can be used repeatedly to include multiple files. They will be included in the order specified
--reference-doc <command>Use the specified file as a style reference in producing a docx or ODT file
--epub-cover-image <command>Use the specified image as the EPUB cover. It is recommended that the image be less than 1000px in width and height. Note that in a Markdown source document you can also specify cover-image in a YAML metadata block
--epub-metadata <command>Look in the specified XML file for metadata for the EPUB. The file should contain a series of Dublin Core elements
--epub-embed-font <command>Embed the specified font in the EPUB. This option can be repeated to embed multiple fonts. Wildcards can also be used
--pdf-engine <command>Use the specified engine when producing PDF output
--pdf-engine-opt <command>Use the given string as a command-line argument to the pdf-engine
-C,--citeprocProcess the citations in the file, replacing them with rendered citations and adding a bibliography. Citation processing will not take place unless bibliographic data is supplied, either through an external file specified using the --bibliography option or the bibliography field in metadata, or via a references section in metadata containing a list of citations in CSL YAML format with Markdown formatting. The style is controlled by a CSL stylesheet specified using the --csl option or the csl field in metadata. (If no stylesheet is specified, the chicago-author-date style will be used by default)
--bibliography <command>
• Repeatable ♾
--csl <command>Set the csl field in the document’s metadata to FILE, overriding any value set in the metadata. (This is equivalent to --metadata csl=FILE.) If FILE is a URL, it will be fetched via HTTP. If FILE is not found relative to the working directory, it will be sought in the resource path and finally in the csl subdirectory of the pandoc user data directory
--citation-abbreviations <command>Set the citation-abbreviations field in the document’s metadata to FILE, overriding any value set in the metadata. If FILE is a URL, it will be fetched via HTTP. If FILE is not found relative to the working directory, it will be sought in the resource path and finally in the csl subdirectory of the pandoc user data directory
--natbibUse natbib for citations in LaTeX output. It is intended for use in producing a LaTeX file that can be processed with bibtex
--biblatexUse biblatex for citations in LaTeX output. It is intended for use in producing a LaTeX file that can be processed with bibtex or biber
--mathjax <command>Use MathJax to display embedded TeX math in HTML output. TeX math will be put between (...) (for inline math) or [...] (for display math) and wrapped in <span> tags with class math. Then the MathJax JavaScript will render it. The URL should point to the MathJax.js load script. If a URL is not provided, a link to the Cloudflare CDN will be inserted
--mathmlConvert TeX math to MathML (in epub3, docbook4, docbook5, jats, html4 and html5). This is the default in odt output. Note that currently only Firefox and Safari (and select e-book readers) natively support MathML
--webtex <command>Convert TeX formulas to <img> tags that link to an external script that converts formulas to images. The formula will be URL-encoded and concatenated with the URL provided. For SVG images you can for example use --webtex https://latex.codecogs.com/svg.latex?. If no URL is specified, the CodeCogs URL generating PNGs will be used (https://latex.codecogs.com/png.latex?). Note: the --webtex option will affect Markdown output as well as HTML, which is useful if you’re targeting a version of Markdown without native math support
--katex <command>Use KaTeX to display embedded TeX math in HTML output. The URL is the base URL for the KaTeX library. That directory should contain a katex.min.js and a katex.min.css file. If a URL is not provided, a link to the KaTeX CDN will be inserted
--gladtexEnclose TeX math in <eq> tags in HTML output. The resulting HTML can then be processed by GladTeX to produce SVG images of the typeset formulas and an HTML file with these images embedded
--dump-argsPrint information about command-line arguments to stdout, then exit. This option is intended primarily for use in wrapper scripts
--ignore-argsIgnore command-line arguments (for use in wrapper scripts). Regular pandoc options are not ignored