Page Layoutpage numbering on multiple documents

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
murph636
Posts: 22
Joined: Sun Mar 15, 2009 3:54 am

page numbering on multiple documents

Post by murph636 »

Hello forum~

I am having trouble getting all of my page numbers to show up when including multiple documents. I have managed to get the numbering correct in the items of the table of contents, but in the pages are only numbered on the first page of each major part. For instance, the first page # of the abstract shows up, but not the second; the the first page # of the table of contents shows up, but not the second or third; the first page of each chapter shows up, but not the rest of the pages. This continues through the document until it ends.

Code: Select all

 \documentclass[12pt]{report}
\linespread{2}
\usepackage[top=1in, bottom=1.1in, left=1.5in, right=1in]{geometry}
\usepackage{lineno}
\usepackage{pageno}
\usepackage{graphicx}
\usepackage{subfig}
\usepackage[subfigure]{tocloft}
\usepackage{caption}
\usepackage[latin1]{inputenc}
\usepackage{rotating}
\usepackage{setspace}
\usepackage{amsfonts}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{wasysym}
\usepackage{url}
\usepackage{array}
\usepackage{booktabs}
\usepackage{natbib}
\usepackage{fancyhdr}
\renewcommand{\cftchapfont}{Chapter }
\renewcommand{\familydefault}{\sfdefault}

\begin{document}
\include{signature}
\include{title}
\include{copyright}
\cleardoublepage

\addcontentsline{toc}{section}{Acknowledgements}
\include{acknowledgements}
\addcontentsline{toc}{section}{Dedication}
\include{dedication}
\addcontentsline{toc}{section}{Abstract}
\include{abstract}
\cleardoublepage

\pagenumbering{roman} 
\setcounter{page}{5}
\tableofcontents
\newpage
\listoftables
\newpage
\listoffigures
\newpage
\cleardoublepage

\include{ch1}
\include{ch2}
\include{ch3}
\include{ch4}

\newpage
\nolinenumbers
\addcontentsline{toc}{section}{References}
\renewcommand{\bibname}{References}
\bibliographystyle{elsart-harv}
\bibliography{litreview}

\end{document} 
I have attached my code to show you the preamble and methods I am using. I should also note, each chapter I am including simply says "\chapter{..}" accept the first chapter which says "\chapter{..} \pagenumbering{arabic}".

Thank you and please let me know if I need to post more information to find a solution.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

murph636
Posts: 22
Joined: Sun Mar 15, 2009 3:54 am

Re: page numbering on multiple documents

Post by murph636 »

Anyone?
phi
Posts: 577
Joined: Tue Oct 21, 2008 8:10 pm

page numbering on multiple documents

Post by phi »

Please make a minimum working example. Your code is neither minimal (because there are lots of unrelated packages like amssymb or the bibliography) nor working (it depends on external files).
The following code shows page numbers everywhere:

Code: Select all

\documentclass[english, 12pt]{report}
\linespread{2}
\usepackage{babel}
\usepackage[top=1in, bottom=1.1in, left=1.5in, right=1in]{geometry}
\usepackage{lineno}
\usepackage{pageno}
\usepackage{graphicx}
\usepackage{subfig}
\usepackage[subfigure]{tocloft}
\usepackage{caption}
\usepackage[latin1]{inputenc}
\usepackage{rotating}
\usepackage{setspace}
\usepackage{amsfonts}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{wasysym}
\usepackage{url}
\usepackage{array}
\usepackage{booktabs}
\usepackage{natbib}
\usepackage{fancyhdr}
\usepackage{blindtext}
\renewcommand{\cftchapfont}{Chapter }
\renewcommand{\familydefault}{\sfdefault}

\begin{document}
\include{signature}
\include{title}
\include{copyright}
\cleardoublepage

\addcontentsline{toc}{section}{Acknowledgements}
\include{acknowledgements}
\addcontentsline{toc}{section}{Dedication}
\include{dedication}
\addcontentsline{toc}{section}{Abstract}
\include{abstract}
\cleardoublepage

\pagenumbering{roman}
\setcounter{page}{5}
\tableofcontents
\newpage
\listoftables
\newpage
\listoffigures
\newpage
\cleardoublepage

% \include{ch1}
% \include{ch2}
% \include{ch3}
% \include{ch4}
\pagenumbering{arabic}
\Blinddocument

\newpage
\nolinenumbers
\addcontentsline{toc}{section}{References}
\renewcommand{\bibname}{References}
\bibliographystyle{elsart-harv}
\bibliography{litreview}

