{% if cat|attr('depth') %} \{%- for i in range(cat.depth-1) -%}sub{%- endfor -%}category{ {{- cat.name -}} }{ {{- cat.time -}} } {% for cat in cat.tasks %} {% include 'category.tex.j2' %} {% endfor %} {% else %} {% include 'tache.tex.j2' %} {% endif %}