summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/fithesis/fithesis.dtx
blob: 53632b0a041c283588c04c66b112a0e52cfe9cb8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
% \iffalse\begin{macrocode}
%<*driver>

\documentclass{ltxdoc}
\usepackage[utf8]{inputenc} % this file uses UTF-8
\usepackage[english]{babel}
\usepackage{tgpagella}
\usepackage{tabularx}
\usepackage{hologo}
\usepackage{booktabs}
\usepackage[scaled=0.86]{berasans}
\usepackage[scaled=1.03]{inconsolata}
\usepackage[resetfonts]{cmap}
\usepackage[T1]{fontenc} % use 8bit fonts
\emergencystretch 2dd
\usepackage{hypdoc}
\usepackage{microtype}
\usepackage{ragged2e}
\usepackage{paralist}
\usepackage{multicol}


% Making paragraphs numbered
\makeatletter
\renewcommand\paragraph{\@startsection{paragraph}{4}{\z@}%
            {-2.5ex\@plus -1ex \@minus -.25ex}%
            {1.25ex \@plus .25ex}%
            {\normalfont\normalsize\bfseries}}
\makeatother
\setcounter{secnumdepth}{4} % how many sectioning levels to assign
\setcounter{tocdepth}{4}    % how many sectioning levels to show

% ltxdoc class options
\CodelineIndex
\MakeShortVerb{|}
\EnableCrossrefs
\DoNotIndex{}
\makeatletter
  \c@IndexColumns=2
  \c@GlossaryColumns=2
\makeatother

\begin{document}
  \RecordChanges
  \DocInput{fithesis.dtx}
  \PrintIndex
  \RaggedRight
  \PrintChanges
\end{document}

