| 1 |
% This file is public domain. See the "Examples" chapter |
| 2 |
% in the bib2gls user manual for a more detailed description |
| 3 |
% of this file. |
| 4 |
|
| 5 |
\documentclass[a4paper]{report} |
| 6 |
|
| 7 |
\usepackage{siunitx} |
| 8 |
\usepackage[record,% use bib2gls |
| 9 |
nomain,% don't define 'main' glossary |
| 10 |
section,% use \section* for glossary headings |
| 11 |
nostyles,% don't load default styles |
| 12 |
stylemods={mcols},% load glossary-mcols.sty and patch |
| 13 |
style=mcolindex]{glossaries-extra} |
| 14 |
|
| 15 |
\newglossary*{baseunits}{Base Units} |
| 16 |
\newglossary*{derivedunits}{Derived Units} |
| 17 |
|
| 18 |
\GlsXtrLoadResources[ |
| 19 |
src={baseunits}, |
| 20 |
type=baseunits, |
| 21 |
% make @unit act like @symbol: |
| 22 |
entry-type-aliases={unit=symbol}, |
| 23 |
field-aliases={ |
| 24 |
unitname=name, |
| 25 |
unitsymbol=symbol, |
| 26 |
measurement=description |
| 27 |
}, |
| 28 |
symbol-sort-fallback=name, |
| 29 |
selection={all} |
| 30 |
] |
| 31 |
|
| 32 |
\GlsXtrLoadResources[ |
| 33 |
src={derivedunits}, |
| 34 |
type=derivedunits, |
| 35 |
% make @measurement act like @symbol: |
| 36 |
entry-type-aliases={measurement=symbol}, |
| 37 |
field-aliases={ |
| 38 |
unitname=name, |
| 39 |
unitsymbol=symbol, |
| 40 |
measurement=description |
| 41 |
}, |
| 42 |
symbol-sort-fallback=name, |
| 43 |
selection={all} |
| 44 |
] |
| 45 |
|
| 46 |
\begin{document} |
| 47 |
\chapter*{Glossaries} |
| 48 |
|
| 49 |
\printunsrtglossary[type=baseunits,nogroupskip] |
| 50 |
\printunsrtglossary[type=derivedunits,style=indexgroup] |
| 51 |
\end{document} |