| 1 |
% This file is embedded in glossaries-extra-manual.pdf |
| 2 |
% Example 162 Using bib2gls: simple custom sort rule |
| 3 |
% Label: "ex:bib2glscustomsort" |
| 4 |
% arara: pdflatex |
| 5 |
% arara: bib2gls: { group : on } |
| 6 |
% arara: pdflatex |
| 7 |
% arara: pdfcrop |
| 8 |
\documentclass[12pt]{article} |
| 9 |
\pagestyle{empty} |
| 10 |
\begin{filecontents*}{animals.bib} |
| 11 |
@index{bee} |
| 12 |
@index{lion} |
| 13 |
@index{ant} |
| 14 |
@index{cow} |
| 15 |
@index{goose} |
| 16 |
@index{zebu} |
| 17 |
@index{egret} |
| 18 |
@index{elk} |
| 19 |
@index{llama} |
| 20 |
@index{lynx} |
| 21 |
@index{bat} |
| 22 |
\end{filecontents*} |
| 23 |
\usepackage[record,nostyles,stylemods=bookindex,style=bookindex] |
| 24 |
{glossaries-extra} |
| 25 |
|
| 26 |
\newcommand{\bibglssetlastgrouptitle}[2]{% |
| 27 |
\glsxtrsetgrouptitle{#1#2}{Other}% |
| 28 |
} \GlsXtrLoadResources[src={animals},selection=all, |
| 29 |
sort=custom,sort-rule={ < a,A < b,B < e,E < l,L < ll,Ll,LL < z,Z}] |
| 30 |
\begin{document} |
| 31 |
\printunsrtglossaries |
| 32 |
\end{document} |