i would like to add some colored-lines to my documentation and i while searching through the www i found this post here: Colored horizontal line between two text

According to this, i would ask you, how i could add these lines to my headline and footline so it would look like the painted version below...

Image removed after solved...

My layout file looks like this:

    % Seitenränder -----------------------------------------------------------------
\setlength{\topskip}{\ht\strutbox} % behebt Warnung von geometry

    automark, % Kapitelangaben in Kopfzeile automatisch erstellen
    headsepline, % Trennlinie unter Kopfzeile
    ilines % Trennlinie linksbündig ausrichten

% Kopf- und Fußzeilen ----------------------------------------------------------

% Kopfzeile
\renewcommand{\headfont}{\normalfont} % Schriftform der Kopfzeile
\ihead{\large{\textsc{\titel}}\\ \small{\untertitel} \\[2ex] \textit{\headmark}}
\setlength{\headheight}{15mm} % Höhe der Kopfzeile
%\setheadwidth[0pt]{textwithmarginpar} % Kopfzeile über den Text hinaus verbreitern (falls Logo den Text überdeckt) 

% Fußzeile
\ifoot{\copyright\ \autor}

\onehalfspacing % Zeilenabstand 1,5 Zeilen
\frenchspacing % erzeugt ein wenig mehr Platz hinter einem Punkt 

% Schusterjungen vermeiden
\clubpenalty = 10000
\widowpenalty = 10000 
\displaywidowpenalty = 10000

% Quellcode-Ausgabe formatieren
\lstset{numbers=left, numberstyle=\tiny, numbersep=5pt, breaklines=true}
\lstset{emph={square}, emphstyle=\color{red}, emph={[2]root,base}, emphstyle={[2]\color{blue}}}

\counterwithout{footnote}{section} % Fußnoten fortlaufend durchnummerieren
\setcounter{tocdepth}{\subsubsectionlevel} % im Inhaltsverzeichnis werden die Kapitel bis zum Level der subsubsection übernommen
\setcounter{secnumdepth}{\subsubsectionlevel} % Kapitel bis zum Level der subsubsection werden nummeriert

% Aufzählungen anpassen

% Tabellenfärbung:
\definecolor{ww-lightblue}{RGB}{73, 111, 185}
\definecolor{ww-darkblue}{RGB}{22, 59, 124}
\definecolor{ww-orange}{RGB}{248, 147, 36}
  • 1
    Welcome to TeX.SX! Please make your code compilable (if possible), or at least complete it with \documentclass{...}, the required \usepackage's, \begin{document}, and \end{document}. That may seem tedious to you, but think of the extra work it represents for TeX.SX users willing to give you a hand. Help them help you: remove that one hurdle between you and a solution to your problem. Jan 15, 2015 at 12:09
  • (1) welcome, (2) please provide the code as a fully compilable example, then there is less work to those wanting to help. We cannot see for example which document class you are using.
    – daleif
    Jan 15, 2015 at 12:09
  • The project is separated in many files so i'm not abled to provide you the hole code...
    – regetskcob
    Jan 15, 2015 at 12:13

1 Answer 1


Here's what you can do.

Load the scrlayer-scrpage package (instead of scrpage2 which is not recommended anymore) and define the thickness of the lines with, for example


Then add the color to the font used to typeset them, with, for example




\usepackage{lipsum} % only for the example








\section{A section}




enter image description here

  • Support for scrpage2 dropped completely, it is officially obsolete.
    – Johannes_B
    Jan 15, 2015 at 12:29

You must log in to answer this question.

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