tags:

views:

47

answers:

4

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?

+3  A: 

So you just don't want to see the number displayed? Just use \renewcommand to renew the \section command, as thus:

\renewcommand{\thesection}{}
Jonno_FTW
@Jonno_FTW: oh, go on, show us the rest of it
High Performance Mark
@High performance mark, if you waited 12 more seconds, you would have seen the edit that included the tested code.
Jonno_FTW
@Jonno_FTW: 12 seconds is an eternity in high-performance computing. Much appreciate the rest of your answer. +1 from me.
High Performance Mark
+1  A: 

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.

nEm
Even better, thanks!!
Chantel Burnard
Thank u so much!
nEm
I've updated the answer with your second question... sorry about that
nEm
Great! It works perfectly now...
Chantel Burnard
Awesome! Good luck on the rest...
nEm
A: 

That works fantastically!!!

Thank you very much...

Chantel Burnard
Here's a tip: don't reply to posters in with a new answer, add it as an edit to your original question.
Jonno_FTW
A: 

It works, but any idea how I would get:

Chapter 1

Preliminaries

1.1.1 Banach Algebras

Preliminaries

1.2.1 Banach Algebras

That is, I need the subsection counting to start fresh after every new section??

An ideas?

Chantel Burnard