\end{document}
It would be good to start by removing obsolete and unnecessary packages. For example, pageno is totally outdated and can be replaced by fancyhdr. Loading pageno without any options has no effect at all, so you can simply leave this out. The setspace package supersedes and enhances the \linespread command, so you should not use \linespread if you load setspace. If you want to change the page numbering without resetting the page counter, simply redefine \thepage instead of setting the page counter manually.
murph636
Posts: 22
Joined: Sun Mar 15, 2009 3:54 am

page numbering on multiple documents

Post by murph636 »

The following code shows page numbers everywhere:
Actually, that code did not show page numbers everywhere. When the spacing is set to double spaced and any areas like the abstract or table of contents are on more than one page, only the first page is numbered.

For my minimal working example, I could only upload three files. For the Abstract, Acknowledgments, and Dedication pages, the only thing the files have in the beginning beyond the text is: "\chapter*{Abstract\markboth{Abstract}{Abstract}}".

Here is the code as it stands:

Code: Select all

 \documentclass[12pt, oneside]{book}
\usepackage[top=1in, bottom=1.1in, left=1.5in, right=1in]{geometry}
\usepackage{lineno}
\usepackage{graphicx}
\usepackage{subfig}
\usepackage[subfigure]{tocloft}
\usepackage{caption}
\usepackage[latin1]{inputenc}
\usepackage{rotating}
\usepackage{setspace}
\usepackage{amsfonts}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{wasysym}
\usepackage{url}
\usepackage{array}
\usepackage{booktabs}
\usepackage{natbib}
\usepackage{fancyhdr}
\renewcommand{\cftchapfont}{Chapter }
\renewcommand{\familydefault}{\sfdefault}

\begin{document}
\doublespacing
\include{signature}
\include{title}
\include{copyright}

\pagenumbering{roman} 
\addcontentsline{toc}{section}{Acknowledgements}
\include{acknowledgements_ex}
\addcontentsline{toc}{section}{Dedication}
\include{dedication_ex}
\addcontentsline{toc}{section}{Abstract}
\include{abstract_ex}

\pagenumbering{roman} 
\setcounter{page}{5}
\tableofcontents
\newpage
\listoftables
\addcontentsline{toc}{section}{List of Tables}
\newpage
\listoffigures
\addcontentsline{toc}{section}{List of Figures}
\newpage
\cleardoublepage

\pagenumbering{arabic} 
\setcounter{page}{1}
\include{ch1ex}
\include{ch2ex}
\include{ch3ex}

%
%\newpage
%\nolinenumbers
%\addcontentsline{toc}{section}{References}
%\renewcommand{\bibname}{References}
%\bibliographystyle{elsart-harv}
%\bibliography{litreview}

\end{document} 
I am still having problems getting page numbers on every page. For example, the Table of Contents is two pages long, but only the first page is numbered. Also, this minimal working example has issues with margins, it is running off the page instead of continuing onto the next page, not sure why because I didn't have this problem before.

Any ideas on why I can't get page numbers on all my pages and why the text is running off the page like that?
Attachments
ch3ex.tex
(943 Bytes) Downloaded 274 times
ch2ex.tex
(861 Bytes) Downloaded 260 times
ch1ex.tex
(205 Bytes) Downloaded 300 times
murph636
Posts: 22
Joined: Sun Mar 15, 2009 3:54 am

Re: page numbering on multiple documents

Post by murph636 »

Apparently no one has had this problem before. Perhaps there is a conflict between some of my packages or a bug?
murph636
Posts: 22
Joined: Sun Mar 15, 2009 3:54 am

Re: page numbering on multiple documents

Post by murph636 »

Is anyone out there who can help with this problem? I need to format my thesis with page numbers!
phi
Posts: 577
Joined: Tue Oct 21, 2008 8:10 pm

Re: page numbering on multiple documents

Post by phi »

There are surely a lot of people that want to help you, but it's quite hard without a complete example. Please put all required files in an archive and upload that.
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Re: page numbering on multiple documents

Post by localghost »

Fill your chapters (and sections and …) with text first and then see if the page numbering works.


Best regards and welcome to the board
Thorsten¹
murph636
Posts: 22
Joined: Sun Mar 15, 2009 3:54 am

Re: page numbering on multiple documents

Post by murph636 »

Please find the attached zip folder. I have included everything needed to compile my thesis accept the figures, please ignore warnings about references to figures. The page numbering problem still is there. Please help! THANK YOU ALL!!
Attachments
thesis_2.zip
This zip folder contains all files necessary to compile my thesis without any figures.
(112.45 KiB) Downloaded 201 times
murph636
Posts: 22
Joined: Sun Mar 15, 2009 3:54 am

Re: page numbering on multiple documents

Post by murph636 »

I will mention, in the zipped folder there is a file called thesis.tex, this is where you will find my preamble, etc.

Have I provided enough info to get some help from the community?
Post Reply