TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I would like to create a new command based on subsection behavior.

Requirements are as follows:

  • make a \newcommand
  • support for alternative labels
  • add \vspace{-.2in} after the label

The reason for making this is that I would not like to change the default behavior for existing / other subsections.

share|improve this question

You just need to copy the definition of subsection from your class (I'm assuming article here) and make the changes you want.

\newcounter {subsection}[section]

It has a counter, reset every section.

\renewcommand\thesubsection   {\thesection.\@arabic\c@subsection}

The section counter prefixes this counter when displayed

                                     {-3.25ex\@plus -1ex \@minus -.2ex}%
                                     {1.5ex \@plus .2ex}%

The fonts and spacing used for the heading


It's reset in the appendix


Uses a dotted line format in the table of contents

share|improve this answer
either i'm not awake yet, or this has the same name(s) as the existing subsection, which the op said s/he didn't want to be changed. ??? – barbara beeton Mar 5 '13 at 12:47
@barbarabeeton you missed out the make the changes you want bit. the above is as you say exactly a copy of subsection from article as the OP gave no indication of what changes are required – David Carlisle Mar 5 '13 at 12:52

Your Answer


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.