Float innerhalb des Fixme-Ziels erhält keine Farbe

Float innerhalb des Fixme-Ziels erhält keine Farbe

Ich weiß nicht, ob das möglich ist, aber ich hätte gern die Möglichkeit, Floats in ein fixmeZiel einzufügen und dann die Beschriftung und den Inhalt des Floats einzufärben.

Hier ist mein aktuelles Beispiel:

\documentclass{memoir}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[draft]{fixme}
\fxsetup{theme=color}
\begin{document}
\fxerror*{this is wrong right now}{ text and $math$ plays nice
        \begin{table}
                \centering
                \begin{tabular}{cc}
                        1&1\\1&1
                \end{tabular}
                \caption{Hello there}
                \label{tab:somelabel}
        \end{table}
}
\end{document}

was ergibt:

Die Erträge des MWE[1]

Es wäre wirklich cool, wenn die Tabelle und die Beschriftung auch eingefärbt wären

Antwort1

Da Sie where verwenden, memoirgibt es einige Möglichkeiten, die wir nutzen können. Wir müssen nur die richtigen Makros ausgraben, fixmemit denen wir herumspielen können (Sie möchten möglicherweise eine Funktionsanforderung an den fixmeBetreuer senden).

Dies scheint das zu tun, wonach Sie suchen

\documentclass{memoir}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[
draft,
%final
]{fixme}
\fxsetup{theme=color}

\usepackage{etoolbox}

\makeatletter
% only add it when final is not active
\@ifpackagewith{fixme}{final}{}{
  \patchcmd\@fxtargetlayout@draft{\begingroup}{%
    \begingroup%
    \setfloatadjustment{table}{\color{fxtarget}}
  }{\typeout{patch ok}}{\typeout{patch not working}}
  % this let is the annoying part, \@fxtargetlayout is activated 
  % using \let, meaning any later readjustments to 
  % \@fxtargetlayout@draft is not applited unlet we let it again
  \let\@fxtargetlayout\@fxtargetlayout@draft%
}
\makeatother

\begin{document}
\fxerror*{this is wrong right now}{ text and $math$ plays nice
          \begin{table}
                \centering
                \begin{tabular}{cc}
                        1&1\\1&1
                \end{tabular}
                \caption{Hello there}
                \label{tab:somelabel}
        \end{table}
}


        \begin{table}
                \centering
                \begin{tabular}{cc}
                        1&1\\1&1
                \end{tabular}
                \caption{A non fx error table}
        \end{table}
\end{document}

verwandte Informationen