From 2fbffc27576b1dc54b84b81f6786d8224c3b5e9d Mon Sep 17 00:00:00 2001
From: Frank Poetzsch-Heffter <p-h@katharineum.de>
Date: Sat, 5 Oct 2019 12:34:16 +0200
Subject: [PATCH] formatting tex code and colornames

---
 .../timetable/latex/substitutions.tex         | 31 ++++++-------------
 1 file changed, 10 insertions(+), 21 deletions(-)

diff --git a/biscuit/apps/chronos/templates/timetable/latex/substitutions.tex b/biscuit/apps/chronos/templates/timetable/latex/substitutions.tex
index 618b63a9..aaa879c0 100644
--- a/biscuit/apps/chronos/templates/timetable/latex/substitutions.tex
+++ b/biscuit/apps/chronos/templates/timetable/latex/substitutions.tex
@@ -25,37 +25,26 @@
     \textbf{Klassen} & \textbf{Std.} & \textbf{Lehrer} & \textbf{Fach} & \textbf{Raum} & \textbf{Hinweis}\\\hline
     \endhead
     {% for sub in subs %}
-        {# ------------------------------ #}
         {#  Color groups of classes in grey/white #}
         {% if last_classes != sub.classes %}
-            {% if color_background %}
-            {% set color_background = 0 %}
-            {% else %}
-            {% set color_background = 1 %}
+            {% if color_background %}{% set color_background = 0 %}
+            {% else %}{% set color_background = 1 %}
             {% endif %}
         {% endif %}
-
         {% set last_classes = sub.classes %}
-
         {# Background color #}
-        {% if color_background %}
-        \rowcolor{grey}
-        {% endif %}
-        {# ------------------------------ #}
+        {% if color_background %}\rowcolor{ grey }{% endif %}
         {% with c=sub.color %}
             {#  Display classes #}
-            \color{ {{c}}}
-            \textbf{ {{ sub.classes }} } &
+            \color{ {{c}} }\textbf{ {{ sub.classes }} } &
             {# Display lesson number #}
-            \color{ {{c}}}
-            {{ sub.lesson }} &
-            \color{ {{c}}} {% include "timetable/latex/teacher.tex" %} &
-            \color{ {{c}}} {% include "timetable/latex/subject.tex" %} &
-            \color{ {{c}}} {% include "timetable/latex/room.tex" %} &
+            \color{ {{c}} } {{ sub.lesson }} &
+            \color{ {{c}} } {% include "timetable/latex/teacher.tex" %} &
+            \color{ {{c}} } {% include "timetable/latex/subject.tex" %} &
+            \color{ {{c}} } {% include "timetable/latex/room.tex" %} &
             {# Display badge (for cancellations) #}     {# Display notice and new line #}
-            {% if sub.badge %}
-                \footnotesize\badge{ {{ sub.badge }} }
-            {% endif %} \color{ {{c}}} \large\textit{ {{sub.text|default:""|safe|texify|safe}} } \\
+            {% if sub.badge %} \footnotesize\badge{ {{ sub.badge }} } {% endif %}
+            \color{ {{c}} } \large\textit{ {{sub.text|default:""|safe|texify|safe}} } \\
         {% endwith %}
     {% endfor %}
 \end{longtable}
-- 
GitLab