I want to enumerate my solutions to some exercise from a book. The names of the exercises are structured in the form "CHAPTER.ExerciseNumber.ExerciseSubNumber", e.g.:
1.1)a) b) c)
1.2)
1.3)
2.1)
...
I have used the following codestyle for other books (where there were no subnumbers):
\documentclass[a4paper, 11pt]{article}
\usepackage[a4paper,left=3cm,right=3cm,top=3cm,bottom=3cm]{geometry}
\usepackage{array}
\usepackage{enumitem}
\usepackage{etoolbox}
\usepackage{fancyhdr}
\usepackage{float}
\usepackage[T1]{fontenc}
\usepackage[Export]{adjustbox}
\usepackage[utf8]{inputenc}
\usepackage{latexsym}
\usepackage{lmodern}
\usepackage{mdframed}
\usepackage{pifont}
\usepackage{pgf}
\usepackage{ragged2e}
\usepackage{tcolorbox}
\usepackage{tikz}
\usepackage[absolute,overlay]{textpos}
\usepackage{ulsy}
\usepackage{xcolor}
\pagestyle{fancy}
\fancyhf{}
\renewcommand{\headrulewidth}{0pt}
\fancyfoot[LE,RO]{\thepage}
\renewcommand{\familydefault}{\sfdefault}
\newcounter{mycount} \renewcommand{\themycount}{\arabic{mycount}}
\setlist[enumerate]{label=\themycount.\arabic*,
ref=\themycount.\arabic*),
before=\refstepcounter{mycount}}
\setcounter{mycount}{0}
\begin{document}
\begin{enumerate}
\item \begin{enumerate}[label=\alph*)]
\item
\item
\item
\end{enumerate}
\item
\item
\end{enumerate}
\begin{enumerate}
\item
\end{enumerate}
\end{document}
However, this code does not work for sub-enumerations (the chapter number gets mistakingly incremented by one). Is there any way to fix this?
left=3cm,right=3cm,top=3cm,bottom=3cm
may be expressed more succinctly asmargin=3cm
.