2

I've copied the default article.cls file and made some very minor alterations mainly to the \listoftables and \listoffigures titles, which is not connected to my question.

I'd like to add 1 extra level in between \subsubsection and \paragraph. This new section would push down \paragraph and \subparagraph down one level to make room for the new \subsubsubsection to be insert at level 4.

Microsoft Word comes with 9 headings which aren't inline headings, whilst I don't require that many at the moment, I do require the first 4 to not be inline headings and additional two headings as paragraph inline heading should be sufficient for my needs.

This section would appear fairly similar to \subsubsection in that it would be a heading on it's own line and not how the \paragraph command works with having the content on the same line as the heading.

I'm not using \paragraph or \subparagraph in my report for that reason. But am needing a 1.1.1.1 Section in my report and on my contents page.

There is a solution on this site that looked like what I was trying to achieve, but I was unable to get it to work from within my custom class file.

14
  • 1
    just use \paragraph but style paragraph to be a display rather than a run-in header (which is just one line of code) That is far easier than implementing a whole new section level Commented Apr 21, 2018 at 20:24
  • @DavidCarlisle I understand it is easier, but your answer doesn't answer my question, you've just given me an alternative solution. I' wanting to keep the \paragraph as they are as whilst I am not needing them for the report I am writing at the moment, what if I did want to use them later on. I wouldn't be able to as I have changed them in the class file. I would like to add in an extra level between \subsubsection and \paragraph. If it was easy then everyone would be doing it, I am still learning LaTeX have only been using it a week, having just been introduced to it!
    – AeroMaxx
    Commented Apr 21, 2018 at 21:54
  • No really you can't have two section commands both at level 4 (tables of contents and other things) really assume that ther is a strict order to the heading commands so if you insert a new command at level 4 (after subsubsection) you would need to redefine \paragraph to be level 5 and subparagraph to be level 6 Commented Apr 21, 2018 at 21:57
  • so to my answer you can add \let\subsubsubsection\paragraph \let\paragraph\subparagraph \let\subparagraph\undefined then you could use your preferred name Commented Apr 21, 2018 at 21:59
  • @DavidCarlisle Yes that is what I was wanting to do, as I mentioned I wanted to insert a new section inbetween the \subsubsection and \paragraph so \paragraph and \subparagraph would be pushed down one level.
    – AeroMaxx
    Commented Apr 21, 2018 at 21:59

1 Answer 1

3

enter image description here

Just use \paragraph but style paragraph to be a display rather than a run-in header. That is far easier than implementing a whole new section level:

\documentclass{article}

\makeatletter
%same as \subsubsection but level 4
\renewcommand\paragraph{\@startsection{paragraph}{4}{\z@}%
                                     {-3.25ex\@plus -1ex \@minus -.2ex}%
                                     {1.5ex \@plus .2ex}%
                                     {\normalfont\normalsize\bfseries}}
% number \paragraph
\setcounter{secnumdepth}{4}

\makeatother

\begin{document}

\section{zzz}
\subsection{zzz}
\subsubsection{zzz}
\paragraph{zzz}
aaa
\end{document}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .