1

My current header looks like this. The second line of the header is touching the dividing line. My question is how to move the text upwards or the dividing line downwards so that the format looks nicer.enter image description here

The code in the main file is

\documentclass{book}
\usepackage{fancyhdr}

\pagestyle{fancy} %set header type
\setlength{\headheight}{28pt} 
\fancyhead[R]{\leftmark}
\fancyhead[L]{}
\begin{document}
\chapter{Open Top Frustum Shells under Vertical Uniform Load}
\chaptermark{\protect\parbox{.55\textwidth}{Open Top Frustum Shells under Vertical Uniform Load\strut}}
\end{document}
4
  • Welcome to TeX.SX. Please provide compilable documents, not just fragments only
    – user31729
    Mar 8, 2016 at 10:54
  • Note the titlesec package has a newlinestospace option which converts any line break in titles to spaces for the header.
    – Bernard
    Mar 8, 2016 at 11:13
  • @ChristianHupfer Sorry, new to this site and Latex. The question has been updated.
    – Bob
    Mar 9, 2016 at 11:06
  • @bernard Thank you for your comment. touhami's method works perfectly.
    – Bob
    Mar 9, 2016 at 11:12

1 Answer 1

0

This because of the parbox. A solution is by adding \strut

\documentclass{book}
\usepackage{fancyhdr}

\pagestyle{fancy} %set header type
\setlength{\headheight}{28pt} 

\fancyhead[R]{\leftmark}
\fancyhead[L]{}
\begin{document}
\chapter{Open Top Frustum Shells under Vertical Uniform Load}
\chaptermark{\protect\parbox{.55\textwidth}{Open Top Frustum Shells under Vertical Uniform Load\strut}}
\chapter{Open Top Frustum Shells under Vertical Uniform Load}
\chaptermark{\protect\parbox{.55\textwidth}{Open Top Frustum Shells under Vertical Uniform Load\strut}}
\end{document}

enter image description here

0

You must log in to answer this question.

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