aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVáclav Haisman <vhaisman@gmail.com>2017-08-25 20:20:56 +0200
committerJohn MacFarlane <jgm@berkeley.edu>2017-08-25 11:20:56 -0700
commitc9be2de5c1d6856531c497a1a0f919b030a5cb95 (patch)
tree4272e4f17eb7c9a7588b75b8c19427cd8b5c4862
parente6f767b581742343bd7319bcc4c3632e18c58a70 (diff)
downloadpandoc-c9be2de5c1d6856531c497a1a0f919b030a5cb95.tar.gz
Allow setting Japanese fonts when using LuaLaTeX (#3873)
...by using the `luatexja-fontspec` and `luatexja-preset` packages. Use existing `CJKmainfont` and `CJKoptions` template variables. Add `luatexjafontspecoptions` for `luatexja-fontspec` and `luatexjapresetoptions` for `luatexja-preset`.
-rw-r--r--data/templates/default.latex13
1 files changed, 13 insertions, 0 deletions
diff --git a/data/templates/default.latex b/data/templates/default.latex
index d86e62573..357549d98 100644
--- a/data/templates/default.latex
+++ b/data/templates/default.latex
@@ -64,8 +64,21 @@ $else$
$endif$
$endif$
$if(CJKmainfont)$
+ \ifxetex
\usepackage{xeCJK}
\setCJKmainfont[$for(CJKoptions)$$CJKoptions$$sep$,$endfor$]{$CJKmainfont$}
+ \fi
+$endif$
+$if(luatexjapresetoptions)$
+ \ifluatex
+ \usepackage[$for(luatexjapresetoptions)$$luatexjapresetoptions$$sep$,$endfor$]{luatexja-preset}
+ \fi
+$endif$
+$if(CJKmainfont)$
+ \ifluatex
+ \usepackage[$for(luatexjafontspecoptions)$$luatexjafontspecoptions$$sep$,$endfor$]{luatexja-fontspec}
+ \setmainjfont[$for(CJKoptions)$$CJKoptions$$sep$,$endfor$]{$CJKmainfont$}
+ \fi
$endif$
\fi
% use upquote if available, for straight quotes in verbatim environments