[Tex/LaTex] AT sign in the nomenclature

nomenclaturesymbols

I'm using the nomencl package.
I need to make an entry that contains the at symbol but entries containing @ don't appear in the nomenclature.

\usepackage{nomencl}
...
\nomenclature{abc@def}{Description.}
...
\printnomenclature{}

I've already tried \@, {@},"@",{"@"},\verb{@} etc

Best Answer

The character @, like ! and | is special for MakeIndex, so it must be escaped if needed literally. The way to escape is by preceding it with "; babel doesn't seem to be a problem in this respect.

% arara: pdflatex
% arara: nomencl
% arara: pdflatex

\documentclass{article}
%\usepackage[ngerman]{babel} % if you uncomment it it works the same
\usepackage{nomencl}
\makenomenclature

\begin{document}

x\nomenclature{abc"@def}{Description.}

\printnomenclature

\end{document}

The arara directives are just in order to make compilation easier. If you uncomment the babel loading, you'll see that " being a shorthand for German is not relevant for the problem at hand.

enter image description here

Related Question