# section numbering accross subsubsections

Need to get numbering rules:

\section -> A,B,C etc..
\subsection -> 1,2,3 etc..
\subsubsection -> A1, A2 .. ; B1, B2 ..


I have tried, but it only create proper section format:

\renewcommand{\thesection}{\Alph{section}}

• @marmot Good idea, but this suggestion can result in subsubsections with the same number. See the first example in my answer (and a possible solution in the second example). – Schweinebacke Jan 23 '19 at 7:05

You can redefine the output of the section, subsection and subsubsection counter. A first suggestion for this would be:

\documentclass{article}

\usepackage{blindtext}% for dummy text

% use upper case letters for the section numbers:
\renewcommand*{\thesection}{\Alph{section}}
% use arabic subsection numbers without section numbers:
\renewcommand*{\thesubsection}{\arabic{subsection}}
% use the section number followed by the arabic subsubsection number:
\renewcommand*{\thesubsubsection}{\thesection\arabic{subsubsection}}

\begin{document}
\section{First example section}
\blindtext
\subsection{First example subsection}
\blindtext
\subsubsection{First example subsubsection}
\blindtext
\subsubsection{Second example subsubsection}
\blindtext
\subsection{Second example subsection}
\blindtext
\subsubsection{Third example subsubsection}
\blindtext
\subsubsection{Forth example subsubsection}
\blindtext
\section{Second example section}
\blindtext
\subsection{Third example subsection}
\blindtext
\subsubsection{Fifth example subsubsection}
\blindtext
\end{document}


But as you can see in the "The first example subsubsection" and the "Third example subsubsection" this can result in subsubsection with the same shown number, because the subsubsection number is reset by increasing the subsection number but does not show the subsection number but only the section number. So maybe it would be better to not reset the subsubsection number by increasing the subsection number but the section number:

\documentclass{article}

\usepackage{blindtext}% for dummy text

% use upper case letters for the section numbers:
\renewcommand*{\thesection}{\Alph{section}}
% use arabic subsection numbers without section numbers:
\renewcommand*{\thesubsection}{\arabic{subsection}}
% don't increase the subsubsection by subsection but section:
\counterwithout{subsubsection}{subsection}
\counterwithin{subsubsection}{section}
% use the section number followed by the arabic subsubsection number:
\renewcommand*{\thesubsubsection}{\thesection\arabic{subsubsection}}

\begin{document}
\section{First example section}
\blindtext
\subsection{First example subsection}
\blindtext
\subsubsection{First example subsubsection}
\blindtext
\subsubsection{Second example subsubsection}
\blindtext
\subsection{Second example subsection}
\blindtext
\subsubsection{Third example subsubsection}
\blindtext
\subsubsection{Forth example subsubsection}
\blindtext
\section{Second example section}
\blindtext
\subsection{Third example subsection}
\blindtext
\subsubsection{Fifth example subsubsection}
\blindtext
\end{document}


Now, the "Third example subsubsection" does not longer has number "A1" but "A3".

If you get error messages from the last example, because of not defined \counterwithout or \counterwithin please either update your TeX distribution or add \usepackage{chngcntr} to your preamble.