LaTeX是一种基于TeX的排版系统,由美国计算机科学家Leslie Lamport开发。对于生成复杂表格和数学公式,这一点表现得尤其突出。所以它很是适用于生成高印刷质量的科技和数学类文档。html
使用LaTeX生成PDF文档通常有两种方式:分布式
eps #文件夹用于放论文中使用到的.eps文件 llncs.cls #论文模板 paper.bib #论文参考文献 paper.tex #论文的正文内容
\documentclass{llncs} \usepackage{graphicx} %import some packages needed \graphicspath{{eps/}} %set eps file path \renewcommand{\algorithmicrequire}{ \textbf{Input:}} \begin{document} \title{My document title} \titlerunning{xxx} \author{name1\inst{2} \and name2\inst{1\and 2} \and name3\inst{2} \and name3\inst{2}} \authorrunning{Amble et al.} \institute{place1 \email{xxx@xx}\\ \and place2 \email{b@mail}} \maketitle \begin{abstract} \keywords{word1,word2,word3} \end{abstract} \section{section1} \subsection{subsection1.1} \bibliographystyle{plain} \bibliography{paper} \end{document}
\begin{equation} a=b+c \end{equation}
图片使用如下的figure环境,须要导入的宏包:graphicx,而后使用\graphicspath{{eps/}}定义论文配图的位置工具
\begin{figure}[ht] \centering \includegraphics[width=8cm]{picture1.eps} \caption{The picture title} \end{figure}
要引入的包为multirow,简单的表格排版可使用以下demo
,其中(\\
表示换行,\hline
表示横线)。布局
\begin{table}[!hbp] \caption{example of table} \begin{tabular}{|c|c|c|c|c|} \hline \hline lable 1-1 & label 1-2 & label 1-3 & label 1 -4 & label 1-5 \\ \hline label 2-1 & label 2-2 & label 3-3 & label 4-4 & label 5-5 \\ \hline \end{tabular} \end{table}
复杂的多列合并参考以下代码参考百科。以下:性能
\begin{table}[!hbp] \caption{example of table} \begin{tabular}{|c|c|c|c|c|} \hline \mutirow{2}{*}{multi-row} & \muticolumn{2}{|c|}{Muti-Column} & multicolumn{2}{|c|}{\multirow{2}{*}{Muti-Row and Muti-Column}}\\ \cline{2-3} & column-1 & \multicolumn{2}{|c|}{}\\ \hline \end{tabular} \end{table}
导入的宏包为enumerate,正文中使用以下代码完成,另外可使用中括号设定标号的格式,例如[(1)]ui
\begin{enumerate}[(1)] \item this is sentence 1. \item this is sentence 2. \end{enumerate}
\begin{itemize} \item this is sentence 1. \item this is sentence 2. \end{itemize}
在被引用的地方作以下标记:this
\label{lab1}
在引用的地方使用:spa
\ref{lab1}
导入包:algorithm、algorithmicx和algpseudocode调试
\renewcommand{\algorithmicrequire}{ \textbf{Input:}} \renewcommand{\algorithmicensure}{ \textbf{Output:}}
\begin{algorithm} \caption{algoritm name} \begin{algorithmic}[1] \Require input parameters \Ensure output parameters \Function {algorithm name}{input parameters} \State $V \gets 0$ \For{$i \gets 1\quad to\quad len(GramArray)$} \State $element \gets GramArray[i]$ \If{$GramInfo.exist(element)$} \State $GramInfo[element].count++$ \Else \State $GramInfo.Add(<element,i,1>)$ \EndIf \EndFor \While{$GramInfo.isNotEmpty()$} \State $cell \gets GramInfo.popElement()$ \State $index \gets GramMap(cell.gram)$ \State $V[index] \gets <cell.pos,cell.count>$ \EndWhile \State \Return{$V$} \EndFunction \end{algorithmic} \end{algorithm}
在整个\.tex
结束的位置,也就是\end{document}
以前加入以下代码:code
\bibliographystyle{plain} \bibliography{paper}
并单首创建一个.bib
文件,该文件中存放参考文献的资料,具体存放的参考文献格式能够利用:
很是方便的获取。在文章中引用的地方只须要使用以下格式引用便可,这里须要注意的地方是:须要LaTeX -> bibtex -> LaTeX -> dvi2pdf
\cite{name}
\documentclass[12pt]{article} \usepackage{CJK} \begin{document} \begin{CJK*}{GBK}{song} \title{大规模分布式系统环境下的性能监测与跟踪调试工具的\\研究成果综述} \author{傅海平\footnote{电子邮件: haipingf@gmail.com,学号: 201128013229018}\\ 中国科学院计算技术研究所\\} \date{2012年5月} \maketitle \newpage latex中文排版 \end{CJK*} \end{document}
才疏学浅,若有不足之处还请多多指教,感激涕零~