[Tex/LaTex] Page numbering in lower right corner (classicthesis)

classicthesislyxpage-numbering

I'm using classicthesis 4.1 in LyX to write my thesis and I need help with the page numbering.

How do I force the all page numbers to stay at the lower right corner?

Best Answer

classicthesis uses the scrpage2 package to customize the headers and footers; you can add the page to the footer alway to the right with a redefinition of the scrheadings page style:

\documentclass{scrbook}
\usepackage{classicthesis}
\usepackage{lipsum}

\makeatletter
    \clearscrheadings
    \setheadsepline{0pt}
    \ifthenelse{\boolean{@nochapters}}%
        {\relax}%
        {\renewcommand{\chaptermark}[1]{\markboth{\spacedlowsmallcaps{#1}}{\spacedlowsmallcaps{#1}}}}
    \renewcommand{\sectionmark}[1]{\markright{\thesection\enspace\spacedlowsmallcaps{#1}}} 
    \lehead{\headmark}
    \rohead{\headmark}
    \refoot{\thepage}
    \rofoot{\thepage}
    \renewcommand{\headfont}{\small}  
%    \DeclareRobustCommand{\fixBothHeadlines}[2]{} % <--- ToDo
    % hack to get the content headlines right (thanks, Lorenzo!)
        \def\toc@heading{%
            \ifthenelse{\boolean{@nochapters}}%
            {\section*{\contentsname}}%nochapters
            {\chapter*{\contentsname}}%chapters
            \@mkboth{\spacedlowsmallcaps{\contentsname}}{\spacedlowsmallcaps{\contentsname}}}
\makeatother

\pagestyle{scrheadings}

\begin{document}

\chapter{Test chapter}
\section{Test section}
\lipsum[1-20]

\end{document}

A detail of the bottom of two consecutive pages:

enter image description here

Related Question