Section numbering in binary
The fmtcount
package provides a simple way to get the binary numbers. To begin counting at zero you need to set the section counter initially to -1
. You can also pad the values with zeroes if you wish.
\documentclass{article}
\usepackage{fmtcount}
\renewcommand{\thesection}{\binary{section}.}
\setcounter{section}{-1}% To begin at 0
\begin{document}
\section{First section}
\section{Second section}
\section{Third section}
\section{Fourth section}
\section{Fifth section}
\renewcommand{\thesection}{\padzeroes[4]\binary{section}}
\setcounter{section}{-1}
\section{First section}
\section{Second section}
\section{Third section}
\section{Fourth section}
\section{Fifth section}
\end{document}
Sure.
\documentclass{article}
\usepackage{expl3}
\ExplSyntaxOn
\cs_set:Npn \thesection {\int_to_bin:n{\value{section}-1}}
\ExplSyntaxOff
\begin{document}
\section{one}
\section{two}
\section{three}
\end{document}
Note that I only changed the displayed number here, so the section
counter still has the value 1
for the first section, we only print 0
. If you want the section to "really" have the number 0
, you need to remove the -1
from the definition of \thesection
and set the counter to -1
at the start of the document.