[Tex/LaTex] Section Counter: 0.1 steps, starting at 1.1

fontsizenumberingsectioning

I'm using \part* and \section in order to formate my file.

The problem is now, that \section just countrs from 1 to n. But what I actually need is the sections counting from 1.1 to 1.n, and then, after the second \part start over as 2.1 to 2.m.

I use \part and \section instead of \section and \subsection because of the fontsize.
If there is a possibility to have \section displayed as large as \part, and \subsection as large as \section, this would also be a way to solve the problem.

Any suggestions?

Best Answer

One possibility would be to redefine \thesection to include the part counter; something like:

\documentclass{article}
\usepackage{chngcntr}

\counterwithin{section}{part}

\begin{document}

\part{Test Part One}
\section{Test Section}
\section{Test Section}
\part{Test Part Two}
\section{Test Section}
\section{Test Section}

\end{document}

To get the part counter in arabic you can say

\renewcommand\thepart{\arabic{part}}

enter image description here

Another option would be to change the sectional unit formatting and use \section, \subsection instead of \part, \section, and this can be done, for example, with the titlesec package:

\documentclass{article}
\usepackage{titlesec}

\titleformat*{\section}{\huge\bfseries}
\titleformat*{\subsection}{\Large\bfseries}
\titleformat*{\subsubsection}{\normalfont\large\bfseries}

\begin{document}

\section{Test Section One}
\subsection{Test Subsection}
\subsection{Test Subsection}
\section{Test Section One}
\subsection{Test Subsection}
\subsection{Test Subsection}

\end{document}

enter image description here

Related Question