# scrreprt - add levels below \subparagraph

I have to write my thesis in (German) law and we usually use a very nested headline system. I use scrreprt and have these levels:

• (part)
• chapter
• section
• subsection
• subsubsection
• paragraph
• subparagraph

But I need at least 3 more levels. They don't have to be in the ToC but it would be nice.

I searched a lot and found a snippet that works but I can't reproduce it and create more levels.

% Fügt Gliederungsebene \subsubparagraph hinzu.
\titleclass{\subsubparagraph}{straight}[\subparagraph]
\makeatletter
\newcounter{subsubsubsection}[subsubsection] \newcounter{subsubparagraph}[subparagraph]
\newcommand*\l@subsubparagraph{\bprot@dottedtocline{6}{14em}{6em}}
\makeatother


Somewhat related is my second question. Is there any way to rename some of the levels? It's always a little annoying trying to remember what comes after subsubsection etc. Maybe \chapter, \section, \sub1section, \sub2section, \sub3section or something else.

Your help is greatly appreciated :)

• What should the formatting of these newly created sublevels be? Bold, italic, indented or not? Also, using numbers in control sequences would complicate its usage. It's easier to use \subAsection, \subBsection, or something similar with letters and not numbers. – Werner Aug 8 '12 at 17:13
• well sure subAsection would work too. I currently use: \titlespacing{\subsubparagraph}{0em}{0em}{0em} \titleformat{\subsubparagraph}[hang]{\normalfont\normalsize\bfseries}{\thesubsubparagraph\quad}{0pt}{} – niclas197 Aug 8 '12 at 17:18
• The Jura package is specifically created for German legal documents. The documentation is only in German but perhaps you could see if it provides an answer. – user17457 Aug 10 '12 at 13:52
• well the Jura class is 14 years old. The juramisc package is kind of nice and I've tried it. They implemented the levels relative, so you don't use \section but you start and use \toc{test} for the same and \sub{test1} for a level below that. But you have to remember to use \levelup. It doesn't keep up with my writing style though since I move some parts around sometimes so it's easier for me to use fixed levels and I try to keep the code in my text to a minimum. My 3 extra levels are more than enough and using them is the exception really. – niclas197 Aug 10 '12 at 16:17

Quoting the manual from the titlesec package:

With the help of classes you may insert, say, a new subchapter level between chapter and section, or creating a scheme of your own.

(at subsection 3.9 in the titlesec.pdf).

At appendix 9.2, it shows exactly how the already existing sections and the like are defined; don't copy the already existing parts to your file, but use them as inspiration for defining new ones (amount of indentation, style, etc). My advice is to look at all the appendices and subsection 3.9.

• Thanks fort he revision Joseph, it looks really nice. I'll pay attention to it. (remove when you read this) – PascalVKooten Aug 15 '12 at 18:41

Since the question is about a KOMA-class, we can use KOMA features to define new levels of structuring commands.

\documentclass{scrartcl}
\makeatletter
\DeclareSectionCommand[%
tocindent=9.0em,%
]{subparagraph}
\DeclareSectionCommand[%
style=section,%
level=6,%
indent=2.0\scr@parindent,%
beforeskip=3.25ex \@plus1ex \@minus.2ex,%
afterskip=-1em,%
tocstyle=subsection,%
tocindent=10.0em,%
tocnumwidth=4.1em%
,font=\normalcolor\normalsize\bfseries\sffamily,%
]{Aparagraph}
\DeclareSectionCommand[%
style=section,%
level=7,%
indent=3.0\scr@parindent,%
beforeskip=3.25ex \@plus1ex \@minus.2ex,%
afterskip=-1em,%
tocstyle=subsection,%
tocindent=11.0em,%
tocnumwidth=4.1em%
,font=\normalcolor\normalsize\bfseries\sffamily,%
]{Bparagraph}
\DeclareSectionCommand[%
style=section,%
level=8,%
indent=4.0\scr@parindent,%
beforeskip=3.25ex \@plus1ex \@minus.2ex,%
afterskip=-1em,%
tocstyle=subsection,%
tocindent=12.0em,%
tocnumwidth=4.1em%
,font=\normalcolor\normalsize\bfseries\sffamily,%
]{Cparagraph}
\makeatother
\setcounter{tocdepth}{7}
\begin{document}
\tableofcontents
\section{Wombat}
\subsection{Capybara}
\subsubsection{Mara}
\paragraph{Zebra}
\subparagraph{Elephant}
\Aparagraph{Giraffe}
\Bparagraph{Quail}
\Cparagraph{Duck}
\end{document}


Of course you don't really need \makeatletter and \makeitother if you don't use low level commands. I used them, because i copied the bits straight from the class file.

• I was wondering how would one add numbering to the lower levels like 1.1.1.1 Zebra, etc.? – Louis Apr 27 '17 at 16:16
• @Louis \setcounter{secnumdepth}{4} The number corresponds to the level. – Johannes_B Apr 27 '17 at 16:36
• You might need to define the counters for the lower levels, but there is a point when numbering gets a bit pointless \renewcommand{\theAparagraph}{\thesubparagraph.\arabic{Aparagraph}} – Johannes_B Apr 27 '17 at 16:38
• TNX. I think I missed setting secnumdepth. I know it becomes pointless, but some places want it that way and then that is wat one should give them. – Louis Apr 27 '17 at 18:49

So thanks to everyone. I kind of fixed it:

\titleclass{\subAparagraph}{straight}[\subparagraph]
\makeatletter
\newcounter{subAparagraph}[subparagraph]
\newcommand*\l@subAparagraph{\bprot@dottedtocline{6}{12em}{2.5em}}
\makeatother

\titleclass{\subBparagraph}{straight}[\subAparagraph]
\makeatletter
\newcounter{subBparagraph}[subAparagraph]
\newcommand*\l@subBparagraph{\bprot@dottedtocline{7}{14em}{2.5em}}
\makeatother

\titleclass{\subCparagraph}{straight}[\subBparagraph]
\makeatletter
\newcounter{subCparagraph}[subBparagraph]
\newcommand*\l@subCparagraph{\bprot@dottedtocline{8}{16em}{2.5em}}
\makeatother


I use alnumsec to make the Symbols:

\usepackage{alnumsec}
\alnumsectionlevels{0}{chapter,section,subsection,subsubsection,paragraph,subparagraph,subAparagraph,subBparagraph,subCparagraph}
\otherseparators{4}
\surroundarabic[(][)]{}{.}
\surroundgreek[][)]{}{.}
\alnumsecstyle{LRaldagbr}


And formating:

\titlespacing{\subAparagraph}{0em}{0em}{0em}
\titlespacing{\subBparagraph}{0em}{0em}{0em}
\titlespacing{\subCparagraph}{0em}{0em}{0em}


I also noticed (after writing one paper with near identical settings and not noticing this) that the counter was not resetting if the exact previous level was not called.

I fixed this with adding every "higher" level to reset (\usepackage{remreset})

\makeatletter