| 1 |
% This file is embedded in glossaries-extra-manual.pdf |
| 2 |
% Example 141 Displaying sorted glossaries with groups using bib2gls |
| 3 |
% Label: "ex:bib2glsgrp" |
| 4 |
% arara: pdflatex |
| 5 |
% arara: bib2gls: { group: on } |
| 6 |
% arara: pdflatex |
| 7 |
% arara: pdfcrop |
| 8 |
\documentclass[12pt]{article} |
| 9 |
\pagestyle{empty} |
| 10 |
\begin{filecontents*}{animalfamilies.bib} |
| 11 |
@index{waterfowl,user1={Anseriformes}} |
| 12 |
@index{ant,user1={Formicidae}} |
| 13 |
@index{adder,user1={Vipera berus}} |
| 14 |
@index{duck,parent={waterfowl},user1={Anatidae}} |
| 15 |
@index{zebra,user1={Hippotigris}} |
| 16 |
@index{aardvark,user1={Orycteropus afer}} |
| 17 |
@index{gazelle,user1={Gazella}} |
| 18 |
@index{mallard,parent={duck},user1={Anas platyrhynchos}} |
| 19 |
\end{filecontents*} |
| 20 |
\usepackage[record,stylemods=bookindex,style=bookindex]{glossaries-extra} |
| 21 |
\newglossary*{another}{Another Glossary} |
| 22 |
\GlsXtrLoadResources[selection=all,% select all entries |
| 23 |
src={animalfamilies},% identify bib file(s) |
| 24 |
sort=en-GB,% sort method |
| 25 |
secondary={la:user1:another}% sort again and copy to `another' |
| 26 |
] |
| 27 |
\glsdefpostname{index}{ |
| 28 |
(\emph{\glsentryuseri{\glscurrententrylabel}})} |
| 29 |
\begin{document} |
| 30 |
\printunsrtglossary |
| 31 |
\printunsrtglossary[type=another] |
| 32 |
\end{document} |