0

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

The first text is supposed to look like this: enter image description here

The second text is supposed to look like this: enter image description here

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}

针对乔姆斯基式理论的不同应用通常被归入到生成语法(Generative Grammar)的名头下面。这一术语来源于这样的事实,乔姆斯基提出的短语结构语法和其扩充的理论框架可以生成合乎语法的表达式。正是这一组句子在形式上构成了一种语言,我们可以通过检查一个特定的句子是否是由给定的文法生成的句子集合中的一部分来判断该句子是否属于该语言。从这个意义来看,简单的短语结构语法与相应的形式化理论、GPSG、LFG、HPSG和构式语法(Construction
Grammar,CxG)都属于生成理论。近年来,以形式化为基础的理论不断涌现,如LFG、HPSG和CxG,前述的语法理论现在被称为模型论,而不是生成枚举理论。在1965年,乔姆斯基按照下面这种方式来界定生成语法(Generative Grammar):

\begin{quotation}\simkai
一种语言的语法应该是对理想的听者--说者的内在能力的描写。进而,如果这种语法能够完美地表示出来——换言之,如果它不依赖于读者的智力,而只是针对他的贡献给出一个明确的分析的话——我们就可以将之称为生成语法(generative
  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}

针对乔姆斯基式理论的不同应用通常被归入到生成语法(Generative Grammar)的名头下面。这一术语来源于这样的事实,乔姆斯基提出的短语结构语法和其扩充的理论框架可以生成合乎语法的表达式。正是这一组句子在形式上构成了一种语言,我们可以通过检查一个特定的句子是否是由给定的文法生成的句子集合中的一部分来判断该句子是否属于该语言。从这个意义来看,简单的短语结构语法与相应的形式化理论、GPSG、LFG、HPSG和构式语法(Construction
Grammar,CxG)都属于生成理论。近年来,以形式化为基础的理论不断涌现,如LFG、HPSG和CxG,前述的语法理论现在被称为模型论,而不是生成枚举理论。在1965年,乔姆斯基按照下面这种方式来界定生成语法(Generative Grammar):

\begin{quotation}\simkai
一种语言的语法应该是对理想的听者--说者的内在能力的描写。进而,如果这种语法能够完美地表示出来——换言之,如果它不依赖于读者的智力,而只是针对他的贡献给出一个明确的分析的话——我们就可以将之称为生成语法(generative
  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.

  • 1
    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
1

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.