這幾天在開始寫論文,准備發的是elsevier,這個網站的instruction有問題,下載的東西基本上好多的錯誤,所以我就寫博客記錄。
首先看下:https://www.elsevier.com/authors/author-schemas/latex-instructions
這里需要我們先安裝Latex,我安裝的是Ctex
CTex的下載可以在網上搜索或使用我網盤,如果我網盤沒法使用請和我說:lindexi_gd@163.com
我們首先安裝Ctex,一路下一步,注意可以安裝到D盤,不一定需要C盤。
然后就是basic-miktex-2.9.6069-x64
這里你不一定安裝64位,下載可以到http://miktex.org/ 下載,也可以到我網盤下載,如果不能下載請和我說
安裝完CTeX如果使用報錯
CTeX 系統找不到指定的文件
大概的方法是打開Execution Modes在Options
然后修改Tex System的路徑這樣很簡單我們的CTex就好了
看到CTEX的MikTex不存在Bin,那么需要安裝miktex,這個安裝必須在C盤,默認位置,記住C盤
安裝完,我們可以安裝TeXStudio,這個軟件做的很好,看下界面
是不是感覺比WinEdt好,如果感覺好的話,那么就去下載,可以到官網www.texstudio.org如果上不了就在我這里下。
我們開始使用官方的模板,官方下載位置 https://www.elsevier.com/__data/assets/file/0007/56842/elsarticle-template.zip可以看到里面沒有ecrc.sty
在我們編譯的時候就出錯
File `ecrc.sty' not found.
可以去下載我的ecrc.sty
,下載放在最后,大家如果發現無法下載,就聯系我
這個在於我們打開的模板是ecrc-template.tex
,在官網有下載,https://www.elsevier.com/__data/assets/text_file/0007/56878/ecrc-template.tex
打開之后發現還需要Elsevier-logo-3p.pdf, SDlogo-3p.pdf, Elsevier-logo-5p.pdf and SDlogo-5p.pdf ,都可以在官網下載,下載后需要下載elsarticle.cls,同樣官方,https://www.elsevier.com/__data/assets/text_file/0005/56903/elsarticle.cls
把這些放在一個文件夾,這樣就好啦。
我在TeXStudio打開,發現沒有錯誤。
順便推薦一個軟件:Tickeys這個軟將可以讓我們打字有聲音,晚上打字用這個軟件感覺好。
開始寫的是\documentclass[3p,times]{elsarticle}
就是引用elsarticle,\documentclass[<options>]{elsarticle}
選項可以使用參見:https://www.elsevier.com/__data/assets/pdf_file/0009/56844/elsdoc2.pdf
我們開始就是題目,我們的題目是亂寫
首先題目\title{A paper csdn and Mircrosoft is laji \tnoteref{t1,t2}}
,其中\tnoteref
是引用腳注,一般寫的就是t1,t2標識,這個隨意。其中寫了t1,在題目后面就有一個星,在寫一個就出現一個逗號,后面加兩個星,規則是第n個就有n個星。
然后我們在外面寫\tnotetext[標識]{Content}
,也就是頁面下的內容,這里我寫的是垃圾微軟,可以看到Content可以很長,而我們還有t3沒寫,沒寫的沒顯示
\tnotetext[t1]{This document is a collaborative effort.}
\tnotetext[t2]{The second title footnote which is a longer
longer than the first one and with an intention to fill
in up more than one line while formatting.But it's to small,I write Mircosoft is laji.}
接着我們開始寫作者,假如我們兩個作者,第一個是lindexi_gd
第二個是Microsoft
我們需要知道在Latex的注釋是%%
作者的格式是
%% \author[label1,label2]{<author name>} %% \address[label1]{<address>}
%% \address[label2]{<address>}
每個label就是標簽,可以在地址寫,可以在別的地方寫作者的地址
Latex用\\
換行,在我們的地址比較長,可以用這換行
\author[lindexiAddress]{lindexi\_gd \corref{cor1} \fnref{fn1} }
\ead{lindexi\_gd@163.com}
%%作者的\corref{lable}就是在腳注,用的是*,第n個有n* %%\fnref{lable} 腳注,這個才是真的,但是沒顯示
%%\author[lindexiAddress]{lindexi\_gd \corref{cor1} \fnref{fn1} } %%地址寫在下面\address[lindexiAddress]{The lindexi's address } %%地址是a,b,c label不區分大小寫 \author[Address1,Address2]{Mircrosoft \corref{cor2} \fnref{fn2}} \ead{kaveh@river-valley.com} \cortext[cor1]{Corresponding author} \cortext[cor2]{Principal corresponding author} \fntext[fn1]{This is the specimen author footnote.} \fntext[fn2]{Another author footnote, but a little more longer.} \fntext[fn3]{Yet another author footnote. Indeed, you can have any number of author footnotes.} \address[lindexiAddress]{The lindexi's address }
\address[Address1]{River Valley Technologies, 9, Browns Court,
Kennford, Exeter, United Kingdom}
\address[Address2]{Central Application Management,
Elsevier, Radarweg 29, 1043 NX\\
Amsterdam, Netherlands}
復制我這個放到代碼就可看到
然后就是我們的摘要
\begin{abstract}
摘要寫在這
\end{abstract}
然后我們開始寫關鍵字
關鍵字寫在
\begin{keyword}
\end{keyword}
不同的關鍵字使用\sep
分開
\begin{keyword}
CSDN \sep lindexi \sep windows.sc
\end{keyword}
我們就在正文開始寫,遇到問題是如何插入圖片,插入算法,圖片位置不對,這寫我都找了連接
輸入列表
\begin{enumerate}[標號]
標號可以使用數字或字,其中可以加[]
,()
我們可以在列表嵌套
\begin{enumerate}[a)]
\item This item has roman numeral counter.
\item Another one before we close the third level.
\begin{enumerate}[a)]
\item This item has roman numeral counter.
\item Another one before we close the third level.
\end{enumerate}
\end{enumerate}
雙欄
需要雙欄,在\documentclass[3p,times]{elsarticle}
改5p
還有其他選項,這些我們現在不需要,直接改5p就好\documentclass[5p,times]{elsarticle}
引用
我們的論文會參見很多人的,那么添加一個人或刪會讓我們修改很多,Latex給我們簡單方法,我們可以使用這個來添加我們的參考
首先在頁面最下,\end{document}
上面寫參考,首先要刪除\bibliography{<your-bib-database>}
然后寫參考的
\begin{thebibliography}{00}
\bibitem[每次參考自動寫的內容,作者,如果遇到括號不寫]{label} 參見lindexi
\end{thebibliography}
在文章遇到我們需要參考
\citet{label}
這樣就好,如果我們沒寫作者看起來不好
如果沒寫作者,只要一個[1]那么在正文
\citep{label}
另一方式
\cite{label}
要寫一個上標我們應該用^
假如我們的一個引用
\begin{thebibliography}{00}
\bibitem{lindexi 1} lindexi_gd csdn.
\end{thebibliography}
在引用的寫$^{\cite{lindexi 1}}$
注意$$
就是使用公式
標題
我們需要一級標題,我們還需要二級,那么一級標題\section{標題名}
二級標題\subsection{標題名}
斜體
\emph{內容}
粗體
\textbf{}
排列
左對齊
\begin{flushleft}
\end{flushleft}
居中
\begin{center}
\end{center}
右對齊
\begin{flushright}
\end{flushright}
分數
\frac{上}{下}
根號
\sqrt{}
插入公式:https://www.kancloud.cn/thinkphp/latex/41806
http://mohu.org/info/symbols/symbols.htm
插入圖片
插入圖片的位置不對,我們可以使用[!htb]
來取消latex的美學,latex的美學很爛。
我們需要先引用 float
\usepackage{graphicx}
\usepackage{float}
在引用圖片寫上
\begin{figure}這里用取消美學[!htb]
\includegraphics{fig1.png}
\caption{Problem Description }
\label{fig1}
\end{figure}
圖片位置可以使用figure=
如果是esp,需要\epsfig
\begin{figure}[h]
\centerline
{
\epsfig
{
figure=images/fig,
height=9cm,
angle=-90
}
}
\caption{標題}
\label{Fig1}
\end{figure}
參見:http://blog.sciencenet.cn/blog-400681-886697.html
http://blog.csdn.net/bingfengxiao/article/details/6650096
多圖並排
使用\vfill換行,\hfill 並排
\begin{figure*}
\centering
\begin{minipage}{0.48\linewidth} 0.48大小
\centering 圖在中間
\includegraphics[width=5cm,height=5cm]{f1} 圖,如果使用eps需要轉換
\caption{圖1 }
\label{fig:1}
\end{minipage}
\hfill 並排
\begin{minipage}{0.5\linewidth}
\centering
\includegraphics[width=5cm,height=5cm]{f2}
\caption{圖2 }
\label{fig:2}
\end{minipage}
\end{figure*}
http://blog.csdn.net/lsg32/article/details/8121417
http://www.ctex.org/documents/latex/graphics/node109.html
使用eps
引用epsfig
\usepackage{graphicx}
\usepackage{epsfig}
打開cmd,進入圖片路徑, 使用epstopdf
epstopdf 圖.eps
就會生成圖.pdf
不需要寫后綴名
\includegraphics[width=7cm,height=7cm]{f1}
把生成的pdf也放進去,這樣生成就好
重新為圖片編號:http://www.52yfjc.com/2014/show.asp?id=887
Visio轉eps
在線wmf轉eps https://cloudconvert.com/wmf-to-eps
svg轉eps http://cn.office-converter.com/SVG-to-EPS
一個簡單方法是選擇要轉換的圖,新建一個visio,然后在頁面大小,設為適應,然后保存為pdf就好,一般不需要在轉
插入算法
http://blog.csdn.net/lqhbupt/article/details/8723478
\begin{algorithm}
\caption{}
\label{a}
\begin{algorithmic}
\STATE ) $ $
\end{algorithmic}
\end{algorithm}
頁開始
如果需要設置期刊的名
\journalname{期刊名}
下載:
basic-miktex-2.9.6069-x64
https://yunpan.cn/OcvKmfknLnEsnJ 訪問密碼 0943
CTeX
https://yunpan.cn/OcvKmJ8EINEN22 訪問密碼 7fa9
TeXStudio
https://yunpan.cn/OcvKmVsRytDq7Z 訪問密碼 5ef5
https://sourceforge.net/projects/texstudio/?source=typ_redirect
ecrc.sty
https://yunpan.cn/OcvKHgsSHJMaFc 訪問密碼 2cef
ecrc-template.tex
https://yunpan.cn/OcvKHKAiBNIZDi 訪問密碼 1100
參見:https://www.elsevier.com/authors/author-schemas/preparing-crc-journal-articles-with-latex
http://hubl82.blog.163.com/blog/static/1267694852013459412617/