This is a follow up question to glossaries and phantom.
It was about the following alignemnt in a glossary:
symbol #symbol other #other
rather than
symbol #symbol other #other
I wanted to align terms as this and decided to use phantom, however this solution has the disadvantag that there is to much whitespace when I use the glossary symbol in text, since the phantom part appears as well. Is there any good solution to have the phantom part only in the glossary but not when using the term in text?
\documentclass{report}
\usepackage[sanitize=none]{glossaries}
\makeglossaries%
\newglossaryentry{nc:line:num}{
name=thing,
symbol=\ensuremath{\protect\hphantom{\#}l},
description=other thing}
\newglossaryentry{nc}{
name=thingy,
symbol=\ensuremath{\#l},
description=something}
\usepackage{glossary-mcols}
\begin{document}
\printglossary[style=altlong4col]
\clearpage%
nc:line:num glossary entry '\glssymbol{nc:line:num}`, notice the whitespace after the '
\end{document}


\renewcommand*if you use\newcommand*? And is there a benefit to make\hasha one parameter macro, and not a 0 parameter macro? – ted Jul 03 '13 at 08:22*. There's no benefit here with regard to the parameter. They'd only be a benefit if you wanted to use\Glssymbol. (Which isn't relevant for this specific example where you have a variable in math mode.) – Nicola Talbot Jul 03 '13 at 08:52