一個LaTeX 中文文檔的簡單而實用的模板

網上找的一個latex中文模板,感受很簡單,在我機器上有點小問題,完善記錄一下。git

 

%要運行該模板,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",}

 

運行效果: 編輯器

相關文章
相關標籤/搜索