Page LayoutAbout pagenumbering and frontmatter

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
Post Reply
bluefantasy1
Posts: 5
Joined: Wed Apr 21, 2010 1:09 pm

About pagenumbering and frontmatter

Post by bluefantasy1 »

I am a Latex beginner and writing my dissertation with book class, which is supposed to provide roman numerals in the front matter.However, it does not show any page numbers until the main matter in arabic numbers. Can someone please give me some suggestions on how to produce roman numbers for the a few parts of the front matter, such as from biography to table of contents/list of tables(figures)
and starting from iv? Also, the numbers of main matter starts from 2 with the first page having no number; why's that?

Thanks so much. The following is the sample code.

Code: Select all

\documentclass[12pt,oneside]{book}
...
\pagestyle{fancy}
\fancypagestyle{plain}%
\fancyhf{}%
\fancyfoot[C]{\bfseries\thepage}
...
...
\begin{document}
\frontmatter
\setcounter{page}{1}
\include{title}
\include{approval}

\fancyhf{}
\fancyfoot[C]{\bfseries\thepage}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}
\include{biography}
\include{dedication}
\include{acknowledgment}

\setlength{\cftbeforetoctitleskip}{-23pt}
\renewcommand{\cftchapfont}{\normalsize}
\renewcommand{\cftchappagefont}{\normalsize}
\clearpage
%\singlespacing
\begin{doublespace}
%\doublespacing
\pagestyle{plain}%
\tableofcontents
\end{doublespace}
\cftsetindents{tab}{0em}{1.5em}
\setlength{\cftbeforelottitleskip}{-15pt}
\setlength{\cftafterlottitleskip}{35pt}
\setlength{\cfttabnumwidth}{1cm}
\setlength{\cftbeforetabskip}{1.7ex}%
\clearpage%
\pagestyle{plain}%
\listoftables

\cftsetindents{fig}{0em}{1.5em}
\setlength{\cftbeforeloftitleskip}{-15pt}
\setlength{\cftafterloftitleskip}{35pt}
\setlength{\cftfignumwidth}{1cm}
\setlength{\cftbeforefigskip}{1.7ex}
\clearpage
\pagestyle{plain}%
\listoffigures
\mainmatter
\newpage
\pagenumbering{arabic}
\setcounter{page}{1}
\fancyhf{}
\fancyhead[R]{\bfseries\thepage}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}

\input{chapter1}
...
...

Recommended reading 2024:

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

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

User avatar
frabjous
Posts: 2064
Joined: Fri Mar 06, 2009 12:20 am

About pagenumbering and frontmatter

Post by frabjous »

Please see the post on Avoidable mistakes.

You need to give us a proper MWE. Do not put ellipses ... in your document. If part of the document is not relevant to the problem, just remove it from the example.

Your sample uses commands that are not defined by the packages you load. E.g., the first command in your sample is \pagestyle{fancy} -- obviously you are using fancyhdr but didn't include the line for the package. But adding that just uncovers more problems of the same kind. How are we supposed to guess what packages you are using? You need to remove all packages not associated with the problem and ALL associated commands, but leave in the ones that are relevant.

Things just get worse from there. Nearly all the front matter, where there would be roman numerals, are inserted with \input and \include commands, referencing external documents we do not have access to. How are we supposed to guess how these external documents look, and how they are suppressing page numbers?

Please follow these instructions for constructing a proper Minimal Working Example. No one can help you otherwise.
bluefantasy1
Posts: 5
Joined: Wed Apr 21, 2010 1:09 pm

About pagenumbering and frontmatter

Post by bluefantasy1 »

Thanks so much for pointing out my problem in displaying the code.
The following is a full version of the relevant format in my dissertation.
Hope this time you may understand well to help.

Code: Select all

