latex学习 day3 elsarticle.cls学习

elsarticle.cls要用到的一些包

  • natbib.sty 处理引用 for citation processing,处理各种各样的引用,和hyperref.sty,hypernat.sty一起完美工作
  • geometry.sty 页边距设置 for margin settings
  • fleqn.clo 左对齐公式 for left aligned equations
  • graphicx.sty 加入图像 for graphics inclusion
  • txfonts.sty 其他字体,可选的包optional font package, if the document is to be formatted with Times and compatible math fonts
  • hyperref.sty 如果文章要使用超链接,则需要这个包optional packages if hyperlinking is required in the document
  • endfloat.sty 把所有floats(图,表等)放在文末则需要用 optional packages if floats to be placed at end of the PDF.
  • ams的数学包比如 amsmath.sty, amsthm.sty, amssymb.sty, amsfonts.sty都是免费随便用的,developed by
    the American Mathematical Society美国数学协会开发的
  • hypernat.sty
  • graphicx.sty, is part of any standard LATEX distribution, is loaded by default.
  • multirow.sty, array.sty做表格的,进一步增强和调整表格,需要自己load(\usepackage{})

关于图像格式:
LATEX accepts figures in the postscript format ,比如eps
while pdfLATEX accepts *.pdf, *.mps (metapost), *.jpg and *.png formats. pdfLATEX does not accept graphic files in the postscript format.

elsarticle.cls is built upon article.cls ,基于article.clc的,所以All options of article.cls can be used with this document class。

preprint and final formats的区别

  • preprint document formatting(默认):default option which format the document for submission to
    Elsevier journals

preprint是提交给期刊审核用的,默认单栏,文本宽度384pt. When you use elsarticle.cls for formatting your submissions in the preprint mode, the document is formatted in single column style with a text width of 384pt or 5.3in.

  • formats the document as per the final style of models 1+, 3+ and 5+ of Elsevier journals

final print是出版的最终版,如果期刊是双栏的就要改格式,容易遇到公式断裂的现象。 When this document is formatted for final print and if the journal happens to be a double column journal, the text width will be reduced to 224pt at for 3+ double column and 5+ journals respectively.

最终版主要是要注意对应期刊的纸张尺寸和页面边距format their submission to the page size and margins of their preferred journal
在这里插入图片描述在这里插入图片描述在这里插入图片描述在这里插入图片描述

TEX needs two compilations to resolve the footnote marks in the preamble part

好神奇!!!竟然需要编译两次,亲自尝试,如果只编译一次,email address和url就不出来,这就是因为脚注还没解析好,牛逼

用elsarticle.ins生成elsarticle.cls

elsarticle.ins is the LATEX installer file安装文件,用latex编译它就可以得到cls文件(类文件,class文件)
先打开elsarticle所在路径,然后调用latex命令,结果太长我不粘了,但是cls文件确实成功生成了

Microsoft Windows [版本 10.0.17134.112]
(c) 2018 Microsoft Corporation。保留所有权利。

C:\Users\Administrator>e:

E:\>cd 2nd paper\投稿期刊模板\information fusion\elsarticle\elsarticle

E:\2nd paper\投稿期刊模板\information fusion\elsarticle\elsarticle>latex elsarticle.ins
*************************************************************
*                                                           *
* To finish the installation you have to move the following *
* file into a directory searched by TeX:                    *
*                                                           *
*     elsarticle.cls                                        *
*         and                                               *
*     elsarticle-*.bst                                      *
*                                                           *
* To produce the documentation go to the ../contrib folder  *
* and run the file elsdoc.tex through pdfLaTeX              *
* or use the Makefile which is far more easier.             *
*                                                           *
* Happy TeXing!                                             *
*                                                           *
*************************************************************

在这里插入图片描述
然后把生成的cls文件复制到D:\texlive\texmf-local\tex\latex\elsevier路径,也可以放在别的latex编译时可以搜索到的路径下
然后更新latex的文件数据库,用texlive发行版texhash命令,miktex发行版好像是用mktexlsr

E:\2nd paper\投稿期刊模板\information fusion\elsarticle\elsarticle>texhash
texhash: Updating D:/texlive/texmf-local/ls-R...
texhash: Updated D:/texlive/texmf-local/ls-R.
texhash: Updating D:/texlive/2019/texmf-config/ls-R...
texhash: Updated D:/texlive/2019/texmf-config/ls-R.
texhash: Updating D:/texlive/2019/texmf-var/ls-R...
texhash: Updated D:/texlive/2019/texmf-var/ls-R.
texhash: Updating D:/texlive/2019/texmf-dist/ls-R...
texhash: Updated D:/texlive/2019/texmf-dist/ls-R.
texhash: Done.

E:\2nd paper\投稿期刊模板\information fusion\elsarticle\elsarticle>

frontmatter(title,author,abstract,keyword)

作者们写在一起,机构用脚注表示

each author is connected to an affiliation with a footnote marker; hence all authors are grouped together and affiliations follow;

