[Tex/LaTex] problem with elsarticle and nomenclature

elsarticlenomenclature

hello please i try the nomenclature with elsarticle but it doesn't work. Could help please. Thank you

\documentclass{elsarticle}
\usepackage{framed} % Framing content
\usepackage{multicol} % Multiple columns environment

\usepackage{nomencl} % Nomenclature package
\makenomenclature
\setlength{\nomitemsep}{-\parskip} % Baseline skip between items

\renewcommand*\nompreamble{\begin{multicols}{2}}
\renewcommand*\nompostamble{\end{multicols}}
\begin{document}

\begin{table*}[!t]
   \begin{framed}
     \printnomenclature
  \end{table*}
\nomenclature{$I_b$}{First item}
\nomenclature{$I_d$}{Second item}
\nomenclature{$I_r$}{Third item}
 \end{framed}

\end{document}

Best Answer

Your MWE causes the error

! LaTeX Error: \begin{framed} on input line 14 ended by \end{table*}.

which means the environments aren't correctly nested. Move \end{framed} before \end{table*}:

\documentclass{elsarticle}
\usepackage{framed} % Framing content
\usepackage{multicol} % Multiple columns environment

\usepackage{nomencl} % Nomenclature package
\makenomenclature
\setlength{\nomitemsep}{-\parskip} % Baseline skip between items

\renewcommand*\nompreamble{\begin{multicols}{2}}
\renewcommand*\nompostamble{\end{multicols}}
\begin{document}
Test.

\begin{table*}[!t]
   \begin{framed}
     \printnomenclature
   \end{framed}
\end{table*}
\nomenclature{$I_b$}{First item}
\nomenclature{$I_d$}{Second item}
\nomenclature{$I_r$}{Third item}

\end{document}

Remember that the document build requires a call to the makeindex application, as described in Using package nomencl.