In the example document below the second index entry produces the warning
!! Input index error (file = j.idx, line = 2):
-- Extra `@' at position 11 of first argument.
on running makeglossaries corresponding to
\indexentry{A@\( \mathbb A \)}{1}
\indexentry{R@\( \math@bb R \)}{1}
\indexentry{B@\( B \)}{1}
in the .idx file. As a result the second entry is rejected and does not appear in the .ind file or index.
As the first entry shows, a work around is to move the \index command outside of \emph. But swapping the fourier package for amssymb demonstrates that it is not necessary in general.
Is there a way to modify the behaviour of the fourier package so such index entries work inside \emph?
\documentclass{article}
\usepackage{fourier}
%\usepackage{amssymb}
\usepackage{makeidx}
\makeindex
\begin{document}
The \index{A@\( \mathbb A \)}%
\emph{\index{R@\( \mathbb R \)}%
\index{B@\( B \)}real numbers \( \mathbb R \)}.
\printindex
\end{document}
\stringapproach in this case? – Andrew Swann Jul 12 '15 at 12:39\stringin all cases. – egreg Jul 12 '15 at 13:16