%</driver>
%    \end{macrocode}
%<*class>
\NeedsTeXFormat{LaTeX2e}
% Define `\thesis@version` and store it in the `VERSION.tex` file \fi
{\def\thesis@versiondef#1#2{
  \gdef\thesis@version@number{#1}
  \gdef\thesis@version@date{#2}
  \gdef\thesis@version{#2 #1 fithesis4 MU thesis class}}
\thesis@versiondef{v1.0.2}{2021/10/17}}
% {\newwrite\f\openout\f=VERSION\write\f{\thesis@version}\closeout\f}
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% ^^A Since 0.3.45, all changes are documented at the change sites.
% \changes{v0.3.44}  {2017/05/18}{Fixed the color in the logo of FI
%   MU. [VN]}
% \changes{v0.3.44}  {2017/05/18}{The captions in the examples for
%   MU are now above tables. [VN]}
% \changes{v0.3.44}  {2017/05/18}{The style file for FSpS, MU now
%   uses a 14 cm wide type area. [VN]}
% \changes{v0.3.44}  {2017/05/18}{The style file for FSpS, MU now
%   uses 1.5 spacing outside bibliography. [VN]}
% \changes{v0.3.44}  {2017/05/18}{The style file for FSpS, MU now
%   uses different title page layout. [VN]}
% \changes{v0.3.44}  {2017/05/18}{The style file for FSpS, MU now
%   uses different declaration text. [VN]}
% \changes{v0.3.44}  {2017/05/18}{Fixed wrong / missing
%   non-breaking spaces in Czech / Slovak localization. [VN]}
% \changes{v0.3.44}  {2017/05/18}{The style file for FSpS, MU now
%   includes place, date, and signature field next to the
%   declaration. [VN]}
% \changes{v0.3.44}  {2017/05/18}{Added an additional hyphenation
%   hint to the example document. [VN]}
% \changes{v0.3.44}  {2017/05/18}{The style file for FSpS, MU now
%   complies with updated requirements. [VN]}
% \changes{v0.3.43}  {2017/05/07}{Added a mention about the thesis
%   proposal thesis type to the user guide for the Faculty of
%   Informatics at the Masaryk University, Brno and fixed a bad
%   citation in the user guides for the Masaryk University, Brno.
%   Added an extra english option for babel in the examples for the
%   Masaryk University, Brno. \cs{thesis@blocks@thanks} no longer
%   gobbles leading spaces of \cs{thesis@thanks}. A fix in the
%   Slovak locale by \texttt{kiraacorsac} at GitHub. [VN]}
% \changes{v0.3.42}  {2017/01/28}{Documented that all color
%   settings are done in the \textsc{rgb} colorspace, which makes
%   the color option suitable mostly for the digital versions of
%   fithesis documents rather than for printing. Added the thesis
%   proposal thesis type. [VN]}
% \changes{v0.3.41}  {2016/08/17}{Removed the arbitrary limitation
%   of \cs{thesissetup}, which prevented it from accepting
%   multi-paragraph values. The \cs{thesislong} macro is therefore
%   no longer necessary, but kept around for backwards
%   compatibility. [VN]}
% \changes{v0.3.40}  {2016/06/06}{Fixed \cs{thesis@pages} not
%   working properly when the \texttt{autoLayout} key is set to
%   \texttt{false}. Added a section on the \textsf{markdown}
%   package to the example documents of the Masaryk University in
%   Brno. Added the \cs{ifthesis@blocks@assignment@hideIfDigital@}
%   conditional to the \texttt{style/mu/fithesis-base.sty} style
%   file. [VN]}
% \changes{v0.3.39:2}{2016/05/26}{The \texttt{assignment} key no
%   longer affects the page numbers and takes into account the
%   \texttt{digital} and \texttt{printed} class options in the
%   style files of the Masaryk University in Brno. [VN]}
% \changes{v0.3.39:1}{2016/05/26}{The
%   \cs{thesis@blocks@bibliography} now uses an emergency stretch
%   of 3\,em in the style files of the Masaryk University in Brno.
%   [VN]}
% \changes{v0.3.38:2}{2016/05/15}{Fixed \cs{thesis@pages} not
%   taking \cs{thesis@postamble} into account. Fixed the chapter
%   number being printed regardless of secnumdepth by the style
%   files of the Masaryk University in Brno. Fixed
%   \cs{thesis@blocks@assignment} being typeset in Czech only
%   by the style file of the Faculty of Science at the Masaryk
%   University in Brno. [VN]}
% \changes{v0.3.38:1}{2016/04/18}{The \texttt{bib} key was added
%   on the \textsf{fithesis3} class level and is supported by the
%   style files of the Masaryk University in Brno. [VN]}
% \changes{v0.3.37}  {2016/04/12}{The \cs{tableofcontents} in the
%   style files of the Masaryk University in Brno now correctly
%   handles all tocdepth values. The expansion of \cs{part} also no
%   longer results in a \textsf{hyperref}-related error in the
%   style files of the Masaryk University in Brno. [VN]}
% \changes{v0.3.36}  {2016/03/26}{The \cs{thesis@load} macro has
%   been lifted to the public API as \cs{thesisload}. [VN]}
% \changes{v0.3.35:3}{2016/03/23}{Fixed \cs{l@}\textit{locale}
%   being possibly undefined in a LuaLaTeX run. [VN]}
% \changes{v0.3.35:2}{2016/03/22}{Added support for seminar papers
%   on the \textsf{fithesis3} class level. The style files for the
%   faculties of the Masaryk University in Brno do not provide any
%   special handling of this thesis type yet. [VN]}
% \changes{v0.3.35:1}{2016/03/22}{Added support for the Division of
%   Information and Library Studies of the Faculty of Arts at the
%   Masaryk University in Brno. This support is enabled by
%   specifying \cs{thesis@department} to be \texttt{kisk}. [VN]}
% \changes{v0.3.34}  {2016/02/24}{Added visual tests of output
%   PDFs. The \texttt{test/} directory is now also uses the
%   \textit{university}\texttt{/}\textit{faculty} path scheme
%   employed by the rest of the package. [VN]}
% \changes{v0.3.33}  {2016/02/19}{Added \cs{thesis@patch}. [VN]}
% \changes{v0.3.32}  {2016/02/18}{Fixed a regression from 
%   v0.3.27:2 -- The margins in \cs{thesis@blocks@mainMatter} were
%   corrected in the style files of the Faculty of Economics and
%   Administration and the Faculty of Medicine at the Masaryk
%   University in Brno. [VN]}
% \changes{v0.3.31:3}{2016/01/13}{The
%   \texttt{style/mu/fithesis-sci.sty} style file redefines
%   \cs{thesis@blocks}\texttt{\discretionary{@}{@}{@}declaration}
%   to include a formatted date and an author's signature field.
%   The locale file \texttt{style/mu/sci/czech.def} contains a new
%   string \cs{thesis@czech\discretionary{@}{@}{@}formattedDate}.
%   [VN]}
% \changes{v0.3.31:2}{2016/01/07}{All trailing \texttt{\%}s were
%   removed. Some of the inherited \textsf{fithesis2} code in the
%   \texttt{style/mu/fithesis-1*.clo} and
%   \texttt{style/mu/fithesis-base.sty} files was refactored and
%   reformatted. Alternative templates for the Faculty of Science
%   at the Masaryk University in Brno are now mentioned in the
%   respective user guide. [VN]}
% \changes{v0.3.31:1}{2016/01/07}{The redefinitions of
%   \cs{appendix} from the
%   \texttt{style/mu\discretionary{/}{/}{/}fithesis-1*.clo} files,
%   which broke hyperref links to appendices, were removed. [VN]}
% \changes{v0.3.30}  {2016/01/05}{The \cs{thesis@seasonYear} macro
%   has been added, which, unlike \cs{thesis@year} takes into
%   account the fact that January and Fabruary of the year $n$
%   still belong to the fall semester of the year $n-1$. [VN]}
% \changes{v0.3.29:3}{2015/12/09}{The \texttt{table} class option
%   for the style files of the Masaryk University in Brno now loads
%   all the required packages and changes the table measurements
%   even when the \texttt{color} option is not specified. [VN]}
% \changes{v0.3.29:2}{2015/12/09}{The \texttt{printed} and
%   \texttt{digital} class options, which set all the options
%   appropriate for either the printed or the digital versions of a
%   document, are now available for the style files of the Masaryk
%   University in Brno. [VN]}
% \changes{v0.3.29:1}{2015/12/08}{The initial pages of the styles
%   of the Masaryk University in Brno are no longer page-numbered,
%   so that hyperref links work correctly. [VN]}
% \changes{v0.3.28:2}{2015/12/03}{If the thesis locale and the
%   document locale is the same (the default behaviour), the
%   \cs{thesis@selectLocale} macro is applied globally at the
%   beginning of the document. As a result, the \textsf{csquotes}
%   style is automatically set for the entire document. [VN]}
% \changes{v0.3.28:1}{2015/12/02}{The \texttt{draft} option has no
%   longer an effect on the \textsf{microtype} package. The
%   \cs{thesis@require} command now also takes an optional
%   argument and the \cs{thesis@require\-WithOption} command has
%   become \cs{thesis@require\-IfExists}. [VN]}
% \changes{v0.3.27:5}{2015/11/30}{The PDF bookmarks are no longer
%   garbled, when the \Hologo{LuaTeX} engine is used. [VN]}
% \changes{v0.3.27:4}{2015/11/30}{\cs{thesis@english@declaration}
%   now uses the correct idiom (by one's own $\to$ on
%   one's own). [VN]}
% \changes{v0.3.27:3}{2015/11/29}{As a preparation for the future
%   inclusion of bibliography support, the \textsf{csquotes}
%   package is loaded, \texttt{@csquotesStyle} is a new part of
%   the locale interface that sets the \textsf{csquotes} style
%   of a locale, and \cs{thesis@selectLocale} now switches the
%   \textsf{csquotes} style. [VN]}
% \changes{v0.3.27:2}{2015/11/29}{\cs{thesis@selectLocale} is no
%   longer performed globally for the entire document during
%   \cs{thesis@load} (effectively overriding the user's hyphenation
%   settings, if Babel's or Polyglossia's \cs{languagename}
%   differs from \cs{thesis@locale}). Instead, \cs{thesis@preamble}
%   and \texttt{@postamble} now locally switch the locale and
%   expand \cs{thesis@blocks@preamble} and \texttt{@postamble},
%   which are the new redefinables. Since this breaks the behaviour
%   of \cs{thesis@blocks@mainMatter}, whose effects would also be
%   local, \texttt{@mainMatter} is now executed directly by
%   \cs{thesis@preamble} after closing the group and becomes a new
%   part of the interface between the class and the style files.
%   [VN]}
% \changes{v0.3.27:1}{2015/11/29}{Fixed a typo in the guide.
%   Added a compatibility layer for \cs{title}, \cs{author}, and
%   \cs{maketitle}. Minor changes of the documentation. [VN]}
% \changes{v0.3.26}  {2015/11/21}{Updated the example documents and
%   the user guide. Fixed a typo in the description of
%   \cs{thesis@season}. [VN]}
% \changes{v0.3.25}  {2015/11/20}{The example documents from the
%   \texttt{example} directory are now a part of the CTAN archive.
%   Additional information were inserted into the guide and to the
%   example files. [VN]}
% \changes{v0.3.24}  {2015/11/17}{Added the \cs{thesis@backend}
%   tunable. The hyphenation pattern switching now uses
%   \textsf{polyglossia} instead of crude \cs{language} switching
%   wherenever possible. Added the opt-out \texttt{microtype}
%   class option, which loads the microtypographic extension. The
%   \cs{thesis@}\textit{locale}\texttt{@summer} and
%   \texttt{@winter} locale macros were renamed to \texttt{@spring}
%   and \texttt{@fall}. The \cs{thesis@parseDate} now uses more
%   realistic month ranges to set \cs{thesis@season} and
%   \cs{thesis@academicYear}. Removed the extraneous indent in the
%   \cs{thesis@blocks@declaration} macro definition within the
%   \texttt{style/mu/fithesis-fi.sty} style file. \cs{paragraph}s
%   are not included in the table of contents by default. The
%   \texttt{table} class option now supports the \texttt{tabu}
%   environment. The list of tables and the list of figures now
%   have an entry in the table of contents for the
%   \texttt{style/mu/fithesis-econ.sty} style file. [VN]}
% \changes{v0.3.23}  {2015/10/14}{Fixed a typo in the Slovak
%   locale. [VN]}
% \changes{v0.3.22}  {2015/10/09}{Updated the link colors in the
%   style of the Faculty of Economics and Administration at the
%   Masaryk University in Brno and fixed the title page leading
%   in the style of the Faculty of Science at the Masaryk
%   University in Brno. [VN]}
% \changes{v0.3.21}  {2015/08/26}{Fixed an invalid font name. [VN]}
% \changes{v0.3.20}  {2015/07/07}{Removed an extraneous
%   \cs{hypersetup} option to eliminate a warning. Performed
%   several minor Makefile updates. Updated the technical
%   documentation. [VN]}
% \changes{v0.3.19}  {2015/06/27}{Updated the license. Added the
%   \texttt{fithesis-} prefix to locale files. Proof-read and
%   updated the documentation. Encapsulated the
%   \texttt{localeInheritance} and \texttt{styleInheritance}
%   setters. Added the \cs{thesis@selectLocale}\texttt{\{...\}},
%   which acts as a replacement for
%   \cs{def}\cs{thesis@locale}\texttt{\{...\}}, which also switches
%   hyphenation patterns. The macro definitions inside locale files
%   are now global to account for the fact that it now makes sense
%   to include locale files on-site (and therefore possibly inside
%   a group) using the \cs{thesis@selectLocale}. The class files
%   are now generated using the XeTeX engine, which
%   preserves the characters outside ASCII. [VN]}
% \changes{v0.3.18}  {2015/06/24}{A bulk of changes required to submit
%   the document class to CTAN: Changed the structure of the output
%   \texttt{fithesis3.ctan.zip} archive. Updated the license
%   notice. Added a \texttt{README} file. Canonicalized a url
%   within the user guides. Renamed the root directory from
%   \texttt{fithesis3/} to \texttt{fithesis/}. Refactored the
%   makefiles. Added developer example files. Renamed
%   \texttt{docstrip.cfg} to \texttt{LICENSE.tex} to better
%   describe its role. The \texttt{fithesis.dtx} file now
%   generates a \texttt{VERSION.tex} file containing the version of
%   the package, when it's being typeset. Flattened the
%   \texttt{logo/} directory structure. [VN]}
% \changes{v0.3.17}  {2015/06/24}{Changed a forgotten
%   \cs{thesis@@lower}\texttt{\{...\}} invocation in the definition
%   of \cs{thesis@czech@declaration} for the Faculty of Arts into
%   \cs{thesis@@lower}\texttt{\{czech@...\}}, so that the macro
%   always expands to the correct output regardless of the current
%   locale. This is merely a matter of consistency, since the style
%   file of the Faculty of Arts only uses Czech strings within the
%   Czech locale. Removed an extraneous comment. Fixed a unit test.
%   Fixed a changelog entry. [VN]}
% \changes{v0.3.16}  {2015/06/21}{Clubs and widows are now set to
%   be infinitely bad. The \texttt{assignment} key has weaker, but
%   more robust semantics now. [VN]}
% \changes{v0.3.15}  {2015/06/14}{Renamed \cs{thesis@requireStyle}
%   to \cs{thesis@requireWithOptions} and moved the style loader
%   from the \cs{thesis@load} routine to a new
%   \cs{thesis@requireStyle} macro to make the semantics of
%   \cs{thesis@requireLocale} and \cs{thesis@requireStyle} more
%   similar. Changed the \texttt{basepath}, \texttt{logopath},
%   \texttt{localepath} and \texttt{stylepath} keys to match the
%   lower camelcasing of the rest of the keys. Added further
%   description regarding the use of the \texttt{assignment} key.
%   [VN]}
% \changes{v0.3.14}  {2015/06/07}{Updated the documentation. [VN]}
% \changes{v0.3.13}  {2015/05/30}{Fixed an inconsistency in the
%   example code. Removed an extraneous \cs{thesis@blocks@clear}
%   block withing the definition of \cs{thesis@blocks@frontMatter}
%   in the fss style file. Added comments, fixed clubs and widows
%   and removed text overflows within the user guides. Adjusted the
%   colors of various style files. Removed the trailing dot in the
%   bibliographic identification within the med and ped style
%   files. Fixed a typo within the technical documentation. Fixed
%   the twoside alignment of the \cs{thesis@blocks@bibEntry} and
%   the \cs{thesis@blocks@bibEntryEn} blocks within the sci style
%   file.  The \cs{thesis@blocks@assignment} block no longer clears
%   a page when nothing is inserted. It is also no longer
%   hard-coded to be hidden for rigorous theses. Instead, the
%   \cs{ifthesis@blocks@assignment} conditional can be set either
%   by the subsequently loaded style files or by the user. So far,
%   only the fi and sci style files set the conditional. [VN]}
% \changes{v0.3.12}  {2015/05/24}{The subsections and
%   subsubsections now use the correct \texttt{tocdepth}. [VN]}
% \changes{v0.3.11}  {2015/05/15}{Added hyphenation into the
%   technical documentation. Fixed an unterminated group. Polished
%   the text of the guide. Added the \texttt{palatino} and
%   \texttt{nopalatino} options. Stylistic changes to the text of
%   the technical documentation. \cs{thesis@subdir} is now robust
%   against relative paths. Accounted for French spacing in the
%   guide. Fixed the \texttt{thesis@english@facultyName} string.
%   Documentation refinements. [VN]}
% \changes{v0.3.10}  {2015/05/09}{Fixed a typo in the technical
%   documentation. Updated the \emph{Advanced usage} chapter of the
%   user guide. The required packaged listed in Section 2.2 of the
%   user guide are now always correct. Adjusted the footer spacing
%   in the styles of econ and fi. Added \emph{Advanced usage}
%   chapter to the user guide. Added the description of basic
%   options into the user guide. Added the \texttt{table} and
%   \texttt{oldtable} options. Added the \texttt{type} field to the
%   guide for completeness. [VN]}
% \changes{v0.3.09}  {2015/04/26}{A complete refactoring of the class. The class
%   was decomposed into a base class, locale files and style files. [VN]}
% \changes{v0.3.08}  {2015/03/04}{Fixed a non-terminated \cs{if} condition.
%   [VN] (backport of v0.2.18)\\Fixed mostly documentation errors reported
%   at the new fithesis discussion forum (-ti, eco$\to$econ, implicit
%   twocolumn, example extended (font setup), etc.). [PS] (backport of v0.2.17)}
% \changes{v0.3.07}  {2015/02/03}{Replaced the \cs{thesiswoman} command with
%   \cs{thesisgender}. [VN]}
% \changes{v0.3.06}  {2015/01/26}{Added the colorx package and the base colors
%   for each faculty. If the color option is specified, the tabular environment
%   gets redefined and uses the faculty colors to color alternating table rows
%   to improve readability. The hyperref links in the e-version are now likewise
%   colored according to the chosen faculty, in this case regardless of the
%   presence of the color option. Dropped the support for typesetting theses
%   outside MU. [VN]}
% \changes{v0.3.05}  {2015/01/21}{Added support for change typesetting.
%   Restructured the code to make it more amenable to literal programming.
%   Added support for \cs{CodelineIndex} typesetting. Added information about
%   the usage of \textsf{fithesis1} and \textsf{fithesis2} on the FI unix
%   machines. (backport of v0.2.16) [VN] Minor changes throughout the text,
%   added a link to the the fithesis forums [PS] (backport of v0.2.15@r14:15)}
% \changes{v0.3.04}  {2015/01/14}{Import the url package to allow for the use of
%   \cs{url} within the documentation. (backport of v0.2.15@r13) [VN]}
% \changes{v0.3.03}  {2015/01/14}{Small fixes (added \cs{relax} at
%   \cs{MainMatter}), generating both fithesis.cls (obsolete, loading
%   \texttt{fithesis2.cls}) and \texttt{fithesis2.cls}, minor doc edits,
%   version numbering of \texttt{.clo} fixed, switch to utf8 and ensuring that
%   \texttt{.dtx} compiles. Documentation adjusted to the status quo, added
%   link to discussion forum (backport of v0.2.14) [PS]}
% \changes{v0.3.02}  {2015/01/13}{PDF metadata stamping added for
%   \cs{thesistitle} and \cs{thesisstudent} [VN]}
% \changes{v0.3.01}  {2015/01/09}{documentation now uses babel and cmap
%   packages. the entire file was transcoded into utf8, \cs{thesiscolor} was
%   replaced by color class option, added PDF metadata stamping support [VN]}
% \changes{v0.3.00}  {2015/01/01}{fi logo is no longer special-cased (added eps
%   and PDF), \cs{thesislogopath} added to set the logo directory path,
%   \cs{thesiscolor} added to enable colorful typo elements [VN]}
% \changes{v0.2.12a}{2008--2011}{fork fithesis2 by Mr. Filipčík and Janoušek;
%   cf. \protect\url{http://github.com/liskin/fithesis}}
% \changes{v0.2.12} {2008/07/27}{Licence change to the LPPL [JP]}
% \changes{v0.2.11} {2008/01/07}{fix missing \texttt{fi-logo.mf} [JP,PS]}
% \changes{v0.2.10} {2006/05/12}{fix EN name of Acknowledgement [JP]}
% \changes{v0.2.09}  {2006/05/08}{add EN version of University name [JP]}
% \changes{v0.2.08}  {2006/01/20}{add change of University name [JP]}
% \changes{v0.2.07}  {2005/05/10}{escape all Czech letters [JP]
%   babel is used instead of stupid package czech [JP]
%   \cs{MainMatter} should be placed after \cs{tablesofcontents} [PS]}
% \changes{v0.2.06}  {2004/12/22}{fix : behind Advisor [JP]}
% \changes{v0.2.05}  {2004/05/13}{add English abstract [JP]}
% \changes{v0.2.04}  {2004/05/13}{fix SK declaration [Peter Cerensky, JP]}
% \changes{v0.2.03}  {2004/05/13}{fix title spacing [PS, JP]}
% \changes{v0.2.02}  {2004/05/12}{fix encoding bug [JP]}
% \changes{v0.2.01}  {2004/05/11}{add subsubsection to toc [JP]}
% \changes{v0.2.00}  {2004/05/03}{add sk lang [JP, Peter Cerensky]
%   set default cls class to \textsf{rapport3} [JP]}
% \changes{v0.1g}   {2004/04/01}{change of default size (12pt$\to$11pt) [JP]}
% \changes{v0.1f}   {2004/01/24}{add documentation for hyperref [JP]}
% \changes{v0.1e}   {2004/01/07}{add Brno to MU title [JP]}
% \changes{v0.1d}   {2003/03/24}{removed def schapter from fit1*.clo [JP]}
% \changes{v0.1c}   {2003/02/21}{default values of \cs{facultyname} and
%   \\\cs{@thesissubtitle} set for backward compatibility) [PS]}
% \changes{v0.1b}   {2003/02/14}{change of default size (11pt$\to$12pt) [JP]}
% \changes{v0.1a}   {2003/02/12}{minor documentation changes (CZ only,
%   sorry) [PS]}
% \changes{v0.1}    {2003/02/11}{new release, documentation editing (CZ only,
%   sorry) [PS]}
% \changes{v0.0a}   {2002}{changes by Jan Pavlovič to allow fithesis being
%   backend of docbook based system for thesis writing}
% \changes{v0.0}    {1998}{bachelor project of Daniel Marek under
%   supervision of Petr Sojka}
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% \title{The \textsf{fithesis4} class for the typesetting of theses written
%   at the Masaryk University in Brno}
% \author{Daniel Marek, Jan Pavlovič, Vít Novotný, Tereza Vrabcová, Petr Sojka}
% \date{\today}
% \maketitle
%
% \begin{abstract}
% \noindent This document details the design and the implementation
% of the \textsf{fithesis4} document class. It contains technical
% information for anyone who wishes to extend the class with their
% locale or style files.
% \end{abstract}
%
% \tableofcontents
%
% \section{Required classes and packages}
% \begin{macro}{\thesis@backend}
% The class requires the class specified in |\thesis@backend|,
% whose default value is |[a4paper]{rapport3}|. If a different
% base class is desired, it can be specified by redefining
% |\thesis@backend| prior to loading the \textsf{fithesis4} class.
%    \begin{macrocode}
\ProvidesClass{fithesis4}[\thesis@version]
\ifx\thesis@backend\undefined
  \def\thesis@backend{[a4paper]{rapport3}}
\fi\expandafter\LoadClass\thesis@backend
%    \end{macrocode}
% \end{macro}
% The class also requires the following packages:
% \begin{itemize}
%   \item\textsf{keyval} -- Adds support for parsing
%     comma-delimited lists of key-value pairs.
%   \item\textsf{etoolbox} -- Adds support for expanding
%     code after the preamble using the |\AtPreamble| hook.
%   \item\textsf{ltxcmds} -- Implements several commands from
%     the \LaTeX\ kernel. Used for the |\ltx@ifpackageloaded|
%     command, which -- unlike its |\@ifpackageloaded| counterpart
%     -- can be used outside the preamble.
%   \item\textsf{ifxetex} -- Used to detect the \Hologo{XeTeX}
%     engine.
%   \item\textsf{ifluatex} -- Used to detect the \Hologo{LuaTeX}
%     engine.
%   \item\textsf{inputenc} -- Used to enable the input UTF-8
%     encoding. This package does not get loaded under
%     the \Hologo{XeTeX} and \Hologo{LuaTeX} engines.
%   \changes{v1.0.0}{2021/04/30}{Added \cs{thesis@xpatch} command. [TV]}
%   \item\textsf{xpatch} -- Used to redefine parts of code
%     in macros without redefining the whole macro.
% \end{itemize}
% The \texttt{hyperref} package is also conditionally loaded during
% the expansion of the |\thesis@load| macro (see Section
% \ref{sec:thesisload}). Other packages may be required by the
% style files (see Section \ref{sec:style-files}) you are using.
%    \begin{macrocode}
\RequirePackage{keyval}
\RequirePackage{etoolbox}
\RequirePackage{ltxcmds}
\RequirePackage{ifxetex}
\RequirePackage{ifluatex}
\ifxetex\else\ifluatex\else
  \RequirePackage[utf8]{inputenc}
\fi\fi
\RequirePackage{xpatch}
%    \end{macrocode}
% \section{Public API}
% \label{sec:public-api}
% \subsection{Options}
% Any \oarg{options} passed to the class will be handed down to the
% loaded style files. The supported options are therefore documented
% in the subsections of Section \ref{sec:style-files} dedicated to
% the respective style files.
%
% The class options specify the \emph{form} of the document.
%
% \subsection{The \cs{thesissetup} macro}
% \begin{macro}{\thesissetup}
% The main public macro is the |\thesissetup|\marg{keyvals}
% command, where \textit{keyvals} is a comma-delimited list of
% \textit{key}=\textit{value} pairs as defined by the
% \textsf{keyval} package. This macro needs to be included prior to
% the beginning of a \LaTeX\ document. When the macro is expanded,
% the \textit{key}=\textit{value} pairs are processed.
%
% Contrary to the class options, the \textit{key}=\textit{value}
% pairs of the \cs{thesissetup} macro specify metainformation about
% the document.
%    \begin{macrocode}
\long\def\thesissetup#1{%
  \setkeys{thesis}{#1}}
%    \end{macrocode}
% \subsubsection{The \texttt{basePath} key}
% \begin{macro}{\thesis@basepath}
% The \marg{\texttt{basePath}=path} pair sets the \textit{path}
% containing the class files. The \textit{path} is prepended to
% every other path (|\thesis@logopath|, |\thesis@stylepath| and
% |\thesis@localepath|) used by the class. If non-empty, the
% \textit{path} gets normalized to \textit{path/}. The normalized
% \textit{path} is stored within the |\thesis@basepath| macro,
% whose implicit value is |fithesis/|.
%    \begin{macrocode}
\def\thesis@basepath{fithesis/}
\define@key{thesis}{basePath}{%
  \ifx\thesis@empty#1\thesis@empty
    \def\thesis@basepath{}%
  \else
    \def\thesis@basepath{#1/}%
  \fi}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\thesis@logopath}
% \subsubsection{The \texttt{logoPath} key}
% The \marg{\texttt{logoPath}=path} pair sets the \textit{path}
% containing the logo files, which is used by the style files to
% load the university and faculty logos. The \textit{path} is
% normalized using the |\thesis@subdir| macro and stored
% within the |\thesis@logopath| macro, whose implicit value
% is |\thesis@basepath| followed by |logo/\thesis@university/|. By
% default, this expands to \texttt{fithesis/logo/mu/}.
%    \begin{macrocode}
\def\thesis@logopath{\thesis@basepath logo/\thesis@university/}
\define@key{thesis}{logoPath}{%
  \def\thesis@logopath{\thesis@subdir#1%
    \empty\empty\empty\empty}}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\thesis@stylepath}
% \subsubsection{The \texttt{stylePath} key}
% The \marg{\texttt{stylePath}=path} pair sets the \textit{path}
% containing the style files. The \textit{path} is normalized using
% the |\thesis@subdir| macro and stored within the
% |\thesis@stylepath| macro, whose implicit value is
% |\thesis@basepath style/|. By default, this expands to
% \texttt{fithesis/style/}.
%    \begin{macrocode}
\def\thesis@stylepath{\thesis@basepath style/}
\define@key{thesis}{stylePath}{%
  \def\thesis@stylepath{\thesis@subdir#1%
    \empty\empty\empty\empty}}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\thesis@localepath}
% \subsubsection{The \texttt{localePath} key}
% The \marg{\texttt{localePath}=path} pair sets the \textit{path}
% containing the locale files. The \textit{path} is normalized
% using the |\thesis@subdir| macro and stored within the
% |\thesis@localepath| macro, whose implicit value is
% |\thesis@basepath| followed by |locale/|.  By default, this
% expands to \texttt{fithesis/locale/}.
%    \begin{macrocode}
\def\thesis@localepath{\thesis@basepath locale/}
\define@key{thesis}{localePath}{%
  \def\thesis@localepath{\thesis@subdir#1%
    \empty\empty\empty\empty}}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\thesis@subdir}
% The |\thesis@subdir| macro returns |/| unchanged, coerces
% |.|, |..|, |/|\textit{path}, |./|\textit{path} and
% |../|\textit{path} to |./|, |../|, |/|\textit{path}|/|,
% |./|\textit{path}|/| and |../|\textit{path}|/|, respectively, and
% prefixes any other \textit{path} with |\thesis@basepath|.
%    \begin{macrocode}
\def\thesis@subdir#1#2#3#4\empty{%
  \ifx#1\empty%           <empty> -> <basepath>
    \thesis@basepath
  \else
    \if#1/%
      \ifx#2\empty%             / -> /
        /%
      \else%              /<path> -> /<path>/
        #1#2#3#4/%
      \fi
    \else
      \if#1.%
        \ifx#2\empty%           . -> ./
          ./%
        \else
          \if#2.%
            \ifx#3\empty%      .. -> ../
              ../%
            \else
              \if#3/%   ../<path> -> ../<path>/
                ../#4/%
              \else
                \thesis@basepath#1#2#3#4/%
              \fi
            \fi
          \else
            \if#2/%      ./<path> -> ./<path>/
              ./#3#4/%
            \else
              \thesis@basepath#1#2#3#4/%
            \fi
          \fi
        \fi
      \else
        \thesis@basepath#1#2#3#4/%
      \fi
    \fi
  \fi}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\thesis@def}
% The |\thesis@def|\oarg{key}\marg{name} macro defines
% the |\thesis@|\textit{name} macro to expand
% to either <<\textit{key}>>, if specified, or to
% <<\textit{name}>>. The macro serves to provide placeholder
% strings for macros with no default value.
%    \begin{macrocode}
\newcommand{\thesis@def}[2][]{%
  \expandafter\def\csname thesis@#2\endcsname{%
    <<\ifx\thesis@empty#1\thesis@empty#2\else#1\fi>>}}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\thesis@declaration}
% \subsubsection{The \texttt{declaration} key}
% The \marg{\texttt{declaration}=text} pair sets the
% declaration \textit{text} to be included into the document.
% The \textit{text} is stored within the |\thesis@declaration|
% macro, whose implicit value is
% |\thesis@@{declaration}|.
%    \begin{macrocode}
\def\thesis@declaration{\thesis@@{declaration}}
\long\def\KV@thesis@declaration#1{%
  \long\def\thesis@declaration{#1}}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\ifthesis@woman}
% \subsubsection{The \texttt{gender} key}
% The \marg{\texttt{gender}=char} pair sets the author's gender to
% either a male, if \textit{char} is the character \texttt{m}, or
% to a female. The gender can be tested using the
% |\ifthesis@woman| \ldots |\else| \ldots |\fi| conditional. The
% implicit gender is male.
%    \begin{macrocode}
\newif\ifthesis@woman\thesis@womanfalse
\define@key{thesis}{gender}{%
  \def\thesis@male{m}%
  \def\thesis@arg{#1}%
  \ifx\thesis@male\thesis@arg
    \thesis@womanfalse
  \else
    \thesis@womantrue
  \fi}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\thesis@author}
% \subsubsection{The \texttt{author} key}
% The \marg{\texttt{author}=name} pair sets the author's full name
% to \textit{name}. The \textit{name} is parsed using the
% \DescribeMacro{\thesis@parseAuthor}|\thesis@parseAuthor| macro
% and stored within the following macros:
% \begin{itemize}
%   \item\DescribeMacro{\thesis@author}|\thesis@author|
%     -- The full name of the author.
%   \item\DescribeMacro{\thesis@author@head}|\thesis@author@head|
%     -- The first space-delimited part of the name. This
%     corresponds to the author's first name.
%   \item\DescribeMacro{\thesis@author@tail}|\thesis@author@tail|
%     -- The full name without the first space-delimited part of
%     the name. This corresponds to the author's surname.
% \end{itemize}
% The standard \LaTeX\ \DescribeMacro{\author}|\author| macro also
% sets this key.
%    \begin{macrocode}
\def\thesis@parseAuthor#1{%
  \def\thesis@author{#1}%
  \def\thesis@author@head{\expandafter\expandafter\expandafter
    \@gobble\thesis@head#1 \relax}%
  \def\thesis@author@tail{\thesis@tail#1 \relax}}
\thesis@def{author}%
\thesis@def[author]{author@head}%
\thesis@def[author]{author@tail}%
\define@key{thesis}{author}{%
  \thesis@parseAuthor{#1}}
\let\author\thesis@parseAuthor
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\thesis@id}
% \subsubsection{The \texttt{id} key}
% The \marg{\texttt{id}=identifier} pair sets the identifier
% of the thesis author to \textit{identifier}. This usually
% corresponds to the unique identifier of the author within the
% information system of the given university.
%    \begin{macrocode}
\thesis@def{id}
\define@key{thesis}{id}{%
  \def\thesis@id{#1}}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\thesis@type}
% \subsubsection{The \texttt{type} key}
% The \marg{\texttt{type}=type} pair sets the type of the thesis
% to \textit{type}. The following types of theses are recognized:
% \begin{center}\begin{tabular}{lc}\toprule
%   The thesis type   & The value of \textit{type} \\\midrule
%   Seminar paper     & \texttt{sem} \\
%   Bachelor's thesis & \texttt{bc} \\
%   Master's thesis   & \texttt{mgr} \\
%   Thesis proposal   & \texttt{prop} \\
%   Doctoral thesis   & \texttt{d} \\
%   Rigorous thesis   & \texttt{r} \\\bottomrule
% \end{tabular}\end{center}
% The \textit{type} is stored within the |\thesis@type| macro,
% whose implicit value is |bc|. For the ease of testing of the
% thesis type via |\ifx| conditions within style and locale files,
% the \DescribeMacro{\thesis@sempaper}|\thesis@sempaper|,
% \DescribeMacro{\thesis@bachelors}|\thesis@bachelors|,
% \DescribeMacro{\thesis@masters}|\thesis@masters|,
% \DescribeMacro{\thesis@proposal}|\thesis@proposal|,
% \DescribeMacro{\thesis@doctoral}|\thesis@doctoral| and
% \DescribeMacro{\thesis@rigorous}|\thesis@rigorous| macros
% containing the corresponding \textit{type} values are available
% as a part of the private API.
%    \begin{macrocode}
\def\thesis@sempaper{sem}
\def\thesis@bachelors{bc}
\def\thesis@masters{mgr}
\def\thesis@proposal{prop}
\def\thesis@doctoral{d}
\def\thesis@rigorous{r}
\let\thesis@type\thesis@bachelors
\define@key{thesis}{type}{%
  \def\thesis@type{#1}}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\thesis@university}
% \subsubsection{The \texttt{university} key}
% The \marg{\texttt{university}=identifier} pair sets the
% identifier of the university, at which the thesis is being
% written, to \textit{identifier}. The \textit{identifier} is
% stored within the |\thesis@university| macro, whose
% implicit value is \texttt{mu}. This value corresponds to the
% Masaryk University in Brno.
%    \begin{macrocode}
\def\thesis@university{mu}
\define@key{thesis}{university}{%
  \def\thesis@university{#1}}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\thesis@faculty}
% \subsubsection{The \texttt{faculty} key}
% The \marg{\texttt{faculty}=identifier} pair sets the faculty, at
% which the thesis is being written, to \textit{domain}. The
% following faculty \textit{identifier}s are recognized at the
% Masaryk University in Brno:
% \begin{center}\begin{tabularx}{\textwidth}{Xc}\toprule
%   The faculty & The \textit{domain} name \\\midrule
%   The Faculty of Informatics & \texttt{fi} \\
%   The Faculty of Science & \texttt{sci} \\
%   The Faculty of Law & \texttt{law} \\
%   The Faculty of Economics and Administration & \texttt{econ} \\
%   The Faculty of Social Studies & \texttt{fss} \\
%   The Faculty of Medicine & \texttt{med} \\
%   The Faculty of Education & \texttt{ped} \\
%   The Faculty of Arts & \texttt{phil} \\
%   The Faculty of Sports Studies & \texttt{fsps} \\
%   The Faculty of Pharmacy & \texttt{pharm} \\\bottomrule
% \end{tabularx}\end{center}
% The \textit{identifier} is stored within the |\thesis@faculty|
% macro, whose implicit value is \texttt{fi}.
%    \begin{macrocode}
\def\thesis@faculty{fi}
\define@key{thesis}{faculty}{%
  \def\thesis@faculty{#1}}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\thesis@department}
% \subsubsection{The \texttt{department} key}
% The \marg{\texttt{department}=name} pair sets the name of the
% department, at which the thesis is being written, to
% \textit{name}. Unlike the university and faculty identifiers,
% \textsf{fithesis4} does not prescribe the format of the
% \textit{name}; the style files may internally parse it, or
% typeset it as-is. The \textit{name} is stored within the
% |\thesis@department| macro.
%    \begin{macrocode}
\thesis@def{department}
\define@key{thesis}{department}{%
  \def\thesis@department{#1}}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\thesis@departmentEn}
% \subsubsection{The \texttt{departmentEn} key}
% The \marg{\texttt{departmentEn}=name} pair sets the English
% name of the department, at which the thesis is being written, to
% \textit{name}. The \textit{name} is stored within the
% |\thesis@departmentEn| macro.
%    \begin{macrocode}
\thesis@def{departmentEn}
\define@key{thesis}{departmentEn}{%
  \def\thesis@departmentEn{#1}}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\thesis@programme}
% \subsubsection{The \texttt{programme} key}
% The \marg{\texttt{programme}=name} pair sets the name of the
% author's study programme to \textit{name}. Unlike the university
% and faculty identifiers, the programme \textit{name} is only used
% for typesetting and it should therefore be specified in plain
% language with optional \TeX\ macros.  The \textit{name} is stored
% within the |\thesis@programme| macro.
%    \begin{macrocode}
\thesis@def{programme}
\define@key{thesis}{programme}{%
  \def\thesis@programme{#1}}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\thesis@programmeEn}
% \subsubsection{The \texttt{programmeEn} key}
% The \marg{\texttt{programmeEn}=name} pair sets the English name
% of the author's study programme to \textit{name}. The
% \textit{name} is stored within the |\thesis@programmeEn| macro.
%    \begin{macrocode}
\thesis@def{programmeEn}
\define@key{thesis}{programmeEn}{%
  \def\thesis@programmeEn{#1}}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\thesis@field}
% \subsubsection{The \texttt{field} key}
% The \marg{\texttt{field}=name} pair sets the name of the author's
% field of study to \textit{name}. Unlike the university and
% faculty identifiers, the \textit{name} of the field of study is
% only used for typesetting and it should therefore be specified in
% plain language with optional \TeX\ macros. The \textit{name} is
% stored within the |\thesis@field| macro.
%    \begin{macrocode}
\thesis@def{field}
\define@key{thesis}{field}{%
  \def\thesis@field{#1}}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\thesis@fieldEn}
% \subsubsection{The \texttt{fieldEn} key}
% The \marg{\texttt{fieldEn}=name} pair sets the English name of
% the author's field of stufy to \textit{name}. The \textit{name}
% is stored within the |\thesis@fieldEn| macro.
%    \begin{macrocode}
\thesis@def{fieldEn}
\define@key{thesis}{fieldEn}{%
  \def\thesis@fieldEn{#1}}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\thesis@universityLogo}
% \subsubsection{The \texttt{universityLogo} key}
% The \marg{\texttt{universityLogo}=filename} pair sets the
% filename of the logo file to be used as the university logo to
% \textit{filename}. The \textit{filename} is stored within the
% |\thesis@universityLogo| macro, whose implicit value is
% \texttt{fithesis-base}|-\thesis@locale|. The \texttt{fithesis-}
% prefix serves to prevent package clashes with other similarly
% named files within the \TeX\ directory structure. The logo file
% is loaded from the |\thesis@logopath|\discretionary{}{}{}^^A
% |\thesis@universityLogo| path.
% \changes{v1.0.0}{2021/03/19}{^^A
%   Change \cs{thesis@universityLogo},
%   \cs{thesis@blocks@universityLogo@monochrome}, and
%   \cs{thesis@blocks@universityLogo@color} to use the new logotype
%   of the Masaryk University in Brno in the correct size and
%   localization. Add \cs{thesis@blocks@seal}. [VN]}
%    \begin{macrocode}
\def\thesis@universityLogo{fithesis-base-\thesis@locale}
\define@key{thesis}{universityLogo}{%
  \def\thesis@universityLogo{#1}}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\thesis@facultyLogo}
% \subsubsection{The \texttt{facultyLogo} key}
% The \marg{\texttt{facultyLogo}=filename} pair sets the filename
% of the logo file to be used as the faculty logo to
% \textit{filename}. The \textit{filename} is stored within the
% |\thesis@|\discretionary{}{}{}|facultyLogo| macro, whose
% implicit value is |fithesis-\thesis@faculty-\thesis@locale|. The
% \texttt{fithesis-} prefix serves to prevent package clashes with
% other similarly named files within the \TeX\ directory structure.
% The logo file is loaded from the
% |\thesis@logopath\thesis@facultyLogo| path.
% \changes{v1.0.0}{2021/04/24}{^^A
%   Change \cs{thesis@facultyLogo},
%   \cs{thesis@blocks@facultyLogo@monochrome}, and
%   \cs{thesis@blocks@facultyLogo@color} to use the new logotype
%   of the Masaryk University in Brno in the correct size and
%   localization. Add \cs{thesis@blocks@seal}. [VN]}
%    \begin{macrocode}
\def\thesis@facultyLogo{fithesis-\thesis@faculty-\thesis@locale}
\define@key{thesis}{facultyLogo}{%
  \def\thesis@facultyLogo{#1}}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\thesis@style}
% \subsubsection{The \texttt{style} key}
% The \marg{\texttt{style}=filename} pair sets the filename of the
% style file to be used to \textit{filename}. The \textit{filename}
% is stored within the |\thesis@style| macro, whose implicit value is
% |\thesis@university/fithesis-\thesis@university-\thesis@faculty|.
% When the \textit{filename} is an empty token string, no style
% files will be loaded during the main routine (see Section
% \ref{sec:thesisload}).
% \changes{v1.0.0}{2021/02/21}{Files were renamed after
%   breaking changes in package loading after PR 438 in \LaTeXe. [VN]}
%    \begin{macrocode}
\def\thesis@style{\thesis@university/fithesis-\thesis@university-\thesis@faculty}
\define@key{thesis}{style}{%
  \def\thesis@style{#1}}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\thesis@style@inheritance}
% \subsubsection{The \texttt{styleInheritance} key}
% The \marg{\texttt{styleInheritance}=bool} pair either enables,
% if \textit{bool} is \texttt{true} or unspecified, or disables the
% inheritance for style files. The setting affects the function of
% the |\thesis@requireStyle| macro (see Section
% \ref{sec:reflection}) and can be tested using the
% |\ifthesis@style@inheritance| \ldots |\else| \ldots |\fi|
% conditional. Inheritance is enabled for style files by default.
%    \begin{macrocode}
\newif\ifthesis@style@inheritance\thesis@style@inheritancetrue
\define@key{thesis}{styleInheritance}[true]{%
  \begingroup
  \def\@true{true}%
  \def\@arg{#1}%
  \ifx\@true\@arg
    \endgroup\thesis@style@inheritancetrue
  \else
    \endgroup\thesis@style@inheritancefalse
  \fi}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\thesis@locale}
% \subsubsection{The \texttt{locale} key}
% The \marg{\texttt{locale}=name} pair sets the name of the main
% locale to \textit{name}. The \textit{name} is stored within the
% |\thesis@locale| macro, whose implicit value is the main
% language of either the \textsf{babel} or the \textsf{polyglossia}
% package, or \texttt{english}, when undefined. When the
% \textit{name} is an empty token string, no locale files will be
% loaded during the main routine (see Section
% \ref{sec:thesisload}).
%    \begin{macrocode}
\def\thesis@locale{%
  % Babel / polyglossia detection
  \ifx\languagename\undefined
  english\else\languagename\fi}
\define@key{thesis}{locale}{%
  \def\thesis@locale{#1}}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\ifthesis@english}
% The English locale is special. Several parts of the document will
% typically be typeset in both the current locale and English.
% However, if the current locale is English, this would result in
% duplicity. To avoid this, the |\ifthesis@english| \ldots |\else|
% \ldots |\fi| conditional is made available for testing, whether
% or not the current locale is English.
%    \begin{macrocode}
\def\ifthesis@english{
  \expandafter\def\expandafter\@english\expandafter{\string
  \english}%
  \expandafter\expandafter\expandafter\def\expandafter
  \expandafter\expandafter\@locale\expandafter\expandafter
  \expandafter{\expandafter\string\csname\thesis@locale\endcsname}%
  \expandafter\csname\expandafter i\expandafter f\ifx\@locale
  \@english
    true%
  \else
    false%
  \fi\endcsname}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\thesis@locale@inheritance}
% \subsubsection{The \texttt{localeInheritance} key}
% The \marg{\texttt{localeInheritance}=bool} pair either enables,
% if \textit{bool} is \texttt{true} or unspecified, or disables the
% inheritance. The setting affects the function of
% the |\thesis@requireLocale| macro (see Section
% \ref{sec:reflection}) and can be tested using the
% |\ifthesis@locale@inheritance| \ldots |\else| \ldots |\fi|
% conditional. Inheritance is enabled for locale files by default.
%    \begin{macrocode}
\newif\ifthesis@locale@inheritance\thesis@locale@inheritancetrue
\define@key{thesis}{localeInheritance}[true]{%
  \begingroup
  \def\@true{true}%
  \def\@arg{#1}%
  \ifx\@true\@arg
    \endgroup\thesis@locale@inheritancetrue
  \else
    \endgroup\thesis@locale@inheritancefalse
  \fi}
%    \end{macrocode}
% \end{macro}
% \subsubsection{The \texttt{date} key}
% The \marg{\texttt{date}=date} pair sets the date of the thesis
% submission to \textit{date}, where \textit{date} is a string
% in the \texttt{YYYY/MM/DD} format, where \texttt{YYYY} stands
% for full year, \texttt{MM} stands for month and \texttt{DD}
% stands for day. The \textit{date} is parsed and stored using
% the \DescribeMacro{\thesis@parseDate}|\thesis@parseDate|
% macro within the following macros:
% \DescribeMacro{\thesis@date}
% \DescribeMacro{\thesis@year}
% \DescribeMacro{\thesis@month}
% \DescribeMacro{\thesis@day}
% \begin{multicols}{2}
% \begin{itemize}
%   \item|\thesis@date| -- The entire \textit{date}
%   \item|\thesis@year| -- The \texttt{YYYY} of \textit{date}
%   \item|\thesis@month| -- The \texttt{MM} of \textit{date}
%   \item|\thesis@day| -- The \texttt{DD} of \textit{date}
% \end{itemize}
% \end{multicols}
% \begin{itemize}
%   \item\DescribeMacro{\thesis@season}|\thesis@season| -- Expands
%     to either:
%     \begin{itemize}
%       \item\texttt{spring} if $2<{}$\texttt{MM}${}<9$,
%       \item\texttt{fall} if \texttt{MM}${}\leq2$ or \texttt{MM}${}\geq9$.
%     \end{itemize}
%   \item\DescribeMacro{\thesis@seasonYear}|\thesis@seasonYear|
%     -- The year of the given semester:
%     \begin{itemize}
%       \item\texttt{YYYY}${}-1$ if \texttt{MM}${}\leq2$.
%       \item\texttt{YYYY} if \texttt{MM}${}>2$
%     \end{itemize}
%   \item\DescribeMacro{\thesis@academicYear}|\thesis@academicYear|
%     -- The academic year of the given semester:
%     \begin{itemize}
%       \item\texttt{YYYY}${}-1$\texttt{/YYYY} if \texttt{MM}${}<9$.
%       \item\texttt{YYYY/YYYY}${}+1$ if \texttt{MM}${}\geq9$
%     \end{itemize}
% \end{itemize}
% To set up the default values, the |\thesis@parseDate| macro is
% called with the fully expanded |\the\year/\the\month/\the\day|
% string, which equals the current date.
%    \begin{macrocode}
\def\thesis@parseDate#1/#2/#3|{{
  % Set the basic macros
  \gdef\thesis@date{#1/#2/#3}%
  \gdef\thesis@year{#1}%
  \gdef\thesis@month{#2}%
  \gdef\thesis@day{#3}%
  
  % Set the season
  \newcount\@month\expandafter\@month\thesis@month\relax
       \ifnum\@month>8\gdef\thesis@season{fall}
  \else\ifnum\@month<3\gdef\thesis@season{fall}
  \else               \gdef\thesis@season{spring}
  \fi\fi

  % Set the academic year
  \newcount\@year\expandafter\@year\thesis@year\relax
  \ifnum\@month>8%
                    \edef\@yearA{\the\@year}%
    \advance\@year 1\edef\@yearB{\the\@year}%
    \advance\@year-1
  \else
    \advance\@year-1\edef\@yearA{\the\@year}%
    \advance\@year 1\edef\@yearB{\the\@year}%
  \fi
  \global\edef\thesis@academicYear{\@yearA/\@yearB}
  
  % Set the season year
  \ifnum\@month>2\else
    \advance\@year-1
  \fi
  \global\edef\thesis@seasonYear{\the\@year}}}

\edef\thesis@date{\the\year/\the\month/\the\day}%
\expandafter\thesis@parseDate\thesis@date|%

\define@key{thesis}{date}{{%
  \edef\@date{#1}%
  \expandafter\thesis@parseDate\@date|}}
%    \end{macrocode}
% \begin{macro}{\thesis@place}
% \subsubsection{The \texttt{place} key}
% The \marg{\texttt{place}=place} pair sets the location of the
% faculty, at which the thesis is being prepared, to \textit{place}.
% The \textit{place} is stored within the |\thesis@place|
% macro, whose implicit value is \texttt{Brno}.
%    \begin{macrocode}
\def\thesis@place{Brno}
\define@key{thesis}{place}{%
  \def\thesis@place{#1}}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\thesis@title}
% \subsubsection{The \texttt{title} key}
% The \marg{\texttt{title}=title} pair sets the title of the
% thesis to \textit{title}. The \textit{title} is stored within the
% |\thesis@title| macro. The standard \LaTeX\
% \DescribeMacro{\title}|\title| macro also sets this key.
%    \begin{macrocode}
\thesis@def{title}
\define@key{thesis}{title}{%
  \def\thesis@title{#1}}
\def\title#1{\def\thesis@title{#1}}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\maketitle}
% The standard \LaTeX\ |\maketitle| macro is defined, but disabled.
%    \begin{macrocode}
\let\maketitle\relax
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\thesis@TeXtitle}
% \subsubsection{The \texttt{TeXtitle} key}
% The \marg{\texttt{TeXtitle}=title} pair sets the \TeX\ title of
% the thesis to \textit{title}. The \textit{title} is used, when
% typesetting the title, whereas |\thesis@title| is a plain text,
% which gets included in the PDF header of the resulting document.
% The \textit{title} is stored within the |\thesis@TeXtitle| macro,
% whose implicit value is |\thesis@title|.
%    \begin{macrocode}
\def\thesis@TeXtitle{\thesis@title}
\define@key{thesis}{TeXtitle}{%
  \def\thesis@TeXtitle{#1}}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\thesis@titleEn}
% \subsubsection{The \texttt{titleEn} key}
% The \marg{\texttt{titleEn}=title} pair sets the English title of
% the thesis to \textit{title}. The \textit{title} is stored within
% the |\thesis@titleEn| macro.
%    \begin{macrocode}
\thesis@def{titleEn}
\define@key{thesis}{titleEn}{%
  \def\thesis@titleEn{#1}}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\thesis@TeXtitleEn}
% \subsubsection{The \texttt{TeXtitleEn} key}
% The \marg{\texttt{TeXtitleEn}=title} pair sets the English \TeX\
% title of the thesis to \textit{title}. The \textit{title} is
% used, when typesetting the title, whereas |\thesis@titleEn| is a
% plain text, which gets included in the PDF header of the
% resulting document.  The \textit{title} is stored within the
% |\thesis@TeXtitleEn| macro, whose implicit value is
% |\thesis@titleEn|.
%    \begin{macrocode}
\def\thesis@TeXtitleEn{\thesis@titleEn}
\define@key{thesis}{TeXtitleEn}{%
  \def\thesis@TeXtitleEn{#1}}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\thesis@keywords}
% \subsubsection{The \texttt{keywords} key}
% The \marg{\texttt{keywords}=list} pair sets the keywords of the
% thesis to the comma-delimited \textit{list}. The \textit{list}
% is stored within the |\thesis@keywords| macro.
%    \begin{macrocode}
\thesis@def{keywords}
\define@key{thesis}{keywords}{%
  \def\thesis@keywords{#1}}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\thesis@TeXkeywords}
% \subsubsection{The \texttt{TeXkeywords} key}
% The \marg{\texttt{TeXkeywords}=list} pair sets the \TeX\ keywords
% of the thesis to the comma-delimited \textit{list}. The
% \textit{list} is used, when typesetting the keywords, whereas
% |\thesis@|\discretionary{}{}{}|keywords| is a plain text, which
% gets included in the PDF header of the resulting document. The
% \textit{list} is stored within the |\thesis@TeXkeywords| macro.
%    \begin{macrocode}
\def\thesis@TeXkeywords{\thesis@keywords}
\define@key{thesis}{TeXkeywords}{%
  \def\thesis@TeXkeywords{#1}}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\thesis@keywordsEn}
% \subsubsection{The \texttt{keywordsEn} key}
% The \marg{\texttt{keywordsEn}=list} pair sets the English
% keywords of the thesis to the comma-delimited \textit{list}. The
% \textit{list} is stored within the |\thesis@keywordsEn| macro.
%    \begin{macrocode}
\thesis@def{keywordsEn}
\define@key{thesis}{keywordsEn}{%
  \def\thesis@keywordsEn{#1}}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\thesis@TeXkeywordsEn}
% \subsubsection{The \texttt{TeXkeywordsEn} key}
% The \marg{\texttt{TeXkeywordsEn}=list} pair sets the English
% \TeX\ keywords of the thesis to the comma-delimited
% \textit{list}.  The \textit{list} is used, when typesetting the
% keywords, whereas |\thesis@keywordsEn| is a plain text, which
% gets included in the PDF header of the resulting document. The
% \textit{list} is stored within the |\thesis@TeXkeywordsEn| macro.
%    \begin{macrocode}
\def\thesis@TeXkeywordsEn{\thesis@keywordsEn}
\define@key{thesis}{TeXkeywordsEn}{%
  \def\thesis@TeXkeywordsEn{#1}}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\thesis@abstract}
% \subsubsection{The \texttt{abstract} key}
% The \marg{\texttt{abstract}=text} pair sets the abstract of the
% thesis to \textit{text}. The \textit{text} is stored within the
% |\thesis@abstract| macro.
%    \begin{macrocode}
\thesis@def{abstract}
\long\def\KV@thesis@abstract#1{%
  \long\def\thesis@abstract{#1}}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\thesis@abstractEn}
% \subsubsection{The \texttt{abstractEn} key}
% The \marg{\texttt{abstractEn}=text} pair sets the English
% abstract of the thesis to \textit{text}. The \textit{text}
% is stored within the |\thesis@abstractEn| macro.
%    \begin{macrocode}
\thesis@def{abstractEn}
\long\def\KV@thesis@abstractEn#1{%
  \long\def\thesis@abstractEn{#1}}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\thesis@advisor}
% \subsubsection{The \texttt{advisor} key}
% The \marg{\texttt{advisor}=name} pair sets the thesis advisor's
% full name to \textit{name}. The \textit{name} is stored within
% the |\thesis@advisor| macro.
%    \begin{macrocode}
\thesis@def{advisor}
\define@key{thesis}{advisor}{\def\thesis@advisor{#1}}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\thesis@thanks}
% \subsubsection{The \texttt{thanks} key}
% The \marg{\texttt{thanks}=text} pair sets the acknowledgements
% text to \textit{text}. The \textit{text} is stored within
% the |\thesis@thanks| macro.
%    \begin{macrocode}
\long\def\KV@thesis@thanks#1{%
  \long\def\thesis@thanks{#1}}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\thesis@assignmentFiles}
% \subsubsection{The \texttt{assignment} key}
% The \marg{\texttt{assignment}=list} pair sets the comma-delimited
% list of paths to the PDF files containing the thesis assignment
% to \textit{list}. The \textit{list} is stored within the
% |\thesis@assignmentFiles| macro.
%    \begin{macrocode}
\define@key{thesis}{assignment}{%
  \def\thesis@assignmentFiles{#1}}
%    \end{macrocode}
% \end{macro}
% When the |\thesis@assignmentFiles| macro is defined and
% non-empty, the style files should take that as a cue that the
% user wishes to typeset the thesis assignment.

% \begin{macro}{\thesis@bibFiles}
% \subsubsection{The \texttt{bib} key}
% The \marg{\texttt{bib}=list} pair sets the comma-delimited
% list of paths to the BIB files containing the bibliography
% databases to \textit{list}. The \textit{list} is stored within
% the |\thesis@bibFiles| macro.
%    \begin{macrocode}
\define@key{thesis}{bib}{%
  \def\thesis@bibFiles{#1}}
%    \end{macrocode}
% \end{macro}
% When the |\thesis@bibFiles| macro is defined and non-empty, the
% style files should take that as a cue that the user wishes to
% typeset the bibliography.
% \begin{macro}{\ifthesis@auto}
% \subsubsection{The \texttt{autoLayout} key}
% The \marg{\texttt{autoLayout}=bool} pair either enables,
% if \textit{bool} is \texttt{true} or unspecified, or disables
% autolayout. Autolayout injects the
% |\thesis@preamble| and |\thesis@postamble| macros at the
% beginning and at the end of the document, respectively. The
% setting can be tested using the |\ifthesis@auto| \ldots |\else|
% \ldots |\fi| conditional. The autolayout is enabled by default.
%    \begin{macrocode}
\newif\ifthesis@auto\thesis@autotrue
\define@key{thesis}{autoLayout}[true]{%
  \def\@true{true}%
  \def\@arg{#1}%
  \ifx\@true\@arg
    \thesis@autotrue
  \else
    \thesis@autofalse
  \fi}
%    \end{macrocode}
% \end{macro}\begin{macro}{\thesis@pages@preamble}
% The \cs{thesis@pages@preamble} macro contains the last page
% number within the preamble of the document. During the first
% \TeX{} compilation, the macro expands to ??.
% \changes{v0.3.45}{2017/05/24}{Defined the
%   \cs{thesis@pages@preamble} and \cs{thesis@pages@postamble}
%   macros. The patch was submitted by Juraj Pálenik. [VN]}
% \begin{macrocode}
\ifx\thesis@pages@preamble\undefined
  \def\thesis@pages@preamble{??}\fi
%    \end{macrocode}
% \end{macro}\begin{macro}{\thesis@pages@postamble}
% The \cs{thesis@pages@postamble} macro contains the last page
% number prior to the postamble of the document. During the first
% \TeX{} compilation, the macro expands to ??.
% \begin{macrocode}
\ifx\thesis@pages@postamble\undefined
  \def\thesis@pages@postamble{??}\fi
%    \end{macrocode}
% \end{macro}
% The \DescribeMacro{\thesis@preamble}|\thesis@preamble|
% and \DescribeMacro{\thesis@postamble}|\thesis@postamble|
% macros temporarily switch to the hyphenation patterns and the
% \textsf{csquotes} style of the main locale and typeset the
% contents of the
% \DescribeMacro{\thesis@blocks@preamble}|\thesis@blocks@preamble|
% or
% \DescribeMacro{\thesis@blocks@postamble}|\thesis@blocks@postamble|
% macros, respectively; the latter two macros are to be redefined
% by the loaded style files.
%
% After expanding |\thesis@blocks@preamble| inside a \TeX{} group,
% the |\thesis@preamble| macro defines the
% \cs{thesis@pages@preamble} macro, writes the definition to the
% auxiliary file, and  clears the page. After leaving the group,
% the |\thesis@preamble| sets up the style of the main matter by
% expanding the
% \DescribeMacro{\thesis@blocks@mainMatter}|\thesis@blocks@mainMatter|
% macro.
%    \begin{macrocode}
\def\thesis@preamble{%
  {\thesis@selectLocale{\thesis@locale}%
  \thesis@blocks@preamble
  \gdef\thesis@pages@preamble{\thepage}
  \write\@auxout{\noexpand\gdef\noexpand
    \thesis@pages@preamble{\thepage}}
  \clearpage}
  \thesis@blocks@mainMatter}

\let\thesis@blocks@preamble\relax
\let\thesis@blocks@mainMatter\relax
%    \end{macrocode}
% Before expanding |\thesis@blocks@postamble| inside a \TeX{}
% group, the |\thesis@postamble| macro defines the
% \cs{thesis@pages@postamble} macro, writes the definition to the
% auxiliary file, and  clears the page.
% \changes{v0.3.50}{2018/03/25}{Make writes immediate, so that they
%   do not get lost when they occur at an empty page. [VN]}
%    \begin{macrocode}
\def\thesis@postamble{%
  \gdef\thesis@pages@postamble{\thepage}
  \immediate\write\@auxout{\noexpand\gdef\noexpand
    \thesis@pages@postamble{\thepage}}
  {\thesis@selectLocale{\thesis@locale}%
  \thesis@blocks@postamble}}

\let\thesis@blocks@postamble\relax
%    \end{macrocode}
% \subsubsection{The \texttt{extra} key}
% \changes{v0.3.45}{2017/05/29}{Added the \texttt{extra} key
%   to \cs{thesissetup} and defined the helper
%   \cs{thesis@def@extra} macro. [VN]}
% The \marg{\texttt{extra}=\marg{keyvals}} pair enables the
% definition of extra data fields, where \textit{keyvals} is a
% comma-delimited list of \textit{key}=\textit{value} pairs as
% defined by the \textsf{keyval} package. For each
% \textit{key}=\textit{value} pair, a |\thesis@extra@|\textit{key}
% is defined to be \textit{value}. These extra data fields are
% provided as a unified interface for passing additional data to
% the style and locale files.
%    \begin{macrocode}
\def\thesis@extra@KV@prefix{KV@thesis@extra@}
\def\thesis@extra@XKV@fams{thesis@extra}
\long\def\KV@thesis@extra#1{%
%    \end{macrocode}
% Patch the \textsc{xkeyval} package to support unknown keys.
%    \begin{macrocode}
  \long\def\XKV@s@tk@ys##1=##2=##3\@nil{%
    \XKV@g@tkeyname##1=\@nil\XKV@tkey
    \expandafter\KV@@sp@def\expandafter\XKV@tkey\expandafter{\XKV@tkey}%
    \ifx\XKV@tkey\@empty
      \XKV@toks{##2}%
      \ifcat$\the\XKV@toks$\else
        \XKV@err{no key specified for value `\the\XKV@toks'}%
      \fi
    \else
      \@expandtwoargs\in@{,\XKV@tkey,}{,\XKV@na,}%
      \ifin@\else
        \XKV@knftrue
        \KV@@sp@def\XKV@tempa{##2}%
        \ifXKV@preset\XKV@s@tk@ys@{##3}\else
          \ifXKV@pl
            \XKV@for@eo\XKV@fams\XKV@tfam{%
              \XKV@makehd\XKV@tfam
              \XKV@s@tk@ys@{##3}%
            }%
          \else
            \XKV@whilist\XKV@fams\XKV@tfam\ifXKV@knf\fi{%
              \XKV@makehd\XKV@tfam
              \XKV@s@tk@ys@{##3}%
            }%
          \fi
        \fi
        \ifXKV@knf
          \ifXKV@inpox
            \ifx\XKV@doxs\relax
              \ifx\@currext\@clsextension\else
                \let\CurrentOption\XKV@tkey\@unknownoptionerror
              \fi
            \else\XKV@doxs\fi
          \else
            \ifXKV@st
              \XKV@addtolist@o\XKV@rm\CurrentOption
            \else
              \ifx\XKV@fams\thesis@extra@XKV@fams
                \expandafter\long\expandafter\def\csname%
                  thesis@extra@\XKV@tkey\endcsname{##2}%
              \else
                \XKV@err{`\XKV@tkey' undefined in families
                         `\XKV@fams'}%
              \fi
            \fi
          \fi
        \else
          \ifXKV@inpox\ifx\XKV@testclass\XKV@documentclass
            \expandafter\XKV@useoption\expandafter{\CurrentOption}%
          \fi\fi
        \fi
      \fi
    \fi
  }%
  \setkeys{thesis@extra}{#1}%
  \def\KV@prefix{KV@thesis@}}
%    \end{macrocode}
% Patch the \textsc{keyval} package to support unknown keys.
%    \begin{macrocode}
\long\def\KV@split#1=#2=#3\relax{%
  \KV@@sp@def\@tempa{#1}%
  \ifx\@tempa\@empty\else
    \expandafter\let\expandafter\@tempc
      \csname\KV@prefix\@tempa\endcsname
    \ifx\@tempc\relax
      \ifx\KV@prefix\thesis@extra@KV@prefix
        \KV@@sp@def\@tempb{#2}%
        \expandafter\let\csname thesis@extra@\@tempa\endcsname
          \@tempb%
      \else
        \KV@errx
         {\@tempa\space undefined}%
      \fi
    \else
      \ifx\@empty#3\@empty
        \KV@default
      \else
        \KV@@sp@def\@tempb{#2}%
        \expandafter\@tempc\expandafter{\@tempb}\relax
      \fi
    \fi
  \fi}
%    \end{macrocode}
% \begin{macro}{\thesis@def@extra}
% The |\thesis@def@extra|\oarg{definition}\marg{name} macro defines
% the |\thesis@extra@|\textit{name} macro to expand
% to either \textit{definition}, if specified, or to
% |\thesis@placeholder@extra@|\textit{name}, where
% |\thesis@placeholder@extra@|\textit{name} is defined to expand to
% <<extra@\textit{name}>>. If |\thesis@extra@|\textit{name} has
% already been defined by the user, |\thesis@def@extra| has no
% effect.
%    \begin{macrocode}
\newcommand{\thesis@def@extra}[2][]{%
  \expandafter\ifx\csname thesis@extra@#2\endcsname\relax
    \def\thesis@placeholder@extra{<<extra@#2>>}%
    \expandafter\let\csname thesis@placeholder@extra@#2\endcsname
      \thesis@placeholder@extra
    \def\thesis@arg{#1}%
    \ifx\empty\thesis@arg
      \expandafter\let\csname thesis@extra@#2\endcsname
        \thesis@placeholder@extra
    \else
      \expandafter\def\csname thesis@extra@#2\endcsname{#1}%
    \fi
  \fi}
%    \end{macrocode}
% \end{macro}
% \end{macro} ^^A The \thesissetup macro definition
% \subsection{The \cs{thesislong} macro}\label{sec:thesislong}
% \begin{macro}{\thesislong}
% The public macro |\thesislong|\marg{key}\marg{value}, can be
% used as an alternative to the |\thesissetup{|\meta{key}%
% | = |\marg{value}|}| public macro:
%    \begin{macrocode}
\long\def\thesislong#1#2{%
  \csname KV@thesis@#1\endcsname{#2}}
%    \end{macrocode}
% This macro is a relict of the time when |\thesissetup| did not
% accept multi-paragraph input.
% \end{macro}
% \subsection{The \cs{thesisload} macro}\label{sec:thesisload}
% \begin{macro}{\thesisload}
% The |\thesisload| macro is responsible for preparing the
% environment for, and consequently loading, the necessary locale
% and style files. By default, the |\thesisload| macro gets
% expanded at the end of the preamble,
% but it can be expanded manually prior to that point, if necessary
% to prevent package clashes. The \DescribeMacro{\ifthesis@loaded}
% |\ifthesis@loaded| macro ensures that the expansion is only
% performed once. For backwards compatibility, the
% \DescribeMacro{\thesis@load}|\thesis@load| macro can be used to
% the same effect.
%    \begin{macrocode}
\newif\ifthesis@loaded\thesis@loadedfalse
\BeforeBeginEnvironment{document}{\thesisload}
\def\thesis@load{\thesisload}
\def\thesisload{%
  \ifthesis@loaded\else
    \thesis@loadedtrue
    \makeatletter
%    \end{macrocode}
% First, the name of the main locale file is fully expanded and
% loaded using the |\thesis@requireLocale| macro. If the user
% specified an explicit empty string as the value of
% |\thesis@locale|, do nothing.
%    \begin{macrocode}
      \ifx\thesis@locale\empty\else
        \edef\thesis@locale{\thesis@locale}
        \thesis@requireLocale{\thesis@locale}
      \fi
%    \end{macrocode}
% Coerce Lua\TeX{} into defining |\l@|\textit{locale} for
% \textit{locale}s with known hyphenation patterns, unless
% \textsf{babel} or \textsf{polyglossia} have been loaded.
% In that case, |\l@|\textit{locale} has already been defined.
% \changes{v1.0.0}{2020/02/21}{Only load \textsf{babel} in
%   Lua\TeX{} if \textsf{polyglossia} has not been loaded yet.}
%    \begin{macrocode}
    \ifluatex
      \ltx@ifpackageloaded{babel}{}{
        \ltx@ifpackageloaded{polyglossia}{}{
          \thesis@require{babel}}}
    \fi
%    \end{macrocode}
% Fix the value of the |\ifthesis@english| macro.
% \changes{v0.3.45}{2017/05/23}{Updated the \cs{ifthesis@english}
%   macro, so that it no longer dynamically reacts to changes of
%   the locale. Instead, it is now based on the main locale during
%   the expansion of \cs{thesisload}.}
%    \begin{macrocode}
\ifthesis@english
  \expandafter\expandafter\expandafter\let\expandafter\expandafter
    \csname ifthesis@english\endcsname\csname iftrue\endcsname
\else
  \expandafter\expandafter\expandafter\let\expandafter\expandafter
    \csname ifthesis@english\endcsname\csname iffalse\endcsname
\fi
%    \end{macrocode}
% Consequently, the style files are loaded. If the user specified an
% explicit empty string as the value of |\thesis@style|, do nothing.
%    \begin{macrocode}
      \ifx\thesis@style\empty\else
        \thesis@requireStyle{\thesis@style}
      \fi
%    \end{macrocode}
% If the \textsf{babel} or \textsf{polyglossia} locale is identical
% to the thesis locale, the |\thesis@selectLocale| macro will be
% used to globally set up the \textsf{csquotes} style appropriate for
% the given locale.
%    \begin{macrocode}
    \ifx\languagename\empty\else
      \begingroup
      \edef\@doclocale{\languagename}%
      \ifx\@doclocale\thesis@locale
        \endgroup
        \AtBeginDocument{%
          \thesis@selectLocale{\thesis@locale}}%
      \else
        \endgroup
      \fi
    \fi
%    \end{macrocode}
% With the placeholder strings loaded from the locale files, we
% can now inject metadata into the resulting PDF file. To this
% end, the \textsf{hyperref} package is conditionally included with
% the \texttt{unicode} option. Consequently, the following values
% are assigned to the PDF headers:\begin{itemize}
%   \item\texttt{Title} is set to |\thesis@title|.
%   \item\texttt{Author} is set to |\thesis@author|.
%   \item\texttt{Keywords} is set to |\thesis@keywords|.
%   \item\texttt{Creator} is set to \texttt{\thesis@version}.
% \end{itemize}
%    \begin{macrocode}
       \thesis@require{hyperref}
       \hypersetup{
         unicode=true,
         pdfencoding=auto,
         pdftitle=\thesis@title,
         pdfauthor=\thesis@author,
         pdfkeywords=\thesis@keywords,
         pdfcreator=\thesis@version}
%    \end{macrocode}
% If autolayout is enabled, the |\thesis@preamble| and
% |\thesis@postamble| macros are scheduled for expansion at the
% beginning and at the end of the document, respectively. The
% definition of the |\thesis@pages| macro is also scheduled to be
% written to the auxiliary file at the end of the document.
% \changes{v0.3.50}{2018/03/25}{Make writes immediate, so that they
%   do not get lost when they occur at an empty page. [VN]}
%    \begin{macrocode}
      \ifthesis@auto
        \AtBeginDocument{\thesis@preamble}
        \AtEndDocument{%
          \thesis@postamble
          \immediate\write\@auxout{%
            \noexpand\gdef\noexpand\thesis@pages{\thepage}}}
      \else
        \AtEndDocument{%
          \immediate\write\@auxout{%
            \noexpand\gdef\noexpand\thesis@pages{\thepage}}}
      \fi
    \makeatother
  \fi}
%    \end{macrocode}
% \end{macro}
% \section{Private API}
% \subsection{File manipulation macros}\label{sec:reflection}
% \begin{macro}{\thesis@exists}
% The |\thesis@exists|\marg{file}\marg{tokens} macro is
% used to test for the existence of a given \textit{file}. If the
% \textit{file} exists, the macro expands to \textit{tokens}.
% Otherwise, a class warning is written to the output.
%    \begin{macrocode}
\def\thesis@exists#1#2{%
  \IfFileExists{#1}{#2}{%
  \ClassWarning{fithesis4}{File #1 doesn't exist}}}
%    \end{macrocode}
% \end{macro}\begin{macro}{\thesis@input}
% The |\thesis@input|\marg{file} macro inputs the given
% \textit{file}, if it exists.
%    \begin{macrocode}
\def\thesis@input#1{%
  \thesis@exists{#1}{\input{#1}}}
%    \end{macrocode}
% \end{macro}\begin{macro}{\thesis@require}
% The |\thesis@require|\oarg{options}\marg{package} expands to
% |\RequirePackage|\oarg{options}\marg{package}, if the specified
% \textit{package} has not yet been loaded.
%    \begin{macrocode}
\newcommand\thesis@require[2][]{%
  \@ifpackageloaded{#2}{}{\RequirePackage[#1]{#2}}}
%    \end{macrocode}
% \end{macro}\begin{macro}{\thesis@requireIfExists}
% The |\thesis@requireIfExists|\oarg{options}\marg{package} expands
% to |\thesis@require|\oarg{options}\marg{package}, if the
% specified \textit{package} exists and has not yet been loaded.
%    \begin{macrocode}
\newcommand\thesis@requireIfExists[2][]{%
  \thesis@exists{#2.sty}{\thesis@require[#1]{#2}}}
%    \end{macrocode}
% \end{macro}\begin{macro}{\thesis@requireStyle}
% If inheritance is enabled for style files, then the
% |\thesis@requireStyle|\marg{style} macro sequentially
% loads each of the following files, provided they exist:
% \changes{v1.0.0}{2021/02/21}{Files were renamed after
%   breaking changes in package loading after PR 438 in \LaTeXe. [VN]}
% \begin{enumerate}
%   \item|\thesis@stylepath fithesis-base.sty|
%   \item|\thesis@stylepath\thesis@university/fithesis-\thesis@university-base.sty|
%   \item|\thesis@stylepath| \textit{style}|.sty|
% \end{enumerate}If inheritance is disabled for style files, then
% only the last listed file is loaded. The \texttt{fithesis-}
% prefix serves to prevent package clashes with other similarly
% named package files within the \TeX\ directory structure.
%    \begin{macrocode}
\def\thesis@requireStyle#1{%
  \ifthesis@style@inheritance
    \thesis@requireIfExists{\thesis@stylepath fithesis-base}%
    \thesis@requireIfExists{\thesis@stylepath\thesis@university
      /fithesis-\thesis@university-base}
  \fi
  \thesis@requireIfExists{\thesis@stylepath#1}}
%    \end{macrocode}
% \end{macro}\begin{macro}{\thesis@requireLocale}
% If inheritance is enabled for style files, then the
% |\thesis@requireLocale|\marg{locale} macro sequentially
% loads each of the following locale files, provided they exist:
% \begin{enumerate}
%   \item|\thesis@localepath fithesis-|\textit{locale}|.def|
%   \item|\thesis@localepath\thesis@university/fithesis-|^^A
%     \textit{locale}|.def|
%   \item|\thesis@localepath\thesis@university/\thesis@faculty/|^^A
%     |fithesis-|\textit{locale}|.def|
% \end{enumerate} If inheritance is disabled for locale files, then
% only the first listed file is loaded. The \texttt{fithesis-}
% prefix serves to prevent clashes with other similarly named files
% within the \TeX\ directory structure. To prevent undesirable side
% effects from locale files being loaded multiple times, the
% |\thesis@|\textit{locale}|@required| macro is defined as a flag,
% which prevents future invocations with the same \textit{locale}.
% The macro can be used within both locale and style files,
% although the usage within locale files is strongly discouraged to
% prevent circular dependencies.
%
% If the \textsf{polyglossia} package is being used, its
% definitions for the respective locale get loaded as well. As a
% consequence, this command may not be used within the document,
% but only in the preamble.
%    \begin{macrocode}
\def\thesis@requireLocale#1{%
  % Ignore redundant requests
  \expandafter\ifx\csname thesis@#1@required\endcsname\relax
    \expandafter\def\csname thesis@#1@required\endcsname{}%
    \@ifpackageloaded{polyglossia}{\setotherlanguage{#1}}{}
    \thesis@input{\thesis@localepath fithesis-#1.def}%
    \ifthesis@locale@inheritance
      \thesis@input{\thesis@localepath\thesis@university/%
        fithesis-#1.def}%
      \thesis@input{\thesis@localepath\thesis@university/%
        \thesis@faculty/fithesis-#1.def}%
    \fi
  \fi}
%    \end{macrocode}\end{macro}
% \subsection{String manipulation macros}
% \begin{macro}{\thesis@}
% The |\thesis@|\marg{name} macro expands to |\thesis@|^^A
% \textit{name}, where \textit{name} gets fully expanded and can
% therefore contain active characters and command sequences.
%    \begin{macrocode}
\def\thesis@#1{\csname thesis@#1\endcsname}
%    \end{macrocode}
% \end{macro}\begin{macro}{\thesis@@}
% The |\thesis@@|\marg{name} macro expands to |\thesis@|^^A
% \textit{locale}|@|\textit{name}, where \textit{locale}
% corresponds to the name of the current locale.  The \textit{name}
% gets fully expanded and can therefore contain active characters
% and command sequences.
%    \begin{macrocode}
\def\thesis@@#1{\thesis@{\thesis@locale @#1}}
%    \end{macrocode}
% \end{macro}
% The \DescribeMacro{\thesis@lower}|\thesis@lower|
% and \DescribeMacro{\thesis@upper}|\thesis@upper|
% macros are used for upper- and lowercasing within
% locale files. To cast the |\thesis@|\textit{name} macro
% to the lower- or uppercase, |\thesis@lower{|\textit{name}|}| or
% |\thesis@upper{|\textit{name}|}| would be used, respectively.
% The \textit{name} gets fully expanded and can therefore contain
% active characters and command sequences.
%    \begin{macrocode}
\def\thesis@lower#1{{%
  \let\ea\expandafter
  \ea\MakeLowercase\ea{\csname thesis@#1\endcsname}}}
\def\thesis@upper#1{{%
  \let\ea\expandafter
  \ea\MakeUppercase\ea{\csname thesis@#1\endcsname}}}
%    \end{macrocode}
% The \DescribeMacro{\thesis@@lower}|\thesis@@lower|
% and \DescribeMacro{\thesis@@upper}|\thesis@@upper|
% macros are used for upper- and lowercasing current
% \textit{locale} strings within style files. To cast the
% |\thesis@|\textit{locale}|@|\textit{name} macro to the
% lower- or uppercase, |\thesis@@lower{|\textit{name}|}| or
% |\thesis@@upper{|\textit{name}|}| would be used,
% respectively. The \textit{name} gets fully expanded and can
% therefore contain active characters and command sequences.
%    \begin{macrocode}
\def\thesis@@lower#1{\thesis@lower{\thesis@locale @#1}}
\def\thesis@@upper#1{\thesis@upper{\thesis@locale @#1}}
%    \end{macrocode}
% The \DescribeMacro{\thesis@head}|\thesis@head|
% and \DescribeMacro{\thesis@tail}|\thesis@tail|
% macros are used for retrieving the head or the tail of
% space-separated token sequences that end with |\relax|.
%    \begin{macrocode}
\def\thesis@head#1 #2{%
  \ifx\relax#2%
    \expandafter\@gobbletwo
  \else
    \ #1%
  \fi
  \thesis@head#2}%
\def\thesis@tail#1 #2{%
  \ifx\relax#2%
    #1%
    \expandafter\@gobbletwo
  \fi
  \thesis@tail#2}%
%    \end{macrocode}
% \subsection{General purpose macros}
% The \DescribeMacro{\thesis@pages}|\thesis@pages| macro contains
% the last page number within the document. During the first \TeX\
% compilation, the macro expands to \texttt{??}.
%    \begin{macrocode}
\ifx\thesis@pages\undefined\def\thesis@pages{??}\fi
%    \end{macrocode}
% \DescribeMacro{\thesis@selectLocale}|\thesis@selectLocale|\marg{locale}
% macro redefines the |\thesis@locale| macro to \textit{locale},
% switches to the hyphenation patterns of \textit{locale}, and
% starts using the |\thesis@|\textit{locale}|@csquotesStyle| style
% of the \textsf{csquotes} package. The respective locale files and
% polyglossia locale definitions should be loaded beforehand using
% the |\thesis@requireLocale| macro.
%
% This macro should always be used within a group, so that the
% locale, \textsf{csquotes}, and hyphenation settings return back to
% what the user has specified after the localized blocks of
% typographic material.
%    \begin{macrocode}
\def\thesis@selectLocale#1{%
  \edef\thesis@locale{#1}%
  \ltx@ifpackageloaded{csquotes}{%
    \csq@setstyle{\thesis@@{csquotesStyle}}%
  }{}%
  \ltx@ifpackageloaded{polyglossia}{%
    \selectlanguage{\thesis@locale}
  }{%
    \language\csname l@\thesis@locale\endcsname
  }}
%    \end{macrocode}
% \begin{macro}{\thesis@patch}
% The |\thesis@patch|\marg{versions}\marg{patch} macro expands
% \textit{patch}, if |\thesis@version|\texttt{\discretionary{@}^^A
% {@}{@}}|number| (defined at the top of the file
% \texttt{fithesis4.cls}) matches any of the comma-delimited
% \textit{versions}. This macro enables the simple deployment of
% version-targeted patches.
%    \begin{macrocode}
\def\thesis@patch#1#2{%
  \def\thesis@patch@versions{#1}%
  \def\thesis@patch@action{#2}%
  \def\thesis@patch@next##1,{%
    \def\thesis@patch@arg{##1}%
    \def\thesis@patch@relax{\relax}%
    \ifx\thesis@patch@arg\thesis@version@number
      \def\thesis@patch@next####1\relax,{}%
      \expandafter\thesis@patch@action
      \expandafter\thesis@patch@next
    \else\ifx\thesis@patch@arg\thesis@patch@relax\else
      \expandafter\expandafter\expandafter\thesis@patch@next
    \fi\fi}%
  \expandafter\expandafter\expandafter\thesis@patch@next
  \expandafter\thesis@patch@versions\expandafter,\relax,}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\thesis@xpatch}
% \changes{v1.0.0}{2021/04/30}{Added \cs{thesis@xpatch} command. [TV]}
% The |\thesis@xpatch|\marg{command}\marg{search}\marg{replace} macro
% is used to to replace \textit{search} with \textit{replace} in the definition
% of \textit{command}. If the replacement fails, a class error is written to
% the output.
%    \begin{macrocode}
\long\def\thesis@xpatch#1#2#3{%
  \xpatchcmd{#1}{#2}{#3}{}%
    {\ClassError{fithesis4}{%
       Command \string#1 does not contain the searched text}{}}}
%    \end{macrocode}
% \end{macro}
% \iffalse
%</class>
% ^^A Old fithesis classes
%<*oldclass1>

\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{oldfithesis1}[2015/03/04 old fithesis will load fithesis2 MU thesis class]

\ClassWarning{oldfithesis1}{%
  You are using the fithesis class, which has been deprecated.
  The fithesis2 class will be used instead.
  For more information, see <http://www.fi.muni.cz/tech/unix/tex/fithesis.xhtml>%
}\LoadClass{fithesis2}

%</oldclass1>
%
%<*oldclass2>

\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{oldfithesis2}[2015/03/04 old fithesis2 will load fithesis3 MU thesis class]

\ClassWarning{oldfithesis2}{%
  You are using the fithesis2 class, which has been deprecated.
  The fithesis3 class will be used instead.
  For more information, see <http://www.fi.muni.cz/tech/unix/tex/fithesis.xhtml>%
}\LoadClass{fithesis3}

%</oldclass2>
%
%<*oldclass3>

\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{oldfithesis3}[2018/11/17 old fithesis3 will load fithesis4 MU thesis class]

\ClassWarning{oldfithesis3}{%
  You are using the fithesis3 class, which has been deprecated.
  The fithesis4 class will be used instead.
  For more information, see <http://www.fi.muni.cz/tech/unix/tex/fithesis.xhtml>%
}\LoadClass{fithesis4}

%</oldclass3>
% \fi
%
% \subsection{Locale files}
% \label{sec:locale-files}
% Locale files contain macro definitions for various locales. They
% live in the \texttt{locale/} subtree and they are loaded during
% the main routine (see Section \ref{sec:thesisload}).
%
% When creating a new locale file, it is advisable to create one
% self-contained \texttt{dtx} file, which is then partitioned into
% locale files via the \textsf{docstrip} tool based on the
% respective \texttt{ins} file. A \DescribeMacro{\file} macro
% |\file|\marg{filename} is available for the sectioning of the
% documentation of various files within the \texttt{dtx} file.  For
% more information about \texttt{dtx} files and the
% \textsf{docstrip} tool, consult the \textsf{dtxtut, docstrip,
% doc} and \textsf{ltxdoc} manuals.
%
% Mind that the name of the locale is also used to load hyphenation
% patterns, which is why it shouldn't be arbitrary. To see the
% names of the hyphenation patterns, consult the \textsf{hyph-utf8}
% manual.
%
% \subsubsection{Interface}
% The union of locale files loaded via the locale file inheritance
% scheme (see the definition of the |\thesis@requireLocale| macro
% in Section \ref{sec:reflection}) needs to globally define the
% following macros:
% \begin{itemize}
%   \item|\thesis@|\textit{locale}|@csquotesStyle| -- The name of
%     the style of the \textsf{csquotes} package that matches this
%     locale
%   \item|\thesis@|\textit{locale}|@universityName| -- The name of
%     the university
%   \item|\thesis@|\textit{locale}|@facultyName| -- The name of the
%     faculty
%   \item|\thesis@|\textit{locale}|@assignment| -- The instructions
%   to replace the current page with the official thesis assignment
%   \item|\thesis@|\textit{locale}|@declaration| -- The thesis
%     declaration text
%   \item|\thesis@|\textit{locale}|@fieldTitle| -- The title of
%     the field of study entry
%   \item|\thesis@|\textit{locale}|@advisorTitle| -- The title of
%     the advisor entry
%   \item|\thesis@|\textit{locale}|@authorTitle| -- The title of
%     the author entry
%   \item|\thesis@|\textit{locale}|@abstractTitle| -- The title of
%     the abstract section
%   \item|\thesis@|\textit{locale}|@keywordsTitle| -- The title of
%     the keywords section
%   \item|\thesis@|\textit{locale}|@thanksTitle| -- The title of
%     the acknowledgements section
%   \item|\thesis@|\textit{locale}|@declarationTitle| -- The title
%     of the declaration section
%   \item|\thesis@|\textit{locale}|@idTitle| -- The title of the
%     thesis author's identifier field
%   \item|\thesis@|\textit{locale}|@spring| -- The name of the
%     spring semester
%   \item|\thesis@|\textit{locale}|@fall| -- The name of the
%     fall semester
%   \item|\thesis@|\textit{locale}|@semester| -- The full name of
%     the current semester
%   \item|\thesis@|\textit{locale}|@typeName| -- The name of the
%     thesis type
% \changes{v0.3.46}{2017/06/02}{Lifted the \texttt{authorSignature}
%   and \texttt{formattedDate} strings to the global locale file
%   interface. [VN]}
%   \item|\thesis@|\textit{locale}|@authorSignature| -- The label
%     of the author's signature field
%   \item|\thesis@|\textit{locale}|@formattedDate| -- A formatted
%     date
% \changes{v1.0.0}{2021/02/26}{Lifted the \texttt{advisorSignature}
%   string to the global locale file interface. [VN]}
%   \item|\thesis@|\textit{locale}|@advisorSignature| -- The label
%     of the author's signature field
% \end{itemize} where \textit{locale} is the name of the locale.
%
% \def\file#1{\paragraph{The \texttt{#1} file}}
% \subsubsection{English locale files}
% \input{locale/english.dtx}
% \subsubsection{Czech locale files}
% \input{locale/czech.dtx}
% \subsubsection{Slovak locale files}
% \input{locale/slovak.dtx}
%
% \subsection{Style files}
% \label{sec:style-files}
% Style files define the structure and the look of the resulting
% document. They live in the \texttt{style/} subtree and they are
% loaded during the main routine (see Section
% \ref{sec:thesisload}).
%
% When creating a new style file, it is advisable to create one
% self-contained \texttt{dtx} file, which can contain several
% files to be extracted via the \textsf{docstrip} tool based on the
% respective \texttt{ins} file. A \DescribeMacro{\file} macro
% |\file|\marg{filename} is available for the sectioning of the
% documentation of various files within the \texttt{dtx} file.
% For more information about \texttt{dtx} files and the
% \textsf{docstrip} tool, consult the \textsf{dtxtut, docstrip,
% doc} and \textsf{ltxdoc} manuals.
%
% \subsubsection{Interface}
% The union of style files loaded via the style file inheritance
% scheme (see the definition of the |\thesis@requireStyle| macro in
% Section \ref{sec:reflection}) should globally define at least one
% of the following macros:
% \begin{itemize}
%   \item\DescribeMacro{\thesis@blocks@preamble}^^A
%     |\thesis@blocks@preamble| -- If autolayout is enabled, then
%     this macro is expanded at the very beginning of the document.
%   \item\DescribeMacro{\thesis@blocks@postamble}^^A
%     |\thesis@blocks@postamble| -- If autolayout is enabled, then
%     this macro is expanded at the very end of the document.
%   \item\DescribeMacro{\thesis@blocks@mainMatter}^^A
%     |\thesis@blocks@mainMatter| -- If autolayout is enabled, then
%     this macro is expanded at the beginning of the document right
%     after |\thesis@blocks@preamble|. This macro sets the style of
%     the main matter of the thesis.
% \end{itemize}
%
% \subsubsection{Base style files}
% \input{style/base.dtx}
% \input{style/mu/base.dtx}
% \subsubsection{The style files of the Faculty of Informatics}
% \input{style/mu/fi.dtx}
% \subsubsection{The style files of the Faculty of Science}
% \input{style/mu/sci.dtx}
% \subsubsection{The style files of the Faculty of Arts}
% \input{style/mu/phil.dtx}
% \subsubsection{The style files of the Faculty of Education}
% \input{style/mu/ped.dtx}
% \subsubsection{The style files of the Faculty of Social Studies}
% \input{style/mu/fss.dtx}
% \subsubsection{The style files of the Faculty of Law}
% \input{style/mu/law.dtx}
% \subsubsection{The style files of the Faculty of Economics and
%   Administration}
% \input{style/mu/econ.dtx}
% \subsubsection{The style files of the Faculty of Medicine}
% \input{style/mu/med.dtx}
% \subsubsection{The style files of the Faculty of Sports Studies}
% \input{style/mu/fsps.dtx}
% \subsubsection{The style files of the Faculty of Pharmacy}
% \input{style/mu/pharm.dtx}