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.

1 Answers1

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}.}