Linux command
pandoc 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Convert Markdown to HTML
pandoc [input.md] -o [output.html]
Convert to PDF
pandoc [input.md] -o [output.pdf]
Convert to Word
pandoc [input.md] -o [output.docx]
Specify input format
pandoc -f [latex] -t [html] [input.tex] -o [output.html]
With table of contents
pandoc [input.md] --toc -o [output.html]
Use template
pandoc [input.md] --template=[template.html] -o [output.html]
说明
pandoc converts document formats. Universal document converter. The tool handles many formats. Markdown, LaTeX, HTML, DOCX, PDF, and more.
参数
- -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.
FAQ
What is the pandoc command used for?
pandoc converts document formats. Universal document converter. The tool handles many formats. Markdown, LaTeX, HTML, DOCX, PDF, and more.
How do I run a basic pandoc example?
Run `pandoc [input.md] -o [output.html]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -o _FILE_ do in pandoc?
Output file.