From 117a04748ff3e0417f07488588f368a6fd21241a Mon Sep 17 00:00:00 2001 From: Zeping Lee Date: Mon, 18 Nov 2024 17:20:05 +0800 Subject: [PATCH] Test nomenclature grouping --- chapters/notation.tex | 35 ++++++++++------------------------- ustcsetup.tex | 11 +++++++++++ 2 files changed, 21 insertions(+), 25 deletions(-) diff --git a/chapters/notation.tex b/chapters/notation.tex index e0e4a36b..7b13a7aa 100644 --- a/chapters/notation.tex +++ b/chapters/notation.tex @@ -1,27 +1,12 @@ % !TeX root = ../main.tex -\begin{notation} - - \begin{notationlist}{2em} - \item[$\displaystyle a$] The number of angels per unit area - \item[$\displaystyle N$] The number of angels per needle point - \item[$\displaystyle A$] The area of the needle point - \item[$\displaystyle \sigma$] The total mass of angels per unit area - \item[$\displaystyle m$] The mass of one angel - \item[$\displaystyle \sum_{i=1}^n a_i$] The sum of $a_i$ - \end{notationlist} - -\end{notation} - - - -% 也可以使用 nomencl 宏包 - -% \printnomenclature - -% \nomenclature{$\displaystyle a$}{The number of angels per unit are} -% \nomenclature{$\displaystyle N$}{The number of angels per needle point} -% \nomenclature{$\displaystyle A$}{The area of the needle point} -% \nomenclature{$\displaystyle \sigma$}{The total mass of angels per unit area} -% \nomenclature{$\displaystyle m$}{The mass of one angel} -% \nomenclature{$\displaystyle \sum_{i=1}^n a_i$}{The sum of $a_i$} +\printnomenclature + +\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} diff --git a/ustcsetup.tex b/ustcsetup.tex index 0ee1b6bf..fd637a54 100644 --- a/ustcsetup.tex +++ b/ustcsetup.tex @@ -73,6 +73,17 @@ % 配置图片的默认目录 \graphicspath{{figures/}} +\usepackage{nomencl} +\makenomenclature + +\usepackage{etoolbox} +\renewcommand\nomgroup[1]{% + \item[\bfseries + \ifstrequal{#1}{P}{Physics constants}{% + \ifstrequal{#1}{N}{Number sets}{% + \ifstrequal{#1}{O}{Other symbols}{}}}% +]} + % 数学命令 \makeatletter \newcommand\dif{% % 微分符号