- 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
(orlualatex
) 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
orlualatex
? - 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
- How does one type Chinese in LaTeX? (from 2011)
- https://www.reddit.com/r/LaTeX/comments/2jyuqt/how_do_you_include_a_couple_chinese_characters_in/ (from 2015)
- https://ctan.org/pkg/cjk (from 2015)
- This user seems to be very active in the past: https://tex.stackexchange.com/users/2674/leo-liu, but There is now activity after mid of 2017.
- Pinyin to character (from 2018, mixing pinyin and Chinese characters, looks very cool)
- https://ctan.org/pkg/notocjksc: Famous noto fonts by Google and Adobe, see Multiple xeCJK fonts and LaTeX, CJK and Chinese gives missing font file cyberb65 for example.
- Typographical discussion about pinyin (in German): https://thetype.com/2017/08/11606/#pinyin-size
Update 1: Follow-up Question
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:
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.)
I have a feeling the
language=
settings shouldn't be needed, but at least with my version ofbabel
, they still are. In the future, I'd guess that this will work without explicitly specifying thelanguage
.XeLaTeX output
Notice the difference in how the Chinese full stop is rendered in simplified and traditional Chinese.