Include section number in list number
You could redefine \theenumi
using \thesection
:
\renewcommand*{\theenumi}{\thesection.\arabic{enumi}}
\renewcommand*{\theenumii}{\theenumi.\arabic{enumii}}
In that case omit \pointedenum
, it would destroy that redefinition.
That may also be done using \thesubsection
.
Alternatively, here's code using the enumitem
package:
\usepackage{enumitem}
\setenumerate[1]{label=\thesection.\arabic*.}
\setenumerate[2]{label*=\arabic*.}
Using enumitem
you're able to continue numbering by \begin{enumerate}[resume]
if you like.
The variables governing the labels for the items in an enumerated list are \labelenumi
(for the top level), \labelenumii
(next-to-top level),... You can use \renewcommand
to redefine them to anything you want.
I would expect this to work, but I have not tried it:
\renewcommand{\labelenumi}{\thesection.\arabic{enumi}}
\renewcommand{\labelenumii}{\thesection.\arabic{enumi}.\arabic{enumii}}
I usually resolve this with the enumerate
package. I always use this package anyway to control how items are enumerated by allowing you to specify e.g. \begin{enumerate}[(1)]
to have parentheses the numbers etc..
In preamble use
\usepackage{enumerate}
Then:
\section{This is section 1}
\begin{enumerate}[\thesection .1]
\item This is item 1.1
\item This is item 1.2
\end{enumerate}
\subsection{This is section 1.1}
\begin{enumerate}[\thesubsection .1]
\item This is item 1.1.1
\item This is item 1.1.2
\end{enumerate}
This solution allows you to use section numbering in enumerate only where you specify it. However if you want to do this globally I would use Stefan Kottwitz' solution above.