[texhax] Section numbering

Heiko Oberdiek heiko.oberdiek at googlemail.com
Sun Mar 10 00:44:59 CET 2013


On 10.03.2013 00:19, Jerry wrote:
> I am trying to format a legal document so that it follows this format.
> 
>       Article 1.
> 
> 1.01 First section
> 
>       bla bla bla
> 
> 1.02 Second section
> 
>       bla bla bla
> 
> etcetera.

> %Format section numbering
> \def\thesection{\arabic{section}.}
> \def\thesubsection{\arabic{section}.0\arabic{subsection}}
> \def\thesubsubsection{\arabic{section}.\arabic{subsection}.\arabic{subsubsection}}

\renewcommand*{\thesection}{\arabic{section}}
\renewcommand*{\thesubsection}{%
  \thesection.%
  \ifnum\value{subsection}<10 0\fi
  \arabic{subsection}%
}
\renewcommand*{\thesubsubsection}{%
  \thesubsection.\arabic{subsubsection}%
}

Yours sincerely
  Heiko Oberdiek


More information about the texhax mailing list