after getting the constant warning I shouldn't use fancyhdr
with KOMA I decided to switch to scrlayer-scrpage
. Unfortunately I can't get it to work despite of reading through the documentation.
This is what I have at the moment
\documentclass[12pt,ngerman]{scrreprt}
\renewcommand{\familydefault}{\sfdefault}
\usepackage[ansinew]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{geometry}
\geometry{verbose,tmargin=2cm,bmargin=3.5cm,lmargin=3cm,rmargin=2.5cm}
\usepackage{graphicx}
\usepackage{fancyhdr}
\pagestyle{fancy}
\lhead{\slshape \leftmark}
\chead{}
\rhead{{\includegraphics[height=1cm]{IMG/Logo.JPG}}}
\lfoot{}
\cfoot{}
\rfoot{\thepage}
\usepackage{color}
\definecolor{mygreen}{RGB}{23,156,125}
\renewcommand{\footrule}{\vbox to 0pt{\hbox to \headwidth{{\color{mygreen}\hrulefill}}}\vss}
\renewcommand{\headrule}{\vbox to 0pt{\hbox to \headwidth{{\color{mygreen}\hrulefill}}}\vss}
\begin{document}
Hello
\end{document}
The result is the chapter title in the upper left corner, a logo in the upper right corner, page number in the lower right corner and two green vertical lines.
I would like to have the same output with scrlayer-scrpage
with two small changes. First I would like to reduce the spacing between the line and the chapter title. Second I would like to align the chapter title to the bottom border of the image.
Any help would be very much appreciated. Thanks in advance
Jon
************** EDIT ******************************************************
Thanks to cfr this is what I got now
\documentclass[12pt,headsepline,footsepline,plainfootsepline,plainheadsepline]{scrreprt}
\renewcommand{\familydefault}{\sfdefault}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{geometry}
\geometry{verbose,tmargin=3.5cm,bmargin=3.5cm,lmargin=3cm,rmargin=2.5cm,headheight=33pt}
\usepackage{graphicx}
\usepackage{xcolor,calc}
\definecolor{mygreen}{RGB}{23,156,125}
\usepackage{scrlayer-scrpage}
\usepackage{kantlipsum}
\setkomafont{pageheadfoot}{\upshape}
\setkomafont{pagehead}{\slshape}
\setkomafont{headsepline}{\color{mygreen}}
\setkomafont{footsepline}{\color{mygreen}}
\pagestyle{scrheadings}
\automark{chapter}
\ihead{\leftmark\hfill \includegraphics[height=1cm]{IMG/Logo.jpg}}
\ohead{}
\chead{}
\ofoot*{\thepage}
\cfoot*{}
\chead{}
\ihead*{\leftmark\hfill \includegraphics[height=1cm]{IMG/Logo.jpg}}
\begin{document}
Hello
\part{Hello}
\chapter{Some chapter}
\kant[1-10]
\end{document}
Thanks again for that. This is (after some minor changes) exactly what I wanted. But I have two follow up questions. How would I proceed when I wanted to alter the header style for certain pages (e.g. two images in the top header instead of one)? Furthermore a change from geometry to typearea was suggested. How would you incorporate this package with the current settings?
Thank again
fancyhdr
.