1

In the example shown, referring is red (as it should), referred+rule is black (it should be red). There is a similar post for beamer that I haven't been able to adapt to this case. There are more packages than needed, too many combinations to figure out the minimal set (I get errors).

\documentclass[oneside,fontsize=14pt]{scrbook}
\usepackage{afterpage}
\usepackage{anyfontsize}
\usepackage[french]{babel}
\usepackage[bibencoding=auto,backend=biber,autolang]{biblatex}
\usepackage{comment}
\usepackage{csquotes}
\usepackage{eurosym}
\usepackage{enumitem}
\usepackage{epigraph}
\usepackage[T1]{fontenc}
\usepackage{glossaries}
\usepackage{graphicx}
\usepackage{keyfloat}
\usepackage{lastpage}
\usepackage{pdfpages}
\usepackage{refcount}
\usepackage{t1enc}
\usepackage{textcomp}
\usepackage{tikz}
\usepackage[normalem]{ulem}
\usepackage{wrapfig}
\usepackage{xcolor}
\usepackage{xparse}
\usepackage{xwatermark}
%\PassOptionsToPackage{hyphens}{url}\usepackage{hyperref}
%must come last
\usepackage{hyperref}

\begin{document}

\begin{titlepage}

\pagecolor{blue}
\afterpage{\pagecolor{white}\color{black}}
\color{red}
%\color{blue}
%\color{white}

\begin{center}

\let\oldfootnoterule\footnoterule
\renewcommand{\footnoterule}{\color{green}{\oldfootnoterule}}% <----- Color of the separating rule.

\let\oldfootnote\footnote 
\renewcommand{\footnote}[1]{\color{brown}\oldfootnote{\color{red}#1}} % <----- 1: Color of the footnotemark in the text (overwrites the color specified in lines 4+5); 2: Color of the footnote text (overwrites the color specified in line 4)

\vspace*{\fill}

  {\LARGE
    \textbf{
      TITRE\footnote{\color{red}auteur}
    }
  }

\let\footnoterule\oldfootnoterule
\renewcommand{\footnoterule}{\color{green}{\oldfootnoterule}}% <----- Color of the separating rule.

\let\footnote\oldfootnote


\vspace*{\fill}

\end{center}


\end{titlepage}


\chapter{Foo}

Foo


\end{document}

enter image description here enter image description here

1 Answer 1

0

Wih the appropriate \addtokomafont commands, coloring the footnoteline as well as the footnotelabel can also be done in the scrbook class:

More information on that can be found in the KOMA-script documentation:

Section 3.14. Footnotes (page 93)

You can change the colour of the rule with the footnoterule element using the \setkomafont and \addtokomafont commands (see section 3.6, page 59). The default is no change of font or colour. In order to change the colour, you must also load a colour package like xcolor.

Section 3.6. Text Markup (page 61)

Table 3.2.: Elements whose font style can be changed in scrbook,scrreprt or scrartcl with \setkomafont and \addtokomafont:

[...]

footnote: footnote text and marker

footnotelabel: marker for a footnote; applied in addition to the element footnote

footnotereference: footnote reference in the text

footnoterule: horizontal rule above the footnotes at the end of the text area

\documentclass[oneside,fontsize=14pt]{scrbook}
\usepackage{afterpage}
\usepackage{xcolor}
\usepackage{hyperref}

\addtokomafont{footnoterule}{\color{red}}  % <--- Change color of footnoterule to red
\addtokomafont{footnotelabel}{\color{red}} % <--- Change color of footnotelabel to red
\addtokomafont{footnote}{\color{red}}      % <--- Chang color of footnote text to red
\begin{document}

\begin{titlepage}
\pagecolor{blue}
\afterpage{\pagecolor{white}\color{black}}
\color{red}
\begin{center}
\vspace*{\fill}
  {\LARGE
    \textbf{
      TITRE\footnote{auteur}
    }
  }
\vspace*{\fill}

\end{center}
\end{titlepage}


\chapter{Foo}
\addtokomafont{footnoterule}{\color{black}}  % <--- Change color of footnoterule back to black
\addtokomafont{footnotelabel}{\color{black}} % <--- Change color of footnotelabel back to black
\addtokomafont{footnote}{\color{red}}        % <--- Change color of foonote text back to black
Foo \footnote{footnote text}

\end{document}
2
  • Would you know what commands to use to replicate this solution, but for figure's legend, specifically for keyfig from the keyfloat package?
    – Erwann
    Sep 21, 2019 at 0:43
  • 1
    @Erwann: At the moment I unfortunately don't know. Please ask a new question about this. Like that chances are higher that you will recieve an answer.
    – leandriis
    Sep 21, 2019 at 5:55

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .