有没有办法创建彩色脚注环境?或者编辑脚注环境以创建彩色脚注?
答案1
这里我分别给出了彩色脚注文本和彩色突出显示脚注文本的\Cfootnote
和\CBfootnote
。我还将脚注编号更改为彩色,但如果不需要,可以轻松删除。
\documentclass{article}
\usepackage{xcolor}
\usepackage{soul}
\let\svthefootnote\thefootnote
\newcommand\Cfootnote[2][black]{\def\thefootnote{\color{#1}\svthefootnote}%
\footnote{\color{#1}#2}}
\newcommand\CBfootnote[2][black]{\def\thefootnote{\color{#1}\svthefootnote}%
\footnote{\sethlcolor{#1}\hl{#2}}}
\textheight 1.5in
\begin{document}
This is a test\Cfootnote[red]{Is this in red?} of Cfootnote.
And now we test\CBfootnote[cyan]{Is this in a cyan highlight?
We will make the footnote long enough so that it wraps, to verify that
wrapping works.} of CBfootnote.
\end{document}