From c9be2de5c1d6856531c497a1a0f919b030a5cb95 Mon Sep 17 00:00:00 2001 From: Václav Haisman Date: Fri, 25 Aug 2017 20:20:56 +0200 Subject: 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`. --- data/templates/default.latex | 13 +++++++++++++ 1 file changed, 13 insertions(+) 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 -- cgit v1.2.3