I need something like this:
Chapter 1
Preliminaries
1.1 Banach Algebras
I tried this:
\chapter{}
\section*{Preliminaries}
\subsection{Banach Algebras}
The problem is: As soon as I hide the section number using \section*{Preliminaries}
, it changes the numbering of the subsection to 0.1 Banach Algebras
.
How do I hide the number of the section but keep the number ordering in my subsection?
A quick fix without the hassles of renewing the section command is to use addtocounter.
Everytime you use the \section*{} command, right after that you can say \addtocounter{section}{1}
\chapter{}
\section*{Preliminaries}
\addtocounter{section}{1}
\subsection{Banach Algebras}
\section*{Preliminaries}
\addtocounter{section}{1}
\subsection{Banach Algebras}
This will give you a result of,
Chapter 1
Preliminaries
1.1.1 Banach Algebras
Preliminaries
1.2.2 Banach Algebras
Essentially, it is just adding 1 to your section counter whenever you create a section so when the subsection checks the section counter, it has the updated counter.
And the advantage is that if you add another section now which needs to be numbered like,
\chapter{}
\section*{Preliminaries}
\addtocounter{section}{1}
\subsection{Banach Algebras}
\section*{Preliminaries}
\addtocounter{section}{1}
\subsection{Banach Algebras}
\section{Preliminaries}
You will get the correct section number (i.e. 1.3)
Chapter 1
Preliminaries
1.1.1 Banach Algebras
Preliminaries
1.2.2 Banach Algebras
1.3 Preliminaries
The main drawback is that you will have to remember to add to the counter everytime you created a \section*{}
You can add \setcounter{subsection}{0} everytime you create one of those sections to reset the subsection counter... sorry I missed that one. Thanks for clarifying.
So you just don't want to see the number displayed? Just use \renewcommand to renew the \section command, as thus:
\renewcommand{\thesection}{}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With