Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I'm trying to get the \ensuremath function to work within glossaries for the following:

\newglossaryentry{CSPB}{name={CSP\ensuremath{\parallel}B},
  description={A hybrid formal language combining CSP and the B-Method},sort=CSPB}

However I get an error message:

! Incomplete \iffalse; all text was ignored after line 120.

If I take the \ensuremath{\parallel} out there is no problem. Any ideas why this isn't working as the manual suggests?

share|improve this question
1  
Try \protect\parallel. –  Stephan Lehmke Nov 20 '12 at 9:52
1  
\ensuremath is inappropriate here in any case, you would be better just to use $\parallel$. If you are in text mode this will do the right thing. If for some reason you were already in math mode the CSP would have been set with an inappropriate font and having \ensuremath around the \parallel would not fix that. –  David Carlisle Nov 20 '12 at 10:12
add comment

2 Answers

You should read the 'sanitize' part of the glossaries manual. The name key gets sanitized by default. You either need to \protect your entry or give the package option sanitize={name=false}.

share|improve this answer
add comment

Seems \parallel is not supported - implemented using \mid\mid instead

share|improve this answer
    
\parallel works for me. –  lockstep Nov 20 '12 at 9:58
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.