-
Notifications
You must be signed in to change notification settings - Fork 0
/
glossaries-UoB.sty
67 lines (58 loc) · 2.14 KB
/
glossaries-UoB.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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
%
% UoB-Thesis/glossaries-UoB.sty
%
% Developed by Gregory J. L. Tourte <[email protected]>
% Copyright (c) 2018-2024
% All rights reserved.
%
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{glossaries-UoB}[2018/08/01 v1.1 University of Bristol PhD ]
%\RequirePackage[shortcuts=acro]{glossaries-extra}
%\RequirePackage{tabu}
%\RequirePackage{longtable}
\RequirePackage{xltabular}
\glsdisablehyper
% https://tex.stackexchange.com/questions/269565/glossaries-how-to-customize-list-of-symbols-with-additional-column-for-units
\newglossary[slg]{symbolslist}{syi}{syg}{List of Symbols}
\glssetnoexpandfield{unit}
\glsaddkey{unit}{---}{\glsentryunit}{\GLsentryunit}{\glsunit}{\Glsunit}{\GLSunit}
%\glspatchtabularx
\newglossarystyle{symbunitlong}{%
\setglossarystyle{long3col}% base this style on the list style
\renewenvironment{theglossary}{% Change the table type --> 3 columns
% \tabulinesep=1mm
\begin{xltabular}[l]{\textwidth}{@{}l @{\hskip 10mm} X[l] c @{}}}%
{\end{xltabular}}%
%
\renewcommand*{\glossaryheader}{% Change the table header
\rowfont{\bfseries}
Sign & Description & Unit \\
\midrule
\endhead
\addlinespace
\multicolumn{3}{@{}r@{}}{\footnotesize Continued on next page\dots}\\
\endfoot
\endlastfoot
}
\renewcommand*{\glossentry}[2]{% Change the displayed items
\glstarget{##1}{\glossentryname{##1}} %
& \glossentrydesc{##1}% Description
& \glsunit{##1} \tabularnewline
}
}
\newglossarystyle{acrlong}{%
\setglossarystyle{long3col}% base this style on the list style
\renewenvironment{theglossary}{% Change the table type --> 3 columns
% \tabulinesep=1mm
\begin{xltabular}{\textwidth}{@{}l X[l] >{\raggedleft}p{1.1\glspagelistwidth} @{}}}%
{\end{xltabular}}%
%
\renewcommand*{\glossaryheader}{}% Change the table header
\renewcommand*{\glossentry}[2]{% Change the displayed items
\glsentryitem{##1}\glstarget{##1}{\glossentryname{##1}} %
& \glossentrydesc{##1}% Description
& \mbox{##2} \tabularnewline
}
}
% vim: ft=tex ts=4 sw=4 et
% vim600: fdl=0 fdm=marker fdc=3