True WYSIWYG LaTeX System
Windows     Mac     Linux  

Typesetting China and Japan

This explanation is for BaKoMa TeX 11.53 and later.

Common Settings

Take into attention following settings:
  • To avoid overlapping hieroglyphs in source window check on the box:
    'Display hieroglyphs in a double-width cell to avoid overlapping'
    under tab 'Script/Font' of dialog opened by menu 'Options / Editing Settings' command.
  • Correct caret moving in Page Window is supported under Mac and Linux only beginning from 11.53
  • Use 'Document Input Encoding = UTF8' (TeX Running Parameters dialog).

CJK package.

This explanation is for BaKoMa TeX 11.53

Simplest use of CJK package looks as following:

\documentclass{memoir}

\usepackage{CJKutf8}

\begin{document}

China: \begin{CJK}{UTF8}{min}大家好歡迎所有來人\end{CJK}

English: Hello all welcome all coming all

\end{document}

CTEX package.

This explanation is for BaKoMa TeX 11.75

CTEX works under pdflatex, XeTeX, LuaTeX, but not under e-LaTeX.

However, BaKoMa TeX includes extended e-TeX engine, which support all functions required by CTEX.

So, CTEX can work under BaKoMa TeX, but redundant checks disallow it.

To allow it we can just immitate pdftex defining \pdfversion and \pdfrevision primitives. For example, like following:

\ifdefined\XeTeXversion\else\ifdefined\pdftexversion\else
\newcount\pdftexversion\pdftexversion=140
\def\pdftexrevision{18}
\fi\fi

One working example is:

\documentclass[12pt]{article}

% Immitate PDFTeX only for CTEX/expl3
\ifdefined\XeTeXversion\else\ifdefined\pdftexversion\else
\newcount\pdftexversion\pdftexversion=140
\def\pdftexrevision{18}
\fi\fi

\usepackage[UTF8]{ctex}
 
\begin{document}
 
Test of CTEX

Hello World (Google translate)

你好,世界

And about tea (Also google)

喝茶的人不会注意到恶劣的天气。

\songti Songti
你好,世界

\heiti heiti
你好,世界

\fangsong fangsong
你好,世界

\kaishu kaishu
你好,世界

\bigskip

LiShu (Simli) and YouYuan (simyou) are not installed in my windows.

I copy some side versions of them to local/fonts/truetype 

(with rebuild proper ls-R)

and have following result:

\lishu lishu
你好,世界

\youyuan youyuan
你好,世界

\end{document}

Also, you can use CTEX document classes like following:

%!
\ifdefined\XeTeXversion\else\ifdefined\pdftexversion\else
\newcount\pdftexversion\pdftexversion=140
\def\pdftexrevision{18}
\fi\fi

\documentclass[UTF8,a4paper,c5size,openany,twoside,sub4section,fancyhdr]{ctexbook}

\begin{document}

\section{仿真与实验结果} 

...

\end{document}

Take attention on:

  1. Special code before \documentclass
  2. UTF8 option in documentclass command