Skip to content

Commit

Permalink
Allow setting Japanese fonts when using LuaLaTeX (#3873)
Browse files Browse the repository at this point in the history
...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`.
  • Loading branch information
wilx authored and jgm committed Aug 25, 2017
1 parent e6f767b commit c9be2de
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions data/templates/default.latex
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c9be2de

Please sign in to comment.