6

So I'm trying my hand at creating some packages (on WriteLaTeX, because my Surface can't run TeX1), and have run into a rather fascinating problem. My packages just won't load; they complain about \ifnum instead. Here's a minimal test case:

test.sty

\NeedsTeXFormat{LaTeX2e}[1994-06-01]
\ProvidesPackage{test}[2014-08-04 Hello, World!]
\endinput

main.tex

\documentclass{article}
\title{LaTeX Testing}
\usepackage{test}

\begin{document}
Hello, World!
\end{document}

Compile error

Missing = inserted for \ifnum.
<to be read again> 
                   -
l.4 

And I'm thinking, when did \ifnum come into this?! (The error occurs on the 'token' after \usepackage, whether that's a newline or a \show or whatever else.) There's plenty on the internet about \ifnum errors, but nothing on just after \usepackage. I have no idea where to even start debugging this, and my options are rather limited due to being stuck with an online service... Some help?


1 Surface RT is a pain sometimes. I do have a proper machine, with LaTeX on it; however, it's not quite as portable, and therefore isn't on hand at the moment.

0
12

The date specification has to be of the format YYYY/MM/DD and not YYYY-MM-DD. The following minimal example works as expected:

\documentclass{article}
\usepackage{filecontents}
\begin{filecontents*}{test.sty}
\NeedsTeXFormat{LaTeX2e}[1994/06/01]
\ProvidesPackage{test}[2014/08/04 Hello, World!]
\endinput
\end{filecontents*}
\title{LaTeX Testing}
\usepackage{test}

\begin{document}
Hello, World!
\end{document}
1

Not the answer you're looking for? Browse other questions tagged or ask your own question.