5

enter image description here

\begin{tasks}(3)
\task {\color{red}
$3x^3 - 21x$}
\task {\color{red}
$5x^6 + 15x^4$}
\task {\color{red}
$4x^3 + 10x^2 - 2x$}
\end{tasks}

How to change the color number tasks. Please, help!

3

I assume that just the math material should be in red. If that's the case, the following code will achieve your formatting-related objective.

enter image description here

\documentclass{article}
\usepackage{tasks}

\usepackage{etoolbox}
\AtBeginEnvironment{tasks}{\everymath{\color{red}}}

\begin{document}
\begin{tasks}(3)
\task  $3x^3 - 21x$
\task  $5x^6 + 15x^4$
\task  $4x^3 + 10x^2 - 2x$
\end{tasks}
\end{document}
  • Aside: Issue the instruction \settasks{style=enumerate} after loading the tasks package to get the tasks enumerated with arabic numerals followed by a period ("full stop"). – Mico Apr 5 '16 at 5:10
2

If you want to get the whole task in red, you need a small patch of an internal expl3 code as it currently resets everything to black:

\documentclass{article}

\usepackage{tasks}
\settasks{style=enumerate}

\ExplSyntaxOn\makeatletter
%patch needed to get a around a problem in the l3-drivers
\AtBeginDocument{
 \cs_set_protected_nopar:Npn \color_ensure_current:
   {\set@color}
 }
\ExplSyntaxOff\makeatother 

\begin{document}
\begingroup
\color{red}
\begin{tasks}(3)
\task $3x^3 - 21x$
\task 
$5x^6 + 15x^4$
\task $4x^3 + 10x^2 - 2x$
\end{tasks}
\endgroup
\end{document}

enter image description here

2

Set both the item-format and the label-format.

\documentclass{article}
\usepackage{tasks,color}

\settasks{
  style = enumerate ,
  label-format = \bfseries
}

\begin{document}

% local:
In exercises 1--8, factor the common factor in the polynomials.
\begin{tasks}[label-format=\color{red}\bfseries,item-format=\color{red}](3)
  \task  $3x^3 - 21x$
  \task  $5x^6 + 15x^4$
  \task  $4x^3 + 10x^2 - 2x$
\end{tasks}

% for all lists:
\settasks{
  label-format = \color{red}\bfseries ,
  item-format  = \color{red}
}

In exercises 1--8, factor the common factor in the polynomials.
\begin{tasks}(3)
  \task  $3x^3 - 21x$
  \task  $5x^6 + 15x^4$
  \task  $4x^3 + 10x^2 - 2x$
\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.