最近幾天改論文,由於information science 只提供latex模板,因此突擊學習了一下latexhtml
latex的編輯軟件主要用到的是ctxt,安裝地址ide
連接:http://pan.baidu.com/s/1o8BNpHK 密碼:vv9y學習
一路點擊下一步就能夠了網站
而後安裝插文獻的軟件jabref,安裝地址ui
連接:http://pan.baidu.com/s/1c2mzkWw 密碼:2q7pgoogle
打開Elsevier提供的latex模板文件elsarticle-template-num.tex
就能夠開始編輯了、url
首先確認你要用的模板類型及版面大小,Elsevier一共提供了2種文件類型,一種是preprint就是默認提交給elsevier的格式,review是增長了行間距的格式,有3種版面大小設置,1p,3p和5p,經過\documentclass[preview,3p,12pt]{elsarticle}
進行設置spa
接下來設置須要的參考文獻的格式類型,咱們在文中用到的是[1-4]這種壓縮的格式,用的是數字,因此設置成rest
\biboptions{numbers,sort&compress}
接下來開始寫文章code
總體來講,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;參考文獻的插入主要有兩種方式,
第一種是經過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.