[texhax] glossaries - glsentryname and math
Vangelis Katsikaros
ibob17 at yahoo.gr
Mon Jan 10 18:06:00 CET 2011
On 01/10/2011 05:42 PM, Susan Dittmar wrote:
>
> Quoting Vangelis Katsikaros (ibob17 at yahoo.gr):
>> 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).
>
> Did you try using the text field? I do not have access to a working
> glossaries style right now, so I cannot test, sorry.
>
> \newglossaryentry{lala}{
> name={$X^{y}$-tree},
> text={$X^{y}$-tree},
> description={The famous Xy-tree}
> }
Hi again,
As I looked at the issue again, I noticed some warnings from hyperref
Package hyperref Warning: Token not allowed in a PDF string
(PDFDocEncoding):
(hyperref) removing `math shift' on input line 22.
Package hyperref Warning: Token not allowed in a PDF string
(PDFDocEncoding):
(hyperref) removing `superscript' on input line 22.
Package hyperref Warning: Token not allowed in a PDF string
(PDFDocEncoding):
(hyperref) removing `math shift' on input line 22.
I don't see anything strange in the document. Do you think it might
create any problems?
Minimal example:
%==================================================
\documentclass{book}
\usepackage{glossaries}
\usepackage{amsmath,amssymb}
\usepackage{hyperref}
\newglossaryentry{lala}{
name={$X^{y}$-tree},
text={$X^{y}$-tree},
description={The famous Xy-tree}
}
\begin{document}
\tableofcontents
\clearpage
In general, math works fine $N_{x}^{y} \leftarrow \rightarrow X$
\section{Math doesn't work for glsentryname \glsentrytext{lala}}
In text or headings.
gls: \gls{lala}.
glsentryname: \glsentryname{lala}
glsentrytext: \glsentrytext{lala}
\end{document}
%==================================================
More information about the texhax
mailing list