# [Tex/LaTex] reset counter in tasks environment

cv

Can someone please help me reset the counter(?) in the code below. The Answer section should start with #1. I do need

\RenewTasks[resume, style=custom,label-align=right]{tasks}(2)


in the preamble.

Thank you.

\documentclass{book}
\usepackage[a4paper, top=2cm, bottom=2cm]{geometry}
\usepackage{multicol, paralist, multirow, amsmath, amsthm, amssymb, amsfonts, ulem}

counter-format  = tsk. ,
label-format    =  \bfseries ,
label-width     = 2em ,
label-offset    = .3333em ,
after-item-skip = 5pt
}

\begin{document}
%
%
In Exercises 1-8, factor the common factor in the polynomials.
$3x^3 - 21x$
$5x^6 + 15x^4$
$4x^3 + 10x^2 - 2x$
%
%
This is a long word problem, more than one line. I can't seem to use rlap for this. I have to use another begin{tasks} section here.

In Exercises 8-13, solve the polynomial equations.
$x(x+12) = 0$
$(2x+1)(2x-1) = 0$
%

\vspace{1in}
%%%%%%%

$3x(x^2-7)$
$5x^4(x^2+3)$
$2x(2x^2+5x-1)$
%
$x=0, \, x = -12$
$x = - \, \dfrac 12, \, x = \, \dfrac 12$

\end{document} Two things:

To accomodate a long item, you don't need to start a new environment. Just use \task*

\task*
This is a long word problem, more than one line. I can't seem to use rlap for this. I have to use another begin{tasks} section here.


Second, you can pass the option [resume=false] locally, when you type answers

Answers:


Full code:

\documentclass{book}
\usepackage[a4paper, top=2cm, bottom=2cm]{geometry}
\usepackage{multicol, paralist, multirow, amsmath, amsthm, amssymb, amsfonts, ulem}

counter-format  = tsk. ,
label-format    =  \bfseries ,
label-width     = 2em ,
label-offset    = .3333em ,
after-item-skip = 5pt
}

\begin{document}
%
%
In Exercises 1-8, factor the common factor in the polynomials.
$3x^3 - 21x$
$5x^6 + 15x^4$
$4x^3 + 10x^2 - 2x$
%%
%%
This is a long word problem, more than one line. I can't seem to use rlap for this. I have to use another begin{tasks} section here.

In Exercises 8-13, solve the polynomial equations.
$x(x+12) = 0$
$(2x+1)(2x-1) = 0$
%

\vspace{1in}
%%%%%%%

$3x(x^2-7)$
$5x^4(x^2+3)$
$2x(2x^2+5x-1)$
%
$x=0, \, x = -12$
$x = - \, \dfrac 12, \, x = \, \dfrac 12$

\end{document} As an aside, instead of hard coding question ranges, you can label the questions and use \ref

As an alternative, you may define these:

\NewTasks[resume, style=custom,label-align=right]{questions}(2)


and use them like

\begin{questions}(3)
$3x^3 - 21x$
$3x^3 - 21x$

so that code is more readable. You may change the separator \task too, if you wish. For details refer to the manual.