Skip to content

Instantly share code, notes, and snippets.

@tef
Created October 6, 2013 00:36
Show Gist options
  • Save tef/6847784 to your computer and use it in GitHub Desktop.
Save tef/6847784 to your computer and use it in GitHub Desktop.
1. pandoc -D latex > pandoc.template.jp.tex
2. following instructions from https://groups.google.com/d/msg/pandoc-discuss/R8T4j7SrJXk/EXNLBcm28z0J
go into the .tex file and change the XeTeX part so it reads:
\ifxetex
\usepackage{fontspec,xltxtra,xunicode,xeCJK}
\setCJKmainfont{Kochi Mincho}
\defaultfontfeatures{Mapping=tex-text,Scale=MatchLowercase}
\else
3. run pandoc but with --template
pandoc --template=pandoc.template.jp.tex -f markdown_github -t latex --latex-engine=xelatex hello.md -o hello.pdf
@tef
Copy link
Author

tef commented Oct 6, 2013

nb i used \setCJKmainfont{Hiragino Kaku Gothic Pro} on OSX

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment