[Tex/LaTex] How to add “Nomenclature” in “elsarticle” (2-column format) through TexMaker

elsarticlenomenclaturetexmaker

The problem:
How to add a "Nomenclature" section for Elsevier journals in a 2-column format at the top of the second page in a frame through TexMaker

So, I googled a lot for this problem and finally found a solution. I'm sharing it here maybe it helps someone in future to save time.

Best Answer

Most elsarticle.cls comes with a nomenclature environment. If not, open elsarticle.cls and paste this at the bottom before \endinput

\newbox\tempbox%
\newenvironment{nomenclature}{\par\vskip6pt plus1pt\setbox\tempbox\vbox\bgroup\if@twocolumn\hsize17.5pc\else\hsize37.3pc\fi\vspace*{-17.7pt}\section*{Nomenclature}}{\egroup\par\noindent\fboxsep10pt\fbox{\box\tempbox}\vskip6pt}
\def\deflist{\@ifnextchar[{\@deflist}{\@deflist[]}}
\newbox\defbox%
\newdimen\defboxdimen%
\def\@deflist[#1]{%
\setbox\defbox\hbox{#1:\quad}%
\defboxdimen\wd\defbox%
\def\tempa{#1}%
\par\addvspace{12pt plus2pt minus2pt}%
\setlength\parindent{0pt}%
\def\deftitle##1{{\noindent\itshape##1}\par}%\fontsize{12}{12}\selectfont
\ifx\tempa\@empty%
\def\defitem##1{\@hangfrom{##1\ }}%%%
\else%
\def\defitem##1{\@hangfrom{\hbox to \defboxdimen{##1\quad}}}%%
\fi%
\def\defterm##1{##1\par}
}

Then in your main file simply write

\begin{nomenclature}
\begin{deflist}[A] %[AAAA] if you have 4 letters max for example
\defitem{A}\defterm{radius of}
\defitem{B}\defterm{position of}
\defitem{C}\defterm{further nomenclature continues down the page}
\end{deflist}
\end{nomenclature}