TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm using LaTeX for a university assignment and my professor has some strange formatting rules:

There are 7 layers of sectioning, which all have to appear in the table of contents. This is more then I can archive with \section, \subsection, \subsubsection, \paragraph and \subparagraph. Is there a way to define new commands to add new sectioning layers?

The counting of the sections is also quite unusal:

A. I. 1. a) aa) (1) (a)

So, it's capital letters, roman numbers, numbers, letters, double letters, numbers in brackets and letters in brackets.

Can anybody help me out on this?

share|improve this question
Are you sure this isn't a joke? Did the professor also send you to get a long stand? – Ian Thompson Apr 21 '14 at 14:40
The titlesec package allows for creating new levels of sectioning. However, note that with chapter and \part (forcertain classes), it makes in all 7 levels. maybe he wants you to use them all? Looks like an April fool. – Bernard Apr 21 '14 at 14:52
if i remember correctly, amsart has a \part, and i'm pretty sure it goes down through \subsubparagraph (one level lower than article). so that is actually 7 levels, although i've never seen them all used. this isn't for a law class, is it? – barbara beeton Apr 21 '14 at 15:27
Yes, its for a law class. I found this, but i still need 2 more levels of sectioning. – Small Zane Apr 21 '14 at 15:44
jura might be of interest, especially if you are in Germany. I can't read the documentation to confirm but the section numbering looks similar. – cfr Apr 21 '14 at 15:54
up vote 7 down vote accepted

One option using the titlesec package to define two new units; the alphalph package was used to provide the counter with double alphabetic characters.

The two new units are \myunit and \mysubunit, with levels 6 and 7, respectively; I also added support for bookmarks for the new units. Of course, change the settings for the headings and for eventual ToC entries according to your needs:


% declaration of the class for the new units

% counters for the new units

% all units numbered and in ToC

% modification of heading format for section, subsection, subsubsection
% to add the period after the counter
% heading format for the new units
% spacing for the headings of subparagraph and the new units
  {0pt}{3.25ex plus 1ex minus .2ex}{1em}
  {0pt}{3.25ex plus 1ex minus .2ex}{1em}
  {0pt}{3.25ex plus 1ex minus .2ex}{1em}

% redefinitions for the counter representation for all units

% bookmark support for new units

% ToC entries format


\section{Test section}
Test text
\subsection{Test subsection}
Test text
\subsubsection{Test subsubsection}
Test text
\paragraph{Test paragraph}
Test text
\subparagraph{Test subparagraph}
Test text
\myunit{Test new unit}
Test text
\mysubunit{Test new subunit}
Test text


An image of the output showing all units in the ToC:

enter image description here

An image showing the bookmarks panel:

enter image description here

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.