# using a different Chinese font in quotations with Koma Script

I try to use SimSun in a Chinese document but SimKai for quotations.

The first text is supposed to look like this:

The second text is supposed to look like this:

This is the code I have:

\documentclass{scrbook}

\usepackage{xeCJK}
%\setCJKmainfont{SimSun}

\setCJKmainfont{KaiTi}

\newfontfamily\simkai{KaiTi}[Mapping=tex-text,Ligatures=Common,Scale=MatchUppercase]

\begin{document}

Grammar，CxG）都属于生成理论。近年来，以形式化为基础的理论不断涌现，如LFG、HPSG和CxG，前述的语法理论现在被称为模型论，而不是生成枚举理论。在1965年，乔姆斯基按照下面这种方式来界定生成语法（Generative Grammar）：

\begin{quotation}\simkai

grammar）。(Chomsky, 1965: 4)
\end{quotation}

\end{document}


Using the setCJKmainfont works for both fonts, but setting the second font in the quotation does not work. It does have some effect as can be seen be looking at the latin characters but it does not change the Chinese characters. Help with this and changing the font for quotations in general would be great.

I tried \setkomafont{quotation}{\simkai}but this does not work.

Edit:

Selecting the font works with the hint from the comment:

\documentclass{scrbook}

\usepackage{xeCJK}
\setCJKmainfont{SimSun}

\newCJKfontfamily[simkai]\simkai{KaiTi}[Mapping=tex-text,Ligatures=Common,Scale=MatchUppercase]

%\setkomafont{quotation}{\simkai}

\begin{document}

Grammar，CxG）都属于生成理论。近年来，以形式化为基础的理论不断涌现，如LFG、HPSG和CxG，前述的语法理论现在被称为模型论，而不是生成枚举理论。在1965年，乔姆斯基按照下面这种方式来界定生成语法（Generative Grammar）：

\begin{quotation}\simkai

grammar）。(Chomsky, 1965: 4)
\end{quotation}

\end{document}


But rather than calling the font within the quotation environment, I would like to make the different font part of the definition of the quotation environment.

• Have you tried \usepackage{xeCJK} \setCJKmainfont{SimSun} \newCJKfontfamily[simkai]\simkai{KaiTi}[Mapping=tex-text,Ligatures=Common,Scale=MatchUppercase]? This is just me guessing from pp. 6-7 of the xeCJK documentation. – moewe Apr 16 '18 at 11:54
• Thanks! This solved the font problem. The problem is: I do not speak Chinese and I cannot read the manual ... – Stefan Müller Apr 16 '18 at 13:51
• Ah that is an obstacle you'd have to overcome to read the docs properly, I guess. I don't speak Chinese either, I just looked for a command with a sensible name that was close to \setCJKmainfont in the documentation. – moewe Apr 16 '18 at 13:56
• You guys are so funny. Solving problems without reading the Chinese part of the manual. I love it! – thymaro Apr 17 '18 at 5:37

I can't read Chinese, so I can't be sure that this is the most elegant or correct way to do this, but \newCJKfontfamily seems to be worth a shot

As far as I can see the font of quotation is not among the elements you can change with \setkomafont. You'll have to patch quotation directly as shown in Change the font of the block quote?.

\documentclass{scrbook}

\usepackage{xeCJK}
\setCJKmainfont{SimSun}
\newCJKfontfamily[simkai]\simkai{KaiTi}[Mapping=tex-text,Ligatures=Common,Scale=MatchUppercase]

\usepackage{etoolbox}
\AtBeginEnvironment{quotation}{\simkai}

\begin{document}

\begin{quotation}

\end{quotation}
\end{document}

• Ah, thank you! I forgot about those hooks. Cool! – Stefan Müller Apr 16 '18 at 15:08