3

Since this is A6, trying to maximize body of text. Yet I also need a footer that has some room for itself underneath it. How can I narrow the gap between the two? To be clear, in this example, how can I leave the footer in its current position, but have "Nulla malesuada porttitor diam..." on page 2 rather than page 3?

\documentclass[a6paper]{scrreprt}
\usepackage[T1]{fontenc}
\usepackage[hmargin=1em, tmargin=2em ,bmargin=5.5em]{geometry}
\usepackage{lastpage}
\usepackage{lipsum} % Dummy Text
\usepackage{scrlayer-scrpage}
\usepackage{lastpage}
\usepackage{tabularx}
\usepackage{hyperref}

\renewcommand*\familydefault{\sfdefault}
\newcolumntype{R}{>{\raggedleft\arraybackslash}X}

%\KOMAoptions{
%%This has no effect, why?<---
%  headsepline=false,
%  footsepline=false
%%--------------------------->  
%}
%\pagenumbering{gobble}
\pagestyle{scrheadings}
%Just a more flexible alternative to lofoot+roofoot
\cfoot{\begin{tabularx}
    {\textwidth}
    {@{}l@{}R@{}}
    Foo
    & \thepage/\pageref{LastPage}\end{tabularx}}

\begin{document}
\title{Lorem Ipsum}
\author{Dolor S. Amet}
\maketitle
\lipsum

\clearpage
\pagestyle{empty}

\vspace*{\fill}

\begin{center}Page with no header\end{center}

\vspace*{\fill}

\end{document}

Shot

Erwann
  • 2,100

2 Answers2

2

You can reduce bmargin and \footskip by \baselineskip:

\documentclass[a6paper]{scrreprt}
\usepackage[T1]{fontenc}
\usepackage[hmargin=1em, tmargin=2em ,
  bmargin=\dimexpr5.5em-\baselineskip\relax% <- changed
]{geometry}
\addtolength{\footskip}{-\baselineskip}% <- added
\usepackage{lastpage}
\usepackage{lipsum} % Dummy Text
\usepackage{scrlayer-scrpage}% sets pagestyle scrheadings automatically
\usepackage{lastpage}
\usepackage{tabularx}
\usepackage{hyperref}

\renewcommand*\familydefault{\sfdefault}
\newcolumntype{R}{>{\raggedleft\arraybackslash}X}

\cfoot{\begin{tabularx}
  {\textwidth}
  {@{}l@{}R@{}}
  Foo
  & \thepage/\pageref{LastPage}\end{tabularx}}

\begin{document}
\title{Lorem Ipsum}
\author{Dolor S. Amet}
\maketitle
\lipsum

\clearpage
\pagestyle{empty}
\vspace*{\fill}
\begin{center}Page with no footer\end{center}% header would be outside of the page ;-)
\vspace*{\fill}
\end{document}

Result:

enter image description here


Additional remark: headsepline and footsepline are options to enable, disable or adjust width and height of rules below the header and above the footer, respectively. By default there are no rules in header and footer, so headsepline=false and footsepline=false would have no effect in your example.

esdd
  • 85,675
0

If you are not interested in changing the whole document, you can just issue an \enlargethispage{value} at the page you want to have more text.

For changes affecting the whole document, you may rely on scrreprt’s internal calculation. Use \setlength{footskip}{24pt} and set the DIV factor to a high value. For example, DIV=20 gives the page break your are asking for:

enter image description here

\documentclass[a6paper, DIV=20]{scrreprt}
\usepackage[T1]{fontenc}
\usepackage{lipsum} % Dummy Text
\usepackage{scrlayer-scrpage}
\usepackage{tabularx}
\usepackage{hyperref}

\setlength{\footskip}{24pt}
\renewcommand*\familydefault{\sfdefault}
\newcolumntype{R}{>{\raggedleft\arraybackslash}X}

%\KOMAoptions{
%%This has no effect, why?<---
%  headsepline=false,
%  footsepline=false
%%--------------------------->  
%}
%\pagenumbering{gobble}
\pagestyle{scrheadings}
%Just a more flexible alternative to lofoot+roofoot
\cfoot{\begin{tabularx}
    {\textwidth}
    {@{}l@{}R@{}}
    Foo
    & \thepage/6\end{tabularx}}

\begin{document}
\title{Lorem Ipsum}
\author{Dolor S. Amet}
\maketitle
\lipsum

\clearpage
\pagestyle{empty}

\vspace*{\fill}

\begin{center}Page with no header\end{center}

\vspace*{\fill}

\end{document}
Sveinung
  • 20,355