1

How do I move the page numbers to exactly .75 inch from the bottom of the page? I have opted to use a KOMA class and not use fancyhdr. I have included several sections with the non-standard page numbering that I don't want impacted by moving the page number higher.

MWE:

\documentclass[
oneside,
12pt,
numbers=noenddot,
listof=entryprefix,
listof=totoc,
bibliography=totoc,
index=totoc,
footinclude,
footheight=.75in
]{scrbook}[2017/01/03]
%\usepackage{showframe} I don't see a footer with this. Why?

\usepackage[utf8]{inputenc}
\usepackage{geometry}
\geometry{margin=1in}

\usepackage[english]{babel}%For bibliography
\usepackage{lipsum}%Sample text generator
\usepackage{graphicx}
\graphicspath{{figures/}}
\usepackage{scrhack}

%Page Numbering
\usepackage[automark]{scrlayer-scrpage}
\clearpairofpagestyles
\cfoot*{\pagemark}

\RedeclareSectionCommand[
beforeskip=-2.5\baselineskip plus  -\parskip ,
innerskip=0pt,
afterskip=.5\baselineskip plus 0\baselineskip minus 0\baselineskip,
font=\normalfont\bfseries
]{chapter}
\renewcommand\raggedchapter{\centering}
\renewcommand\chapterformat{\MakeUppercase{\chaptername} \thechapter:\ }
\renewcommand\chapterlinesformat[3]{#2\MakeUppercase{#3}}
\usepackage{xpatch}
\xpatchcmd{\addchaptertocentry}
{\addtocentrydefault{chapter}{#1}{#2}}
{\addtocentrydefault{chapter}{#1}{\protect\chaptertocentryformat{#2}}}
{}{\PatchFailed}
\newcommand\chaptertocentryformat[1]{#1}
\AfterTOCHead[toc]{\renewcommand\chaptertocentryformat[1]{\MakeUppercase{#1}}}
\addtokomafont{chapterentry}{\normalfont}

\newcommand\EndPageInToC{%
    \addtocontents{toc}{\RedeclareSectionCommand[tocpagenumberbox=\protect\EndPageBox]{chapter}}%
    \renewcommand\chapterpagestyle{empty}%
}
\newcommand\EndPageBox[1]{\makebox{END PAGE}}

\RedeclareSectionCommands[
font=\normalfont,
toclinefill=\hfill,
beforeskip=0\baselineskip plus  -\parskip ,
afterskip=.05\baselineskip  
]{section,subsection,subsubsection,paragraph,subparagraph}
%\renewcommand\sectionlinesformat[4]{#4}
%\renewcommand\sectioncatchphraseformat[4]{#4}

\DeclareTOCStyleEntry[
linefill=\hfill
]{tocline}{figure}
\DeclareTOCStyleEntry[
linefill=\hfill
]{tocline}{table}

\usepackage{indentfirst}
\usepackage{setspace}
\usepackage{hyperref}

\renewcaptionname{english}{\contentsname}{Table of Contents}
\renewcaptionname{english}{\bibname}{References}

\setlength\parindent{.5in}

\begin{document}
    \begin{titlepage}
        A custom Title
    \end{titlepage}

    \addchap*{Dedication}
    \pagenumbering{gobble}
    \doublespacing
    \lipsum[1]  

    \addchap*{Acknowledgments}
    \pagenumbering{gobble}
    \doublespacing
    \lipsum[1]

    \frontmatter    
    \listoftables
    \listoffigures
    \tableofcontents

    \chapter{Abstract}
    \lipsum[1]
    \mainmatter
    \chapter{A Chapter}
    \lipsum[1]  
    \section{Some Section}
    \lipsum*
    \lipsum[1]

    %Final product will have this item. It is also before the About the Author chapter
    \bibliographystyle{plain}
    \bibliography{thesis-ref}

    \backmatter
    \EndPageInToC
    \chapter{About the Author}
    \lipsum[1]

\end{document}
3
  • Add [foorskip=.25in] to geometry. While KOMA and geometry try to set the page to different sizes, I believe geometry should win. May 5, 2017 at 22:51
  • Using [floorship=.25] did not override the KOMA footer settings. I am thinking that it is in it's own layer. May 6, 2017 at 1:20
  • 1
    John made a typo, it should be footskip (consisting of foot and skip).
    – Johannes_B
    May 6, 2017 at 5:01

1 Answer 1

1

You have to ensure that doublespacing is disabled in header and footer. Therefore you can use:

\KOMAoptions{onpsinit={\linespread{1}\selectfont}}

In the MWE geometry is used to set all margins to 1 inch. So the KOMA option footinclude will not have an effect.

Option footheight=.75in must be removed.

Add

footskip=\dimexpr.25in+\dp\strutbox\relax

to the geometry options, if the baseline of the pagenumbers should be .75 inch from the page bottom.

enter image description here

Code:

\documentclass[
oneside,
12pt,
numbers=noenddot,
listof=entryprefix,
listof=totoc,
bibliography=totoc,
index=totoc,
%footinclude,% <- removed
%footheight=.75in% <- removed
]{scrbook}[2017/01/03]
\usepackage{showframe}% show the page layout
\usepackage[utf8]{inputenc}
\usepackage{geometry}
\geometry{margin=1in,
  footskip=\dimexpr.25in+\dp\strutbox\relax% <- added
}

\usepackage[english]{babel}%For bibliography
\usepackage{lipsum}%Sample text generator
\usepackage{graphicx}
\graphicspath{{figures/}}
\usepackage{scrhack}

%Page Numbering
\usepackage[automark]{scrlayer-scrpage}
\KOMAoptions{onpsinit={\linespread{1}\selectfont}}% <- added
\clearpairofpagestyles
\cfoot*{\pagemark}

\RedeclareSectionCommand[
beforeskip=2.5\baselineskip plus \parskip,% <- changed
innerskip=0pt,
afterskip=.5\baselineskip,% <- changed
font=\normalfont\bfseries
]{chapter}
\renewcommand\raggedchapter{\centering}
\renewcommand\chapterformat{\MakeUppercase{\chaptername} \thechapter:\ }
\renewcommand\chapterlinesformat[3]{#2\MakeUppercase{#3}}
\usepackage{xpatch}
\xpatchcmd{\addchaptertocentry}
{\addtocentrydefault{chapter}{#1}{#2}}
{\addtocentrydefault{chapter}{#1}{\protect\chaptertocentryformat{#2}}}
{}{\PatchFailed}
\newcommand\chaptertocentryformat[1]{#1}
\AfterTOCHead[toc]{\renewcommand\chaptertocentryformat[1]{\MakeUppercase{#1}}}
\addtokomafont{chapterentry}{\normalfont}

\newcommand\EndPageInToC{%
    \addtocontents{toc}{\RedeclareSectionCommand[tocpagenumberbox=\protect\EndPageBox]{chapter}}%
    \renewcommand\chapterpagestyle{empty}%
}
\newcommand\EndPageBox[1]{\makebox{END PAGE}}

\RedeclareSectionCommands[
font=\normalfont,
toclinefill=\hfill,
beforeskip=0\baselineskip minus \parskip,% <- changed
afterskip=.05\baselineskip  
]{section,subsection,subsubsection,paragraph,subparagraph}
%\renewcommand\sectionlinesformat[4]{#4}
%\renewcommand\sectioncatchphraseformat[4]{#4}

\DeclareTOCStyleEntry[
linefill=\hfill
]{tocline}{figure}
\DeclareTOCStyleEntry[
linefill=\hfill
]{tocline}{table}

%\usepackage{indentfirst}% <- removed
\usepackage{setspace}
\usepackage[hypertexnames=false]{hyperref}

\renewcaptionname{english}{\contentsname}{Table of Contents}
\renewcaptionname{english}{\bibname}{References}

\setlength\parindent{.5in}

\begin{document}
    \begin{titlepage}
        A custom Title
    \end{titlepage}

    \addchap*{Dedication}
    \pagenumbering{gobble}
    \doublespacing
    \lipsum[1]  

    \addchap*{Acknowledgments}
    \pagenumbering{gobble}
    \doublespacing
    \lipsum[1]

    \frontmatter    
    \listoftables
    \listoffigures
    \tableofcontents

    \chapter{Abstract}
    \lipsum[1]
    \mainmatter
    \chapter{A Chapter}
    \lipsum[1]  
    \section{Some Section}
    \lipsum*
    \lipsum[1]

    %Final product will have this item. It is also before the About the Author chapter
    \bibliographystyle{plain}
    \bibliography{thesis-ref}

    \backmatter
    \EndPageInToC
    \chapter{About the Author}
    \lipsum[1]

\end{document}

Note that I have changed beforeskip for chapters to a positive value. Because beforeskip for the other section levels is positve too, there is no need to load package indentfirst.

With

\usepackage{tikz}
\ofoot*{\tikz[remember picture,overlay]\draw[red](current page.south)--+(0,.75in);}

in the preamble you can see that the baseline of the page number is .75 inch above the page bottom (run twice to see the red line):

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .