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.

There is a problem with using the package permute with glossaries.

A minimal working example: (by the way a minimal working example to show how an "index of notation" can be created)

\documentclass{article}
\usepackage{permute}
\usepackage[style=long3colheader]{glossaries}

\newglossaryentry{root}{name=\ensuremath{\sqrt{(12)}},description={a square root}}

%% uncomment the following line and the problem appears
%\newglossaryentry{permutation}{name=\ensuremath{\pmt{(12)}},description={a permutation}}

\makeglossaries
\begin{document}
Permutations in the text work well $\pmt{(123)(45)}$.
\glsaddall
\printglossary
\end{document}

If the Perl script "makeglossaries" is available, run this with:

pdflatex filename
makeglossaries filename
pdflatex filename

Uncommenting the line in the source code leads to:

! Undefined control sequence.
\pmt@GetPrintArgs #1->\let \pmt@order [...]

Is there a possibility to use \pmt in the glossary? Using the package option sanitize=none does not help. Enclosing \pmt{...} with \protect did not help.

The solution is simply, as egreg pointed out, to write

\protect\pmt{...}

without braces. Note that \protect{\pmt{...}} with braces does not help.

share|improve this question
add comment

1 Answer

up vote 5 down vote accepted

Just add \protect in front of \pmt:

\newglossaryentry{permutation}{
  name=\ensuremath{\protect\pmt{(12)}},
  description={a permutation}
}
share|improve this answer
    
That's it. Thanks! The problem was that \protect must be used without braces. I've included the answer above. –  Thomas Aug 1 '12 at 20:30
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.