原  文:Nomenclatures
译  者:Xovee
翻译时间:2021年7月9日

术语集 Nomenclatures

文章目录

  • 术语集 Nomenclatures
  • 基础语法
  • 分组
  • 对物理常数添加单位
  • 对条目进行排序

在科研论文中,缩略语和符号的列表被称为 Nomenclatures。这种类型的列表可以由 nomencl包来生成。本文介绍如何创建术语集(Nomenclatures),以及自定义符号的顺序和分组规则。

术语集条目和索引条目非常相似:

\documentclass{article}
\usepackage{nomencl}
\makenomenclature\begin{document}
\mbox{}
\nomenclature{\(c\)}{Speed of light in a vacuum}
\nomenclature{\(h\)}{Planck constant}\printnomenclature
\end{document}


在文档的 preamble 中引入该包:\usepackage{nomencl}。它有三个基础的命令:

  • \makenomenclature:该命令通常放置在引入包的命令之后。
  • \nomenclature:定义术语集条目。拥有两个参数,分别为符号和其对应的描述。
  • \printnomenclatures:打印术语集。

基础语法

在引入nomencl包的时候,你可以传递额外的参数。下面的例子介绍了如何将术语集添加到目录之中,以及如何改变术语集的默认语言。

\documentclass{article}
\usepackage[spanish]{babel}
\usepackage[intoc, spanish]{nomencl}
\makenomenclature\begin{document}
\tableofcontents\section{Primera Sección}Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Etiam lobortisfacilisis sem. Nullam nec mi et neque pharetra sollicitudin. Praesent imperdie...\nomenclature{\(c\)}{Speed of light in a vacuum}
\nomenclature{\(h\)}{Planck constant}\printnomenclature
\end{document}


这里使用的额外的参数包括:

  • intoc:将术语集包含在目录之中
  • spanish:更改语言,将默认的标题Nomenclatures更改为对应语言所适用的标题。支持的语言包括:croatiandanishenglishfrenchgermanitalianpolishportugueserussianspanishukranian

其他有用的特点包括:你可以手动地设置术语表的标题,以及添加额外的注释。

\documentclass{article}
\usepackage{nomencl}
\makenomenclature\renewcommand{\nomname}{List of Symbols}\renewcommand{\nompreamble}{The next list describes several symbols that will be later used within the body of the document}\begin{document}
\mbox{}\nomenclature{\(c\)}{Speed of light in a vacuum}
\nomenclature{\(h\)}{Planck constant}\printnomenclature
\end{document}


命令

\renewcommand{\nomname}{List of Symbols}

改变了默认的标题。

命令

\renewcommand{\nompreamble}{The next list...}

添加了位于标题和符号表之间的文字。

分组

我们现在介绍如何为符号们进行分组。我们为每个符号添加一个前缀,然后利用etoolbox包来对前缀进行对比。

