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.

believe it or not, I need to change the way the command \section enumerates the sections: I'd like my second section to be section number 4. (I don't want any section number 2 or three in my article).

Is this possible?

share|improve this question
2  
Yes. Put \setcounter{section}{3} just before the second \section. And Welcome to TeX.SX! –  karlkoeller Feb 23 at 6:05
    
Thank you for your prompt reply! –  user01123581321345589144... Feb 23 at 6:09
add comment

1 Answer

up vote 8 down vote accepted

Short answer

Put \setcounter{section}{3} just before the second \section.


Long answer

The numbering of sectioning commands is governed by counters that have the same name as the command, e.g. for the \section command we have the counter section, for the \subsection command we have the counter subsection, and so on.

Each time a sectioning command is issued, the corresponding counter is incremented by one.

If you want to change this behavior manually, you have a few possibilities:

  1. \setcounter{counter}{value}

    Issuing this command you can set the value of counter to the specified value, e.g. \setcounter{section}{3} assigns the value 3 to the counter section.

  2. \addtocounter{counter}{value}

    Issuing this command you can increment the value of counter by the specified value, e.g. \addtocounter{section}{2} increments the counter section by a value of 2.

  3. \stepcounter{counter}

    The same as above but the increment is fixed at 1.

  4. \refstepcounter{counter}

    The same as above but useful when you're using a label/ref system for the counter.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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