forked from iswunistuttgart/isw_smb_diss
-
Notifications
You must be signed in to change notification settings - Fork 0
/
isw_smb_gloss.sty
45 lines (40 loc) · 1.61 KB
/
isw_smb_gloss.sty
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
\usepackage{csquotes} % recommended when working with polyglossia
\usepackage[nonumberlist,acronym,shortcuts,toc,nopostdot,nogroupskip,xindy]{glossaries} % Für Abkürzungsverzeichnis und Symbolverzeichnis
%\setacronymstyle{short-long}
\glsaddkey{unit}{\glsentrytext{\glslabel}}{\glsentryunit}{\GLsentryunit}{\glsunit}{\Glsunit}{\GLSunit}
% adapted from http://tex.stackexchange.com/a/161604
\newglossarystyle{symbunitlong}{%
\renewenvironment{theglossary}%
{\begin{longtable}[l]{llp{0.7\linewidth}p{\glspagelistwidth}}}%
{\end{longtable}}%
\renewcommand*{\glossaryheader}{}%
\renewcommand*{\glsgroupheading}[1]{}%
\renewcommand{\glossentry}[2]{%
\glsentryitem{##1}\glstarget{##1}{\glossentryname{##1}} &
\glsentryunit{##1} &
\glossentrydesc{##1} &
##2\tabularnewline
}%
\renewcommand{\subglossentry}[3]{%
&
\glssubentryitem{##2}%
\glsentryunit{##2} &
\glstarget{##2}{\strut}\glossentrydesc{##2} & ##3\tabularnewline
}%
\renewcommand*{\glsgroupskip}{%
\ifglsnogroupskip\else & & &\tabularnewline\fi}%
}
\newglossarystyle{symbunitlonga}{%
\setglossarystyle{long3col}% base this style on the list style
\renewenvironment{theglossary}{% Change the table type --> 3 columns
{\begin{longtable}{lp{\glsdescwidth}p{\glspagelistwidth}}}%
{\end{longtable}}%
\begin{longtable}{lp{0.6\glsdescwidth}>{\centering\arraybackslash}p{2cm}}}%
{\end{longtable}}%
\renewcommand*{\glossentry}[2]{% Change the displayed items
\glstarget{##1}{\glossentryname{##1}} %
& \glsunit{##1}
& \glossentrydesc{##1} \tabularnewline
}
}
\makeglossaries