# [Tex/LaTex] Include section number in list number

#enumeratelistsnumberingsectioning

As a follow-up to this question, I'd like to know if it is possible to automatically include the current section number, including all nesting levels, in the list number. How do I accomplish this?

Example of what I want:

\section{This is section 1}
\pointedenum\begin{enumerate}
\item This item has number 1.1.
\item This item has number 1.2.
\pointedenum\begin{enumerate}
\item This item has number 1.2.1.
\end{enumerate}
\end{enumerate}

\subsection{This is section 1.1}
\pointedenum\begin{enumerate}
\item This item has number 1.1.1.
\item This item has number 1.1.2.
\end{enumerate}
% etcetera...


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.