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.

Saeed Ullah
  • 103
  • 4
  • 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 09 '20 at 07:22
  • @hesham I do not know why it does not have any space in my latex/system. – Saeed Ullah Jun 09 '20 at 07:39
  • There are many latex book templates you can start with, e.g., https://www.overleaf.com/latex/templates/basic-book-template-by-amber-jain/pdhjnypqfzsv. Another source of a variety of templates can also be found here https://www.overleaf.com/latex/templates/tagged/book. Good luck! – hesham Jun 09 '20 at 07:39
  • @hesham Thanks. – Saeed Ullah Jun 09 '20 at 07: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 09 '20 at 07:42
  • @hesham Thanks, no there is no ',' in my Latex command, anyway, I edited the complete post if you can answer. Thanks. – Saeed Ullah Jun 09 '20 at 08:01
  • You still need to add \begin{document} ... \end{document} – hesham Jun 09 '20 at 08:09
  • @hesham That have already been added. – Saeed Ullah Jun 09 '20 at 08:15
  • Additionally the width of the page that you selected by b5paper seems insufficient for your chapter long title, this is why the title is coming very close to the page number. – hesham Jun 09 '20 at 08:16
  • @hesham It works but the b5paper is university/institute requirement, I cannot change the width/size of the page. – Saeed Ullah Jun 09 '20 at 08:21
  • @hesham Yes, Thanks. I can submit like this at the moment but actually I was looking for reducing the font size of the title. I think that will work fine with my case. – Saeed Ullah Jun 09 '20 at 08:33
  • You can ask this in another question. – hesham Jun 09 '20 at 08:38

1 Answers1

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

hesham
  • 1,443