3

I am using \documentclass[5p]{elsarticle} to write a paper, but I do not want to include horizontal lines to write Abstract. Can some one guide me?

\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{me@lab.jp}

\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}
Schweinebacke
  • 26,336
Prakash
  • 169
  • Can you please add a minimal but working example (MWE) that illustrates your problem and that can be used to reproduce the problem and to test our suggestions. This would help us to help you. – Schweinebacke Jul 26 '17 at 08:34
  • Off-Topic: Do you want to publish the article at Elsevier? Are you sure that the publish agrees with such changes? Authors often try to change settings and results of publisher classes, the afterwards will be thrown away by the editor. – Schweinebacke Jul 26 '17 at 08:36
  • I do not want to publish in Elsevier. I am writing for some conference which has the same format without those lines in Abstract @Schweinebacke – Prakash Jul 26 '17 at 08:38
  • Please have a look at our Help Center so see how we use markdown for the formatting. You can get a link to the markdown help also by clicking to the question mark at the right side of the toolbar of the editor field. – Schweinebacke Jul 26 '17 at 08:39
  • @Schweinebacke I m sorry. I could not able to get the suggested link at Help Center – Prakash Jul 26 '17 at 08:45
  • https://tex.stackexchange.com/help/search?q=markdown. The other link can be found if you click to the question mark at the toolbar of the editor field if you edit your question or the editor field for answers. – Schweinebacke Jul 26 '17 at 08:50
  • @Schweinebacke Is something wrong with my post. I mean you can not able to see my code. – Prakash Jul 26 '17 at 08:52
  • As you can see below the question, I've edited it to fix the formatting. I've done so with the original question and again after you've added the example. After fixing the formatting, I've added the comment to let you know how you can do it on your own next time. That's all. – Schweinebacke Jul 26 '17 at 09:03
  • @Schweinebacke: Thank you. I will follow it. Could you suggest something to remove those two lines in the abstract. Thank you again – Prakash Jul 26 '17 at 09:07

1 Answers1

4

In your case \MaketitleBox is use to make the title. There are two \hrule commands in the definition of \MaketitleBox to make the horizontal rule aboce the abstract and below the keywords. You can use package xpatch to remove these \hrules from the definition of \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{me@lab.jp}

\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}

enter image description here

If you only want to remove the rule above the abstract use only one \xpatchcmd.

Note: With option preprint instead of 5p elsarticle would use \pprintMaketitle instead of \MaketitleBox. In this case the patches would be the same but with \pprintMaketitle instead of \MaketitleBox:

\xpatchcmd{\pprintMaketitle}{\hrule}{}{}{}% remove first horizontal rule
\xpatchcmd{\pprintMaketitle}{\hrule}{}{}{}% remoce second horizonral rule

You can use both to have a solution that is independent from the options.

Schweinebacke
  • 26,336
  • Thank you so much. This is what I was looking. You saved my time. Thank you very much for your kind support. – Prakash Jul 26 '17 at 09:16
  • @Prakash: Please consider to cast a vote or even to accept an answer if you find an answer helpful. See The Tour for information about how to vote and accept answers. – Schweinebacke Jul 26 '17 at 09:20
  • How to cast vote? – Prakash Jul 26 '17 at 09:26
  • @Prakash Please have a look at the tour. There you can find: "Good answers are voted up and rise to the top." The shown symbol to click to is left beside the top of every question and answer. If you have not yet voted it is hollow. After voting it is filled like shown in the tour. – Schweinebacke Jul 26 '17 at 09:29