我試圖在不將符號分組的情況下獲得命名法(如羅馬和希臘符號等)
我認為這是一個非常簡單的解決方案,但我對程式碼的理解不足以自己找到它。有人可以幫我嗎?我放入了一張圖片和我找到的代碼副本(感謝 Andrew Swann他的例子)
\documentclass{article}
\usepackage{nomencl,etoolbox,ragged2e,siunitx,mathtools}
\DeclarePairedDelimiter{\abs}{\lvert}{\rvert}
\newcommand{\DimensUnits}[2]{\hfill\makebox[8em]{#1\hfill}%
\makebox[4em]{#2\hfill}\ignorespaces}
\newcommand{\DefinitionCol}[1]{\hfill\parbox[t]{12em}{#1}\ignorespaces}
\newcommand{\nomsubtitle}[1]{\item[\large\bfseries #1]}
\renewcommand\nomgroup[1]{\def\nomtemp{\csname nomstart#1\endcsname}\nomtemp}
\newcommand{\nomstartR}{\nomsubtitle{Roman Symbols}%
\item[\bfseries Symbol]%
\textbf{Description}\DimensUnits{\textbf{Dimensions}}{\textbf{Units}}}
\newcommand{\nomstartG}{\nomsubtitle{Greek Symbols}%
\item[\bfseries Symbol]%
\textbf{Description}\DimensUnits{\textbf{Dimensions}}{\textbf{Units}}}
\newcommand{\nomstartD}{\nomsubtitle{Dimensionless Numbers}%
\item[\bfseries Symbol]\textbf{Description}\DefinitionCol{\textbf{Definition}}}
\renewcommand*{\nompreamble}{\markboth{\nomname}{\nomname}}
\newcommand{\nomdescr}[1]{\parbox[t]{4cm}{\RaggedRight #1}}
\newcommand{\nomwithdim}[5]{\nomenclature[#1]{#2}%
{\nomdescr{#3}\DimensUnits{#4}{#5}}}
\newcommand{\nomtypeR}[5][]{\nomwithdim{R#1}{#2}{#3}{#4}{#5}}
\newcommand{\nomtypeG}[5][]{\nomwithdim{G#1}{#2}{#3}{#4}{#5}}
\newcommand{\nomtypeD}[4][]{\nomenclature[D#1]{#2}{\nomdescr{#3}\DefinitionCol{#4}}}
\makenomenclature
\begin{document}
\mbox{}
\nomtypeR[abc]{\(a,b,c\)}{half axes of ellipsoid}{L}{\si{m}}
\nomtypeR[C]{\(C\)}{dimensionless coefficient (e.g.\ for drag model)}{--}{1}
\nomtypeG{\( \varepsilon_0 \)}{vacuum permittivity}{F/L}{\si{F.m^{-1}}}
\nomtypeD{\( \mathcal A_r \)}{Archimedes number}{\(\displaystyle
\frac{d^3g\rho_c\abs{\Delta\rho}}{\mu_c^2} = \sqrt{\frac{\mathcal
E_0^3}{\mathcal M_0}} \)}
\nomtypeR[CC]{\(\mathbf{C}\)}{another dimensionless coefficient}{--}{1}
\nomtypeR[A]{\(A\)}{a dimensionless coefficient}{--}{1}
\nomtypeR[Z]{\(Z\)}{a dimensionless coefficient}{--}{1}
\printnomenclature[6em]
\end{document}
這會給出這樣的東西
我希望有人能幫助我。
謝謝!
答案1
當前版本nomenclature
提供了該nomentbl
選項,這使得這些事情變得相當簡單。預設情況下,該表的格式為「符號、描述、單位、註釋、參考」。使用我們的預設格式
\documentclass{article}
\usepackage[nomentbl]{nomencl}
\usepackage{etoolbox,ragged2e,siunitx,mathtools}
\DeclarePairedDelimiter{\abs}{\lvert}{\rvert}
\renewcommand*{\nompreamble}{\markboth{\nomname}{\nomname}}
\makenomenclature
\begin{document}
\null
\pagestyle{empty}
\nomenclature[abc]{$a,b,c$}{half axes of ellipsoid}{\meter}{$L$}
\nomenclature[C]{$C$}{dimensionless coefficient (e.g.\ for drag model)}{{dimensionless}}{}
\nomenclature{$ \varepsilon_0 $}{vacuum permittivity}{F\per\meter}{$F/L$}
\nomenclature{$ \mathcal A_r $}{Archimedes number}{{dimensionless}}{$ \frac{d^3g\rho_c\abs{\Delta\rho}}{\mu_c^2} = \sqrt{\frac{\mathcal
E_0^3}{\mathcal M_0}}$}
\nomenclature[CC]{$\mathbf{C}$}{another dimensionless coefficient}{{dimensionless}}{}
\nomenclature[A]{$A$}{a dimensionless coefficient}{{dimensionless}}{}
\nomenclature[Z]{$Z$}{a dimensionless coefficient}{{dimensionless}}{}
\printnomenclature
\end{document}