Pandoc

Links

Installation:

dnf -y install pandoc*

Umwandlung/Konvertierung von Dateien und Verzeichnissen

Pandoc erkennt an der Dateiendung, um was für eine Datei es sich handelt, und wandelt dann passend um.

pandoc --standalone --output=dest.ext source.ext

# if you want to control the conversion:
pandoc --standalone --from=markdown --to=rst --output=dest.ext source.ext

PDF-Umwandlung speziell steuern:

pandoc --standalone --variable papersize:a4 --output=dest.pdf source.md

So wandelt man ein Verzeichnis, welches HTML-Dateien enthält, mit Hilfe von pandoc in Asciidoc um:

find ./ -iname "*.html" -type f -exec sh -c 'pandoc --to=asciidoc --atx-headers --output="${0%.html}.asc" "${0}"' {} \;

Input-Formate

  • bibtex (BibTeX bibliography)

  • biblatex (BibLaTeX bibliography)

  • commonmark (CommonMark Markdown)

  • commonmark_x (CommonMark Markdown with extensions)

  • creole (Creole 1.0)

  • csljson (CSL JSON bibliography)

  • csv (CSV table)

  • docbook (DocBook)

  • docx (Word docx)

  • dokuwiki (DokuWiki markup)

  • epub (EPUB)

  • fb2 (FictionBook2 e-book)

  • gfm (GitHub-Flavored Markdown)

  • haddock (Haddock markup)

  • html (HTML)

  • ipynb (Jupyter notebook)

  • jats (JATS XML)

  • jira (Jira/Confluence wiki markup)

  • json (JSON version of native AST)

  • latex (LaTeX)

  • markdown (Pandoc’s Markdown)

  • markdown_mmd (MultiMarkdown)

  • markdown_phpextra (PHP Markdown Extra)

  • markdown_strict (original unextended Markdown)

  • mediawiki (MediaWiki markup)

  • man (roff man)

  • muse (Muse)

  • native (native Haskell)

  • odt (ODT)

  • opml (OPML)

  • org (Emacs Org mode)

  • rst (reStructuredText)

  • t2t (txt2tags)

  • textile (Textile)

  • tikiwiki (TikiWiki markup)

  • twiki (TWiki markup)

  • vimwiki (Vimwiki)

Output-Formate

  • asciidoc (AsciiDoc) or asciidoctor (AsciiDoctor)

  • beamer (LaTeX beamer slide show)

  • bibtex (BibTeX bibliography)

  • biblatex (BibLaTeX bibliography)

  • commonmark (CommonMark Markdown)

  • commonmark_x (CommonMark Markdown with extensions)

  • context (ConTeXt)

  • csljson (CSL JSON bibliography)

  • docbook or docbook4 (DocBook 4)

  • docbook5 (DocBook 5)

  • docx (Word docx)

  • dokuwiki (DokuWiki markup)

  • epub or epub3 (EPUB v3 book)

  • epub2 (EPUB v2)

  • fb2 (FictionBook2 e-book)

  • gfm (GitHub-Flavored Markdown)

  • haddock (Haddock markup)

  • html or html5 (HTML, i.e. HTML5/XHTML polyglot markup)

  • html4 (XHTML 1.0 Transitional)

  • icml (InDesign ICML)

  • ipynb (Jupyter notebook)

  • jats_archiving (JATS XML, Archiving and Interchange Tag Set)

  • jats_articleauthoring (JATS XML, Article Authoring Tag Set)

  • jats_publishing (JATS XML, Journal Publishing Tag Set)

  • jats (alias for jats_archiving)

  • jira (Jira/Confluence wiki markup)

  • json (JSON version of native AST)

  • latex (LaTeX)

  • man (roff man)

  • markdown (Pandoc’s Markdown)

  • markdown_mmd (MultiMarkdown)

  • markdown_phpextra (PHP Markdown Extra)

  • markdown_strict (original unextended Markdown)

  • mediawiki (MediaWiki markup)

  • ms (roff ms)

  • muse (Muse),

  • native (native Haskell),

  • odt (OpenOffice text document)

  • opml (OPML)

  • opendocument (OpenDocument)

  • org (Emacs Org mode)

  • pdf (PDF)

  • plain (plain text),

  • pptx (PowerPoint slide show)

  • rst (reStructuredText)

  • rtf (Rich Text Format)

  • texinfo (GNU Texinfo)

  • textile (Textile)

  • slideous (Slideous HTML and JavaScript slide show)

  • slidy (Slidy HTML and JavaScript slide show)

  • dzslides (DZSlides HTML5 + JavaScript slide show),

  • revealjs (reveal.js HTML5 + JavaScript slide show)

  • s5 (S5 HTML and JavaScript slide show)

  • tei (TEI Simple)

  • xwiki (XWiki markup)

  • zimwiki (ZimWiki markup)