I am trying to create an environment wrapping a task environment (from the tasks package). To build the new environment I am using the xparse package.





  \task first
  \task secod

But when I compile I got the error:

ERROR: LaTeX Error: \begin{aaaa} on input line 23 ended by \end{bbbb}.

--- TeX said ---

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.

l.25 \end{bbbb}

It seems that tne \DeclareDocumentEnvironemnt is not working fine in this case.

  • 1
    seems to be a duplicate of (or at least related to) tex.stackexchange.com/q/237230 – cgnieder Jul 9 '15 at 22:17
  • Won't compile even with aaaa for the bbbb because \tasklabelwidth is undefined. Changing that, it still won't compile with aaaa due to a missing \item. Note that this is true even if you give it an \item. So there is really not much hope of this working even without the added complication of a wrapper. – cfr Jul 9 '15 at 22:57
  • @cfr the reasons why are explained here: tex.stackexchange.com/a/121807 – cgnieder Jul 9 '15 at 23:04
  • @clemens Why did they have to pick l? Every single time, I read l3 as 13. – cfr Jul 9 '15 at 23:17
  • 1
    @TeXtnik you can't avoid environ I'm afraid: tasks needs to read the environment body as argument before it arranges the items – cgnieder Jul 10 '15 at 7:37