From c9f6f47f9c1b712e2de1704d8c9785a23dbee543 Mon Sep 17 00:00:00 2001
From: witiko <witiko@gmail.com>
Date: Sun, 3 May 2015 23:36:04 +0200
Subject: [PATCH] Added the user guide.

---
 Makefile                                |   2 +-
 fithesis3/Makefile                      |  80 +++---
 fithesis3/fithesis.dtx                  |  83 +++---
 fithesis3/guide/mu/Makefile             |  25 ++
 fithesis3/guide/mu/examples/01.tex      |   4 +
 fithesis3/guide/mu/examples/02.tex      |   9 +
 fithesis3/guide/mu/examples/Makefile    |  17 ++
 fithesis3/guide/mu/examples/econ-01.tex |   3 +
 fithesis3/guide/mu/examples/fi-01.tex   |   3 +
 fithesis3/guide/mu/examples/fsps-01.tex |   3 +
 fithesis3/guide/mu/examples/fss-01.tex  |   3 +
 fithesis3/guide/mu/examples/law-01.tex  |   3 +
 fithesis3/guide/mu/examples/med-01.tex  |   3 +
 fithesis3/guide/mu/examples/ped-01.tex  |   3 +
 fithesis3/guide/mu/examples/phil-01.tex |   3 +
 fithesis3/guide/mu/examples/sci-01.tex  |   3 +
 fithesis3/guide/mu/guide.bib            |  53 ++++
 fithesis3/guide/mu/guide.tex            | 363 ++++++++++++++++++++++++
 fithesis3/locale/czech.dtx              |  13 +-
 fithesis3/locale/english.dtx            |   9 +-
 fithesis3/locale/slovak.dtx             |  11 +-
 fithesis3/style/Makefile                |   1 -
 fithesis3/style/mu/Makefile             |   1 -
 fithesis3/style/mu/base.dtx             |  40 ++-
 fithesis3/style/mu/econ.dtx             |  18 +-
 fithesis3/style/mu/fi.dtx               |   5 +-
 fithesis3/style/mu/fss.dtx              |   9 +-
 fithesis3/style/mu/law.dtx              |  36 ++-
 fithesis3/style/mu/med.dtx              |  13 +-
 fithesis3/style/mu/ped.dtx              |   9 +-
 fithesis3/style/mu/sci.dtx              |  19 +-
 fithesis3/test/Makefile                 |   6 +-
 fithesis3/test/base-10pt.tex            |   4 -
 fithesis3/test/base-11pt.tex            |   4 -
 fithesis3/test/base-12pt.tex            |   4 -
 fithesis3/test/base-utf8.tex            |   4 -
 fithesis3/test/econ-czech.tex           |   1 -
 fithesis3/test/econ-english.tex         |   1 -
 fithesis3/test/econ-slovak.tex          |   1 -
 fithesis3/test/fi-color.tex             |   4 -
 fithesis3/test/fi-czech.tex             |   1 -
 fithesis3/test/fi-english.tex           |   1 -
 fithesis3/test/fi-female.tex            |   4 -
 fithesis3/test/fi-male.tex              |   4 -
 fithesis3/test/fi-rigorous.tex          |   4 -
 fithesis3/test/fi-slovak.tex            |   1 -
 fithesis3/test/fsps-czech.tex           |   1 -
 fithesis3/test/fsps-english.tex         |   1 -
 fithesis3/test/fsps-slovak.tex          |   1 -
 fithesis3/test/fss-czech.tex            |   1 -
 fithesis3/test/fss-english.tex          |   1 -
 fithesis3/test/fss-slovak.tex           |   1 -
 fithesis3/test/law-czech.tex            |   1 -
 fithesis3/test/law-english.tex          |   1 -
 fithesis3/test/law-slovak.tex           |   1 -
 fithesis3/test/med-czech.tex            |   1 -
 fithesis3/test/med-english.tex          |   1 -
 fithesis3/test/med-slovak.tex           |   1 -
 fithesis3/test/ped-czech.tex            |   1 -
 fithesis3/test/ped-english.tex          |   1 -
 fithesis3/test/ped-slovak.tex           |   1 -
 fithesis3/test/phil-czech.tex           |   1 -
 fithesis3/test/phil-english.tex         |   1 -
 fithesis3/test/phil-slovak.tex          |   1 -
 fithesis3/test/sci-color.tex            |   4 -
 fithesis3/test/sci-czech.tex            |   1 -
 fithesis3/test/sci-english.tex          |   1 -
 fithesis3/test/sci-female.tex           |   1 -
 fithesis3/test/sci-male.tex             |   1 -
 fithesis3/test/sci-rigorous.tex         |   1 -
 fithesis3/test/sci-slovak.tex           |   1 -
 fithesis3/test/texput.log               |  21 ++
 pdflatex.tex                            |   2 +-
 xelatex.tex                             |   1 +
 74 files changed, 718 insertions(+), 225 deletions(-)
 create mode 100644 fithesis3/guide/mu/Makefile
 create mode 100644 fithesis3/guide/mu/examples/01.tex
 create mode 100644 fithesis3/guide/mu/examples/02.tex
 create mode 100644 fithesis3/guide/mu/examples/Makefile
 create mode 100644 fithesis3/guide/mu/examples/econ-01.tex
 create mode 100644 fithesis3/guide/mu/examples/fi-01.tex
 create mode 100644 fithesis3/guide/mu/examples/fsps-01.tex
 create mode 100644 fithesis3/guide/mu/examples/fss-01.tex
 create mode 100644 fithesis3/guide/mu/examples/law-01.tex
 create mode 100644 fithesis3/guide/mu/examples/med-01.tex
 create mode 100644 fithesis3/guide/mu/examples/ped-01.tex
 create mode 100644 fithesis3/guide/mu/examples/phil-01.tex
 create mode 100644 fithesis3/guide/mu/examples/sci-01.tex
 create mode 100644 fithesis3/guide/mu/guide.bib
 create mode 100644 fithesis3/guide/mu/guide.tex
 create mode 100644 fithesis3/test/texput.log

diff --git a/Makefile b/Makefile
index 2ec232f..6e86103 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,6 @@
 .PHONY: all clear
 all:
-	cd fithesis3 && make
+	make -C fithesis3
 	make pdflatex.pdf xelatex.pdf clear
 
 # This target typesets the pdfLaTeX example.
diff --git a/fithesis3/Makefile b/fithesis3/Makefile
index f588146..3b52115 100644
--- a/fithesis3/Makefile
+++ b/fithesis3/Makefile
@@ -1,50 +1,63 @@
-.PHONY: all clean dist dist-clean explode implode install uninstall test
+SUBMAKES_REQUIRED=logo/mu logo/mu/color locale style style/mu
+SUBMAKES_MISCELLANEOUS=guide/mu
+SUBMAKES=$(SUBMAKES_REQUIRED) $(SUBMAKES_MISCELLANEOUS)
+.PHONY: all complete clean dist dist-implode implode install uninstall test $(SUBMAKES_REQUIRED)
 
-SUBMAKEFILES=logo/mu logo/mu/color locale style style/mu
 CLASSFILES=fithesis.cls fithesis2.cls fithesis3.cls
 STYLEFILES=style/*.sty style/*/*.sty style/*/*.clo
 LOGOFILES=logo/*/*.eps logo/*/color/*.eps logo/*/*.pdf logo/*/color/*.pdf
 LOCALEFILES=locale/*.def locale/*/*.def locale/*/*/*.def
 DTXFILES=*.dtx locale/*.dtx style/*.dtx style/*/*.dtx
 INSFILES=*.ins locale/*.ins style/*.ins style/*/*.ins
