Write Chinese in LaTeX and LyX in Leopard
成功的可以在LaTeX还要LyX里写中文了。以前已经有很多这类教程了,但是我找了一下发现没有一个有用,后来觉得还是看说明书吧。就像学软件编程一样,不用老是捧着课本,多看看程序里的HELP,或者就看官方软件里的manual,结果被我试出来了。
以前已经有很多这类教程了,但是我找了一下发现没有一个有用,后来觉得还是看说明书吧,结果就被我试出来了。就像学软件编程一样,不用老是捧着课本,多看看程序里的HELP,或者就看官方软件里的manual。
Summary
我的系统是
MAC OSX 10.5.7
TeX Live Utility version 0.70
LyX version 1.6.3
Step 1
我首先看我的CJK Language Support安装好了没,这个可以去Tex Live Utility里查cjk

As you can see the cjk and collection-langcjk are installed. I find the show info is handy, it tells me that the collection-langcjk contains the Chinese fonts, macros.

Step 2
[cc lang="latex" line_numbers="true"]
\documentclass[11pt]{article}
\usepackage{CJK}
\usepackage{CJKspace}
\begin{document}
\parindent 2em
\begin{CJK*}{UTF8}{gbsn}
比如这里中文打中文
\end{CJK*}
\end{document}
[/cc]

CJK Settings for LyX
We can first create a new file, and we will need to choose Document -> Settings to configure

We will need go to Fonts and set CJK to gbsn as follows

我的language是这么选的

In the LaTeX Preamble we will need to enter the following information:

\usepackage{CJK}
\usepackage{CJKspace}
\parindent 2em
我发现用CJKspace是比较好,那样用中英混合排版效果不错。
Keywords: 中文,LyX, LaTeX, Typesetting, CJK, Big 5 encoded Chinese characters
Other reference/links:
How to make LaTeX (teTeX) handle unicode and CJK in MacOSX
我觉得官方文档还是比较有用的,比如说
CTAN home / tex-archive/ language/ chinese
那里我进入CJK下载了cjk-4.8.2-doc.tar.gz 和 cjk-4.8.2.tar.gz。
如果有问题欢迎在这里问。

