I am trying to incorporate bib2gls into glossaries managment in my project, however I hit into trouble when using my native language (czech) and its diacritics (as far as my knowledge goes, those are non-ASCII, but Unicode acceptable characters).
Showing those explicitly, its "ěščřžýáíéďťň."
As far as my troubleshooting abilities go, I was able to track down the source of the problem in .glstex file, which unable to accept the .bib file with non-ASCII characters.
I hit upon package newunicode, answer might be there, but I dont know how to use it for my specific case.
I am lloking for solution working in XeLaTeX and LuaLaTeX ideally, or at least one of those. I tryed combination of encodings-package as far as my knowledge goes, but none led to correct display of all the characters (glyphs).
MWE:
% !TEX encoding = UTF-8 Unicode
%% Pokyny pro arara:
% arara: xelatex
% arara: bib2gls if found("aux", "glsxtr@resource")
% arara: xelatex
% arara: bib2gls if found("aux", "glsxtr@resource")
% arara: xelatex
% arara: xelatex
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\documentclass [a4paper, 12pt, twoside,openright] {book} %nastavení knihy
\usepackage [czech] {babel}
%\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{fontspec}
\usepackage{microtype}
\usepackage [a4paper, twoside, inner=2.5cm, outer=2.5cm, bottom=3cm] {geometry}
\usepackage{import}
\usepackage{filecontents}
\usepackage[record, nopostdot, automake, abbreviations,%
nostyles, stylemods={all}%
]{glossaries-extra}
\GlsXtrLoadResources[selection={all},%
src={testgls},%
save-locations=false,%
]
%Glossary entries
\begin{filecontents}{testgls.bib}
% !TEX encoding = UTF-8 Unicode
@entry{nonasciichartest,
name={ačšěřžýáíéťďň},
description={ačšěřžýáíéťďň}
}
@entry{asciitest,
name={ASCII test},
description={abcdefghijklmopqrstuvwxyz}
}
\end{filecontents}{testgls.bib}
\begin{document}
\nonfrenchspacing
%\pagenumbering{roman} %nutné pro kompilovatelnost referencí - hned od začátku nastavit číslování stránek
\thispagestyle{empty}
\printunsrtglossary[type={main}, style={altlistgroup}, title=Slovníček pojmů, toctitle=Slovníček pojmů]
\clearpage
Standard text:
ěščřžýáíéťďň
\end{document}
Final note: I also tryed to use magic comments, which also did not led to working solution. Theyre use might be even redundant :)
Thank you very much for any help, tips regarding this complication. Bib2gls is an amazing tool that I would like to learn to use.
Tomas
.bib
file, you could try if that changes anything. – Marijn May 7 at 15:35