Mixing Chinese Characters with English (Main Language) in 2019 | What is the "State of the Art"?

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


With pdflatex:

\documentclass{article}
\usepackage{CJKutf8}

\newcommand{\chinese}[1]{\begin{CJK}{UTF8}{bsmi}#1\end{CJK}}

\begin{document}

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

\end{document}

enter image description here

With xelatex:

\documentclass{article}
\usepackage{xeCJK}

\setCJKmainfont{Songti SC} % use a font you have that covers Chinese

\begin{document}

This is an English text about apples
(Chinese simplified/traditional: 苹/蘋, 
Pinyin: píng guǒ)

\end{document}

enter image description here

Tags:

Fonts

Cjk

Chinese