Pandoc: Difference between revisions

From wikinotes
(Created page with "Text format converter. = Documentation = <blockquote> {| class="wikitable" |- | <code>man pandoc</code> || https://man.archlinux.org/man/community/pandoc/pandoc.1.en |- | git...")
 
Line 26: Line 26:
Examples
Examples
<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
pandoc -f docx input.docx
cat file.rst | pandoc -f rst -t html      # read stdin, render to stdout
pandoc -o output.pdf -f docx input.docx
pandoc -f docx input.docx               #
pandoc -o output.pdf -f docx input.docx #
</syntaxhighlight>
</syntaxhighlight>
</blockquote><!-- Usage -->
</blockquote><!-- Usage -->

Revision as of 13:04, 1 July 2022

Text format converter.

Documentation

man pandoc https://man.archlinux.org/man/community/pandoc/pandoc.1.en
github https://github.com/jgm/pandoc

Usage

pandoc --list-input-formats
pandoc --list-extensions

pandoc \
    -f ${IN_FORMAT} \
    -t ${TO_FORMAT} \
    -o ${OUTFILE}

Examples

cat file.rst | pandoc -f rst -t html      # read stdin, render to stdout
pandoc -f docx input.docx                #
pandoc -o output.pdf -f docx input.docx  #