不得不說,使用Latex編寫文檔效率會提升很多。但是,如果沒有好的模板,自己從零開始動手完成一份Latex文檔還是得花費不少時間和精力的,所以,為了提高文檔和技術報告的編寫效率,我為自己准備了以下的Latex模板,並附圖如下(注意,在Texlive中需要自己安裝黑體(hei)和楷體(kai)等中文字體,具體安裝方法我會在下一篇博客中介紹。
\documentclass[a4paper, 11pt]{article} %%%%%% 導入包 %%%%%% \usepackage{CJKutf8} \usepackage{graphicx} \usepackage[unicode]{hyperref} \usepackage{xcolor} \usepackage{cite} \usepackage{indentfirst} %%%%%% 設置字號 %%%%%% \newcommand{\chuhao}{\fontsize{42pt}{\baselineskip}\selectfont} \newcommand{\xiaochuhao}{\fontsize{36pt}{\baselineskip}\selectfont} \newcommand{\yihao}{\fontsize{28pt}{\baselineskip}\selectfont} \newcommand{\erhao}{\fontsize{21pt}{\baselineskip}\selectfont} \newcommand{\xiaoerhao}{\fontsize{18pt}{\baselineskip}\selectfont} \newcommand{\sanhao}{\fontsize{15.75pt}{\baselineskip}\selectfont} \newcommand{\sihao}{\fontsize{14pt}{\baselineskip}\selectfont} \newcommand{\xiaosihao}{\fontsize{12pt}{\baselineskip}\selectfont} \newcommand{\wuhao}{\fontsize{10.5pt}{\baselineskip}\selectfont} \newcommand{\xiaowuhao}{\fontsize{9pt}{\baselineskip}\selectfont} \newcommand{\liuhao}{\fontsize{7.875pt}{\baselineskip}\selectfont} \newcommand{\qihao}{\fontsize{5.25pt}{\baselineskip}\selectfont} %%%% 設置 section 屬性 %%%% \makeatletter \renewcommand\section{\@startsection{section}{1}{\z@}% {-1.5ex \@plus -.5ex \@minus -.2ex}% {.5ex \@plus .1ex}% {\normalfont\sihao\CJKfamily{hei}}} \makeatother %%%% 設置 subsection 屬性 %%%% \makeatletter \renewcommand\subsection{\@startsection{subsection}{1}{\z@}% {-1.25ex \@plus -.5ex \@minus -.2ex}% {.4ex \@plus .1ex}% {\normalfont\xiaosihao\CJKfamily{hei}}} \makeatother %%%% 設置 subsubsection 屬性 %%%% \makeatletter \renewcommand\subsubsection{\@startsection{subsubsection}{1}{\z@}% {-1ex \@plus -.5ex \@minus -.2ex}% {.3ex \@plus .1ex}% {\normalfont\xiaosihao\CJKfamily{hei}}} \makeatother %%%% 段落首行縮進兩個字 %%%% \makeatletter \let\@afterindentfalse\@afterindenttrue \@afterindenttrue \makeatother \setlength{\parindent}{2em} %中文縮進兩個漢字位 %%%% 下面的命令重定義頁面邊距,使其符合中文刊物習慣 %%%% \addtolength{\topmargin}{-54pt} \setlength{\oddsidemargin}{0.63cm} % 3.17cm - 1 inch \setlength{\evensidemargin}{\oddsidemargin} \setlength{\textwidth}{14.66cm} \setlength{\textheight}{24.00cm} % 24.62 %%%% 下面的命令設置行間距與段落間距 %%%% \linespread{1.4} % \setlength{\parskip}{1ex} \setlength{\parskip}{0.5\baselineskip} %%%% 正文開始 %%%% \begin{document} \begin{CJK}{UTF8}{gbsn} %%%% 定理類環境的定義 %%%% \newtheorem{example}{例} % 整體編號 \newtheorem{algorithm}{算法} \newtheorem{theorem}{定理}[section] % 按 section 編號 \newtheorem{definition}{定義} \newtheorem{axiom}{公理} \newtheorem{property}{性質} \newtheorem{proposition}{命題} \newtheorem{lemma}{引理} \newtheorem{corollary}{推論} \newtheorem{remark}{注解} \newtheorem{condition}{條件} \newtheorem{conclusion}{結論} \newtheorem{assumption}{假設} %%%% 重定義 %%%% \renewcommand{\contentsname}{目錄} % 將Contents改為目錄 \renewcommand{\abstractname}{摘要} % 將Abstract改為摘要 \renewcommand{\refname}{參考文獻} % 將References改為參考文獻 \renewcommand{\indexname}{索引} \renewcommand{\figurename}{圖} \renewcommand{\tablename}{表} \renewcommand{\appendixname}{附錄} \renewcommand{\algorithm}{算法} %%%% 定義標題格式,包括title,author,affiliation,email等 %%%% \title{大規模分布式系統環境下的性能監測與跟蹤調試工具的\\研究成果綜述} \author{傅海平\footnote{電子郵件: haipingf@gmail.com,學號: 201128013229018}\\[2ex] \xiaosihao 中國科學院計算技術研究所\\[2ex] } \date{2012年5月} %%%% 以下部分是正文 %%%% \maketitle \tableofcontents \newpage 在此輸入正文,中英文均可。 \end{CJK} \end{document}


希望對經常使用Latex編輯的同鞋有用:-)
