Is there any way to create coloured footnote environments? Or to edit the footnote environment so it creates coloured footnotes?
Asked
Active
Viewed 1,448 times
4
-
2What precisely do you mean by "colored" footnote environments -- colored letters, a colored background, or something else? – Mico Jan 03 '15 at 09:57
1 Answers
3
Here I give \Cfootnote and \CBfootnote for colored footnote text and color-highlighted footnote text, respectively. I also change the footnote number to color, but that can easily be removed, if not needed.
\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}

Steven B. Segletes
- 237,551
-
Is there any way to make it work for footnotes spanning more than one page? From the second page on the original footnote color is reset – AndreasT Mar 16 '23 at 02:35
-
1@AndreasT So far, I am not able to correct this case. I will let you know if I figure something out. – Steven B. Segletes Mar 16 '23 at 14:00