1

I am writing my master thesis with a template that I created by myself, and everything seems to be moreorless fine except for the page numbering. I am using two different formats, roman and arabic numerals. The problem is that in the body of the thesis the page numbers only appear in the first page of a new chapter. The following pages of the same chapter have no number. It happens for all chapters I have so far.

In the preamble I used the command \pagenumbering{arabic} When I introduce the first chapter, I specify that the numbering must be arabic from that page on, and set the counter to 1. The counter works fine, and so does the table of content when it shows the pages. But when compiling using pdflatex, the page numbers don't show up for pages other than the first page of every chapter. I copied my code here so you can take a look. At the end you'll find a picture which illustrates what I am complaining about.

Inside each chapter's file I modify nothing. I just write sections, subsections and text.

I've tried to modify the page layout and margins as well, but that doesn't seem to be the problem, since the bottom margin si 25 mm, which should be big enough.

I've checked previous answers, manuals and other tutorial pages, such as ShareLaTeX, but none of the solutions I found there works for this. Actually, I've tried even without the arabic numerals and without the counter, and the problem persists.

I would be so glad if someone can tell me what the problem is and how to solve it.

Thanks for your answers.

\documentclass[oneside,11pt,bibtotoc]{report}


    %%%%------------------PREAMBLE----------------%%%%
    %%----------------------------------------------%%

    %%%%%-------------------PACKAGES-----------------%%%%% 

\usepackage[a4paper,width=150mm,top=25mm,bottom=25mm]{geometry}
\usepackage[english]{babel}
\usepackage{csquotes}
\usepackage{graphicx}
\usepackage{framed}
\usepackage{hyperref}
\usepackage[toc,page]{appendix}
\usepackage[final]{pdfpages}
\usepackage{soul}
\usepackage{paralist}    
\usepackage{sectsty}
\sectionfont{\fontsize{14}{15}\selectfont}

