0

In my header whenever I have a linebreak the whole header changes its alignment.
But I just want the new line to come in below, not the whole header ajusting to what seems to be vertical-align = middle, I rather need something like vertical-align = top.

enter image description here Here is my problem, as you can see the top line isn't aligned with the left and right part anymore, but it should always be starting at the same height from the top: enter image description here

MWE:

\documentclass[10pt, a4paper, notitlepage, twoside, twocolumn, openany]{book}

\newcommand{\StartPageNumber}{7}
\newcommand{\Issue}{First Issue}
\newcommand{\AuthorLastName}{Author}
\newcommand{\TitleHd}{Title, very long sometimes too long\\- multiple lines
}

% Kopfzeile
\usepackage[fit]{truncate}
\usepackage{fancyhdr}
\setlength{\headheight}{15.2pt}
\pagestyle{fancy}
\fancypagestyle{plain}{}
\fancyhf{}
\fancyhf[HRO]{\fontsize{8}{8} \thepage}
\fancyhf[HLE]{\fontsize{8}{8} \thepage}
\fancyhf[HRE,HLO]{\fontsize{8}{8} \Issue}
\pagestyle{fancy}
\fancyhf[HCE,HCO]{
    \centering\fontsize{8}{8}
    \emph{\AuthorLastName}, \TitleHd
}
\renewcommand{\headrulewidth}{0pt}


\begin{document}
    \setcounter{page}{\StartPageNumber}
    TEST
\end{document}

1 Answer 1

1

You could use a tabular:

\documentclass[10pt, a4paper, notitlepage, twoside, twocolumn, openany]{book}

\newcommand{\StartPageNumber}{7}
\newcommand{\Issue}{First Issue}
\newcommand{\AuthorLastName}{Author}
\newcommand{\TitleHd}{Title, very long sometimes too long\\- multiple lines
}

% Kopfzeile
\usepackage[fit]{truncate}
\usepackage{fancyhdr}
\setlength{\headheight}{15.2pt}
\pagestyle{fancy}
\fancypagestyle{plain}{}
\fancyhf{}
\fancyhf[HRO]{\fontsize{8}{8} \thepage}
\fancyhf[HLE]{\fontsize{8}{8} \thepage}
\fancyhf[HRE,HLO]{\fontsize{8}{8} \Issue}
\pagestyle{fancy}
\fancyhf[HCE,HCO]{
    \centering\fontsize{8}{8}
    \emph{\AuthorLastName}, \raisebox{0pt}[0pt][0pt]{\begin{tabular}[t]{@{}l}\TitleHd\end{tabular}}
}
\renewcommand{\headrulewidth}{0pt}


\begin{document}
    \setcounter{page}{\StartPageNumber}
    TEST
\end{document}

enter image description here

1
  • Cool, thanks :) Could you explain what \raisebox{0pt}[0pt][0pt] does? And what do the tabular params[t]{@{}l} do?
    – Cold_Class
    May 20, 2018 at 21:12

You must log in to answer this question.

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