Rename Equation with subsubsection

equationsnumbering

I' like to rename the equations so:

chapter.section.subsection,subsubsection.theequation

I tried with

\renewcommand{\theequation}{\thesubsubsection.\arabic{equation}}

First Edit: I use frequently book and article classes.

But it doesn't function. Why?

Thank you

Best Answer

You can use amsmath's \numberwithin command to number equations within subsubsections.

In an article document, you can do as in the following example.

\documentclass{article}
\usepackage{amsmath}
\numberwithin{equation}{subsubsection}
\begin{document}
\section{A section}
\subsection{A subsection}
\subsubsection{A subsubsection}
\begin{equation}
a^2 + b^2 = c^2
\end{equation}
\end{document}

In a book document, subsubsections are not numbered by default, so you can add \setcounter{secnumdepth}{3} to number them.

\documentclass{book}
\usepackage{amsmath}
\setcounter{secnumdepth}{3}
\numberwithin{equation}{subsubsection}
\begin{document}
\chapter{A chapter}
\section{A section}
\subsection{A subsection}
\subsubsection{A subsubsection}
\begin{equation}
a^2 + b^2 = c^2
\end{equation}
\end{document}
Related Question