<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">% 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={ &lt; a,A &lt; b,B &lt; e,E &lt; l,L &lt; ll,Ll,LL &lt; z,Z}] 
\begin{document}
\printunsrtglossaries
\end{document}
</pre></body></html>