\setcounter{page}{0}
\pagenumbering{empty}
\includegraphics[width=100mm,height=20mm,angle=0]{logo.pdf}
\frontmatter
\chapter{Abstract}
___________________________
[PDFLaTeX] finished with exit status 1
./thesis.tex:45:Missing number, treated as zero. \frontmatter
If I remove the includegraphics it runs through fine. Where am i going
astray?!
This has nothing to do with the \includegraphics command. You will get
the same error if you compile this file:
\documentclass{book}
\begin{document}
\setcounter{page}{0}
\pagenumbering{empty}
a
\frontmatter
\chapter{Abstract}
test
\end{document}
The problem is that you are trying to put some material *before* the
\frontmatter command. This works fine:
\documentclass{book}
\usepackage{graphicx}
\begin{document}
\setcounter{page}{0}
\pagenumbering{empty}
\frontmatter
\includegraphics{logo.pdf}
\chapter{Abstract}
test
\end{document}
Best regards,
Jose Carlos Santos
Ahhh that makes sense :) Thanks, it now works! Sometimes I think i
left my brain in bed!
Nonsense makes more sense. ;-)
The problem is \pagenumbering{empty}, because
"empty" isn't a valid numbering style. From latex.ltx:
\def\pagenumbering#1{%
\global\c@page \@ne
\gdef\thepage{%
\csname @#1\endcsname \c@page
}%
}
\thepage becomes to \@empty\c@page. Accidently "\@empty" isn't defined
as empty macro:
\def\@empty{}
\frontmatter starts with \cleardoublepage, thus a page is output
if there is some text before. Depending on the page style \thepage
is called in the header or footer.
Thus the lonely page count register \c@page remains. TeX now
expects an assignment, but cannot find a number and throws
the error message.
Using "gobble" instead of "empty" would call \@gobble that
just eats the next argument and \c@page vanishes.
But instead of such dirty tricks there are officially documented ways
for suppressing the page number, e.g. \(this)pagestyle{empty}.
Yours sincerely
Heiko <ober...@uni-freiburg.de>