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

Re: page numbering on multiple documents

Post by murph636 »

Anyone able to help, now that I have attached my entire thesis?

Recommended reading 2024:

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

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

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

Re: page numbering on multiple documents

Post by phi »

Ah, finally I managed to spot the error: You set the pagestyle to empty in your first three subdocuments (signature, title, copyright). The pagestyle is a global setting that remains valid until it is changed or the end of the document is reached. You have to reset it once you want page numbers. For example, place \pagestyle{headings} (or \pagestyle{plain}, ...) before you include the acknowledgements.
murph636
Posts: 22
Joined: Sun Mar 15, 2009 3:54 am

Re: page numbering on multiple documents

Post by murph636 »

Phi~

Thank you! I have page numbers now! One quick question, I notice a problem in my table of contents, the page number listed for my figures section is off by 1, all the other numbers listed appear to be fine. Do you know why the count is off?
murph636
Posts: 22
Joined: Sun Mar 15, 2009 3:54 am

Re: page numbering on multiple documents

Post by murph636 »

I am still hoping for help on my previous question, about the page numbers listed in the TOC versus what is on the bottom of the actual page.

I also have another new question. I would post these questions in a new forum, but this thread has all of my code readily available and it seems to make sense to keep it going. I have a problem with my tables and figures sections adding a page, in Chapters 2 and 3. It seems as though it is happening because the first table/figure is too large to account for both the section header and the table/figure itself. How can I force it to fit onto the same page as the section header? Hopefully this question makes sense...
phi
Posts: 577
Joined: Tue Oct 21, 2008 8:10 pm

page numbering on multiple documents

Post by phi »

If you want to force a figure to a fixed location, then don't let it float, i.e., don't put it into a figure or table environment. If you write something like

Code: Select all

\section{...}
\includegraphcs{...}
then the graphic comes right behind the heading.
murph636
Posts: 22
Joined: Sun Mar 15, 2009 3:54 am

Re: page numbering on multiple documents

Post by murph636 »

Phi~

Thanks again, I appreciate your help very much! However, I'm not sure I understand how to apply your latest suggestion, how can I neglect setting the tabular environment if I want the table to be sideways? Currently, I use the rotating package and sidewaystable, is there another way to make the table sideways and not put it into a tabular environment?

Also, do you know why my TOC is incorrect?
murph636
Posts: 22
Joined: Sun Mar 15, 2009 3:54 am

Re: page numbering on multiple documents

Post by murph636 »

Is there anyone who can help me trouble shoot the two latest problems I am having? 1) TOC page numbers incorrect when compared to actual page numbers within the document, and 2) blank page being added directly after the beginning of the figures and tables sections? The previous suggestion about not letting the first figure/table float doesn't seem to be relevant with a sideways table/figure...

Thanks forum!
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

page numbering on multiple documents

Post by localghost »

You are doing a lot of severe mistakes which concern primarily the usage of the \clearpage command. The first one results in the wrong pages shown in the ToC. I marked the critical points in your main file.

Code: Select all

\documentclass[12pt]{report}
\usepackage[top=1in, bottom=1.1in, left=1.5in, right=1in]{geometry}
%\linespread{2}	                        % <<< Hence with it!
\usepackage{lineno}                     % What for?
\usepackage{graphicx}
\usepackage{subfig}                     % What for?
\usepackage[subfigure]{tocloft}         % Without option when omitting subfig
\usepackage{caption}                    % What for?
\usepackage[latin1]{inputenc}
\usepackage{rotating}
\usepackage[doublespacing]{setspace}    % <<< replaces line spreading
\usepackage{amsfonts}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{wasysym}                    % What for?
\usepackage{url}                        % What for?
\usepackage{array}                      % What for?
\usepackage{booktabs}
\usepackage{natbib}
\usepackage{fancyhdr}

\renewcommand{\cftchapfont}{Chapter }
\renewcommand{\familydefault}{\sfdefault}

\begin{document}
\include{signature}
\include{title}
\include{copyright}
% \clearpage                            % <<< Hence with it!

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

%\pagenumbering{roman} 
%\setcounter{page}{5}
\tableofcontents
\newpage
\listoftables
\addcontentsline{toc}{section}{List of Tables}
\newpage
\listoffigures
\addcontentsline{toc}{section}{List of Figures}
%\clearpage                             % <<< Hence with it!
\newpage

\pagenumbering{arabic}
%\setcounter{page}{1}                   % <<< Hence with it!
\include{ch1}
\include{ch2}
\include{ch3}
\include{ch4}

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

\end{document}
The second issue is in the single chapters files which are included. All of them end like this.

Code: Select all

\newpage
% \clearpage            % <<< Hence with it!
\section{Figures}
Here the \clearpage command is unnecessary, too. Remember that every \include command internally consists of a sequence of commands.

Code: Select all

\clearpage \input{filename} \clearpage
Moreover you are handling the sidewaysfigure/-table in a wrong way. It doesn't accepted any placement parameters like normal floats do.

Another point (but not problem related) is that you are loading many packages which you don't really use. The most succinctly example is the setspace package. Instead of using its doublespacing option you do line spreading (see code above). Another similar example for inconsequential usage is the booktabs package. Other packages are loaded but not used. So, think about cleaning up your preamble thoroughly.
murph636
Posts: 22
Joined: Sun Mar 15, 2009 3:54 am

Re: page numbering on multiple documents

Post by murph636 »

Thank you for your response, localghost.

However, even after cleaning up my preamble in my main file, I still have the same problems. I am not sure why the TOC count is off, it does not appear to be an issue with \clearpage. I commented out the \clearpage command everywhere you have suggested, but this did not do anything.

Also, I am not sure how to rotate my figures/tables -and- their respective captions without using the sidewaysfigure/table command. I understand this does not accept any placement parameters like normal floats do, so how do I rotate both the figure/table and the caption -and- avoid the blank page being inserted?
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Re: page numbering on multiple documents

Post by localghost »

With the modifications it works fine for me. See the result in the attachment.
Attachments
thesis.pdf
The resulting output after modifications.
(204.5 KiB) Downloaded 405 times
Post Reply