# make fixme notes in displaymath

I am using the fixme package. I observed the use of \fxerror* or \fxnote* inside displaymath yields errors.

I can write

\documentclass[draft]{article}
\usepackage{fixme}
\fxsetup{theme=colorsig}

\begin{document}
\fxerror*{$\forall y \exists x \varphi(x,y)$}
{
$\forall y \exists x \varphi(x,z)$
}
\end{document}


with the expected result. But I sometimes would like to do something like

\documentclass[draft]{article}
\usepackage{fixme}
\fxsetup{theme=colorsig}

\begin{document}
$\forall y \exists x \varphi(x,\fxerror*{y}{z})$
\end{document}


which doesn't work. Is it a (non)feature of the fixme package?

Second point, I would like it to work with the align environnement as well as with all the other math environnement provided in amsmath.

• It has something to do with \marginpar use not permitted in math mode. – Steven B. Segletes Aug 14 '13 at 14:56
• Since you have some responses below that seem to answer your question, please consider marking one of them as ‘Accepted’ by clicking on the tickmark below their vote count (see How do you accept an answer?). This shows which answer helped you most, and it assigns reputation points to the author of the answer (and to you!). It's part of this site's idea to identify good questions and answers through upvotes and acceptance of answers. – jub0bs Jan 19 '14 at 13:03
• @Jubobs I was a bit reluctant, since I ended up not using the answer. The solution is too particular, since as I commented it does not work with align. But I'll consider it! – Yann Pequignot Jan 19 '14 at 13:11

fixme uses \marginpar and this prevents using the commands in some places; a possible workaround is to substitute \marginpar for \marginnote from the marginnote package:

\documentclass[draft]{article}
\usepackage{marginnote}
\usepackage{fixme}
\fxsetup{theme=colorsig}

\makeatletter
\renewcommand*\FXLayoutMargin[3]{%
\marginnote[%
\raggedleft\@fxuseface{margin}\ignorespaces#3 \fxnotename{#1}: #2]{%
\raggedright\@fxuseface{margin}\ignorespaces#3 \fxnotename{#1}: #2}}
\renewcommand*\FXLayoutMarginClue[3]{%
\marginnote[%
\raggedleft\@fxuseface{margin}\ignorespaces#3 \fxnotename{#1}!]{%
\raggedright\@fxuseface{margin}\ignorespaces#3 \fxnotename{#1}!}}
\makeatother

\begin{document}
\fxerror*{$\forall y \exists x \varphi(x,y)$}
{
$\forall y \exists x \varphi(x,z)$
}

$\forall y \exists x \varphi(x,\fxerror*{y}{z})$
\end{document}


• Thanks. It works fine! However this solution doesn't work for the 'align' environment... :-( Any idea? – Yann Pequignot Aug 14 '13 at 19:56