In a text, I'm using a tikzpicture as a math symbol.
I'd like to reference this symbol in a glossary. It seems to me that makeindex doesn't know how to draw the picture. Here's an example.
\documentclass[12pt]{scrbook}
\usepackage{a4wide}
\usepackage{tikz}
\usepackage[toc, section, numberline]{glossaries}
\newcommand{\Plus}{\mathord{
\begin{tikzpicture}[baseline=0ex, line width=1, scale=0.13]
\draw (1,0) -- (1,2);
\draw (0,1) -- (2,1);
\end{tikzpicture}}}
\makeglossaries
\newglossaryentry{gls:Plus}{name={\ensuremath{\Plus}},description=\nopostdesc} % Does not work; change \Plus to, e.g., + else to compile.
\begin{document}
$A \gls{gls:Plus} B$
$A \Plus B$
\printglossary[type=main, style=list, nonumberlist=false]
\end{document}
\protect, or not: pastebin.com/iJjw9GVQ – Roland Jan 16 at 11:41