[Tex/LaTex] Sections with custom numbering

numberingsectioning

Can I have

Para numbers     as 1.
sub para         as     (a)
sub sub para     as          (i)
sub sub sub para as               (aa)

Best Answer

Here's a way if para means \section etc. (In this case, \thesection does not need to be changed).

The (aa) numbering can be obtained by \alphalph and increasing the subparagraph number by 26 only virtually.

I've provided a enumitem way in case a list is actually meant.

In case of the \section - version -- I don't recommend this numbering/labelling style at all!

The question is also: Is the first a of (aa) the label coming from paragraph (a)? Or is it always(aa)`, regardless which numbering the higher level has?

\documentclass{article}

\usepackage{enumitem}

\usepackage{alphalph}

\renewcommand{\thesubsection}{(\alph{section})}
\renewcommand{\thesubsubsection}{(\roman{subsubsection})}
\renewcommand{\theparagraph}{(\alphalph{\numexpr\value{paragraph}+26})}
\renewcommand{\thesubparagraph}{(\alphalph{\numexpr\value{paragraph}}\alphalph{\numexpr\value{subparagraph}+26})}


\setcounter{secnumdepth}{5}


\makeatletter
\def\aaitem#1{\expandafter\@aaitem\csname c@#1\endcsname}
\def\@aaitem#1{%
  \alphalph{\the\numexpr#1+26}%
}
\AddEnumerateCounter*{\aaitem}{\@aaitem}{100}


\makeatother

\newlist{paralist}{enumerate}{4}
\setlist[paralist]{font={\bfseries}}
\setlist[paralist,1]{label={\arabic*}}
\setlist[paralist,2]{label={(\roman*)}}
\setlist[paralist,3]{label={(\alph*)}}
\setlist[paralist,4]{label={(\aaitem*)}}



\begin{document}

\begin{paralist}
\item Foo
  \begin{paralist}
  \item Foo Bar
    \begin{paralist}
    \item Foo Bar Foo
      \begin{paralist}
      \item Foo Bar Foo Bar
      \item Foo Bar Foo Bar Foo
      \end{paralist}
    \item Foo Bar Foo
    \end{paralist}
  \item Foo Bar 
  \end{paralist}
\item Foo
\end{paralist}


\section{Foo}
\subsection{Foobar}
\subsubsection{FooBarFoo}
\paragraph{FooBarFooBar}
\paragraph{More FooBarFooBar}

\subsubsection{Other FooBarFoo}

\paragraph{FooBarFooBarFoo}

\paragraph{Even More FooBarFooBarFoo}

\subparagraph{FooBarFooBarFoo}




\end{document}

enter image description here

Related Question