I want to create a numbered list, where each item number is prefixed by the section number. This answer shows how to make customized prefixes using the enumitem
package. But the problem is I have to hard code the section number. Is there a way to populate the section number automatically?
\documentclass{article}
\usepackage{enumitem}
\begin{document}
\begin{enumerate}[leftmargin=*,label=Q1.1.\arabic*]
\item First question
\item Second question
\end{enumerate}
\end{document}
label=\thesection.\arabic*
?label=\textbf{\thesubsection.\arabic*}
to get the subsection number as well. If you write this as an answer, I will accept it