0

Why does the following compile with lualatex and fail with pdflatex when setting entry label to be Unicode character?

% arara: pdflatex: { options: [ '-synctex=1', '-shell-escape' ]}
% arara: makeglossaries
% arara: pdflatex: { options: [ '-synctex=1', '-shell-escape' ]}

\documentclass{elsarticle}

\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}

\usepackage{booktabs}
\usepackage{calc,siunitx}
\sisetup{load-configurations = abbreviations}
\usepackage[automake,stylemods,symbols,
abbreviations,
xindy={codepage=utf8, language=greek, glsnumbers=false}
]{glossaries-extra}

\makeglossaries
\glsnoexpandfields
\glsxtrnewsymbol[text={\alpha},description={spacing},symbol={[\si{\um}]},type=main]{α}{$\alpha$}

\begin{document}
    \glsaddall
    \printglossary[title=Nomenclature]
\end{document}
  • Probably for the same reason \documentclass{article}\begin{document}α\end{document} fails with pdflatex? It just doesn't know what to do with α. – schtandard Jul 24 at 20:36
  • @schtandard so, how to fix it while using a Unicode character in case of pdflatex? – Diaa Jul 24 at 20:39
  • I think you misunderstand, pdftex cannot do that. One of the big selling points of luatex and xetex is native Unicode support, which pdftex just does not have. Why do you insist both on using pdftex and typing α? – schtandard Jul 24 at 20:48
  • 1
    @schtandard that's rather misleading the inputenc support in (pdf)latex would allow an input α alpha to be defined, just as accented latin is defined. – David Carlisle Jul 24 at 20:51
  • @DavidCarlisle Ok, maybe my choice of words was a bit too absolute (after all, pdftex can do anything, even control a mars rover). What I meant was that pdftex is only set up with very limited Unicode support and the need for more would be reason enough to switch to luatex, I think. Of course, one could endeavor to extend inputenc towards completeness.. – schtandard Jul 24 at 21:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.