# How to manually set the subsection number

Is there a way to start the page with a 5.2 subsection:

5.2 Section
5.2.5 Subsection
5.2.6 Subsection


Otherwise, i get the 1 section and 0.1 subsection, which i don't need. Is there a package or a trick of some kind?

• Welcome to TEX.SX! \setcounter{section}{4}\section{Section}\setcounter{subsection}{1}\subsection{Subsection}\setcounter{subsubsection}{4}\subsubsection{Subsubsection} (assuming that that is subsubsection, but you can change the counter names yourself I think). – TeXnician Jul 1 '17 at 9:14

Is there a way to start the page with a 5.2 subsection?

\clearpage % start a new page
\setcounter{section}{5}
\setcounter{subsection{1}
\subsection{Hello World} % increments 'subsection' counter automatically (to "2")


It seems like you would like to arbitrarily set numbering for subsection, here is my solution

\newcommand{\asubsection}[2]{
\setcounter{subsection}{#1}
\subsection{#2}
}


Then as following, assign any number for your subsection as you wish

\asubsection{3}{The Dirac Field}
\label{TDF}
...
\asection{12}{The Renormalization Group}

We could see the cross reference \ref{TDF} and equation numbering are using the correct subsection number.
• Is this fundamentally different to Mico's version about \setcounter? – user31729 Nov 9 '17 at 20:40
• Well, the control is the user's decision, which numbers should follow. Also, \eqref is usually not designed to refer to structure levels – user31729 Nov 9 '17 at 21:03
• \eqref is a amsmath invention, but \ref is the cross-referencing macro – user31729 Nov 13 '17 at 15:14