[Tex/LaTex] Mixing Chinese Characters with English (Main Language) in 2019 | What is the “State of the Art”

chinesecjkfonts

  • I have a English document (in UTF8) and want to place in some placed Chinese translations (single words: symbols and pinyin, which is the Latin character version).
  • Ideally, I want to use pdflatex (or lualatex) if that is possible.
  • What is the start of the art / best practice for including (little) Chinese text bits in a mainly English document using pdflatex or lualatex?
  • I am looking for a robust solution that may be feasible for some years.
  • I am also open if you recommend not to do that if this a not well supported use case for LaTeX.

This is a made-up MWE 🙂 (I just Googled the translations).

\documentclass{article}

\begin{document}

This is an English text about apples 
(Chinese simplified/traditional: 
\SimplifiedChineseCharacter{苹} / \TraditionalChineseCharacter{蘋} 
(Pinyin: \Pinying{píng guǒ}))

\end{document}

The question may be to broad or even stupid – this is mainly due to my inexperience in this area. I am looking for some advice and some MWEs to start with.


Related


Update 1: Follow-up Question

babel: Language "pinyin"


Update 2: fontspec vs. babelfont

I have noticed that David did not use fontspec in his answer – I am not an expert in fonts but I usually see fontspec when using luatex. I found the explanation in the babel manual:

enter image description here

Best Answer

Here's a babel implementation showing English (australian) as main language, simplified and traditional Chinese, and Pinyin.

It will compile with XeLaTeX and LuaLaTeX. Though be aware that the Chinese fonts are huge and it takes the LuaTeX font loader a long time and a lot of RAM to build the cache. So long, that I can't actually compile this on my computer with LuaLaTeX. (I have a 5 year old MacBook Air with 4GB RAM running Linux. My machine just runs out of resources and kills the process.)

\documentclass{article}
\usepackage[pinyin,australian]{babel}

\babelprovide[main,import,language=Default]{australian}
\babelprovide[import,language=Chinese Simplified]{chinese-simplified}
\babelprovide[import,language=Chinese Traditional]{chinese-traditional}

\babelfont{rm}{Noto Serif}
\babelfont{sf}{Noto Sans}
\babelfont[chinese-simplified]{rm}{Noto Serif CJK SC}
\babelfont[chinese-simplified]{sf}{Noto Sans CJK SC}
\babelfont[chinese-traditional]{rm}{Noto Serif CJK TC}
\babelfont[chinese-traditional]{sf}{Noto Sans CJK TC}

\begin{document}

\section{Roman Family}

Australian English.    

\foreignlanguage{chinese-simplified}{汉语。}
\foreignlanguage{chinese-traditional}{漢語。}
\foreignlanguage{pinyin}{Pīnyīn.}
\renewcommand*{\familydefault}{\sfdefault}
\sffamily

\section{Sans Serif Family}

Australian English.

\foreignlanguage{chinese-simplified}{汉语。}
\foreignlanguage{chinese-traditional}{漢語。}
\foreignlanguage{pinyin}{Pīnyīn.}

\end{document}

I have a feeling the language= settings shouldn't be needed, but at least with my version of babel, they still are. In the future, I'd guess that this will work without explicitly specifying the language.

XeLaTeX output

Notice the difference in how the Chinese full stop is rendered in simplified and traditional Chinese.

MWE ouptput

Related Question