偶尔会用到 Pandoc,不过不常用也就记不得 Pandoc 常用的命令,但蛋疼的是想用时却经常打不开官网(实在不想吐槽垃圾的校园网),所以索性直接把 Pandoc 常用的命令转载过来保存查看。
原文:http://www.pandoc.org/demos.html
Examples
Making presentations with Pandoc beamer. This is a short guide about how I make PDF slides using beamer format output from the pandoc. Note: Commands are updated for the latest Pandoc version: 2.10.x and newer. How-to for docs preparation Tools. Template: I use my own modified template in order to produce nicer looking listings of code. This guide shows you how to use Pandoc to convert your documents into many different file formats. Pandoc -s MANUAL.txt-o example7.rtf; Beamer slide show: pandoc -t beamer SLIDES-o example8.pdf; DocBook XML: pandoc -s -t docbook MANUAL.txt-o example9.db; Man page: pandoc -s -t man pandoc.1.md-o example10.1; ConTeXt: pandoc -s -t context MANUAL.txt-o example11.tex; Converting a web page to markdown. Interact with Pandoc from NodeJS.Requires Pandoc to be installed. I am creating slides in markdown that I want to process using pandoc and beamer. I wonder if there is a markdown way of creating an overprint environment? I tried to do it with the fenced div exte.
To see the output created by each of the commands below, click on the name of the output file:
HTML fragment:
pandoc MANUAL.txt -o example1.html
Standalone HTML file:
pandoc -s MANUAL.txt -o example2.html
HTML with smart quotes, table of contents, CSS, and custom footer:
pandoc -s -S --toc -c pandoc.css -A footer.html MANUAL.txt -o example3.html
LaTeX:
pandoc -s MANUAL.txt -o example4.tex
From LaTeX to markdown:
pandoc -s example4.tex -o example5.text
reStructuredText:
pandoc -s -t rst --toc MANUAL.txt -o example6.text
Rich text format (RTF):
pandoc -s MANUAL.txt -o example7.rtf
Beamer slide show:
pandoc -t beamer SLIDES -o example8.pdf
DocBook XML:
pandoc -s -S -t docbook MANUAL.txt -o example9.db
Man page:
pandoc -s -t man pandoc.1.md -o example10.1
ConTeXt:
pandoc -s -t context MANUAL.txt -o example11.tex
Converting a web page to markdown:
pandoc -s -r html http://www.gnu.org/software/make/ -o example12.text
From markdown to PDF:
pandoc MANUAL.txt --latex-engine=xelatex -o example13.pdf
PDF with numbered sections and a custom LaTeX header:
pandoc -N --template=mytemplate.tex --variable mainfont='Palatino' --variable sansfont='Helvetica' --variable monofont='Menlo' --variable fontsize=12pt --variable version=1.17.2 MANUAL.txt --latex-engine=xelatex --toc -o example14.pdf
A wiki program using Happstack and pandoc: gitit
HTML slide shows:
pandoc -s --mathml -i -t dzslides SLIDES -o example16a.html
pandoc -s --webtex -i -t slidy SLIDES -o example16b.html
pandoc -s --mathjax -i -t revealjs SLIDES -o example16d.html
TeX math in HTML:
pandoc math.text -s -o mathDefault.html
pandoc math.text -s --mathml -o mathMathML.html
pandoc math.text -s --webtex -o mathWebTeX.html
pandoc math.text -s --mathjax -o mathMathJax.html
pandoc math.text -s --latexmathml -o mathLaTeXMathML.html
Syntax highlighting of delimited code blocks:
pandoc code.text -s --highlight-style pygments -o example18a.html
pandoc code.text -s --highlight-style kate -o example18b.html
pandoc code.text -s --highlight-style monochrome -o example18c.html
pandoc code.text -s --highlight-style espresso -o example18d.html
pandoc code.text -s --highlight-style haddock -o example18e.html
pandoc code.text -s --highlight-style tango -o example18f.html
pandoc code.text -s --highlight-style zenburn -o example18g.html
GNU Texinfo, converted to info, HTML, and PDF formats:
pandoc MANUAL.txt -s -o example19.texi
makeinfo --no-validate --force example19.texi -o example19.info
makeinfo --no-validate --force example19.texi --html -o example19
texi2pdf example19.texi # produces example19.pdf
OpenDocument XML:
pandoc MANUAL.txt -s -t opendocument -o example20.xml
ODT (OpenDocument Text, readable by OpenOffice):
pandoc MANUAL.txt -o example21.odt
MediaWiki markup:
pandoc -s -S -t mediawiki --toc MANUAL.txt -o example22.wiki
EPUB ebook:
pandoc -S MANUAL.txt -o MANUAL.epub
Markdown citations:
pandoc -s -S --bibliography biblio.bib --filter pandoc-citeproc CITATIONS -o example24a.html
pandoc -s -S --bibliography biblio.json --filter pandoc-citeproc --csl chicago-fullnote-bibliography.csl CITATIONS -o example24b.html
pandoc -s -S --bibliography biblio.yaml --filter pandoc-citeproc --csl ieee.csl CITATIONS -t man -o example24c.1
Textile writer:
pandoc -s -S MANUAL.txt -t textile -o example25.textile
Textile reader:
pandoc -s -S example25.textile -f textile -t html -o example26.html
Org-mode:
pandoc -s -S MANUAL.txt -o example27.org
AsciiDoc:
pandoc -s -S MANUAL.txt -t asciidoc -o example28.txt
Word docx:
pandoc -s -S MANUAL.txt -o example29.docx
LaTeX math to docx:
pandoc -s math.tex -o example30.docx
DocBook to markdown:
pandoc -f docbook -t markdown -s howto.xml -o example31.text
MediaWiki to html5:
pandoc -f mediawiki -t html5 -s haskell.wiki -o example32.html
Custom writer:
pandoc -t sample.lua example33.text -o example33.html
Docx with a reference docx:
pandoc -S --reference-docx twocolumns.docx -o UsersGuide.docx MANUAL.txt
Docx to markdown, including math:
pandoc -s example30.docx -t markdown -o example35.md
EPUB to plain text:
pandoc MANUAL.epub -t plain -o example36.text
Pandoc Beamer Center Image
Pandoc is a Haskell library for converting from one markupformat to another, and a command-line tool that usesthis library. It can read several dialects of Markdown and(subsets of) HTML, reStructuredText, LaTeX, DocBook, JATS,MediaWiki markup, DokuWiki markup, TWiki markup,TikiWiki markup, Jira markup, Creole 1.0, Haddock markup,OPML, Emacs Org-Mode, Emacs Muse, txt2tags, ipynb (Jupyternotebooks), Vimwiki, Word Docx, ODT, EPUB, FictionBook2,roff man, Textile, BibTeX, BibLaTeX, CSL JSON, and CSV, and it can write Markdown,reStructuredText, XHTML, HTML 5, LaTeX, ConTeXt, DocBook,JATS, OPML, TEI, OpenDocument, ODT, Word docx,PowerPoint pptx, RTF, MediaWiki, DokuWiki, XWiki,ZimWiki, Textile, Jira, roff man, roff ms, plain text,Emacs Org-Mode, AsciiDoc, Haddock markup,EPUB (v2 and v3), ipynb, FictionBook2,InDesign ICML, Muse, CSL JSON, LaTeX beamer slides,and several kinds of HTML/JavaScript slide shows(S5, Slidy, Slideous, DZSlides, reveal.js).
In contrast to most existing tools for converting Markdownto HTML, pandoc has a modular design: it consists of a set ofreaders, which parse text in a given format and produce anative representation of the document, and a set of writers,which convert this native representation into a targetformat. Thus, adding an input or output format requiresonly adding a reader or writer.
[Skip to Readme]Pandoc Beamer Machine
Versions [faq] | 0.4, 0.41, 0.42, 0.43, 0.44, 0.45, 0.46, 1.0, 1.0.0.1, 1.1, 1.2, 1.2.1, 1.3, 1.4, 1.5, 1.5.0.1, 1.5.1, 1.5.1.1, 1.6, 1.6.0.1, 1.8, 1.8.0.1, 1.8.0.2, 1.8.0.3, 1.8.1, 1.8.1.1, 1.8.1.2, 1.8.2, 1.8.2.1, 1.9, 1.9.0.2, 1.9.0.3, 1.9.0.4, 1.9.0.5, 1.9.1, 1.9.1.1, 1.9.1.2, 1.9.2, 1.9.3, 1.9.4, 1.9.4.1, 1.9.4.2, 1.9.4.3, 1.9.4.4, 1.9.4.5, 1.10, 1.10.0.1, 1.10.0.2, 1.10.0.3, 1.10.0.4, 1.10.0.5, 1.10.1, 1.11, 1.11.1, 1.12, 1.12.0.1, 1.12.0.2, 1.12.1, 1.12.2, 1.12.2.1, 1.12.3, 1.12.3.1, 1.12.3.2, 1.12.3.3, 1.12.4, 1.12.4.2, 1.13, 1.13.0.1, 1.13.1, 1.13.2, 1.13.2.1, 1.14, 1.14.0.1, 1.14.0.2, 1.14.0.3, 1.14.0.4, 1.14.1, 1.15, 1.15.0.1, 1.15.0.2, 1.15.0.3, 1.15.0.4, 1.15.0.5, 1.15.0.6, 1.15.1, 1.15.1.1, 1.15.2, 1.15.2.1, 1.16, 1.16.0.1, 1.16.0.2, 1.17, 1.17.0.1, 1.17.0.2, 1.17.0.3, 1.17.1, 1.17.2, 1.18, 1.19, 1.19.1, 1.19.2, 1.19.2.1, 1.19.2.2, 1.19.2.3, 1.19.2.4, 2.0, 2.0.0.1, 2.0.1, 2.0.1.1, 2.0.2, 2.0.3, 2.0.4, 2.0.5, 2.0.6, 2.1, 2.1.1, 2.1.2, 2.1.3, 2.2, 2.2.1, 2.2.2, 2.2.2.1, 2.2.3, 2.2.3.1, 2.2.3.2, 2.3, 2.3.1, 2.4, 2.5, 2.6, 2.7, 2.7.1, 2.7.2, 2.7.3, 2.8, 2.8.0.1, 2.8.1, 2.9, 2.9.1, 2.9.1.1, 2.9.2, 2.9.2.1, 2.10, 2.10.1, 2.11, 2.11.0.1, 2.11.0.2, 2.11.0.3, 2.11.0.4, 2.11.1, 2.11.1.1, 2.11.2, 2.11.3, 2.11.3.1, 2.11.3.2, 2.11.4, 2.12, 2.13 (info) |
---|---|
Change log | changelog.md |
Dependencies | aeson (>=0.7 && <1.6), aeson-pretty (>=0.8.5 && <0.9), attoparsec (>=0.12 && <0.14), base (>=4.9 && <5), base-compat (>=0.9), base64-bytestring (>=0.1 && <1.3), basement (>=0.0.10), binary (>=0.7 && <0.11), blaze-html (0.9.*), blaze-markup (0.8.*), bytestring (>=0.9 && <0.12), case-insensitive (1.2.*), citeproc (>=0.3.0.9 && <0.3.1), commonmark (>=0.1.1.3 && <0.2), commonmark-extensions (>=0.2.0.4 && <0.3), commonmark-pandoc (0.2.*), connection (>=0.3.1), containers (>=0.4.2.1 && <0.7), data-default (>=0.4 && <0.8), deepseq (>=1.3 && <1.5), directory (>=1.2.3 && <1.4), doclayout (>=0.3.0.1 && <0.4), doctemplates (0.9.*), emojis (0.1.*), exceptions (>=0.8 && <0.11), file-embed (0.0.*), filepath (>=1.1 && <1.5), foundation (>=0.0.23), Glob (>=0.7 && <0.11), haddock-library (>=1.8 && <1.10), hslua (>=1.1 && <1.4), hslua-module-path (>=0.1.0 && <0.2.0), hslua-module-system (0.2.*), hslua-module-text (>=0.2.1 && <0.4), HsYAML (0.2.*), HTTP (>=4000.0.5 && <4000.4), http-client (>=0.4.30 && <0.8), http-client-tls (>=0.2.4 && <0.4), http-types (>=0.8 && <0.13), ipynb (0.1.*), jira-wiki-markup (>=1.3.4 && <1.4), JuicyPixels (>=3.1.6.1 && <3.4), mtl (2.2.*), network (>=2.6), network-uri (2.6.*), pandoc, pandoc-types (1.22.*), parsec (3.1.*), process (>=1.2.3 && <1.7), random (>=1 && <1.3), safe (>=0.3.18 && <0.4), scientific (0.3.*), SHA (1.6.*), skylighting (0.10.5.*), skylighting-core (0.10.5.*), split (0.2.*), syb (>=0.1 && <0.8), tagsoup (>=0.14.6 && <0.15), temporary (>=1.1 && <1.4), texmath (0.12.2.*), text (>=1.1.1.0 && <1.3), text-conversions (0.3.*), time (>=1.5 && <1.10), unicode-transforms (0.3.*), unix (>=2.4 && <2.8), unordered-containers (0.2.*), wai (>=0.3), wai-extra (>=3.0.24), xml (>=1.3.12 && <1.4), xml-conduit (>=1.7 && <1.10), zip-archive (>=0.2.3.4 && <0.5), zlib (>=0.5 && <0.7) [details] |
License | GPL-2.0-or-later |
Copyright | (c) 2006-2021 John MacFarlane |
Author | John MacFarlane <jgm@berkeley.edu> |
Maintainer | John MacFarlane <jgm@berkeley.edu> |
Category | Text |
Home page | https://pandoc.org |
Bug tracker | https://github.com/jgm/pandoc/issues |
Source repo | head: git clone git://github.com/jgm/pandoc.git |
Uploaded | by JohnMacFarlane at 2021-03-21T04:51:34Z |
Distributions | Arch:2.13, Debian:2.2.1, Fedora:2.9.2.1, FreeBSD:1.15.0.6, LTSHaskell:2.5, NixOS:2.13, Stackage:2.13, openSUSE:2.10.1 |
Executables | trypandoc, pandoc |
Downloads | 262890 total (1476 in the last 30 days) |
Rating | 2.75 (votes: 19) [estimated by Bayesian average] |
Your Rating |
|
Status | Docs uploaded by user Build status unknown [no reports yet] |
Modules
[Index] [Quick Jump]
- Text
- Text.Pandoc
- Text.Pandoc.Readers
- Text.Pandoc.Writers
- Text.Pandoc
Flags
Pandoc Beamer Yaml
Name | Description | Default | Type |
---|---|---|---|
embed_data_files | Embed data files in binary for relocatable executable. | Disabled | Automatic |
trypandoc | Build trypandoc cgi executable. | Disabled | Automatic |
Use -f <flag> to enable a flag, or -f -<flag> to disable that flag. More info
Downloads
- pandoc-2.13.tar.gz [browse] (Cabal source package)
- Package description (as included in the package)
Pandoc Beamer Machine
Maintainer's Corner
For package maintainers and hackage trustees