1. 下载安装
1.下载texlive的镜像文件
2.下载安装编辑软件texstudio
网上教程很多,不再赘述。
2.编辑
以Elsevier提供的latex模板文件为例
双击打开cas-dc-sample.tex文件,开始编辑。这里的cas-dc-sample.tex是双列模板,cas-sc-sample.tex是单列的模板。cas-refs.bib放参考文献的地方。.bst文件是参考文献的格式,有些期刊有自己的要求,根据要求替换,下面是几种常用的:
elsarticle-num-names
排序方式:这种样式会按照文章中引用的先后顺序对参考文献进行排序。
作者姓名:所有作者的姓氏全拼和名字缩写都会被列出,不进行截断,即便是超过三位作者的情况下。
elsarticle-num:
排序方式:与 elsarticle-num-names 相同,也是按照引用的先后顺序排序。
作者姓名:与 elsarticle-num-names 不同的是,当作者人数超过三位时,只列出前三位作者,之后用 “et al.” 表示其余作者。
elsarticle-harv:
排序方式:按照作者的姓名首字母顺序进行排序,而不是引用顺序。
作者姓名:同样采用姓氏全拼和名字缩写的形式,但具体展示形式可能根据 Elsevier 的哈佛引用风格有所不同,通常会列出所有作者直到某个限制(通常是三位),之后用 “et al.”。
cas-model2-names:
这个样式似乎是为中国科学院(Chinese Academy of Sciences, CAS)定制的,用于遵循其特定的引用规范,尤其是在科学与技术领域的出版物中。
采用 cas-model2-names 风格会影响到参考文献的布局、作者姓名的显示方式(比如,可能是姓前名后,且只列出部分作者后跟随 “等” 或 “et al.”)、期刊名称的缩写或全称、以及出版年份和卷期号的格式等。它确保了所有引用符合中国科学院指定的引用格式标准。
3.参考文献模板的设置及引用
\bibliographystyle{elsarticle-num-names} #模板设置
\bibliography{cas-refs} #参考文献的位置
\cite{Fortunato2010}
\cite{Fortunato2010,NewmanGirvan2004} #文中引用,Fortunato2010,NewmanGirvan2004是引用的名字
cas-refs.bib
中的形式为:
3.1在参考文献中加入doi且嵌入超链接
只需在bib中加入如下代码即可:note={doi:{\color{blue} \href{https://doi.org/10.1016/j.bspc.2017.07.007}{10.1016/j.bspc.2017.07.007}}}
如下图所示:
4.开始编辑文章
整体来说,latex有点类似于html的语法,文章从\begin{document}开始,到\end{document}结束
题目为:\title{题目}
,作者出为:\author[1]{san zhang},\author[2]{si li},\address[1]{Ningxia university}
摘要:\begin{abstract} 内容 \end{abstract}
关键字:\begin{keyword} 关键字1 \sep 关键字2 \end{keyword} 其中\sep为换行
4.1正文
一级标题应该用 \section{Introduction}
二级标题用\subsection{xxx}
三级标题用\subsubsection{xxx}
4.2插入图片
\usepackage{graphicx} % 必需,用于插入图片
\usepackage{subcaption} % 用于子图环境
插入两行图片,每一行包含四张子图:
\begin{figure}[htbp]
\centering
% 第一行的四张图片
\begin{subfigure}[b]{0.24\textwidth}
\includegraphics[width=\textwidth]{images/1.1.1.png}
\caption*{} %表示无编号,不加*表示子图有编号,如下图所示
\label{fig:sub1}
\end{subfigure}
\hfill
\begin{subfigure}[b]{0.24\textwidth}
\includegraphics[width=\textwidth]{images/1.1.2.png}
\caption{}
\label{fig:sub2}
\end{subfigure}
\hfill
\begin{subfigure}[b]{0.24\textwidth}
\includegraphics[width=\textwidth]{images/1.1.3.png}
\caption{}
\label{fig:sub3}
\end{subfigure}
\hfill
\begin{subfigure}[b]{0.24\textwidth}
\includegraphics[width=\textwidth]{images/1.1.4.png}
\caption{}
\label{fig:sub4}
\end{subfigure}
% 第二行的四张图片
\vspace{1em} % 添加一些垂直间距
\begin{subfigure}[b]{0.24\textwidth}
\includegraphics[width=\textwidth]{images/1.2.1.png}
\caption{}
\label{fig:sub5}
\end{subfigure}
\hfill
\begin{subfigure}[b]{0.24\textwidth}
\includegraphics[width=\textwidth]{images/1.2.2.png}
\caption{}
\label{fig:sub6}
\end{subfigure}
\hfill
\begin{subfigure}[b]{0.24\textwidth}
\includegraphics[width=\textwidth]{images/1.2.3.png}
\caption{}
\label{fig:sub7}
\end{subfigure}
\hfill
\begin{subfigure}[b]{0.24\textwidth}
\includegraphics[width=\textwidth]{images/1.2.4.png}
\caption{}
\label{fig:sub8}
\end{subfigure}
\caption{这里是图片的整体说明。}
\label{fig:allimages}
\end{figure}
插入单张图片:
\begin{figure*}%在分两列的文章中,\begin{figure*}表示强制该图片占两列,\begin{figure}表示图片占单列
\centering
\includegraphics[width=.9\textwidth]{images/2.png}
\caption{描述}
\label{FIG:2}
\end{figure*}
引用图片:
基本引用:\ref{fig:标签名}
会输出该标签关联的自动编号(如果有编号的话)。
增强引用:\autoref{fig:标签名}
不仅输出编号,还会根据引用的对象类型(如图、表等)自动添加前缀,例如 “图”。
4.3插入表格
\begin{table}[width=.9\linewidth,cols=4,pos=h] %cols=?列数;占文章两列的时候不用\linewidth用\textwidth
\caption{This is a test caption. Use \{table*\} instead of \{table\} if you
want a two column spanned table.}\label{tbl1}
\begin{tabular*}{\tblwidth}{@{} LLLL@{} } %有几个L,就有几列
\toprule
Col 1 & Col 2 & Col 3 & Col4\\
\midrule
12345 & 12345 & 123 & 12345 \\ %可以根据\quad来增加间隔
12345 & 12345 & 123 & 12345 \\
12345 & 12345 & 123 & 12345 \\
12345 & 12345 & 123 & 12345 \\
12345 & 12345 & 123 & 12345 \\
\bottomrule
\end{tabular*}
\end{table}
示例:
4.4插入公式
插入单个公式:
\begin{flalign}
Z_0 &= E_{\text{pat}} + E_{\text{pos}} && \label{Eq.1}%左对齐
&& Z_0 &= E_{\text{pat}} + E_{\text{pos}} & \label{Eq.1} && %右对齐
\end{flalign}
\begin{equation}
Z_0 = E_{\text{pat}} + E_{\text{pos}} \label{Eq.1}%居中
\end{equation}
插入多个公式:
左对齐+换行:
\begin{flalign}
&P_{X}^{(i)}=Softmax(X) && \label{Eq.6} \\
&P_{X}^{(i)}=Softmax(X) && \label{Eq.7} \\
&P_{X}^{(i)}=Softmax(Concat(N_{X},max(P_{X}^{(i)}), \notag \\ %换行
&\quad %换行
max(P_{X}^{(i)}))) && \label{Eq.8}
\end{flalign}
使用\footnote{text}
加入脚注;使用\url{www.baidu.com}加入超链接。