网上找的一个latex中文模板,感觉很简单,在我机器上有点小问题,完善记录一下。
%要运行该模板,LaTex需要安装CJK库以支持汉字. %字体大小为12像素,文档类型为article %如果你要写论文,就用report代替article %所有LaTex文档开头必须使用这句话 \documentclass[12pt]{article} %使用支持汉字的CJK包 \usepackage{CJK} %开始CJK环境,只有在这句话之后,你才能使用汉字 %另外,如果在Linux下,请将文件的编码格式设置成GBK %否则会显示乱码 \begin{CJK*}{GBK}{song} %这是文章的标题 \title{模板} %这是文章的作者 \author{Kevin} %这是文章的时间 %如果没有这行将显示当前时间 %如果不想显示时间则使用 \date{} \date{2008/10/12} %以上部分叫做"导言区",下面才开始写正文 \begin{document} %先插入标题 \maketitle %再插入目录 \tableofcontents \section{LaTex 简介} LaTex是一个宏包,目的是使作者能够利用一个 预先定义好的专业页面设置, 从而得以高质量的排版和打印他们的作品. %第二段使用黑体,上面的一个空行表示另起一段 \CJKfamily{hei}LaTex 将空格和制表符视为相同的距离. 多个连续的空白字符 等同为一个空白字符 \section{LaTex源文件} %在第二段我们使用隶书(隶书是有问题的,改为仿宋) \CJKfamily{fs}LaTex 源文件格式为普通的ASCII文件, 你可以使用任何文本编辑器来创建. LaTex源文件不仅包括你要排版的文本, 还包括LaTex 所能识别的,如何排版这些文本的命令. \cite{MartinDSP00} \section{结论} %在结论部分我们使用仿宋体 \cite{Xie.1995} \CJKfamily{fs}LaTeX, 我看行! \addcontentsline{toc}{chapter}{\protect\numberline{}{参考文献}} %\bibliographystyle{ieeetr} %\bibliography{enhance-ref} %把Latex中的 Reference 写成中文的"参考文献" %%如果文档类是article之类的, 用\renewcommand\refname{参考文献} %%如果文档类是book之类的, 用\renewcommand\bibname{参考文献} \renewcommand\refname{参考文献} \bibliographystyle{plain}%设置参考文献的类型 (bibliography style). 标准的为 plain \bibliography{enhance-ref}%告诉LaTeX生成参考文献列表 enhance-ref.bib 是同目录下的参考文献管理文件 \end{CJK*} \end{document}
enhance-ref.bib文件
@article{MartinDSP00, author = "A. Martin and M. Przybocki", title = "The {NIST} 1999 speaker recognition evaluation --- an overview", journal = "Digital Signal Processing", volume = "10", pages = "1--18", year = "2000",} @inproceedings{bardet-2004-complexity(Grobner), title={On the complexity of Gr$\ddot{o}$bner basis computation of semi-regular overdetermined algebraic equations}, author={Bardet, Magali and Faugere, Jean-Charles and Salvy, Bruno}, booktitle={Proceedings of the International Conference on Polynomial System Solving}, pages={71--74}, year={2004} } @misc{Xie.1995, note = "谢锦辉,《隐 {Markov} 模型及其在语音处理中的应用》,华中理工大学出 版社,1995年4月", key = "Xie",}
运行效果: