
我不知道這是否可行,但我希望能夠將浮動物件放入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}