-MAKEFILES=Makefile */Makefile */*/Makefile */*/*/Makefile ../Makefile
+MAKES=../Makefile Makefile */Makefile */*/Makefile */*/*/Makefile
 READMES=../README
-MISCELLANEOUS=$(READMES) ../example.tex
+MISCELLANEOUS=$(READMES) ../*.tex guide/*/*.tex guide/*/*/*.tex guide/*/*.bib
 RESOURCES=$(STYLEFILES) $(LOGOFILES) $(LOCALEFILES)
 SOURCEFILES=$(DTXFILES) $(INSFILES) docstrip.cfg
 AUXFILES=fithesis.aux fithesis.log fithesis.toc fithesis.ind fithesis.idx fithesis.out fithesis.ilg fithesis.gls fithesis.glo fithesis.hd
 MANUAL=fithesis.pdf
 PDFSOURCES=fithesis.dtx
-PDFFILES=$(MANUAL)
+GUIDES=guide/mu/econ.pdf guide/mu/fi.pdf guide/mu/fsps.pdf guide/mu/fss.pdf guide/mu/law.pdf guide/mu/med.pdf guide/mu/ped.pdf guide/mu/phil.pdf guide/mu/sci.pdf
+PDFFILES=$(MANUAL) $(GUIDES)
 TDSFILE=fithesis3.tds.zip
+CTANFILE=fithesis3.ctan.zip
 DISTFILE=fithesis3.zip
+DISTFILES=$(TDSFILE) $(CTANFILE) $(DISTFILE)
 LATEXFILES=$(CLASSFILES) $(RESOURCES)
 TEXLIVEDIR=$(shell kpsewhich -var-value TEXMFLOCAL)
 
-# This pseudo-target creates the class files, typesets the
-# technical documentation, makes the style and locale files
-# and removes any auxiliary files.
-all:
-	for dir in $(SUBMAKEFILES); do make all -C "$$dir"; done
-	make explode clean
+# This pseudo-target expands all the docstrip
+# files, converts the logos and creates the
+# class files.
+all: $(SUBMAKES_REQUIRED)
+	make $(CLASSFILES)
 
-# This pseudo-target creates the class files and typesets
-# the technical documentation.
-explode: fithesis3.cls $(PDFFILES)
+# This pseudo-target creates the class files
+# and typesets the technical documentation and
+# the guides.
+complete: all
+	make $(PDFFILES) clean
+
+# This pseudo-target calls a submakefile
+$(SUBMAKES_REQUIRED):
+	make -C $@ all
 
 # This pseudo-target performs the unit tests
 test: all
-	cd test; make
+	make -C test
 
 # This pseudo-target creates the distribution archive.
-dist: all
+dist: complete
 	make $(TDSFILE) $(DISTFILE)
-	rm $(TDSFILE)
 
 # This target creates the class files.
-fithesis3.cls: fithesis.ins fithesis.dtx
+$(CLASSFILES): fithesis.ins fithesis.dtx
 	tex $<
 
+# This target typesets the guide.
+$(GUIDES): $(CLASSFILES) $(RESOURCES)
+	make -BC $(dir $@)
+
 # This target typesets the technical documentation.
 fithesis.pdf: $(DTXFILES)
 	pdflatex $<
@@ -57,16 +70,19 @@ fithesis.pdf: $(DTXFILES)
 $(TDSFILE): $(LATEXFILES) $(SOURCEFILES) $(PDFFILES) $(PDFSOURCES)
 	DIR=`mktemp -d` && \
 	make install to="$$DIR" nohash=true && \
-  (cd "$$DIR" && zip -r -v -nw $@ *) && \
+	(cd "$$DIR" && zip -r -v -nw $@ *) && \
 	mv "$$DIR"/$@ $@ && rm -rf "$$DIR"
 
 # This target generates a distribution file
-$(DISTFILE): $(LATEXFILES) $(SOURCEFILES) $(MAKEFILES) $(PDFFILES) $(PDFSOURCES) $(MISCELLANEOUS)
+$(DISTFILE): $(LATEXFILES) $(SOURCEFILES) $(MAKES) $(PDFFILES) $(PDFSOURCES) $(MISCELLANEOUS)
 	DIR=`mktemp -d` && mkdir --parents "$$DIR/fithesis3/fithesis3" && \
 	cp --verbose $(TDSFILE) "$$DIR" && \
+	cp --verbose $(TDSFILE) "$$DIR"/fithesis3/fithesis3 && \
 	cp --parents --verbose $^ "$$DIR/fithesis3/fithesis3" && \
-  (cd "$$DIR" && zip -r -v -nw $@ *) && \
-	mv "$$DIR"/$@ $@ && rm -rf "$$DIR"
+	(cd "$$DIR" && zip -r -v -nw $(CTANFILE) *) && \
+	(cd "$$DIR"/fithesis3 && zip -r -v -nw $(DISTFILE) *) && \
+	mv "$$DIR"/$(CTANFILE) . && \
+	mv "$$DIR"/fithesis3/$(DISTFILE) . && rm -rf "$$DIR"
 
 # This pseudo-target installs the class files and
 # the technical documentation into the TeX directory
@@ -75,8 +91,8 @@ $(DISTFILE): $(LATEXFILES) $(SOURCEFILES) $(MAKEFILES) $(PDFFILES) $(PDFSOURCES)
 # to forgo the reindexing of the package database.
 install:
 	@if [ -z "$(to)" ]; then \
-	  printf "Usage: make install to=DIRECTORY\nDetected TeXLive directory: %s\n" $(TEXLIVEDIR); \
-	  exit 1; \
+		printf "Usage: make install to=DIRECTORY\nDetected TeXLive directory: %s\n" $(TEXLIVEDIR); \
+		exit 1; \
 	fi
 	
 	# Class, locale, style and logo files
@@ -90,7 +106,7 @@ install:
 	# Documentation
 	mkdir --parents "$(to)/doc/latex/fithesis3"
 	cp $(MANUAL) "$(to)/doc/latex/fithesis3/manual.pdf"
-
+	
 	# Rebuild the hash
 	[ "$(nohash)" = "true" ] || texhash
 
@@ -101,8 +117,8 @@ install:
 # to forgo the reindexing of the package database.
 uninstall:
 	@if [ -z "$(from)" ]; then \
-	  printf "Usage: make uninstall from=DIRECTORY\nDetected TeXLive directory: %s\n" $(TEXLIVEDIR); \
-	  exit 1; \
+		printf "Usage: make uninstall from=DIRECTORY\nDetected TeXLive directory: %s\n" $(TEXLIVEDIR); \
+		exit 1; \
 	fi
 	
 	# Class, locale, style and logo files
@@ -114,7 +130,7 @@ uninstall:
 	# Documentation
 	rm "$(from)/doc/latex/fithesis3/manual.pdf"
 	rmdir "$(from)/doc/latex/fithesis3/"
-
+	
 	# Rebuild the hash
 	[ "$(nohash)" = "true" ] || texhash
 
@@ -123,10 +139,10 @@ clean:
 	rm -f $(AUXFILES)
 
 # This pseudo-target removes the distribution archives.
-dist-clean:
-	rm -f $(DISTFILE)
+dist-implode:
+	rm -f $(DISTFILES)
 
 # This pseudo-target removes any makeable files.
-implode: clean dist-clean
+implode: clean dist-implode
 	rm -f $(PDFFILES) $(CLASSFILES)
-	for dir in $(SUBMAKEFILES); do make implode -C "$$dir"; done
+	for dir in $(SUBMAKES); do make implode -C "$$dir"; done
diff --git a/fithesis3/fithesis.dtx b/fithesis3/fithesis.dtx
index 24a4322..2ae4b18 100644
--- a/fithesis3/fithesis.dtx
+++ b/fithesis3/fithesis.dtx
@@ -169,7 +169,18 @@
 %
 % \section{Required classes and packages}
 % The class loads the \texttt{rapport3} base class and the
-% \textsf{xstring}, \textsf{keyval}% and \textsf{etoolbox} packages
+% 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.
+%   \item\textsf{ifxetex} -- Used to detect the \Hologo{XeTeX}
+%     engine.
+%   \item\textsf{inputenc} -- Used to enable the input utf-8
+%     encoding. This package does not get loaded under
+%     \Hologo{XeTeX}.
+% \end{itemize}
+% , % and  packages
 % for string parsing and comparisons.
 % The \texttt{hyperref} package is also conditionally loaded during
 % the expansion of the |\thesis@load| macro (see section
@@ -181,6 +192,10 @@
 \RequirePackage{xstring}
 \RequirePackage{keyval}
 \RequirePackage{etoolbox}
+\RequirePackage{ifxetex}
+\ifxetex\else
+  \RequirePackage[utf8]{inputenc}
+\fi
 %    \end{macrocode}
 % \section{Public API}
 % \label{sec:public-api}
@@ -238,7 +253,7 @@
 %    \begin{macrocode}
 \def\thesis@logopath{\thesis@basepath logo/\thesis@university/}
 \define@key{thesis}{logopath}{%
-  \def\thesis@logopath{\thesis@subdir{#1}}}
+  \def\thesis@logopath{\thesis@subdir#1\relax}}
 %    \end{macrocode}
 % \end{macro}
 % \begin{macro}{\thesis@subdir}
@@ -247,16 +262,14 @@
 % token of |#1| isn't a slash character (|/|), or to |#1|
 % otherwise.
 %    \begin{macrocode}
-\def\thesis@subdir#1{%
+\def\thesis@subdir#1#2\relax{%
   \ifx\@empty#1\@empty%
     \thesis@basepath%
   \else%
-    \def\@slash{/}%
-    \StrLeft{#1}{1}[\@fst]%
-    \ifx\@fst\@slash%
-      #1/%
+    \if#1/%
+      #1#2/%
     \else%
-      \thesis@basepath#1/%
+      \thesis@basepath#1#2/%
     \fi%
   \fi}
 %    \end{macrocode}
@@ -274,7 +287,23 @@
 %    \begin{macrocode}
 \def\thesis@stylepath{\thesis@basepath style/}
 \define@key{thesis}{stylepath}{%
-  \def\thesis@stylepath{\thesis@subdir{#1}}}
+  \def\thesis@stylepath{\thesis@subdir#1\relax}}
+%    \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. If the \textit{path} doesn't begin
+% with a slash (\texttt{/}), it is normalized to
+% \cmd{/thesis@basepath} followed by \textit{path}. The
+% normalized \textit{path} is stored within the private
+% |\thesis@localepath| macro,
+% whose implicit value is |\thesis@basepath| followed by |locale/|.
+% By default, this expands to \texttt{fithesis3/locale/}.
+%    \begin{macrocode}
+\def\thesis@localepath{\thesis@basepath locale/}
+\define@key{thesis}{localepath}{%
+  \def\thesis@localepath{\thesis@subdir#1\relax}}
 %    \end{macrocode}
 % \end{macro}
 % \begin{macro}{\thesis@def}
@@ -302,22 +331,6 @@
   \long\def\thesis@declaration{#1}}
 %    \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. If the \textit{path} doesn't begin
-% with a slash (\texttt{/}), it is normalized to
-% \cmd{/thesis@basepath} followed by \textit{path}. The
-% normalized \textit{path} is stored within the private
-% |\thesis@localepath| macro,
-% whose implicit value is |\thesis@basepath| followed by |locale/|.
-% By default, this expands to \texttt{fithesis3/locale/}.
-%    \begin{macrocode}
-\def\thesis@localepath{\thesis@basepath locale/}
-\define@key{thesis}{localepath}{%
-  \def\thesis@localepath{\thesis@subdir{#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
@@ -591,14 +604,14 @@
 % \textit{filename} is stored within the private |\thesis@locale|
 % macro, whose implicit value is the main language of either the
 % \textsf{babel} or the \textsf{polyglossia} package, or
-% \texttt{czech}, when undefined. If the inheritance is disabled
+% \texttt{english}, when undefined. If the inheritance is disabled
 % for locale files, the locale file is loaded from the
 % |\thesis@localepath\thesis@locale| path.
 %    \begin{macrocode}
 \def\thesis@locale{%
   % Babel detection
   \ifx\languagename\undefined%
-  czech\else\languagename\fi}
+  english\else\languagename\fi}
 \define@key{thesis}{locale}{%
   \def\thesis@locale{#1}}
 %    \end{macrocode}
@@ -611,16 +624,18 @@
 % \ldots |\fi| conditional is made available for testing, whether
 % or not the current locale is English.
 %    \begin{macrocode}
-\def\ifthesis@english{{
-  \let\ea\expandafter%
-  \ea\def\ea\@english\ea{\string\english}%
-  \ea\ea\ea\def\ea\ea\ea\@locale\ea\ea\ea{\ea\string\csname%
-    \thesis@locale\endcsname}%
-  \ea\csname\ea i\ea f\ifx\@locale\@english%
+\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}}
+  \fi\endcsname}
 %    \end{macrocode}
 % \end{macro}
 % \begin{macro}{\thesis@locale@inheritance}
diff --git a/fithesis3/guide/mu/Makefile b/fithesis3/guide/mu/Makefile
new file mode 100644
index 0000000..9af01af
--- /dev/null
+++ b/fithesis3/guide/mu/Makefile
@@ -0,0 +1,25 @@
+PDFFILES=fi.pdf sci.pdf ped.pdf med.pdf fss.pdf fsps.pdf phil.pdf law.pdf econ.pdf
+TEXFILES=fi.tex sci.tex ped.tex med.tex fss.tex fsps.tex phil.tex law.tex econ.tex
+TEMPLATE=guide.tex
+BIB=guide.bib
+.PHONY: all clean
+all:
+	make all -C examples
+	make $(PDFFILES) clean
+
+# This target typesets the a PDF file.
+$(PDFFILES): $(TEMPLATE) $(BIB)
+	sed s/faculty=?/faculty=$(basename $@)/ $(TEMPLATE) > $(basename $@).tex
+	pdflatex -shell-escape $(basename $@).tex
+	biber $(basename $@)
+	pdflatex -shell-escape $(basename $@).tex
+
+# This target removes any auxiliary files.
+clean:
+	rm -f $(TEXFILES) *.aux *.log *.out *.toc *.lot *.lof *.bbl *.blg *.pyg *.bcf *-blx.bib *.run.xml
+
+# This target removes any auxiliary files
+# and the output PDF files.
+implode: clean
+	make implode -C examples
+	rm -f $(PDFFILES)
diff --git a/fithesis3/guide/mu/examples/01.tex b/fithesis3/guide/mu/examples/01.tex
new file mode 100644
index 0000000..62b9a06
--- /dev/null
+++ b/fithesis3/guide/mu/examples/01.tex
@@ -0,0 +1,4 @@
+\thesissetup{basepath=../../..}
+\begin{document}
+  Hello world!
+\end{document}
diff --git a/fithesis3/guide/mu/examples/02.tex b/fithesis3/guide/mu/examples/02.tex
new file mode 100644
index 0000000..c5108db
--- /dev/null
+++ b/fithesis3/guide/mu/examples/02.tex
@@ -0,0 +1,9 @@
+\documentclass{../../../fithesis3}
+\thesissetup{
+  faculty=fi,
+  basepath=../../..,
+  autoLayout=false}
+\begin{document}
+  A document which, except for this line,
+  is completely empty.
+\end{document}
diff --git a/fithesis3/guide/mu/examples/Makefile b/fithesis3/guide/mu/examples/Makefile
new file mode 100644
index 0000000..6fd76e9
--- /dev/null
+++ b/fithesis3/guide/mu/examples/Makefile
@@ -0,0 +1,17 @@
+PDFFILES=econ-01.pdf fi-01.pdf fsps-01.pdf fss-01.pdf law-01.pdf med-01.pdf ped-01.pdf phil-01.pdf sci-01.pdf 02.pdf
+.PHONY: all clean
+all: $(PDFFILES) clean
+
+# This target typesets the a PDF file.
+%.pdf: %.tex
+	pdflatex $<
+	pdflatex $<
+
+# This target removes any auxiliary files.
+clean:
+	rm -f *.aux *.log *.out *.toc *.lot *.lof
+
+# This target removes any auxiliary files
+# and the output PDF files.
+implode: clean
+	rm -f $(PDFFILES)
diff --git a/fithesis3/guide/mu/examples/econ-01.tex b/fithesis3/guide/mu/examples/econ-01.tex
new file mode 100644
index 0000000..456d382
--- /dev/null
+++ b/fithesis3/guide/mu/examples/econ-01.tex
@@ -0,0 +1,3 @@
+\documentclass{../../../fithesis3}
+\thesissetup{faculty=econ}
+\input01
diff --git a/fithesis3/guide/mu/examples/fi-01.tex b/fithesis3/guide/mu/examples/fi-01.tex
new file mode 100644
index 0000000..6d94ca7
--- /dev/null
+++ b/fithesis3/guide/mu/examples/fi-01.tex
@@ -0,0 +1,3 @@
+\documentclass{../../../fithesis3}
+\thesissetup{faculty=fi}
+\input01
diff --git a/fithesis3/guide/mu/examples/fsps-01.tex b/fithesis3/guide/mu/examples/fsps-01.tex
new file mode 100644
index 0000000..6131041
--- /dev/null
+++ b/fithesis3/guide/mu/examples/fsps-01.tex
@@ -0,0 +1,3 @@
+\documentclass{../../../fithesis3}
+\thesissetup{faculty=fsps}
+\input01
diff --git a/fithesis3/guide/mu/examples/fss-01.tex b/fithesis3/guide/mu/examples/fss-01.tex
new file mode 100644
index 0000000..08fbf49
--- /dev/null
+++ b/fithesis3/guide/mu/examples/fss-01.tex
@@ -0,0 +1,3 @@
+\documentclass{../../../fithesis3}
+\thesissetup{faculty=fss}
+\input01
diff --git a/fithesis3/guide/mu/examples/law-01.tex b/fithesis3/guide/mu/examples/law-01.tex
new file mode 100644
index 0000000..08bb936
--- /dev/null
+++ b/fithesis3/guide/mu/examples/law-01.tex
@@ -0,0 +1,3 @@
+\documentclass{../../../fithesis3}
+\thesissetup{faculty=law}
+\input01
diff --git a/fithesis3/guide/mu/examples/med-01.tex b/fithesis3/guide/mu/examples/med-01.tex
new file mode 100644
index 0000000..743dccc
--- /dev/null
+++ b/fithesis3/guide/mu/examples/med-01.tex
@@ -0,0 +1,3 @@
+\documentclass{../../../fithesis3}
+\thesissetup{faculty=med}
+\input01
diff --git a/fithesis3/guide/mu/examples/ped-01.tex b/fithesis3/guide/mu/examples/ped-01.tex
new file mode 100644
index 0000000..a8196da
--- /dev/null
+++ b/fithesis3/guide/mu/examples/ped-01.tex
@@ -0,0 +1,3 @@
+\documentclass{../../../fithesis3}
+\thesissetup{faculty=ped}
+\input01
diff --git a/fithesis3/guide/mu/examples/phil-01.tex b/fithesis3/guide/mu/examples/phil-01.tex
new file mode 100644
index 0000000..4ec038e
--- /dev/null
+++ b/fithesis3/guide/mu/examples/phil-01.tex
@@ -0,0 +1,3 @@
+\documentclass{../../../fithesis3}
+\thesissetup{faculty=phil}
+\input01
diff --git a/fithesis3/guide/mu/examples/sci-01.tex b/fithesis3/guide/mu/examples/sci-01.tex
new file mode 100644
index 0000000..75e14af
--- /dev/null
+++ b/fithesis3/guide/mu/examples/sci-01.tex
@@ -0,0 +1,3 @@
+\documentclass{../../../fithesis3}
+\thesissetup{faculty=sci}
+\input01
diff --git a/fithesis3/guide/mu/guide.bib b/fithesis3/guide/mu/guide.bib
new file mode 100644
index 0000000..70c9190
--- /dev/null
+++ b/fithesis3/guide/mu/guide.bib
@@ -0,0 +1,53 @@
+@book{latex,
+  title={\LaTeX},
+  month={Match},
+  year={2013},
+  publisher={Wikibooks.org},
+  url={https://en.wikibooks.org/wiki/LaTeX},
+  urldate={2015-05-03}}
+@manual{veryshortlatex,
+  title={The very short guide to typesetting with \LaTeX{}},
+  month={January},
+  year={2013},
+  publisher={Silmaril Consultants},
+  url={http://tug.ctan.org/info/latex-veryshortguide/veryshortguide.pdf},
+  urldate={2015-05-03}}
+@manual{shortlatex,
+  title={A short introduction to \LaTeX{}},
+  month={December},
+  year={1995},
+  author={Allin Cottrell},
+  url={http://ricardo.ecn.wfu.edu/~cottrell/ecn297/latex_tut.pdf},
+  urldate={2015-05-03}}
+@manual{longlatex,
+  author={Tobias Oetiker and Hubert Partl and Irene Hyna and Elisabeth Schlegl},
+  title={The Not So Short Introduction to \LaTeXe\ \LaTeXe in
+    157 minutes},
+  year={2014},
+  month={October},
+  url={https://tobi.oetiker.ch/lshort/lshort.pdf},
+  urldate={2015-05-03}}
+@book{rybicka03,
+  author={Jiří Rybička},
+  edition={3},
+  title={\LaTeX\ pro začátečníky},
+  publisher={Konvoj},
+  place={Brno},
+  year={2003},
+  isbn={80-7302-049-1}}
+@manual{satrapa11,
+  author={Pavel Satrapa},
+  title={\LaTeX\ pro pragmatiky},
+  place={Liberec},
+  year={2011},
+  month={June},
+  url={ftp://ftp.tex.ac.uk/tex-archive/info/czech/latex-pro-pragmatiky/latex-pro-pragmatiky.pdf},
+  urldate={2015-05-03}}
+@manual{novotny15,
+  author={Vít Novotný and Daniel Marek and Jan Pavlovič and Petr
+    Sojka},
+  title={The \textsf{fithesis3} class for the typesetting of theses
+    written at the Masaryk Univerzity in Brno},
+  year={\the\year},
+  month={\the\month},
+  place={Brno}}
diff --git a/fithesis3/guide/mu/guide.tex b/fithesis3/guide/mu/guide.tex
new file mode 100644
index 0000000..a9e1054
--- /dev/null
+++ b/fithesis3/guide/mu/guide.tex
@@ -0,0 +1,363 @@
+\documentclass[color,cover,twoside,nolot]{../../fithesis3}
+\usepackage[english]{babel}
+\usepackage{hologo}
+\usepackage{fancyvrb}
+\usepackage{minted}
+\usepackage[
+  backend=biber,
+  style=numeric,
+  citestyle=numeric-comp,
+  sorting=none
+]{biblatex}
+\addbibresource{guide.bib}
+\makeatletter
+% The following macro typesets the meaning of another macro
+\def\macromeaning#1{%
+  \makeatletter%
+    \let\ea\expandafter%
+    \ea\let\ea\thguide@macro\csname#1\endcsname%
+    \ea\def\ea\thguide@meaning\ea{\meaning\thguide@macro}%
+    \def\thguide@parse##1 ##2{%
+      ##1\ifx##2\relax\ea\@gobbletwo\else\\\fi\thguide@parse##2}%
+    \begin{verse}%
+      \ea\ifx\@empty\thguide@macro\@empty%
+        $\langle$\emph{empty}$\rangle$
+      \else%
+        \tt\ea\ea\ea\ea\ea\ea\ea\ea\ea\ea\ea\ea\ea\ea\ea\ea\ea\ea%
+        \ea\ea\ea\ea\ea\ea\ea\ea\ea\ea\ea\ea\ea\thguide@parse\ea%
+        \ea\ea\ea\ea\ea\ea\ea\ea\ea\ea\ea\ea\ea\ea\@gobbletwo\ea%
+        \ea\ea\ea\ea\ea\ea\@gobbletwo\ea\ea\ea\@gobbletwo\ea%
+        \@gobbletwo\thguide@meaning \relax%
+      \fi%
+    \end{verse}
+  \makeatother}
+\thesissetup{
+  title=A fithesis3 user guide for the \thesis@english@facultyName,
+  TeXtitle=A \textit{fithesis3} user guide\medskip\\\Large for the
+    \thesis@english@facultyName,
+  department=Department of Computer Graphics and Design,
+  programme=Applied Informatics,
+  field=Typesetting,
+  titleEn=\thesis@title,
+  departmentEn=\thesis@department,
+  programmeEn=\thesis@programme,
+  fieldEn=\thesis@field,
+  author=Vít Novotný,
+  advisor={doc. RNDr. Petr Sojka, Ph.D.},
+  assignment={},
+  keywords={thesis, typesetting, LaTeX},
+  abstract=This user guide describes the installation process of
+    the \textsf{fithesis3} document class and documents selected
+    parts of the public API of the \textsf{fithesis3} document
+    class that bear relevance to the style of the
+    \thesis@english@facultyName.,
+  keywordsEn=\thesis@keywords,
+  abstractEn=\thesis@abstract,
+  faculty=?,
+  basepath=../..,
+  autoLayout=false}
+\makeatother
+\begin{document}
+  \makeatletter\thesis@preamble\makeatother
+  \chapter{Introduction}
+  \textsf{fithesis3} is a \LaTeX{} document class, which
+  aims to streamline the typesetting of mandatory parts of theses
+  and dissertations so that the author can focus on the content
+  alone. Unlike its predecessors, \textsf{fithesis3} aims to
+  provide modular enough design to enable its usage across the
+  faculties of the \makeatletter\thesis@english@universityName%
+  \makeatother. To this end, the class comprises:
+  \begin{itemize}
+    \item\emph{style files}, which are unique for each faculty and
+      which encapsulate the look and the arrangement of the final
+      documents
+    \item\emph{locale files}, which define the strings for the
+      given locale
+    \item\emph{base class}, which serves as a bridge between style
+      files, locale files and the input document
+  \end{itemize}
+  The overarching desing and the interactions between the style
+  files, locale files and the base class are documented in the
+  technical documentation of the class \cite{novotny15}
+  distributed along with the package. This
+  guide, on the other hand, only aims to document the selected
+  parts of the public API of the \textsf{fithesis3} class
+  that bear relevance to the style file of the
+  \makeatletter\thesis@english@facultyName\makeatother. Note that
+  this guide is typeset using the said style file.
+
+  \section{Required packages and fonts}
+  To be able to use the \textsf{fithesis3} class with the style of
+  the Faculty of Informatics, your \TeX{} installation needs to
+  include the \textsf{rapport3} class\footnote{See
+  \url{https://www.ctan.org/pkg/ntgclass}} and the following
+  packages: \begin{itemize}
+    \item\textsf{xcolor}, \textsf{ifxetex}, \textsf{graphix},
+      \textsf{pdfpages}, \textsf{hyperref}, \textsf{keyval}
+    \item\textsf{fontspec}, \textsf{unicode-math} -- only when
+      typesetting with \Hologo{XeTeX}
+    \item\textsf{mathpazo}, \textsf{tgpagella}, \textsf{lmodern},
+       \textsf{cmap}, \textsf{fontenc} -- only when typesetting
+       with \TeX{} or \hologo{pdfTeX}
+  \end{itemize}
+  The \TeX{} Gyre Pagella\footnote{See
+  \url{https://www.ctan.org/pkg/tex-gyre-pagella}} and
+  \TeX{} Gyre Pagella Math\footnote{See
+  \url{https://www.ctan.org/pkg/tex-gyre-math-pagella}} OpenType
+  fonts are also required, when typesetting with \Hologo{XeTeX}.
+  All these are likely to be a part of any reasonably modern \TeX{}
+  distribution.
+
+  \section{Installation}
+  This section covers the installation of the \textsf{fithesis3}
+  class. Please note that the installation of the class is fully
+  optional. You can typeset your thesis by either directly editing
+  either the \path{pdflatex.tex} or the \path{xelatex.tex} example
+  files distributed along with the package or by pointing your source document to the class as follows:
+  \begin{minted}{latex}
+    \documentclass{path/fithesis3}
+    \thesissetup{basepath=path}
+    % The rest of the document
+  \end{minted}
+  where \texttt{path} corresponds to the path of the directory
+  containing the \path{fithesis3.cls} file.
+
+  When installing, first make sure that the \textsf{fithesis3} class
+  is not a part of
+  your \TeX{} distribution already. This can be easily verified by
+  creating the minimal document described in the next section and
+  typesetting it using either the \Hologo{XeTeX} or
+  the \hologo{pdfTeX} engine, respectively. In case
+  \textsf{fithesis3} is not a part of your \TeX{}
+  distribution, the typesetting will prematurely terminate with the
+  following error: \begin{Verbatim}[frame=single]
+! LaTeX Error: File `fithesis3/fithesis3.cls' not found.
+  \end{Verbatim}
+  If the \textsf{fithesis3} class is not a part of
+  your distribution, you can proceed to the installation.
+  This can be achieved by extracting the \path{fithesis3.tds.zip}
+  archive distributed along with the package into into one of
+  the \TeX{} directory structure trees within your \TeX{}
+  distribution. If you are using \TeX{}Live\footnote{See
+  \url{https://www.tug.org/texlive/doc.html}, chapter 2.3},
+  this can be achieved by creating a \texttt{texmf}
+  directory within your user home directory and by extracting the
+  \path{fithesis3.tds.zip} archive into it. For \Hologo{MiKTeX},
+  see the online documentation\footnote{See
+  \url{http://docs.miktex.org/manual/localadditions.html}}.
+
+  \section{A minimal document}
+  Before using the \textsf{fithesis3} class, you should be familiar
+  with the \LaTeX{} typesetting system. A good way to get started
+  is to read one of the introductory texts in English
+  \cite{veryshortlatex,shortlatex,longlatex,latex} or in Czech
+  \cite{rybicka03,satrapa11}.
+  We will start by creating a plain text document named
+  \path{helloworld.tex} in the UTF-8 encoding with the following
+  content:
+  \begin{minted}{latex}
+    \documentclass{fithesis3}
+    \thesissetup{faculty=?}
+    \begin{document}
+      Hello world!
+    \end{document}
+  \end{minted}
+  Now typeset the document using either the \hologo{pdfLaTeX} or
+  the \Hologo{XeLaTeX} engine. If everything is set up correctly,
+  you should end up with a document containing all the mandatory
+  parts of a thesis and one page at the end containing a
+  \texttt{Hello world!} line. You should notice that the document
+  is implicitly typeset in English and that it contains lots of
+  placeholder stringss for missing metadata (see Figure
+  \ref{fig:example01}). In the next chapter, we are going to
+  address that.
+  \begin{figure}[!bt]
+    \centering\makeatletter
+    \fbox{\includegraphics[clip,trim=0cm 14.8cm 0cm 4.2cm,%
+      width=0.975\textwidth]{examples/\thesis@faculty-01.pdf}}
+    \makeatother
+    \caption{The placeholder strings in the minimal document}
+    \label{fig:example01}
+  \end{figure}
+
+  \chapter{Configuring the class}
+  In this chapter, we will configure the class to use the correct
+  locale, to insert the correct metadata into the output document
+  and to be laid out in a meaningful way.
+
+  \section{Setting the locale}
+  First, we are going to set the locale of the document class. This
+  locale affects the locale of the mandatory parts of thesis. To
+  see what locales are available, list the contents of the
+  \path{fithesis3/locale/} directory. It should contain several
+  \textit{locale}\texttt{.dtx} files. Each of these
+  \textit{locale}s can be used by the class. To load a
+  \textit{locale}, insert \texttt{\string\thesis\-setup\{locale=}%
+  \textit{locale}\texttt{\}} into the preamble of the document.
+
+  If you use the \textsf{babel} or the \textsf{polyglossia} package
+  to load the hyphenation patterns for your locale, you don't need
+  to set the locale at all, \textsf{fithesis3} will use the main
+  language of \textsf{babel} or \textsf{polyglossia}.
+  \begin{minted}{latex}
+    \documentclass{fithesis3}
+    \thesissetup{faculty=?}
+    % Using the babel package:
+    \usepackage[czech]{babel}
+    \begin{document}
+      The mandatory parts of the thesis
+      are going to be typeset in Czech.
+    \end{document}
+
+    \documentclass{fithesis3}
+    \thesissetup{faculty=?}
+    % Using the polyglossia package:
+    \usepackage{polyglossia}
+    \setmainlanguage{czech}
+    \begin{document}
+      The mandatory parts of the thesis
+      are going to be typeset in Czech.
+    \end{document}
+  \end{minted}
+  The \textsf{babel} package can be used with Latin scripts, while
+  the \textsf{polyglossia} package supports non-Latin scripts as
+  well and is intended as a replacement of \textsf{babel} for
+  \Hologo{XeLaTeX}. You are advised to use one of them, depending
+  on your requirements.
+
+  \section{Inserting metadata}
+  Next, we are going to insert some metadata into the document. The
+  metadata can be inserted into the thesis using the
+  \texttt{\string\thesis\-setup} command. This command accepts
+  a comma-delimited \textit{key}\texttt{=}\textit{value} list.
+  The placeholder strings in our minimal document map directly
+  into the
+  \textit{key}s, so to change the \emph{<<author>>} placeholder
+  into \emph{Jane Doe}, simply insert the
+  \texttt{\string\thesis\-setup\{author=Jane Doe\}} command into the
+  preamble of your document.
+
+  Note, however, that some keys can not be deduced directly from
+  the output
+  document. For example the \texttt{thanks} key is not visible,
+  since the acknowledgement is not a mandatory
+  part of the thesis and therefore it only gets inserted into
+  the document, when the \texttt{thanks} key is defined. Some other
+  \textit{key}s, like the \texttt{abstract} key, can also span
+  multiple paragraphs, in which case they need to be set using the
+  \texttt{\string\thesis\-long}\textit{key}%
+  \texttt{\}\-\{}\textit{value}\texttt{\}}
+  command as follows:
+  \begin{minted}{latex}
+    \documentclass{fithesis3}
+    \thesissetup{
+      faculty=?,
+      author=Jane Doe}
+    \thesislong{abstract}{
+      In this document, I am going to
+      explore the craft of creating
+      abstracts \ldots
+        
+      \ldots spanning multiple paragraphs.}
+    \begin{document}
+      Hello world!
+    \end{document}
+  \end{minted}
+  If the \textit{value} of a \textit{key} contains a comma, the
+  \texttt{\string\thesis\-setup\{}\textit{key}\texttt{=}%
+  \textit{value}\texttt{\}} command would erroneously interpret it
+  as a delimiter. To prevent this from happening, enclose the
+  \textit{value} in curly braces as follows:
+  \begin{minted}{latex}
+    \documentclass{fithesis3}
+    \thesissetup{
+      faculty=?,
+      author=Jane Doe,
+      advisor={RNDr. John Doe, Ph.D.},
+      keywords={keyword1, keyword2}}
+    \begin{document}
+      Hello world!
+    \end{document}
+  \end{minted}
+  The complete list of \textit{key}s and their effects can
+  be found in the technical documentation of the
+  class \cite[chapter \emph{Public API}]{novotny15} distributed
+  along with the package.
+
+  \section{Controlling the layout}
+  The layout of the resulting document can be affected by the
+  \textit{options} passed to the class using the
+  \texttt{\string\documentclass[}\textit{options}\texttt{]\{fithes%
+  is3\}} syntax. The complete list of options for the style files
+  of the \makeatletter\thesis@english@universityName
+  \makeatother\ can be found in the technical documentation of the
+  class \cite[chapter \emph{Style files}]{novotny15}
+  distributed along with the package.
+
+  If you are unsatisfied with the arrangement of the mandatory
+  parts of the thesis, you can disable it using the
+  \texttt{\string\thesis\-setup\{autoLayout\}} command:
+  \begin{minted}{latex}
+    \documentclass{fithesis3}
+    \thesissetup{faculty=?,autoLayout=false}
+    \begin{document}
+      A document which, except for this line,
+      is completely empty.
+    \end{document}
+  \end{minted}
+  This results in a document, which is completely devoid of any
+  mandatory parts of the thesis (see Figure \ref{fig:example02}).
+  You can now manually insert the preamble and the postamble of the
+  document as follows:
+  \begin{minted}{latex}
+    \documentclass{fithesis3}
+    \thesissetup{
+      faculty=?,
+      autoLayout=false}
+    \begin{document}
+      \makeatletter\thesis@preamble\makeatother
+      A document which once again contains all
+      the mandatory parts of a thesis.
+      \makeatletter\thesis@postamble\makeatother
+    \end{document}
+  \end{minted}
+  \begin{figure}[!bt]
+    \centering\makeatletter
+    \fbox{\includegraphics[clip,trim=2cm 24.5cm 2cm 4.5cm,%
+      width=0.975\textwidth]{examples/02.pdf}}
+    \makeatother
+    \caption{A document with disabled \texttt{autoLayout}}
+    \label{fig:example02}
+  \end{figure}
+  This alone would be a useless excercise, as we're now back to the
+  original document. However, instead of inserting the
+  \texttt{\string\thesis\-@preamble} and the
+  \texttt{\string\thesis\-@postamble} commands into the document, we
+  can insert only certain blocks to which these commands expand.
+  \texttt{\string\thesis\-@preamble} expands to the
+  following commands: \macromeaning{thesis@preamble} and
+  \texttt{\string\thesis\-@postamble} 
+  expands to the following commands: \macromeaning{thesis@postamble}
+  To create a document, which only contains the thesis cover prior
+  to the text, we would use the following:
+  \begin{minted}{latex}
+    \documentclass{fithesis3}
+    \thesissetup{
+      faculty=?,
+      autoLayout=false}
+    \begin{document}
+      \makeatletter
+        \thesis@blocks@cover
+        \thesis@blocks@mainMatter
+      \makeatother
+      A document which contains only the cover.
+    \end{document}
+  \end{minted}
+  The available blocks are documented in the technical
+  documentation of the class \cite[chapter
+  \emph{Style files}]{novotny15} distributed along with the
+  package.
+
+  \makeatletter\thesis@postamble\makeatother
+  \printbibliography[heading=bibintoc]
+\end{document}
diff --git a/fithesis3/locale/czech.dtx b/fithesis3/locale/czech.dtx
index de0384a..722461c 100644
--- a/fithesis3/locale/czech.dtx
+++ b/fithesis3/locale/czech.dtx
@@ -86,10 +86,12 @@
 %</mu>
 % \fi\file{locale/mu/law/czech.def}
 % This is the Czech locale file specific to the Faculty of Law at
-% University in Brno. It replaces the \texttt{facultyName}
-% placeholder with the correct value and replaces the
-% \texttt{abstractTitle} string in accordance with the
-% requirements of the faculty.
+% the Masaryk University in Brno. It replaces the
+% \texttt{facultyName} placeholder with the correct value, defines
+% the \texttt{facultyLongName} required by the
+% |\thesis@blocks@cover| and the |\thesis@blocks@titlePage| blocks
+% and replaces the \texttt{abstractTitle} string in accordance
+% with the requirements of the faculty.
 % \iffalse
 %<*mu/law>
 % \fi\begin{macrocode}
@@ -99,7 +101,8 @@
 \def\thesis@czech@abstractTitle{Abstrakt}
 
 % Zástupné texty
-\def\thesis@czech@facultyName{Právnická fakulta Masarykovy
+\def\thesis@czech@facultyName{Právnická fakulta}
+\def\thesis@czech@facultyLongName{Právnická fakulta Masarykovy
   univerzity}
 %    \end{macrocode}\iffalse
 %</mu/law>
diff --git a/fithesis3/locale/english.dtx b/fithesis3/locale/english.dtx
index c79fb9f..46fbcc2 100644
--- a/fithesis3/locale/english.dtx
+++ b/fithesis3/locale/english.dtx
@@ -63,13 +63,16 @@
 % \fi\file{locale/mu/law/english.def}
 % This is the English locale file specific to the Faculty of Law at
 % the Masaryk University in Brno. It replaces the
-% \texttt{facultyName} placeholder with the correct value.
+% \texttt{facultyName} placeholder with the correct value and
+% defines the \texttt{facultyLongName} required by the
+% |\thesis@blocks@cover| and the |\thesis@blocks@titlePage| blocks.
 % \iffalse
 %<*mu/law>
 % \fi\begin{macrocode}
 \ProvidesFile{fithesis3/locale/mu/law/english.def}[2015/04/18]
-\def\thesis@english@facultyName{The Faculty of Law of the Masaryk
-  University}
+\def\thesis@english@facultyName{The Faculty of Law}
+\def\thesis@english@facultyLongName{The Faculty of Law of the
+  Masaryk University}
 %    \end{macrocode}\iffalse
 %</mu/law>
 % \fi\file{locale/mu/fsps/english.def}
diff --git a/fithesis3/locale/slovak.dtx b/fithesis3/locale/slovak.dtx
index f2e7e34..99eea2c 100644
--- a/fithesis3/locale/slovak.dtx
+++ b/fithesis3/locale/slovak.dtx
@@ -85,9 +85,11 @@
 % \fi\file{locale/mu/law/slovak.def}
 % This is the Slovak locale file specific to the Faculty of Law at
 % the Masaryk University in Brno. It replaces the
-% \texttt{facultyName} placeholder with the correct value and
-% replaces the \texttt{abstractTitle} string in accordance with
-% the requirements of the faculty.
+% \texttt{facultyName} placeholder with the correct value, defines
+% the \texttt{facultyLongName} required by the
+% |\thesis@blocks@cover| and the |\thesis@blocks@titlePage| blocks
+% and replaces the \texttt{abstractTitle} string in accordance
+% with the requirements of the faculty.
 % \iffalse
 %<*mu/law>
 % \fi\begin{macrocode}
@@ -97,7 +99,8 @@
 \def\thesis@slovak@abstractTitle{Abstrakt}
 
 % Zástupné texty
-\def\thesis@slovak@facultyName{Právnická fakulta Masarykovej
+\def\thesis@slovak@facultyName{Právnická fakulta}
+\def\thesis@slovak@facultyLongName{Právnická fakulta Masarykovej
   univerzity}
 %    \end{macrocode}\iffalse
 %</mu/law>
diff --git a/fithesis3/style/Makefile b/fithesis3/style/Makefile
index 900d695..81b96ee 100644
--- a/fithesis3/style/Makefile
+++ b/fithesis3/style/Makefile
@@ -3,7 +3,6 @@ OUTPUT=fithesis3-base.sty
 
 .PHONY: explode implode all
 all: explode
-
 explode: $(LOGS)
 
 %.log: %.ins %.dtx
diff --git a/fithesis3/style/mu/Makefile b/fithesis3/style/mu/Makefile
index dc3740e..f929387 100644
--- a/fithesis3/style/mu/Makefile
+++ b/fithesis3/style/mu/Makefile
@@ -3,7 +3,6 @@ OUTPUT=fithesis3-base.sty fithesis3-1[012].clo fithesis3-fi.sty fithesis3-sci.st
 
 .PHONY: explode implode all
 all: explode
-
 explode: $(LOGS)
 
 %.log: %.ins %.dtx
diff --git a/fithesis3/style/mu/base.dtx b/fithesis3/style/mu/base.dtx
index 6a2b2cc..f3bcfa4 100644
--- a/fithesis3/style/mu/base.dtx
+++ b/fithesis3/style/mu/base.dtx
@@ -95,6 +95,9 @@
 %   \item\textsf{tgpagella} -- Changes the default roman font family
 %     to \TeX\ Gyre Pagella. This package does not get loaded in
 %     \Hologo{XeTeX}.
+%   \item\textsf{lmodern} -- Changes the default sans-serif and
+%     monotype font faces to Latin Modern instead of the default
+%     Computer Modern font family.
 %   \item\textsf{cmap} -- Places an an explicit \texttt{ToUnicode}
 %     map in the resulting PDF file, allowing for extraction of
 %     the text of the document. This package does not get loaded
@@ -104,7 +107,7 @@
 %   \item\textsf{fontspec} -- Allows the selection of
 %     system-installed fonts. This package only gets loaded under
 %     \Hologo{XeTeX}.
-%   \item\textsf{fontspec} -- Allows the selection of
+%   \item\textsf{unicode-math} -- Allows the selection of
 %     system-installed mathematical fonts. This package only gets
 %     loaded under \Hologo{XeTeX}.
 %   \item\textsf{graphix} -- Adds support for the inclusion of
@@ -124,7 +127,7 @@
 % Pagella} and \textsf{TeX Gyre Pagella Math} are selected as the
 % main text and math fonts.
 %    \begin{macrocode}
-\RequirePackage[usenames,dvipsnames,svgnames,table]{xcolor}
+\thesis@require{xcolor}
 \thesis@require{ifxetex}
 \ifxetex
   \thesis@require{fontspec}
@@ -132,6 +135,7 @@
   \setmainfont[Ligatures=TeX]{TeX Gyre Pagella}
   \setmathfont[math-style=ISO,bold-style=ISO,vargreek-shape=TeX]{TG Pagella Math}
 \else
+  \thesis@require{lmodern}
   \thesis@require{mathpazo}
   \thesis@require{tgpagella}
   \RequirePackage[resetfonts]{cmap}
@@ -414,8 +418,7 @@
     \thesis@declaration%
     \vskip 2cm%
     \hfill\thesis@author%
-  \end{alwayssingle}
-  \thesis@blocks@clear}
+  \end{alwayssingle}}
 %    \end{macrocode}
 % \end{macro}\begin{macro}{\thesis@blocks@thanks}
 % The |\thesis@blocks@thanks| private macro typesets the
@@ -437,9 +440,7 @@
 % \begin{macrocode}
 \def\thesis@blocks@abstract{%
   \begin{alwayssingle}%
-    % Typeset the abstract on the right-hand side, if at all
-    % possible
-    \thesis@blocks@clearRight
+    % Start the new chapter without clearing the right page
     {\def\cleardoublepage{}
     \chapter*{\thesis@@{abstractTitle}}}%
     \noindent\thesis@abstract%
@@ -454,7 +455,6 @@
 % \begin{macrocode}
 \def\thesis@blocks@abstractEn{%
   \ifthesis@english\else%
-    \newpage%
     \begin{alwayssingle}%
       % Start the new chapter without clearing the right page
       {\def\cleardoublepage{}%
@@ -470,13 +470,11 @@
 % \begin{macrocode}
 \def\thesis@blocks@keywords{%
   \begin{alwayssingle}%
-    % Typeset the keywords on the right-hand side, if at all
-    % possible
-    \thesis@blocks@clearRight
-      {\def\cleardoublepage{}%
-      \chapter*{\thesis@@{keywordsTitle}}%
-      \noindent\thesis@keywords}%
-    \par\vfill%
+    % Start the new chapter without clearing the right page
+    {\def\cleardoublepage{}%
+    \chapter*{\thesis@@{keywordsTitle}}%
+    \noindent\thesis@keywords}%
+    \par\vfil\null%
   \end{alwayssingle}}
 %    \end{macrocode}
 % \end{macro}\begin{macro}{\thesis@blocks@keywordsEn}
@@ -488,12 +486,11 @@
 \def\thesis@blocks@keywordsEn{%
   \ifthesis@english\else%
     \begin{alwayssingle}%
-      \newpage
       % Start the new chapter without clearing the right page
       {\def\cleardoublepage{}%
       \chapter*{\thesis@{english@keywordsTitle}}%
       \thesis@keywordsEn}%
-      \par\vfill%
+      \par\vfil\null%
     \end{alwayssingle}%
   \fi}
 %    \end{macrocode}
@@ -514,10 +511,11 @@
         \noindent\textit{\thesis@@{assignment}}%
       \end{alwayssingle}%
     \else%
-      {\edef\@pdfList{\thesis@assignmentFiles}%
-      \expandafter\includepdfmerge\expandafter{\@pdfList}}%
-    \fi%
-    \thesis@blocks@clear
+      {\def\@empty{}\edef\@pdfList{\thesis@assignmentFiles}%
+      \if\@pdfList\@empty\else%
+        \expandafter\includepdfmerge\expandafter{\@pdfList}%
+      \fi}%
+    \fi\thesis@blocks@clear
   \fi}
 %    \end{macrocode}
 % \end{macro}\begin{macro}{\thesis@blocks@mainMatter}
diff --git a/fithesis3/style/mu/econ.dtx b/fithesis3/style/mu/econ.dtx
index e78cb56..f6be16e 100644
--- a/fithesis3/style/mu/econ.dtx
+++ b/fithesis3/style/mu/econ.dtx
@@ -67,9 +67,10 @@
 %    \begin{macrocode}
 \thesis@blocks@titlePage@field@true
 \def\thesis@blocks@titlePage@content{%
-  {\thesis@titlePage@Huge\bf\thesis@upper{TeXtitle}\\[0.1in]%
-                            \thesis@TeXtitleEn\\[0.3in]}%
-  {\thesis@titlePage@large{\sc\thesis@@{typeName}}\\}}
+  {\thesis@titlePage@Huge\bf\thesis@TeXtitle}
+  \ifthesis@english\else
+    {\\[0.1in]\thesis@titlePage@Large\bf\thesis@TeXtitleEn}
+  \fi {\\[0.3in]\thesis@titlePage@large\sc\thesis@@{typeName}\\}}
 \def\thesis@blocks@titlePage@footer{%
   {\thesis@titlePage@large
     {% Calculate the width of the thesis author and advisor boxes
@@ -101,7 +102,7 @@
   \thesis@blocks@clear
   % In case of double-sided typesetting, change the geometry
   \ifthesis@twoside@
-    \geometry{top=25mm,bottom=20mm,left=35mm,
+    \newgeometry{top=25mm,bottom=20mm,left=35mm,
       right=15mm, includeheadfoot}
   \fi\pagestyle{empty}
   \parindent 1.5em
@@ -147,10 +148,11 @@
   \thesis@blocks@frontMatter%
     \thesis@blocks@titlePage%
     \thesis@blocks@assignment%
-    \thesis@blocks@abstract%
-    \thesis@blocks@abstractEn%
-    \thesis@blocks@keywords%
-    \thesis@blocks@keywordsEn%
+    \thesis@blocks@clearRight%
+      \thesis@blocks@abstract%
+      \thesis@blocks@abstractEn%
+      \thesis@blocks@keywords%
+      \thesis@blocks@keywordsEn%
     \thesis@blocks@declaration%
     \thesis@blocks@thanks%
     \thesis@blocks@toc%
diff --git a/fithesis3/style/mu/fi.dtx b/fithesis3/style/mu/fi.dtx
index 976b616..9ff5afd 100644
--- a/fithesis3/style/mu/fi.dtx
+++ b/fithesis3/style/mu/fi.dtx
@@ -85,8 +85,9 @@
     \thesis@blocks@assignment%
     \thesis@blocks@declaration%
     \thesis@blocks@thanks%
-    \thesis@blocks@abstract%
-    \thesis@blocks@keywords%
+    \thesis@blocks@clearRight%
+      \thesis@blocks@abstract%
+      \thesis@blocks@keywords%
     \thesis@blocks@tables%
   \thesis@blocks@mainMatter}
 %    \end{macrocode}
diff --git a/fithesis3/style/mu/fss.dtx b/fithesis3/style/mu/fss.dtx
index c12ecb9..eec51b1 100644
--- a/fithesis3/style/mu/fss.dtx
+++ b/fithesis3/style/mu/fss.dtx
@@ -39,10 +39,11 @@
   \thesis@blocks@cover%
   \thesis@blocks@titlePage%
   \thesis@blocks@frontMatter%
-    \thesis@blocks@abstract%
-    \thesis@blocks@abstractEn%
-    \thesis@blocks@keywords%
-    \thesis@blocks@keywordsEn%
+    \thesis@blocks@clearRight%
+      \thesis@blocks@abstract%
+      \thesis@blocks@abstractEn%
+      \thesis@blocks@keywords%
+      \thesis@blocks@keywordsEn%
     \thesis@blocks@assignment%
     \thesis@blocks@declaration%
     \thesis@blocks@thanks%
diff --git a/fithesis3/style/mu/law.dtx b/fithesis3/style/mu/law.dtx
index 4bf4026..8f2ef1a 100644
--- a/fithesis3/style/mu/law.dtx
+++ b/fithesis3/style/mu/law.dtx
@@ -20,17 +20,19 @@
 %    \begin{macrocode}
 \thesis@requireLocale{english}
 %    \end{macrocode}
-% The style file configures the cover header to include only the
-% faculty name and the department name and the title page header to
-% include only the faculty name, the department name and the name
-% of the field of study.
+% The style file configures the cover and title page headers to
+% include only the faculty name and the department name.
+% Along with the macros required by the locale file interface,
+% the locale files need to define the following private macros:
+% \begin{itemize}
+%   \item|\thesis@|\textit{locale}|@facultyLongName| -- The name
+%     of the faculty combined with the name of the university.
+% \end{itemize}
 %    \begin{macrocode}
-\thesis@blocks@cover@university@false
-\thesis@blocks@cover@department@true
-\thesis@blocks@cover@field@false
-\thesis@blocks@titlePage@university@false
-\thesis@blocks@titlePage@department@true
-\thesis@blocks@titlePage@field@true
+\def\thesis@blocks@cover@header{%
+  {\sc\thesis@titlePage@Large\thesis@@{facultyLongName}\\%
+    \thesis@titlePage@large\thesis@department\\\vskip 2em}}
+\let\thesis@blocks@titlePage@header=\thesis@blocks@cover@header
 %    \end{macrocode}
 % \begin{macro}{\thesis@blocks@frontMatter}
 % The |\thesis@blocks@frontMatter| private macro sets up the style
@@ -56,11 +58,6 @@
   \parindent 1.5em\relax}
 %    \end{macrocode}
 % \end{macro}
-% The style file configures the title page header to include the
-% department name.
-%    \begin{macrocode}
-\thesis@blocks@titlePage@department@true
-%    \end{macrocode}
 % The style file defines the autolayout preamble as the cover and
 % the title page followed by the declaration, abstracts, keywords,
 % acknowledgement, table of contents and list of tables and figures
@@ -72,10 +69,11 @@
   \thesis@blocks@titlePage%
   \thesis@blocks@frontMatter%
     \thesis@blocks@declaration%
-    \thesis@blocks@abstract%
-    \thesis@blocks@abstractEn%
-    \thesis@blocks@keywords%
-    \thesis@blocks@keywordsEn%
+    \thesis@blocks@clearRight%
+      \thesis@blocks@abstract%
+      \thesis@blocks@abstractEn%
+      \thesis@blocks@keywords%
+      \thesis@blocks@keywordsEn%
     \thesis@blocks@thanks%
     \thesis@blocks@tables%
   \thesis@blocks@mainMatter}
diff --git a/fithesis3/style/mu/med.dtx b/fithesis3/style/mu/med.dtx
index 314dba5..b56e4a0 100644
--- a/fithesis3/style/mu/med.dtx
+++ b/fithesis3/style/mu/med.dtx
@@ -78,7 +78,7 @@
        \bf\thesis@@{authorTitle}:}}
      \let\@D\relax\newlength{\@D}\settowidth{\@D}{\thesis@author}
      \let\@E\relax\newlength{\@E}\settowidth{\@E}{{%
-       \bf\thesis@@{field}:}}
+       \bf\thesis@@{fieldTitle}:}}
      \let\@F\relax\newlength{\@F}\settowidth{\@F}{\thesis@field}
     \let\@left\relax\newlength{\@left}\pgfmathsetlength{\@left}{%
       max(\@A,\@B)}
@@ -103,7 +103,7 @@
   \thesis@blocks@clear
   % In case of double-sided typesetting, change the geometry
   \ifthesis@twoside@
-    \geometry{top=25mm,bottom=20mm,left=35mm,
+    \newgeometry{top=25mm,bottom=20mm,left=35mm,
       right=15mm, includeheadfoot}
   \fi\pagestyle{empty}
   \parindent 1.5em
@@ -143,10 +143,11 @@
   \thesis@blocks@frontMatter%
     \thesis@blocks@titlePage%
     \onehalfspacing%
-    \thesis@blocks@abstract%
-    \thesis@blocks@abstractEn%
-    \thesis@blocks@keywords%
-    \thesis@blocks@keywordsEn%
+    \thesis@blocks@clearRight%
+      \thesis@blocks@abstract%
+      \thesis@blocks@abstractEn%
+      \thesis@blocks@keywords%
+      \thesis@blocks@keywordsEn%
     \thesis@blocks@bibEntry%
     \thesis@blocks@declaration%
     \thesis@blocks@thanks%
diff --git a/fithesis3/style/mu/ped.dtx b/fithesis3/style/mu/ped.dtx
index dcaa76a..a51ab5f 100644
--- a/fithesis3/style/mu/ped.dtx
+++ b/fithesis3/style/mu/ped.dtx
@@ -66,10 +66,11 @@
   \thesis@blocks@titlePage%
   \thesis@blocks@frontMatter%
     \thesis@blocks@bibEntry%
-    \thesis@blocks@abstract%
-    \thesis@blocks@abstractEn%
-    \thesis@blocks@keywords%
-    \thesis@blocks@keywordsEn%
+    \thesis@blocks@clearRight%
+      \thesis@blocks@abstract%
+      \thesis@blocks@abstractEn%
+      \thesis@blocks@keywords%
+      \thesis@blocks@keywordsEn%
     \thesis@blocks@declaration%
     \thesis@blocks@thanks%
     \thesis@blocks@tables%
diff --git a/fithesis3/style/mu/sci.dtx b/fithesis3/style/mu/sci.dtx
index 025720a..b9c22b9 100644
--- a/fithesis3/style/mu/sci.dtx
+++ b/fithesis3/style/mu/sci.dtx
@@ -282,16 +282,14 @@
       \begin{minipage}{30mm}
         \includegraphics[width=30mm]{%
           \thesis@logopath@color\thesis@universityLogo}
-      \end{minipage}
-      \begin{minipage}{89mm}
+      \end{minipage}\begin{minipage}{89mm}
         \begin{center}
           {\sc\thesis@titlePage@LARGE\thesis@czech@universityName\\%
               \thesis@titlePage@Large\thesis@czech@facultyName\\[0.3em]%
-              \thesis@titlePage@large\thesis@department}
+              \thesis@titlePage@normalsize\thesis@department}
           \rule{\textwidth}{2pt}\vspace*{2mm}
         \end{center}
-      \end{minipage}
-      \begin{minipage}{30mm}
+      \end{minipage}\begin{minipage}{30mm}
         \includegraphics[width=30mm]{%
           \thesis@logopath@color\thesis@facultyLogo}
       \end{minipage}
@@ -303,7 +301,7 @@
     {\bf\thesis@titlePage@LARGE\thesis@author}\\
     \vfill\noindent
     % The bottom of the page
-    {\bf\thesis@titlePage@large%
+    {\bf\thesis@titlePage@normalsize%
       % Unless this is a rigorous thesis, typeset the name of the
       % thesis advisor.
       \ifx\thesis@type\thesis@rigorous\else%
@@ -328,10 +326,11 @@
   \thesis@blocks@cover%
   \thesis@blocks@frontMatter%
     \thesis@blocks@titlePage%
-    \thesis@blocks@bibEntry%
-    \thesis@blocks@bibEntryEn%
-    \thesis@blocks@abstract%
-    \thesis@blocks@abstractEn%
+    \thesis@blocks@clearRight%
+      \thesis@blocks@bibEntry%
+      \thesis@blocks@bibEntryEn%
+      \thesis@blocks@abstract%
+      \thesis@blocks@abstractEn%
     \thesis@blocks@assignment%
     \thesis@blocks@thanks%
     \thesis@blocks@declaration%
diff --git a/fithesis3/test/Makefile b/fithesis3/test/Makefile
index 249a3d3..446a743 100644
--- a/fithesis3/test/Makefile
+++ b/fithesis3/test/Makefile
@@ -1,5 +1,5 @@
-.PHONY: all clear
-all: clear
+.PHONY: all clean
+all: clean
 	for file in *.tex; do \
 		ln -s "$$file" current.tex && \
 		pdflatex current && \
@@ -9,5 +9,5 @@ all: clear
 		rm current.*; \
 	done
 
-clear:
+clean:
 		rm -f current.*
diff --git a/fithesis3/test/base-10pt.tex b/fithesis3/test/base-10pt.tex
index b5ad7e3..5723c50 100644
--- a/fithesis3/test/base-10pt.tex
+++ b/fithesis3/test/base-10pt.tex
@@ -1,8 +1,4 @@
 \documentclass[10pt]{../fithesis3}
-\usepackage{ifxetex}
-\ifxetex\else
-  \usepackage[utf8]{inputenc}
-\fi
 \thesissetup{basepath=..}
 \begin{document}
   foo bar
diff --git a/fithesis3/test/base-11pt.tex b/fithesis3/test/base-11pt.tex
index e2ee8eb..530e2d5 100644
--- a/fithesis3/test/base-11pt.tex
+++ b/fithesis3/test/base-11pt.tex
@@ -1,8 +1,4 @@
 \documentclass[11pt]{../fithesis3}
-\usepackage{ifxetex}
-\ifxetex\else
-  \usepackage[utf8]{inputenc}
-\fi
 \thesissetup{basepath=..}
 \begin{document}
   foo bar
diff --git a/fithesis3/test/base-12pt.tex b/fithesis3/test/base-12pt.tex
index 75dd0ad..b0e6c53 100644
--- a/fithesis3/test/base-12pt.tex
+++ b/fithesis3/test/base-12pt.tex
@@ -1,8 +1,4 @@
 \documentclass[12pt]{../fithesis3}
-\usepackage{ifxetex}
-\ifxetex\else
-  \usepackage[utf8]{inputenc}
-\fi
 \thesissetup{basepath=..}
 \begin{document}
   foo bar
diff --git a/fithesis3/test/base-utf8.tex b/fithesis3/test/base-utf8.tex
index 32a4b7d..ca846b2 100644
--- a/fithesis3/test/base-utf8.tex
+++ b/fithesis3/test/base-utf8.tex
@@ -1,8 +1,4 @@
 \documentclass{../fithesis3}
-\usepackage{ifxetex}
-\ifxetex\else
-  \usepackage[utf8]{inputenc}
-\fi
 \begin{document}
   foo bar
 \end{document}
diff --git a/fithesis3/test/econ-czech.tex b/fithesis3/test/econ-czech.tex
index 574b97b..1ed3081 100644
--- a/fithesis3/test/econ-czech.tex
+++ b/fithesis3/test/econ-czech.tex
@@ -4,7 +4,6 @@
   \usepackage{polyglossia}
   \setmainlanguage{czech}
 \else
-  \usepackage[utf8]{inputenc}
   \usepackage[czech]{babel}
 \fi
 \thesissetup{basepath=.., faculty=econ}
diff --git a/fithesis3/test/econ-english.tex b/fithesis3/test/econ-english.tex
index 62f2a22..785424c 100644
--- a/fithesis3/test/econ-english.tex
+++ b/fithesis3/test/econ-english.tex
@@ -4,7 +4,6 @@
   \usepackage{polyglossia}
   \setmainlanguage{english}
 \else
-  \usepackage[utf8]{inputenc}
   \usepackage[english]{babel}
 \fi
 \thesissetup{basepath=.., faculty=econ}
diff --git a/fithesis3/test/econ-slovak.tex b/fithesis3/test/econ-slovak.tex
index 389fcc6..910da6f 100644
--- a/fithesis3/test/econ-slovak.tex
+++ b/fithesis3/test/econ-slovak.tex
@@ -4,7 +4,6 @@
   \usepackage{polyglossia}
   \setmainlanguage{slovak}
 \else
-  \usepackage[utf8]{inputenc}
   \usepackage[slovak]{babel}
 \fi
 \thesissetup{basepath=.., faculty=econ}
diff --git a/fithesis3/test/fi-color.tex b/fithesis3/test/fi-color.tex
index 1ecc629..bd9c2b5 100644
--- a/fithesis3/test/fi-color.tex
+++ b/fithesis3/test/fi-color.tex
@@ -1,8 +1,4 @@
 \documentclass[color]{../fithesis3}
-\usepackage{ifxetex}
-\ifxetex\else
-  \usepackage[utf8]{inputenc}
-\fi
 \thesissetup{basepath=.., faculty=fi}
 \begin{document}
   foo bar
diff --git a/fithesis3/test/fi-czech.tex b/fithesis3/test/fi-czech.tex
index bf7af51..f2daa6d 100644
--- a/fithesis3/test/fi-czech.tex
+++ b/fithesis3/test/fi-czech.tex
@@ -4,7 +4,6 @@
   \usepackage{polyglossia}
   \setmainlanguage{czech}
 \else
-  \usepackage[utf8]{inputenc}
   \usepackage[czech]{babel}
 \fi
 \thesissetup{basepath=.., faculty=fi}
diff --git a/fithesis3/test/fi-english.tex b/fithesis3/test/fi-english.tex
index 4cb5c6d..29dcbfb 100644
--- a/fithesis3/test/fi-english.tex
+++ b/fithesis3/test/fi-english.tex
@@ -4,7 +4,6 @@
   \usepackage{polyglossia}
   \setmainlanguage{english}
 \else
-  \usepackage[utf8]{inputenc}
   \usepackage[english]{babel}
 \fi
 \thesissetup{basepath=.., faculty=fi}
diff --git a/fithesis3/test/fi-female.tex b/fithesis3/test/fi-female.tex
index 57668fe..ea55594 100644
--- a/fithesis3/test/fi-female.tex
+++ b/fithesis3/test/fi-female.tex
@@ -1,8 +1,4 @@
 \documentclass[monochrome]{../fithesis3}
-\usepackage{ifxetex}
-\ifxetex\else
-  \usepackage[utf8]{inputenc}
-\fi
 \thesissetup{
   basepath=..,
   faculty=fi,
diff --git a/fithesis3/test/fi-male.tex b/fithesis3/test/fi-male.tex
index 54b134c..c075a85 100644
--- a/fithesis3/test/fi-male.tex
+++ b/fithesis3/test/fi-male.tex
@@ -1,8 +1,4 @@
 \documentclass[monochrome]{../fithesis3}
-\usepackage{ifxetex}
-\ifxetex\else
-  \usepackage[utf8]{inputenc}
-\fi
 \thesissetup{
   basepath=..,
   faculty=fi,
diff --git a/fithesis3/test/fi-rigorous.tex b/fithesis3/test/fi-rigorous.tex
index c140fa7..02d54bc 100644
--- a/fithesis3/test/fi-rigorous.tex
+++ b/fithesis3/test/fi-rigorous.tex
@@ -1,8 +1,4 @@
 \documentclass[monochrome]{../fithesis3}
-\usepackage{ifxetex}
-\ifxetex\else
-  \usepackage[utf8]{inputenc}
-\fi
 \thesissetup{
   basepath=..,
   faculty=fi,
diff --git a/fithesis3/test/fi-slovak.tex b/fithesis3/test/fi-slovak.tex
index 02bd8c0..8b66b4d 100644
--- a/fithesis3/test/fi-slovak.tex
+++ b/fithesis3/test/fi-slovak.tex
@@ -4,7 +4,6 @@
   \usepackage{polyglossia}
   \setmainlanguage{slovak}
 \else
-  \usepackage[utf8]{inputenc}
   \usepackage[slovak]{babel}
 \fi
 \thesissetup{
diff --git a/fithesis3/test/fsps-czech.tex b/fithesis3/test/fsps-czech.tex
index 0250cd6..3820173 100644
--- a/fithesis3/test/fsps-czech.tex
+++ b/fithesis3/test/fsps-czech.tex
@@ -4,7 +4,6 @@
   \usepackage{polyglossia}
   \setmainlanguage{czech}
 \else
-  \usepackage[utf8]{inputenc}
   \usepackage[czech]{babel}
 \fi
 \thesissetup{
diff --git a/fithesis3/test/fsps-english.tex b/fithesis3/test/fsps-english.tex
index aa88919..b216abb 100644
--- a/fithesis3/test/fsps-english.tex
+++ b/fithesis3/test/fsps-english.tex
@@ -4,7 +4,6 @@
   \usepackage{polyglossia}
   \setmainlanguage{english}
 \else
-  \usepackage[utf8]{inputenc}
   \usepackage[english]{babel}
 \fi
 \thesissetup{
diff --git a/fithesis3/test/fsps-slovak.tex b/fithesis3/test/fsps-slovak.tex
index 704a45e..34e3347 100644
--- a/fithesis3/test/fsps-slovak.tex
+++ b/fithesis3/test/fsps-slovak.tex
@@ -4,7 +4,6 @@
   \usepackage{polyglossia}
   \setmainlanguage{slovak}
 \else
-  \usepackage[utf8]{inputenc}
   \usepackage[slovak]{babel}
 \fi
 \thesissetup{
diff --git a/fithesis3/test/fss-czech.tex b/fithesis3/test/fss-czech.tex
index 7eca7d1..5f449d6 100644
--- a/fithesis3/test/fss-czech.tex
+++ b/fithesis3/test/fss-czech.tex
@@ -4,7 +4,6 @@
   \usepackage{polyglossia}
   \setmainlanguage{czech}
 \else
-  \usepackage[utf8]{inputenc}
   \usepackage[czech]{babel}
 \fi
 \thesissetup{
diff --git a/fithesis3/test/fss-english.tex b/fithesis3/test/fss-english.tex
index 4c82105..276615a 100644
--- a/fithesis3/test/fss-english.tex
+++ b/fithesis3/test/fss-english.tex
@@ -4,7 +4,6 @@
   \usepackage{polyglossia}
   \setmainlanguage{english}
 \else
-  \usepackage[utf8]{inputenc}
   \usepackage[english]{babel}
 \fi
 \thesissetup{
diff --git a/fithesis3/test/fss-slovak.tex b/fithesis3/test/fss-slovak.tex
index 9581289..efddbe3 100644
--- a/fithesis3/test/fss-slovak.tex
+++ b/fithesis3/test/fss-slovak.tex
@@ -4,7 +4,6 @@
   \usepackage{polyglossia}
   \setmainlanguage{slovak}
 \else
-  \usepackage[utf8]{inputenc}
   \usepackage[slovak]{babel}
 \fi
 \thesissetup{
diff --git a/fithesis3/test/law-czech.tex b/fithesis3/test/law-czech.tex
index f084d75..1ca37ba 100644
--- a/fithesis3/test/law-czech.tex
+++ b/fithesis3/test/law-czech.tex
@@ -4,7 +4,6 @@
   \usepackage{polyglossia}
   \setmainlanguage{czech}
 \else
-  \usepackage[utf8]{inputenc}
   \usepackage[czech]{babel}
 \fi
 \thesissetup{
diff --git a/fithesis3/test/law-english.tex b/fithesis3/test/law-english.tex
index e7be9be..b315cf6 100644
--- a/fithesis3/test/law-english.tex
+++ b/fithesis3/test/law-english.tex
@@ -4,7 +4,6 @@
   \usepackage{polyglossia}
   \setmainlanguage{english}
 \else
-  \usepackage[utf8]{inputenc}
   \usepackage[english]{babel}
 \fi
 \thesissetup{
diff --git a/fithesis3/test/law-slovak.tex b/fithesis3/test/law-slovak.tex
index 1e59cb9..25d70d1 100644
--- a/fithesis3/test/law-slovak.tex
+++ b/fithesis3/test/law-slovak.tex
@@ -4,7 +4,6 @@
   \usepackage{polyglossia}
   \setmainlanguage{slovak}
 \else
-  \usepackage[utf8]{inputenc}
   \usepackage[slovak]{babel}
 \fi
 \thesissetup{
diff --git a/fithesis3/test/med-czech.tex b/fithesis3/test/med-czech.tex
index 37404d1..05c568e 100644
--- a/fithesis3/test/med-czech.tex
+++ b/fithesis3/test/med-czech.tex
@@ -4,7 +4,6 @@
   \usepackage{polyglossia}
   \setmainlanguage{czech}
 \else
-  \usepackage[utf8]{inputenc}
   \usepackage[czech]{babel}
 \fi
 \thesissetup{
diff --git a/fithesis3/test/med-english.tex b/fithesis3/test/med-english.tex
index 079eda9..357221b 100644
--- a/fithesis3/test/med-english.tex
+++ b/fithesis3/test/med-english.tex
@@ -4,7 +4,6 @@
   \usepackage{polyglossia}
   \setmainlanguage{english}
 \else
-  \usepackage[utf8]{inputenc}
   \usepackage[english]{babel}
 \fi
 \thesissetup{
diff --git a/fithesis3/test/med-slovak.tex b/fithesis3/test/med-slovak.tex
index 820dfd2..47ad61d 100644
--- a/fithesis3/test/med-slovak.tex
+++ b/fithesis3/test/med-slovak.tex
@@ -4,7 +4,6 @@
   \usepackage{polyglossia}
   \setmainlanguage{slovak}
 \else
-  \usepackage[utf8]{inputenc}
   \usepackage[slovak]{babel}
 \fi
 \thesissetup{
diff --git a/fithesis3/test/ped-czech.tex b/fithesis3/test/ped-czech.tex
index 284531f..2cfc451 100644
--- a/fithesis3/test/ped-czech.tex
+++ b/fithesis3/test/ped-czech.tex
@@ -4,7 +4,6 @@
   \usepackage{polyglossia}
   \setmainlanguage{czech}
 \else
-  \usepackage[utf8]{inputenc}
   \usepackage[czech]{babel}
 \fi
 \thesissetup{
diff --git a/fithesis3/test/ped-english.tex b/fithesis3/test/ped-english.tex
index 6f0dfd9..debe305 100644
--- a/fithesis3/test/ped-english.tex
+++ b/fithesis3/test/ped-english.tex
@@ -4,7 +4,6 @@
   \usepackage{polyglossia}
   \setmainlanguage{english}
 \else
-  \usepackage[utf8]{inputenc}
   \usepackage[english]{babel}
 \fi
 \thesissetup{
diff --git a/fithesis3/test/ped-slovak.tex b/fithesis3/test/ped-slovak.tex
index 12e822a..25b1539 100644
--- a/fithesis3/test/ped-slovak.tex
+++ b/fithesis3/test/ped-slovak.tex
@@ -4,7 +4,6 @@
   \usepackage{polyglossia}
   \setmainlanguage{slovak}
 \else
-  \usepackage[utf8]{inputenc}
   \usepackage[slovak]{babel}
 \fi
 \thesissetup{
diff --git a/fithesis3/test/phil-czech.tex b/fithesis3/test/phil-czech.tex
index 005ef7a..6344263 100644
--- a/fithesis3/test/phil-czech.tex
+++ b/fithesis3/test/phil-czech.tex
@@ -4,7 +4,6 @@
   \usepackage{polyglossia}
   \setmainlanguage{czech}
 \else
-  \usepackage[utf8]{inputenc}
   \usepackage[czech]{babel}
 \fi
 \thesissetup{
diff --git a/fithesis3/test/phil-english.tex b/fithesis3/test/phil-english.tex
index fc94fdf..b0a602d 100644
--- a/fithesis3/test/phil-english.tex
+++ b/fithesis3/test/phil-english.tex
@@ -4,7 +4,6 @@
   \usepackage{polyglossia}
   \setmainlanguage{english}
 \else
-  \usepackage[utf8]{inputenc}
   \usepackage[english]{babel}
 \fi
 \thesissetup{
diff --git a/fithesis3/test/phil-slovak.tex b/fithesis3/test/phil-slovak.tex
index 09d0306..c754e55 100644
--- a/fithesis3/test/phil-slovak.tex
+++ b/fithesis3/test/phil-slovak.tex
@@ -4,7 +4,6 @@
   \usepackage{polyglossia}
   \setmainlanguage{slovak}
 \else
-  \usepackage[utf8]{inputenc}
   \usepackage[slovak]{babel}
 \fi
 \thesissetup{
diff --git a/fithesis3/test/sci-color.tex b/fithesis3/test/sci-color.tex
index 9503071..c365752 100644
--- a/fithesis3/test/sci-color.tex
+++ b/fithesis3/test/sci-color.tex
@@ -1,8 +1,4 @@
 \documentclass[color]{../fithesis3}
-\usepackage{ifxetex}
-\ifxetex\else
-  \usepackage[utf8]{inputenc}
-\fi
 \thesissetup{
   basepath=..,
   faculty=sci}
diff --git a/fithesis3/test/sci-czech.tex b/fithesis3/test/sci-czech.tex
index 14f257f..4b72201 100644
--- a/fithesis3/test/sci-czech.tex
+++ b/fithesis3/test/sci-czech.tex
@@ -4,7 +4,6 @@
   \usepackage{polyglossia}
   \setmainlanguage{czech}
 \else
-  \usepackage[utf8]{inputenc}
   \usepackage[czech]{babel}
 \fi
 \thesissetup{
diff --git a/fithesis3/test/sci-english.tex b/fithesis3/test/sci-english.tex
index c86ab4f..6a27cc3 100644
--- a/fithesis3/test/sci-english.tex
+++ b/fithesis3/test/sci-english.tex
@@ -4,7 +4,6 @@
   \usepackage{polyglossia}
   \setmainlanguage{english}
 \else
-  \usepackage[utf8]{inputenc}
   \usepackage[english]{babel}
 \fi
 \thesissetup{
diff --git a/fithesis3/test/sci-female.tex b/fithesis3/test/sci-female.tex
index 4922b64..bdb6062 100644
--- a/fithesis3/test/sci-female.tex
+++ b/fithesis3/test/sci-female.tex
@@ -4,7 +4,6 @@
   \usepackage{polyglossia}
   \setmainlanguage{slovak}
 \else
-  \usepackage[utf8]{inputenc}
   \usepackage[slovak]{babel}
 \fi
 \thesissetup{
diff --git a/fithesis3/test/sci-male.tex b/fithesis3/test/sci-male.tex
index 672b651..c8f7623 100644
--- a/fithesis3/test/sci-male.tex
+++ b/fithesis3/test/sci-male.tex
@@ -4,7 +4,6 @@
   \usepackage{polyglossia}
   \setmainlanguage{slovak}
 \else
-  \usepackage[utf8]{inputenc}
   \usepackage[slovak]{babel}
 \fi
 \thesissetup{
diff --git a/fithesis3/test/sci-rigorous.tex b/fithesis3/test/sci-rigorous.tex
index aff5283..978cd09 100644
--- a/fithesis3/test/sci-rigorous.tex
+++ b/fithesis3/test/sci-rigorous.tex
@@ -4,7 +4,6 @@
   \usepackage{polyglossia}
   \setmainlanguage{slovak}
 \else
-  \usepackage[utf8]{inputenc}
   \usepackage[slovak]{babel}
 \fi
 \thesissetup{
diff --git a/fithesis3/test/sci-slovak.tex b/fithesis3/test/sci-slovak.tex
index e810b3e..9e5dc81 100644
--- a/fithesis3/test/sci-slovak.tex
+++ b/fithesis3/test/sci-slovak.tex
@@ -4,7 +4,6 @@
   \usepackage{polyglossia}
   \setmainlanguage{slovak}
 \else
-  \usepackage[utf8]{inputenc}
   \usepackage[slovak]{babel}
 \fi
 \thesissetup{
diff --git a/fithesis3/test/texput.log b/fithesis3/test/texput.log
new file mode 100644
index 0000000..49e7c7d
--- /dev/null
+++ b/fithesis3/test/texput.log
@@ -0,0 +1,21 @@
+This is pdfTeX, Version 3.1415926-2.5-1.40.14 (TeX Live 2013/Debian) (format=pdflatex 2014.4.18)  3 MAY 2015 23:22
+entering extended mode
+ restricted \write18 enabled.
+ %&-line parsing enabled.
+**current.tex
+
+! Emergency stop.
+<*> current.tex
+               
+End of file on the terminal!
+
+ 
+Here is how much of TeX's memory you used:
+ 2 strings out of 493304
+ 101 string characters out of 6139871
+ 51880 words of memory out of 5000000
+ 3564 multiletter control sequences out of 15000+600000
+ 3640 words of font info for 14 fonts, out of 8000000 for 9000
+ 957 hyphenation exceptions out of 8191
+ 0i,0n,0p,1b,6s stack positions out of 5000i,500n,10000p,200000b,80000s
+!  ==> Fatal error occurred, no output PDF file produced!
diff --git a/pdflatex.tex b/pdflatex.tex
index a177fe7..9e4603e 100644
--- a/pdflatex.tex
+++ b/pdflatex.tex
@@ -1,9 +1,9 @@
 \documentclass[color,cover]{fithesis3/fithesis3}
-\usepackage[utf8]{inputenc}
 \usepackage[english]{babel}
 \usepackage{amsmath}
 \usepackage{tabularx}
 \usepackage{booktabs}
+\thesissetup{faculty=fi}
 \begin{document}
   \chapter{Foo bar}
   Hello world!
diff --git a/xelatex.tex b/xelatex.tex
index cb1f313..7a7757c 100644
--- a/xelatex.tex
+++ b/xelatex.tex
@@ -4,6 +4,7 @@
 \usepackage{amsmath}
 \usepackage{tabularx}
 \usepackage{booktabs}
+\thesissetup{faculty=fi}
 \begin{document}
   \chapter{Foo bar}
   Hello world!
-- 
GitLab