# Manually label in Task package

I want to manually label inside the \task environment. For example (a) and (b) are subquestions of 1 so I want to label them (1a) and (1b) respectively. Here is my MWE:

\documentclass[12pt, a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage[margin=3.0cm]{geometry}
\usepackage{graphicx}
\graphicspath{ {images/} }
\usepackage{enumitem}
\usepackage{amsthm}
\usepackage{amsmath}
\usepackage{tasks}
\linespread{2}

\begin{document}

\begin{center}
\underline{\textbf{\large Math 194 Tutorial 7 Solution}}
\end{center}
\begin{center}
\underline{\textbf{Excercise} }
\end{center}

\begin{tasks}(2)
\task $(2z-13)(5x +4y)$ \\
\task $(3a-2c)(6a -7b)$ \\
\task $(3x+5a)(3x-5y)$ \\
\task $(a+5b)(12x+3)$ \\
\task $(6c+7d)(5c^2 -1)$ \\
\task $(3a-5c)(6b+13c)$
\end{tasks}
\end{document}


• Have you had a look at page 11 of the manual? – TeXnician May 23 '17 at 12:27
• Are you merely referring to the typeset appearance in the question of a) (2z - 13)(5x + 4y), or are you referring to the notion of \labeling the task so that you can later \refer to it. – Steven B. Segletes May 23 '17 at 12:29
• @StevenB.Segletes, I have attached a picture which explains what I require. Sorry if that was not clear in my initial explanation – R Maharaj May 23 '17 at 13:26
• If you only need the alternate label on some of the labels, using the optional argument, \task[1a)] ... should do it. However, you probably need to expand the label width as well, as clemens describes in his answer.Note though, that using the optional argument will destroy the ability to employ \label \ref mechanism, unless alternate steps are taken. – Steven B. Segletes May 23 '17 at 13:33

## 1 Answer

### manual labels

You can always use the optional argument to \task which of course is error-prone:

\begin{tasks}(2)
\task[1a)] $(2z-13)(5x +4y)$ \\
\task[1b)] $(3a-2c)(6a -7b)$ \\
\task[2)] $(3x+5a)(3x-5y)$ \\
\task[3a)] $(a+5b)(12x+3)$ \\
\task[3b)] $(6c+7d)(5c^2 -1)$ \\
\task[4)] $(3a-5c)(6b+13c)$
\end{tasks}


tasks does not really support this in an automated way.

### original answer

Is this what you want? I introduce a new counter question and then set up tasks this way:

\settasks{
counter-format = (\thequestion tsk[a]) ,
label-width = 2em
}


Full example:

\documentclass[12pt, a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage[margin=3.0cm]{geometry}
\usepackage{graphicx}
\graphicspath{ {images/} }
\usepackage{enumitem}
\usepackage{amsthm}
\usepackage{amsmath}
\usepackage{tasks}
\linespread{2}

\settasks{
counter-format = (\thequestion tsk[a]) ,
label-width = 2em
}

\newcounter{question}

\begin{document}

\begin{center}
\underline{\textbf{\large Math 194 Tutorial 7 Solution}}
\end{center}
\begin{center}
\refstepcounter{question}
\underline{\textbf{Question \thequestion} }
\end{center}

\begin{tasks}(2)
\task $(2z-13)(5x +4y)$ \\
\task $(3a-2c)(6a -7b)$ \\
\task $(3x+5a)(3x-5y)$ \\
\task $(a+5b)(12x+3)$ \\
\task $(6c+7d)(5c^2 -1)$ \\
\task $(3a-5c)(6b+13c)$
\end{tasks}
\end{document}


• I require something like that but I have edited my question a bit to reflect what I intended to ask. I have included a picture of what I require. I'm not sure if \task is the correct way to do something like this? I just want the columns to be spaced out as is but I want to add the counters manually. is that possible? – R Maharaj May 23 '17 at 13:25
• @RMaharaj well, a manual solution is always possible, see my edited answer – cgnieder May 23 '17 at 13:33