I am using the nomencl
package; however, it seems that my nomenclature entries which contain a vertical bar | in math mode are not handled properly. Is this a known issue, and is there a suggested workaround?
As an example, the following entry in my document
\nomenclature{$s(A)$}{equivalent to $|A|$}
makes it into the .nlo file, but not the .nls file.
Best Answer
The nomencl package uses the standard MakeIndex process and
|
is a special character for the\index
command. So there's no way unless you produce a variant ofnomencl.ist
that disables that special character:The last line is the additional one, I've put a question mark that probably you won't use in a nomenclature entry. Save the file as
mynomencl.ist
and useto produce the
.nls
file.It's probably better to remember
\vert
instead of|
. By the way, theamsmath
package provides\lvert
and\rvert
that should be preferred to simple bars:\lvert A\rvert
will have correct spacing also in critical situations when|A|
might not.For the rare usage of
|
, you can also get around the issue with