[Tex/LaTex] Nomenclature with elsarticle and TeXnicCenter

elsarticlenomenclaturetexniccenter

I know this question has been asked many times before, and I have tried all the solutions given in the corresponding answers, but still I do not get a nomenclature printed in my PDF:

\documentclass[a4paper,review,3p]{elsarticle}
\usepackage{framed}

% works when adding this command
\immediate\write18{%
makeindex -s nomencl.ist -o \jobname.nls -t \jobname.nlg \jobname.nlo%
}


\usepackage{nomencl}
\makenomenclature

\begin{document}

Text.

\begin{table*}[!t]   
\begin{framed}
\nomenclature{$symbol$}{symbol}
\printnomenclature
\end{framed}
\end{table*}

\end{document}

This is what I have typed in my LaTeX=>PDF profile under MakeIndex:

"%tm.idx" -t "%tm.ilg" -o "%tm.ind" ; "%tm.nlo" –s nomencl.ist -o  "%tm.nls"

There is no .nls file generated and the PDF shows an empty box where the nomenclature should be printed.

Any suggestions what I might be doing wrong?

EDIT: When adding the following lines (copied from this post):

\immediate\write18{%
makeindex -s nomencl.ist -o \jobname.nls -t   \jobname.nlg \jobname.nlo%
}

I get the desired PDF. Any ideas why the command in the output profile is not executed?

Best Answer

Your options for MakeIndex in the TeXnicCenter output profile is wrong.

"%tm.idx" -t "%tm.ilg" -o "%tm.ind" ; "%tm.nlo" –s nomencl.ist -o  "%tm.nls"

For me it seems you want to generate an index ("%tm.idx" -t "%tm.ilg" -o "%tm.ind") and an nomenclature ("%tm.nlo" –s nomencl.ist -o "%tm.nls"). TexnicCenter can only start one run of makeindex, so if you really want to have both makeindex run, you need to use the preprocessor to add there a batch containing the makeindex command with needed options like

makeindex "%tm.nlo" –s nomencl.ist -o  "%tm.nls"

and left only the options

"%tm.idx" -t "%tm.ilg" -o "%tm.ind"

for the direct run of makeindex via TeXnicCenter.

Your given MWE does not indicate that you need an index. If that is true please change the options for makeindex in TeXnicCenter to

"%tm.nlo" –s nomencl.ist -o  "%tm.nls"

See also my answer to question How to create nomenclature using TeXnicCenter? for more infos for the last idea.

With an current MiKTeX 2.9 and the following configuration (see the red arrows in the image)

TeXnicCenter configuration

and your given MWE I get the following result:

enter image description here

I defined a new output profile via build menu point, copied the original LaTeX->PDF to LaTeX nomencl->PDF (or simular) and changed there the options for MakeIndex as showed in the configuration image. Then just use the compile button of TeXnicCenter ...

Please compare your .log file with mine:

