Ubuntu下安装Latex:sudo apt-get install latex-cjk-all
输入如下代码到Test.tex:
/documentclass[12pt]{article}
/usepackage{CJK}
/begin{document}
/begin{CJK}{UTF8}{gbsn}
/title{/LaTeX}
/author{齐保元}
/date{2010-12-01}
/maketitle
正文开始/LaTeX{} is a document preparation system for the /TeX{} typesetting program. It offers programmable desktop publishing features and extensive facilities for automating most aspects of typesetting and desktop publishing, including numbering and cross-referencing, tables and figures, page layout, bibliographies, and much more. /LaTeX{} was originally written in 1984 by Leslie Lamport and has become the dominant method for using /TeX; few people write in plain /TeX{} anymore. The current version is /LaTeXe. document preparation system for the /TeX{} typesetting program. It offers programmable desktop publishing featuresdocument preparation system for the /TeX{} typesetting program. It offers programmable desktop publishing featuresdocument preparation system for the /TeX{} typesetting program.
% This is a comment, it is not shown in the final output.
% The following shows a little of the typesetting power of LaTeX
/begin{eqnarray}
E &=& mc^2 // m &=& /frac{m_0}{/sqrt{1-/frac{v^2}{c^2}}}
/end{eqnarray}
/end{CJK}
/end{document}
编译:latex Test.tex
生成pdf: dvipdf Test