我正在用\documentclass[5p]{elsarticle}
它写一篇论文,但我不想在摘要中添加水平线。有人可以指导我吗?
\documentclass[5p]{elsarticle}
\usepackage{lineno,hyperref}
\modulolinenumbers[5]
\journal{Journal of \LaTeX\ Templates}
\begin{document}
\begin{frontmatter}
\title{test title}
\author{ Hariha\corref{cor1}*}
\address{820081,Fukuoka, Japan}
%\fntext[myfootnote]{Since 1880.}
\cortext[mycorrespondingauthor]{Corresponding author}
\ead{[email protected]}
\begin{abstract}
This template helps you to create a properly formatted \LaTeX\ manuscript.
\end{abstract}
\begin{keyword}
MEMS
%\texttt{elsarticle.cls}\sep \LaTeX\sep Elsevier \sep template
%\MSC[2010] 00-01\sep 99-00
\end{keyword}
\end{frontmatter}
%\linenumbers
\section{The Elsevier article class}
\paragraph{Installation} If the document class \emph{elsarticle} is not available on your computer, you can download and install the system package \emph{texlive-publishers} (Linux) or install the \LaTeX\ package \emph{elsarticle} using the package manager of your \TeX\ installation, which is typically \TeX\ Live or Mik\TeX.
\end{document}
答案1
在您的例子中,\MaketitleBox
使用 来制作标题。\hrule
的定义中有两个命令,\MaketitleBox
用于将水平线放在摘要上方和关键字下方。您可以使用包从 的定义中xpatch
删除这些命令:\hrule
\MaketitleBox
\documentclass[5p]{elsarticle}
\usepackage{xpatch}
\xpatchcmd{\MaketitleBox}{\hrule}{}{}{}% remove first horizontal rule (above abstract)
\xpatchcmd{\MaketitleBox}{\hrule}{}{}{}% remoce second horizonral rule (below keywords)
\usepackage{lineno,hyperref}
\modulolinenumbers[5]
\journal{Journal of \LaTeX\ Templates}
\begin{document}
\begin{frontmatter}
\title{test title}
\author{ Hariha\corref{cor1}*}
\address{820081,Fukuoka, Japan}
%\fntext[myfootnote]{Since 1880.}
\cortext[mycorrespondingauthor]{Corresponding author}
\ead{[email protected]}
\begin{abstract}
This template helps you to create a properly formatted \LaTeX\ manuscript.
\end{abstract}
\begin{keyword}
MEMS
%\texttt{elsarticle.cls}\sep \LaTeX\sep Elsevier \sep template
%\MSC[2010] 00-01\sep 99-00
\end{keyword}
\end{frontmatter}
%\linenumbers
\section{The Elsevier article class}
\paragraph{Installation} If the document class \emph{elsarticle} is not available on your computer, you can download and install the system package \emph{texlive-publishers} (Linux) or install the \LaTeX\ package \emph{elsarticle} using the package manager of your \TeX\ installation, which is typically \TeX\ Live or Mik\TeX.
\end{document}
如果您只想删除摘要上方的规则,请仅使用一个\xpatchcmd
。
注意:使用选项preprint
代替5p
elsarticle
将使用\pprintMaketitle
代替\MaketitleBox
。在这种情况下,补丁将是相同的,但使用\pprintMaketitle
代替\MaketitleBox
:
\xpatchcmd{\pprintMaketitle}{\hrule}{}{}{}% remove first horizontal rule
\xpatchcmd{\pprintMaketitle}{\hrule}{}{}{}% remoce second horizonral rule
您可以同时使用两者来获得独立于选项的解决方案。