| 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[12pt,a4paper]{article} |
| 6 |
|
| 7 |
\usepackage[T1]{fontenc} |
| 8 |
|
| 9 |
\usepackage[record,% use bib2gls |
| 10 |
nostyles,% don't load default styles |
| 11 |
% load glossary-bookindex.sty and patch styles: |
| 12 |
stylemods={bookindex}, |
| 13 |
style=bookindex]{glossaries-extra} |
| 14 |
|
| 15 |
% abbreviation style must be set before \GlsXtrLoadResources |
| 16 |
\setabbreviationstyle[bacteria]{long-only-short-only} |
| 17 |
|
| 18 |
\GlsXtrLoadResources[ |
| 19 |
src=bacteria,% data in bacteria.bib |
| 20 |
category=bacteria, |
| 21 |
abbreviation-sort-fallback=long |
| 22 |
] |
| 23 |
|
| 24 |
\newcommand{\bacteriafont}[1]{\emph{#1}} |
| 25 |
|
| 26 |
\glssetcategoryattribute{bacteria}{textformat}{bacteriafont} |
| 27 |
\glssetcategoryattribute{bacteria}{glossnamefont}{bacteriafont} |
| 28 |
|
| 29 |
\renewcommand*{\glsxtrbookindexname}[1]{% |
| 30 |
\glsifcategory{#1}{bacteria} |
| 31 |
{\glossentrynameother{#1}{long}}% |
| 32 |
{\glossentryname{#1}}% |
| 33 |
} |
| 34 |
|
| 35 |
\begin{document} |
| 36 |
\section{First Use} |
| 37 |
|
| 38 |
\gls{cbotulinum}, \gls{pputida}, \gls{cperfringens}, |
| 39 |
\gls{bsubtilis}, \gls{ctetani}, \gls{pcomposti}, |
| 40 |
\gls{pfimeticola}, \gls{cburnetii}, \gls{raustralis}, |
| 41 |
\gls{rrickettsii}. |
| 42 |
|
| 43 |
\section{Next Use} |
| 44 |
|
| 45 |
\gls{cbotulinum}, \gls{pputida}, \gls{cperfringens}, |
| 46 |
\gls{bsubtilis}, \gls{ctetani}, \gls{pcomposti}, |
| 47 |
\gls{pfimeticola}, \gls{cburnetii}, \gls{raustralis}, |
| 48 |
\gls{rrickettsii}. |
| 49 |
|
| 50 |
\printunsrtglossary[title={Bacteria Index}] |
| 51 |
\end{document} |