Skip to content
Snippets Groups Projects
Commit c9f6f47f authored by witiko's avatar witiko
Browse files

Added the user guide.

parent 6ce71bc5
No related branches found
No related tags found
No related merge requests found
Showing
with 610 additions and 75 deletions
.PHONY: all clear
all:
cd fithesis3 && make
make -C fithesis3
make pdflatex.pdf xelatex.pdf clear
# This target typesets the pdfLaTeX example.
......
.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
......@@ -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}
......
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)
\thesissetup{basepath=../../..}
\begin{document}
Hello world!
\end{document}
\documentclass{../../../fithesis3}
\thesissetup{
faculty=fi,
basepath=../../..,
autoLayout=false}
\begin{document}
A document which, except for this line,
is completely empty.
\end{document}
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)
\documentclass{../../../fithesis3}
\thesissetup{faculty=econ}
\input01
\documentclass{../../../fithesis3}
\thesissetup{faculty=fi}
\input01
\documentclass{../../../fithesis3}
\thesissetup{faculty=fsps}
\input01
\documentclass{../../../fithesis3}
\thesissetup{faculty=fss}
\input01
\documentclass{../../../fithesis3}
\thesissetup{faculty=law}
\input01
\documentclass{../../../fithesis3}
\thesissetup{faculty=med}
\input01
\documentclass{../../../fithesis3}
\thesissetup{faculty=ped}
\input01
\documentclass{../../../fithesis3}
\thesissetup{faculty=phil}
\input01
\documentclass{../../../fithesis3}
\thesissetup{faculty=sci}
\input01
@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}}
\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}
......@@ -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>
......
......@@ -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}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment