1

I would like to ask a question which is quite similar to this question. I am sorry to make a new thread since I could not add my comment after those answers to ask.

I would like to number subsections through the text (not depending on section they belong to) as the following

Currently:
1. Section
1.1 subsection
1.2 subsection
1.3 subsection
2. Section
2.1 subsection
2.2 subsection

Should be:
1.Section
  1. subsection
  2. subsection
  3. subsection
2. Section
  4. subsection
  5. subsection

Please give me some advice. Many thanks in advance.

marked as duplicate by Alan Munn, Peter Jansson, barbara beeton, Thorsten, Mico Nov 6 '13 at 17:42

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

2

Pretty easy solution, include the following in the pre-amble.

\renewcommand{\thesubsection}{\arabic{subsection}.}

You can remove the `.' if desired, or add brackets, etc. to distinguish the sections and subsections.

EDIT:

Apologies, I misread the question, and thought it was simply about removing the section number from the printed subsection number.

Here is a solution (slightly less clean) for the posed question:

\let\oldsubsection\subsection

\newcounter{mysubsection}

\renewcommand{\subsection}{
    \stepcounter{mysubsection}
    \oldsubsection
}

\renewcommand{\thesubsection}{\arabic{mysubsection}.}
  • 1
    This is not enough, the subsection number is reset in each section. – Torbjørn T. Nov 6 '13 at 17:00

Not the answer you're looking for? Browse other questions tagged or ask your own question.