# Glossaries, polyglossia, xindy, naiive and ï

I'm getting error: ERROR: READ: comma is illegal outside of backquote

when executing: polyglossia together with \"{\i} placed in the name field of newglossaryentry

Also, it seems to have something to do with xindy - as it works great when I replace

 \usepackage[xindy,style=altlistgroup]{glossaries}


with

 \usepackage[style=altlistgroup]{glossaries}


below is the erroneous example with error generating lines marked % !!! ERROR [...] comment:

% !TEX TS-program = arara
% !TEX encoding = UTF-8 Unicode
% arara: xelatex
% arara: makeglossaries
% arara: xelatex
\documentclass[a4paper,12pt,onecolumn,oneside,openright]{article}
\usepackage{geometry}
\usepackage{sidenotes}
\usepackage{ifpdf,ifluatex,ifxetex}
\usepackage{layouts}
\usepackage[no-math]{fontspec}
\defaultfontfeatures{Ligatures=TeX}
\setmainfont{Linux Libertine O}
\newfontfamily\greekfont[Script=Greek, Scale=MatchUppercase]{Linux Libertine O}
\newfontfamily\cyrillicfont{Linux Libertine O}
\usepackage{xltxtra}
\usepackage{pstricks}
\usepackage[protrusion=true,final]{microtype}
\usepackage{mathtools}
\usepackage{amscd,amsfonts,amssymb,amsthm}
\usepackage{mathtext,mathrsfs}
\usepackage{unicode-math}
% ------------------------------------------------------------------------------
%  polyglossia, etc.
% ------------------------------------------------------------------------------
\usepackage{polyglossia}
\setdefaultlanguage[variant=british]{english}
\setotherlanguages{latin,greek,russian,polish,german}                 % !!! ERROR - when used with: newglossaryentry [...] name = {na\"{\i}ve}
%
\usepackage[xindy,style=altlistgroup]{glossaries}
%
\makeglossaries
% ------------------------------------------------------------------------------
%  Problematic glossary entry, etc.
% ------------------------------------------------------------------------------
\newglossaryentry{naiive}{
name        = {na\"{\i}ve},       % !!! ERROR - when used with: polyglossia
%   name        = {naiiiiiive},
description = {is a French loanword (adjective, form of naïf) indicating having or showing a lack of experience, understanding or sophistication},
sort        = {naive}
}
\newglossaryentry{gauss}{name={Gauss, Karl Friedrich},
first={Karl Friedrich Gauss},text={Gauss},
description={German mathematician}}
\begin{document}
\title{Modified Sample Document Using the Glossaries Package With Xindy}
\author{author}
\maketitle
\section{\glsentryfirst{gauss}}
\gls{naiive} --- \gls{gauss}
\printglossaries
\end{document}


using polyglossia and ï (unicode) works as a temp-fix but I have very strong feeling that it should work the proper way around, that is using: polyglossia together with \"{\i}.

• My feeling is that you should use naïve. Leave the old way for the new. ;-) – egreg May 3 '13 at 13:47
• update - removing: \setotherlanguages{latin,greek,russian,polish,german} seems to pseudo-fix it... – NeuroTeX May 3 '13 at 13:54

If you look at the .glo package, it's written out in different ways when the "other languages" are loaded.

## Without the "other languages"

\\glsnamefont{na\\\"{\\i }ve}


## With the "other languages"

\\glsnamefont{na\\"{\\i }ve}


So the " is not escaped in the first case, because some of the loaded languages use shorthands in Babel style. Thus glossaries acts in different ways when it's time to write out the .glo file.

Use naïve, there's no reason to stick with the "old style" with a Unicode savvy engine.

By the way, Xindy doesn't run with UTF-8 enabled, which could be a problem. A fix is to say

\usepackage[xindy,style=altlistgroup]{glossaries}
\GlsSetXdyCodePage{utf8}


but this should be addressed by the package.

• Thank you very much, at least now I am more convinced that it is not me screwing it up :D – NeuroTeX May 3 '13 at 18:49
• Do you need to load first polyglossia or fontspec? – skan Nov 25 '16 at 16:10
• @skan Actually polyglossia loads fontspec anyway. You need to have fontspec first if you need to pass it an option such as no-math. – egreg Nov 25 '16 at 16:18