After creating my headline here How to arrange / align / place pictures and text, to form a given headline? I guessed, I would just place it into the header with \ihead
and \thispagestyle{scrheadings}
– but NO.
Problem is, the following text is placed uppon my header. And when I try to use markright
I get eighter compile errors or no header at all.
I read some infos about using \protect
, but it did not help eighter. I am guessing, that my constuct itself is simply not that easy to migrate into a header. I hope I can solve this on my own, but maybe someone else seeks a challange too 🙂
Here is the code, the images to it are available through the link before:
\documentclass[
pdftex,
a4paper,
11pt,
DIV15,
BCOR20mm,
parskip,
numbers=noenddot]{scrbook}
\usepackage{graphics}
\usepackage[pdftex]{graphicx}
\usepackage{scrpage2}
\usepackage{setspace}
\begin{document}
\thispagestyle{scrheadings}
\noindent
\ihead{
\textsf{
\begin{singlespace}
\raisebox{-0.5\height}{\rlap{\includegraphics[scale=0.5]{left_demo.png}}}
\hfill
%\includegraphics[height=60px]{center_demo.png}
%\hfill
\raisebox{-0.15\height}{\llap{
\scriptsize %
\begin{tabular}[c]{@{}r@{}}
somedemo txt abcdefghij,\\
texttextte txt texttexttextetscter\\
\\
demodemode demodemode
\end{tabular}}}
\raisebox{-0.525\height}{\includegraphics[height=45px]{right_demo.png}}
\end{singlespace}}}
\huge{text}
\end{document}
I do really appreciate any help on this, thanks!
Edit:
Here is what's wrong:
the text
in the red circle should not be that high (used ihead
here)
Best Answer
The problem is that your images take more vertical spacing than the default vertical space reserved for the header. When you process your code you will get a warning like this:
(the actual value for the overfull box will depend on the actual images). The value for
\headheight
has to be increased accordingly to prevent the warning and you can do this usingheadlines=
orheadheight=
(this probably implies a change in the page layout).Here's a little example. From the comments it's clear that the intent is to change the page style for the
titlepage
; one possibility to achieve this is to define a new page style and to use thegeometry
package to temporarily change theheadheight
value without modifications to the page layout made as class options throughDIV
andBCORR
(adjust the length according to your needs); since the contents of the footer for this style was not specified I used some dummy options in the definition of the new page style:Not relevant to the problem mentioned, but the font size switches (
\Huge
,\huge
,\LARGE
, etc.) are declarations that do not have arguments, so instead of\huge{text}
, you should use{\huge text}
(to keep the change local and possibly using\par
inside the group if required).