\usepackage{tabularx}
\usepackage{booktabs}       %Use this package for making nice tables
\newcommand{\ra}[1]{\renewcommand{\arraystretch}{#1}}

\usepackage{array}
\usepackage{caption}
\usepackage{supertabular}
\usepackage{fancyhdr}  %Uncomment it if you want to include headers
\renewcommand{\headrulewidth}{0.0pt}    % Default \headrulewidth is 0.4pt
\renewcommand{\footrulewidth}{0.4pt}    % Default \footrulewidth is 0pt
\usepackage{indentfirst}
\usepackage{setspace}

\graphicspath{{images/}}    %Direction where LaTeX will look for the images.
\DeclareGraphicsExtensions{.pdf,.png,.jpg,.mps}

\usepackage[backend=bibtex,style=ieee,citestyle=numeric-comp]{biblatex}
\addbibresource{references.bib}     %Imports bibliography file

\pagenumbering{arabic}

\captionsetup{font=small}   %required by the style guide, from Scharlemann


    %%%------------------END OF THE PREAMBLE-----------------%%%
    %%--------------------------------------------------------%%

    %------------------------DOCUMENT-----------------------------%

\begin{document}

    %----------------------------FRONT MATTER---------------------%

\input{frontmatter/titlepage}

\input{frontmatter/declaration}

\input{frontmatter/quote}

\pagenumbering{Roman}

\chapter*{Abstract}
    \input{frontmatter/abstract}
    \setcounter{page}{1}

\normalsize

        %%------------------------TABLE OF CONTENTS AND LISTS-------------------%%
        %%----------------------------------------------------------------------%%

\tableofcontents\thispagestyle{fancy}

\chapter*{List of Symbols}
    \addcontentsline{toc}{chapter}{List of Symbols}
    \input{frontmatter/symbols}

\listoffigures \thispagestyle{fancy}
    \addcontentsline{toc}{chapter}{List of Figures}

\listoftables\thispagestyle{fancy}
    \addcontentsline{toc}{chapter}{List of Tables}

        %--------------------BODY OF THE THESIS--------------------------%
        %%--------------------------------------------------------------%%

\cleardoublepage
\begin{singlespacing}  %Sets all the spacing between to 1.5 lines. Requires package {setspace}

\chapter{Introduction}
    \pagenumbering{arabic}
    \setcounter{page}{1}
    \input{chapters/chapter01}

\chapter{Theoretical background}
    \input{chapters/chapter02}

\chapter{Experimental Setup}
    \input{chapters/chapter03}

\chapter{Conclusion}
    \input{chapters/conclusion}

\end{singlespacing}

\end{document}

Example of the chapter 2 and the next page

This PDF is the output of the following code. This is just an example of how I write the rest of the chapters. The content is meaningless. I don't modify any page layout inside the chapter, nor the numbering. Yet, the problem persists.

\section{Introduction}

\begin{figure}[h]
    \centering
    \includegraphics[width=0.5\textwidth]{universe}
    \caption{Artistic view of the Milky Way}
    \label{fig:uni}
\end{figure}

\begin{table}
    \begin{center}
    \caption{Random numbers in a table}
    \begin{tabular}{ c c c }
     cell1 & cell2 & cell3 \\ 
     cell4 & cell5 & cell6 \\  
     cell7 & cell8 & cell9    
    \end{tabular}
    \label{table:1}
    \end{center}
\end{table}

\subsection{Lipsum}

In ancient manuscripts, another means to divide sentences in into paragraphs was a line break (newline) followed by an initial at the beginning of the next paragraph. An initial is an oversize capital letter, sometimes outdented beyond the margin of text. This style can be seen, for example, in the original Old English manuscript of Beowulf. Typography, though not commonly.[4] Modern English typography usually indicates a new paragraph by indenting the first line. This style can be seen in the (handwritten). Table \ref{table:2} is an example of referenced \LaTeX elements. United States Constitution from 1787. For additional ornamentation, a hedera leaf or other symbol can be added to the inter-paragraph whitespace, or put in the indentation space.

\begin{table}[ht]
    \centering
    \caption{Table to test captions and labels}
    \begin{tabular}{||c c c c||} 
     \hline
     Col1 & Col2 & Col2 & Col3 \\ [0.5ex] 
    \hline\hline
     1 & 6 & 87837 & 787 \\ 
     2 & 7 & 78 & 5415 \\
     3 & 545 & 778 & 7507 \\
     4 & 545 & 18744 & 7560 \\
     5 & 88 & 788 & 6344 \\ [1ex] 
     \hline
    \end{tabular}
    \label{table:2}
\end{table}

\subsection{Paragraph description}
In ancient manuscripts, another means to divide sentences in into paragraphs was a line break (newline) followed by an initial at the beginning of the next paragraph \cite{jahn1996physics}. An initial is an oversize capital letter, sometimes outdented beyond the margin of text. This style can be seen, for example, in the original Old English manuscript of Beowulf. Outdenting is still used in English typography, though not commonly.[4] Modern English typography usually indicates a new paragraph by indenting the first line. This style can be seen in the (handwritten) United States Constitution from 1787. For additional ornamentation, a hedera leaf or other symbol can be added to the inter-paragraph whitespace, or put in the indentation space.

Cum vitae nulla scelerisque nulla erat ullamcorper id id at placerat volutpat hac vestibulum interdum posuere imperdiet a parturient ullamcorper risus sit montes. Amet ut himenaeos dapibus volutpat feugiat luctus consequat magna netus eu mi congue accumsan a dui a pulvinar. Porta a cubilia nisi arcu a class egestas fermentum consectetur magna venenatis et ullamcorper dolor habitant malesuada porta scelerisque ac sed platea a. Blandit mus mi imperdiet augue condimentum fames blandit feugiat eros nisi blandit scelerisque ut cum imperdiet auctor adipiscing pretium adipiscing vel consequat curae primis malesuada dignissim. Penatibus consequat mi ullamcorper platea senectus leo suspendisse a nulla nibh gravida scelerisque ac convallis platea neque at vestibulum vel. 

Elit nisi in nec consequat placerat euismod per mus nullam aliquam a in at ad lobortis netus tellus pharetra sociis ante adipiscing aliquam a. Gravida parturient nullam blandit scelerisque at dapibus eleifend convallis ad dolor natoque eget turpis rutrum non parturient in nibh aenean. Molestie adipiscing platea odio curabitur ullamcorper nisi ad dui vitae parturient ornare turpis odio eu vitae condimentum porta morbi vestibulum pharetra nullam. Tempor a quisque vestibulum at pretium ullamcorper vestibulum habitasse inceptos nascetur lacus sodales bibendum montes imperdiet ullamcorper a lorem eu netus. Leo adipiscing hendrerit leo scelerisque lectus laoreet vivamus a a mi placerat aliquam cursus nisi in a parturient consectetur vestibulum proin sagittis a consectetur elementum. 

Condimentum parturient nisl nullam ullamcorper vel ullamcorper sagittis parturient a dis a commodo nisl habitasse parturient proin. Mus suspendisse amet aliquet ornare ut elementum parturient eu lorem sodales fames vestibulum eu consectetur duis consectetur. Nunc ad suspendisse sagittis per quam lobortis hac fringilla proin ullamcorper vestibulum ullamcorper in torquent ac suspendisse sagittis sodales parturient torquent arcu inceptos penatibus. Aliquet ante sem ante gravida venenatis a suspendisse metus sem quis porttitor a parturient convallis vestibulum condimentum sed. Suspendisse condimentum nunc conubia duis a venenatis scelerisque ad vehicula mi habitant nec ad senectus bibendum malesuada a natoque a fringilla. Ultricies massa a ac penatibus nec a porttitor parturient consequat leo erat luctus magnis suscipit vestibulum a. 

A himenaeos turpis consectetur a platea id velit nisl dui justo fringilla semper tristique parturient. Vehicula ante aliquam quisque at suspendisse habitant a facilisi interdum sociosqu a feugiat aenean habitasse nostra ut. A arcu tristique duis parturient suspendisse donec mi ac mus venenatis in ullamcorper tristique massa lacus eget parturient torquent est rutrum vitae a. 

Vestibulum parturient litora pharetra cursus a duis adipiscing pulvinar at a pulvinar sed a condimentum per erat adipiscing ullamcorper condimentum augue ad euismod aenean enim dignissim dictum. A leo lacus tellus elit non vulputate hac a massa condimentum sed dis platea scelerisque. Parturient pharetra morbi quis vestibulum maecenas penatibus hac id nam leo consectetur turpis maecenas adipiscing suspendisse a lacus leo tincidunt parturient eu accumsan phasellus curae. Est habitasse adipiscing est ridiculus porttitor nostra at faucibus vestibulum luctus lacus vestibulum nisl cursus duis. Ullamcorper blandit platea fringilla et ullamcorper suspendisse dignissim in vel adipiscing parturient nisi volutpat a arcu curabitur eget tempor natoque nec rhoncus a. Fames fringilla suspendisse ac leo suscipit condimentum a a sed pulvinar scelerisque nostra adipiscing egestas. 

Hac potenti etiam porta vestibulum consectetur mus feugiat a parturient cum mi adipiscing parturient duis. A ipsum inceptos ad mollis nibh mauris parturient convallis augue parturient et malesuada a eros augue interdum sed proin himenaeos egestas ante ipsum id magna adipiscing a a. Ligula tellus consectetur a a ultricies class condimentum justo in rutrum orci nascetur sociosqu augue tempor habitant in. Fusce integer adipiscing integer scelerisque aliquet consectetur nam a magna ullamcorper a primis orci hac aenean lobortis a donec ac aptent nunc dapibus class adipiscing pulvinar nulla duis imperdiet. Arcu bibendum ac vehicula mollis condimentum ullamcorper mauris ac maecenas tempus a porta condimentum maecenas suscipit volutpat est tincidunt libero ut laoreet posuere dis. Mus ultricies pharetra suspendisse sem tempus interdum volutpat a ornare id et placerat venenatis rutrum ullamcorper habitant placerat vestibulum in.
Voyager
  • 43
  • Please have a look at How to use pagenumbering in the document? For the other part, we need to see a minimal working example. We don't know what is happening inside a chapter-file. – Johannes_B Jun 09 '15 at 13:36
  • @Johannes_B thanks for your reply. I just added the code of the chapter 2 which generates that PDF. I will now take a look to the question you linked. Thanks. – Voyager Jun 09 '15 at 14:40
  • Putting this together and ignoring all the stuff i don't have, i see the page numbers. – Johannes_B Jun 09 '15 at 14:46
  • @Johannes_B what is all the stuff you don't have? You mean most of the packages in the preamble and geometry modifications? – Voyager Jun 09 '15 at 14:50
  • 1
    No, that i have. But i don't have your stuff you are inputting. There is a quite simple mechanical algorithm to find the cause of some behaviour, it is described in Preparing a minimal working example. It is so simple, that everybody using LaTeX should know how to do it ;-) – Johannes_B Jun 09 '15 at 15:12
  • Does the same happen if you compile with, say, latex+dvipdfm? – jarnosc Jun 09 '15 at 18:29
  • @Johannes_B sorry, I have been busy these last two days. So you are saying that I simplify the file, compile a simpler and smaller version of my thesis and try to debug it. Got it. I need to spend some time on that in the next few days. – Voyager Jun 11 '15 at 22:13
  • @Lusr56 I did not try that compiler. I am using SharLaTeX, a cloud based LaTeX editor. Among the compilers, that one is not available. I could download the files and try in my TexMaker. – Voyager Jun 11 '15 at 22:24
  • @Voyager I may be wrong, but the flat LaTeX engine provided by ShareLaTeX must be exactly latex+dvipdfm(x). The only other way to produce pdf from DVILaTeX is going through LaTeX>dvips>ps2pdf, and I doubt the SL people want to put that load on their server. – jarnosc Jun 11 '15 at 22:49
  • Yes. Best to make a copy and work on that, better safe than sorry. You can look at the source without seeing an erorr as yuro esye dot'n enev notcei one. LaTeX is more strict and helps you by complaining. Using the editor texworks might be the best, as there is no automation. Why take care of the bibliography each and every time for example? – Johannes_B Jun 12 '15 at 18:05
  • @elford My knowledge in LaTeX is not that extensive. I've done some research about the compiler engine of SL and this is what I found: Google I only need to generate a PDF as an output. – Voyager Jun 13 '15 at 14:10
  • @Johannes_B I've solved the problem with the page numbering by changing the main.txt file to an older version in which it worked, even though I did not find out what caused the problem in the first place. Thanks for the comments and suggestions. I think we can close this question now. – Voyager Jun 13 '15 at 14:20

0 Answers0