1. 程式人生 > 其它 >How to add “Nomenclature” in “elsarticle” (2-column format)

How to add “Nomenclature” in “elsarticle” (2-column format)

技術標籤:latex

Step1. You should add these lines at the top of the page in TeXmaker:

\documentclass[5p]{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}

Step2. Add these codes in the body of the document:

\begin{table*}[!t]   

\begin{framed}

\nomenclature{$abbreviation$}{explanation for the abbreviation}

\printnomenclature

\end{framed}

\end{table*}

Note1: this command allows you to add Nomenclature as many times as you want

\nomenclature{$abbreviation$}{explanation for the abbreviation}

Step3. Go toOptions > Configure Texmaker > TEX Commands

In theLatexmkcommand space, add this code at the end of the already written command (completely):

 ; makeindex elsarticle-template.nlo -s nomencl.ist -o elsarticle-template.nls 

(don't forget, you may need to change the name of*.nloor*.nls

if you have made some modifications to the name)


Step4. Go toTools > open Terminal

and then enter this code (same code):

 ; makeindex elsarticle-template.nlo -s nomencl.ist -o elsarticle-template.nls 

Step5. From the drop-down menu, choose LatexMK to compile your code and then you can choose Quick Build as well. (try more than once if the first time the table doesn't appear)

That's it guys. The final work should create a table like this at the top of the second page:

enter image description here