Template_Summary/Nomenclature.tex

62 lines
2.6 KiB
TeX

% add glossary for nomenclature
\newglossary{nomenclature}{nom}{ncl}{Nomenklatur}
\shorthandon{"}
% {{{ Nomencalture Commands %
% {{{ Nomencalture Commands %
%add new key
%\glsaddstoragekey{unit}{}{\glsentryunit}
\glsnoexpandfields
%\newcommand{\newnom}[5]{
\newcommand{\newnom}[4]{
\newglossaryentry{#1}{
name={#2},
symbol={#3},
description={#4},
%unit={#5},
type=nomenclature,
sort={#1}
}
}
%use nomenclature entry (name + symbol) nomF=>First letter upper case
\newcommand{\nomf}[1]{\glsentryname{#1} \texorpdfstring{\glslink{#1}{\ensuremath{\glsentrysymbol{#1}}}}{}\xspace}
\newcommand{\nomF}[1]{\Glsentryname{#1} \texorpdfstring{\glslink{#1}{\ensuremath{\glsentrysymbol{#1}}}}{}\xspace}
%use nomenclature entry (name) nomS=>First letter upper case
\newcommand{\noms}[1]{\glsentryname{#1}\xspace}
\newcommand{\nomS}[1]{\Glsentryname{#1}\xspace}
%use nomenclature entry (symbol only)
\newcommand{\nomsym}[1]{\texorpdfstring{\glslink{#1}{\ensuremath{\glsentrysymbol{#1}}}}{#1}\xspace}
%use nomenclature entry (use in equation)
\newcommand{\nomeq}[1]{\glslink{#1}{\glsentrysymbol{#1}}}
% }}} Nomencalture Commands %
\newnom{example_nom}{Example Nom}{e^xmpl}{Example Nomenclature Entry}
\shorthandoff{"}
%custom style
\newglossarystyle{customnomenclature}{%
\setglossarystyle{long4col}% base this style on the list style
\renewcommand{\glsgroupskip}{}%avoids grouping the elements by alphabetical order
\renewenvironment{theglossary}{% Change the table type --> 4 columns
\renewcommand*{\arraystretch}{1.5}
%\begin{longtable}{>{\centering}p{.1\textwidth} >{\arraybackslash}p{.225\textwidth} p{.475\textwidth}>{\centering\arraybackslash}p{.1\textwidth}}}%
\begin{longtable}{>{\centering}p{.1\textwidth} >{\arraybackslash}p{.225\textwidth} p{.575\textwidth}}}%
{\end{longtable}}%
%
\renewcommand*{\glossaryheader}{% Change the table header
%\bfseries\large Symbol & \bfseries\large Bezeichnung & \large\bfseries Beschreibung & \large\bfseries Einheit\\
\bfseries\large Symbol & \bfseries\large Bezeichnung & \large\bfseries Beschreibung\\
\hline\endhead}%
\renewcommand*{\glossentry}[2]{% Change the displayed items
%\boldmath\ensuremath{\glossentrysymbol{##1}}
\ensuremath{\glossentrysymbol{##1}}
& \glstarget{##1}{\hspace*{0pt}\glossentryname{##1}} %
& \glossentrydesc{##1}
%& \glsentryunit{##1}
\tabularnewline
}%
}