I'm producing the final product of my thesis with LaTeX. I'm having trouble with the front matter of my thesis, specifically with getting LaTeX to recognize that if the front matter stops at a certain number of pages, then it is to execute the command \beginthesis.
I've tried to produce counters so that if a certain combination of counters produced a certain number, and it was greater than X, it would produce a new front matter page via \newpage, but if less than X, it would execute \beginthesis.
So, in simplified form, the whole process looks something like this, with abstract being the absolute last page that can be present:
\newcounter{frontmattercounter}
\newcounter{frontmattercheck}
\newcounter{frontmatterabstract}
\newcounter{frontmatterepigraph}
\newcommand{frontmattercheck}{%
\addtocounter{frontmattercheck}{\value{frontmatterabstract}}
\addtocounter{frontmattercheck}{\value{frontmatterepigraph}}
}
\frontmattercheck
\setcounter{frontmattercounter}{\value{frontmattercheck}}
\newcommand{epigraph}
\setcounter{frontmatterepigraph}{1}
.
.
.
\ifnum\value{frontmattercounter} > 1
\@restonecolfalse\newpage
\else
\beginthesis\fi
\newcommand{abstract}
\setcounter{frontmatterabstract}{10}
.
.
.
\beginthesis
I have about 6 or 7 pages that I have set up this way, but for some reason, it seems that LaTeX is not recognizing the values properly. Is there a better way to do this, or is there a way I can modify my process to get the intended result? Thanks in advance.
\beginthesissufficient? – egreg Oct 29 '11 at 20:51@at the start of a comment, they will be notified. – egreg Oct 30 '11 at 14:11