1

When I update Miktex 2.9 I have problem with enumeration option task. When I print:

\makeatletter
\def\@mynum#1{\ifcase#1\or a\or b\or v\or g\or d\or d1\or e\or zh
\or z\or i\or j\or k\or l\or lj\or m\or n\or nj\or o\or p\or r
\or s\or t\or c1\or u\or f\or h\or c\or ch\or d2\or sh\else ?\fi}
\NewPatternFormat{m}{\@mynum}
\makeatother

\settasks{
  %label-width = 2.7em ,
  %item-indent = 2em ,
  before-skip = -\parskip-2mm ,
  after-skip = -\parskip-2mm ,
  after-item-skip = -\parskip
}

\begin{tasks}[counter-format=tsk[m])](3)
        \task 2;
        \task 1;
        \task 0.
    \end{tasks}

then I have answer

Undefined control sequence. l.46 \NewPatternFormat {m}{@mynum}

Please help me to solve this problem.

  • counter-format was replaced with the label option with the update of the tasks package to version 1.0. – leandriis Mar 8 at 10:43
  • Could you please add a small description of the desired output? – leandriis Mar 8 at 10:45
  • I want alphabet cyrilic like a) б) в) г) ... now I got a) b) v) g) ... – BranislavM Mar 8 at 10:49
  • Does \documentclass{article} \usepackage[T2A]{fontenc} \usepackage[utf8]{inputenc} \usepackage{tasks} \usepackage[russian]{babel} \settasks{ before-skip = -\parskip-2mm , after-skip = -\parskip-2mm , after-item-skip = -\parskip, label=\asbuk*) } \begin{document} \begin{tasks}[](3) \task 2; \task 1; \task 0. \end{tasks} \end{document} result in the desired output? – leandriis Mar 8 at 10:57
  • I try your suggestion but I have got Undefined control sequence. l.6 \abx@aux@refcontext {anyt/global//global/global} and I use serbian babel – BranislavM Mar 8 at 11:02
2

With an up to date tasks use the label option and define your command analoguous to \alph:

\documentclass{article}
\usepackage{tasks}

\makeatletter
\def\@mynum#1{\ifcase#1\or a\or b\or v\or g\or d\or d1\or e\or zh
\or z\or i\or j\or k\or l\or lj\or m\or n\or nj\or o\or p\or r
\or s\or t\or c1\or u\or f\or h\or c\or ch\or d2\or sh\else ?\fi}
\newcommand*\mynum[1]{\expandafter\@mynum\csname c@#1\endcsname}
\makeatother

\begin{document}

\begin{tasks}[label=\mynum*)](3)
  \task 2;
  \task 1;
  \task 0.
\end{tasks}

\end{document}

enter image description here


However, from what I read in the comments it looks to me you are trying to re-invent the wheel?

\documentclass{article}
\usepackage[T2A]{fontenc}
\usepackage[russian]{babel}
\usepackage{tasks}

\begin{document}

\begin{tasks}[label=\asbuk*)](3)
  \task 2;
  \task 1;
  \task 0.
\end{tasks}

\end{document}

enter image description here

| improve this answer | |
  • Everything work as you show, thank you very much! – BranislavM Mar 8 at 11:40
  • @BranislavM you're welcome – cgnieder Mar 8 at 12:13

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.