Traditional and Simplified Chinese in LaTeX
Posted in Uncategorized on April 4th, 2009 by goodmami – Be the first to commentI’ve been in the habit of using LaTeX’s CJK environment across a whole document to allow me to insert, for example, Japanese anywhere I like. However, if you want to have more than one language (not covered by the same font) in the same document (such as both traditional and simplified Chinese, Japanese and Korean, etc), prepare for trouble. You cannot have one CJK environment for the whole document unless you get a font that can handle all the code points (like this elusive, half-free Cyberbit font that seems to be a pain to install).
I found, however, that there is another (and perhaps the intended) way to do it! You can create a command for each individual CJK environment you will need, and use them as needed. For example:
\newcommand{\zht}[1]{\begin{CJK}{UTF8}{bsmi}#1\end{CJK}}
\newcommand{\zhs}[1]{\begin{CJK}{UTF8}{gbsn}#1\end{CJK}}
\newcommand{\zh}[4]{\zht{#1}/\zhs{#2} (\emph{#3}) “#4”}
The \zht command is for traditional chinese characters, the \zhs is for simplified, and the \zh uses both (eg to define a word using both variants in hanzi, a transliteration, and a gloss). For example,
\zh{藝術}{艺术}{\yi4 \shu4}{art}
will produce
藝術/艺术 (yì shù) “art”
This works great, except that you have to use one of these tags every time you want to switch to a different character set.
NB: When using this method the very first line is not displayed. I got around this by having a dummy line near the top of the document. For example:
\zht{} % Dummy environment to get around display bug.
\zht{藝術} % Now this will be displayed.