\documentclass[12pt,oneside]{book} %the default is 10pt in Latex 1in = 72.27pt
\usepackage{lscape}
\usepackage{mathptmx}
\usepackage[scaled]{helvet}
\usepackage{courier}
\usepackage[T1]{fontenc}
\usepackage{textcomp}
\usepackage{thesis}
\usepackage{fancyhdr}
\usepackage{setspace}
\usepackage{url}
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{bm}
\usepackage{geometry}


% To evenly distribute columns in a table,
% put an extra command before cccc, or lllll
% {\mytbsep cccc}
\newcommand \mytbsep{@{\extracolsep{\fill}}}

\textwidth6in%
\setlength{\parindent}{0.5in}

\geometry{text={6.0in,9.0in},top=1.0in,left=1.5in,right=1.0in}
\geometry{headheight=1.0in,footskip=0.5in}

\setlength{\cftaftertoctitleskip}{25pt}
\setlength{\cftafterlottitleskip}{25pt}
\setlength{\cftafterloftitleskip}{25pt}

\tabletypesize{\footnotesize}

\renewcommand{\chaptername}{CHAPTER}
\renewcommand{\contentsname}{TABLE OF CONTENTS}
\renewcommand{\listtablename}{LIST OF TABLES}
\renewcommand{\listfigurename}{LIST OF FIGURES}

%\flushbottom
\bibliographystyle{astroads}

\pagestyle{fancy}
\fancypagestyle{plain}{%
\fancyhf{}%
\fancyfoot[C]{\bfseries\thepage}
}

\begin{document}

\frontmatter
\include{abstract}
\setcounter{page}{1}
\include{title}
\include{approval}

\fancyhf{}
\fancyfoot[C]{\bfseries\thepage}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}

\include{biography}
\include{dedication}
\include{acknowledgment}

\setlength{\cftbeforetoctitleskip}{-23pt}
\renewcommand{\cftchapfont}{\normalsize}
\renewcommand{\cftchappagefont}{\normalsize}
\clearpage
\begin{doublespace}
\pagestyle{plain}%
\tableofcontents
\end{doublespace}

\cftsetindents{tab}{0em}{1.5em}
\setlength{\cftbeforelottitleskip}{-15pt}
\setlength{\cftafterlottitleskip}{35pt}
\setlength{\cfttabnumwidth}{1cm}
\setlength{\cftbeforetabskip}{1.7ex}%
\clearpage%
\pagestyle{plain}%
\listoftables

%\setlength{\cftparskip}{1.5ex}
\cftsetindents{fig}{0em}{1.5em}
\setlength{\cftbeforeloftitleskip}{-15pt}
\setlength{\cftafterloftitleskip}{35pt}
\setlength{\cftfignumwidth}{1cm}
\setlength{\cftbeforefigskip}{1.7ex}
\clearpage
\pagestyle{plain}%
\listoffigures

\mainmatter
\newpage
\pagenumbering{arabic}
\setcounter{page}{1}

\fancyhf{}
\fancyhead[R]{\bfseries\thepage}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}

\doublespacing
\input{chapter1}

\begin{singlespace}
\clearpage
\phantomsection\addcontentsline{toc}{chapter}{REFERENCES}
\input{biblio}
\end{singlespace}
\end{document}


abstract.tex

\pagestyle{empty}
\begin{center}
{\bfseries ABSTRACT}
\end{center}

\smallskip

\begin{doublespace}
\noindent Paragraph 1¡­¡­¡­¡­.

Paragraph 2 ¡­¡­¡­¡­¡­¡­..
\end{doublespace}
\endinput

title.tex

\thispagestyle{empty}


\vspace*{\stretch{1.2}}
{\singlespacing\bfseries\centering by\\
Your Name Here}

\pagebreak

\thispagestyle{empty}


\par
\vspace*{\fill}


\end{center}
\pagebreak
\endinput



approval.tex


\chapter*{APPROVAL PAGE}
\thispagestyle{empty}

\pagebreak
\endinput


biography.tex

\thispagestyle{empty}
\chapter*{BIOGRAPHICAL SKETCH}%
%\phantomsection\addcontentsline{toc}{chapter}{BIOGRAPHICAL SKETCH}

