Quantcast
Channel: Enumerate items with respect to chapters - TeX - LaTeX Stack Exchange
Viewing all articles
Browse latest Browse all 2

Enumerate items with respect to chapters

$
0
0

I'm working on a document with several chapters. In the end of each chapter I have tasks which I want to enumerate as 101, 102, ... ,112 (chapter 1), 201, 202, ... 212 (chapter 2) and so on.

For now, my solution is use of the packages enumitem and etoolbox and the \setlist command:

Updated code, a small document illustrating the problem

\documentclass{report}\usepackage{enumitem}\usepackage{etoolbox}\setlist[enumerate]{label=\thechapter 0\arabic{*}.,resume}% restart the enumerate list every chapter \preto\chapter{   \restartlist{enumerate}}\title{Running enumeration according to chapters}\begin{document}\chapter{First Chapter}\section{Tasks Chapter \thechapter}\begin{enumerate}    \item Task 1    \item Task 2    \item Task 3    \item Task 4    \item Task 5    \item Task 6    \item Task 7    \item Task 8    \item Task 9    \item Task 10\end{enumerate}\chapter{Second chapter}\section{Tasks Chapter \thechapter}\begin{enumerate}    \item Task 1    \item Task 2    \item Task 3    \item Task 4    \item Task 5    \item Task 6    \item Task 7    \item Task 8    \item Task 9    \item Task 10\end{enumerate}\end{document}

This works for enumeration up to 109, 209 and so on, but the 10:th task will be labeled 1010, 2010 and so on.

How can I achieve that kind of enumeration which will use no more (and no less) than two positions for the running numbering and the leftmost position for the chapters?


Viewing all articles
Browse latest Browse all 2

Latest Images

Trending Articles





Latest Images