Templates for pandoc.
Many templates based on others'. You can find most of them from pandoc wiki page--User contributed templates.
I change some details for my own use, make disrepair templates work again and add chinese support. If there is a breach of copyright or licence, please contact me.
- orange-toc 移动端目录样式不对,参考 blue-toc
- articles 公式什么的都不支持
install BasicTeX: brew cask install basictex
install package: sudo tlmgr install titling lastpage
modified from tzengyuxio's pages
pandoc markdown/pandoc.markdown -o pdf/pandoc-zhtw.pdf --toc --smart --template article --pdf-engine=xelatex -V mainfont='PingFang SC'
pandoc -t SLIDES -o example.pdf
Add Chinese support.
pandoc markdown/example.md -o pdf/example.pdf --from markdown --template eisvogel --pdf-engine=xelatex -N --listings -V mainfont='PingFang SC'
For PDFs with numbered sections use the --number-sections
or -N
option.
pandoc example.md -o example.pdf --template eisvogel --number-sections
You can get syntax highlighting of delimited code blocks by using the LaTeX package listings with the option --listings
. This example will produce the same syntax highlighting as in the example PDF.
pandoc example.md -o example.pdf --template eisvogel --listings
The following examples show syntax highlighting of delimited code blocks without using listings. To see a list of all the supported highlight styles, type pandoc --list-highlight-styles
.
pandoc example.md -o example.pdf --template eisvogel --highlight-style pygments
pandoc example.md -o example.pdf --template eisvogel --highlight-style kate
pandoc example.md -o example.pdf --template eisvogel --highlight-style espresso
pandoc example.md -o example.pdf --template eisvogel --highlight-style tango
To produce a standalone LaTeX document for compiling with any LaTeX editor use .tex
as an output file extension.
pandoc example.md -o example.tex --template eisvogel
The default language of this template is German. The lang
variable identifies the main language of the document, using a code according to BCP 47 (e.g. en
or en-GB
). For an incomplete list of the supported language code see the documentation for the hyph-utf8 package (Section 2). The following example changes the language to British English:
pandoc example.md -o example.pdf --template eisvogel -V lang=en-GB
The following example changes the language to American English:
pandoc example.md -o example.pdf --template eisvogel -V lang=en-US
pandoc -t html5 -f markdown -s -S --toc --toc-depth 3 --template github.html5 --css html/css/github.css README.md -o index.html
# stylesheets/blue-toc.css needed
pandoc -t html5 -f markdown -s -S --toc --toc-depth 2 --template blue-toc markdown/pandoc.markdown -o pandoc.html
# stylesheets/orange-toc.css needed
pandoc -t html5 -f markdown -s -S --toc --toc-depth 2 --template orange-toc markdown/how-to-be-more-productive.markdown -o productive.html
the toc can float, and I like this style
# js/uikit stylesheets/uikit.css needed
pandoc -t html5 -f markdown -s -S --toc --toc-depth 2 --template uikit https://raw.githubusercontent.com/jgm/pandoc/master/MANUAL.txt -o html/uikit.html
pandoc -t html5 -f markdown -s -S --toc --toc-depth 2 --template bootstrap --css css/bootstrap.css markdown/how-to-be-more-productive.markdown -o html/productive.html
pandoc-bootstrap-adaptive-template
pandoc -t html5 -f markdown -s -S --toc --toc-depth 2 --template bootstrap-adaptive.html5 --css css/bootstrap-adaptive.css https://raw.githubusercontent.com/jgm/pandoc/master/MANUAL.txt -o html/bootstrap-adaptive.html
add style to table
sed -i '' 's/<table>/<table class="table table-bordered table-condensed">/' index.html