newcommand out of subsection

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.

-

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

\newcommand\subsection{\@startsection{subsection}{2}{\z@}%
{-3.25ex\@plus -1ex \@minus -.2ex}%
{1.5ex \@plus .2ex}%
{\normalfont\large\bfseries}}


The fonts and spacing used for the heading

\newcommand\appendix{\par
\setcounter{section}{0}%
\setcounter{subsection}{0}%
\gdef\thesection{\@Alph\c@section}}


It's reset in the appendix

\newcommand*\l@subsection{\@dottedtocline{2}{1.5em}{2.3em}}


@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