% This file is embedded in glossaries-extra-manual.pdf 
% Example 162 Using bib2gls: simple custom sort rule
% Label: "ex:bib2glscustomsort"
% arara: pdflatex
% arara: bib2gls: { group : on }
% arara: pdflatex
% arara: pdfcrop
\documentclass[12pt]{article}
\pagestyle{empty}
\begin{filecontents*}{animals.bib}
@index{bee}
@index{lion}
@index{ant}
@index{cow}
@index{goose}
@index{zebu}
@index{egret}
@index{elk}
@index{llama}
@index{lynx}
@index{bat}
\end{filecontents*}
\usepackage[record,nostyles,stylemods=bookindex,style=bookindex]
 {glossaries-extra} 

\newcommand{\bibglssetlastgrouptitle}[2]{%
 \glsxtrsetgrouptitle{#1#2}{Other}%
} \GlsXtrLoadResources[src={animals},selection=all,
 sort=custom,sort-rule={ < a,A < b,B < e,E < l,L < ll,Ll,LL < z,Z}] 
\begin{document}
\printunsrtglossaries
\end{document}
