Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save daipresents/4420d1fa11f5807aca00c2a0181a82bd to your computer and use it in GitHub Desktop.
Save daipresents/4420d1fa11f5807aca00c2a0181a82bd to your computer and use it in GitHub Desktop.
Pandoc. Markdown to PDF etc.
# MarkdownからHTMLへの変換
pandoc -s Sample.md -o Sample.html
# MarkdownからPDFへの変換(拡張子変えるだけ)
pandoc Sample.md -o Sample.pdf
$ pandoc README.markdown -o README.pdf
pandoc: Error producing PDF from TeX source.
! Package inputenc Error: Unicode char \u8:翻 not set up for use with LaTeX.
See the inputenc package documentation for explanation.
Type H <return> for immediate help.
...
l.53 翻
pandoc README.markdown -o README.pdf --latex-engine=xelatex
pandoc README.markdown -o README.pdf --latex-engine=xelatex -V mainfont=Hiragino\ Kaku\ Gothic\ Pro
# MarkdownからTeXへの変換
pandoc -s README.markdown -o README.tex
# TeXからEPUBへの変換
pandoc -S README.tex -o README.epub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment