1

I've got a problem with sorting glossary entries in my paper as follows: đ is supposed to come before p, but glossaries-extra doesn't recognize that.

Here is my MWE:

\documentclass[12pt, a4paper, oneside]{book}
\usepackage[utf8]{vietnam}
\usepackage[automake]{glossaries-extra}
\makeglossaries
\newglossaryentry{bien dia phuong}
{name = biến địa phương, 
description = {some texts go here}
}
\newglossaryentry{bien toan cuc}
{name = biến toàn cục, 
description = {here is some texts}      
}
\newglossaryentry{bien phi dia phuong}
{name = biến phi địa phương, 
description = {there texts go.  
}
}
\newglossaryentry{bien}
{name = biến, 
description = {label for an information}                
}
%\addcontentsline{toc}{Forewordt}{#1}

\begin{document} This is \gls{bien dia phuong} \gls{bien phi dia phuong} \gls{bien toan cuc}

\gls{bien} là một nhãn để gán giá trị. \printglossary[nonumberlist] \end{document}

And here is the output with p coming before đ: enter image description here

I want to sort it in alphabetical order:

biến 
biến địa phương 
biến phi địa phương 
biến toàn cục 
Marijn
  • 37,699
trequartista
  • 1,891
  • 1
    It's not clear what order you want the entries to be in. All you said is that "biến địa..." should come before "biến phi...". Do you want the entries to be in alphabetical order ("biến", "biến địa...", "biến phi...", "biến toàn...")? In order of definition ("biến địa...", "biến toàn...", "biến phi...", "biến")? In order of usage ("biến địa...", "biến phi...", "biến toàn...", "biến")? – bonk Jan 21 '24 at 10:07
  • Sorry, I've updated my question. – trequartista Jan 21 '24 at 14:30

1 Answers1

4

If you read the glossaries package documentation, you'll see that the package recommends that you use xindy for indexing:

If you are writing in a language that uses an extended Latin alphabet or non-Latin alphabet it’s best to use Option 3 (xindy) or Option 4 (bib2gls)...

This was already pointed out to you in a previous question of yours. Just add the xindy package option to glossaries-extra to use xindy, and refer to the glossaries or glossaries-extra package documentation if you need more details on using xindy.

\usepackage[automake, xindy]{glossaries-extra}

Correctly sorted glossary

bonk
  • 885