当我更新 Miktex 2.9 时,枚举选项任务出现问题。当我打印时:
\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}
那么我有答案
未定义控制序列。l.46 \NewPatternFormat {m}{@mynum}
请帮我解决这个问题。
答案1
tasks
使用最新label
选项并定义类似于的命令\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}
然而,从我读到的评论来看,您是在试图重新发明轮子吗?
\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}