最近幾天改論文,因為information science 只提供latex模板,所以突擊學習了一下latex
latex的編輯軟件主要用到的是ctxt,安裝地址
鏈接:http://pan.baidu.com/s/1o8BNpHK 密碼:vv9y
一路點擊下一步就可以了
然后安裝插文獻的軟件jabref,安裝地址
鏈接:http://pan.baidu.com/s/1c2mzkWw 密碼:2q7p
打開Elsevier提供的latex模板文件elsarticle-template-num.tex就可以開始編輯了、
首先確認你要用的模板類型及版面大小,Elsevier一共提供了2種文件類型,一種是preprint就是默認提交給elsevier的格式,review是增加了行間距的格式,有3種版面大小設置,1p,3p和5p,通過\documentclass[preview,3p,12pt]{elsarticle}進行設置
接下來設置需要的參考文獻的格式類型,我們在文中用到的是[1-4]這種壓縮的格式,用的是數字,所以設置成
\biboptions{numbers,sort&compress}
接下來開始寫文章
整體來說,latex有點類似於html的語法,文章從\begin{document}開始,到\end{document}結束
我們按照提示填入\title{},\author[1]{chao shen},\author[2]{zhao wang},\address[1]{xi'an jiaotong university}
然后填入摘要,關鍵字等等\begin{abstract}…………\end{abstract},\begin{keyword}…………\end{keyword}
下面就開始寫正式章節了
一級標題應該用 \section{Introduction}這樣的形式
二級標題用\subsection{xxx}
三級標題用\subsubsection{xxx}
四級標題沒有定義,應該用\paragraph{(1)Detection Performance Comparison}
參考文獻
參考文獻直接用jabref插入,在jabref中選好文件之后,點擊右上角的推送到winedt,winedt的路徑要先選一下,在首選項,外部程序里面找到D:\program files\CTEX\WinEdt\WinEdt.exe,選擇之后確認。
建立bib文件,每一條搜索之后銅鼓google導出bib,復制粘貼就加入了一條記錄,記得要把庫文件保存到個tex文件同一個文件夾,然后在tex文件中指定參考文件\bibliographystyle{elsarticle-num},\bibliography{ref}
在推送之前,一定要先編譯純粹的latex,然后編譯bib,再編譯latex,再編譯bib之后才能推送,不然文獻會是?
編譯無法通過的時候可以加入\usepackage{epstopdf}
然后每次選中幾條,鼠標放到tex文件中需要插入的地方,直接點擊推送到winedt就行了
插入url時要用到如下包\usepackage{url}

插入圖片
我們要插入的方式是一行插入多張圖片,使用下述的程序段
使用前要先聲明用了如下包:\usepackage{subfigure}
%
\begin{figure}[t]
\noindent
\centering
\subfigure[]{
\includegraphics[width=.3\textwidth]{6-1.eps}
}
\subfigure[]{
\includegraphics[width=.3\textwidth]{6-2.eps}
}
\subfigure[]{
\includegraphics[width=.3\textwidth]{6-3.eps}
}
\caption{EER curves against different user sizes:(a) nearest neighbor (Mahalanobis), (b) One-class support vector machine, (c) Mahalanobis (normed).}
\label{Figure 6}
\end{figure}
%
放一張圖時用如下程序
\begin{figure}[t]
\centering
% Requires \usepackage{graphicx}
\includegraphics[width=0.5\textwidth]{2.eps}\\
\caption{EER curves at varying operating length using the three detectors. X-axis represents the number of touch operations to verify a user's identity}
\label{Figure 2}
\end{figure}
插入表格
latex繪制表格比較麻煩,因此我們用網站進行繪制:table generator
在網站上繪制好之后,我們使用compress whitespace然后點擊scale縮放到跟紙張一樣大
之后直接粘貼到我們的文件中就行了,要聲明用到如下包:
\usepackage{multirow}
\usepackage{booktabs,graphicx}
如果某條線要加粗,需要把hline替換為\Xhline{1.2pt}
插入的時候可以在\begin{table}后面加上選擇放置的位置,[t]代表top,[h]表示hear,[b]表示bottom
在表格中要加入空格的時候可以用這個命令\hspace*{75pt}
如果要改變表格與文字之間的距離,使用\setlength{\textfloatsep}{10pt plus 1.0pt minus 2.0pt}
其中后面這個\textfloatsep分類如下所示:
Change one or more of the following lengths:
\textfloatsep— distance between floats on the top or the bottom and the text;- \floatsep — distance between two floats;
- \intextsep — distance between floats inserted inside the page text (using h) and the text proper.
參考文獻
參考文獻的插入主要有兩種方式,
-
第一種是通過JabRef, 在google上下載bibtxt文件, 保存到jabref的庫中, 保存為bib文件,通過jabref菜單中的插入winedit進行插入, 在tex文件中寫入
\bibliographystyle{elsarticle-num} \bibliography{ref} -
第二種是直接將參考文獻放入tex文件中:
\bibliographystyle{named} \begin{thebibliography}{} \bibitem{Password1} Klein D V. Foiling the cracker: A survey of, and improvements to, password security[C]//Proceedings of the 2nd USENIX Security Workshop. 1990: 5-14.
