0

Here I need the task package option that allows lists to be distributed horizontally in the order shown below. And I need the enumitem package option that let me wildly format the item labels.

Is there a solution to merge both settings?

\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}

enter image description here

2

New answer

Define your own label:

\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}

enter image description here

Old answer

Using the multicol package:

\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}

enter image description here

  • Thanks, @Skillmon .. I've already tried multicol but it does not keep the order horizontally as I want. – ένας Mar 7 '18 at 12:51

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.