Pandoc is an open-source document converter, widely used as a writing tool (especially by scholars) and as a basis for publishing workflows - wikipedia

Pandoc is a Haskell library for converting from one markup format to another, and a command-line tool that uses this library.

If you need to convert files from one markup format into another, pandoc is your swiss-army knife -

Pandoc can be used to create standalone Javascript Slide presentations in a number of formats.

# Useage

If no *input-file* is specified, input is read from *stdin*. Otherwise, the *input-files* are concatenated (with a blank line between each) and used as input - github

pandoc -s -o output.html input.txt

Output goes to *stdout* by default (though output to *stdout* is disabled for the `odt`, `docx`, `epub`, and `epub3` output formats). For output to a file, use the `-o` option:

pandoc -o output.html input.txt

By default, pandoc produces a document fragment, not a standalone document with a proper header and footer. To produce a standalone document, use the `-s` or `--standalone` flag:

For more information on how standalone documents are produced, see [Templates], below.

Instead of a file, an absolute URI may be given. In this case pandoc will fetch the content using HTTP:

pandoc -f html -t markdown

If multiple input files are given, `pandoc` will concatenate them all (with blank lines between them) before parsing. This feature is disabled for binary input formats such as `EPUB`, `odt`, and `docx`.

The format of the input and output can be specified explicitly using command-line options. The input format can be specified using the `-r/--read` or `-f/--from` options, the output format using the `-w/--write` or `-t/--to` options. Thus, to convert `hello.txt` from Markdown to LaTeX, you could type:

pandoc -f markdown -t latex hello.txt

To convert `hello.html` from HTML to Markdown:

pandoc -f html -t markdown hello.html

# Integration with Reference Managers

Pandoc has the ability to integrate directly with Zotero - wikipedia

An included module, pandoc-citeproc, allows the program to use data from Reference Management Software such as BibTeX, EndNote, Mendeley, or Papers (Papers (software)).

The information is automatically transformed into a citation in various styles using an implementation of the Citation Style Language.

# Accuracy

Pandoc attempts to preserve the structural elements of a document, but not formatting details such as margin size. And some document elements, such as complex tables, may not fit into pandoc's simple document model.

While conversions from pandoc's Markdown to all formats aspire to be perfect, conversions from formats more expressive than pandoc's Markdown can be expected to be lossy.

# Supported File Formats

Pandoc's most thoroughly supported file format is an extended version of Markdown, but it can also read many other forms of lightweight markup language, HTML, LaTeX, OPML, Org-mode, DocBook, and Office Open XML (Microsoft Word .docx).

Plug-ins for custom formats can also be written in Lua, which has been used to create an exporting tool for the Journal Article Tag Suite.

# Synopsis

`pandoc` [*options*] [*input-file*]...

# Slide Shows

Pandoc can create slide shows in a variety of formats including Slidy, Slideous, DZSlides, reveal.js, LaTeX based Beamer Slide Shows, or S5 HTML slide shows.

It can also produce [PDF] output on systems where LaTeX or ConTeXt is installed.

# Enhanced Markdown

Pandoc's enhanced version of Markdown includes syntax for [footnotes], [tables], flexible [ordered lists], [definition lists], [fenced code blocks], [superscripts and subscripts], [strikeout], [metadata blocks], automatic tables of contents, embedded LaTeX [math], [citations], and [Markdown inside HTML block elements][Extension: `markdown_in_html_blocks`]. (These enhancements, described below under Pandoc's Markdown, can be disabled using the `markdown_strict` input or output format.)

In contrast to most existing tools for converting Markdown to HTML, which use regex substitutions, pandoc has a modular design: it consists of a set of readers, which parse text in a given format and produce a native representation of the document, and a set of writers, which convert this native representation into a target format. Thus, adding an input or output format requires only adding a reader or writer.