Hello guys,
I'm a brandnew latex user and I dont have any clue how to put some color in footnotes. I'm not refering at the text itself, but I want to colorize the footnote's number.
In addition, footnotes have different numerations for different chapters. I would like ti keep the same numeration for the whole document.
Thank you very much in advance.
vg
Text Formatting ⇒ footnote coloring
NEW: TikZ book now 40% off at Amazon.com for a short time.

- Stefan Kottwitz
- Site Admin
- Posts: 10345
- Joined: Mon Mar 10, 2008 9:44 pm
footnote coloring
Hi,
welcome to the board!
Stefan
welcome to the board!
- One way is to redefine the internal macro \@makefnmark using color.
- Regarding the counter, you could use the chngcntr package to customize it.
Code: Select all
\documentclass{book}
\usepackage[svgnames]{xcolor}
\newcommand*{\footnotemarkcolor}{red}
\makeatletter
\renewcommand*{\@makefnmark}{\hbox{\@textsuperscript{%
\color{\footnotemarkcolor}\normalfont\@thefnmark}}}
\makeatother
\usepackage{chngcntr}
\counterwithout{footnote}{chapter}
\begin{document}
\chapter{One}
Text\footnote{example}
\chapter{Two}
Text\footnote{second example}
\end{document}
LaTeX.org admin
Re: footnote coloring
thank you stefan. Everything is seems alright now, even though I didnt catch thoroughly the syntax. Could you possibly explain it please?
- Stefan Kottwitz
- Site Admin
- Posts: 10345
- Joined: Mon Mar 10, 2008 9:44 pm
footnote coloring
Code: Select all
\usepackage[svgnames]{xcolor}
Code: Select all
\newcommand*{\footnotemarkcolor}{red}
Code: Select all
\makeatletter
...
\makeatother
Code: Select all
\renewcommand*{\@makefnmark}{\hbox{\@textsuperscript{%
\color{\footnotemarkcolor}\normalfont\@thefnmark}}}
Code: Select all
\usepackage{chngcntr}
\counterwithout{footnote}{chapter}
Stefan
LaTeX.org admin