From bb758d25831d84172f0afd00f9c0fd9539ed61a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9ophile=20Bastian?= Date: Sun, 30 Oct 2022 18:32:11 +0100 Subject: [PATCH] Align group names in a table --- repartir_taches/templates/groupe.tex.j2 | 8 +++++++- repartir_taches/templates/tache.tex.j2 | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/repartir_taches/templates/groupe.tex.j2 b/repartir_taches/templates/groupe.tex.j2 index d1e59c0..9c15dbf 100644 --- a/repartir_taches/templates/groupe.tex.j2 +++ b/repartir_taches/templates/groupe.tex.j2 @@ -1 +1,7 @@ -\groupe{ {{- g_id + 1 -}} } &--- {{ ', '.join(groupes[g_id]) }} \\ +\groupe{ {{- g_id + 1 -}} } +{%- for mem in range(5) -%} +& +{%- if mem < groupes[g_id]|length -%} + {{ groupes[g_id][mem] }} +{%- endif %} +{%- endfor %} \\ diff --git a/repartir_taches/templates/tache.tex.j2 b/repartir_taches/templates/tache.tex.j2 index 4403ec1..7ef1948 100644 --- a/repartir_taches/templates/tache.tex.j2 +++ b/repartir_taches/templates/tache.tex.j2 @@ -6,7 +6,7 @@ {{ cat.descr|md_format|escape_latex }} \\ {% if cat.notes %}\textit{ {{- cat.notes -}} } \\ {% endif -%} -\begin{tabular}{r l} +\begin{tabular}{c l l l l l} {% for g_id in cat.assigned %} {% include 'groupe.tex.j2' %} {%- endfor -%} \end{tabular}