0

I am writing a chapter of my thesis in Latex, the page numbers are on top left corner which are adjusted with the chapter heading as shown in the picture :

enter image description here

While 2 is the page number and I need a space between 2 and Chapter 1. My code is just

\documentclass[b5paper,11pt, titlepage]{book} 
\chapter{Guided Wave Based Structural Health Monitoring}
\textbf{My name}
\tableofcontents
\newpage

when I give the chapter name shorter it works fine but when I write the complete name/title of the chapter, it makes this problem. I am new to Latex, please help me with this problem. Thanks.

  • Please rewrite your code as \documentclass[b5paper, 11pt, titlepage]{book} \begin{document} \tableofcontents \chapter{Chapter Title} \textbf{My name} \end{document} It seems to print the page numbers fine when I compiled. – hesham Jun 9 at 7:22
  • @hesham I do not know why it does not have any space in my latex/system. – Saeed Ullah Jun 9 at 7:39
  • There are many latex book templates you can start with, e.g., overleaf.com/latex/templates/basic-book-template-by-amber-jain/…. Another source of a variety of templates can also be found here overleaf.com/latex/templates/tagged/book. Good luck! – hesham Jun 9 at 7:39
  • @hesham Thanks. – Saeed Ullah Jun 9 at 7:41
  • "I do not know why it does not have any space in my latex/system." Your posted code has extra punctuation here \documentclass[b5paper,11pt, titlepage]{book}, (the end comma), and its order is wrong. Try the code I posted in the first comment and start modifying it from there. – hesham Jun 9 at 7:42
0

This problem rises from the width of the page that you selected b5paper being of insufficient width for your chapter long title which causes the title to become very close to the page number in the header.

You can solve this problem by adding \chaptermark{short version of the chapter title} after the chapter command. So the complete code can be:

\documentclass[b5paper, 11pt, titlepage]{book}
\begin{document}
\tableofcontents
\chapter{Guided Wave Based Guided Wave Based Structural Health Monitoring}
\chaptermark{Guided Wave Based ...} % Short version of your chapter title that will appear in the header only.
\newpage
\textbf{My name}
\end{document}

And the ouptut

enter image description here

| improve this answer | |

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