比如在论文写作中我们想要在手稿中增加以上图片类似的术语解释,可以使用以下步骤:
1. 在导言区加入:
\usepackage{nomencl}
\makenomenclature
2.在你想放置术语表的地方加入:
\printnomenclature
\nomenclature{\(c\)}{Speed of light in a vacuum}
\nomenclature{\(h\)}{Planck constant}
\nomenclature{\(c\)}{Speed of light in a vacuum}
\nomenclature{\(h\)}{Planck constant}
\nomenclature{\(c\)}{Speed of light in a vacuum}
\nomenclature{\(h\)}{Planck constant}
注:\printnomenclature是把术语表打印出来,而\nomenclature的使用方法就是\nomenclature{你的符号}{你的解释}
但是这个时候编译pdf并无任何效果!
3.编译后在文章根目录会发现出现.nlo的文件
4.打开cmd命令窗口(快捷键:win+R),使用cmd命令切换到文章的目录下(具体搜索cmd命令教程)
5.然后输入命令:makeindex AE.nlo -s nomencl.ist -o AE.nls (AE需要替换你文件的名字)
6.重新编译LateX发现已生成术语表
7.导言区加入命令:\usepackage{tcolorbox}
8.把之前的用以下命令套起来(begin和end前别忘了加个\,我在这里加了会显示不出这里的代码)
begin{tcolorbox}[colback=white,colframe=black]
之前的命令(第二步的那些命令)
end{tcolorbox}
9.重新编译,大功告成!
其他操作1:如果单栏环境中使用双列术语表怎么办呢?
(1)在导言区加入命令:\usepackage{multicol}
(2)然后使用以下命令把\printnomenclature套起来即可(\printnomenclature是把术语表打印出来,之前提过)。此外,2可以改成3,4等等,改成几就是几列 (begin和end前别忘了加个\,我在这里加了会显示不出这里的代码)
begin{multicols}{2}
\printnomenclature
end{multicols}
其他操作2:术语表中的符号是乱排的没有按照列出的顺序排列怎么办?
(1)删除已生成的部分文件(不要乱删,按修改日期排一下顺序,删除最新生成的,不要删.tex文件)
(2)然后在之前的命令前加序号,如:
\nomenclature[001]{\(c\)}{Speed of light in a vacuum}
\nomenclature[002]{\(h\)}{Planck constant}
\nomenclature[003]{\(c\)}{Speed of light in a vacuum}
\nomenclature[004]{\(h\)}{Planck constant}
\nomenclature[005]{\(c\)}{Speed of light in a vacuum}
\nomenclature[006]{\(h\)}{Planck constant}
(3)编译tex文件
(4)执行第5步(cmd命令那一步)
(5)再编译tex文件即可
注:每次对术语表的更改都需要重新编译手稿来生成新的.nlo文件,然后进行第5步(不然术语表不会改变)