0

I adapted the nomenclature from this post here: How to achieve nomenclature entries like: symbol, Description, Dimension and unit, etc? but I had difficulties adapting it for my own purpose.

This is the code I am currently working with:

\newcommand{\nomunit}[1]{\hfill\makebox[2em]{#1\hfill}\ignorespaces}
\newcommand{\insertnomheaders}{\item[\bfseries Symbol]%
\textbf{Description}\nomunit{\textbf{Units}}}

\renewcommand\nomgroup[1]{% \item[\large\bfseries \ifstrequal{#1}{A}{Acronyms}{% \ifstrequal{#1}{R}{Roman Symbols}{% \ifstrequal{#1}{G}{Greek Symbols}}}] \insertnomheaders}

\renewcommand*{\nompreamble}{\markboth{\nomname}{\nomname}}

\newcommand{\nomdescr}[1]{\parbox[t]{12cm}{\RaggedRight #1}} \newcommand{\nomwithdim}[4]{\nomenclature[#1]{#2}% {\nomdescr{#3}\nomunit{#4}}} \makenomenclature

\begin{document} \mbox{} \nomwithdim{R}{(a,b,c)}{half axes of ellipsoid}{\si{m}} \nomwithdim{R}{(C)}{dimensionless coefficient (e.g.\ for drag model)} \nomwithdim{G}{( \varepsilon_0 )}{vacuum permittivity}

\printnomenclature[6em] \end{document}

What I want to have in the end is "Acronyms" with only symbol and description without units and Greek & Roman symbols with symbol description and units.

The original design is fine but I have difficulties with deleting the dimension and for acronyms both dimension and units without getting errors.

This is how it should look like

JamesT
  • 3,169

1 Answers1

0

I found a solution for my problem. I figured out that changing the code is harder than rewriting it. In case you are interested, here is what I did:

\DeclarePairedDelimiter{\abs}{\lvert}{\rvert}
\newcommand{\units}[1]{\hfill\makebox[2em]{#1\hfill}\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}\units{\textbf{Unit}}}

\newcommand{\nomstartG}{\nomsubtitle{Greek Symbols}%
\item[\bfseries Symbol]%
\textbf{Description}\units{\textbf{Unit}}}

\newcommand{\nomstartA}{\nomsubtitle{Acronyms}%
\item[\bfseries Acronym]\textbf{Description}}


\renewcommand*{\nompreamble}{\markboth{\nomname}{\nomname}}

\newcommand{\nomdescr}[1]{\parbox[t]{12cm}{\RaggedRight #1}}

\newcommand{\nomtypeA}[3][]{\nomenclature[A#1]{#2}{\nomdescr{#3}}}
\newcommand{\nomwithunits}[4]{\nomenclature[#1]{#2}%
{\nomdescr{#3}\units{#4}}} %neuer Befehl zum Gesamtergebnis der Symbole
\newcommand{\nomtypeR}[4][]{\nomwithunits{R#1}{#2}{#3}{#4}}
\newcommand{\nomtypeG}[4][]{\nomwithunits{G#1}{#2}{#3}{#4}}


\makenomenclature

\begin{document}

\mbox{}

\nomtypeA{Cd}{Cadmium}
\nomtypeA{\ce{CdAc2}}{Cadmium acetat dihydrate}
\nomtypeA{CdSe}{Cadmium selenide}
\nomtypeA{i.e.}{For example}
\nomtypeA{ODE}{1-Octadecene}
\nomtypeA{QD}{Quantum Dots}
\nomtypeA{Se}{Selenium}
\nomtypeA{TDPA}{Tetradecylphosphonic acid}
\nomtypeA{TOP}{Trioctylphosphine}

\nomtypeG{$\alpha$}{Angle of a triangle}{-}

\nomtypeR{A}{This is a test}{kg}
{end{document}