tldr/pages/common/pandoc.md

25 lines
591 B
Markdown
Raw Normal View History

2015-11-09 12:52:05 +00:00
# pandoc
> Convert documents between various formats.
2019-06-04 10:00:18 +01:00
> More information: <https://pandoc.org>.
2015-11-09 12:52:05 +00:00
2018-10-24 23:46:08 +01:00
- Convert file to pdf (the output format is determined by file extension):
2015-11-09 12:52:05 +00:00
2015-11-25 07:51:55 +00:00
`pandoc {{input.md}} -o {{output.pdf}}`
2018-10-24 23:46:08 +01:00
- Force conversion to use a specific format:
`pandoc {{input.docx}} --to {{gfm}} -o {{output.md}}`
2018-10-24 23:46:08 +01:00
- Convert to a standalone file with the appropriate headers/footers (for LaTeX, HTML, etc.):
`pandoc {{input.md}} -s -o {{output.tex}}`
- List all supported input formats:
`pandoc --list-input-formats`
- List all supported output formats:
`pandoc --list-output-formats`