1

I need to load the fontspec package with the no-math option while also loading the xeCJK package to include a few Japanese names in a large English document. Since thexeCJK package already loads the fontspect package without any options, I am running into problems. More precisely, the code

\documentclass{scrbook}

\usepackage{xeCJK}
\usepackage[no-math]{fontspec}

\begin{document}
\begin{CJK}
  角谷静夫
\end{CJK}
\end{document}

results in an option clash for the fontspec package whereas the code

\documentclass{scrbook}

\usepackage[no-math]{fontspec}
\usepackage{xeCJK}

\begin{document}
\begin{CJK}
  角谷静夫
\end{CJK}
\end{document}

results in the following error:

 LaTeX Error: Environment CJK undefined.

Is there a way around this? I would also be happy with a solution to include snippets of Japanese using other packages than xeCJK.

2 Answers 2

1

The fontspec should be loaded before xeCJK if no-math. And the CJK environment is not provided by xeCJK and thus should be omitted.

A minimal example:

\documentclass{scrbook}
\usepackage[no-math]{fontspec}
\usepackage{xeCJK}
\setCJKmainfont{Hiragino Mincho ProN}
\begin{document}
角谷 静夫
\end{document}
1
  • Does the above document have English as main language?
    – Christian
    Oct 23, 2018 at 15:32
0

A rather primitive workaround is to just load a suitable Japanese font using fontspec. Of course this way the additional typesetting capabilities of the xeCJK package cannot be used. The resulting code would be as follows:

\documentclass{scrbook}

\usepackage[no-math]{fontspec}
\newfontfamily\cjkfont{HanaMinA}

\begin{document}
{\cjkfont 角谷 静夫}
\end{document}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .