Fixme 封装 fxnote 背景

Fixme 封装 fxnote 背景

这只是一个简单的问题。是否可以更改笔记的背景颜色?

这就是我设置 fixme 的方式

\usepackage{fixme}
\fxsetup{
    status=draft,
    author=,
    layout=inline, % also try footnote or pdfnote
    theme=color
}
\definecolor{fxnote}{rgb}{0.8000,0.0000,0.0000}

现在我想将背景颜色设置为蓝色。

助教

答案1

这个怎么样:

\documentclass{article}
\usepackage{xcolor}% provides \colorlet
\usepackage{fixme}
\fxsetup{
    status=draft,
    author=,
    layout=inline,
    theme=color
}

\definecolor{fxnote}{rgb}{0.8000,0.0000,0.0000}
% define the background colour:
\colorlet{fxnotebg}{yellow}

% refedine the layout macro:
\makeatletter
\renewcommand*\FXLayoutInline[3]{%
  \@fxdocolon {#3}{%
    \@fxuseface {inline}%
    \colorbox{fx#1bg}{\color {fx#1}\ignorespaces #3\@fxcolon #2}}}
\makeatother

\begin{document}

Some text \fxnote{other text} \fxnote*{blub}{blah}

\end{document}

在此处输入图片描述

编辑:\hl这是一个使用soul包裹:

\documentclass{article}
\usepackage{xcolor}% provides \colorlet
\usepackage{soul}% provides \hl

\usepackage{fixme}
\fxsetup{
    status=draft,
    author=,
    layout=inline,
    theme=color
}

\definecolor{fxnote}{rgb}{0.8000,0.0000,0.0000}
% define the background colour:
\colorlet{fxnotebg}{yellow}

% refedine the layout macro:
\makeatletter
\renewcommand*\FXLayoutInline[3]{%
  \@fxdocolon {#3}{%
    \@fxuseface {inline}%
    \begingroup
      \sethlcolor{fx#1bg}%
      \color {fx#1}\ignorespaces \hl{#3\@fxcolon #2}%
    \endgroup}}
\makeatother

\begin{document}

Some text \fxnote{other text} \fxnote*{blub}{blah}

Some Text \fxnote{A somewhat longer note that is long enough to break into the next line
for demonstration purposes} and some more text.

\end{document}

相关内容