%% 下面是所有作者一起写的格式
\title{This is a specimen title\tnoteref{t1,t2}}
\tnotetext[t1]{This document is the results of the research
	project funded by the National Science Foundation.}
\tnotetext[t2]{The second title footnote which is a longer
	text matter to fill through the whole text width and
	overflow into another line in the footnotes area of the
	first page.}
\author[1]{Jos Migchielsen\corref{cor1}%
	\fnref{fn1}}
\ead{J.Migchielsen@elsevier.com}
\author[2]{CV Radhakrishnan\fnref{fn2}}
\ead{cvr@sayahna.org}
\author[3]{CV Rajagopal\fnref{fn1,fn3}}
\ead[url]{www.stmdocs.in}
\cortext[cor1]{Corresponding author}
\fntext[fn1]{This is the first author footnote.}
\fntext[fn2]{Another author footnote, this is a very long
	footnote and it should be a really long footnote. But this
	footnote is not yet sufficiently long enough to make two
	lines of footnote text.}
\fntext[fn3]{Yet another author footnote.}
\address[1]{Elsevier B.V., Radarweg 29, 1043 NX Amsterdam,
	The Netherlands}
\address[2]{Sayahna Foundations, JWRA 34, Jagathy,
	Trivandrum 695014, India}
\address[3]{STM Document Engineering Pvt Ltd., Mepukada,
	Malayinkil, Trivandrum 695571, India}

效果
在这里插入图片描述
在这里插入图片描述

同一个机构的作者写在一起,相关机构跟在后面

authors of same affiliations are grouped together and the relevant affiliation follows this group

%% 下面是不同机构作者分开写的格式
\title{This is a specimen title\tnoteref{t1,t2}}
\tnotetext[t1]{This document is the results of the research
	project funded by the National Science Foundation.}
\tnotetext[t2]{The second title footnote which is a longer
	text matter to fill through the whole text width and
	overflow into another line in the footnotes area of the
	first page.}
\author{Jos Migchielsen\corref{cor1}%
	\fnref{fn1}}
\ead{J.Migchielsen@elsevier.com}
\address{Elsevier B.V., Radarweg 29, 1043 NX Amsterdam,
	The Netherlands}
\author{CV Radhakrishnan\fnref{fn2}}
\ead{cvr@sayahna.org}
\address{Sayahna Foundations, JWRA 34, Jagathy,
	Trivandrum 695014, India}
\author{CV Rajagopal\fnref{fn1,fn3}}
\ead[url]{www.stmdocs.in}
\address{STM Document Engineering Pvt Ltd., Mepukada,
	Malayinkil, Trivandrum 695571, India}
\cortext[cor1]{Corresponding author}
\fntext[fn1]{This is the first author footnote.}
\fntext[fn2]{Another author footnote, this is a very long
	footnote and it should be a really long footnote. But this
	footnote is not yet sufficiently long enough to make two lines
	of footnote text.}
\fntext[fn3]{Yet another author footnote.}

效果在这里插入图片描述在这里插入图片描述

doubleblind选项

不显示作者和机构和邮箱信息
To hide author name, affiliation, email address etc. for double blind refereeing purpose.

\documentclass[preprint,12pt,doubleblind]{elsarticle}

在这里插入图片描述在这里插入图片描述

%\newpageafter{title}%标题后新起一页
%\newpageafter{author}
%\newpageafter{abstract}

用enumerate改变列表list的计数器counter和属性

\begin{enumerate}[1.]
	\item The enumerate environment starts with an optional
	argument ‘1.’, so that the item counter will be suffixed
	by a period.
	\item You can use ‘a)’ for alphabetical counter and ’(i)’ for
	roman counter.
	\begin{enumerate}[a)]
		\item Another level of list with alphabetical counter.
		\item One more item before we start another.
		\begin{enumerate}[(i)]
			\item This item has roman numeral counter.
			\item Another one before we close the third level.
			\end{enumerate}
		\item Third item in second level.
	\end{enumerate}
	\item All list items conclude with this step.
\end{enumerate}
\begin{enumerate}[Step 1.]
	\item This is the first step of the example list.
	\item Obviously this is the second step.
	\item The final step to wind up this example.
\end{enumerate}

在这里插入图片描述

空格

在这里插入图片描述

上图的negative space用于减小距离

The \quad and \qquad commands are often used to adjust aligned formulas or to add space before text in a math formula. The size of \quad (= 1 em) and \qquad (= 2 em) depends on the current font.

18 mu = 1 em

\mspace{3mu} adds a space that is 1/6 em long.

The \, and \! commands are the most useful for fine tuning math formulas,

一些示例

$\sin(x)/\!\log(x)$  \\ %用\!减小距离
$\sqrt{5}\,\text{side}$\\ % \,拉开距离
$\int_{0}^{\pi}\sin x dx=2$\\
$\int_{0}^{\pi}\sin x \, dx=2$\\
$f(1/\sqrt{n})$\\
$f(1/\sqrt{n}\,)$\\
$f: A \to B$\\
$f \colon A \to B$\\ %\colon的spacing效果比:好
$|-f(x)|$\\  %这样写的话,spacing不对
$\left|-f(x)\right|$\\  % 要用\left|和\right|

