这里我需要task
允许列表水平分布的包选项按以下顺序。我需要一个enumitem
可以让我随意格式化项目标签的包选项。
有没有解决方案可以合并这两种设置?
\documentclass{article}
\usepackage{tikz}
\usepackage{enumitem}
\usepackage{tasks}
\newcommand*\Choice[1]{%
\begin{tikzpicture}[baseline=-5pt]
\node[gray,inner sep=8pt,draw=gray!50,rounded corners] {#1};
\end{tikzpicture}}
\everymath={\displaystyle}
\makeatletter
\renewcommand\normalsize{\@setfontsize\normalsize{13.5pt}{1.5em}}
\normalsize
\makeatother
\begin{document}
Question goes here.
\begin{tasks}[counter-format={tsk[A]}](2)
\task $\frac{9}{17}$
\task $\frac{12}{17}$
\task $\frac{13}{17}$
\task $\frac{13}{17}$
\task $\frac{8}{17}$
\end{tasks}
Second question goes here.
\begin{enumerate}[itemsep=5pt,label=\protect\Choice{\Alph*},itemindent=10pt]
\item $\frac{9}{17}$
\item $\frac{12}{17}$
\item $\frac{13}{17}$
\item $\frac{5}{17}$
\item $\frac{8}{17}$
\end{enumerate}
\end{document}
答案1
新答案
定义您自己的标签:
\documentclass{article}
\usepackage{tikz}
\usepackage{tasks}
\newcommand*\Choice[1]{%
\begin{tikzpicture}[baseline=-5pt]
\node[gray,inner sep=8pt,draw=gray!50,rounded corners] {#1};
\end{tikzpicture}}
\newcounter{choicelabel}
\newcommand*\Choicelabel{%
\refstepcounter{choicelabel}%
\hskip1em\llap{\Choice{\Alph{choicelabel}}}}%
\everymath={\displaystyle}
\makeatletter
\renewcommand\normalsize{\@setfontsize\normalsize{13.5pt}{1.5em}}
\normalsize
\makeatother
\begin{document}
Question goes here.
\begin{tasks}[label=\Choicelabel](2)
\task $\frac{9}{17}$
\task $\frac{12}{17}$
\task $\frac{13}{17}$
\task $\frac{13}{17}$
\task $\frac{8}{17}$
\end{tasks}
\end{document}
旧答案
使用multicol
包:
\documentclass{article}
\usepackage{tikz}
\usepackage{enumitem}
\usepackage{tasks}
\usepackage{multicol}
\newcommand*\Choice[1]{%
\begin{tikzpicture}[baseline=-5pt]
\node[gray,inner sep=8pt,draw=gray!50,rounded corners] {#1};
\end{tikzpicture}}
\everymath={\displaystyle}
\makeatletter
\renewcommand\normalsize{\@setfontsize\normalsize{13.5pt}{1.5em}}
\normalsize
\makeatother
\begin{document}
Question goes here.
\begin{tasks}[counter-format={tsk[A]}](2)
\task $\frac{9}{17}$
\task $\frac{12}{17}$
\task $\frac{13}{17}$
\task $\frac{13}{17}$
\task $\frac{8}{17}$
\end{tasks}
Second question goes here.
\begin{multicols}{2}
\begin{enumerate}[itemsep=5pt,label=\protect\Choice{\Alph*},itemindent=10pt]
\item $\frac{9}{17}$
\item $\frac{12}{17}$
\item $\frac{13}{17}$
\item $\frac{5}{17}$
\item $\frac{8}{17}$
\end{enumerate}
\end{multicols}
\end{document}