From 5f466a7f8b1aacfa350dd2f40f1a2d740661f2f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jon=C3=A1=C5=A1=20Havelka?= Date: Sat, 4 Oct 2025 14:28:28 +0200 Subject: [PATCH] =?UTF-8?q?Nov=C3=A9=20tituly?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tvorba/templates/tvorba/archiv/tituly.tex | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/tvorba/templates/tvorba/archiv/tituly.tex b/tvorba/templates/tvorba/archiv/tituly.tex index 41e69eba..55d6c136 100644 --- a/tvorba/templates/tvorba/archiv/tituly.tex +++ b/tvorba/templates/tvorba/archiv/tituly.tex @@ -12,6 +12,22 @@ POZOR! Kolize jmen! Dva řešitelé mají stejné makro! {% autoescape off %} {% load tex %} +\ExplSyntaxOn +\char_set_catcode_other:n{32}% Odsud dál do \char_set_catcode_space:n{32} nesmí být za žádnou cenu jiná mezera (tj. i zlom řádku) než ty mezi jménem a příjmením +\prop_const_linked_from_keyval:Nn\g_tituly% +{% +{% for r in resitele %}{{r|sloz}}={% if r.titul == '' %}{}{% else %}{\titul{{r.titul|sloz}}}{% endif %},% +{% endfor %}}% +\char_set_catcode_space:n{32} + +\DeclareDocumentCommand\Titul{mO{#1}}{% + \prop_if_in:NnTF\g_tituly{#1}% + {\prop_item:Nn\g_tituly{#1}}% + {\ClassError{mam}{Titul pro #1 nenalezen!}{}}% + #2% +} +\ExplSyntaxOff + {% for r in resitele %} {% if r.titul == '' %} {% spaceless %}