3

I am using a task environment but it is not working. My sample code is

\begin{tasks}[label=(\arabic*)]
\task 1
\task 2
\task 1
\task 3
\task 4
\end{tasks}

But if I use the same code without [label=(\arabic*)] then it is working. Please do help.

  • 2
    \usepackage{tasks}? This works without problems: dpaste.com/3YHZ7NP (expires in 10 days) – Henri Menke Dec 10 '19 at 4:50
  • @HenriMenke Yes, I have used tasks package. But it is not working when I use [label=(\arabic*)] or any other label. – prashant sharma Dec 10 '19 at 5:14
  • Is your distribution up-to-date? Which is your error? I got an error if I try @HenriMenke's code on Overleaf (which is not up-to-date but uses TeXLive 2018). – CarLaTeX Dec 10 '19 at 6:08
  • 2
    Which version of tasks do you have? The syntax for labels has changed since version 1.0. – Bernard Dec 10 '19 at 9:32
4

As Bernard said in his comment, the syntax for labels has changed since version 1.0 of package tasks.

If you have a version older than 1.0 but at least 0.9 or newer, for example, if you're using Overleaf, which has

tasks.sty    2016/08/13 v0.12 Horizontalcolumnedlists (CN),

you should use counter-format={<counter specs>}.

This option is now deprecated, it set a custom label in a peculiar way. The letters tsk are replaced with the task-counter. An optional argument directly following these letters specifies the counter format: 1: \arabic, a: \alph, A: \Alph, r: \roman and R: \Roman.

You can find the old documentation of the package in its repository on GitHub.

This works on Overleaf, I hope it works also for you:

\documentclass{article}
\usepackage{tasks}
\begin{document}
\begin{tasks}[counter-format=(tsk[1]), label-width=4em]
\task 1
\task 2
\task 1
\task 3
\task 4
\end{tasks}
\end{document}

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.