0

Classicthesis template provides some nice headers using scrlayer-scrpage package, defined in the preamble. I want to keep it for the whole text, but for acknowledgements, abstract and ToC I'd like to have the page number at the outer footer part of the page, and nothing else (no header). For that, I tried using:

\pagestyle{scrheadings}
\clearscrheadfoot
\ofoot[\pagemark]{\pagemark}

at the begining of each of these parts (acknowledgements, abstract and contents), but it changes the whole document. However, if I enclose, for example, the Acknowledgements part between brackets, and this part has an even number of pages, the last page doesn't get the number. How can I solve this?

EDIT: My Acknowledgements.tex file reads:

\pdfbookmark[1]{Acknowledgements}{Acknowledgements}

\begin{flushright}{\slshape
blablabla}
\end{flushright}

\bigskip

\begingroup
\let\clearpage\relax
\let\cleardoublepage\relax
\let\cleardoublepage\relax
\chapter*{Agradecimientos}

blablabla
\lipsum[1-5]

\endgroup

and the part of the main.tex calling Acknowledgments.tex is:

\pagenumbering{roman}
\pagestyle{plain}

\include{FrontBackmatter/Titlepage}
\cleardoublepage\include{FrontBackmatter/Dedication}
\cleardoublepage\include{FrontBackmatter/Acknowledgments}

So I get this, with number in the first page (number V in this case) and no number in the following.

enter image description here

1

Use \clearpage or \cleardoublepage (depending on the document class and its options) before changing page style or page style settings.

Do you want to use page style plain for all pages in TOC and other chapters? Then you can use

\cleardoublepage
\pagestyle{plain}
\tableofcontents
\chapter*{Introduction}
...
\cleardoublepage
\pagestyle{scrheadings}

Example:

\documentclass[a4paper]{book}
\usepackage{classicthesis}
\usepackage{blindtext}% only for dummy text

\begin{document}
\Blindtext

\cleardoublepage
\pagestyle{plain}
\tableofcontents
\chapter*{Introduction}
\Blindtext
\cleardoublepage
\pagestyle{scrheadings}

\Blinddocument\Blinddocument\Blinddocument\Blinddocument
\Blinddocument\Blinddocument\Blinddocument\Blinddocument
\end{document}

Result:

enter image description here

  • It seems that using \let\cleardoublepage\relax is indeed causing some trouble, but I need to have it in the Acknowledgements. If I use \pagestyle{plain}, only odd number pages get a number. Even pages don't, and I can't find out why. – Alan Rapoport Aug 23 at 2:04
  • 1
    In my MWE even pages get a page number in the outer footer. The code snippet in your question is not enough to reproduce your problem ... – esdd Aug 23 at 9:02
  • You're right I'm sorry. It's basically the same as the classicthesis template. There I added an edit. Let me know if I should add anything else, and thanks in advance. – Alan Rapoport Aug 23 at 11:39
  • 2
    I added some more text to the acknowledgment in the original template so it goes onto the other page. The page number is there, I don't know how to reproduce what you're getting. Can you do the same as I, using a freshly downloaded template? Otherwise, reduce to a single file that shows the same problem. Update your latex distribution. – PhilipPirrip Aug 23 at 13:18
  • 1
    Oh god, there it was... I had modified the .sty file to make some changes in the header of the rest of the document, and I had accidentally deleted the line \ofoot[\small\pagemark]{}. I can't believe... Thank you so much! Should I delete this probably misleading post? – Alan Rapoport Aug 24 at 1:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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