我知道这个问题之前已经被问过很多次了,并且我已经尝试了相应答案中给出的所有解决方案,但是仍然没有在我的 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}
LaTeX=>PDF
这是我在我的个人资料中输入的内容MakeIndex
:
"%tm.idx" -t "%tm.ilg" -o "%tm.ind" ; "%tm.nlo" –s nomencl.ist -o "%tm.nls"
没有.nls
生成文件并且 PDF 在应该打印命名表的地方显示一个空白框。
有什么建议我可能做错了吗?
编辑:添加以下行时(从此处复制邮政):
\immediate\write18{%
makeindex -s nomencl.ist -o \jobname.nls -t \jobname.nlg \jobname.nlo%
}
我得到了想要的 PDF。你知道为什么输出配置文件中的命令没有执行吗?
答案1
MakeIndex
您在 TeXnicCenter 输出配置文件中的选项是错误的。
"%tm.idx" -t "%tm.ilg" -o "%tm.ind" ; "%tm.nlo" –s nomencl.ist -o "%tm.nls"
对我来说,您似乎想要生成一个索引("%tm.idx" -t "%tm.ilg" -o "%tm.ind"
)和一个命名法("%tm.nlo" –s nomencl.ist -o "%tm.nls"
)。TexnicCenter 只能启动一次运行makeindex
,因此如果您确实希望同时makeindex
运行两者,则需要使用预处理器在其中添加一个批处理,其中包含makeindex
命令和所需选项,例如
makeindex "%tm.nlo" –s nomencl.ist -o "%tm.nls"
只剩下选项
"%tm.idx" -t "%tm.ilg" -o "%tm.ind"
通过 TeXnicCenter直接运行makeindex
。
您给出的 MWE 并不表明您需要索引。如果是真的,请将makeindex
TeXnicCenter 中的选项更改为
"%tm.nlo" –s nomencl.ist -o "%tm.nls"
另请参阅我对问题的回答如何使用 TeXnicCenter 创建命名法?有关最后一个想法的更多信息。
使用当前的 MiKTeX 2.9 和以下配置(参见图中的红色箭头)
和您给出的 MWE 我得到以下结果:
我通过build
菜单点定义了一个新的输出配置文件,将原始配置文件复制到LaTeX->PDF
(LaTeX nomencl->PDF
或类似配置文件)并在那里更改选项,MakeIndex
如配置图像中所示。然后只需使用compile
TeXnicCenter 按钮...
请将您的.log
文件与我的进行比较:
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)