0

I often have the problem when speaking about a LaTeX document that I say e.g. "please see 3.5" and that only then I realize that this could refer to a) a section, b) a equation and c) a figure and therefor then add e.g. "eh… I mean section 3.5". Is there some way to only have one namespace for chapters/sections, equations and figures?

There seems to be nothing on the internet about that yet (probably because it'd look awful), so any help is appreciated.

0

1 Answer 1

1

I can't believe this is usable, but

enter image description here

\documentclass{book}

\makeatletter
\let\c@section\c@chapter
\let\thesection\thechapter
\counterwithout*{section}{chapter}
\let\c@subsection\c@chapter
\let\thesubsection\thechapter
\counterwithout*{subsection}{section}
\let\c@figure\c@chapter
\let\thefigure\thechapter
\counterwithout*{figure}{chapter}


\makeatother
\begin{document}

\chapter{aaa}

\section{bbbb}
aaa

\begin{figure}[h]
  
xxxxx
  \caption{qqqq}
\end{figure}


\chapter{aaa}

\section{bbbb}
aaa
\subsection{bbbb}
aaa

\begin{figure}[h]
  
xxxxx
  \caption{qqqq}
\end{figure}


\end{document}
1
  • Thanks a lot, it works!! (even though sections aren't $CHAPTER.$SECTION, but just $SECTION anymore, but whatever …)
    – zvavybir
    Commented Sep 2, 2023 at 16:11

You must log in to answer this question.

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