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}
才疏學淺,若有不足之處還請多多指教,感激涕零~