\documentclass{beamer}
\usepackage{tasks}
\begin{document}
\begin{frame}[allowframebreaks]
$1+1=$(\makebox[2cm]{})
\begin{tasks}[counter-format = tsk[A]. ](2)
\task one
\task two
\task three
\task four
\end{tasks}
\end{frame}
\end{document}
- 1,028
- 327
-
A B C D is not aligned ? – Wu Guiping Sep 03 '17 at 09:32
-
@clemens I get funny error messages here. – Johannes_B Sep 03 '17 at 09:41
-
1Seems to be incompatible beamer and tasks. – Harald Lichtenstein Sep 03 '17 at 10:06
-
How to format the selection so that the four options are automatically aligned according to length – Wu Guiping Sep 03 '17 at 10:34
2 Answers
The environment tasks wants to generate two columns. But, there seems to be a rounding issue, when the column width is calculated, because the text width is odd (\showthe\numexpr\linewidth gives 20138549 sp).
Making it even fixes the problem:
\documentclass{beamer}
\usepackage{tasks}
\ifodd\textwidth
\addtolength{\textwidth}{1sp}
\fi
\begin{document}
\begin{frame}[allowframebreaks]
$1+1=(\makebox[2cm]{})$
\begin{tasks}[counter-format = tsk[A]. ](2)
\task one
\task two
\task three
\task four
\end{tasks}
\end{frame}
\end{document}
- 271,626
Workaround:
I suggest using a simple enumerate environment instead. The label can be formatted with \setbeamertemplate{enumerate item}{...}.
\documentclass{beamer}
\begin{document}
\begin{frame}
$1+1=$(\makebox[2cm]{})
{
\setbeamertemplate{enumerate item}{\Alph{enumi}.}
\begin{enumerate}
\item one
\item two
\item three
\item four
\end{enumerate}
}
\end{frame}
\end{document}
In case the items should be arranged in two columns, see https://tex.stackexchange.com/a/25712/36296
- 158,329
-
I bet the second item should be in one line with the first, with the second line containing the third and fourth item. – Johannes_B Sep 03 '17 at 11:19
-
@Johannes_B I did not see anything in the questions to assume this, but I added a link for two column enumeration in beamer. – samcarter_is_at_topanswers.xyz Sep 03 '17 at 11:24
-
\begin{tasks}[counter-format = tsk[A]. ](2)the numbere of columns is in the parentheses. – Johannes_B Sep 03 '17 at 11:28 -
@Johannes_B Thanks! (never came across the
taskspackage until now :) – samcarter_is_at_topanswers.xyz Sep 03 '17 at 11:30


