Possible Duplicate:
Definining commands/abbreviations that contain numbers

I'm having some difficulty with setting a command using \newcommand. The command I'm trying to create is as follows:


The distances shown are defined using other other uses of \newcommand, in the following manner:

\newcommand{\leftMarginDistance}{9 cm}

The error returned on attempting to compile is as follows:

! Missing number, treated as zero

Could you point me in the right direction on using \newcommand properly here?

Many preemptive thanks for any assistance

  • 1
    Basically, you can't (or at least shouldn't) define commands whose name contains numbers. See tex.stackexchange.com/questions/9718/…
    – lockstep
    Commented Aug 14, 2012 at 19:48
  • 2
    Since those "inner commands" are in fact lengths, why dont you define them as lengths? E.g. \newlength\leftMarginDistance and \setlength\leftMarginDistance{9cm}
    – JLDiaz
    Commented Aug 14, 2012 at 19:55
  • 1
    Are you using enumitem? Why not create a new custom list type? A simple example is found in tex.stackexchange.com/questions/37740/enumerate-with-properties/… Commented Aug 14, 2012 at 19:56
  • @lockstep, true, but that is not the case here.
    – JLDiaz
    Commented Aug 14, 2012 at 19:58
  • @JLDiaz Seems like "checklist1Start" to me. (I didn't spot it instantly, too.)
    – lockstep
    Commented Aug 14, 2012 at 20:00

1 Answer 1


The token in the first argument of \newcommand has to be a single token such as \zzzz not a sequence of white space, letters and numbers. You get the same error message for any definition you make in the second argument. You get exactly the same error for

 \newcommand{ checklist1Start }{}
  • 2
    Specifically, the token must include the leading backslash. Bites me every time. Commented Mar 17, 2015 at 10:39

Not the answer you're looking for? Browse other questions tagged .