# How to skip some arabic labels in task environment?

I am writing an answer key to a (math) problem set which contains, suppose, 10 problems. To generate a sequence of numbers I am using task environment with global settings \NewTasks[label = {\bf \arabic*.},label-width=4ex]{answers}[\a].

For example, suppose the problem number 5, 6, 7 are 'prove that' type problems. It means that I don't need to show their answers in the answer key. So, I want to generate a sequence from 1 to 4 and then from 8 to 10.

I don't know how to skip these three particular numbers. I am using TexShop 4.58.

My code is

\usepackage{tasks}
\usepackage{amsmath, amsthm, amssymb, amsfonts}
\begin{document}
\a (C)
\a (D)
\a (D)
\a (C)
\a (D)
\a (A)
\a (C)
\a (C)
\a (A)
\a (B)
\end{document}


It produces

Please tell me what changes should I do to get desired output?

Thanks

• You know the drill: Please provide a self-contained, compilable example document that sets up your overall document properties. Without it, any answer will require so much guesswork as having little chance of being of value to you. – Mico Jan 9 at 8:22

You can do \addtocounter{task}{...} where you need it:

\documentclass{article}

\begin{document}

\a (A)
\a (C)
\a (C)

\end{document}


If you want to directly type in the number you want to step up to: that can be done with a little bit of simple math:

\newcommand\gototask[1]{\addtocounter{task}{\numexpr#1-\value{task}\relax}}

\documentclass{article}

\begin{document}

\a (A)
\a (C)
\a (C)

\end{document}


Both examples give

BTW: in your log you should be getting

Package tasks Warning: You've tried setting command \NewTasks ' on line 6.
(tasks)                command \NewTasksEnvironment ' instead. Refer to the
`