This is pdfTeX, Version 3.14159265-2.6-1.40.17 (MiKTeX 2.9 64-bit) (preloaded format=pdflatex 2016.5.25)  4 AUG 2016 15:49
entering extended mode
**./323333.tex
(323333.tex
LaTeX2e <2016/03/31>
Babel <3.9r> and hyphenation patterns for 75 language(s) loaded.
("C:\Program Files\MiKTeX 2.9\tex\latex\elsarticle\elsarticle.cls"
Document Class: elsarticle 2009/09/17, 1.2.0: Elsevier Ltd
\@bls=\dimen102
("C:\Program Files\MiKTeX 2.9\tex\latex\base\article.cls"
Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
("C:\Program Files\MiKTeX 2.9\tex\latex\base\size10.clo"
File: size10.clo 2014/09/29 v1.4h Standard LaTeX file (size option)
)
\c@part=\count79
\c@section=\count80
\c@subsection=\count81
\c@subsubsection=\count82
\c@paragraph=\count83
\c@subparagraph=\count84
\c@figure=\count85
\c@table=\count86
\abovecaptionskip=\skip41
\belowcaptionskip=\skip42
\bibindent=\dimen103
) ("C:\Program Files\MiKTeX 2.9\tex\latex\graphics\graphicx.sty"
Package: graphicx 2014/10/28 v1.0g Enhanced LaTeX Graphics (DPC,SPQR)
 ("C:\Program Files\MiKTeX 2.9\tex\latex\graphics\keyval.sty"
Package: keyval 2014/10/28 v1.15 key=value parser (DPC)
\KV@toks@=\toks14
)
("C:\Program Files\MiKTeX 2.9\tex\latex\graphics\graphics.sty"
Package: graphics 2016/07/10 v1.0t Standard LaTeX Graphics (DPC,SPQR)
 ("C:\Program Files\MiKTeX 2.9\tex\latex\graphics\trig.sty"
Package: trig 2016/01/03 v1.10 sin cos tan (DPC)
) ("C:\Program Files\MiKTeX 2.9\tex\latex\00miktex\graphics.cfg"
File: graphics.cfg 2016/06/04 v1.11 sample graphics configuration
)
Package graphics Info: Driver file: pdftex.def on input line 99.

("C:\Program Files\MiKTeX 2.9\tex\latex\graphics-def\pdftex.def"
File: pdftex.def 2016/07/10 v0.06j Graphics/color for pdfTeX

("C:\Program Files\MiKTeX 2.9\tex\generic\oberdiek\infwarerr.sty"
Package: infwarerr 2016/05/16 v1.4 Providing info/warning/error messages (HO)
)
("C:\Program Files\MiKTeX 2.9\tex\generic\oberdiek\ltxcmds.sty"
Package: ltxcmds 2016/05/16 v1.23 LaTeX kernel commands for general use (HO)
)
\Gread@gobject=\count87
))
\Gin@req@height=\dimen104
\Gin@req@width=\dimen105
)
("C:\Program Files\MiKTeX 2.9\tex\latex\psnfss\pifont.sty"
Package: pifont 2005/04/12 PSNFSS-v9.2a Pi font support (SPQR) 
LaTeX Font Info:    Try loading font information for U+pzd on input line 63.
 ("C:\Program Files\MiKTeX 2.9\tex\latex\psnfss\upzd.fd"
File: upzd.fd 2001/06/04 font definitions for U/pzd.
)
LaTeX Font Info:    Try loading font information for U+psy on input line 64.

("C:\Program Files\MiKTeX 2.9\tex\latex\psnfss\upsy.fd"
File: upsy.fd 2001/06/04 font definitions for U/psy.
))
\c@tnote=\count88
\c@fnote=\count89
\c@cnote=\count90
\c@ead=\count91
\c@author=\count92
\@eadauthor=\toks15
\c@affn=\count93
\absbox=\box26
\keybox=\box27
\Columnwidth=\dimen106
\space@left=\dimen107
\els@boxa=\box28
\els@boxb=\box29
\leftMargin=\dimen108
\@enLab=\toks16
\@sep=\skip43
\@@sep=\skip44
 (323333.spl)
("C:\Program Files\MiKTeX 2.9\tex\latex\natbib\natbib.sty"
Package: natbib 2010/09/13 8.31b (PWD, AO)
\bibhang=\skip45
\bibsep=\skip46
LaTeX Info: Redefining \cite on input line 694.
\c@NAT@ctr=\count94
)
\splwrite=\write3
\openout3 = `323333.spl'.

 ("C:\Program Files\MiKTeX 2.9\tex\latex\geometry\geometry.sty"
Package: geometry 2010/09/12 v5.6 Page Geometry
 ("C:\Program Files\MiKTeX 2.9\tex\generic\oberdiek\ifpdf.sty"
Package: ifpdf 2016/05/14 v3.1 Provides the ifpdf switch
)
("C:\Program Files\MiKTeX 2.9\tex\generic\oberdiek\ifvtex.sty"
Package: ifvtex 2016/05/16 v1.6 Detect VTeX and its facilities (HO)
Package ifvtex Info: VTeX not detected.
)
("C:\Program Files\MiKTeX 2.9\tex\generic\ifxetex\ifxetex.sty"
Package: ifxetex 2010/09/12 v0.6 Provides ifxetex conditional
)
\Gm@cnth=\count95
\Gm@cntv=\count96
\c@Gm@tempcnt=\count97
\Gm@bindingoffset=\dimen109
\Gm@wd@mp=\dimen110
\Gm@odd@mp=\dimen111
\Gm@even@mp=\dimen112
\Gm@layoutwidth=\dimen113
\Gm@layoutheight=\dimen114
\Gm@layouthoffset=\dimen115
\Gm@layoutvoffset=\dimen116
\Gm@dimlist=\toks17

("C:\Program Files\MiKTeX 2.9\tex\latex\geometry\geometry.cfg")))
("C:\Program Files\MiKTeX 2.9\tex\latex\framed\framed.sty"
Package: framed 2011/10/22 v 0.96: framed or shaded text with page breaks
\OuterFrameSep=\skip47
\fb@frw=\dimen117
\fb@frh=\dimen118
\FrameRule=\dimen119
\FrameSep=\dimen120
) ("C:\Program Files\MiKTeX 2.9\tex\latex\nomencl\nomencl.sty"
Package: nomencl 2005/09/22 v4.2 Nomenclature package (LN)
\nomlabelwidth=\dimen121
\nom@tempdim=\dimen122
\nomitemsep=\skip48
)
\@nomenclaturefile=\write4
\openout4 = `323333.nlo'.


Writing nomenclature file 323333.nlo
(323333.aux)
\openout1 = `323333.aux'.

LaTeX Font Info:    Checking defaults for OML/cmm/m/it on input line 8.
LaTeX Font Info:    ... okay on input line 8.
LaTeX Font Info:    Checking defaults for T1/cmr/m/n on input line 8.
LaTeX Font Info:    ... okay on input line 8.
LaTeX Font Info:    Checking defaults for OT1/cmr/m/n on input line 8.
LaTeX Font Info:    ... okay on input line 8.
LaTeX Font Info:    Checking defaults for OMS/cmsy/m/n on input line 8.
LaTeX Font Info:    ... okay on input line 8.
LaTeX Font Info:    Checking defaults for OMX/cmex/m/n on input line 8.
LaTeX Font Info:    ... okay on input line 8.
LaTeX Font Info:    Checking defaults for U/cmr/m/n on input line 8.
LaTeX Font Info:    ... okay on input line 8.
 ("C:\Program Files\MiKTeX 2.9\tex\context\base\supp-pdf.mkii"
[Loading MPS to PDF converter (version 2006.09.02).]
\scratchcounter=\count98
\scratchdimen=\dimen123
\scratchbox=\box30
\nofMPsegments=\count99
\nofMParguments=\count100
\everyMPshowfont=\toks18
\MPscratchCnt=\count101
\MPscratchDim=\dimen124
\MPnumerator=\count102
\makeMPintoPDFobject=\count103
\everyMPtoPDFconversion=\toks19
) ("C:\Program Files\MiKTeX 2.9\tex\generic\oberdiek\pdftexcmds.sty"
Package: pdftexcmds 2016/05/21 v0.22 Utility functions of pdfTeX for LuaTeX (HO)

("C:\Program Files\MiKTeX 2.9\tex\generic\oberdiek\ifluatex.sty"
Package: ifluatex 2016/05/16 v1.4 Provides the ifluatex switch (HO)
Package ifluatex Info: LuaTeX not detected.
)
Package pdftexcmds Info: LuaTeX not detected.
Package pdftexcmds Info: \pdf@primitive is available.
Package pdftexcmds Info: \pdf@ifprimitive is available.
Package pdftexcmds Info: \pdfdraftmode found.
)
("C:\Program Files\MiKTeX 2.9\tex\latex\oberdiek\epstopdf-base.sty"
Package: epstopdf-base 2016/05/15 v2.6 Base part for package epstopdf

("C:\Program Files\MiKTeX 2.9\tex\latex\oberdiek\grfext.sty"
Package: grfext 2016/05/16 v1.2 Manage graphics extensions (HO)

("C:\Program Files\MiKTeX 2.9\tex\generic\oberdiek\kvdefinekeys.sty"
Package: kvdefinekeys 2016/05/16 v1.4 Define keys (HO)
))
("C:\Program Files\MiKTeX 2.9\tex\latex\oberdiek\kvoptions.sty"
Package: kvoptions 2016/05/16 v3.12 Key value format for package options (HO)

("C:\Program Files\MiKTeX 2.9\tex\generic\oberdiek\kvsetkeys.sty"
Package: kvsetkeys 2016/05/16 v1.17 Key value parser (HO)

("C:\Program Files\MiKTeX 2.9\tex\generic\oberdiek\etexcmds.sty"
Package: etexcmds 2016/05/16 v1.6 Avoid name clashes with e-TeX commands (HO)
Package etexcmds Info: Could not find \expanded.
(etexcmds)             That can mean that you are not using pdfTeX 1.50 or
(etexcmds)             that some package has redefined \expanded.
(etexcmds)             In the latter case, load this package earlier.
)))
Package epstopdf-base Info: Redefining graphics rule for `.eps' on input line 438.
Package grfext Info: Graphics extension search list:
(grfext)             [.png,.pdf,.jpg,.mps,.jpeg,.jbig2,.jb2,.PNG,.PDF,.JPG,.JPEG,.JBIG2,.JB2,.eps]
(grfext)             \AppendGraphicsExtensions on input line 456.
)
*geometry* driver: auto-detecting
*geometry* detected driver: pdftex
*geometry* verbose mode - [ preamble ] result:
* driver: pdftex
* paper: custom
* layout: <same size as paper>
* layoutoffset:(h,v)=(0.0pt,0.0pt)
* hratio: 1:1
* vratio: 1:1
* modes: 
* h-part:(L,W,R)=(64.75394pt, 468.0pt, 64.75394pt)
* v-part:(T,H,B)=(111.52342pt, 622.0pt, 111.52342pt)
* \paperwidth=597.50787pt
* \paperheight=845.04684pt
* \textwidth=468.0pt
* \textheight=622.0pt
* \oddsidemargin=-7.51605pt
* \evensidemargin=-7.51605pt
* \topmargin=-22.74657pt
* \headheight=50.0pt
* \headsep=12.0pt
* \topskip=10.0pt
* \footskip=18.0pt
* \marginparwidth=57.0pt
* \marginparsep=11.0pt
* \columnsep=24.0pt
* \skip\footins=24.0pt plus 2.0pt minus 12.0pt
* \hoffset=0.0pt
* \voffset=0.0pt
* \mag=1000
* \@twocolumnfalse
* \@twosidefalse
* \@mparswitchfalse
* \@reversemarginfalse
* (1in=72.27pt=25.4mm, 1cm=28.453pt)

(323333.nls
LaTeX Font Info:    External font `cmex10' loaded for size
(Font)              <7> on input line 1.
LaTeX Font Info:    External font `cmex10' loaded for size
(Font)              <5> on input line 1.
) [1{C:/ProgramData/MiKTeX/2.9/pdftex/config/pdftex.map}

] (323333.aux) ) 
Here is how much of TeX's memory you used:
 2690 strings out of 493335
 36245 string characters out of 3139263
 104197 words of memory out of 3000000
 6195 multiletter control sequences out of 15000+200000
 4638 words of font info for 17 fonts, out of 3000000 for 9000
 1141 hyphenation exceptions out of 8191
 40i,7n,30p,257b,208s stack positions out of 5000i,500n,10000p,200000b,50000s
<C:/Program Files/MiKTeX 2.9/fonts/type1/public/amsfonts/cm/cmbx10.pfb><C:/Program Files/MiKTeX 2.9/font
s/type1/public/amsfonts/cm/cmmi10.pfb><C:/Program Files/MiKTeX 2.9/fonts/type1/public/amsfonts/cm/cmr10.pfb>
Output written on 323333.pdf (1 page, 33223 bytes).
PDF statistics:
 18 PDF objects out of 1000 (max. 8388607)
 0 named destinations out of 1000 (max. 500000)
 1 words of extra memory for PDF output out of 10000 (max. 10000000)