## LaTeX forum ⇒ Theses, Books, Title pages ⇒ Masters/Doctoral Thesis- Page numbering, headers and footers Topic is solved

Classicthesis, Bachelor and Master thesis, PhD, Doctoral degree
Posts: 12
Joined: Mon Feb 20, 2017 12:46 pm

### Masters/Doctoral Thesis- Page numbering, headers and footers  Topic is solved

Hey everyone,
I am writing to you regarding the thesis template MastersDoctoralThesis. Unfortunately, my school (KTH) wants the placement of the numbers to be in the bottom of the page, I tried to do it but failed could you please help me?

The first thing I tried to do was to put the \pagemark in the \ofoot in the above code but it did not work, I did the following:
\RequirePackage[markcase=used]{scrlayer-scrpage}\providepairofpagestyles{thesisSimple}{%\clearpairofpagestyles%\automark[chapter]{chapter}\ihead{\headmark}% Inner header\ohead*{}% Outer header}\ifoot{}% Inner footer\ofoot*{\pagemark}% Outer footer

The next thing was to try to use The Fancyhdr package but failed again because I noticed that the code below prevent Fancyhdr to be used, so naturally, I tried to fix it by commenting it out (the prevention) but due to my lack of knowledge in Latex (as this is my first time using it) I failed again! I am using Overleaf, the version of the template is Version 1.5 (22/11/16). I know that this is not a problem with the template, but I really tried to fix this problem alone but unfortunately have not succeeded yet and are in desperate need for help.

\RequirePackage[markcase=used]{scrlayer-scrpage}\providepairofpagestyles{thesisSimple}{%\clearpairofpagestyles%\automark[chapter]{chapter}\ihead{\headmark}% Inner header\ohead[\pagemark]{\pagemark}% Outer header}\ifoot{}% Inner footer\ofoot{}% Outer footer\pagestyle{thesisSimple}\providepairofpagestyles[thesisSimple]{thesis}{%\automark*[section]{}%}\providepairofpagestyles[thesisSimple]{review}{%\ofoot[\shorttitle/\authorname]{\shorttitle/\authorname}\ifoot[\today]{\today}}\pagestyle{thesis}\ifbool{headsepline}{\KOMAoption{headsepline}{true}}{}\PreventPackageFromLoading[\ClassError{\classname}{Package fancyhdr' isincompatible\MessageBreak with this class}{The pagesyles are defined using package scrlayer-scrpage', please consult the\MessageBreak KOMA-script documentation for details.}]{fancyhdr}  \NewDocumentCommand{\blank@p@gestyle}{}{empty}\NewDocumentCommand{\blankpagestyle}{ m }{%\ClassWarning{\classname}{\string\blankpagestyle\space isobsolete,\MessageBreak use \string\setblankpagestyle \space instead}\DeclareDocumentCommand{\blank@p@gestyle}{}{#1}}\NewDocumentCommand{\setblankpagestyle}{ m }{\DeclareDocumentCommand{\blank@p@gestyle}{}{#1}} \DeclareDocumentCommand\cleardoublepage{}{\clearpage\if@twoside \ifodd\c@page\else\hbox{}\thispagestyle{\blank@p@gestyle}\newpage\if@twocolumn\hbox{}\newpage\fi\fi\fi%}

Best Regards,

Tags:

Johannes_B
Site Moderator
Posts: 4044
Joined: Thu Nov 01, 2012 4:08 pm
After \mainmatter, use:
\ohead*{}\ofoot*{\pagemark}
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.

Posts: 12
Joined: Mon Feb 20, 2017 12:46 pm
Thank you so much it did solve the problem! How can I have it so that the number is in the center of the footer and not in the right or left of the footer?

I tried this:

\cfoot*{\pagemark}
but it didn't work. Sorry for the inconvenience.

Edit: I tried it again and it did work Thank you so much for the fast reply
Last edited by aswadson on Mon Feb 20, 2017 8:28 pm, edited 1 time in total.

Johannes_B
Site Moderator
Posts: 4044
Joined: Thu Nov 01, 2012 4:08 pm
Nice to hear that it works.
You can also have a look at the unofficial quick manual, if you like.

By the way, KTH provides own templates, the one on Overleaf seems to provide just the titlepage.

By the way, I added proper code markup in our posts above.

Off-topic: Professor Seetharaman was a visiting professor in Freiberg/Saxony a few years ago. Very interesting lectures.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.

Posts: 12
Joined: Mon Feb 20, 2017 12:46 pm
Yes, I tried to find a proper KTH Thesis template but I only found a Word template and some guidelines regarding the Latex Template, That is why I didn't bother with it.

I am going to use the Title page template later on. Yes, I noticed that it looks much better now.

Do you study metallurgy?

By the way, I want to Include an A3 pdf in the appendix how is that done?

Johannes_B
Site Moderator
Posts: 4044
Joined: Thu Nov 01, 2012 4:08 pm
Matrials science, but i am also interested in other stuff.

Including a pdf file: New question, new topic
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.

Posts: 12
Joined: Mon Feb 20, 2017 12:46 pm
haha I knew that I have to post a new question haha but was a bit lazy Alright I will post it Sounds nice, it is so easy to find a job for people with your background here in Sweden and with good salaries I studied Mechanical Engineering

Nafees
Posts: 3
Joined: Thu May 23, 2019 6:05 pm
Hey! I am using the same MasterDoctrolThesis.cls format to write my thesis. This format shows the chapter name and heading of the current page in the header. I want to add Chinese specific character on each page of my thesis. The code of MasterDoctrolThesis.cls for a header is:

I need to add the following characters given in the picture in my header:
Header.png (38.34 KiB) Viewed 1692 times

and need to put just red line with the page number footer like showing in the below given picture
Footer.png (21.75 KiB) Viewed 1692 times

For this the following code I have used, but it could not work:
\pagestyle{fancy} % all pages will follow same fancy header and footer style except title page\fancyhf{} % Clear header and footer\fancyhead[C]{\begin{CJK*}{UTF8}{gkai}        \fontsize{20}{20} \textbf{华\hspace{0.5cm}中\hspace{0.5cm}科\hspace{0.5cm}技\hspace{0.5cm}大\hspace{0.5cm}学\hspace{0.5cm}研\hspace{0.5cm}究\hspace{0.5cm}生\hspace{0.5cm}院} \end{CJK*}}\fancyfoot[C]{\thepage}\renewcommand{\headrulewidth}{0.7pt} % Line at the header visible

How should I do this? Please help me out to this problem?

vides
Posts: 3
Joined: Sun Aug 25, 2019 3:46 pm
Hi!

I want to know how to shorten the size of the header chapter title because it is very long and step on the page number (@MasterDoctoralThesis Template)

Thanks!

Ijon Tichy
Posts: 120
Joined: Mon Dec 24, 2018 10:12 am
@vides You should ask a new question for this. This thread is already too complex.

However, try the optional argument of \chapter.