0

If have long titles in my document, and I do not want them to present broken words. I saw this topic on How do I manually break a line in the title of my thesis -- using the U of Maine package, but after using the proposal, I realized that on the header of the document, the lines where also divided into two lines as introduced with

\section{This is a very long \protect\\ title that I divide into two}

Anyone knows how to have the title in only one row in the header? It is sure that it enters in one line.

2

You could use \section[short]{long} as shown in the following MWE in order to get a section heading that is manually broken into two lines in the actual section and a heading that is not broken in the table of contents and in the header.

\documentclass{article}
\usepackage{fancyhdr}
\pagestyle{fancy}


\begin{document}

\tableofcontents
\newpage
\section[This is a very long title that I divide into two]{This is a very long \protect\\ title that I divide into two}

\end{document}

enter image description here

| improve this answer | |
0

I don't think this is quite what you were after but it's another approach.

\documentclass{article}
\usepackage{fancyhdr}
\pagestyle{fancy}
\begin{document}

\tableofcontents
\newpage
\section{\mbox{This is a very long title that I do not divide into two}}

\end{document}

enter image description here

| improve this answer | |
  • Thank you but it is not what I was looking for. I need to write the title (in bold) in two different lines without breaking for example di-vide into two parts, and appearing only in one line in the header. – R18 Oct 19 '18 at 16:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.