\begin{singlespace}
\end{singlespace}
\clearpage
\endinput



dedication.tex

\thispagestyle{plain} \vspace*{\stretch{1}}
\begin{center}

\vskip -2in
 {\em To My Beloved Parents}

\end{center}
\vspace*{\stretch{1}}

\pagebreak
\endinput



acknowledgment.tex

\thispagestyle{plain}

\chapter*{ACKNOWLEDGMENT}%
%\phantomsection\addcontentsline{toc}{chapter}{ACKNOWLEDGMENT}

\begin{doublespace}

Your thanks goes here ¡­¡­¡­¡­..

\end{doublespace}

\pagebreak
\endinput


User avatar
frabjous
Posts: 2064
Joined: Fri Mar 06, 2009 12:20 am

About pagenumbering and frontmatter

Post by frabjous »

bluefantasy1 wrote:Thanks so much for pointing out my problem in displaying the code.
Apparently you did not understand what I wrote, however, because you are still using \include and \input commands to call documents we have no access to. You are also using a package (thesis.sty), which is not part of a default installation, and again, we have no access to, without showing where this package can be acquired.

If you want people to help you, you need to meet them half-way. Your code does no one other than you any good if no one other than you can compile it.

Please reread the "avoidable mistakes" page I linked to above, and please do not make any of these mistakes.
bluefantasy1
Posts: 5
Joined: Wed Apr 21, 2010 1:09 pm

Re: About pagenumbering and frontmatter

Post by bluefantasy1 »

Thanks for your reply.

In fact, the "include" and "input" templates (e.g., biography, dedication, etc
of the frontmatter) I am using have been appended
to my last code block right after the main file. The "thesis" style
file is not relevant to producing page numbers, as far as it concerns.
But if you insist the file be posted, I will do that for sure.

Thanks again for your patience and understanding.
User avatar
frabjous
Posts: 2064
Joined: Fri Mar 06, 2009 12:20 am

About pagenumbering and frontmatter

Post by frabjous »

bluefantasy1 wrote:Thanks for your reply.

In fact, the "include" and "input" templates (e.g., biography, dedication, etc
of the frontmatter) I am using have been appended
to my last code block right after the main file.
OK, I see that now. But it would have been much easier to see if you had put them in their own code blocks.
The "thesis" style
file is not relevant to producing page numbers, as far as it concerns.
But if you insist the file be posted, I will do that for sure.
If it is not relevant to the problem, them it should be removed, as should all commands that rely it. You cannot simply remove the line in question; the document will not compile without it.

In any case, if you look at the included documents they have commands like:

\thispagestyle{empty}

or

\pagestyle{empty}

Those commands are in effect telling it to suppress the page numbers.

If you want page numbers, you'll need to use \pagestyle{fancy} or \pagestyle{plain} -- be sure to define these early enough so that they take effect.

The portion:

Code: Select all

    \fancypagestyle{plain}{%
    \fancyhf{}%
    \fancyfoot[C]{\bfseries\thepage}
    }
defines the plain style, and the portion later on:

Code: Select all

    \fancyhf{}
    \fancyfoot[C]{\bfseries\thepage}
    \renewcommand{\headrulewidth}{0pt}
    \renewcommand{\footrulewidth}{0pt}
defines the fancy style. If you want to use the fancy style in the abstract, etc., you'll need to move that definition before them.

When I compile your document, however, removing those lines that seem to depend on thesis.sty, I do get several Roman page numbers before the arabic page numbers, and I get an arabic page 1 too.
bluefantasy1
Posts: 5
Joined: Wed Apr 21, 2010 1:09 pm

Re: About pagenumbering and frontmatter

Post by bluefantasy1 »

Thanks. Let me try it out first.
bluefantasy1
Posts: 5
Joined: Wed Apr 21, 2010 1:09 pm

Re: About pagenumbering and frontmatter

Post by bluefantasy1 »

It finally works!

Thanks so much.
Post Reply