[texhax] glossaries - glsentryname and math

Vangelis Katsikaros ibob17 at yahoo.gr
Mon Jan 10 13:47:48 CET 2011


Hi,

I have texlive on ubuntu [1] and I have a problem with the glossaries 
package.

I define an entry that has some math in its name, then if use \gls{foo} 
everything is fine. However, if I use \glsentryname{goo}, then the 
$math$ part is not rendered as math but as regular text (including the 
dollar signs).

Is this normal and how can I avoid it?

%==================================================
% Minimal working example:
% $ pdflatex example.tex
%
% example.log (http://pastebin.com/3Q4nUaxr)
% example.tex:
%==================================================
documentclass{book}

\usepackage{glossaries}
\usepackage{amsmath,amssymb}

\newglossaryentry{lala}{
% the $$ part doesn't render if called with glsentryname
         name={$X^{y}$-tree},
         description={The famous Xy-tree}
}

\begin{document}

In general, math works fine $N_{x}^{y} \leftarrow \rightarrow X$

\section{Math doesn't work for glsentryname \glsentryname{lala}}
But in text or headings glsentryname doesn't render math.

gls: \gls{lala}.

glsentryname: \glsentryname{lala}

\end{document}
%==================================================



[1]
$ latex -version
pdfTeX 3.1415926-1.40.10-2.2 (TeX Live 2009/Debian)
kpathsea version 5.0.0
...
Compiled with libpng 1.2.44; using libpng 1.2.44
Compiled with zlib 1.2.3.4; using zlib 1.2.3.4
Compiled with poppler version 0.14.2


More information about the texhax mailing list