There is a easy way to modify only this command
\renewcommand\thesection{\arabic{section}.}
in order to have an arabic counter with just one leading zero instead the original arabic without leading zero?
There is a easy way to modify only this command
\renewcommand\thesection{\arabic{section}.}
in order to have an arabic counter with just one leading zero instead the original arabic without leading zero?
This small document adds a leading zero in front of the section number and uses 15 dummy \blinddocument commands in the loop to fill up.
\documentclass{article}
\usepackage{blindtext}
\makeatletter
\let\latex@@thesection\thesection
\newcommand{\padwithzero}{%
0%
}%
\renewcommand{\thesection}{\ifnum\c@section<10\relax\padwithzero\fi\latex@@thesection}
\newcount\dummycntr
\makeatother
\begin{document}
\tableofcontents
\loop\unless\ifnum\dummycntr=15
\begingroup
\blinddocument
\endgroup
\advance\dummycntr by 1
\repeat
\end{document}
\renewcommand\thesection{\ifnum\value{section}<10\relax0\fi\arabic{section}}– touhami Jun 16 '16 at 11:5510and0than\relax, so as to preserve full expandability. – egreg Jun 16 '16 at 11:58\usepackage[utf8]{inputenc}
– Andrea Leo Jun 16 '16 at 18:33\renewcommand\thesection{\ifnum\value{section}<10 0\fi\arabic{section}}or type it your self, don't copy paste – touhami Jun 16 '16 at 19:00\valueis aLaTeXcommand -- it must be defined! – Jun 16 '16 at 20:12