我不知道这是否可能,但我希望能够将浮点数放入目标内部fixme
,然后获取浮点数的标题和内容以进行着色。
这是我当前的示例:
\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}
得出的结果是:
如果表格和标题也用颜色标注就太酷了
答案1
由于您正在使用,memoir
因此我们可以使用一些可能性。我们只需要挖掘正确的fixme
宏来处理(您可能希望向维护者发送功能请求fixme
)
这似乎符合你的要求
\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}