I would like to include a graphics file with a logo in the header of all pages of a twoside document (left and right side). The logo should be left-justified on the left side and right-justified on the right side. The header line and the document title should begin beside the logo. There are two 2 Problems:
- Moving the beginning of header line and document title a litte to the right (left side) and left (right side) to create space for the logo
- Include the logo
Do you have any suggestions? Here is my code:
\documentclass[
12pt,
a4paper,
twoside,
headinclude,
headsepline,
BCOR12mm,
DIV12,
openright,
bibliography=totoc,
listof=totoc,
numbers=noenddot,
fleqn,
]{scrbook}
\usepackage[latin1]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[ngerman, english]{babel}
\usepackage{lipsum}
\usepackage{xcolor}
\definecolor{grey} {RGB} {132,130,132}
\usepackage{scrpage2}
\setkomafont{pageheadfoot}{\color{grey}{\normalfont\sffamily}}
\setkomafont{pagenumber}{\color{grey}{\normalfont\sffamily}}
\setheadsepline{1pt}[\color{grey}]
\clearscrheadfoot
\pagestyle{scrheadings}
\rehead[ ]{Document title}
\lohead[ ]{Document title}
\lehead[ ]{\headmark}
\rohead[ ]{\headmark}
\refoot[\pagemark]{\pagemark}
\lofoot[\pagemark]{\pagemark}
\begin{document}
\section{section title}
\lipsum[1-9]
\end{document}
Thank your for your comments and answers. I have already tried the above solution (just including the graphics), but was not happy with the result because:
- the line is also unter the logo
- document title and section title have different heights
This time I include a layout draft (the picture in the layout is a substitute for the logo). The measurements of the final logo will be: height=15 mm, width=20 mm (or 79×61 pixel).
The Document title is "Yaacomo". In the header there should be no text and no line under the logo.
Best Answer
A first try can be to include package
graphicx
for macro\includegraphics
and change your configuration for the header to:Btw:
example-image-A.jpg
is part of the packageMWE
, very useful for building MWEs ...