在这里插入图片描述

利用已有符号创建新符号

\[
\overset{\alpha}{a} \qquad
\underset{\boldsymbol{\cdot}}{X} \qquad
\overset{\alpha}{ a_{i} } \qquad
\overset{\alpha}{a}_{i}
\]

在这里插入图片描述

\phantom命令调整对齐,产生一个空格

\[
A = \begin{pmatrix}
\phantom{-}1 & \phantom{-}3 & \phantom{-}1\\
\phantom{-}2 & \phantom{-}1 & \phantom{-}1\\
-2 & \phantom{-}2 & -1\\
\end{pmatrix}
\]
\begin{align*}
a + b + c & + d \phantom{ {}+e } = 0,\\
c & + d + e = 5.
\end{align*}

在这里插入图片描述

\\ 段内强制换行
\newpage 强制换页
在这里插入图片描述在这里插入图片描述在这里插入图片描述

  • 12
    点赞
  • 51
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 4
    评论
<h3>回答1:</h3><br/>"emergency stop" 是 LaTeX 编译器在遇到无法处理的错误时发出的警告信息,意味着编译过程已经停止。通常需要查看编译日志文件以确定错误的原因,并进行相应的修复。常见的错误包括语法错误、缺失的宏包、文件路径错误等等。 <h3>回答2:</h3><br/>当我们在使用 LaTeX 进行文档编辑时,有时会出现 "emergency stop" 的错误提示,这是 LaTeX 在编译过程中遇到了严重的错误,导致无法继续进行编译而强制停止,下面我将从以下几个方面进行解释。 1. 编写 LaTeX 代码中的语法错误。 LaTeX 中的每个命令都有其特定的格式和参数,如果我们在输入命令时犯了语法错误,则 LaTeX 编译器会无法正确识别命令。这样就会导致编译器在运行到错误的行时发出 "emergency stop" 的错误提示。因此,我们需要检查一下代码中是否存在这类错误,以确保语法正确。 2. 使用宏包时的错误。 宏包是一个拓展 LaTeX 功能的集合,涵盖了很多功能强大的工具。但是,如果我们在使用宏包时出现了错误,也可能会导致程序执行出现 "emergency stop" 的错误提示。这时候我们可以尝试重新下载或更新对应的宏包,或者更换其他类似的宏包。 3. 编码格式不匹配。 编码格式的不匹配也是一个可能导致 "emergency stop" 的原因。在 LaTeX 的代码中有时候会含有各种各样的符号和字符,如果这些字符的编码格式不正确,则 LaTeX 编译器会出现错误解码的情况。此时可以采用一些通用的编码格式来进行编辑。 综上所述,《LaTeX出现emergency stop》是让我们进一步了解 LaTex 常见错误提示的解决方法,并防止错误在我们编写过程中的发生。除了经验积累外,学习能够帮助我们根据提示,更好的解决常见的问题。 <h3>回答3:</h3><br/> LaTeX出现Emergency stop错误,通常是由于Tex引擎无法继续编译LaTeX文档而导致的。这个错误常常令人沮丧,因为往往缺乏明显的错误信息和解决方法。但是,我们可以从以下四个方面入手尝试解决这个问题。 第一,检查LaTeX文档的语法和拼写错误。在编辑LaTeX文档的过程中,不可避免地会出现一些拼写错误或语法问题,这些都可能导致Emergency stop错误。因此,在出现Emergency stop错误时,首先要检查LaTeX文档的拼写和语法,尽可能排除这些因素。 第二,检查texmf.cnf文件的设置。如果出现Emergency stop错误,我们还应该检查texmf.cnf文件的设置。 texmf.cnf是Tex引擎的配置文件,如果其中设置的参数错误或不合理,都有可能导致Emergency stop错误的出现。 第三,检查文档排版的复杂性。如果LaTeX文档太过复杂,包含了大量的宏包和自定义命令,Tex引擎就有可能无法继续编译,出现Emergency stop错误。在这种情况下,我们可以尝试简化文档的排版结构,或者使用更高性能的计算机来处理文档。 第四,使用其他Tex引擎或编辑器。如果上述方法都无法解决问题,我们可以尝试使用其他Tex引擎,比如XeTex或LuaTex,或者使用其他编辑器,比如TexnicCenter。这些工具都可以提供不同的环境和编译方式,可能能够解决Emergency stop错误。 综上所述,导致LaTeX出现Emergency stop错误的原因很多,解决方法也有多种。在遇到这个错误时,我们应该耐心排除各种可能的原因,从而解决这一问题。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

doubleslow;

你的鼓励将是我创作的最大动力

¥2 ¥4 ¥6 ¥10 ¥20
输入1-500的整数
余额支付 (余额:-- )
扫码支付
扫码支付:¥2
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、C币套餐、付费专栏及课程。

余额充值