1

I want to use the tasks package, and I want to use mynum (my alphabet enumerate) to enumerate tasks.

\documentclass{report}

\usepackage{amsmath,tasks}

\makeatletter
\def\@mynum#1{\ifcase#1\or آ\or ب\or پ\or ت\or ث\or
    ج\or چ\or ح\or خ\or د\or ذ\or ر\or ز\or ژ\or س\or ش\or ص\or ض\or ط\or ظ\or ع\or غ\or ف\or ق\or ک\or گ\or ل\or م\or ن\or و\or هـ\or ی\else \@ctrerr\fi}
\def\mynum#1{\expandafter\@mynum\csname c@#1\endcsname}
\makeatother

\begin{document}


\begin{tasks}[counter-format=tsk[1])](4)
\task
aaa
\task
bbb
\task
ccc
\task
ddd
\end{tasks}
\end{document}
  • It would be easier if one would understand the figures there. What is \@myharfi doing? – user31729 Nov 17 '15 at 13:49
  • @ Christian Hupfer. thanks. that is my type wrong. corect is \@mynum – Hadi Safi aghdam Nov 18 '15 at 19:49
4

You don't want a new counter but a new representation. The shortcut from the tasks package are defined in the cntformats package, and its documentation describes how to add new ones:

\documentclass{report}

\usepackage{amsmath}
\usepackage{tasks}

\makeatletter
\def\@mynum#1{\ifcase#1\or X\or Y\or Z\else ?\fi}
\NewPatternFormat{m}{\@mynum}
\makeatother

\begin{document}


\begin{tasks}[counter-format=tsk[m])](4)
\task
aaa
\task
bbb
\task
ccc
\task
ddd
\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.