1

For a 11 pt. report document class which I am using for my thesis, I can only get the following heading levels on a per chapter basis:

\chapter

\section

\subsection

\subsubsection

I am not including the paragraph sections above, as they do not pertain to headings.

My question is: is there a way to extend the above limited hierarchy to include more heading levels? Alternatively, is there a package which provides such an extension?

For example in the following MWE:

\documentclass[11pt]{report}
\begin{document}
\tableofcontents
\part{This is a part}
\chapter{This is a chapter}
\section{This is a section}
\subsection{This is a subsection}
\subsubsection{This is a subsubsection}
\paragraph{This is a paragraph}
\subparagraph{This is a subparagraph}
\end{document}

There is no numbering generated for the paragraph or the subparagraph....so these would not be captured in TOC. I need to create a numbered hierarchy with more depth than that allowed by above. My actual need is to have another level above the \section{} to form a generic heading for the discussion that follows in the section and the subsections. Is there a way to do this in such a way that it is sequentially numbered automatically, and captured in TOC as well?

TIA

Vinod

  • Please make the question more clear. all standard class (report is one) have 7 levels (part, ..., subparagraph) may be you need to change \setcounter{secnumdepth}{2}. – touhami Jan 7 '16 at 6:09
  • @touhami: You mean to increase the secnumdepth counter to 5 or 6 – user31729 Jan 7 '16 at 7:12
  • sections are numbered to secnumdepth so set \setcounter{secnumdepth}{5} if you want level 5 sections numbered, similary set \setcounter{tocdepth}{5} if you want all levels in the toc – David Carlisle Jan 7 '16 at 14:33
  • The extra question added about a level between chapter and section is probably best asked as a new question and isn't really clear without an example, how do you want numbering to work? – David Carlisle Jan 7 '16 at 14:36
  • you can try titlesec texdoc.net/texmf-dist/doc/latex/titlesec/titlesec.pdf#page=9 – touhami Jan 7 '16 at 20:08
2

The next heading levels are \paragraph and \subparagraph they do pertain to headings they are defined using \@startsection almost exactly the same as \section, but at levels 4 and 5.

The source of these commands in report.cls is below:

\newcommand\section{\@startsection {section}{1}{\z@}%
                                   {-3.5ex \@plus -1ex \@minus -.2ex}%
                                   {2.3ex \@plus.2ex}%
                                   {\normalfont\Large\bfseries}}
\newcommand\subsection{\@startsection{subsection}{2}{\z@}%
                                     {-3.25ex\@plus -1ex \@minus -.2ex}%
                                     {1.5ex \@plus .2ex}%
                                     {\normalfont\large\bfseries}}
\newcommand\subsubsection{\@startsection{subsubsection}{3}{\z@}%
                                     {-3.25ex\@plus -1ex \@minus -.2ex}%
                                     {1.5ex \@plus .2ex}%
                                     {\normalfont\normalsize\bfseries}}
\newcommand\paragraph{\@startsection{paragraph}{4}{\z@}%
                                    {3.25ex \@plus1ex \@minus.2ex}%
                                    {-1em}%
                                    {\normalfont\normalsize\bfseries}}
\newcommand\subparagraph{\@startsection{subparagraph}{5}{\parindent}%
                                       {3.25ex \@plus1ex \@minus .2ex}%
                                       {-1em}%
                                      {\normalfont\normalsize\bfseries}}

enter image description here

\documentclass[11pt]{report}
\setcounter{secnumdepth}{5}
\setcounter{tocdepth}{5}
\begin{document}
\tableofcontents
\part{This is a part}
\chapter{This is a chapter}
\section{This is a section}
\subsection{This is a subsection}
\subsubsection{This is a subsubsection}
\paragraph{This is a paragraph}
\subparagraph{This is a subparagraph}
\end{document}
  • Let me explain what I implied with a MWE....I have edited my original post – Vinod Jan 7 '16 at 13:50
  • @Vinod Christian addressed that point in his comment some hours ago, I just repeated it in a comment under the question. – David Carlisle Jan 7 '16 at 14:34
  • @Vinod I added an image of the output from your MWE – David Carlisle Jan 7 '16 at 14:39
  • @ David Carlisle thanks....I will try and work with your example.... – Vinod Jan 8 '16 at 7:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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