I am trying to align my symbols in a glossary with \phantom. However when I try to do so, I get the following error (line 10 is the line where the definition of nc:line:num ends(closing brace)):
! Incomplete \iffalse; all text was ignored after line 10.
near MWE:
\documentclass{report}
\usepackage[sanitize=none]{glossaries}
\makeglossaries%
\newglossaryentry{nc:line:num}{
name=thing,
symbol=\ensuremath{\phantom{\#}l},
description=other thing}
\newglossaryentry{nc}{
name=thingy,
symbol=\ensuremath{\#l},
description=something}
\usepackage{glossary-mcols}
\begin{document}
\printglossary[style=altlong4col]
asd
\clearpage%
nc:line:num glossary entry '\gls{nc:line:num}` \gls{nc}
\end{document}
Background:
I have symbols that usually exist in two versions as symbol and as #symbol, therefore i would like to align in the following way:
symbol #symbol other #other
rather than
symbol #symbol other #other
Note: sanitize=none is used because I reference entries from another glossary, see this awnser
