LinuxCommandLibrary

pandoc

converts document formats

TLDR

Convert Markdown to HTML

$ pandoc [input.md] -o [output.html]
copy
Convert to PDF
$ pandoc [input.md] -o [output.pdf]
copy
Convert to Word
$ pandoc [input.md] -o [output.docx]
copy
Specify input format
$ pandoc -f [latex] -t [html] [input.tex] -o [output.html]
copy
With table of contents
$ pandoc [input.md] --toc -o [output.html]
copy
Use template
$ pandoc [input.md] --template=[template.html] -o [output.html]
copy

SYNOPSIS

pandoc [options] [input...]

DESCRIPTION

pandoc converts document formats. Universal document converter.
The tool handles many formats. Markdown, LaTeX, HTML, DOCX, PDF, and more.

PARAMETERS

INPUT

Input file(s).
-o FILE
Output file.
-f FORMAT
Input format.
-t FORMAT
Output format.
--toc
Include table of contents.
--template FILE
Use template.
--help
Display help information.

CAVEATS

PDF output requires LaTeX or wkhtmltopdf. Format support varies.

HISTORY

Pandoc was created by John MacFarlane as a universal document converter.

SEE ALSO

markdown(1), latex(1), groff(1)

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community