*hyperref using driver hpdftex*
(/usr/local/gwTeX/texmf.local/tex/latex/hyperref/hpdftex.def))
! Missing = inserted for \ifnum.
<to be read again>
v
l.3 \ifxetex
?
! Missing number, treated as zero.
<to be read again>
v
l.3 \ifxetex
?
\ifxetex just happens to be the first line after the \documentclass
declaration if I change the text on that line I get the same error with
the new text instead of \ifxetex. Now if I copy the \RequirePackage
statements from the class and paste them into the preamble changing
them to \usepackage declaration I do not get this error. I am stumped.
I did a list files and they are calling exactly the same files in
exactly the same order. What could be the culprit? Here are the file
lists
Packages loaded via class
amsart.cls 2004/08/06 v2.20
amsmath.sty 2000/07/18 v2.13 AMS math features
amstext.sty 2000/06/29 v2.01
amsgen.sty 1999/11/30 v2.0
amsbsy.sty 1999/11/29 v1.2d
amsopn.sty 1999/12/14 v2.01 operator names
umsa.fd 2002/01/19 v2.2g AMS font definitions
amsfonts.sty 2001/10/25 v2.2f
geometry.sty 2002/07/08 v3.2 Page Geometry
keyval.sty 1999/03/16 v1.13 key=value parser (DPC)
geometry.cfg
ifxetex.sty 2006/08/21 v0.3 Provides ifxetex conditional
amssymb.sty 2002/01/22 v2.2d
natbib.sty 2006/09/06 7.4a (PWD)
listings.sty 2004/10/17 1.3b (Carsten Heinz)
lstpatch.sty 2004/10/17 1.3b (Carsten Heinz)
lstmisc.sty 2004/09/07 1.3 (Carsten Heinz)
listings.cfg 2004/09/05 1.3 listings configuration
setspace.sty 2000/12/01 6.7 Contributed and Supported LaTeX2e
package
floatflt.sty 1996/02/27 v. 1.3
float.sty 2001/11/08 v1.3d Float enhancements (AL)
ifthen.sty 2001/05/26 v1.1c Standard LaTeX ifthen package (DPC)
caption.sty 2006/03/21 v3.0j Customising captions (AR)
caption3.sty 2006/03/16 v3.0j caption3 kernel (AR)
subfigure.sty 2002/07/30 v2.1.4 subfigure package
subfigure.cfg
graphicx.sty 1999/02/16 v1.0f Enhanced LaTeX Graphics (DPC,SPQR)
graphics.sty 2006/02/20 v1.0o Standard LaTeX Graphics (DPC,SPQR)
trig.sty 1999/03/16 v1.09 sin cos tan (DPC)
graphics.cfg 2001/08/31 v1.1 graphics configuration of teTeX/TeXLive
pdftex.def 2006/08/14 v0.03t Graphics/color for pdfTeX
microtype.sty 2006/09/09 v1.9f Micro-typography with pdfTeX (RS)
microtype.cfg 2006/04/20 v1.8 microtype main configuration file (RS)
hyperref.sty 2006/09/06 v6.75e Hypertext links for LaTeX
pd1enc.def 2006/09/06 v6.75e Hyperref: PDFDocEncoding definition
(HO)
hyperref.cfg 2002/06/06 v1.2 hyperref configuration of TeXLive
kvoptions.sty 2006/08/22 v2.4 Connects package keyval with LaTeX
options (HO
)
backref.sty 2006/10/06 v1.27 Bibliographical back referencing
url.sty 2005/06/27 ver 3.2 Verb mode for urls, etc.
hpdftex.def 2006/09/06 v6.75e Hyperref driver for pdfTeX
umsa.fd 2002/01/19 v2.2g AMS font definitions
umsb.fd 2002/01/19 v2.2g AMS font definitions
ragged2e.sty 2003/03/25 v2.04 ragged2e Package (MS)
everysel.sty 1999/06/08 v1.03 EverySelectfont Package (MS)
supp-pdf.tex
mt-cmr.cfg 2005/11/07 v1.9 microtype config. file: Computer Modern
Roman (
RS)
color.sty 2005/11/14 v1.0j Standard LaTeX Color (DPC)
color.cfg 2001/08/31 v1.1 color configuration of teTeX/TeXLive
nameref.sty 2006/08/15 v2.26 Cross-referencing by name of section
refcount.sty 2006/02/20 v3.0 Data extraction from references (HO)
paper.out
paper.out
lstlang1.sty 2004/09/05 1.3 listings language file
lstlang1.sty 2004/09/05 1.3 listings language file
lstlang1.sty 2004/09/05 1.3 listings language file
lstmisc.sty 2004/09/07 1.3 (Carsten Heinz)
mt-msa.cfg 2006/02/04 v1.1 microtype config. file: AMS symbols (a)
(RS)
mt-msb.cfg 2005/06/01 v1.0 microtype config. file: AMS symbols (b)
(RS)
lstlang1.sty 2004/09/05 1.3 listings language file
Loaded via preamble
amsart.cls 2004/08/06 v2.20
amsmath.sty 2000/07/18 v2.13 AMS math features
amstext.sty 2000/06/29 v2.01
amsgen.sty 1999/11/30 v2.0
amsbsy.sty 1999/11/29 v1.2d
amsopn.sty 1999/12/14 v2.01 operator names
umsa.fd 2002/01/19 v2.2g AMS font definitions
amsfonts.sty 2001/10/25 v2.2f
geometry.sty 2002/07/08 v3.2 Page Geometry
keyval.sty 1999/03/16 v1.13 key=value parser (DPC)
geometry.cfg
ifxetex.sty 2006/08/21 v0.3 Provides ifxetex conditional
amssymb.sty 2002/01/22 v2.2d
natbib.sty 2006/09/06 7.4a (PWD)
listings.sty 2004/10/17 1.3b (Carsten Heinz)
lstpatch.sty 2004/10/17 1.3b (Carsten Heinz)
lstmisc.sty 2004/09/07 1.3 (Carsten Heinz)
listings.cfg 2004/09/05 1.3 listings configuration
setspace.sty 2000/12/01 6.7 Contributed and Supported LaTeX2e
package
floatflt.sty 1996/02/27 v. 1.3
float.sty 2001/11/08 v1.3d Float enhancements (AL)
ifthen.sty 2001/05/26 v1.1c Standard LaTeX ifthen package (DPC)
caption.sty 2006/03/21 v3.0j Customising captions (AR)
caption3.sty 2006/03/16 v3.0j caption3 kernel (AR)
subfigure.sty 2002/07/30 v2.1.4 subfigure package
subfigure.cfg
graphicx.sty 1999/02/16 v1.0f Enhanced LaTeX Graphics (DPC,SPQR)
graphics.sty 2006/02/20 v1.0o Standard LaTeX Graphics (DPC,SPQR)
trig.sty 1999/03/16 v1.09 sin cos tan (DPC)
graphics.cfg 2001/08/31 v1.1 graphics configuration of teTeX/TeXLive
pdftex.def 2006/08/14 v0.03t Graphics/color for pdfTeX
microtype.sty 2006/09/09 v1.9f Micro-typography with pdfTeX (RS)
microtype.cfg 2006/04/20 v1.8 microtype main configuration file (RS)
hyperref.sty 2006/09/06 v6.75e Hypertext links for LaTeX
pd1enc.def 2006/09/06 v6.75e Hyperref: PDFDocEncoding definition
(HO)
hyperref.cfg 2002/06/06 v1.2 hyperref configuration of TeXLive
kvoptions.sty 2006/08/22 v2.4 Connects package keyval with LaTeX
options (HO
)
backref.sty 2006/10/06 v1.27 Bibliographical back referencing
url.sty 2005/06/27 ver 3.2 Verb mode for urls, etc.
hpdftex.def 2006/09/06 v6.75e Hyperref driver for pdfTeX
umsa.fd 2002/01/19 v2.2g AMS font definitions
umsb.fd 2002/01/19 v2.2g AMS font definitions
ragged2e.sty 2003/03/25 v2.04 ragged2e Package (MS)
everysel.sty 1999/06/08 v1.03 EverySelectfont Package (MS)
supp-pdf.tex
mt-cmr.cfg 2005/11/07 v1.9 microtype config. file: Computer Modern
Roman (
RS)
color.sty 2005/11/14 v1.0j Standard LaTeX Color (DPC)
color.cfg 2001/08/31 v1.1 color configuration of teTeX/TeXLive
nameref.sty 2006/08/15 v2.26 Cross-referencing by name of section
refcount.sty 2006/02/20 v3.0 Data extraction from references (HO)
test.out
test.out
lstlang1.sty 2004/09/05 1.3 listings language file
lstlang1.sty 2004/09/05 1.3 listings language file
lstlang1.sty 2004/09/05 1.3 listings language file
lstmisc.sty 2004/09/07 1.3 (Carsten Heinz)
mt-msa.cfg 2006/02/04 v1.1 microtype config. file: AMS symbols (a)
(RS)
mt-msb.cfg 2005/06/01 v1.0 microtype config. file: AMS symbols (b)
(RS)
lstlang1.sty 2004/09/05 1.3 listings language file
The text of test.tex and paper.tex is exactly the same but paper.tex
uses the class I am trying to create.
> I am trying to create a class which loads some packages for the
> convenience of my students. If I put the \RequirePackage statements in
> the class file then I get
>
> *hyperref using driver hpdftex*
> (/usr/local/gwTeX/texmf.local/tex/latex/hyperref/hpdftex.def))
> ! Missing = inserted for \ifnum.
> <to be read again>
> v
> l.3 \ifxetex
> \ifxetex just happens to be the first line after the \documentclass
> declaration if I change the text on that line I get the same error with
> the new text instead of \ifxetex.
Thus neither hyperref nor ifxetex has something to do with it.
The error is probably somewhere near the end of the class file
(look for \ifnum).
Yours sincerely
Heiko <ober...@uni-freiburg.de>
> I am trying to create a class which loads some packages for the
> convenience of my students. If I put the \RequirePackage statements in
> the class file then I get
>
> *hyperref using driver hpdftex*
> (/usr/local/gwTeX/texmf.local/tex/latex/hyperref/hpdftex.def))
> ! Missing = inserted for \ifnum.
> <to be read again>
> v
> l.3 \ifxetex
>
> ?
> ! Missing number, treated as zero.
> <to be read again>
> v
> l.3 \ifxetex
>
> ?
It's a bit of a stab in the very very photon-free regions, but this
might be the "v" in the version identification of either your class or
one of the packages you load. The format documented by clsguide,
\ProvidesFoo{name}[YYYY/MM/DD other information], is mandatory. If you
say \ProvidesFoo{name}[v0.21] and the user requires a certain version,
your v0.21 will at some point be compared numerically against the year
given by the user, which will probably result in errors like yours.
Without seeing a minimalized version of your class, that's the best I
can think of.
HTH
Ulrich
--
http://talcum.sarovar.org/ (Current release: 0.5.138 20050911)
Since I can't attach a file through the Google interface, here is the
class. There are no \ifnums at all.
\NeedsTeXFormat{LaTeX2e}% set the version of LaTeX
\ProvidesClass{woosterpaper}[2007/1/1 v1.0 Wooster paper class]
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{amsart}}% any
options available to AMS article are available to woosterpaper
\ProcessOptions% process any options
\LoadClass{amsart}[1996/10/24]% everything is based on the AMS article
class
%%%%%%%%%%%%%%%%%--Standard set of packages for
Wooster--%%%%%%%%%%%%%%%%%
\RequirePackage[letterpaper,hmargin={1in,1in},includehead,includefoot,top=1.25in,bottom=1.25in]{geometry}%
sets the margins for the document
\RequirePackage{ifxetex}% allows us to check for the use of XeTeX
should be standard in TeXLive 2006
\RequirePackage{amsthm}% to style theorems
\RequirePackage{amssymb}% provides access to the full range of math
symbols
\RequirePackage{amsmath}% to obtain special math related commands
\RequirePackage{amsfonts}% to use the AMS math fonts
\RequirePackage{natbib}% Use natbib for the bibliography
\bibpunct{[}{]}{;}{a}{,}{,}
\citestyle{wooster}% requires natbib.cfg file
\RequirePackage{listings}% for including code
\renewcommand{\lstlistlistingname}{List of Listings}
\RequirePackage{setspace}% to allow single and double spacing
\RequirePackage[vflt]{floatflt} % to insert figures in a paragraph
\RequirePackage{float}% to handle figures and tables
\RequirePackage{ifthen}% to do conditional checks
\RequirePackage[labelfont={bf,normalsize},font={small},
justification=raggedright]{caption}% to format captions
\RequirePackage{subfigure}% to allow multiple images in a figure
\captionsetup[subfloat]{listofindent=4em}% set captions on subfigures
\newcommand{\woopic}[2]{
\includegraphics[scale=#2]{#1}
}% Figure command easier to remember than includegraphics. It has two
arguments #1= file and %#2=scaling factor
%%%%%%%%%%%%%%%%%--General Shortcuts--%%%%%%%%%%%%%%%%%
%general symbols
\newcommand{\Q}{\ensuremath{\mathbb Q}}
\newcommand{\R}{\ensuremath{\mathbb R}}
\newcommand{\C}{\ensuremath{\mathbb C}}
\newcommand{\N}{\ensuremath{\mathbb N}}
\newcommand{\I}{\ensuremath{\mathbb I}}
\newcommand{\mbd}[1]{{\mathbf{#1}}}
\newcommand{\abs}[1]{\vert{#1}\vert}
\newcommand{\bvec}[1]{{\mbd{#1}}}
\newcommand{\lvec}[1]{\abs{\bvec{#1}}}
\newcommand{\bd}[1]{\textbf{#1}}
\newcommand{\degree}[1]{\ensuremath{#1^{\circ}}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Kyle Kindbom requested a theorem style where the theorem header was
on a
% separate line.
% The break theorem style will put a line break after the theorem
header. - JB
\newtheoremstyle{break}% name
{\topsep}% Space above
{\topsep}% Space below
{\itshape}% Body font
{}% Indent amount (empty = no indent, \parindent = para
indent)
{\bfseries}% Theorem head font
{.}% Punctuation after thm head
{\newline}% Space after theorem head: " " = normal interword
space;
% \newline = linebreak
{}% Theorem head spec (can be left empty, meaning
`normal')
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newtheoremstyle{scthm}{\topsep}{\topsep}{\itshape}{}{\bfseries}{.}{
}{}
\theoremstyle{break}
\newtheorem{thm}{Theorem}[section]% create a short command for theorems
and number them within sections
\newtheorem{cor}[thm]{Corollary}% create a short command for
corollaries and number with theorems
\newtheorem{lem}[thm]{Lemma}% create a short command for lemmas and
number with theorems
\newtheorem{prop}[thm]{Proposition}% create a short command for
propositions and number with theorems
\theoremstyle{definition}% change the theorem styling
\newtheorem{defn}{Definition}[section]% create a short command for
definitions and number within sections
\newtheorem{ex}{Example}% create a short command for examples and
number within sections
\newtheorem{exer}{Exercise}% create a short command for exercises and
number within the document
\theoremstyle{remark}% change the theorem styling
\newtheorem{rem}{Remark}[section]% create a short command for remarks
and number within sections
\renewcommand{\therem}{}% set the counter for remarks
\theoremstyle{plain}% change the theorem styling
\newtheorem{note}{Notation}[section]% create a short command for
notation and number within sections
\renewcommand{\thenote}{}% set the counter for notation
\newtheorem{nts}{Note to self}% create a short command for notes to
self and number within the document
\renewcommand{\thents}{}% set the counter for note to self
\newtheorem{term}{Terminology}[section]% create a short command for
terminology and number within sections
\renewcommand{\theterm}{}% set the counter for terminology
\numberwithin{equation}{section}% equations are numbered within
sections
\numberwithin{figure}{section}% figures are numbered within sections
\numberwithin{table}{section}% tables are numbered within sections
\numberwithin{lstlisting}{section}% listings are numbered within
sections
%%%%%%%%%%%%%%%%%--Output Settings--%%%%%%%%%%%%%%%%
\ifxetex%
\RequirePackage{fontspec}% allows one to easily set up fonts in the
document
\RequirePackage{xunicode}
\RequirePackage{xltxtra}% adds extra commands specific to XeTeX
%\RequirePackage[xetex]{graphicx}% use the graphicx package with XeTeX
specifics
\defaultfontfeatures{Mapping=tex-text}%
\RequirePackage[dvipdfmx,%
pdfusetitle=true,%
pdfpagemode=UseOutlines,%
bookmarks,%
bookmarksopen=true,%
pdfstartview=FitV,%
colorlinks,%
linkcolor=black,%
citecolor=black,%
pagebackref=true,%
plainpages=false,%
linktocpage=true,%
pdfpagelabels=true,%
hyperindex=false,%
pdfpagetransition=Glitter,%
breaklinks=true,%
pagecolor=black,%
urlcolor=black,%
debug=true,%
pdfstartpage=1]
{hyperref}% to create hyper-linked pdf output
\else
\RequirePackage[pdftex]{graphicx}% use the graphicx package with
pdfTeX specifics
\RequirePackage[verbose,expansion=alltext,stretch=50]{microtype}% this
package creates a much more uniform text color on the page
\RequirePackage[%dvipdfm,%
pdftex,%
pdfusetitle=true,%
pdfpagemode=UseOutlines,%
bookmarks,%
bookmarksopen=true,%
pdfstartview=FitV,%
colorlinks,%
linkcolor=black,%
citecolor=black,%
pagebackref=true,%
plainpages=false,%
linktocpage=true,%
pdfpagelabels=true,%
hyperindex=true,%
pdfpagetransition=Glitter,%
breaklinks=true,%
pagecolor=black,%
urlcolor=black,%
debug=true,%
pdfstartpage=1]
{hyperref}% to create hyper-linked pdf output
\fi
\DeclareGraphicsExtensions{.pdf, .jpg, .tif}
\setlength\columnsep{16pt}% sets the separation between columns
%\def\publname{Name of the class}% for use in the production of a class
proceedings
\def\@PII{ }% need to figure out what this does
%\def\ISSN{This needs to be obtained from
http://www.issn.org/en/node/66 for each publication}
% Blank box placeholder for figures (to avoid requiring any
% particular graphics capabilities for printing this document).
\newcommand{\blankbox}[2]{%
\parbox{\columnwidth}{\centering
% Set fboxsep to 0 so that the actual size of the box will match the
% given measurements more closely.
\setlength{\fboxsep}{0pt}%
\fbox{\raisebox{0pt}[#2]{\hspace{#1}}}%
}%
}
\def\@maketitle{%
\normalfont\normalsize
\let\@makefnmark\relax \let\@thefnmark\relax
\ifx\@empty\@date\else \@footnotetext{\@setdate}\fi
\ifx\@empty\@subjclass\else \@footnotetext{\@setsubjclass}\fi
\ifx\@empty\@keywords\else \@footnotetext{\@setkeywords}\fi
\ifx\@empty\thankses\else \@footnotetext{%
\def\par{\let\par\@par}\@setthanks}\fi
\@mkboth{\@nx\shortauthors}{\@nx\shorttitle}%
\global\topskip42\p@ % 5.5 picas to the base of the first title line
\@settitle
\ifx\@empty\authors \else \@setauthors \fi
\ifx\@empty\@commby
\else
\baselineskip18\p@
\vtop{\centering{\footnotesize\@commby\@@par}%
\global\dimen@i\prevdepth}\prevdepth\dimen@i
\fi
\ifx\@empty\@dedicatory
\else
\baselineskip18\p@
\vtop{\centering{\footnotesize\itshape\@dedicatory\@@par}%
\global\dimen@i\prevdepth}\prevdepth\dimen@i
\fi
\@setabstract
\normalsize
\dimen@34\p@ \advance\dimen@-\baselineskip
\vskip\dimen@\relax
} % end \@maketitle
\endinput
You wrote:
> Since I can't attach a file through the Google interface, here is the
> class. There are no \ifnums at all.
Weird. I don't get it.
When I can't work out where exactly an error is occuring, I use
\typeout{HERE I AM}
in the source to trace where the error is.
Sorry I can't be of more help,
Will
If you change:
\ProvidesClass{woosterpaper}[2007/1/1 v1.0 Wooster paper class]
to
\ProvidesClass{woosterpaper}[2007/01/01 v1.0 Wooster paper class]
the problem goes away. As Ulrich pointed out, the line must be in the
format:
\ProvidesFoo{name}[YYYY/MM/DD other information]
SGM
Thank you very much. I had never heard of this behavior before. 15
years and still learning :-)