You can use the titlesec
package to change the way \paragraph
formats the titles and set the secnumdepth
counter to four to obtain numbering for the paragraphs:
\documentclass{article}
\usepackage{titlesec}
\setcounter{secnumdepth}{4}
\titleformat{\paragraph}
{\normalfont\normalsize\bfseries}{\theparagraph}{1em}{}
\titlespacing*{\paragraph}
{0pt}{3.25ex plus 1ex minus .2ex}{1.5ex plus .2ex}
\begin{document}
\section{Test Section}
test
\subsection{Test Subsection}
test
\subsubsection{Test Subsubsection}
test
\paragraph{Test Modified Paragraph}
test
\end{document}
If you want to define a new sectioning command, you can take a look at Defining custom sectioning commands.
If you want to define a fresh new sectional unit below \subsubsection
, but above \paragraph
, then you will have to do considerably more work: a new counter has to be created and its representation has to be appropriately defined; the sectional units \paragraph
and \subparagraph
will also have to be redefined, as well as they corresponding \l@...
commands (controlling how the will be typeset in the ToC if the tocdepth
value is increased); also, the toclevel (for eventual bookmarks) will have to be considered.
Here's an example showing how to obtain this new sectional unit giving you now the option to use \part
, \section
, \subsection
, \subsubsection
, \subsubsubsection
, \paragraph
, and \subparagraph
:
\documentclass{article}
\usepackage{titlesec}
\usepackage{hyperref}
\titleclass{\subsubsubsection}{straight}[\subsection]
\newcounter{subsubsubsection}[subsubsection]
\renewcommand\thesubsubsubsection{\thesubsubsection.\arabic{subsubsubsection}}
\renewcommand\theparagraph{\thesubsubsubsection.\arabic{paragraph}} % optional; useful if paragraphs are to be numbered
\titleformat{\subsubsubsection}
{\normalfont\normalsize\bfseries}{\thesubsubsubsection}{1em}{}
\titlespacing*{\subsubsubsection}
{0pt}{3.25ex plus 1ex minus .2ex}{1.5ex plus .2ex}
\makeatletter
\renewcommand\paragraph{\@startsection{paragraph}{5}{\z@}%
{3.25ex \@plus1ex \@minus.2ex}%
{-1em}%
{\normalfont\normalsize\bfseries}}
\renewcommand\subparagraph{\@startsection{subparagraph}{6}{\parindent}%
{3.25ex \@plus1ex \@minus .2ex}%
{-1em}%
{\normalfont\normalsize\bfseries}}
\def\toclevel@subsubsubsection{4}
\def\toclevel@paragraph{5}
\def\toclevel@paragraph{6}
\def\l@subsubsubsection{\@dottedtocline{4}{7em}{4em}}
\def\l@paragraph{\@dottedtocline{5}{10em}{5em}}
\def\l@subparagraph{\@dottedtocline{6}{14em}{6em}}
\makeatother
\setcounter{secnumdepth}{4}
\setcounter{tocdepth}{4}
\begin{document}
\tableofcontents
\section{Test Section}
test
\subsection{Test Subsection}
test
\subsubsection{Test Subsubsection}
test
\subsubsubsection{Test Subsubsubsection}
test
\paragraph{Test Paragraph}
test
\subparagraph{Test Subparagraph}
test
\end{document}
Use the first optional argument for \newtheorem
:
\documentclass{book}
\usepackage{amsthm}
\newtheorem{theo}[subsubsection]{Theorem}
\newtheorem{defi}[subsubsection]{Definition}
\setcounter{secnumdepth}{3}
\begin{document}
\chapter{Test Chapter}
\section{Test Section}
\subsection{Test Subsection}
\subsubsection{Test Subsubsection}
\begin{theo}
test.
\end{theo}
\subsubsection{Test Subsubsection}
\begin{theo}
test.
\end{theo}
\begin{defi}
test.
\end{defi}
\subsubsection{Test Subsubsection}
\end{document}
I think this numbering schema can result hard to follow for readers (among other things, what if, for example, there's a theorem or a definition before a subsubsection is created?).
For the bonus point (and to make things even harder for the reader):
\documentclass{book}
\usepackage{amsthm}
\usepackage{amsmath}
\usepackage{etoolbox}
\numberwithin{equation}{subsection}
\newtheorem{theo}[subsubsection]{Theorem}
\newtheorem{defi}[subsubsection]{Definition}
\setcounter{secnumdepth}{3}
\AtBeginEnvironment{equation}{\setcounter{equation}{\value{subsubsection}}}{}{}{}
\AtEndEnvironment{equation}{\stepcounter{subsubsection}}{}{}{}
\begin{document}
\chapter{Test Chapter}
\section{Test Section}
\subsection{Test Subsection}
\subsubsection{Test Subsubsection}
\begin{theo}
test.
\end{theo}
\subsubsection{Test Subsubsection}
\begin{theo}
test.
\end{theo}
\begin{defi}
test.
\end{defi}
\begin{equation}
a=b.
\end{equation}
\subsubsection{Test Subsubsection}
\begin{equation}
c=d.
\end{equation}
\end{document}
I would rather use a simpler numbering schema:
\documentclass{book}
\usepackage{amsthm}
\usepackage{amsmath}
\newtheorem{theo}{Theorem}[chapter]
\newtheorem{defi}[theo]{Definition}
\newtheorem{prop}[theo]{Proposition}
\setcounter{secnumdepth}{3}
\begin{document}
...
\end{document}
Best Answer
In the standard
LaTeX
classes the sectional divisions are\part
,\chapter
(but not inarticle
),\section
,\subsection
,\subsubsection
,\paragraph
, and\subparagraph
. Perhaps you could try using\paragraph
and\subparagraph
as a first go to get your lower level headings and then, if needs be, ask about changing the numbering from numeric to alphabetic.