diff options
Diffstat (limited to 'Master/texmf-dist/doc/support/bib2gls/examples/sample-units2.tex')
-rw-r--r-- | Master/texmf-dist/doc/support/bib2gls/examples/sample-units2.tex | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/support/bib2gls/examples/sample-units2.tex b/Master/texmf-dist/doc/support/bib2gls/examples/sample-units2.tex new file mode 100644 index 00000000000..d4bba821f1d --- /dev/null +++ b/Master/texmf-dist/doc/support/bib2gls/examples/sample-units2.tex @@ -0,0 +1,51 @@ +% This file is public domain. See the "Examples" chapter +% in the bib2gls user manual for a more detailed description +% of this file. + +\documentclass[a4paper]{report} + +\usepackage{siunitx} +\usepackage[record,% use bib2gls + nomain,% don't define 'main' glossary + section,% use \section* for glossary headings + nostyles,% don't load default styles + stylemods={mcols},% load glossary-mcols.sty and patch + style=mcolindex]{glossaries-extra} + +\newglossary*{baseunits}{Base Units} +\newglossary*{derivedunits}{Derived Units} + +\GlsXtrLoadResources[ + src={baseunits}, + type=baseunits, + % make @unit act like @symbol: + entry-type-aliases={unit=symbol}, + field-aliases={ + unitname=name, + unitsymbol=symbol, + measurement=description + }, + symbol-sort-fallback=name, + selection={all} +] + +\GlsXtrLoadResources[ + src={derivedunits}, + type=derivedunits, + % make @measurement act like @symbol: + entry-type-aliases={measurement=symbol}, + field-aliases={ + unitname=name, + unitsymbol=symbol, + measurement=description + }, + symbol-sort-fallback=name, + selection={all} +] + +\begin{document} +\chapter*{Glossaries} + +\printunsrtglossary[type=baseunits,nogroupskip] +\printunsrtglossary[type=derivedunits,style=indexgroup] +\end{document} |