Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

See the following MWE. For some reason the footnotes inside tasks environment are not displayed, while they work in enumeration.

\documentclass{article}

\usepackage{enumitem}
\usepackage{tasks}

\begin{document}
\begin{tasks}
    \task test\footnote{test a}
\end{tasks}
\begin{enumerate}
    \item test\footnote{test b}
\end{enumerate}
\end{document}
share|improve this question
    
the 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:29
    
@cgnieder I was too lazy to look at the code of tasks. For me they would work as an enumeration list with extra features. Thanks for the solution. I think that would be easy to implement in tasks using the tablefootnote 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
1  
Maybe I should make it more clear in the documentation that {tasks} only superficially looks like a list... –  cgnieder Jun 29 '13 at 20:22

1 Answer 1

up vote 4 down vote accepted

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}
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.