Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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:

\newcommand{
        checklist1Start
    }
    {
        \begin{description}[style=multiline,
            itemsep=\itemSeparationDistance,
            leftmargin=\leftMarginDistance,
            itemindent=\itemIndentDistance,
            labelindent=\labelIndentDistance,
            font=\normalfont]
    }

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

share|improve this question

marked as duplicate by lockstep, Martin Schröder, Marco Daniel, percusse, tohecz Aug 23 '12 at 6:52

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

1  
Basically, you can't (or at least shouldn't) define commands whose name contains numbers. See tex.stackexchange.com/questions/9718/… –  lockstep Aug 14 '12 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 Aug 14 '12 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/… –  Torbjørn T. Aug 14 '12 at 19:56
    
@lockstep, true, but that is not the case here. –  JLDiaz Aug 14 '12 at 19:58
    
@JLDiaz Seems like "checklist1Start" to me. (I didn't spot it instantly, too.) –  lockstep Aug 14 '12 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 }{}
share|improve this answer

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