#StackBounty: #sorting #grouping #glossaries-extra #bib2gls Keep sorting local to groups for symbols in glossaries-extra with bib2gls

Bounty: 50

Consider this example:


name = {ensuremath{alpha}},
description = {angle},
group = {greek},
name = {ensuremath{theta}},
description = {for testing},
group = {greek},
name = {ensuremath{D}},
description = {diffusion factor},
group = {roman},
name = {ensuremath{mathrm{cor}}},
description = {corrected},
group = {sub},
name = {ensuremath{B}},
description = {blockage factor},
group = {roman},

GlsXtrLoadResources % input file created by bib2gls
[% instructions to bib2gls:
    type = symbols,
    selection = {all},%
%   symbol-sort-fallback={name},%turning off makes it worse


glsxtrsetgrouptitle{roman}{Roman Letters}
glsxtrsetgrouptitle{greek}{Greek Letters}

printunsrtglossaries % iterate over all defined entries

It produces this results:

enter image description here

It is quickly clear what is wrong here. The sorting works globally when building the document as

pdflatex document
bib2gls document
pdflatex document

as shown here. Running bib2gls -g document did not seem to make a difference.

How can the groups be kept separate and sorting local to them, without mixing of groups?

A possible workaround I thought of would be to have different types for Roman, Greek etc. and then call them all manually (as opposed to one type for symbols). But that seems not the right way. I feel like I am very close to the solution, but the last steps I could not find help with in the doc.

Get this bounty!!!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.