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.

Johannes_B
  • 24,235
  • 10
  • 93
  • 248
R18
  • 177

2 Answers2

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

leandriis
  • 62,593
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

Joe Corneli
  • 4,340
  • 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