\documentclass{article}
\usepackage{amssymb}
\usepackage{nomencl}
\makenomenclature%% This code creates the groups
% -----------------------------------------
\usepackage{etoolbox}
\renewcommand\nomgroup[1]{%\item[\bfseries\ifstrequal{#1}{P}{Physics constants}{%\ifstrequal{#1}{N}{Number sets}{%\ifstrequal{#1}{O}{Other symbols}{}}}%
]}
% -----------------------------------------\begin{document}
\mbox{}\nomenclature[P]{\(c\)}{Speed of light in a vacuum}
\nomenclature[P]{\(h\)}{Planck constant}
\nomenclature[P]{\(G\)}{Gravitational constant}
\nomenclature[N]{\(\mathbb{R}\)}{Real numbers}
\nomenclature[N]{\(\mathbb{C}\)}{Complex numbers}
\nomenclature[N]{\(\mathbb{H}\)}{Quaternions}
\nomenclature[O]{\(V\)}{Constant volume}
\nomenclature[O]{\(\rho\)}{Friction index}\printnomenclature
\end{document}


在这个例子中我们添加了一些分组。代码并不简单,我们使用了命令\ifstrequal{}{}{}{}。前两个参数是用来对比的字符串,如果它们相同,则将它们添加到一个分组中,如果它们不同,则检查下一个嵌套的条件。

需要注意的是,每一个\nomenclature命令都有一个位于方括号之中的额外的参数:前缀。

如果你不能使用etoolbox包,你可以使用ifthen包,后者提供了条件命令\ifthenelse{}{}{}。它的语法更为复杂一点。

\usepackage{ifthen}\renewcommand{\nomgroup}[1]{%\item[\bfseries\ifthenelse{\equal{#1}{P}}{Physics constants}{%\ifthenelse{\equal{#1}{O}}{Other symbols}{%\ifthenelse{\equal{#1}{N}}{Number sets}{}}}%]}

上面的代码将会生成相同的术语集分组。

对物理常数添加单位

你还可以使用siunitx包来添加单位,将单位向对应条目的右侧进行对齐。你需要首先定义nomunit宏指令,下面介绍一个例子:

\documentclass{article}
\usepackage{amssymb}
\usepackage{nomencl}
\usepackage{siunitx}
\usepackage{hyperref}
\makenomenclature
\hypersetup{colorlinks=true,urlcolor=blue,
}
%% This will add the subgroups
%----------------------------------------------
\usepackage{etoolbox}
\renewcommand\nomgroup[1]{%\item[\bfseries\ifstrequal{#1}{A}{Physics Constants}{%\ifstrequal{#1}{B}{Number Sets}{%\ifstrequal{#1}{C}{Other Symbols}{}}}%
]}
%----------------------------------------------%% This will add the units
%----------------------------------------------
\newcommand{\nomunit}[1]{%
\renewcommand{\nomentryend}{\hspace*{\fill}#1}}
%----------------------------------------------\title{Nomenclatures Example}
\author{Overleaf Team}
\date{\today}\begin{document}
\maketitle\noindent This is an example to show how the \texttt{nomencl} package works, with units typeset via the \texttt{siunitx} package. \href{https://www.nist.gov/pml/fundamental-physical-constants}{NIST} was referenced to provide the values of physical constants, and their corresponding units---links are provided via the \texttt{hyperref} package:\nomenclature[A, 02]{\(c\)}{\href{https://physics.nist.gov/cgi-bin/cuu/Value?c}
{Speed of light in a vacuum}
\nomunit{\SI{299792458}{\meter\per\second}}}
\nomenclature[A, 03]{\(h\)}{\href{https://physics.nist.gov/cgi-bin/cuu/Value?h}
{Planck constant}
\nomunit{\SI[group-digits=false]{6.62607015e-34}{\joule\per\hertz}}}
\nomenclature[A, 01]{\(G\)}{\href{https://physics.nist.gov/cgi-bin/cuu/Value?bg}
{Gravitational constant}
\nomunit{\SI[group-digits=false]{6.67430e-11}{\meter\cubed\per\kilogram\per\second\squared}}}
\nomenclature[B, 03]{\(\mathbb{R}\)}{Real numbers}
\nomenclature[B, 02]{\(\mathbb{C}\)}{Complex numbers}
\nomenclature[B, 01]{\(\mathbb{H}\)}{Quaternions}
\nomenclature[C]{\(V\)}{Constant volume}
\nomenclature[C]{\(\rho\)}{Friction index}\printnomenclature\end{document}

对条目进行排序

下面是默认的排序顺序:

\documentclass{article}
\usepackage{nomencl}\makenomenclature\begin{document}
\mbox{}\nomenclature{\(+a\)}{Operator}
\nomenclature{\(2a\)}{Number}
\nomenclature{\(:a\)}{Punctuation symbol}
\nomenclature{\(Aa\)}{Uppercase letter}
\nomenclature{\(aa\)}{Lowercase letter}
\nomenclature{\(\alpha\)}{Greek character}\printnomenclature\end{document}


注意,在上面的例子中,希腊字母在英文字母之前是因为反斜杠\而导致的(例如\alpha)。

类似于分组,你可以添加一个前缀来手动地为术语集条目进行排序:

\documentclass{article}
\usepackage{nomencl}\makenomenclature\begin{document}
\mbox{}\nomenclature[06]{\(+a\)}{Operator}
\nomenclature[03]{\(2a\)}{Number}
\nomenclature[05]{\(:a\)}{Punctuation symbol}
\nomenclature[04]{\(Aa\)}{Uppercase letter}
\nomenclature[01]{\(aa\)}{Lowercase letter}
\nomenclature[02]{\(\alpha\)}{Greek character}\printnomenclature\end{document}


方括号之中的数字代表对应字符的顺序。你也可以同时使用分组和手动排序:

\documentclass{article}
\usepackage{amssymb}
\usepackage{nomencl}
\makenomenclature\usepackage{etoolbox}
\renewcommand\nomgroup[1]{%\item[\bfseries\ifstrequal{#1}{A}{Physics Constants}{%\ifstrequal{#1}{B}{Number Sets}{%\ifstrequal{#1}{C}{Other Symbols}{}}}%
]}\begin{document}
\mbox{}\nomenclature[A, 02]{\(c\)}{Speed of light in a vacuum}
\nomenclature[A, 03]{\(h\)}{Planck constant}
\nomenclature[A, 01]{\(G\)}{Gravitational constant}
\nomenclature[B, 03]{\(\mathbb{R}\)}{Real numbers}
\nomenclature[B, 02]{\(\mathbb{C}\)}{Complex numbers}
\nomenclature[B, 01]{\(\mathbb{H}\)}{Octonions}
\nomenclature[C]{\(V\)}{Constant volume}
\nomenclature[C]{\(\rho\)}{Friction index}\printnomenclature\end{document}


注意,在这里,用来分组的大写字母与我们之前的例子有所不同,因为它们被用来对不同的分组进行排序。

LaTeX 术语集 Nomenclatures相关推荐

  1. SharePoint 2013 术语和术语集介绍

    托管元数据是一个集中管理的术语的分层集合,我们能够定义术语和术语集,然后将其用作 SharePoint Server 2013 中项目的属性.简单的说.术语是一个可与 SharePoint Serve ...

  2. Sharepoint学习笔记—ECM系列--3 从.CSV文件导入术语集(Term Sets)

    Sharepoint2010支持直接从CSV文件导入术语集(Term Sets),也就是说你可以先直接在Excel中创建和编辑术语集,然后保存为.CSV文件,再通过Sharepoint2010管理中心 ...

  3. Sharepoint学习笔记—ECM系列--从.CSV文件导入术语集(Term Sets)

    Sharepoint2010支持直接从CSV文件导入术语集(Term Sets),也就是说你可以先直接在Excel中创建和编辑术语集,然后保存为.CSV文件,再通过Sharepoint2010管理中心 ...

  4. Latex术语表加边框

    Latex术语表加边框 提示:以下是本篇文章正文内容,下面案例可供参考 1.添加宏包 代码如下(示例): \usepackage{framed} 2.测试实例 代码如下(示例): \begin{fra ...

  5. 人工智能论文术语集9

    注:术语来源请参照<人工智能论文术语集> 术语内容 monotonicity 单调性 - 就是函数的单调性(单调递增/单调递减)这是非常重要的函数性质,很多自定义的优化方法都要考虑这个性质 ...

  6. 人工智能论文术语集27

    注:术语来源请参照<人工智能论文术语集> 术语内容 mixed attention block 混合注意力模块 - convBERT的优化方法之一,将原生的attention和基于跨度的动 ...

  7. 人工智能论文术语集25

    注:术语来源请参照<人工智能论文术语集> 术语内容 an associated input image 关联的输入图像 - align elements 对齐元素 - 这里的对齐是指模态元 ...

  8. 人工智能论文术语集13

    注:术语来源请参照<人工智能论文术语集> 术语内容 remains notable 依然显著 - 可以用来形容实验效果. To illustrate this argument 为了证明这 ...

  9. 人工智能论文术语集23

    注:术语来源请参照<人工智能论文术语集> 术语内容 cascading errors 级联损失 - 任何级联模型的设计方案都有可能因为两个模型没有统一的优化目标而产生损失. attenti ...

最新文章

  1. uikit框架开发前期配置及定制主题方法。
  2. token 生成有哪几种常用方式_实现一个线程有哪几种方式,各有什么优缺点,比较常用的是那种?...
  3. Mysql中经常出现的乱码问题
  4. 南昌大学计算机系分数,南昌大学2016年分省分专业录取分数线
  5. react封装函数_React-Router源码解读
  6. Android中适用于ListView、GridView等组件的通用Adapter
  7. linux gui编程语言,使用 Red 语言编写 GUI 应用程序
  8. fragment+viewpager+tablayou实现滑动切换页面
  9. html写出五个文本标签,HTML的几个常用标签
  10. Silverlight 4 的打印支持
  11. 世界级的安卓测试开发流!
  12. apue学习笔记(第六章 系统数据文件和信息)
  13. C语言-流程控制-输出华氏-摄氏温度转换表
  14. m选n组合的两种算法(C语言实现)
  15. 关于Chrome的广告和弹窗拦截插件
  16. 介词 inside like near of off past around
  17. 坚持技术长征,阿里云要定义下一代的云
  18. TCP/IP网络编程之多进程服务端(二)
  19. 终端、控制台、虚拟终端、伪终端的概念,阐述终端与shell的关系
  20. MATLAB基础教程(7)——求解定积分和不定积分

热门文章

  1. js中 slice 用法用法全解析
  2. Java Student类
  3. 英文SCI/EI期刊投稿Reply Letter常用格式总结(转载)
  4. python串口编程视频_python 串口编程
  5. 拓嘉恒业:遇到拼多多恶劣买家,该怎么办
  6. linux操作系统汉化
  7. UI层自动化测试框架(一)-简介和环境搭建
  8. html顶部边距代码_如何在addHTML中设置上下边距
  9. eclipse安装教程(2021最新版)超级易懂到吐血
  10. SAML metadata在线生成工具