1

I don't know if you can use accented words with the latex glossary package but I think you can because it would seems like a stupid limitation. I'm french and if I want to define an accented term such as "métadonnée" and use

\newglossaryentry{métadonnée} { name={métadonnée}, description={text} }

I get a error message :

! Undefined control sequence.
\GenericError ...
#4 \errhelp \@err@ ...
l.57 \glossentry{m�tadonn�e}

I've done some research but nobody seems to use accented words in glossary! It looks like a problem with encoding but I think that all my packages are good. Here's what I use :

\usepackage[french]{babel}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{lmodern}
\usepackage{graphicx}
\usepackage{hyperref}
\usepackage{listings}
\usepackage{graphicx}
\usepackage{microtype}
\usepackage[nonumberlist]{glossaries}
\usepackage{color}
\usepackage{textcomp}
\usepackage{here}
\usepackage{float}
\usepackage{fancyhdr}

EDIT : here's a minimal example to reproduce what happens so you can see that it won't compile with pdflatex :

\documentclass[10pt,a4paper]{book}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage[nonumberlist]{glossaries}
\usepackage{hyperref}
\makeglossaries 

\newglossaryentry{métadonnee}
{
name={métadonnee},
description={text}
}


\begin{document}
\printglossaries
\gls{métadonnee}
\end{document}

Thanks for any help!

8
  • please fix your example so that people can run it to reproduce the problem and test answers. Mar 23, 2017 at 20:06
  • 1
    I am not sure but I don't think that glossaries allows accented characters as glossary key name. You should use \newglossaryentry{metadonnee} and \gls{metadonnee} respectively
    – user31729
    Mar 23, 2017 at 20:26
  • @Christian Hupfer: Maybe using xindy in the place of makeindex?
    – Bernard
    Mar 23, 2017 at 21:42
  • @Bernard: The issue happens at LaTeX level. The first argument of \newglossaryentry is used to define some internal commands. So to handle this you have to add \detokenize to a lot of lines inside glossaries.sty. (And I don't know if this works ;-) ) A complete explanation is given by egreg: tex.stackexchange.com/questions/175240/… Mar 23, 2017 at 22:23
  • @MarcoDaniel: I see. Thanks for the link. A workaround seems to write \newglossaryentry{metadonnee}%without accents { name={métadonnée}, %% printed word description={text} }
    – Bernard
    Mar 23, 2017 at 22:42

1 Answer 1

1

Another way to avoid the problem would be to use the accent commands:

\newglossaryentry{m\'{e}tadonnee}
{
name={métadonnee},
description={text}
}


\begin{document}
\printglossaries
\gls{m\'{e}tadonnee}
\end{document}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .