Page Layout ⇒ Page number layout in \part
Page number layout in \part
I've written my thesis in the scrbook document class, but my publisher has now asked me to make all page numbers centered. I've done this with the following code:
\deftripstyle{pgnumbottomcenter}{}{}{}{}{\pagemark{}}{}
\pagestyle{pgnumbottomcenter}
\renewcommand{\chapterpagestyle}{pgnumbottomcenter}
This has worked perfectly for all pages EXCEPT the \part pages.
Does anyone know how to also center the page numbers on these?
Thanks!
NEW: TikZ book now 40% off at Amazon.com for a short time.
And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p
- Johannes_B
- Site Moderator
- Posts: 4182
- Joined: Thu Nov 01, 2012 4:08 pm
Page number layout in \part
\partpagestyle
.For your information, new and modern package scrlayer-scrpage gives a very easy interface for headers and footers.
Re: Page number layout in \part
Thanks for your reply, but I can't seem to make it work anyway.
I tried putting \partpagestyle{plain} in the document itself, and also tried
\renewcommand*{\partpagestyle}{plain} in the preamble, but the page number on the \part page is still not centered like the other pages.
Is there any way to do this without having to fiddle too much with other packages? I tried working with scrlayer-scrpage, but it doesn't seem to work (admittedly, I'm not a very experienced Latex user... ).
Thanks!
- Johannes_B
- Site Moderator
- Posts: 4182
- Joined: Thu Nov 01, 2012 4:08 pm
Page number layout in \part
\renewcommand{\chapterpagestyle}{pgnumbottomcenter}
, a quite similar\renewcommand{\partpagestyle}{pgnumbottomcenter}
should help. If not, we need to see a bit more information in form of a Minimal working example.
Page number layout in \part
I gave that a try but strangely enough it also didn't do anything. So here is my MWE:
Code: Select all
\documentclass[twoside, 14pt, a4paper, footinclude=true, headinclude=true]{scrbook}
\usepackage[linedheaders,parts,pdfspacing]{classicthesis}
\deftripstyle{pgnumbottomcenter}{}{}{}{}{\pagemark{}}{}
\pagestyle{pgnumbottomcenter}
\renewcommand{\chapterpagestyle}{pgnumbottomcenter}
\begin{document}
The page number on this page is centered, but not on the part page.
\part{Introduction \& background}
\end{document}
- Johannes_B
- Site Moderator
- Posts: 4182
- Joined: Thu Nov 01, 2012 4:08 pm
Page number layout in \part
classicthesis
, i hate it. It is one of the most widespread templates that give supporters a regular headache because it does pretty stupid stuff. It kicks KOMA-internals into oblivion by setting stumpy overrides.You have to copy the definition made by classicthesis and change the empty pagestyle to use your own. A very good example by the way.
Code: Select all
\documentclass[twoside, 14pt, a4paper, footinclude=true,
headinclude=true]{scrbook}
\usepackage[linedheaders,parts,pdfspacing]{classicthesis}
\deftripstyle{pgnumbottomcenter}{}{}{}{}{\pagemark{}}{}
\pagestyle{pgnumbottomcenter}
\renewcommand{\chapterpagestyle}{pgnumbottomcenter}
\makeatletter
\titleformat{\part}[display]
{\normalfont\centering\large}%
{\thispagestyle{pgnumbottomcenter}\partname~\MakeTextUppercase{\thepart}}{1em}%
{\color{Maroon}\spacedallcaps}[\bigskip\normalfont\normalsize\color{Black}\begin{quote}\ct@parttext\end{quote}]
\makeatother
\begin{document}
\chapter{test}
The page number on this page is
centered, but not on the part page.
\part{Introduction \& background}
\end{document}
Page number layout in \part
Thanks for your suggestion. I tried it with my MWE and although it returned the error Undefined control sequence \part{Introduction \& background}, and the same problem occurs when I try to compile with my thesis. I'm assuming it worked for you however so perhaps I'm doing something wrong.
I also tried to change the page style in the classicthesis.sty file, but to no avail. I'm starting to think maybe I should just suck it up and let it go, or take out the \part pages altogether.......

- Johannes_B
- Site Moderator
- Posts: 4182
- Joined: Thu Nov 01, 2012 4:08 pm
Page number layout in \part
classicthesis.sty
on your machine. One coming with the template you are using, one coming with your TeX-distribution. Possibly even different versions.Rename the one in your document folder to
modClassicthesis.sty
and make the corresponding change in your tex-file. You know know that exactly this file is used, it also serves licensing issues. Change that renamed file to your likings.Have you tried my minimal working example? Does it not work? There is no reason that part would be undefined, can you show the log-file of the run?
Re: Page number layout in \part
