I was wondering if anyone knew how I can start the numbering from 2 instead of 1. The Thesis.cls begins the numbering on anything after the titlepage that I include.
In this case, I begin my thesis by including acknowledgements page, so the acknowledgements page starts the numbering at 1. I need the \titlepage to be the page 1, without actually including the number 1 in the header. So numbering should start at 2 on the acknowledgements page. I figured it had to do something with \pagestyle{myheadings} in the global settings section in the .cls, but I am not sure. Commenting out \pagestyle{myheadings} doesn't do anything either. It does use \markboth and \clearpage which may be part of it as well as \refstepcount. The \titlepage is also not a \chapter or a \part which may exclude the \titlepage? Not sure. I also provided my main.tex which may have something there that is preventing the \setcounter or \addtocounter I try to include from working.
It has to be something in the Global Settings section, or the Renewed Commands section in the .cls file itself (sections labeled in .cls). Or perhaps something excluded in the Title Page section (which I tried to make it a chapter using \chapter{}, but no luck).
I please ask for guidance as I have spent hours trying to fiddle with settings and not break anything, and I have to turn this in in a few days here. Thank you for your time.
Code: Select all
%Thesis.cls
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{uathesis}
\DeclareOption{CC-BY}{%
\setboolean{CCBY}{true}
}
\DeclareOption{CC-BY-SA}{%
\setboolean{CCBYSA}{true}
}
\DeclareOption{CC-BY-ND}{%
\setboolean{CCBYND}{true}
}
\newboolean{GeneratedOn}
\setboolean{GeneratedOn}{false}
\DeclareOption{generatedon}{%
\setboolean{GeneratedOn}{true}
} % This option puts the generation date on the titlepage.
%% These next four options are for passing through to the book class.
\DeclareOption{oneside}{%
\PassOptionsToClass{\CurrentOption}{book}%
}
\DeclareOption{twoside}{%
\PassOptionsToClass{\CurrentOption}{book}%
}
\DeclareOption{openright}{%
\PassOptionsToClass{\CurrentOption}{book}%
}
\DeclareOption{openany}{%
\PassOptionsToClass{\CurrentOption}{book}%
}
\DeclareOption*{%
\ClassWarning{uathesis}{Unknown option `\CurrentOption'}%
} % A general warning for unknown options.
\ExecuteOptions{oneside,openright} % this provides a default option list
\ProcessOptions\relax
\LoadClass[12pt]{book}
%% Okay, now that the options are set and the book class is loaded in,
%% we now need to start detailing how we want this to be different than
%% the book class.
% We use \sloppy to suppress word division and permit larger interword
% spacing so that lines are broken between words.
\sloppy
%%---------------------------- Global Settings ------------------------
%% Page Style to put numbers at the top.
\pagestyle{myheadings}
%% Double spaced
%% (in order to conserve paper, we'll actually make this less than 2)
\renewcommand{\baselinestretch}{1.4}
%% Set margins for the bulk of the dissertation (referred to as Body of Paper).
%% There are only two pages that have different margins: the Title Page,
%% and the Statement by Author page. Fortunately, their left and right
%% margins are identical, and the top and bottom margins are greater, so
%% we'll just throw in some extra vspace in those places.
\setlength{\topmargin}{0in} % = 1in because LaTeX adds 1in
\setlength{\headheight}{12pt} % Height of page numbers
\setlength{\headsep}{0.5in} % Distance from top of pagenum to text.
\addtolength{\headsep}{-\headheight}% Adjustment for height of pagenumber.
\setlength{\topskip}{12pt} % This is the height of the text.
\setlength{\footskip}{0in} % ???
\setlength{\oddsidemargin}{0.25in} % = 1.5in because LaTeX adds 1in
\setlength{\evensidemargin}{0in} % = 1in because LaTeX adds 1in
\setlength{\textheight}{8.4in} % should be 8.5in, see below
\setlength{\textwidth}{5.9in} % should be 6in but we're being
% conservative, just to be safe.
% Make sure that various key names are in all caps.
\renewcommand{\partname}{PART}
\renewcommand{\chaptername}{CHAPTER}
\renewcommand{\appendixname}{APPENDIX}
\renewcommand{\contentsname}{TABLE OF CONTENTS}
\renewcommand{\listfigurename}{LIST OF FIGURES}
\renewcommand{\listtablename}{LIST OF TABLES}
\renewcommand{\bibname}{REFERENCES}
%%---------------------------- General Renewed Commands----------------
%%
%% There are several key and subtle LaTeX commands that need to be
%% altered in minor ways from the way they are defined in book.cls.
%% This section 'renew's or redefines them for our use. In all other
%% sections of this class file, we have strived to use the abstract
%% generic LaTeX commands rather than the more direct (and potentially
%% dangerous) TeX commands. Since this section renews commands taken
%% from the LaTeX book class file, we follow the (less strict) conventions
%% in that file, so that we are making the minimal changes to these
%% commands to make them work for us.
% We are renewing the following two commands so that there are
% appropriate dot leaders between the TOC item and that TOC item's
% page number. We replaced the \hfil line with a sequence of commands
% taken from the latex.ltx file for \@dottedtocline (instead of just
% using \dotfill which gave dots with a slightly different spacing).
% Similarly, we left the page numbers bold, rather than making them
% normalfont.
%
% The lines that were altered are still present below, but commented out.
% Hopefully this will make it easier to integrate with future versions
% of these commands in LaTeX.
%
% It appears that the formatters no longer want to allow any boldfacing
% in TOC-related items, so \bfseries items have been commented out
% below.
%
% Otherwise these two commands are identical to those in the
% 2001/04/21 v1.4e book.cls.
%
\renewcommand*\l@part[2]{%
\ifnum \c@tocdepth >-2\relax
\addpenalty{-\@highpenalty}%
\addvspace{2.25em \@plus\p@}%
\setlength\@tempdima{3em}%
\begingroup
\parindent \z@ \rightskip \@pnumwidth
\parfillskip -\@pnumwidth
{\leavevmode
%\large \bfseries %#1\hfil \hb@xt@\@pnumwidth{\hss #2}}\par
{#1}\nobreak \leaders\hbox{$\m@th
\mkern \@dotsep mu\hbox{.}\mkern \@dotsep mu$}\hfill\nobreak
%\hb@xt@\@pnumwidth{\hfil\normalfont \normalcolor #2}%
\hb@xt@\@pnumwidth{\hfil \normalcolor #2}%
\par}
\nobreak
\global\@nobreaktrue
\everypar{\global\@nobreakfalse\everypar{}}%
\endgroup
\fi}
\renewcommand*\l@chapter[2]{%
\ifnum \c@tocdepth >\m@ne
\addpenalty{-\@highpenalty}%
\vskip 1.0em \@plus\p@
\setlength\@tempdima{1.5em}%
\begingroup
\parindent \z@ \rightskip \@pnumwidth
\parfillskip -\@pnumwidth
\leavevmode %\bfseries
\advance\leftskip\@tempdima
\hskip -\leftskip
%#1\nobreak\hfil \nobreak\hb@xt@\@pnumwidth{\hss #2}\par
{#1}\nobreak \leaders\hbox{$\m@th
\mkern \@dotsep mu\hbox{.}\mkern \@dotsep mu$}\hfill\nobreak
%\hb@xt@\@pnumwidth{\hfil\normalfont \normalcolor #2}%
\hb@xt@\@pnumwidth{\hfil \normalcolor #2}%
\par
\penalty\@highpenalty
\endgroup
\fi}
% We renewed the following command so that the chapter level items in
% the TOC have the correct word (nothing|Chapter|Appendix) in front of
% them.
%
% Otherwise this command is identical to \def\@chapter in the
% 2001/04/21 v1.4e book.cls.
\renewcommand\@chapter[2][\#2]{\ifnum \c@secnumdepth >\m@ne
\if@mainmatter
\refstepcounter{chapter}%
\typeout{\@chapapp\space\thechapter.}%
\addcontentsline{toc}{chapter}%
%{\protect\numberline{\thechapter}#1}%
{\@chapapp\space\protect\numberline{\thechapter}#1}%
\else
\addcontentsline{toc}{chapter}{#1}%
\fi
\else
\addcontentsline{toc}{chapter}{#1}%
\fi
\chaptermark{#1}%
\addtocontents{lof}{\protect\addvspace{10\p@}}%
\addtocontents{lot}{\protect\addvspace{10\p@}}%
\if@twocolumn
\@topnewpage[\@makechapterhead{#2}]%
\else
\@makechapterhead{#2}%
\@afterheading
\fi}
% In the same vein as above, the following was renewed so that part
% level items in the TOC will have the correct word. Similarly, font
% size and bolding are removed to stay consistent with TOC.
%
% Otherwise this command is identical to \def\@part in the
% 2004/02/16 v1.4f book.cls
\renewcommand\@part[2][\#2]{%
\ifnum \c@secnumdepth >-2\relax
\refstepcounter{part}%
\addcontentsline{toc}{part}%{\thepart\hspace{1em}#1}%
{\partname\space\thepart\hspace{1em}#1}%
\else
\addcontentsline{toc}{part}{#1}%
\fi
\markboth{}{}%
{\centering
\interlinepenalty \@M
\normalfont
\ifnum \c@secnumdepth >-2\relax
%\huge\bfseries \partname\nobreakspace\thepart
\partname\nobreakspace\thepart
\par
\vskip 20\p@
\fi
%\Huge \bfseries #2\par}%
#2\par}%
\@endpart}
% We renewed the following commands so that when the chapter headings are
% printed out on the first page of the chapter, they are the same font
% size as in the TOC, as per the requirements. Additionally, the text
% starts right at the top of the page, and the headings are centered.
% These two aren't required, but help set these items off.
%
% It appears that the formatters no longer want to allow any boldfacing
% in TOC-related items, to eh \bfseries items have been commented out
% below.
%
% Otherwise this command is identical to \def\@makechapterhead and
% \def\@makeschapterhead in the 2001/04/21 v1.4e book.cls.
\renewcommand{\@makechapterhead}[1]{%
%\vspace*{50\p@}%
{\parindent \z@ \raggedright \normalfont
\begin{center}
\ifnum \c@secnumdepth >\m@ne
\if@mainmatter
%\huge\bfseries \@chapapp\space \thechapter
%\bfseries \@chapapp\space \thechapter
\@chapapp\space \thechapter
\par\nobreak
\vskip 20\p@
\fi
\fi
\interlinepenalty\@M
%\Huge \bfseries #1\par\nobreak
%\bfseries #1\par\nobreak
#1\par\nobreak
\end{center}
\vskip 40\p@
}}
\renewcommand{\@makeschapterhead}[1]{%
%\vspace*{50\p@}%
{\parindent \z@ \raggedright
\begin{center}
\normalfont
\interlinepenalty\@M
%\Huge \bfseries #1\par\nobreak
%\bfseries #1\par\nobreak
#1\par\nobreak
\end{center}
\vskip 40\p@
}}
% We renewed the chapter command simply so that we could comment out the
% pagestyle and put in the empty \markboth. We want the page numbers (even
% on the first page of a chapter) to be in the header. Similarly, in the
% TOC, LOT, and LOF (the only sections with page headers) we don't want
% headers on the first page.
%
% Otherwise this command is identical to \newcommand\chapter
% in the 2004/02/16 v1.4f book.cls
\renewcommand{\chapter}{\if@openright\cleardoublepage\else\clearpage\fi
%\thispagestyle{plain}%
\global\@topnum\z@
\@afterindentfalse
\markboth{}{} % <--added
\secdef\@chapter\@schapter}
% Same as above, but for the part command, otherwise identical to
% \newcommand\part in the 2004/02/16 v1.4f book.cls
\renewcommand\part{%
\if@openright
\cleardoublepage
\else
\clearpage
\fi
%\thispagestyle{plain}%
\if@twocolumn
\onecolumn
\@tempswatrue
\else
\@tempswafalse
\fi
\markboth{}{} % <--added
\null\vfil
\secdef\@part\@spart}
% The following two commands were renewed so that these items don't
% have a larger font size than everything else. Not required, but it
% makes things fit in since the chapter title can't be big.
%
% A note on bold sections: The default below is how Grad College wants
% it. This way sections are in the same font and face as they appear
% in the TOC (we could have done it the other way around and made the
% sections in the TOC bold, but then every entry in the TOC would be
% boldface, and that would look dumb, too). This class file forces
% compliant behavior. However, I think that it significantly improves
% the readability of the document if the section titles within the
% text are in boldface. So in the following two commands, you'll see
% a commented out line that says "<-- makes section bold". Uncomment
% that, and comment out the line below it to get boldface sections,
% if you want.
%
% Otherwise this command is identical to the \section and \subsection
% newcommands in the 2001/04/21 v1.4e book.cls.
\renewcommand{\section}{\@startsection {section}{1}{\z@}%
{-3.5ex \@plus -1ex \@minus -.2ex}%
{2.3ex \@plus.2ex}%
{\normalsize\bfseries}} %<-- makes section bold
%{\normalsize}}
%{\normalfont\Large\bfseries}}
\renewcommand{\subsection}{\@startsection{subsection}{2}{\z@}%
{-3.25ex\@plus -1ex \@minus -.2ex}%
{1.5ex \@plus .2ex}%
{\normalsize\bfseries}} %<-- makes subsection bold
%{\normalsize}}
%{\normalfont\large\bfseries}}
% The following four commands were renewed so that text in the body
% and captions of figures and tables will be single spaced and not
% get the document's default spacing.
%
% Otherwise this command is identical to the \figure and \table
% newenvironments in the 2001/04/21 v1.4e book.cls.
\renewenvironment{figure}
{
\renewcommand{\baselinestretch}{1} % single spaced here
\small\normalsize % size switch to make the spacing behave
\@float{figure}}
{\end@float}
\renewenvironment{figure*}
{
\renewcommand{\baselinestretch}{1} % single spaced here
\small\normalsize % size switch to make the spacing behave
\@dblfloat{figure}}
{\end@dblfloat}
\renewenvironment{table}
{
\renewcommand{\baselinestretch}{1} % single spaced here
\small\normalsize % size switch to make the spacing behave
\@float{table}}
{\end@float}
\renewenvironment{table*}
{
\renewcommand{\baselinestretch}{1} % single spaced here
\small\normalsize % size switch to make the spacing behave
\@dblfloat{table}}
{\end@dblfloat}
%% These commands give us values for strings that we will use
%% more than once in the commands below.
\newcommand{\completetitle}[1]{%
\newcommand{\CompleteTitle}{#1}
}
\newcommand{\fullname}[1]{%
\newcommand{\FullName}{#1}
}
\newcommand{\degreename}[1]{%
\newcommand{\DegreeName}{#1}
}
% JS added this 3/2017 so astro can have Astronomy & Astrophysics, per grad college req
\newcommand{\degreemajor}[1]{%
\newcommand{\DegreeMajor}{#1}
}
%%---------------------------- Title Page -----------------------------
%%
%% \maketitlepage{Title}{Author}{degree title}{Department}{y e a r}
%%
%% options are #1 = Title
%% #2 = Author
%% #3 = degree title
%% #4 = Department
%% #5 = year
\newcommand{\maketitlepage}[5]{%
% This bracket begins an unnamed environment in which we will temporarily
% override the document's page style.
{
\thispagestyle{empty} % no page number on title page
\renewcommand{\baselinestretch}{1} % single spaced here
\small\normalsize % size switch to make the spacing behave
\vspace*{0.75in} % This accounts for the larger top margin. You'd think
\begin{center} % this would be 1in, but that pushes it down too far?
{\large\MakeUppercase #1}%\CompleteTitle}#1} % Title text
\bigskip
\bigskip
by
\bigskip
%\FullName
#2 % Author
\vspace{1in}
\rule{2in}{1pt}\\
\ifthenelse{ \boolean{Copyright} } % This puts in the Copyright statement
{Copyright \copyright\#2} %\FullName\ #2}
% Creative Commons licenses
\ifthenelse{\boolean{CCBY}}{\by}{}
\ifthenelse{\boolean{CCBYSA}}{\bysa}{}
\ifthenelse{\boolean{CCBYND}}{\bynd}{}
Copyright \copyright\ #2 #5 %\FullName\ % NICK COPIED THIS TO HERE TO FULFILL REQUEST FROM FORMATTING POLICE
\vspace{0.75in}
A \ThesisType\ Submitted to the Faculty of the
\bigskip
{\MakeUppercase #4} % Department
\bigskip
In Partial Fulfillment of the Requirements\\
For the Degree of
\bigskip
{\MakeUppercase #3}%\DegreeName}#3} % Degree Title
\ifdefined\DegreeMajor % Degree major, JS added 3/2017
WITH A MAJOR IN \MakeUppercase{\DegreeMajor}
%\bigskip
\else
\fi
\bigskip
In the Graduate College
\bigskip
THE UNIVERSITY OF ARIZONA
\vfill
\ifthenelse{ \boolean{GeneratedOn} }
%{This draft was generated on \today.}
{#2} % Year
\vspace{0.5in} % This accounts for the 0.5in larger bottom margin on this page.
\end{center}
}
}
%%---------------------------- Acknowledgements -----------------------
%%
%% This command includes the file that contains the acknowledgements.
%%
%% \incacknowledgements
%% Option is #1 = acknowledgements file name
%%
\newcommand{\incacknowledgements}[1]{
% This bracket begins an unnmaed environment in which we will temporarily
% override the document's page style.
{
\renewcommand{\baselinestretch}{1} % single spaced here
\small\normalsize % size switch to make the spacing behave
\chapter*{ACKNOWLEDGEMENTS}
\InputIfFileExists{#1}
{\typeout{Including your file #1.tex as the acknowledgements.}}
{Couldn't find #1.tex to include as your acknowledgements.}
}
}
%%---------------------------- Abstract -------------------------------
%%
%% This command includes the file that contains the abstract.
%%
%% \incabstract
%% Option is #1 = abstract file name
%%
\newcommand{\incabstract}[1]{
\chapter*{ABSTRACT}
\addcontentsline{toc}{chapter}{ABSTRACT}
\InputIfFileExists{#1}
{\typeout{Including your file #1.tex as the abstract.}}
{Couldn't find #1.tex to include as your abstract.}
}
%%---------------------------- Table of Contents ----------------------
%%
%% The table of contents that the UofA wants is subtley different in a
%% number of ways such that we need to redefine the \tableofcontents
%% command provided by the basic LaTeX classes. Many of the commands
%% here are confusing, but were taken from the LaTeX book.cls class
%% file with the following date and version stamp: 2001/04/21 v1.4e
%%
\renewcommand{\tableofcontents}{
\addtolength{\headsep}{0.5in} % These adjust things for the running
\addtolength{\textheight}{-0.5in} % headers for TOC, LOF, LOT.
% This bracket begins an unnmaed environment in which we will temporarily
% override the document's page style and margins
{
\renewcommand{\baselinestretch}{1} % single spaced here
\small\normalsize % size switch to make the spacing behave
\if@twocolumn % \
\@restonecoltrue\onecolumn % \
\else % > Taken from book.cls
\@restonecolfalse % /
\fi % /
% vspace added to account for the TOC, LOF, & LOT running header business.
\chapter*{\vspace*{-0.5in}\contentsname}
% \markboth{ \protect\raisebox{-0.5in}{\textbf{\emph{\contentsname} -- Continued}\hspace{1.5in}} }{
% \protect\raisebox{-0.5in}{\hspace{1.5in}\textbf{\emph{\contentsname} -- Continued}} }
\markboth{ \protect\raisebox{-0.5in}{{\emph{\contentsname} -- Continued}\hspace{1.5in}} }{
\protect\raisebox{-0.5in}{\hspace{1.5in}{\emph{\contentsname} -- Continued}} }
\@starttoc{toc}%
\if@restonecol\twocolumn\fi % Taken from book.cls
}
}
%%---------------------------- List of Tables -------------------------
%%
%% The U of A List of Tables requires a running header on subsequent
%% pages that we must define here. We also add this section to the TOC.
%% This was modified from the definition for listoffigures from
%% 2001/04/21 v1.4e book.cls.
%%
\renewcommand{\listoftables}{%
% This bracket begins an unnmaed environment in which we will temporarily
% override the document's page style and margins
{
\renewcommand{\baselinestretch}{1} % single spaced here
\small\normalsize % size switch to make the spacing behave
\if@twocolumn
\@restonecoltrue\onecolumn
\else
\@restonecolfalse
\fi
% vspace added to account for the TOC, LOF, & LOT running header business.
\chapter*{\vspace*{-0.2in}\listtablename}%
% \markboth{\protect\raisebox{-0.5in}{\textbf{\emph{\listtablename} -- Continued}\hspace{1.5in}} }{
% \protect\raisebox{-0.5in}{\hspace{1.5in}\textbf{\emph{\listtablename} -- Continued}} }
\markboth{\protect\raisebox{-0.5in}{{\emph{\listtablename} -- Continued}\hspace{1.5in}} }{
\protect\raisebox{-0.5in}{\hspace{1.5in}{\emph{\listtablename} -- Continued}} }
\addcontentsline{toc}{chapter}{\listtablename}
\@starttoc{lot}%
\if@restonecol\twocolumn\fi
}
%\clearpage
\addtolength{\headsep}{-0.5in} % Un-adjust things for the running
\addtolength{\textheight}{0.5in} % headers for TOC, LOF, LOT.
Code: Select all
%%------------------------------------------------------------%main.tex-------------------------------------------------------------------------------------------------------------------------------
\documentclass[thesis,oneside]{uathesis}
\usepackage[utf8]{inputenc}
\usepackage[square,numbers]{natbib}
\renewcommand\nomgroup[1]{%
\item[\bfseries
\ifstrequal{#1}{acro}{\textbf{Acronyms}}{%
\ifstrequal{#1}{sy}{\textbf{Symbols}}{}}%
]}
\usepackage{textcomp}
\usepackage{gensymb}
%\chapterfont{\centering}
\begin{document}
%\setcounter{page}{2}
\begin{titlepage}
\maketitlepage{title}{name}{degree}{department}{2022}
%\pagenumbering{roman}
%\maketitle
\end{titlepage}
%\titlespacing{\chapter}{0pt}{0pt}
\pagebreak
\incacknowledgements{}
I acknowledge