I admit that the documentation of tasks
doesn't make this fact very clear (I'll add something to the next version): the {tasks}
environment only looks like a list environment because semantically it is a list. Internally it is no list in the LaTeX sense, i.e. it doesn't use a {list}
. The main purpose of it is not to list it's items with a), b), ... That could be easier achieved with a customized {enumerate}
list (e.g. via the enumitem
package). It's supposed to provide easy means to get rows of items rather than columns. It does this by collecting the environment body which makes it rather a pseudo environment and means that verbatim material cannot be used inside. It then splits the body at every occurrence of \task
and puts the parts into boxes (or l3 coffins). These boxes are then put next to each other depending on the number of columns specified. As a consequence footnotes are no longer working inside {tasks}
. The standard way around is using \footnotemark
and \footnotetext
:
\documentclass{article}
\usepackage{tasks}
\begin{document}
\begin{tasks}(2)
\task test\footnotemark
\task test
\task test
\task test
\end{tasks}
\footnotetext{test a}
\end{document}
Another possibility is to load the footnote
package and enable the footnotes with \makesavenoteenv
:
\documentclass{article}
\usepackage{tasks}
\usepackage{footnote}
\makesavenoteenv{tasks}
\begin{document}
\begin{tasks}(2)
\task test\footnote{test a}
\task test
\task test
\task test
\end{tasks}
\end{document}
A third solution might be to make the {tasks}
environment compatible with tablefootnote
the same way that Marco Daniel used here for {mdframed}
:
\documentclass{article}
\usepackage{tasks}
\usepackage{tablefootnote}
\makeatletter
\AfterEndEnvironment{tasks}{%
\tfn@tablefootnoteprintout%
\gdef\tfn@fnt{0}%
}
\makeatother
\begin{document}
\begin{tasks}(2)
\task test\tablefootnote{test a}
\task test
\task test
\task test
\end{tasks}
\end{document}
tasks
environment is no list (in the LaTeX sense). Every “item” is a box really. Use\footnotemark
and outside the environment\footnotetext
. – cgnieder Jun 29 '13 at 19:29tasks
. For me they would work as anenumeration
list with extra features. Thanks for the solution. I think that would be easy to implement intasks
using thetablefootnote
package with possible hack as in tex.stackexchange.com/questions/113640/…. If you want provide an answer that I will accept it. – cacamailg Jun 29 '13 at 19:45{tasks}
only superficially looks like a list... – cgnieder Jun 29 '13 at 20:22