3

I am writing my Master's Thesis and have planned the number of pages I want to write for each chapter. To get an idea of how much everything will be including title page, references, appendices etc I tried to tell LaTeX to expand each section with empty pages. I tried the approach from here and changed

\AtEndDocument{\emptypages{100}}

to

\AtEndSection{\emptypages{some_value}}

Interestingly, this seems to work for some sections, but not for all.

  1. Is this the right approach?

  2. If yes, do you have an idea what goes wrong with some sections? If not, can you tell me the right approach?

My document's structure looks like this:

\documentclass{scrartcl}
\usepackage{my_style_package}

\newcommand\emptypages[1]{%
\loop\ifnum\value{page}<#1\relax
    \clearpage
    \null
    \thispagestyle{empty}%
\repeat
\clearpage
}

\begin{document}

\pagestyle{empty}

\include{sections/titlepage}

\addtocontents{toc}{\protect\thispagestyle{empty}}
\tableofcontents 
\clearpage

\addtocontents{toc}{\protect\contentsline{section}{\numberline{}Abstract}{}{}}
\include{sections/abstract}

\pagestyle{plain}
\setcounter{page}{1}    

\include{sections/sec1}
\AtEndSection{\emptypages{x}}   

\include{sections/sec2}
\AtEndSection{\emptypages{x}}   

\include{sections/sec3}
\AtEndSection{\emptypages{x}}   

\include{sections/sec4}
\AtEndSection{\emptypages{x}}   

\include{sections/sec5}
\AtEndSection{\emptypages{x}}               

\include{sections/sec6}
\AtEndSection{\emptypages{x}}   

\cleardoublepage
\pagestyle{empty}
\addtocontents{toc}{\protect\contentsline{section}{\numberline{}References}{}{}}
\printbibliography  

\appendix
\addtocontents{toc}{\protect\contentsline{section}{\numberline{}Appendix}{}{}}
\include{sections/appendix}
\end{document}
anjuta
  • 361
  • Why not use \lipsum from lipsum package? – Sigur Jun 26 '15 at 15:17
  • 1
    Sorry to say but this is just the kind of thing we all do to avoid actually starting work. In any case, whatever you plan, you will not end up with the planned number of pages in each chapter because things never actually turn out like that. (Actually, I've never heard of anybody planning the number of pages per chapter.) It is quite possible that the planned number of chapters will change - never mind the number of pages in each one. You really shouldn't even be thinking about the format much until you've got the content, except insofar as keeping it flexible will make the formatting easier. – cfr Jun 26 '15 at 16:46
  • 1
    If it only about getting the page numbering right (for the ToC, say), you can just set the page counter to suit your needs... – Werner Jun 26 '15 at 16:48

2 Answers2

2

I would do it by using the lipsum package

\documentclass{article}

\usepackage{lipsum} % To include dummy text "lorem ipsum..."

\begin{document}

\section{My section one}
\lipsum % this will give you a little more that one page for a4 paper

\section{My section two}
\lipsum[1-23] % the numbers indicate how long the dummy text will be
              % So it can be longer if you want.

\section{My section three}
\lipsum[1-5] % the numbers indicate how long the dummy text will be


\end{document}

You can have this text separated in other files and use \input{} to include them.

This way you will get no only the amount of pages you want to see, but it would give you a feeling of how the text will look like when changing fonts and styles, a feature that you can't appreciate by just looking empty blank pages.

I hope it helps!

Sigur
  • 37,330
1

How about something like this:

\documentclass [12pt]{article}
\usepackage{pgffor}

\newcommand{\dudpage}[1]{\clearpage\null\vfill\begin{center}#1\end{center}\clearpage}
\newcommand{\myrepeat}[2]{\foreach \n in {1,...,#1}{#2}}

\begin{document}

\dudpage{This will leave one dud page with\\this label\\at the bottom}

\myrepeat{12}{\dudpage{This will leave 12 dud pages of thesis\\with this label at the bottom}}

\end{document}