0

I find most easy to navigate through a text which has numbering like this

(3) Section title
Lots of explanations blablabla
...
(3.5) Subsection title
tratatata because
(3.5.1) \emph{If $X=Y$ then $Z=T$}
proof...
tratatata
(3.5.2) subsubsection title
tratata...
...Note that
(3.5.3) <display equation here>

and so on, with those numbers then referred to in the text as needed. Is there a ready-made style that would do that?

Qrrbrbirlbel
  • 119,821
  • Must all composite numbers -- including section and subsection numbers -- be encased in parentheses? Please advise. – Mico Oct 14 '23 at 14:44
  • Please provide a minimal example and explain what exactly you're having trouble with. It's not obvious from your question which aspect of the system you don't know how to implement. – cfr Oct 14 '23 at 14:45

1 Answers1

2

You can do this in two ways, depending on the complexity of your document.

  1. Update the way the sectional unit counter is formatted. This works if you don't want to \reference the sectional units, since they would still be referenced without the parentheses.

  2. Update each individual counter representation. This would allow for \referencing sectional units which will include the parentheses.

Option 2 provides consistency in the display.

enter image description here

\documentclass{article}

\usepackage{lipsum} \usepackage[leqno]{amsmath}

\makeatletter \let\c@equation\c@subsubsection% https://tex.stackexchange.com/q/33898/5764

% Option 1 %\renewcommand{@seccntformat}[1]{(\csname the#1\endcsname)\quad} %\renewcommand{\theequation}{\thesubsubsection}

% Option 2 \renewcommand{\thesection}{(\arabic{section})} \renewcommand{\thesubsection}{(\arabic{section}.\arabic{subsection})} \renewcommand{\thesubsubsection}{(\arabic{section}.\arabic{subsection}.\arabic{subsubsection})} \renewcommand{\theequation}{\arabic{section}.\arabic{subsection}.\arabic{equation}} \makeatother

\begin{document}

\setcounter{section}{2}% Just for this example

\section{Section title} \lipsum[1][1]

\subsection{Subsection title} \lipsum[1][2] \begin{equation} f(x) = ax^2 + bx + c \label{eqn:first} \end{equation} \lipsum[1][3] See equation~\eqref{eqn:first} or section~\ref{sec:subsubsection}.

\subsubsection{Subsubsection title} \label{sec:subsubsection} \lipsum[1][4] \begin{equation} ax^2 + bx + c = f(x) \end{equation}

\end{document}

Werner
  • 603,163