From e0c6872cf40896c7be36b11dcc744620f10adf1d Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Mon, 2 Sep 2019 13:46:59 +0900 Subject: Initial commit --- .../latex/contrib/fithesis/example/mu/DESCRIPTION | 2 + macros/latex/contrib/fithesis/example/mu/Makefile | 2 + .../contrib/fithesis/example/mu/econ-lualatex.pdf | Bin 0 -> 151835 bytes .../contrib/fithesis/example/mu/econ-lualatex.tex | 686 ++++++++++++++++++++ .../contrib/fithesis/example/mu/econ-pdflatex.pdf | Bin 0 -> 395422 bytes .../contrib/fithesis/example/mu/econ-pdflatex.tex | 693 ++++++++++++++++++++ .../latex/contrib/fithesis/example/mu/example.bib | 123 ++++ .../contrib/fithesis/example/mu/fi-lualatex.pdf | Bin 0 -> 160530 bytes .../contrib/fithesis/example/mu/fi-lualatex.tex | 651 +++++++++++++++++++ .../contrib/fithesis/example/mu/fi-pdflatex.pdf | Bin 0 -> 403959 bytes .../contrib/fithesis/example/mu/fi-pdflatex.tex | 658 +++++++++++++++++++ .../contrib/fithesis/example/mu/fsps-lualatex.pdf | Bin 0 -> 159235 bytes .../contrib/fithesis/example/mu/fsps-lualatex.tex | 645 +++++++++++++++++++ .../contrib/fithesis/example/mu/fsps-pdflatex.pdf | Bin 0 -> 402743 bytes .../contrib/fithesis/example/mu/fsps-pdflatex.tex | 652 +++++++++++++++++++ .../contrib/fithesis/example/mu/fss-lualatex.pdf | Bin 0 -> 159852 bytes .../contrib/fithesis/example/mu/fss-lualatex.tex | 658 +++++++++++++++++++ .../contrib/fithesis/example/mu/fss-pdflatex.pdf | Bin 0 -> 403320 bytes .../contrib/fithesis/example/mu/fss-pdflatex.tex | 665 ++++++++++++++++++++ .../contrib/fithesis/example/mu/law-lualatex.pdf | Bin 0 -> 173889 bytes .../contrib/fithesis/example/mu/law-lualatex.tex | 659 +++++++++++++++++++ .../contrib/fithesis/example/mu/law-pdflatex.pdf | Bin 0 -> 417353 bytes .../contrib/fithesis/example/mu/law-pdflatex.tex | 666 ++++++++++++++++++++ .../contrib/fithesis/example/mu/med-lualatex.pdf | Bin 0 -> 149373 bytes .../contrib/fithesis/example/mu/med-lualatex.tex | 661 +++++++++++++++++++ .../contrib/fithesis/example/mu/med-pdflatex.pdf | Bin 0 -> 392952 bytes .../contrib/fithesis/example/mu/med-pdflatex.tex | 668 ++++++++++++++++++++ .../contrib/fithesis/example/mu/ped-lualatex.pdf | Bin 0 -> 158066 bytes .../contrib/fithesis/example/mu/ped-lualatex.tex | 662 +++++++++++++++++++ .../contrib/fithesis/example/mu/ped-pdflatex.pdf | Bin 0 -> 401356 bytes .../contrib/fithesis/example/mu/ped-pdflatex.tex | 669 ++++++++++++++++++++ .../contrib/fithesis/example/mu/phil-lualatex.pdf | Bin 0 -> 159786 bytes .../contrib/fithesis/example/mu/phil-lualatex.tex | 650 +++++++++++++++++++ .../contrib/fithesis/example/mu/phil-pdflatex.pdf | Bin 0 -> 402870 bytes .../contrib/fithesis/example/mu/phil-pdflatex.tex | 657 +++++++++++++++++++ .../contrib/fithesis/example/mu/sci-lualatex.pdf | Bin 0 -> 180370 bytes .../contrib/fithesis/example/mu/sci-lualatex.tex | 693 ++++++++++++++++++++ .../contrib/fithesis/example/mu/sci-pdflatex.pdf | Bin 0 -> 427910 bytes .../contrib/fithesis/example/mu/sci-pdflatex.tex | 700 +++++++++++++++++++++ 39 files changed, 12120 insertions(+) create mode 100644 macros/latex/contrib/fithesis/example/mu/DESCRIPTION create mode 100644 macros/latex/contrib/fithesis/example/mu/Makefile create mode 100644 macros/latex/contrib/fithesis/example/mu/econ-lualatex.pdf create mode 100644 macros/latex/contrib/fithesis/example/mu/econ-lualatex.tex create mode 100644 macros/latex/contrib/fithesis/example/mu/econ-pdflatex.pdf create mode 100644 macros/latex/contrib/fithesis/example/mu/econ-pdflatex.tex create mode 100644 macros/latex/contrib/fithesis/example/mu/example.bib create mode 100644 macros/latex/contrib/fithesis/example/mu/fi-lualatex.pdf create mode 100644 macros/latex/contrib/fithesis/example/mu/fi-lualatex.tex create mode 100644 macros/latex/contrib/fithesis/example/mu/fi-pdflatex.pdf create mode 100644 macros/latex/contrib/fithesis/example/mu/fi-pdflatex.tex create mode 100644 macros/latex/contrib/fithesis/example/mu/fsps-lualatex.pdf create mode 100644 macros/latex/contrib/fithesis/example/mu/fsps-lualatex.tex create mode 100644 macros/latex/contrib/fithesis/example/mu/fsps-pdflatex.pdf create mode 100644 macros/latex/contrib/fithesis/example/mu/fsps-pdflatex.tex create mode 100644 macros/latex/contrib/fithesis/example/mu/fss-lualatex.pdf create mode 100644 macros/latex/contrib/fithesis/example/mu/fss-lualatex.tex create mode 100644 macros/latex/contrib/fithesis/example/mu/fss-pdflatex.pdf create mode 100644 macros/latex/contrib/fithesis/example/mu/fss-pdflatex.tex create mode 100644 macros/latex/contrib/fithesis/example/mu/law-lualatex.pdf create mode 100644 macros/latex/contrib/fithesis/example/mu/law-lualatex.tex create mode 100644 macros/latex/contrib/fithesis/example/mu/law-pdflatex.pdf create mode 100644 macros/latex/contrib/fithesis/example/mu/law-pdflatex.tex create mode 100644 macros/latex/contrib/fithesis/example/mu/med-lualatex.pdf create mode 100644 macros/latex/contrib/fithesis/example/mu/med-lualatex.tex create mode 100644 macros/latex/contrib/fithesis/example/mu/med-pdflatex.pdf create mode 100644 macros/latex/contrib/fithesis/example/mu/med-pdflatex.tex create mode 100644 macros/latex/contrib/fithesis/example/mu/ped-lualatex.pdf create mode 100644 macros/latex/contrib/fithesis/example/mu/ped-lualatex.tex create mode 100644 macros/latex/contrib/fithesis/example/mu/ped-pdflatex.pdf create mode 100644 macros/latex/contrib/fithesis/example/mu/ped-pdflatex.tex create mode 100644 macros/latex/contrib/fithesis/example/mu/phil-lualatex.pdf create mode 100644 macros/latex/contrib/fithesis/example/mu/phil-lualatex.tex create mode 100644 macros/latex/contrib/fithesis/example/mu/phil-pdflatex.pdf create mode 100644 macros/latex/contrib/fithesis/example/mu/phil-pdflatex.tex create mode 100644 macros/latex/contrib/fithesis/example/mu/sci-lualatex.pdf create mode 100644 macros/latex/contrib/fithesis/example/mu/sci-lualatex.tex create mode 100644 macros/latex/contrib/fithesis/example/mu/sci-pdflatex.pdf create mode 100644 macros/latex/contrib/fithesis/example/mu/sci-pdflatex.tex (limited to 'macros/latex/contrib/fithesis/example/mu') diff --git a/macros/latex/contrib/fithesis/example/mu/DESCRIPTION b/macros/latex/contrib/fithesis/example/mu/DESCRIPTION new file mode 100644 index 0000000000..e875f3124c --- /dev/null +++ b/macros/latex/contrib/fithesis/example/mu/DESCRIPTION @@ -0,0 +1,2 @@ +This directory contains example documents for the various faculties +of the Masaryk University (Brno, Czech Republic). diff --git a/macros/latex/contrib/fithesis/example/mu/Makefile b/macros/latex/contrib/fithesis/example/mu/Makefile new file mode 100644 index 0000000000..c9bda433fb --- /dev/null +++ b/macros/latex/contrib/fithesis/example/mu/Makefile @@ -0,0 +1,2 @@ +.PHONY: implode +implode: diff --git a/macros/latex/contrib/fithesis/example/mu/econ-lualatex.pdf b/macros/latex/contrib/fithesis/example/mu/econ-lualatex.pdf new file mode 100644 index 0000000000..1af9961166 Binary files /dev/null and b/macros/latex/contrib/fithesis/example/mu/econ-lualatex.pdf differ diff --git a/macros/latex/contrib/fithesis/example/mu/econ-lualatex.tex b/macros/latex/contrib/fithesis/example/mu/econ-lualatex.tex new file mode 100644 index 0000000000..a41a25d719 --- /dev/null +++ b/macros/latex/contrib/fithesis/example/mu/econ-lualatex.tex @@ -0,0 +1,686 @@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% I, the copyright holder of this work, release this work into the +%% public domain. This applies worldwide. In some countries this may +%% not be legally possible; if so: I grant anyone the right to use +%% this work for any purpose, without any conditions, unless such +%% conditions are required by law. +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\documentclass[ + digital, %% This option enables the default options for the + %% digital version of a document. Replace with `printed` + %% to enable the default options for the printed version + %% of a document. + twoside, %% This option enables double-sided typesetting. Use at + %% least 120 g/m² paper to prevent show-through. Replace + %% with `oneside` to use one-sided typesetting; use only + %% if you don’t have access to a double-sided printer, + %% or if one-sided typesetting is a formal requirement + %% at your faculty. + table, %% This option causes the coloring of tables. Replace + %% with `notable` to restore plain LaTeX tables. + lof, %% This option prints the List of Figures. Replace with + %% `nolof` to hide the List of Figures. + lot, %% This option prints the List of Tables. Replace with + %% `nolot` to hide the List of Tables. + %% More options are listed in the user guide at + %% . +]{fithesis3} +%% The following section sets up the locales used in the thesis. +\usepackage{polyglossia} %% By using `czech` or `slovak` as the +\setmainlanguage{english} %% main locale instead of `english`, you +%% can typeset the thesis in either Czech or Slovak, respectively. +\setotherlanguages{german, russian, czech, slovak} %% The +%% +%% \begin{otherlanguage}{german} ... \end{otherlanguage} +%% \begin{otherlanguage}{russian} ... \end{otherlanguage} +%% \begin{otherlanguage}{czech} ... \end{otherlanguage} +%% \begin{otherlanguage}{slovak} ... \end{otherlanguage} +%% +%% For non-Latin scripts, it may be necessary to load additional +%% fonts: +\newfontfamily\russianfont[Script=Cyrillic,Ligatures=TeX]{PT Serif} +%% +%% The following section sets up the metadata of the thesis. +\thesissetup{ + date = \the\year/\the\month/\the\day, + autoLayout = false, + university = mu, + faculty = econ, + type = bc, + field = Applied Econometrics, + department = Department of Finance, + author = Jane Doe, + gender = f, + advisor = John Smith, + extra = { + advisorCsGenitiv = {Johna Smithe}, + advisorSkGenitiv = {Johna Smitha}, + }, + title = The Economic Value of LaTeX, + TeXtitle = The Economic Value of \LaTeX, + keywords = {keyword1, keyword2, ...}, + TeXkeywords = {keyword1, keyword2, \ldots}, + abstract = {This is the abstract of my thesis, which + can + + span multiple paragraphs.}, + thanks = {These are the acknowledgements for my + thesis, which can + + span multiple paragraphs.}, + bib = example.bib, + %% Uncomment the following line (by removing the % symbol at + %% the beginning) and replace `assignment.pdf` with the + %% filename of your scanned thesis assignment. + % assignment = assignment.pdf, + %% The following keys are only useful, when you're using a + %% locale other than English. You can safely omit them in an + %% English thesis. + titleEn = The Economic Value of LaTeX, + TeXtitleEn = The Economic Value of \LaTeX, + keywordsEn = {keyword1, keyword2, ...}, + TeXkeywordsEn = {keyword1, keyword2, \ldots}, + abstractEn = {This is the English abstract of my + thesis, which can + + span multiple paragraphs.}, +} +\usepackage{makeidx} %% The `makeidx` package contains +\makeindex %% helper commands for index typesetting. +%% These additional packages are used within the document: +\usepackage{paralist} %% Compact list environments +\usepackage{amsmath} %% Mathematics +\usepackage{amsthm} +\usepackage{amsfonts} +\usepackage{url} %% Hyperlinks +\usepackage{markdown} %% Lightweight markup +\usepackage{listings} %% Source code highlighting +\lstset{ + basicstyle = \ttfamily,% + identifierstyle = \color{black},% + keywordstyle = \color{blue},% + keywordstyle = {[2]\color{cyan}},% + keywordstyle = {[3]\color{olive}},% + stringstyle = \color{teal},% + commentstyle = \itshape\color{magenta}} +\usepackage{floatrow} %% Putting captions above tables +\floatsetup[table]{capposition=top} +\usepackage{chngcntr} +\counterwithout{table}{chapter} % Flat numbering of tables. +\counterwithout{figure}{chapter} % Flat numbering of figures. +\begin{document} +\makeatletter + \thesis@preamble %% Print the preamble. +\makeatother + +\chapter*{Introduction} +\addcontentsline{toc}{chapter}{Introduction} + +Theses are rumoured to be the capstones of education, so I decided +to write one of my own. If all goes well, I will soon have a +diploma under my belt. Wish me luck! + +\begin{otherlanguage}{czech} +Říká se, že závěrečné práce jsou vyvrcholením studia a tak jsem se +rozhodl jednu také napsat. Pokud vše půjde podle plánu, odnesu si +na konci semestru diplom. Držte mi palce! +\end{otherlanguage} + +\begin{otherlanguage}{slovak} +Hovorí sa, že záverečné práce sú vyvrcholením štúdia a tak som sa +rozhodol jednu tiež napísať. Ak všetko pôjde podľa plánu, odnesiem +si na konci semestra diplom. Držte mi palce! +\end{otherlanguage} + +\begin{otherlanguage}{german} +Man munkelt, dass die Dissertation die Krönung der Ausbildung ist. +Deshalb habe ich mich beschlossen meine eigene zu schreiben. Wenn +alles gut geht, bekomme ich bald ein Diplom. Wünsch mir Glück! +\end{otherlanguage} + +\begin{otherlanguage}{russian} +Говорят, что тезис -- это кульминация обучения. Поэтому я и решил +написать собственный тезис. Если всё сработает по плану, я скоро +получу диплом. Желайте мне удачи! +\end{otherlanguage} + +\chapter{These are} +\section{the available} +\subsection{sectioning} +\subsubsection{commands.} +\paragraph{Paragraphs and} +\subparagraph{subparagraphs are available as well.} +Inside the text, you can also use unnumbered lists, +\begin{itemize} + \item such as + \item this one + \begin{itemize} + \item and they can be nested as well. + \item[>>] You can even turn the bullets into something fancier, + \item[\S] if you so desire. + \end{itemize} +\end{itemize} +Numbered lists are +\begin{enumerate} + \item very + \begin{enumerate} + \item similar + \end{enumerate} +\end{enumerate} +and so are description lists: +\begin{description} + \item[Description list] + A list of terms with a description of each term +\end{description} +The spacing of these lists is geared towards paragraphs of text. +For lists of words and phrases, the \textsf{paralist} package +offers commands +\begin{compactitem} + \item that + \begin{compactitem} + \item are + \begin{compactitem} + \item better + \begin{compactitem} + \item suited + \end{compactitem} + \end{compactitem} + \end{compactitem} +\end{compactitem} +\begin{compactenum} + \item to + \begin{compactenum} + \item this + \begin{compactenum} + \item kind of + \begin{compactenum} + \item content. + \end{compactenum} + \end{compactenum} + \end{compactenum} +\end{compactenum} +The \textsf{amsthm} package provides the commands necessary for the +typesetting of mathematical definitions, theorems, lemmas and +proofs. + +%% We will define several mathematical sectioning commands. +\newtheorem{theorem}{Theorem}[section] %% The numbering of theorems + %% will be reset after each section. +\newtheorem{lemma}[theorem]{Lemma} %% The numbering of lemmas +\newtheorem{corollary}[theorem]{Corollary} %% and corollaries will + %% share the counter with theorems. +\theoremstyle{definition} +\newtheorem{definition}{Definition} +\theoremstyle{remark} +\newtheorem*{remark}{Remark} + +\begin{theorem} + This is a theorem that offers a profound insight into the + mathematical sectioning commands. +\end{theorem} +\begin{theorem}[Another theorem] + This is another theorem. Unlike the first one, this theorem has + been endowed with a name. +\end{theorem} +\begin{lemma} + Let us suppose that $x^2+y^2=z^2$. Then + \begin{equation} + \biggl\langle u\biggm|\sum_{i=1}^nF(e_i,v)e_i\biggr\rangle + =F\biggl(\sum_{i=1}^n\langle e_i|u\rangle e_i,v\biggr). + \end{equation} +\end{lemma} +\begin{proof} + $\nabla^2 f(x,y)=\frac{\partial^2f}{\partial x^2}+ + \frac{\partial^2f}{\partial y^2}$. +\end{proof} +\begin{corollary} + This is a corollary. +\end{corollary} +\begin{remark} + This is a remark. +\end{remark} + +\chapter{Floats and references} +\begin{figure} + \begin{center} + %% PNG and JPG images can be inserted into the document as well, + %% but their resolution needs to be adequate. The minimum is + %% about 100 pixels per 1 centimeter or 300 pixels per 1 inch. + %% That means that a JPG or PNG image typeset at 4 × 4 cm should + %% be 400 × 400 px large at the bare minimum. + %% + %% The optimum is about 250 pixels per 1 centimeter or 600 + %% pixels per 1 inch. That means that a JPG or PNG image typeset + %% at 4 × 4 cm should be 1000 × 1000 px large or larger. + \includegraphics[width=4cm]{fithesis/logo/mu/fithesis-base.pdf} + \end{center} + \emph{Source: <>} + \caption{The logo of the Masaryk University at 40\,mm} + \label{fig:mulogo1} +\end{figure} + +\begin{figure} + \begin{center} + \begin{minipage}{.66\textwidth} + \includegraphics[width=\textwidth]{fithesis/logo/mu/fithesis-base.pdf} + \end{minipage} + \begin{minipage}{.33\textwidth} + \includegraphics[width=\textwidth]{fithesis/logo/mu/fithesis-base.pdf} \\ + \includegraphics[width=\textwidth]{fithesis/logo/mu/fithesis-base.pdf} + \end{minipage} + \end{center} + \emph{Source: <>} + \caption{The logo of the Masaryk University at $\frac23$ and + $\frac13$ of text width} + \label{fig:mulogo2} +\end{figure} + +\begin{table} + \begin{tabularx}{\textwidth}{lllX} + \toprule + Day & Min Temp & Max Temp & Summary \\ + \midrule + Monday & $13^{\circ}\mathrm{C}$ & $21^\circ\mathrm{C}$ & A + clear day with low wind and no adverse current advisories. \\ + Tuesday & $11^{\circ}\mathrm{C}$ & $17^\circ\mathrm{C}$ & A + trough of low pressure will come from the northwest. \\ + Wednesday & $10^{\circ}\mathrm{C}$ & + $21^\circ\mathrm{C}$ & Rain will spread to all parts during the + morning. \\ + \bottomrule + \end{tabularx} + \vskip\abovecaptionskip\emph{Source: <>} + \caption{A weather forecast} + \label{tab:weather} +\end{table} + +The logo of the Masaryk University is shown in Figure +\ref{fig:mulogo1} and Figure \ref{fig:mulogo2} at pages +\pageref{fig:mulogo1} and \pageref{fig:mulogo2}. The weather +forecast is shown in Table \ref{tab:weather} at page +\pageref{tab:weather}. The following chapter is Chapter +\ref{chap:matheq} and starts at page \pageref{chap:matheq}. +Items \ref{item:star1}, \ref{item:star2}, and +\ref{item:star3} are starred in the following list: +\begin{compactenum} + \item some text + \item some other text + \item $\star$ \label{item:star1} + \begin{compactenum} + \item some text + \item $\star$ \label{item:star2} + \item some other text + \begin{compactenum} + \item some text + \item some other text + \item yet another piece of text + \item $\star$ \label{item:star3} + \end{compactenum} + \item yet another piece of text + \end{compactenum} + \item yet another piece of text +\end{compactenum} +If your reference points to a place that has not yet been typeset, +the \verb"\ref" command will expand to \textbf{??} during the first +run of +\texttt{lualatex \jobname.tex} +and a second run is going to be needed for the references to +resolve. With online services -- such as Overleaf -- this is +performed automatically. + +\chapter{Mathematical equations} +\label{chap:matheq} +\TeX{} comes pre-packed with the ability to typeset inline +equations, such as $\mathrm{e}^{ix}=\cos x+i\sin x$, and display +equations, such as \[ + \mathbf{A}^{-1} = \begin{bmatrix} + a & b \\ c & d \\ + \end{bmatrix}^{-1} = + \frac{1}{\det(\mathbf{A})} \begin{bmatrix} + \,\,\,d & \!\!-b \\ -c & \,a \\ + \end{bmatrix} = + \frac{1}{ad - bc} \begin{bmatrix} + \,\,\,d & \!\!-b \\ -c & \,a \\ + \end{bmatrix}. +\] \LaTeX{} defines the automatically numbered \texttt{equation} +environment: +\begin{equation} + \gamma Px = PAx = PAP^{-1}Px. +\end{equation} +The package \textsf{amsmath} provides several additional +environments that can be used to typeset complex equations: +\begin{enumerate} + \item An equation can be spread over multiple lines using the + \texttt{multline} environment: + \begin{multline} + a + b + c + d + e + f + b + c + d + e + f + b + c + d + e + +f \\ + + f + g + h + i + j + k + l + m + n + o + p + q + \end{multline} + + \item Several aligned equations can be typeset using the + \texttt{align} environment: + \begin{align} + a + b &= c + d \\ + u &= v + w + x \\[1ex] + i + j + k + l &= m + \end{align} + + \item The \texttt{alignat} environment is similar to + \texttt{align}, but it doesn't insert horizontal spaces between + the individual columns: + \begin{alignat}{2} + a + b + c &+ d & &= 0 \\ + e &+ f + g & &= 5 + \end{alignat} + + \item Much like chapter, sections, tables, figures, or list + items, equations -- such as \eqref{eq:first} and + \eqref{eq:mine} -- can also be labeled and referenced: + \begin{alignat}{4} + b_{11}x_1 &+ b_{12}x_2 & &+ b_{13}x_3 & & & + &= y_1, \label{eq:first} \\ + b_{21}x_1 &+ b_{22}x_2 & & & &+ b_{24}x_4 & + &= y_2. \tag{My equation} \label{eq:mine} + \end{alignat} + + \item The \texttt{gather} environment makes it possible to + typeset several equations without any alignment: + \begin{gather} + \psi = \psi\psi, \\ + \eta = \eta\eta\eta\eta\eta\eta, \\ + \theta = \theta. + \end{gather} + + \item Several cases can be typeset using the \texttt{cases} + environment: + \begin{equation} + |y| = \begin{cases} + \phantom-y & \text{if }z\geq0, \\ + -y & \text{otherwise}. + \end{cases} + \end{equation} +\end{enumerate} +For the complete list of environments and commands, consult the +\textsf{amsmath} package manual\footnote{ + See \url{http://mirrors.ctan.org/macros/latex/required/amslatex/math/amsldoc.pdf}. + The \texttt{\textbackslash url} command is provided by the + package \textsf{url}. +}. + +\chapter{\textnormal{We \textsf{have} \texttt{several} \textsc{fonts} + \textit{at} \textbf{disposal}}} +The serified roman font is used for the main body of the text. +\textit{Italics are typically used to denote emphasis or +quotations.} \texttt{The teletype font is typically used for source +code listings.} The \textbf{bold}, \textsc{small-caps} and +\textsf{sans-serif} variants of the base roman font can be used to +denote specific types of information. + +\tiny We \scriptsize can \footnotesize also \small change \normalsize +the \large font \Large size, \LARGE although \huge it \Huge +is \huge usually \LARGE not \Large necessary.\normalsize + +A wide variety of mathematical fonts is also available, such as: \[ + \mathrm{ABC}, \mathcal{ABC}, \mathbf{ABC}, \mathsf{ABC}, + \mathit{ABC}, \mathtt{ABC} +\] By loading the \textsf{amsfonts} packages, several additional +fonts will become available: \[ + \mathfrak{ABC}, \mathbb{ABC} +\] Many other mathematical fonts are available\footnote{ + See \url{http://tex.stackexchange.com/a/58124/70941}. +}. + +\chapter{Using lightweight markup} +\begin{markdown*}{% + hybrid, + definitionLists, + footnotes, + inlineFootnotes, + hashEnumerators, + fencedCode, + citations, + citationNbsps, +} + +If you decide that \LaTeX{} is too wordy for some parts of your +document, there are [packages](https://www.ctan.org/pkg/markdown +"Markdown") that allow you to use more lightweight markup next +to it. + + ![logo](fithesis/logo/mu/fithesis-base.pdf "The logo of the + Masaryk University") + +This is a bullet list. Unlike numbered lists, bulleted lists +contain an **unordered** set of bullet points. When a bullet point +contains multiple paragraphs, the list is typeset as follows: + + * The first item of a bullet list + + that spans several paragraphs, + * the second item of a bullet list, + * the third item of a bullet list. + +When none of the bullet points contains multiple paragraphs, the +list has a more compact form: + + * The first item of a bullet list, + * the second item of a bullet list, + * the third item of a bullet list. + +Unlike a bulleted list, a numbered list implies chronology or +ordering of the bullet points. When a bullet point +contains multiple paragraphs, the list is typeset as follows: + + 1. The first item of an ordered list + + that spans several paragraphs, + 2. the second item of an ordered list, + 3. the third item of an ordered list. + #. If you are feeling lazy, + #. you can use hash enumerators as well. + +When none of the bullet points contains multiple paragraphs, the +list has a more compact form: + + 6. The first item of an ordered list, + 7. the second item of an ordered list, + 8. the third item of an ordered list. + +Definition lists are used to provide definitions of terms. When +a definition contains multiple paragraphs, the list is typeset +as follows: + +Term 1 + +: Definition 1 + +*Term 2* + +: Definition 2 + + Some code, part of Definition 2 + + Third paragraph of Definition 2. + +When none of the bullet points contains multiple paragraphs, the +list has a more compact form: + +Term 1 +: Definition 1 +*Term 2* +: Definition 2 + +Block quotations are used to include an excerpt from an external +document in way that visually clearly separates the excerpt from +the rest of the work: + +> This is the first level of quoting. +> +> > This is nested blockquote. +> +> Back to the first level. + +Footnotes are used to include additional information to the +document that are not necessary for the understanding of the main +text. Here is a footnote reference^[Here is the footnote.] and +another.[^longnote] + +[^longnote]: Here's one with multiple blocks. + + Subsequent paragraphs are indented to show that they +belong to the previous footnote. + + Some code + + The whole paragraph can be indented, or just the first + line. In this way, multi-paragraph footnotes work like + multi-paragraph list items. + +Citations are used to provide bibliographical references to other +documents. This is a regular citation~[@borgman03, p. 123]. This is +an in-text citation: @borgman03\. You can also cite several authors +at once using both regular~[see @borgman03, p. 123; @greenberg98, +sec. 3.2; and @thanh01] and in-text citations: @borgman03 [p.123; +@greenberg98, sec. 3.2; @thanh01]. + +Code blocks are used to include source code listings into the +document: + + #include + #include + #include + #include + // This is a comment + int main(int argc, char **argv) + { + while (--c > 1 && !fork()); + sleep(c = atoi(v[c])); + printf("%d\n", c); + wait(0); + return 0; + } + +There is an alternative syntax for code blocks that allows you to +specify additional information, such as the language of the source +code. This information can be used for syntax highlighting: + +``` sh +#!/bin/sh +fac() { + if [ "$1" -leq 1 ]; then + echo 1 + else + echo $(("$1" * fac $(("$1" - 1)))) + fi +} +`````````````` + +~~~~~~ Ruby +# Here's a way to empty an array. +joe = [ 'eggs.', 'some', 'break', 'to', 'Have' ] +print(joe.pop, " ") while joe.size > 0 +print "\n" +~~~~~~ + +\end{markdown*} + +\chapter{Inserting the bibliography} +After linking a bibliography data\-base files to the document using +the \verb"\"\texttt{thesis\discretionary{-}{}{}setup\{bib\discretionary{=}{=}{=}% +\{\textit{file1},\textit{file2},\,\ldots\,\}\}} command, you can +start citing the entries. This is just dummy text +\parencite{borgman03} lightly sprinkled with citations +\parencite[p.~123]{greenberg98}. Several sources can be cited at +once: \cite{borgman03,greenberg98,thanh01}. +\citetitle{greenberg98} was written by \citeauthor{greenberg98} in +\citeyear{greenberg98}. We can also produce \textcite{greenberg98}% +. The full bibliographic citation is: +\emph{\fullcite{greenberg98}}. We can easily insert a bibliographic +citation into the footnote\footfullcite{greenberg98}. + +The \verb"\nocite" command will not generate any +output\nocite{muni}, but it will insert its arguments into +the bibliography. The \verb"\nocite{*}" command will insert all the +records in the bibliography database file into the bibliography. +Try uncommenting the command +%% \nocite{*} +and watch the bibliography section come apart at the seams. + +When typesetting the document for the first time, citing a +\texttt{work} will expand to [\textbf{work}] and the +\verb"\printbibliography" command will produce no output. It is now +necessary to generate the bibliography by running \texttt{biber +\jobname.bcf} from the command line and then by typesetting the +document again twice. During the first run, the bibliography +section and the citations will be typeset, and in the second run, +the bibliography section will appear in the table of contents. + +The \texttt{biber} command needs to be executed from within the +directory, where the \LaTeX\ source file is located. In Windows, +the command line can be opened in a directory by holding down the +\textsf{Shift} key and by clicking the right mouse button while +hovering the cursor over a directory. Select the \textsf{Open +Command Window Here} option in the context menu that opens shortly +afterwards. + +With online services -- such as Overleaf -- or when using an +automatic tool -- such as \LaTeX MK -- all commands are executed +automatically. When you omit the \verb"\printbibliography" command, +its location will be decided by the template. + + \printbibliography[heading=bibintoc] %% Print the bibliography. + +\chapter{Inserting the index} +After using the \verb"\makeindex" macro and loading the +\texttt{makeidx} package that provides additional indexing +commands, index entries can be created by issuing the \verb"\index" +command. \index{dummy text|(}It is possible to create ranged index +entries, which will encompass a span of text.\index{dummy text|)} +To insert complex typographic material -- such as $\alpha$ +\index{alpha@$\alpha$} or \TeX{} \index{TeX@\TeX} -- +into the index, you need to specify a text string, which will +determine how the entry will be sorted. It is also possible to +create hierarchal entries. \index{vehicles!trucks} +\index{vehicles!speed cars} + +After typesetting the document, it is necessary to generate the +index by running +\begin{center}% + \texttt{texindy -I latex -C utf8 -L }$\langle$\textit{locale}% + $\rangle$\texttt{ \jobname.idx} +\end{center} +from the command line, where $\langle$\textit{locale}$\rangle$ +corresponds to the main locale of your thesis -- such as +\texttt{english}, and then typesetting the document again. + +The \texttt{texindy} command needs to be executed from within the +directory, where the \LaTeX\ source file is located. In Windows, +the command line can be opened in a directory by holding down the +\textsf{Shift} key and by clicking the right mouse button while +hovering the cursor over a directory. Select the \textsf{Open Command +Window Here} option in the context menu that opens shortly +afterwards. + +With online services -- such as Overleaf -- the commands are +executed automatically, although the locale may be erroneously +detected, or the \texttt{makeindex} tool (which is only able to +sort entries that contain digits and letters of the English +alphabet) may be used instead of \texttt{texindy}. In either case, +the index will be ill-sorted. + + \makeatletter\thesis@blocks@clear\makeatother + \phantomsection %% Print the index and insert it into the + \addcontentsline{toc}{chapter}{\indexname} %% table of contents. + \printindex + +\makeatletter + \thesis@postamble %% Print the postamble. +\makeatother + +\appendix %% Start the appendices. +\chapter{An appendix} +Here you can insert the appendices of your thesis. + +\end{document} diff --git a/macros/latex/contrib/fithesis/example/mu/econ-pdflatex.pdf b/macros/latex/contrib/fithesis/example/mu/econ-pdflatex.pdf new file mode 100644 index 0000000000..2079d72e06 Binary files /dev/null and b/macros/latex/contrib/fithesis/example/mu/econ-pdflatex.pdf differ diff --git a/macros/latex/contrib/fithesis/example/mu/econ-pdflatex.tex b/macros/latex/contrib/fithesis/example/mu/econ-pdflatex.tex new file mode 100644 index 0000000000..cfc5539fc7 --- /dev/null +++ b/macros/latex/contrib/fithesis/example/mu/econ-pdflatex.tex @@ -0,0 +1,693 @@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% I, the copyright holder of this work, release this work into the +%% public domain. This applies worldwide. In some countries this may +%% not be legally possible; if so: I grant anyone the right to use +%% this work for any purpose, without any conditions, unless such +%% conditions are required by law. +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\documentclass[ + digital, %% This option enables the default options for the + %% digital version of a document. Replace with `printed` + %% to enable the default options for the printed version + %% of a document. + twoside, %% This option enables double-sided typesetting. Use at + %% least 120 g/m² paper to prevent show-through. Replace + %% with `oneside` to use one-sided typesetting; use only + %% if you don’t have access to a double-sided printer, + %% or if one-sided typesetting is a formal requirement + %% at your faculty. + table, %% This option causes the coloring of tables. Replace + %% with `notable` to restore plain LaTeX tables. + lof, %% This option prints the List of Figures. Replace with + %% `nolof` to hide the List of Figures. + lot, %% This option prints the List of Tables. Replace with + %% `nolot` to hide the List of Tables. + %% More options are listed in the user guide at + %% . +]{fithesis3} +%% The following section sets up the locales used in the thesis. +\usepackage[resetfonts]{cmap} %% We need to load the T2A font encoding +\usepackage[T1,T2A]{fontenc} %% to use the Cyrillic fonts with Russian texts. +\usepackage[ + main=english, %% By using `czech` or `slovak` as the main locale + %% instead of `english`, you can typeset the thesis + %% in either Czech or Slovak, respectively. + english, german, russian, czech, slovak %% The additional keys allow +]{babel} %% foreign texts to be typeset as follows: +%% +%% \begin{otherlanguage}{german} ... \end{otherlanguage} +%% \begin{otherlanguage}{russian} ... \end{otherlanguage} +%% \begin{otherlanguage}{czech} ... \end{otherlanguage} +%% \begin{otherlanguage}{slovak} ... \end{otherlanguage} +%% +%% For non-Latin scripts, it may be necessary to load additional +%% fonts: +\usepackage{paratype} +\def\textrussian#1{{\usefont{T2A}{PTSerif-TLF}{m}{rm}#1}} +%% +%% The following section sets up the metadata of the thesis. +\thesissetup{ + date = \the\year/\the\month/\the\day, + autoLayout = false, + university = mu, + faculty = econ, + type = bc, + field = Applied Econometrics, + department = Department of Finance, + author = Jane Doe, + gender = f, + advisor = John Smith, + extra = { + advisorCsGenitiv = {Johna Smithe}, + advisorSkGenitiv = {Johna Smitha}, + }, + title = The Economic Value of LaTeX, + TeXtitle = The Economic Value of \LaTeX, + keywords = {keyword1, keyword2, ...}, + TeXkeywords = {keyword1, keyword2, \ldots}, + abstract = {This is the abstract of my thesis, which + can + + span multiple paragraphs.}, + thanks = {These are the acknowledgements for my + thesis, which can + + span multiple paragraphs.}, + bib = example.bib, + %% Uncomment the following line (by removing the % symbol at + %% the beginning) and replace `assignment.pdf` with the + %% filename of your scanned thesis assignment. + % assignment = assignment.pdf, + %% The following keys are only useful, when you're using a + %% locale other than English. You can safely omit them in an + %% English thesis. + titleEn = The Economic Value of LaTeX, + TeXtitleEn = The Economic Value of \LaTeX, + keywordsEn = {keyword1, keyword2, ...}, + TeXkeywordsEn = {keyword1, keyword2, \ldots}, + abstractEn = {This is the English abstract of my + thesis, which can + + span multiple paragraphs.}, +} +\usepackage{makeidx} %% The `makeidx` package contains +\makeindex %% helper commands for index typesetting. +%% These additional packages are used within the document: +\usepackage{paralist} %% Compact list environments +\usepackage{amsmath} %% Mathematics +\usepackage{amsthm} +\usepackage{amsfonts} +\usepackage{url} %% Hyperlinks +\usepackage{markdown} %% Lightweight markup +\usepackage{listings} %% Source code highlighting +\lstset{ + basicstyle = \ttfamily,% + identifierstyle = \color{black},% + keywordstyle = \color{blue},% + keywordstyle = {[2]\color{cyan}},% + keywordstyle = {[3]\color{olive}},% + stringstyle = \color{teal},% + commentstyle = \itshape\color{magenta}} +\usepackage{floatrow} %% Putting captions above tables +\floatsetup[table]{capposition=top} +\usepackage{chngcntr} +\counterwithout{table}{chapter} % Flat numbering of tables. +\counterwithout{figure}{chapter} % Flat numbering of figures. +\begin{document} +\makeatletter + \thesis@preamble %% Print the preamble. +\makeatother + +\chapter*{Introduction} +\addcontentsline{toc}{chapter}{Introduction} + +Theses are rumoured to be the capstones of education, so I decided +to write one of my own. If all goes well, I will soon have a +diploma under my belt. Wish me luck! + +\begin{otherlanguage}{czech} +Říká se, že závěrečné práce jsou vyvrcholením studia a tak jsem se +rozhodl jednu také napsat. Pokud vše půjde podle plánu, odnesu si +na konci semestru diplom. Držte mi palce! +\end{otherlanguage} + +\begin{otherlanguage}{slovak} +Hovorí sa, že záverečné práce sú vyvrcholením štúdia a tak som sa +rozhodol jednu tiež napísať. Ak všetko pôjde podľa plánu, odnesiem +si na konci semestra diplom. Držte mi palce! +\end{otherlanguage} + +\begin{otherlanguage}{german} +Man munkelt, dass die Dissertation die Krönung der Ausbildung ist. +Deshalb habe ich mich beschlossen meine eigene zu schreiben. Wenn +alles gut geht, bekomme ich bald ein Diplom. Wünsch mir Glück! +\end{otherlanguage} + +\begin{otherlanguage}{russian}\textrussian{% +Говорят, что тезис -- это кульминация обучения. Поэтому я и решил +написать собственный тезис. Если всё сработает по плану, я скоро +получу диплом. Желайте мне удачи! +}\end{otherlanguage} + +\chapter{These are} +\section{the available} +\subsection{sectioning} +\subsubsection{commands.} +\paragraph{Paragraphs and} +\subparagraph{subparagraphs are available as well.} +Inside the text, you can also use unnumbered lists, +\begin{itemize} + \item such as + \item this one + \begin{itemize} + \item and they can be nested as well. + \item[>>] You can even turn the bullets into something fancier, + \item[\S] if you so desire. + \end{itemize} +\end{itemize} +Numbered lists are +\begin{enumerate} + \item very + \begin{enumerate} + \item similar + \end{enumerate} +\end{enumerate} +and so are description lists: +\begin{description} + \item[Description list] + A list of terms with a description of each term +\end{description} +The spacing of these lists is geared towards paragraphs of text. +For lists of words and phrases, the \textsf{paralist} package +offers commands +\begin{compactitem} + \item that + \begin{compactitem} + \item are + \begin{compactitem} + \item better + \begin{compactitem} + \item suited + \end{compactitem} + \end{compactitem} + \end{compactitem} +\end{compactitem} +\begin{compactenum} + \item to + \begin{compactenum} + \item this + \begin{compactenum} + \item kind of + \begin{compactenum} + \item content. + \end{compactenum} + \end{compactenum} + \end{compactenum} +\end{compactenum} +The \textsf{amsthm} package provides the commands necessary for the +typesetting of mathematical definitions, theorems, lemmas and +proofs. + +%% We will define several mathematical sectioning commands. +\newtheorem{theorem}{Theorem}[section] %% The numbering of theorems + %% will be reset after each section. +\newtheorem{lemma}[theorem]{Lemma} %% The numbering of lemmas +\newtheorem{corollary}[theorem]{Corollary} %% and corollaries will + %% share the counter with theorems. +\theoremstyle{definition} +\newtheorem{definition}{Definition} +\theoremstyle{remark} +\newtheorem*{remark}{Remark} + +\begin{theorem} + This is a theorem that offers a profound insight into the + mathematical sectioning commands. +\end{theorem} +\begin{theorem}[Another theorem] + This is another theorem. Unlike the first one, this theorem has + been endowed with a name. +\end{theorem} +\begin{lemma} + Let us suppose that $x^2+y^2=z^2$. Then + \begin{equation} + \biggl\langle u\biggm|\sum_{i=1}^nF(e_i,v)e_i\biggr\rangle + =F\biggl(\sum_{i=1}^n\langle e_i|u\rangle e_i,v\biggr). + \end{equation} +\end{lemma} +\begin{proof} + $\nabla^2 f(x,y)=\frac{\partial^2f}{\partial x^2}+ + \frac{\partial^2f}{\partial y^2}$. +\end{proof} +\begin{corollary} + This is a corollary. +\end{corollary} +\begin{remark} + This is a remark. +\end{remark} + +\chapter{Floats and references} +\begin{figure} + \begin{center} + %% PNG and JPG images can be inserted into the document as well, + %% but their resolution needs to be adequate. The minimum is + %% about 100 pixels per 1 centimeter or 300 pixels per 1 inch. + %% That means that a JPG or PNG image typeset at 4 × 4 cm should + %% be 400 × 400 px large at the bare minimum. + %% + %% The optimum is about 250 pixels per 1 centimeter or 600 + %% pixels per 1 inch. That means that a JPG or PNG image typeset + %% at 4 × 4 cm should be 1000 × 1000 px large or larger. + \includegraphics[width=4cm]{fithesis/logo/mu/fithesis-base.pdf} + \end{center} + \emph{Source: <>} + \caption{The logo of the Masaryk University at 40\,mm} + \label{fig:mulogo1} +\end{figure} + +\begin{figure} + \begin{center} + \begin{minipage}{.66\textwidth} + \includegraphics[width=\textwidth]{fithesis/logo/mu/fithesis-base.pdf} + \end{minipage} + \begin{minipage}{.33\textwidth} + \includegraphics[width=\textwidth]{fithesis/logo/mu/fithesis-base.pdf} \\ + \includegraphics[width=\textwidth]{fithesis/logo/mu/fithesis-base.pdf} + \end{minipage} + \end{center} + \emph{Source: <>} + \caption{The logo of the Masaryk University at $\frac23$ and + $\frac13$ of text width} + \label{fig:mulogo2} +\end{figure} + +\begin{table} + \begin{tabularx}{\textwidth}{lllX} + \toprule + Day & Min Temp & Max Temp & Summary \\ + \midrule + Monday & $13^{\circ}\mathrm{C}$ & $21^\circ\mathrm{C}$ & A + clear day with low wind and no adverse current advisories. \\ + Tuesday & $11^{\circ}\mathrm{C}$ & $17^\circ\mathrm{C}$ & A + trough of low pressure will come from the northwest. \\ + Wednesday & $10^{\circ}\mathrm{C}$ & + $21^\circ\mathrm{C}$ & Rain will spread to all parts during the + morning. \\ + \bottomrule + \end{tabularx} + \vskip\abovecaptionskip\emph{Source: <
>} + \caption{A weather forecast} + \label{tab:weather} +\end{table} + +The logo of the Masaryk University is shown in Figure +\ref{fig:mulogo1} and Figure \ref{fig:mulogo2} at pages +\pageref{fig:mulogo1} and \pageref{fig:mulogo2}. The weather +forecast is shown in Table \ref{tab:weather} at page +\pageref{tab:weather}. The following chapter is Chapter +\ref{chap:matheq} and starts at page \pageref{chap:matheq}. +Items \ref{item:star1}, \ref{item:star2}, and +\ref{item:star3} are starred in the following list: +\begin{compactenum} + \item some text + \item some other text + \item $\star$ \label{item:star1} + \begin{compactenum} + \item some text + \item $\star$ \label{item:star2} + \item some other text + \begin{compactenum} + \item some text + \item some other text + \item yet another piece of text + \item $\star$ \label{item:star3} + \end{compactenum} + \item yet another piece of text + \end{compactenum} + \item yet another piece of text +\end{compactenum} +If your reference points to a place that has not yet been typeset, +the \verb"\ref" command will expand to \textbf{??} during the first +run of +\texttt{pdflatex \jobname.tex} +and a second run is going to be needed for the references to +resolve. With online services -- such as Overleaf -- this is +performed automatically. + +\chapter{Mathematical equations} +\label{chap:matheq} +\TeX{} comes pre-packed with the ability to typeset inline +equations, such as $\mathrm{e}^{ix}=\cos x+i\sin x$, and display +equations, such as \[ + \mathbf{A}^{-1} = \begin{bmatrix} + a & b \\ c & d \\ + \end{bmatrix}^{-1} = + \frac{1}{\det(\mathbf{A})} \begin{bmatrix} + \,\,\,d & \!\!-b \\ -c & \,a \\ + \end{bmatrix} = + \frac{1}{ad - bc} \begin{bmatrix} + \,\,\,d & \!\!-b \\ -c & \,a \\ + \end{bmatrix}. +\] \LaTeX{} defines the automatically numbered \texttt{equation} +environment: +\begin{equation} + \gamma Px = PAx = PAP^{-1}Px. +\end{equation} +The package \textsf{amsmath} provides several additional +environments that can be used to typeset complex equations: +\begin{enumerate} + \item An equation can be spread over multiple lines using the + \texttt{multline} environment: + \begin{multline} + a + b + c + d + e + f + b + c + d + e + f + b + c + d + e + +f \\ + + f + g + h + i + j + k + l + m + n + o + p + q + \end{multline} + + \item Several aligned equations can be typeset using the + \texttt{align} environment: + \begin{align} + a + b &= c + d \\ + u &= v + w + x \\[1ex] + i + j + k + l &= m + \end{align} + + \item The \texttt{alignat} environment is similar to + \texttt{align}, but it doesn't insert horizontal spaces between + the individual columns: + \begin{alignat}{2} + a + b + c &+ d & &= 0 \\ + e &+ f + g & &= 5 + \end{alignat} + + \item Much like chapter, sections, tables, figures, or list + items, equations -- such as \eqref{eq:first} and + \eqref{eq:mine} -- can also be labeled and referenced: + \begin{alignat}{4} + b_{11}x_1 &+ b_{12}x_2 & &+ b_{13}x_3 & & & + &= y_1, \label{eq:first} \\ + b_{21}x_1 &+ b_{22}x_2 & & & &+ b_{24}x_4 & + &= y_2. \tag{My equation} \label{eq:mine} + \end{alignat} + + \item The \texttt{gather} environment makes it possible to + typeset several equations without any alignment: + \begin{gather} + \psi = \psi\psi, \\ + \eta = \eta\eta\eta\eta\eta\eta, \\ + \theta = \theta. + \end{gather} + + \item Several cases can be typeset using the \texttt{cases} + environment: + \begin{equation} + |y| = \begin{cases} + \phantom-y & \text{if }z\geq0, \\ + -y & \text{otherwise}. + \end{cases} + \end{equation} +\end{enumerate} +For the complete list of environments and commands, consult the +\textsf{amsmath} package manual\footnote{ + See \url{http://mirrors.ctan.org/macros/latex/required/amslatex/math/amsldoc.pdf}. + The \texttt{\textbackslash url} command is provided by the + package \textsf{url}. +}. + +\chapter{\textnormal{We \textsf{have} \texttt{several} \textsc{fonts} + \textit{at} \textbf{disposal}}} +The serified roman font is used for the main body of the text. +\textit{Italics are typically used to denote emphasis or +quotations.} \texttt{The teletype font is typically used for source +code listings.} The \textbf{bold}, \textsc{small-caps} and +\textsf{sans-serif} variants of the base roman font can be used to +denote specific types of information. + +\tiny We \scriptsize can \footnotesize also \small change \normalsize +the \large font \Large size, \LARGE although \huge it \Huge +is \huge usually \LARGE not \Large necessary.\normalsize + +A wide variety of mathematical fonts is also available, such as: \[ + \mathrm{ABC}, \mathcal{ABC}, \mathbf{ABC}, \mathsf{ABC}, + \mathit{ABC}, \mathtt{ABC} +\] By loading the \textsf{amsfonts} packages, several additional +fonts will become available: \[ + \mathfrak{ABC}, \mathbb{ABC} +\] Many other mathematical fonts are available\footnote{ + See \url{http://tex.stackexchange.com/a/58124/70941}. +}. + +\chapter{Using lightweight markup} +\shorthandoff{-} +\begin{markdown*}{% + hybrid, + definitionLists, + footnotes, + inlineFootnotes, + hashEnumerators, + fencedCode, + citations, + citationNbsps, +} + +If you decide that \LaTeX{} is too wordy for some parts of your +document, there are [packages](https://www.ctan.org/pkg/markdown +"Markdown") that allow you to use more lightweight markup next +to it. + + ![logo](fithesis/logo/mu/fithesis-base.pdf "The logo of the + Masaryk University") + +This is a bullet list. Unlike numbered lists, bulleted lists +contain an **unordered** set of bullet points. When a bullet point +contains multiple paragraphs, the list is typeset as follows: + + * The first item of a bullet list + + that spans several paragraphs, + * the second item of a bullet list, + * the third item of a bullet list. + +When none of the bullet points contains multiple paragraphs, the +list has a more compact form: + + * The first item of a bullet list, + * the second item of a bullet list, + * the third item of a bullet list. + +Unlike a bulleted list, a numbered list implies chronology or +ordering of the bullet points. When a bullet point +contains multiple paragraphs, the list is typeset as follows: + + 1. The first item of an ordered list + + that spans several paragraphs, + 2. the second item of an ordered list, + 3. the third item of an ordered list. + #. If you are feeling lazy, + #. you can use hash enumerators as well. + +When none of the bullet points contains multiple paragraphs, the +list has a more compact form: + + 6. The first item of an ordered list, + 7. the second item of an ordered list, + 8. the third item of an ordered list. + +Definition lists are used to provide definitions of terms. When +a definition contains multiple paragraphs, the list is typeset +as follows: + +Term 1 + +: Definition 1 + +*Term 2* + +: Definition 2 + + Some code, part of Definition 2 + + Third paragraph of Definition 2. + +When none of the bullet points contains multiple paragraphs, the +list has a more compact form: + +Term 1 +: Definition 1 +*Term 2* +: Definition 2 + +Block quotations are used to include an excerpt from an external +document in way that visually clearly separates the excerpt from +the rest of the work: + +> This is the first level of quoting. +> +> > This is nested blockquote. +> +> Back to the first level. + +Footnotes are used to include additional information to the +document that are not necessary for the understanding of the main +text. Here is a footnote reference^[Here is the footnote.] and +another.[^longnote] + +[^longnote]: Here's one with multiple blocks. + + Subsequent paragraphs are indented to show that they +belong to the previous footnote. + + Some code + + The whole paragraph can be indented, or just the first + line. In this way, multi-paragraph footnotes work like + multi-paragraph list items. + +Citations are used to provide bibliographical references to other +documents. This is a regular citation~[@borgman03, p. 123]. This is +an in-text citation: @borgman03\. You can also cite several authors +at once using both regular~[see @borgman03, p. 123; @greenberg98, +sec. 3.2; and @thanh01] and in-text citations: @borgman03 [p.123; +@greenberg98, sec. 3.2; @thanh01]. + +Code blocks are used to include source code listings into the +document: + + #include + #include + #include + #include + // This is a comment + int main(int argc, char **argv) + { + while (--c > 1 && !fork()); + sleep(c = atoi(v[c])); + printf("%d\n", c); + wait(0); + return 0; + } + +There is an alternative syntax for code blocks that allows you to +specify additional information, such as the language of the source +code. This information can be used for syntax highlighting: + +``` sh +#!/bin/sh +fac() { + if [ "$1" -leq 1 ]; then + echo 1 + else + echo $(("$1" * fac $(("$1" - 1)))) + fi +} +`````````````` + +~~~~~~ Ruby +# Here's a way to empty an array. +joe = [ 'eggs.', 'some', 'break', 'to', 'Have' ] +print(joe.pop, " ") while joe.size > 0 +print "\n" +~~~~~~ + +\end{markdown*} +\shorthandon{-} + +\chapter{Inserting the bibliography} +After linking a bibliography data\-base files to the document using +the \verb"\"\texttt{thesis\discretionary{-}{}{}setup\{bib\discretionary{=}{=}{=}% +\{\textit{file1},\textit{file2},\,\ldots\,\}\}} command, you can +start citing the entries. This is just dummy text +\parencite{borgman03} lightly sprinkled with citations +\parencite[p.~123]{greenberg98}. Several sources can be cited at +once: \cite{borgman03,greenberg98,thanh01}. +\citetitle{greenberg98} was written by \citeauthor{greenberg98} in +\citeyear{greenberg98}. We can also produce \textcite{greenberg98}% +. The full bibliographic citation is: +\emph{\fullcite{greenberg98}}. We can easily insert a bibliographic +citation into the footnote\footfullcite{greenberg98}. + +The \verb"\nocite" command will not generate any +output\nocite{muni}, but it will insert its arguments into +the bibliography. The \verb"\nocite{*}" command will insert all the +records in the bibliography database file into the bibliography. +Try uncommenting the command +%% \nocite{*} +and watch the bibliography section come apart at the seams. + +When typesetting the document for the first time, citing a +\texttt{work} will expand to [\textbf{work}] and the +\verb"\printbibliography" command will produce no output. It is now +necessary to generate the bibliography by running \texttt{biber +\jobname.bcf} from the command line and then by typesetting the +document again twice. During the first run, the bibliography +section and the citations will be typeset, and in the second run, +the bibliography section will appear in the table of contents. + +The \texttt{biber} command needs to be executed from within the +directory, where the \LaTeX\ source file is located. In Windows, +the command line can be opened in a directory by holding down the +\textsf{Shift} key and by clicking the right mouse button while +hovering the cursor over a directory. Select the \textsf{Open +Command Window Here} option in the context menu that opens shortly +afterwards. + +With online services -- such as Overleaf -- or when using an +automatic tool -- such as \LaTeX MK -- all commands are executed +automatically. When you omit the \verb"\printbibliography" command, +its location will be decided by the template. + + \printbibliography[heading=bibintoc] %% Print the bibliography. + +\chapter{Inserting the index} +After using the \verb"\makeindex" macro and loading the +\texttt{makeidx} package that provides additional indexing +commands, index entries can be created by issuing the \verb"\index" +command. \index{dummy text|(}It is possible to create ranged index +entries, which will encompass a span of text.\index{dummy text|)} +To insert complex typographic material -- such as $\alpha$ +\index{alpha@$\alpha$} or \TeX{} \index{TeX@\TeX} -- +into the index, you need to specify a text string, which will +determine how the entry will be sorted. It is also possible to +create hierarchal entries. \index{vehicles!trucks} +\index{vehicles!speed cars} + +After typesetting the document, it is necessary to generate the +index by running +\begin{center}% + \texttt{texindy -I latex -C utf8 -L }$\langle$\textit{locale}% + $\rangle$\texttt{ \jobname.idx} +\end{center} +from the command line, where $\langle$\textit{locale}$\rangle$ +corresponds to the main locale of your thesis -- such as +\texttt{english}, and then typesetting the document again. + +The \texttt{texindy} command needs to be executed from within the +directory, where the \LaTeX\ source file is located. In Windows, +the command line can be opened in a directory by holding down the +\textsf{Shift} key and by clicking the right mouse button while +hovering the cursor over a directory. Select the \textsf{Open Command +Window Here} option in the context menu that opens shortly +afterwards. + +With online services -- such as Overleaf -- the commands are +executed automatically, although the locale may be erroneously +detected, or the \texttt{makeindex} tool (which is only able to +sort entries that contain digits and letters of the English +alphabet) may be used instead of \texttt{texindy}. In either case, +the index will be ill-sorted. + + \makeatletter\thesis@blocks@clear\makeatother + \phantomsection %% Print the index and insert it into the + \addcontentsline{toc}{chapter}{\indexname} %% table of contents. + \printindex + +\makeatletter + \thesis@postamble %% Print the postamble. +\makeatother + +\appendix %% Start the appendices. +\chapter{An appendix} +Here you can insert the appendices of your thesis. + +\end{document} diff --git a/macros/latex/contrib/fithesis/example/mu/example.bib b/macros/latex/contrib/fithesis/example/mu/example.bib new file mode 100644 index 0000000000..60b8b9ec79 --- /dev/null +++ b/macros/latex/contrib/fithesis/example/mu/example.bib @@ -0,0 +1,123 @@ +% The example bibliographical entries below were borrowed from the +% package documentation. + +% BORGMAN, Christine L., 2003. From Gutenberg to the global information +% infrastructure: access to information in the networked world. First. Cambridge +% (Mass): The MIT Press. ISBN 0-262-52345-0 [xviii, 324] + +@BOOK{borgman03, + author = {Borgman, Christine L.}, + date = {2003}, + title = {From Gutenberg to the global information infrastructure}, + subtitle = {access to information in the networked world}, + edition = {1}, % should not be stated + location = {Cambridge (Mass)}, + publisher = {The MIT Press}, + pagetotal = {xviii, 324}, + isbn = {0-262-52345-0}, + langid = {english} +} + +% GREENBERG, David, 1998. Camel drivers and gatecrashers: quality control in +% the digital research library. In: HAWKINS, B.L et al. (eds.). The mirage of +% continuity: reconfiguring academic information resources for the 21st +% century. Washington (D.C.): Council on Library and Information Resources; +% Association of American Universities, pp. 105–116 + +@INCOLLECTION{greenberg98, + crossref = {mirage98}, + author = {Greenberg, David}, + title = {Camel drivers and gatecrashers}, + subtitle = {quality control in the digital research library}, + pages = {105-116}, +} + +@COLLECTION{mirage98, + title = {The mirage of continuity}, + subtitle = {reconfiguring academic information + resources for the 21st century}, + editor = {Hawkins, B.L and Battin, P}, + date = {1998}, + location = {Washington (D.C.)}, + publisher = {Council on Library and Information Resources; + Association of American Universities}, + langid = {english} +} + +% LYNCH, C., 2005. Where do we go from here?: the next decade for digital +% libraries. DLib Magazine [online]. Vol. 11, no. 7/8 [visited on 2005-08-15]. +% ISSN 1082-9873. Available from: +% http://www.dlib.org/dlib/july05/lynch/07lynch.html + +@ARTICLE{lynch05, + crossref = {dlib}, + author = {Lynch, C.}, + title = {Where do we go from here?}, + subtitle = {the next decade for digital libraries}, + url = {http://www.dlib.org/dlib/july05/lynch/07lynch.html}, + urldate = {2005-08-15} +} + +@PERIODICAL{dlib, + journaltitle = {DLib Magazine}, + date = {2005}, + volume = {11}, + number = {7/8}, + issn = {1082-9873}, + langid = {english}, +} + +% HÀN, Thé Thành, 2001. Micro-typographic extensions to the TEX type- setting +% system [online]. Brno [visited on 2016-12-09]. Available from: +% http://www.pragma-ade.nl/pdftex/thesis.pdf. PhD thesis. The Faculty of +% Informatics, Masaryk University. + +@PHDTHESIS{thanh01, + author = {Hàn Thé, Thành}, + title = {Micro-typographic extensions to the \TeX{} typesetting system}, + date = {2001}, + institution = {The Faculty of Informatics, Masaryk University}, + location = {Brno}, + url = {http://www.pragma-ade.nl/pdftex/thesis.pdf}, + urldate = {2016-12-09}, + langid = {english} +} + +% SHANNON, Claude Elwood, 1940. A symbolic analysis of relay and switching +% circuits. Available from DOI: 1721.1/11173. Master’s thesis. Massachusetts +% Institute of Technology. + +@MASTERSTHESIS{shannon40, + author = {Shannon, Claude Elwood}, + title = {A symbolic analysis of relay and switching circuits}, + date = {1940}, + institution = {Massachusetts Institute of Technology}, + langid = {english}, + doi = {1721.1/11173}, +} + +% EHLINGER JR., Philip Charles. Device for the treatment of hiccups. US. +% US Patent, 7062320. + +@PATENT{ehlinger06, + author = {Ehlinger Jr., Philip Charles}, + title = {Device for the treatment of hiccups}, + type = {US Patent}, + location = {US}, + date = {2006}, + number = {7062320}, + langid = {english} +} + +% Masaryk University, 1996–2009 [online]. Brno: Masaryk University +% [visited on 2016-12-09]. Available from: https://www.muni.cz/en. + +@ONLINE{muni, + publisher = {Masaryk University}, + title = {Masaryk University}, + date = {1996/2009}, + url = {https://www.muni.cz/en}, + urldate = {2016-12-09}, + location = {Brno}, + langid = {english} +} diff --git a/macros/latex/contrib/fithesis/example/mu/fi-lualatex.pdf b/macros/latex/contrib/fithesis/example/mu/fi-lualatex.pdf new file mode 100644 index 0000000000..20734c572e Binary files /dev/null and b/macros/latex/contrib/fithesis/example/mu/fi-lualatex.pdf differ diff --git a/macros/latex/contrib/fithesis/example/mu/fi-lualatex.tex b/macros/latex/contrib/fithesis/example/mu/fi-lualatex.tex new file mode 100644 index 0000000000..9fdd804037 --- /dev/null +++ b/macros/latex/contrib/fithesis/example/mu/fi-lualatex.tex @@ -0,0 +1,651 @@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% I, the copyright holder of this work, release this work into the +%% public domain. This applies worldwide. In some countries this may +%% not be legally possible; if so: I grant anyone the right to use +%% this work for any purpose, without any conditions, unless such +%% conditions are required by law. +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\documentclass[ + digital, %% This option enables the default options for the + %% digital version of a document. Replace with `printed` + %% to enable the default options for the printed version + %% of a document. + twoside, %% This option enables double-sided typesetting. Use at + %% least 120 g/m² paper to prevent show-through. Replace + %% with `oneside` to use one-sided typesetting; use only + %% if you don’t have access to a double-sided printer, + %% or if one-sided typesetting is a formal requirement + %% at your faculty. + table, %% This option causes the coloring of tables. Replace + %% with `notable` to restore plain LaTeX tables. + lof, %% This option prints the List of Figures. Replace with + %% `nolof` to hide the List of Figures. + lot, %% This option prints the List of Tables. Replace with + %% `nolot` to hide the List of Tables. + %% More options are listed in the user guide at + %% . +]{fithesis3} +%% The following section sets up the locales used in the thesis. +\usepackage{polyglossia} %% By using `czech` or `slovak` as the +\setmainlanguage{english} %% main locale instead of `english`, you +%% can typeset the thesis in either Czech or Slovak, respectively. +\setotherlanguages{german, russian, czech, slovak} %% The +%% +%% \begin{otherlanguage}{german} ... \end{otherlanguage} +%% \begin{otherlanguage}{russian} ... \end{otherlanguage} +%% \begin{otherlanguage}{czech} ... \end{otherlanguage} +%% \begin{otherlanguage}{slovak} ... \end{otherlanguage} +%% +%% For non-Latin scripts, it may be necessary to load additional +%% fonts: +\newfontfamily\russianfont[Script=Cyrillic,Ligatures=TeX]{PT Serif} +%% +%% The following section sets up the metadata of the thesis. +\thesissetup{ + date = \the\year/\the\month/\the\day, + university = mu, + faculty = fi, + type = bc, + author = Jane Doe, + gender = f, + advisor = John Smith, + title = {The Proof of P = NP}, + TeXtitle = {The Proof of $\mathsf{P}=\mathsf{NP}$}, + keywords = {keyword1, keyword2, ...}, + TeXkeywords = {keyword1, keyword2, \ldots}, + abstract = {This is the abstract of my thesis, which can + + span multiple paragraphs.}, + thanks = {These are the acknowledgements for my thesis, which can + + span multiple paragraphs.}, + bib = example.bib, +} +\usepackage{makeidx} %% The `makeidx` package contains +\makeindex %% helper commands for index typesetting. +%% These additional packages are used within the document: +\usepackage{paralist} %% Compact list environments +\usepackage{amsmath} %% Mathematics +\usepackage{amsthm} +\usepackage{amsfonts} +\usepackage{url} %% Hyperlinks +\usepackage{markdown} %% Lightweight markup +\usepackage{listings} %% Source code highlighting +\lstset{ + basicstyle = \ttfamily,% + identifierstyle = \color{black},% + keywordstyle = \color{blue},% + keywordstyle = {[2]\color{cyan}},% + keywordstyle = {[3]\color{olive}},% + stringstyle = \color{teal},% + commentstyle = \itshape\color{magenta}} +\usepackage{floatrow} %% Putting captions above tables +\floatsetup[table]{capposition=top} +\begin{document} +\chapter*{Introduction} +\addcontentsline{toc}{chapter}{Introduction} + +Theses are rumoured to be the capstones of education, so I decided +to write one of my own. If all goes well, I will soon have a +diploma under my belt. Wish me luck! + +\begin{otherlanguage}{czech} +Říká se, že závěrečné práce jsou vyvrcholením studia a tak jsem se +rozhodl jednu také napsat. Pokud vše půjde podle plánu, odnesu si +na konci semestru diplom. Držte mi palce! +\end{otherlanguage} + +\begin{otherlanguage}{slovak} +Hovorí sa, že záverečné práce sú vyvrcholením štúdia a tak som sa +rozhodol jednu tiež napísať. Ak všetko pôjde podľa plánu, odnesiem +si na konci semestra diplom. Držte mi palce! +\end{otherlanguage} + +\begin{otherlanguage}{german} +Man munkelt, dass die Dissertation die Krönung der Ausbildung ist. +Deshalb habe ich mich beschlossen meine eigene zu schreiben. Wenn +alles gut geht, bekomme ich bald ein Diplom. Wünsch mir Glück! +\end{otherlanguage} + +\begin{otherlanguage}{russian} +Говорят, что тезис -- это кульминация обучения. Поэтому я и решил +написать собственный тезис. Если всё сработает по плану, я скоро +получу диплом. Желайте мне удачи! +\end{otherlanguage} + +\chapter{These are} +\section{the available} +\subsection{sectioning} +\subsubsection{commands.} +\paragraph{Paragraphs and} +\subparagraph{subparagraphs are available as well.} +Inside the text, you can also use unnumbered lists, +\begin{itemize} + \item such as + \item this one + \begin{itemize} + \item and they can be nested as well. + \item[>>] You can even turn the bullets into something fancier, + \item[\S] if you so desire. + \end{itemize} +\end{itemize} +Numbered lists are +\begin{enumerate} + \item very + \begin{enumerate} + \item similar + \end{enumerate} +\end{enumerate} +and so are description lists: +\begin{description} + \item[Description list] + A list of terms with a description of each term +\end{description} +The spacing of these lists is geared towards paragraphs of text. +For lists of words and phrases, the \textsf{paralist} package +offers commands +\begin{compactitem} + \item that + \begin{compactitem} + \item are + \begin{compactitem} + \item better + \begin{compactitem} + \item suited + \end{compactitem} + \end{compactitem} + \end{compactitem} +\end{compactitem} +\begin{compactenum} + \item to + \begin{compactenum} + \item this + \begin{compactenum} + \item kind of + \begin{compactenum} + \item content. + \end{compactenum} + \end{compactenum} + \end{compactenum} +\end{compactenum} +The \textsf{amsthm} package provides the commands necessary for the +typesetting of mathematical definitions, theorems, lemmas and +proofs. + +%% We will define several mathematical sectioning commands. +\newtheorem{theorem}{Theorem}[section] %% The numbering of theorems + %% will be reset after each section. +\newtheorem{lemma}[theorem]{Lemma} %% The numbering of lemmas +\newtheorem{corollary}[theorem]{Corollary} %% and corollaries will + %% share the counter with theorems. +\theoremstyle{definition} +\newtheorem{definition}{Definition} +\theoremstyle{remark} +\newtheorem*{remark}{Remark} + +\begin{theorem} + This is a theorem that offers a profound insight into the + mathematical sectioning commands. +\end{theorem} +\begin{theorem}[Another theorem] + This is another theorem. Unlike the first one, this theorem has + been endowed with a name. +\end{theorem} +\begin{lemma} + Let us suppose that $x^2+y^2=z^2$. Then + \begin{equation} + \biggl\langle u\biggm|\sum_{i=1}^nF(e_i,v)e_i\biggr\rangle + =F\biggl(\sum_{i=1}^n\langle e_i|u\rangle e_i,v\biggr). + \end{equation} +\end{lemma} +\begin{proof} + $\nabla^2 f(x,y)=\frac{\partial^2f}{\partial x^2}+ + \frac{\partial^2f}{\partial y^2}$. +\end{proof} +\begin{corollary} + This is a corollary. +\end{corollary} +\begin{remark} + This is a remark. +\end{remark} + +\chapter{Floats and references} +\begin{figure} + \begin{center} + %% PNG and JPG images can be inserted into the document as well, + %% but their resolution needs to be adequate. The minimum is + %% about 100 pixels per 1 centimeter or 300 pixels per 1 inch. + %% That means that a JPG or PNG image typeset at 4 × 4 cm should + %% be 400 × 400 px large at the bare minimum. + %% + %% The optimum is about 250 pixels per 1 centimeter or 600 + %% pixels per 1 inch. That means that a JPG or PNG image typeset + %% at 4 × 4 cm should be 1000 × 1000 px large or larger. + \includegraphics[width=4cm]{fithesis/logo/mu/fithesis-base.pdf} + \end{center} + \caption{The logo of the Masaryk University at 40\,mm} + \label{fig:mulogo1} +\end{figure} + +\begin{figure} + \begin{center} + \begin{minipage}{.66\textwidth} + \includegraphics[width=\textwidth]{fithesis/logo/mu/fithesis-base.pdf} + \end{minipage} + \begin{minipage}{.33\textwidth} + \includegraphics[width=\textwidth]{fithesis/logo/mu/fithesis-base.pdf} \\ + \includegraphics[width=\textwidth]{fithesis/logo/mu/fithesis-base.pdf} + \end{minipage} + \end{center} + \caption{The logo of the Masaryk University at $\frac23$ and + $\frac13$ of text width} + \label{fig:mulogo2} +\end{figure} + +\begin{table} + \begin{tabularx}{\textwidth}{lllX} + \toprule + Day & Min Temp & Max Temp & Summary \\ + \midrule + Monday & $13^{\circ}\mathrm{C}$ & $21^\circ\mathrm{C}$ & A + clear day with low wind and no adverse current advisories. \\ + Tuesday & $11^{\circ}\mathrm{C}$ & $17^\circ\mathrm{C}$ & A + trough of low pressure will come from the northwest. \\ + Wednesday & $10^{\circ}\mathrm{C}$ & + $21^\circ\mathrm{C}$ & Rain will spread to all parts during the + morning. \\ + \bottomrule + \end{tabularx} + \caption{A weather forecast} + \label{tab:weather} +\end{table} + +The logo of the Masaryk University is shown in Figure +\ref{fig:mulogo1} and Figure \ref{fig:mulogo2} at pages +\pageref{fig:mulogo1} and \pageref{fig:mulogo2}. The weather +forecast is shown in Table \ref{tab:weather} at page +\pageref{tab:weather}. The following chapter is Chapter +\ref{chap:matheq} and starts at page \pageref{chap:matheq}. +Items \ref{item:star1}, \ref{item:star2}, and +\ref{item:star3} are starred in the following list: +\begin{compactenum} + \item some text + \item some other text + \item $\star$ \label{item:star1} + \begin{compactenum} + \item some text + \item $\star$ \label{item:star2} + \item some other text + \begin{compactenum} + \item some text + \item some other text + \item yet another piece of text + \item $\star$ \label{item:star3} + \end{compactenum} + \item yet another piece of text + \end{compactenum} + \item yet another piece of text +\end{compactenum} +If your reference points to a place that has not yet been typeset, +the \verb"\ref" command will expand to \textbf{??} during the first +run of +\texttt{lualatex \jobname.tex} +and a second run is going to be needed for the references to +resolve. With online services -- such as Overleaf -- this is +performed automatically. + +\chapter{Mathematical equations} +\label{chap:matheq} +\TeX{} comes pre-packed with the ability to typeset inline +equations, such as $\mathrm{e}^{ix}=\cos x+i\sin x$, and display +equations, such as \[ + \mathbf{A}^{-1} = \begin{bmatrix} + a & b \\ c & d \\ + \end{bmatrix}^{-1} = + \frac{1}{\det(\mathbf{A})} \begin{bmatrix} + \,\,\,d & \!\!-b \\ -c & \,a \\ + \end{bmatrix} = + \frac{1}{ad - bc} \begin{bmatrix} + \,\,\,d & \!\!-b \\ -c & \,a \\ + \end{bmatrix}. +\] \LaTeX{} defines the automatically numbered \texttt{equation} +environment: +\begin{equation} + \gamma Px = PAx = PAP^{-1}Px. +\end{equation} +The package \textsf{amsmath} provides several additional +environments that can be used to typeset complex equations: +\begin{enumerate} + \item An equation can be spread over multiple lines using the + \texttt{multline} environment: + \begin{multline} + a + b + c + d + e + f + b + c + d + e + f + b + c + d + e + +f \\ + + f + g + h + i + j + k + l + m + n + o + p + q + \end{multline} + + \item Several aligned equations can be typeset using the + \texttt{align} environment: + \begin{align} + a + b &= c + d \\ + u &= v + w + x \\[1ex] + i + j + k + l &= m + \end{align} + + \item The \texttt{alignat} environment is similar to + \texttt{align}, but it doesn't insert horizontal spaces between + the individual columns: + \begin{alignat}{2} + a + b + c &+ d & &= 0 \\ + e &+ f + g & &= 5 + \end{alignat} + + \item Much like chapter, sections, tables, figures, or list + items, equations -- such as \eqref{eq:first} and + \eqref{eq:mine} -- can also be labeled and referenced: + \begin{alignat}{4} + b_{11}x_1 &+ b_{12}x_2 & &+ b_{13}x_3 & & & + &= y_1, \label{eq:first} \\ + b_{21}x_1 &+ b_{22}x_2 & & & &+ b_{24}x_4 & + &= y_2. \tag{My equation} \label{eq:mine} + \end{alignat} + + \item The \texttt{gather} environment makes it possible to + typeset several equations without any alignment: + \begin{gather} + \psi = \psi\psi, \\ + \eta = \eta\eta\eta\eta\eta\eta, \\ + \theta = \theta. + \end{gather} + + \item Several cases can be typeset using the \texttt{cases} + environment: + \begin{equation} + |y| = \begin{cases} + \phantom-y & \text{if }z\geq0, \\ + -y & \text{otherwise}. + \end{cases} + \end{equation} +\end{enumerate} +For the complete list of environments and commands, consult the +\textsf{amsmath} package manual\footnote{ + See \url{http://mirrors.ctan.org/macros/latex/required/amslatex/math/amsldoc.pdf}. + The \texttt{\textbackslash url} command is provided by the + package \textsf{url}. +}. + +\chapter{\textnormal{We \textsf{have} \texttt{several} \textsc{fonts} + \textit{at} \textbf{disposal}}} +The serified roman font is used for the main body of the text. +\textit{Italics are typically used to denote emphasis or +quotations.} \texttt{The teletype font is typically used for source +code listings.} The \textbf{bold}, \textsc{small-caps} and +\textsf{sans-serif} variants of the base roman font can be used to +denote specific types of information. + +\tiny We \scriptsize can \footnotesize also \small change \normalsize +the \large font \Large size, \LARGE although \huge it \Huge +is \huge usually \LARGE not \Large necessary.\normalsize + +A wide variety of mathematical fonts is also available, such as: \[ + \mathrm{ABC}, \mathcal{ABC}, \mathbf{ABC}, \mathsf{ABC}, + \mathit{ABC}, \mathtt{ABC} +\] By loading the \textsf{amsfonts} packages, several additional +fonts will become available: \[ + \mathfrak{ABC}, \mathbb{ABC} +\] Many other mathematical fonts are available\footnote{ + See \url{http://tex.stackexchange.com/a/58124/70941}. +}. + +\chapter{Using lightweight markup} +\begin{markdown*}{% + hybrid, + definitionLists, + footnotes, + inlineFootnotes, + hashEnumerators, + fencedCode, + citations, + citationNbsps, +} + +If you decide that \LaTeX{} is too wordy for some parts of your +document, there are [packages](https://www.ctan.org/pkg/markdown +"Markdown") that allow you to use more lightweight markup next +to it. + + ![logo](fithesis/logo/mu/fithesis-base.pdf "The logo of the + Masaryk University") + +This is a bullet list. Unlike numbered lists, bulleted lists +contain an **unordered** set of bullet points. When a bullet point +contains multiple paragraphs, the list is typeset as follows: + + * The first item of a bullet list + + that spans several paragraphs, + * the second item of a bullet list, + * the third item of a bullet list. + +When none of the bullet points contains multiple paragraphs, the +list has a more compact form: + + * The first item of a bullet list, + * the second item of a bullet list, + * the third item of a bullet list. + +Unlike a bulleted list, a numbered list implies chronology or +ordering of the bullet points. When a bullet point +contains multiple paragraphs, the list is typeset as follows: + + 1. The first item of an ordered list + + that spans several paragraphs, + 2. the second item of an ordered list, + 3. the third item of an ordered list. + #. If you are feeling lazy, + #. you can use hash enumerators as well. + +When none of the bullet points contains multiple paragraphs, the +list has a more compact form: + + 6. The first item of an ordered list, + 7. the second item of an ordered list, + 8. the third item of an ordered list. + +Definition lists are used to provide definitions of terms. When +a definition contains multiple paragraphs, the list is typeset +as follows: + +Term 1 + +: Definition 1 + +*Term 2* + +: Definition 2 + + Some code, part of Definition 2 + + Third paragraph of Definition 2. + +When none of the bullet points contains multiple paragraphs, the +list has a more compact form: + +Term 1 +: Definition 1 +*Term 2* +: Definition 2 + +Block quotations are used to include an excerpt from an external +document in way that visually clearly separates the excerpt from +the rest of the work: + +> This is the first level of quoting. +> +> > This is nested blockquote. +> +> Back to the first level. + +Footnotes are used to include additional information to the +document that are not necessary for the understanding of the main +text. Here is a footnote reference^[Here is the footnote.] and +another.[^longnote] + +[^longnote]: Here's one with multiple blocks. + + Subsequent paragraphs are indented to show that they +belong to the previous footnote. + + Some code + + The whole paragraph can be indented, or just the first + line. In this way, multi-paragraph footnotes work like + multi-paragraph list items. + +Citations are used to provide bibliographical references to other +documents. This is a regular citation~[@borgman03, p. 123]. This is +an in-text citation: @borgman03\. You can also cite several authors +at once using both regular~[see @borgman03, p. 123; @greenberg98, +sec. 3.2; and @thanh01] and in-text citations: @borgman03 [p.123; +@greenberg98, sec. 3.2; @thanh01]. + +Code blocks are used to include source code listings into the +document: + + #include + #include + #include + #include + // This is a comment + int main(int argc, char **argv) + { + while (--c > 1 && !fork()); + sleep(c = atoi(v[c])); + printf("%d\n", c); + wait(0); + return 0; + } + +There is an alternative syntax for code blocks that allows you to +specify additional information, such as the language of the source +code. This information can be used for syntax highlighting: + +``` sh +#!/bin/sh +fac() { + if [ "$1" -leq 1 ]; then + echo 1 + else + echo $(("$1" * fac $(("$1" - 1)))) + fi +} +`````````````` + +~~~~~~ Ruby +# Here's a way to empty an array. +joe = [ 'eggs.', 'some', 'break', 'to', 'Have' ] +print(joe.pop, " ") while joe.size > 0 +print "\n" +~~~~~~ + +\end{markdown*} + +\chapter{Inserting the bibliography} +After linking a bibliography data\-base files to the document using +the \verb"\"\texttt{thesis\discretionary{-}{}{}setup\{bib\discretionary{=}{=}{=}% +\{\textit{file1},\textit{file2},\,\ldots\,\}\}} command, you can +start citing the entries. This is just dummy text +\parencite{borgman03} lightly sprinkled with citations +\parencite[p.~123]{greenberg98}. Several sources can be cited at +once: \cite{borgman03,greenberg98,thanh01}. +\citetitle{greenberg98} was written by \citeauthor{greenberg98} in +\citeyear{greenberg98}. We can also produce \textcite{greenberg98}% +\ or %% Let us define a compound command: +\def\citeauthoryear#1{(\textcite{#1},~\citeyear{#1})}% +\citeauthoryear{greenberg98}% +. The full bibliographic citation is: +\emph{\fullcite{greenberg98}}. We can easily insert a bibliographic +citation into the footnote\footfullcite{greenberg98}. + +The \verb"\nocite" command will not generate any +output\nocite{muni}, but it will insert its arguments into +the bibliography. The \verb"\nocite{*}" command will insert all the +records in the bibliography database file into the bibliography. +Try uncommenting the command +%% \nocite{*} +and watch the bibliography section come apart at the seams. + +When typesetting the document for the first time, citing a +\texttt{work} will expand to [\textbf{work}] and the +\verb"\printbibliography" command will produce no output. It is now +necessary to generate the bibliography by running \texttt{biber +\jobname.bcf} from the command line and then by typesetting the +document again twice. During the first run, the bibliography +section and the citations will be typeset, and in the second run, +the bibliography section will appear in the table of contents. + +The \texttt{biber} command needs to be executed from within the +directory, where the \LaTeX\ source file is located. In Windows, +the command line can be opened in a directory by holding down the +\textsf{Shift} key and by clicking the right mouse button while +hovering the cursor over a directory. Select the \textsf{Open +Command Window Here} option in the context menu that opens shortly +afterwards. + +With online services -- such as Overleaf -- or when using an +automatic tool -- such as \LaTeX MK -- all commands are executed +automatically. When you omit the \verb"\printbibliography" command, +its location will be decided by the template. + + \printbibliography[heading=bibintoc] %% Print the bibliography. + +\chapter{Inserting the index} +After using the \verb"\makeindex" macro and loading the +\texttt{makeidx} package that provides additional indexing +commands, index entries can be created by issuing the \verb"\index" +command. \index{dummy text|(}It is possible to create ranged index +entries, which will encompass a span of text.\index{dummy text|)} +To insert complex typographic material -- such as $\alpha$ +\index{alpha@$\alpha$} or \TeX{} \index{TeX@\TeX} -- +into the index, you need to specify a text string, which will +determine how the entry will be sorted. It is also possible to +create hierarchal entries. \index{vehicles!trucks} +\index{vehicles!speed cars} + +After typesetting the document, it is necessary to generate the +index by running +\begin{center}% + \texttt{texindy -I latex -C utf8 -L }$\langle$\textit{locale}% + $\rangle$\texttt{ \jobname.idx} +\end{center} +from the command line, where $\langle$\textit{locale}$\rangle$ +corresponds to the main locale of your thesis -- such as +\texttt{english}, and then typesetting the document again. + +The \texttt{texindy} command needs to be executed from within the +directory, where the \LaTeX\ source file is located. In Windows, +the command line can be opened in a directory by holding down the +\textsf{Shift} key and by clicking the right mouse button while +hovering the cursor over a directory. Select the \textsf{Open Command +Window Here} option in the context menu that opens shortly +afterwards. + +With online services -- such as Overleaf -- the commands are +executed automatically, although the locale may be erroneously +detected, or the \texttt{makeindex} tool (which is only able to +sort entries that contain digits and letters of the English +alphabet) may be used instead of \texttt{texindy}. In either case, +the index will be ill-sorted. + + \makeatletter\thesis@blocks@clear\makeatother + \phantomsection %% Print the index and insert it into the + \addcontentsline{toc}{chapter}{\indexname} %% table of contents. + \printindex + +\appendix %% Start the appendices. +\chapter{An appendix} +Here you can insert the appendices of your thesis. + +\end{document} diff --git a/macros/latex/contrib/fithesis/example/mu/fi-pdflatex.pdf b/macros/latex/contrib/fithesis/example/mu/fi-pdflatex.pdf new file mode 100644 index 0000000000..5858d8b576 Binary files /dev/null and b/macros/latex/contrib/fithesis/example/mu/fi-pdflatex.pdf differ diff --git a/macros/latex/contrib/fithesis/example/mu/fi-pdflatex.tex b/macros/latex/contrib/fithesis/example/mu/fi-pdflatex.tex new file mode 100644 index 0000000000..31c18bde1b --- /dev/null +++ b/macros/latex/contrib/fithesis/example/mu/fi-pdflatex.tex @@ -0,0 +1,658 @@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% I, the copyright holder of this work, release this work into the +%% public domain. This applies worldwide. In some countries this may +%% not be legally possible; if so: I grant anyone the right to use +%% this work for any purpose, without any conditions, unless such +%% conditions are required by law. +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\documentclass[ + digital, %% This option enables the default options for the + %% digital version of a document. Replace with `printed` + %% to enable the default options for the printed version + %% of a document. + twoside, %% This option enables double-sided typesetting. Use at + %% least 120 g/m² paper to prevent show-through. Replace + %% with `oneside` to use one-sided typesetting; use only + %% if you don’t have access to a double-sided printer, + %% or if one-sided typesetting is a formal requirement + %% at your faculty. + table, %% This option causes the coloring of tables. Replace + %% with `notable` to restore plain LaTeX tables. + lof, %% This option prints the List of Figures. Replace with + %% `nolof` to hide the List of Figures. + lot, %% This option prints the List of Tables. Replace with + %% `nolot` to hide the List of Tables. + %% More options are listed in the user guide at + %% . +]{fithesis3} +%% The following section sets up the locales used in the thesis. +\usepackage[resetfonts]{cmap} %% We need to load the T2A font encoding +\usepackage[T1,T2A]{fontenc} %% to use the Cyrillic fonts with Russian texts. +\usepackage[ + main=english, %% By using `czech` or `slovak` as the main locale + %% instead of `english`, you can typeset the thesis + %% in either Czech or Slovak, respectively. + english, german, russian, czech, slovak %% The additional keys allow +]{babel} %% foreign texts to be typeset as follows: +%% +%% \begin{otherlanguage}{german} ... \end{otherlanguage} +%% \begin{otherlanguage}{russian} ... \end{otherlanguage} +%% \begin{otherlanguage}{czech} ... \end{otherlanguage} +%% \begin{otherlanguage}{slovak} ... \end{otherlanguage} +%% +%% For non-Latin scripts, it may be necessary to load additional +%% fonts: +\usepackage{paratype} +\def\textrussian#1{{\usefont{T2A}{PTSerif-TLF}{m}{rm}#1}} +%% +%% The following section sets up the metadata of the thesis. +\thesissetup{ + date = \the\year/\the\month/\the\day, + university = mu, + faculty = fi, + type = bc, + author = Jane Doe, + gender = f, + advisor = John Smith, + title = {The Proof of P = NP}, + TeXtitle = {The Proof of $\mathsf{P}=\mathsf{NP}$}, + keywords = {keyword1, keyword2, ...}, + TeXkeywords = {keyword1, keyword2, \ldots}, + abstract = {This is the abstract of my thesis, which can + + span multiple paragraphs.}, + thanks = {These are the acknowledgements for my thesis, which can + + span multiple paragraphs.}, + bib = example.bib, +} +\usepackage{makeidx} %% The `makeidx` package contains +\makeindex %% helper commands for index typesetting. +%% These additional packages are used within the document: +\usepackage{paralist} %% Compact list environments +\usepackage{amsmath} %% Mathematics +\usepackage{amsthm} +\usepackage{amsfonts} +\usepackage{url} %% Hyperlinks +\usepackage{markdown} %% Lightweight markup +\usepackage{listings} %% Source code highlighting +\lstset{ + basicstyle = \ttfamily,% + identifierstyle = \color{black},% + keywordstyle = \color{blue},% + keywordstyle = {[2]\color{cyan}},% + keywordstyle = {[3]\color{olive}},% + stringstyle = \color{teal},% + commentstyle = \itshape\color{magenta}} +\usepackage{floatrow} %% Putting captions above tables +\floatsetup[table]{capposition=top} +\begin{document} +\chapter*{Introduction} +\addcontentsline{toc}{chapter}{Introduction} + +Theses are rumoured to be the capstones of education, so I decided +to write one of my own. If all goes well, I will soon have a +diploma under my belt. Wish me luck! + +\begin{otherlanguage}{czech} +Říká se, že závěrečné práce jsou vyvrcholením studia a tak jsem se +rozhodl jednu také napsat. Pokud vše půjde podle plánu, odnesu si +na konci semestru diplom. Držte mi palce! +\end{otherlanguage} + +\begin{otherlanguage}{slovak} +Hovorí sa, že záverečné práce sú vyvrcholením štúdia a tak som sa +rozhodol jednu tiež napísať. Ak všetko pôjde podľa plánu, odnesiem +si na konci semestra diplom. Držte mi palce! +\end{otherlanguage} + +\begin{otherlanguage}{german} +Man munkelt, dass die Dissertation die Krönung der Ausbildung ist. +Deshalb habe ich mich beschlossen meine eigene zu schreiben. Wenn +alles gut geht, bekomme ich bald ein Diplom. Wünsch mir Glück! +\end{otherlanguage} + +\begin{otherlanguage}{russian}\textrussian{% +Говорят, что тезис -- это кульминация обучения. Поэтому я и решил +написать собственный тезис. Если всё сработает по плану, я скоро +получу диплом. Желайте мне удачи! +}\end{otherlanguage} + +\chapter{These are} +\section{the available} +\subsection{sectioning} +\subsubsection{commands.} +\paragraph{Paragraphs and} +\subparagraph{subparagraphs are available as well.} +Inside the text, you can also use unnumbered lists, +\begin{itemize} + \item such as + \item this one + \begin{itemize} + \item and they can be nested as well. + \item[>>] You can even turn the bullets into something fancier, + \item[\S] if you so desire. + \end{itemize} +\end{itemize} +Numbered lists are +\begin{enumerate} + \item very + \begin{enumerate} + \item similar + \end{enumerate} +\end{enumerate} +and so are description lists: +\begin{description} + \item[Description list] + A list of terms with a description of each term +\end{description} +The spacing of these lists is geared towards paragraphs of text. +For lists of words and phrases, the \textsf{paralist} package +offers commands +\begin{compactitem} + \item that + \begin{compactitem} + \item are + \begin{compactitem} + \item better + \begin{compactitem} + \item suited + \end{compactitem} + \end{compactitem} + \end{compactitem} +\end{compactitem} +\begin{compactenum} + \item to + \begin{compactenum} + \item this + \begin{compactenum} + \item kind of + \begin{compactenum} + \item content. + \end{compactenum} + \end{compactenum} + \end{compactenum} +\end{compactenum} +The \textsf{amsthm} package provides the commands necessary for the +typesetting of mathematical definitions, theorems, lemmas and +proofs. + +%% We will define several mathematical sectioning commands. +\newtheorem{theorem}{Theorem}[section] %% The numbering of theorems + %% will be reset after each section. +\newtheorem{lemma}[theorem]{Lemma} %% The numbering of lemmas +\newtheorem{corollary}[theorem]{Corollary} %% and corollaries will + %% share the counter with theorems. +\theoremstyle{definition} +\newtheorem{definition}{Definition} +\theoremstyle{remark} +\newtheorem*{remark}{Remark} + +\begin{theorem} + This is a theorem that offers a profound insight into the + mathematical sectioning commands. +\end{theorem} +\begin{theorem}[Another theorem] + This is another theorem. Unlike the first one, this theorem has + been endowed with a name. +\end{theorem} +\begin{lemma} + Let us suppose that $x^2+y^2=z^2$. Then + \begin{equation} + \biggl\langle u\biggm|\sum_{i=1}^nF(e_i,v)e_i\biggr\rangle + =F\biggl(\sum_{i=1}^n\langle e_i|u\rangle e_i,v\biggr). + \end{equation} +\end{lemma} +\begin{proof} + $\nabla^2 f(x,y)=\frac{\partial^2f}{\partial x^2}+ + \frac{\partial^2f}{\partial y^2}$. +\end{proof} +\begin{corollary} + This is a corollary. +\end{corollary} +\begin{remark} + This is a remark. +\end{remark} + +\chapter{Floats and references} +\begin{figure} + \begin{center} + %% PNG and JPG images can be inserted into the document as well, + %% but their resolution needs to be adequate. The minimum is + %% about 100 pixels per 1 centimeter or 300 pixels per 1 inch. + %% That means that a JPG or PNG image typeset at 4 × 4 cm should + %% be 400 × 400 px large at the bare minimum. + %% + %% The optimum is about 250 pixels per 1 centimeter or 600 + %% pixels per 1 inch. That means that a JPG or PNG image typeset + %% at 4 × 4 cm should be 1000 × 1000 px large or larger. + \includegraphics[width=4cm]{fithesis/logo/mu/fithesis-base.pdf} + \end{center} + \caption{The logo of the Masaryk University at 40\,mm} + \label{fig:mulogo1} +\end{figure} + +\begin{figure} + \begin{center} + \begin{minipage}{.66\textwidth} + \includegraphics[width=\textwidth]{fithesis/logo/mu/fithesis-base.pdf} + \end{minipage} + \begin{minipage}{.33\textwidth} + \includegraphics[width=\textwidth]{fithesis/logo/mu/fithesis-base.pdf} \\ + \includegraphics[width=\textwidth]{fithesis/logo/mu/fithesis-base.pdf} + \end{minipage} + \end{center} + \caption{The logo of the Masaryk University at $\frac23$ and + $\frac13$ of text width} + \label{fig:mulogo2} +\end{figure} + +\begin{table} + \begin{tabularx}{\textwidth}{lllX} + \toprule + Day & Min Temp & Max Temp & Summary \\ + \midrule + Monday & $13^{\circ}\mathrm{C}$ & $21^\circ\mathrm{C}$ & A + clear day with low wind and no adverse current advisories. \\ + Tuesday & $11^{\circ}\mathrm{C}$ & $17^\circ\mathrm{C}$ & A + trough of low pressure will come from the northwest. \\ + Wednesday & $10^{\circ}\mathrm{C}$ & + $21^\circ\mathrm{C}$ & Rain will spread to all parts during the + morning. \\ + \bottomrule + \end{tabularx} + \caption{A weather forecast} + \label{tab:weather} +\end{table} + +The logo of the Masaryk University is shown in Figure +\ref{fig:mulogo1} and Figure \ref{fig:mulogo2} at pages +\pageref{fig:mulogo1} and \pageref{fig:mulogo2}. The weather +forecast is shown in Table \ref{tab:weather} at page +\pageref{tab:weather}. The following chapter is Chapter +\ref{chap:matheq} and starts at page \pageref{chap:matheq}. +Items \ref{item:star1}, \ref{item:star2}, and +\ref{item:star3} are starred in the following list: +\begin{compactenum} + \item some text + \item some other text + \item $\star$ \label{item:star1} + \begin{compactenum} + \item some text + \item $\star$ \label{item:star2} + \item some other text + \begin{compactenum} + \item some text + \item some other text + \item yet another piece of text + \item $\star$ \label{item:star3} + \end{compactenum} + \item yet another piece of text + \end{compactenum} + \item yet another piece of text +\end{compactenum} +If your reference points to a place that has not yet been typeset, +the \verb"\ref" command will expand to \textbf{??} during the first +run of +\texttt{pdflatex \jobname.tex} +and a second run is going to be needed for the references to +resolve. With online services -- such as Overleaf -- this is +performed automatically. + +\chapter{Mathematical equations} +\label{chap:matheq} +\TeX{} comes pre-packed with the ability to typeset inline +equations, such as $\mathrm{e}^{ix}=\cos x+i\sin x$, and display +equations, such as \[ + \mathbf{A}^{-1} = \begin{bmatrix} + a & b \\ c & d \\ + \end{bmatrix}^{-1} = + \frac{1}{\det(\mathbf{A})} \begin{bmatrix} + \,\,\,d & \!\!-b \\ -c & \,a \\ + \end{bmatrix} = + \frac{1}{ad - bc} \begin{bmatrix} + \,\,\,d & \!\!-b \\ -c & \,a \\ + \end{bmatrix}. +\] \LaTeX{} defines the automatically numbered \texttt{equation} +environment: +\begin{equation} + \gamma Px = PAx = PAP^{-1}Px. +\end{equation} +The package \textsf{amsmath} provides several additional +environments that can be used to typeset complex equations: +\begin{enumerate} + \item An equation can be spread over multiple lines using the + \texttt{multline} environment: + \begin{multline} + a + b + c + d + e + f + b + c + d + e + f + b + c + d + e + +f \\ + + f + g + h + i + j + k + l + m + n + o + p + q + \end{multline} + + \item Several aligned equations can be typeset using the + \texttt{align} environment: + \begin{align} + a + b &= c + d \\ + u &= v + w + x \\[1ex] + i + j + k + l &= m + \end{align} + + \item The \texttt{alignat} environment is similar to + \texttt{align}, but it doesn't insert horizontal spaces between + the individual columns: + \begin{alignat}{2} + a + b + c &+ d & &= 0 \\ + e &+ f + g & &= 5 + \end{alignat} + + \item Much like chapter, sections, tables, figures, or list + items, equations -- such as \eqref{eq:first} and + \eqref{eq:mine} -- can also be labeled and referenced: + \begin{alignat}{4} + b_{11}x_1 &+ b_{12}x_2 & &+ b_{13}x_3 & & & + &= y_1, \label{eq:first} \\ + b_{21}x_1 &+ b_{22}x_2 & & & &+ b_{24}x_4 & + &= y_2. \tag{My equation} \label{eq:mine} + \end{alignat} + + \item The \texttt{gather} environment makes it possible to + typeset several equations without any alignment: + \begin{gather} + \psi = \psi\psi, \\ + \eta = \eta\eta\eta\eta\eta\eta, \\ + \theta = \theta. + \end{gather} + + \item Several cases can be typeset using the \texttt{cases} + environment: + \begin{equation} + |y| = \begin{cases} + \phantom-y & \text{if }z\geq0, \\ + -y & \text{otherwise}. + \end{cases} + \end{equation} +\end{enumerate} +For the complete list of environments and commands, consult the +\textsf{amsmath} package manual\footnote{ + See \url{http://mirrors.ctan.org/macros/latex/required/amslatex/math/amsldoc.pdf}. + The \texttt{\textbackslash url} command is provided by the + package \textsf{url}. +}. + +\chapter{\textnormal{We \textsf{have} \texttt{several} \textsc{fonts} + \textit{at} \textbf{disposal}}} +The serified roman font is used for the main body of the text. +\textit{Italics are typically used to denote emphasis or +quotations.} \texttt{The teletype font is typically used for source +code listings.} The \textbf{bold}, \textsc{small-caps} and +\textsf{sans-serif} variants of the base roman font can be used to +denote specific types of information. + +\tiny We \scriptsize can \footnotesize also \small change \normalsize +the \large font \Large size, \LARGE although \huge it \Huge +is \huge usually \LARGE not \Large necessary.\normalsize + +A wide variety of mathematical fonts is also available, such as: \[ + \mathrm{ABC}, \mathcal{ABC}, \mathbf{ABC}, \mathsf{ABC}, + \mathit{ABC}, \mathtt{ABC} +\] By loading the \textsf{amsfonts} packages, several additional +fonts will become available: \[ + \mathfrak{ABC}, \mathbb{ABC} +\] Many other mathematical fonts are available\footnote{ + See \url{http://tex.stackexchange.com/a/58124/70941}. +}. + +\chapter{Using lightweight markup} +\shorthandoff{-} +\begin{markdown*}{% + hybrid, + definitionLists, + footnotes, + inlineFootnotes, + hashEnumerators, + fencedCode, + citations, + citationNbsps, +} + +If you decide that \LaTeX{} is too wordy for some parts of your +document, there are [packages](https://www.ctan.org/pkg/markdown +"Markdown") that allow you to use more lightweight markup next +to it. + + ![logo](fithesis/logo/mu/fithesis-base.pdf "The logo of the + Masaryk University") + +This is a bullet list. Unlike numbered lists, bulleted lists +contain an **unordered** set of bullet points. When a bullet point +contains multiple paragraphs, the list is typeset as follows: + + * The first item of a bullet list + + that spans several paragraphs, + * the second item of a bullet list, + * the third item of a bullet list. + +When none of the bullet points contains multiple paragraphs, the +list has a more compact form: + + * The first item of a bullet list, + * the second item of a bullet list, + * the third item of a bullet list. + +Unlike a bulleted list, a numbered list implies chronology or +ordering of the bullet points. When a bullet point +contains multiple paragraphs, the list is typeset as follows: + + 1. The first item of an ordered list + + that spans several paragraphs, + 2. the second item of an ordered list, + 3. the third item of an ordered list. + #. If you are feeling lazy, + #. you can use hash enumerators as well. + +When none of the bullet points contains multiple paragraphs, the +list has a more compact form: + + 6. The first item of an ordered list, + 7. the second item of an ordered list, + 8. the third item of an ordered list. + +Definition lists are used to provide definitions of terms. When +a definition contains multiple paragraphs, the list is typeset +as follows: + +Term 1 + +: Definition 1 + +*Term 2* + +: Definition 2 + + Some code, part of Definition 2 + + Third paragraph of Definition 2. + +When none of the bullet points contains multiple paragraphs, the +list has a more compact form: + +Term 1 +: Definition 1 +*Term 2* +: Definition 2 + +Block quotations are used to include an excerpt from an external +document in way that visually clearly separates the excerpt from +the rest of the work: + +> This is the first level of quoting. +> +> > This is nested blockquote. +> +> Back to the first level. + +Footnotes are used to include additional information to the +document that are not necessary for the understanding of the main +text. Here is a footnote reference^[Here is the footnote.] and +another.[^longnote] + +[^longnote]: Here's one with multiple blocks. + + Subsequent paragraphs are indented to show that they +belong to the previous footnote. + + Some code + + The whole paragraph can be indented, or just the first + line. In this way, multi-paragraph footnotes work like + multi-paragraph list items. + +Citations are used to provide bibliographical references to other +documents. This is a regular citation~[@borgman03, p. 123]. This is +an in-text citation: @borgman03\. You can also cite several authors +at once using both regular~[see @borgman03, p. 123; @greenberg98, +sec. 3.2; and @thanh01] and in-text citations: @borgman03 [p.123; +@greenberg98, sec. 3.2; @thanh01]. + +Code blocks are used to include source code listings into the +document: + + #include + #include + #include + #include + // This is a comment + int main(int argc, char **argv) + { + while (--c > 1 && !fork()); + sleep(c = atoi(v[c])); + printf("%d\n", c); + wait(0); + return 0; + } + +There is an alternative syntax for code blocks that allows you to +specify additional information, such as the language of the source +code. This information can be used for syntax highlighting: + +``` sh +#!/bin/sh +fac() { + if [ "$1" -leq 1 ]; then + echo 1 + else + echo $(("$1" * fac $(("$1" - 1)))) + fi +} +`````````````` + +~~~~~~ Ruby +# Here's a way to empty an array. +joe = [ 'eggs.', 'some', 'break', 'to', 'Have' ] +print(joe.pop, " ") while joe.size > 0 +print "\n" +~~~~~~ + +\end{markdown*} +\shorthandon{-} + +\chapter{Inserting the bibliography} +After linking a bibliography data\-base files to the document using +the \verb"\"\texttt{thesis\discretionary{-}{}{}setup\{bib\discretionary{=}{=}{=}% +\{\textit{file1},\textit{file2},\,\ldots\,\}\}} command, you can +start citing the entries. This is just dummy text +\parencite{borgman03} lightly sprinkled with citations +\parencite[p.~123]{greenberg98}. Several sources can be cited at +once: \cite{borgman03,greenberg98,thanh01}. +\citetitle{greenberg98} was written by \citeauthor{greenberg98} in +\citeyear{greenberg98}. We can also produce \textcite{greenberg98}% +\ or %% Let us define a compound command: +\def\citeauthoryear#1{(\textcite{#1},~\citeyear{#1})}% +\citeauthoryear{greenberg98}% +. The full bibliographic citation is: +\emph{\fullcite{greenberg98}}. We can easily insert a bibliographic +citation into the footnote\footfullcite{greenberg98}. + +The \verb"\nocite" command will not generate any +output\nocite{muni}, but it will insert its arguments into +the bibliography. The \verb"\nocite{*}" command will insert all the +records in the bibliography database file into the bibliography. +Try uncommenting the command +%% \nocite{*} +and watch the bibliography section come apart at the seams. + +When typesetting the document for the first time, citing a +\texttt{work} will expand to [\textbf{work}] and the +\verb"\printbibliography" command will produce no output. It is now +necessary to generate the bibliography by running \texttt{biber +\jobname.bcf} from the command line and then by typesetting the +document again twice. During the first run, the bibliography +section and the citations will be typeset, and in the second run, +the bibliography section will appear in the table of contents. + +The \texttt{biber} command needs to be executed from within the +directory, where the \LaTeX\ source file is located. In Windows, +the command line can be opened in a directory by holding down the +\textsf{Shift} key and by clicking the right mouse button while +hovering the cursor over a directory. Select the \textsf{Open +Command Window Here} option in the context menu that opens shortly +afterwards. + +With online services -- such as Overleaf -- or when using an +automatic tool -- such as \LaTeX MK -- all commands are executed +automatically. When you omit the \verb"\printbibliography" command, +its location will be decided by the template. + + \printbibliography[heading=bibintoc] %% Print the bibliography. + +\chapter{Inserting the index} +After using the \verb"\makeindex" macro and loading the +\texttt{makeidx} package that provides additional indexing +commands, index entries can be created by issuing the \verb"\index" +command. \index{dummy text|(}It is possible to create ranged index +entries, which will encompass a span of text.\index{dummy text|)} +To insert complex typographic material -- such as $\alpha$ +\index{alpha@$\alpha$} or \TeX{} \index{TeX@\TeX} -- +into the index, you need to specify a text string, which will +determine how the entry will be sorted. It is also possible to +create hierarchal entries. \index{vehicles!trucks} +\index{vehicles!speed cars} + +After typesetting the document, it is necessary to generate the +index by running +\begin{center}% + \texttt{texindy -I latex -C utf8 -L }$\langle$\textit{locale}% + $\rangle$\texttt{ \jobname.idx} +\end{center} +from the command line, where $\langle$\textit{locale}$\rangle$ +corresponds to the main locale of your thesis -- such as +\texttt{english}, and then typesetting the document again. + +The \texttt{texindy} command needs to be executed from within the +directory, where the \LaTeX\ source file is located. In Windows, +the command line can be opened in a directory by holding down the +\textsf{Shift} key and by clicking the right mouse button while +hovering the cursor over a directory. Select the \textsf{Open Command +Window Here} option in the context menu that opens shortly +afterwards. + +With online services -- such as Overleaf -- the commands are +executed automatically, although the locale may be erroneously +detected, or the \texttt{makeindex} tool (which is only able to +sort entries that contain digits and letters of the English +alphabet) may be used instead of \texttt{texindy}. In either case, +the index will be ill-sorted. + + \makeatletter\thesis@blocks@clear\makeatother + \phantomsection %% Print the index and insert it into the + \addcontentsline{toc}{chapter}{\indexname} %% table of contents. + \printindex + +\appendix %% Start the appendices. +\chapter{An appendix} +Here you can insert the appendices of your thesis. + +\end{document} diff --git a/macros/latex/contrib/fithesis/example/mu/fsps-lualatex.pdf b/macros/latex/contrib/fithesis/example/mu/fsps-lualatex.pdf new file mode 100644 index 0000000000..2a5e95bb8e Binary files /dev/null and b/macros/latex/contrib/fithesis/example/mu/fsps-lualatex.pdf differ diff --git a/macros/latex/contrib/fithesis/example/mu/fsps-lualatex.tex b/macros/latex/contrib/fithesis/example/mu/fsps-lualatex.tex new file mode 100644 index 0000000000..abec31eaf1 --- /dev/null +++ b/macros/latex/contrib/fithesis/example/mu/fsps-lualatex.tex @@ -0,0 +1,645 @@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% I, the copyright holder of this work, release this work into the +%% public domain. This applies worldwide. In some countries this may +%% not be legally possible; if so: I grant anyone the right to use +%% this work for any purpose, without any conditions, unless such +%% conditions are required by law. +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\documentclass[ + digital, %% This option enables the default options for the + %% digital version of a document. Replace with `printed` + %% to enable the default options for the printed version + %% of a document. + twoside, %% This option enables double-sided typesetting. Use at + %% least 120 g/m² paper to prevent show-through. Replace + %% with `oneside` to use one-sided typesetting; use only + %% if you don’t have access to a double-sided printer, + %% or if one-sided typesetting is a formal requirement + %% at your faculty. + table, %% This option causes the coloring of tables. Replace + %% with `notable` to restore plain LaTeX tables. + lof, %% This option prints the List of Figures. Replace with + %% `nolof` to hide the List of Figures. + lot, %% This option prints the List of Tables. Replace with + %% `nolot` to hide the List of Tables. + %% More options are listed in the user guide at + %% . +]{fithesis3} +%% The following section sets up the locales used in the thesis. +\usepackage{polyglossia} %% By using `czech` or `slovak` as the +\setmainlanguage{english} %% main locale instead of `english`, you +%% can typeset the thesis in either Czech or Slovak, respectively. +\setotherlanguages{german, russian, czech, slovak} %% The +%% +%% \begin{otherlanguage}{german} ... \end{otherlanguage} +%% \begin{otherlanguage}{russian} ... \end{otherlanguage} +%% \begin{otherlanguage}{czech} ... \end{otherlanguage} +%% \begin{otherlanguage}{slovak} ... \end{otherlanguage} +%% +%% For non-Latin scripts, it may be necessary to load additional +%% fonts: +\newfontfamily\russianfont[Script=Cyrillic,Ligatures=TeX]{PT Serif} +%% +%% The following section sets up the metadata of the thesis. +\thesissetup{ + date = \the\year/\the\month/\the\day, + university = mu, + faculty = fsps, + type = bc, + field = Sport Management, + author = Jane Doe, + gender = f, + advisor = John Smith, + title = The use of LaTeX for the Typesetting + of Sports Tables, + TeXtitle = The use of \LaTeX\ for the Typesetting + of Sports Tables, + bib = example.bib, +} +\usepackage{makeidx} %% The `makeidx` package contains +\makeindex %% helper commands for index typesetting. +%% These additional packages are used within the document: +\usepackage{paralist} %% Compact list environments +\usepackage{amsmath} %% Mathematics +\usepackage{amsthm} +\usepackage{amsfonts} +\usepackage{url} %% Hyperlinks +\usepackage{markdown} %% Lightweight markup +\usepackage{listings} %% Source code highlighting +\lstset{ + basicstyle = \ttfamily,% + identifierstyle = \color{black},% + keywordstyle = \color{blue},% + keywordstyle = {[2]\color{cyan}},% + keywordstyle = {[3]\color{olive}},% + stringstyle = \color{teal},% + commentstyle = \itshape\color{magenta}} +\usepackage{floatrow} %% Putting captions above tables +\floatsetup[table]{capposition=top} +\begin{document} +\chapter*{Introduction} +\addcontentsline{toc}{chapter}{Introduction} + +Theses are rumoured to be the capstones of education, so I decided +to write one of my own. If all goes well, I will soon have a +diploma under my belt. Wish me luck! + +\begin{otherlanguage}{czech} +Říká se, že závěrečné práce jsou vyvrcholením studia a tak jsem se +rozhodl jednu také napsat. Pokud vše půjde podle plánu, odnesu si +na konci semestru diplom. Držte mi palce! +\end{otherlanguage} + +\begin{otherlanguage}{slovak} +Hovorí sa, že záverečné práce sú vyvrcholením štúdia a tak som sa +rozhodol jednu tiež napísať. Ak všetko pôjde podľa plánu, odnesiem +si na konci semestra diplom. Držte mi palce! +\end{otherlanguage} + +\begin{otherlanguage}{german} +Man munkelt, dass die Dissertation die Krönung der Ausbildung ist. +Deshalb habe ich mich beschlossen meine eigene zu schreiben. Wenn +alles gut geht, bekomme ich bald ein Diplom. Wünsch mir Glück! +\end{otherlanguage} + +\begin{otherlanguage}{russian} +Говорят, что тезис -- это кульминация обучения. Поэтому я и решил +написать собственный тезис. Если всё сработает по плану, я скоро +получу диплом. Желайте мне удачи! +\end{otherlanguage} + +\chapter{These are} +\section{the available} +\subsection{sectioning} +\subsubsection{commands.} +\paragraph{Paragraphs and} +\subparagraph{subparagraphs are available as well.} +Inside the text, you can also use unnumbered lists, +\begin{itemize} + \item such as + \item this one + \begin{itemize} + \item and they can be nested as well. + \item[>>] You can even turn the bullets into something fancier, + \item[\S] if you so desire. + \end{itemize} +\end{itemize} +Numbered lists are +\begin{enumerate} + \item very + \begin{enumerate} + \item similar + \end{enumerate} +\end{enumerate} +and so are description lists: +\begin{description} + \item[Description list] + A list of terms with a description of each term +\end{description} +The spacing of these lists is geared towards paragraphs of text. +For lists of words and phrases, the \textsf{paralist} package +offers commands +\begin{compactitem} + \item that + \begin{compactitem} + \item are + \begin{compactitem} + \item better + \begin{compactitem} + \item suited + \end{compactitem} + \end{compactitem} + \end{compactitem} +\end{compactitem} +\begin{compactenum} + \item to + \begin{compactenum} + \item this + \begin{compactenum} + \item kind of + \begin{compactenum} + \item content. + \end{compactenum} + \end{compactenum} + \end{compactenum} +\end{compactenum} +The \textsf{amsthm} package provides the commands necessary for the +typesetting of mathematical definitions, theorems, lemmas and +proofs. + +%% We will define several mathematical sectioning commands. +\newtheorem{theorem}{Theorem}[section] %% The numbering of theorems + %% will be reset after each section. +\newtheorem{lemma}[theorem]{Lemma} %% The numbering of lemmas +\newtheorem{corollary}[theorem]{Corollary} %% and corollaries will + %% share the counter with theorems. +\theoremstyle{definition} +\newtheorem{definition}{Definition} +\theoremstyle{remark} +\newtheorem*{remark}{Remark} + +\begin{theorem} + This is a theorem that offers a profound insight into the + mathematical sectioning commands. +\end{theorem} +\begin{theorem}[Another theorem] + This is another theorem. Unlike the first one, this theorem has + been endowed with a name. +\end{theorem} +\begin{lemma} + Let us suppose that $x^2+y^2=z^2$. Then + \begin{equation} + \biggl\langle u\biggm|\sum_{i=1}^nF(e_i,v)e_i\biggr\rangle + =F\biggl(\sum_{i=1}^n\langle e_i|u\rangle e_i,v\biggr). + \end{equation} +\end{lemma} +\begin{proof} + $\nabla^2 f(x,y)=\frac{\partial^2f}{\partial x^2}+ + \frac{\partial^2f}{\partial y^2}$. +\end{proof} +\begin{corollary} + This is a corollary. +\end{corollary} +\begin{remark} + This is a remark. +\end{remark} + +\chapter{Floats and references} +\begin{figure} + \begin{center} + %% PNG and JPG images can be inserted into the document as well, + %% but their resolution needs to be adequate. The minimum is + %% about 100 pixels per 1 centimeter or 300 pixels per 1 inch. + %% That means that a JPG or PNG image typeset at 4 × 4 cm should + %% be 400 × 400 px large at the bare minimum. + %% + %% The optimum is about 250 pixels per 1 centimeter or 600 + %% pixels per 1 inch. That means that a JPG or PNG image typeset + %% at 4 × 4 cm should be 1000 × 1000 px large or larger. + \includegraphics[width=4cm]{fithesis/logo/mu/fithesis-base.pdf} + \end{center} + \caption{The logo of the Masaryk University at 40\,mm} + \label{fig:mulogo1} +\end{figure} + +\begin{figure} + \begin{center} + \begin{minipage}{.66\textwidth} + \includegraphics[width=\textwidth]{fithesis/logo/mu/fithesis-base.pdf} + \end{minipage} + \begin{minipage}{.33\textwidth} + \includegraphics[width=\textwidth]{fithesis/logo/mu/fithesis-base.pdf} \\ + \includegraphics[width=\textwidth]{fithesis/logo/mu/fithesis-base.pdf} + \end{minipage} + \end{center} + \caption{The logo of the Masaryk University at $\frac23$ and + $\frac13$ of text width} + \label{fig:mulogo2} +\end{figure} + +\begin{table} + \begin{tabularx}{\textwidth}{lllX} + \toprule + Day & Min Temp & Max Temp & Summary \\ + \midrule + Monday & $13^{\circ}\mathrm{C}$ & $21^\circ\mathrm{C}$ & A + clear day with low wind and no adverse current advisories. \\ + Tuesday & $11^{\circ}\mathrm{C}$ & $17^\circ\mathrm{C}$ & A + trough of low pressure will come from the northwest. \\ + Wednesday & $10^{\circ}\mathrm{C}$ & + $21^\circ\mathrm{C}$ & Rain will spread to all parts during the + morning. \\ + \bottomrule + \end{tabularx} + \caption{A weather forecast} + \label{tab:weather} +\end{table} + +The logo of the Masaryk University is shown in Figure +\ref{fig:mulogo1} and Figure \ref{fig:mulogo2} at pages +\pageref{fig:mulogo1} and \pageref{fig:mulogo2}. The weather +forecast is shown in Table \ref{tab:weather} at page +\pageref{tab:weather}. The following chapter is Chapter +\ref{chap:matheq} and starts at page \pageref{chap:matheq}. +Items \ref{item:star1}, \ref{item:star2}, and +\ref{item:star3} are starred in the following list: +\begin{compactenum} + \item some text + \item some other text + \item $\star$ \label{item:star1} + \begin{compactenum} + \item some text + \item $\star$ \label{item:star2} + \item some other text + \begin{compactenum} + \item some text + \item some other text + \item yet another piece of text + \item $\star$ \label{item:star3} + \end{compactenum} + \item yet another piece of text + \end{compactenum} + \item yet another piece of text +\end{compactenum} +If your reference points to a place that has not yet been typeset, +the \verb"\ref" command will expand to \textbf{??} during the first +run of +\texttt{lualatex \jobname.tex} +and a second run is going to be needed for the references to +resolve. With online services -- such as Overleaf -- this is +performed automatically. + +\chapter{Mathematical equations} +\label{chap:matheq} +\TeX{} comes pre-packed with the ability to typeset inline +equations, such as $\mathrm{e}^{ix}=\cos x+i\sin x$, and display +equations, such as \[ + \mathbf{A}^{-1} = \begin{bmatrix} + a & b \\ c & d \\ + \end{bmatrix}^{-1} = + \frac{1}{\det(\mathbf{A})} \begin{bmatrix} + \,\,\,d & \!\!-b \\ -c & \,a \\ + \end{bmatrix} = + \frac{1}{ad - bc} \begin{bmatrix} + \,\,\,d & \!\!-b \\ -c & \,a \\ + \end{bmatrix}. +\] \LaTeX{} defines the automatically numbered \texttt{equation} +environment: +\begin{equation} + \gamma Px = PAx = PAP^{-1}Px. +\end{equation} +The package \textsf{amsmath} provides several additional +environments that can be used to typeset complex equations: +\begin{enumerate} + \item An equation can be spread over multiple lines using the + \texttt{multline} environment: + \begin{multline} + a + b + c + d + e + f + b + c + d + e + f + b + c + d + e + +f \\ + + f + g + h + i + j + k + l + m + n + o + p + q + \end{multline} + + \item Several aligned equations can be typeset using the + \texttt{align} environment: + \begin{align} + a + b &= c + d \\ + u &= v + w + x \\[1ex] + i + j + k + l &= m + \end{align} + + \item The \texttt{alignat} environment is similar to + \texttt{align}, but it doesn't insert horizontal spaces between + the individual columns: + \begin{alignat}{2} + a + b + c &+ d & &= 0 \\ + e &+ f + g & &= 5 + \end{alignat} + + \item Much like chapter, sections, tables, figures, or list + items, equations -- such as \eqref{eq:first} and + \eqref{eq:mine} -- can also be labeled and referenced: + \begin{alignat}{4} + b_{11}x_1 &+ b_{12}x_2 & &+ b_{13}x_3 & & & + &= y_1, \label{eq:first} \\ + b_{21}x_1 &+ b_{22}x_2 & & & &+ b_{24}x_4 & + &= y_2. \tag{My equation} \label{eq:mine} + \end{alignat} + + \item The \texttt{gather} environment makes it possible to + typeset several equations without any alignment: + \begin{gather} + \psi = \psi\psi, \\ + \eta = \eta\eta\eta\eta\eta\eta, \\ + \theta = \theta. + \end{gather} + + \item Several cases can be typeset using the \texttt{cases} + environment: + \begin{equation} + |y| = \begin{cases} + \phantom-y & \text{if }z\geq0, \\ + -y & \text{otherwise}. + \end{cases} + \end{equation} +\end{enumerate} +For the complete list of environments and commands, consult the +\textsf{amsmath} package manual\footnote{ + See \url{http://mirrors.ctan.org/macros/latex/required/amslatex/math/amsldoc.pdf}. + The \texttt{\textbackslash url} command is provided by the + package \textsf{url}. +}. + +\chapter{\textnormal{We \textsf{have} \texttt{several} \textsc{fonts} + \textit{at} \textbf{disposal}}} +The serified roman font is used for the main body of the text. +\textit{Italics are typically used to denote emphasis or +quotations.} \texttt{The teletype font is typically used for source +code listings.} The \textbf{bold}, \textsc{small-caps} and +\textsf{sans-serif} variants of the base roman font can be used to +denote specific types of information. + +\tiny We \scriptsize can \footnotesize also \small change \normalsize +the \large font \Large size, \LARGE although \huge it \Huge +is \huge usually \LARGE not \Large necessary.\normalsize + +A wide variety of mathematical fonts is also available, such as: \[ + \mathrm{ABC}, \mathcal{ABC}, \mathbf{ABC}, \mathsf{ABC}, + \mathit{ABC}, \mathtt{ABC} +\] By loading the \textsf{amsfonts} packages, several additional +fonts will become available: \[ + \mathfrak{ABC}, \mathbb{ABC} +\] Many other mathematical fonts are available\footnote{ + See \url{http://tex.stackexchange.com/a/58124/70941}. +}. + +\chapter{Using lightweight markup} +\begin{markdown*}{% + hybrid, + definitionLists, + footnotes, + inlineFootnotes, + hashEnumerators, + fencedCode, + citations, + citationNbsps, +} + +If you decide that \LaTeX{} is too wordy for some parts of your +document, there are [packages](https://www.ctan.org/pkg/markdown +"Markdown") that allow you to use more lightweight markup next +to it. + + ![logo](fithesis/logo/mu/fithesis-base.pdf "The logo of the + Masaryk University") + +This is a bullet list. Unlike numbered lists, bulleted lists +contain an **unordered** set of bullet points. When a bullet point +contains multiple paragraphs, the list is typeset as follows: + + * The first item of a bullet list + + that spans several paragraphs, + * the second item of a bullet list, + * the third item of a bullet list. + +When none of the bullet points contains multiple paragraphs, the +list has a more compact form: + + * The first item of a bullet list, + * the second item of a bullet list, + * the third item of a bullet list. + +Unlike a bulleted list, a numbered list implies chronology or +ordering of the bullet points. When a bullet point +contains multiple paragraphs, the list is typeset as follows: + + 1. The first item of an ordered list + + that spans several paragraphs, + 2. the second item of an ordered list, + 3. the third item of an ordered list. + #. If you are feeling lazy, + #. you can use hash enumerators as well. + +When none of the bullet points contains multiple paragraphs, the +list has a more compact form: + + 6. The first item of an ordered list, + 7. the second item of an ordered list, + 8. the third item of an ordered list. + +Definition lists are used to provide definitions of terms. When +a definition contains multiple paragraphs, the list is typeset +as follows: + +Term 1 + +: Definition 1 + +*Term 2* + +: Definition 2 + + Some code, part of Definition 2 + + Third paragraph of Definition 2. + +When none of the bullet points contains multiple paragraphs, the +list has a more compact form: + +Term 1 +: Definition 1 +*Term 2* +: Definition 2 + +Block quotations are used to include an excerpt from an external +document in way that visually clearly separates the excerpt from +the rest of the work: + +> This is the first level of quoting. +> +> > This is nested blockquote. +> +> Back to the first level. + +Footnotes are used to include additional information to the +document that are not necessary for the understanding of the main +text. Here is a footnote reference^[Here is the footnote.] and +another.[^longnote] + +[^longnote]: Here's one with multiple blocks. + + Subsequent paragraphs are indented to show that they +belong to the previous footnote. + + Some code + + The whole paragraph can be indented, or just the first + line. In this way, multi-paragraph footnotes work like + multi-paragraph list items. + +Citations are used to provide bibliographical references to other +documents. This is a regular citation~[@borgman03, p. 123]. This is +an in-text citation: @borgman03\. You can also cite several authors +at once using both regular~[see @borgman03, p. 123; @greenberg98, +sec. 3.2; and @thanh01] and in-text citations: @borgman03 [p.123; +@greenberg98, sec. 3.2; @thanh01]. + +Code blocks are used to include source code listings into the +document: + + #include + #include + #include + #include + // This is a comment + int main(int argc, char **argv) + { + while (--c > 1 && !fork()); + sleep(c = atoi(v[c])); + printf("%d\n", c); + wait(0); + return 0; + } + +There is an alternative syntax for code blocks that allows you to +specify additional information, such as the language of the source +code. This information can be used for syntax highlighting: + +``` sh +#!/bin/sh +fac() { + if [ "$1" -leq 1 ]; then + echo 1 + else + echo $(("$1" * fac $(("$1" - 1)))) + fi +} +`````````````` + +~~~~~~ Ruby +# Here's a way to empty an array. +joe = [ 'eggs.', 'some', 'break', 'to', 'Have' ] +print(joe.pop, " ") while joe.size > 0 +print "\n" +~~~~~~ + +\end{markdown*} + +\chapter{Inserting the bibliography} +After linking a bibliography data\-base files to the document using +the \verb"\"\texttt{thesis\discretionary{-}{}{}setup\{bib\discretionary{=}{=}{=}% +\{\textit{file1},\textit{file2},\,\ldots\,\}\}} command, you can +start citing the entries. This is just dummy text +\parencite{borgman03} lightly sprinkled with citations +\parencite[p.~123]{greenberg98}. Several sources can be cited at +once: \cite{borgman03,greenberg98,thanh01}. +\citetitle{greenberg98} was written by \citeauthor{greenberg98} in +\citeyear{greenberg98}. We can also produce \textcite{greenberg98}% +. The full bibliographic citation is: +\emph{\fullcite{greenberg98}}. We can easily insert a bibliographic +citation into the footnote\footfullcite{greenberg98}. + +The \verb"\nocite" command will not generate any +output\nocite{muni}, but it will insert its arguments into +the bibliography. The \verb"\nocite{*}" command will insert all the +records in the bibliography database file into the bibliography. +Try uncommenting the command +%% \nocite{*} +and watch the bibliography section come apart at the seams. + +When typesetting the document for the first time, citing a +\texttt{work} will expand to [\textbf{work}] and the +\verb"\printbibliography" command will produce no output. It is now +necessary to generate the bibliography by running \texttt{biber +\jobname.bcf} from the command line and then by typesetting the +document again twice. During the first run, the bibliography +section and the citations will be typeset, and in the second run, +the bibliography section will appear in the table of contents. + +The \texttt{biber} command needs to be executed from within the +directory, where the \LaTeX\ source file is located. In Windows, +the command line can be opened in a directory by holding down the +\textsf{Shift} key and by clicking the right mouse button while +hovering the cursor over a directory. Select the \textsf{Open +Command Window Here} option in the context menu that opens shortly +afterwards. + +With online services -- such as Overleaf -- or when using an +automatic tool -- such as \LaTeX MK -- all commands are executed +automatically. When you omit the \verb"\printbibliography" command, +its location will be decided by the template. + + {\singlespacing + \printbibliography[heading=bibintoc] %% Print the bibliography. + } + +\chapter{Inserting the index} +After using the \verb"\makeindex" macro and loading the +\texttt{makeidx} package that provides additional indexing +commands, index entries can be created by issuing the \verb"\index" +command. \index{dummy text|(}It is possible to create ranged index +entries, which will encompass a span of text.\index{dummy text|)} +To insert complex typographic material -- such as $\alpha$ +\index{alpha@$\alpha$} or \TeX{} \index{TeX@\TeX} -- +into the index, you need to specify a text string, which will +determine how the entry will be sorted. It is also possible to +create hierarchal entries. \index{vehicles!trucks} +\index{vehicles!speed cars} + +After typesetting the document, it is necessary to generate the +index by running +\begin{center}% + \texttt{texindy -I latex -C utf8 -L }$\langle$\textit{locale}% + $\rangle$\texttt{ \jobname.idx} +\end{center} +from the command line, where $\langle$\textit{locale}$\rangle$ +corresponds to the main locale of your thesis -- such as +\texttt{english}, and then typesetting the document again. + +The \texttt{texindy} command needs to be executed from within the +directory, where the \LaTeX\ source file is located. In Windows, +the command line can be opened in a directory by holding down the +\textsf{Shift} key and by clicking the right mouse button while +hovering the cursor over a directory. Select the \textsf{Open Command +Window Here} option in the context menu that opens shortly +afterwards. + +With online services -- such as Overleaf -- the commands are +executed automatically, although the locale may be erroneously +detected, or the \texttt{makeindex} tool (which is only able to +sort entries that contain digits and letters of the English +alphabet) may be used instead of \texttt{texindy}. In either case, +the index will be ill-sorted. + + \makeatletter\thesis@blocks@clear\makeatother + \phantomsection %% Print the index and insert it into the + \addcontentsline{toc}{chapter}{\indexname} %% table of contents. + \printindex + +\appendix %% Start the appendices. +\chapter{An appendix} +Here you can insert the appendices of your thesis. + +\end{document} diff --git a/macros/latex/contrib/fithesis/example/mu/fsps-pdflatex.pdf b/macros/latex/contrib/fithesis/example/mu/fsps-pdflatex.pdf new file mode 100644 index 0000000000..db7adad919 Binary files /dev/null and b/macros/latex/contrib/fithesis/example/mu/fsps-pdflatex.pdf differ diff --git a/macros/latex/contrib/fithesis/example/mu/fsps-pdflatex.tex b/macros/latex/contrib/fithesis/example/mu/fsps-pdflatex.tex new file mode 100644 index 0000000000..35bb343b20 --- /dev/null +++ b/macros/latex/contrib/fithesis/example/mu/fsps-pdflatex.tex @@ -0,0 +1,652 @@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% I, the copyright holder of this work, release this work into the +%% public domain. This applies worldwide. In some countries this may +%% not be legally possible; if so: I grant anyone the right to use +%% this work for any purpose, without any conditions, unless such +%% conditions are required by law. +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\documentclass[ + digital, %% This option enables the default options for the + %% digital version of a document. Replace with `printed` + %% to enable the default options for the printed version + %% of a document. + twoside, %% This option enables double-sided typesetting. Use at + %% least 120 g/m² paper to prevent show-through. Replace + %% with `oneside` to use one-sided typesetting; use only + %% if you don’t have access to a double-sided printer, + %% or if one-sided typesetting is a formal requirement + %% at your faculty. + table, %% This option causes the coloring of tables. Replace + %% with `notable` to restore plain LaTeX tables. + lof, %% This option prints the List of Figures. Replace with + %% `nolof` to hide the List of Figures. + lot, %% This option prints the List of Tables. Replace with + %% `nolot` to hide the List of Tables. + %% More options are listed in the user guide at + %% . +]{fithesis3} +%% The following section sets up the locales used in the thesis. +\usepackage[resetfonts]{cmap} %% We need to load the T2A font encoding +\usepackage[T1,T2A]{fontenc} %% to use the Cyrillic fonts with Russian texts. +\usepackage[ + main=english, %% By using `czech` or `slovak` as the main locale + %% instead of `english`, you can typeset the thesis + %% in either Czech or Slovak, respectively. + english, german, russian, czech, slovak %% The additional keys allow +]{babel} %% foreign texts to be typeset as follows: +%% +%% \begin{otherlanguage}{german} ... \end{otherlanguage} +%% \begin{otherlanguage}{russian} ... \end{otherlanguage} +%% \begin{otherlanguage}{czech} ... \end{otherlanguage} +%% \begin{otherlanguage}{slovak} ... \end{otherlanguage} +%% +%% For non-Latin scripts, it may be necessary to load additional +%% fonts: +\usepackage{paratype} +\def\textrussian#1{{\usefont{T2A}{PTSerif-TLF}{m}{rm}#1}} +%% +%% The following section sets up the metadata of the thesis. +\thesissetup{ + date = \the\year/\the\month/\the\day, + university = mu, + faculty = fsps, + type = bc, + field = Sport Management, + author = Jane Doe, + gender = f, + advisor = John Smith, + title = The use of LaTeX for the Typesetting + of Sports Tables, + TeXtitle = The use of \LaTeX\ for the Typesetting + of Sports Tables, + bib = example.bib, +} +\usepackage{makeidx} %% The `makeidx` package contains +\makeindex %% helper commands for index typesetting. +%% These additional packages are used within the document: +\usepackage{paralist} %% Compact list environments +\usepackage{amsmath} %% Mathematics +\usepackage{amsthm} +\usepackage{amsfonts} +\usepackage{url} %% Hyperlinks +\usepackage{markdown} %% Lightweight markup +\usepackage{listings} %% Source code highlighting +\lstset{ + basicstyle = \ttfamily,% + identifierstyle = \color{black},% + keywordstyle = \color{blue},% + keywordstyle = {[2]\color{cyan}},% + keywordstyle = {[3]\color{olive}},% + stringstyle = \color{teal},% + commentstyle = \itshape\color{magenta}} +\usepackage{floatrow} %% Putting captions above tables +\floatsetup[table]{capposition=top} +\begin{document} +\chapter*{Introduction} +\addcontentsline{toc}{chapter}{Introduction} + +Theses are rumoured to be the capstones of education, so I decided +to write one of my own. If all goes well, I will soon have a +diploma under my belt. Wish me luck! + +\begin{otherlanguage}{czech} +Říká se, že závěrečné práce jsou vyvrcholením studia a tak jsem se +rozhodl jednu také napsat. Pokud vše půjde podle plánu, odnesu si +na konci semestru diplom. Držte mi palce! +\end{otherlanguage} + +\begin{otherlanguage}{slovak} +Hovorí sa, že záverečné práce sú vyvrcholením štúdia a tak som sa +rozhodol jednu tiež napísať. Ak všetko pôjde podľa plánu, odnesiem +si na konci semestra diplom. Držte mi palce! +\end{otherlanguage} + +\begin{otherlanguage}{german} +Man munkelt, dass die Dissertation die Krönung der Ausbildung ist. +Deshalb habe ich mich beschlossen meine eigene zu schreiben. Wenn +alles gut geht, bekomme ich bald ein Diplom. Wünsch mir Glück! +\end{otherlanguage} + +\begin{otherlanguage}{russian}\textrussian{% +Говорят, что тезис -- это кульминация обучения. Поэтому я и решил +написать собственный тезис. Если всё сработает по плану, я скоро +получу диплом. Желайте мне удачи! +}\end{otherlanguage} + +\chapter{These are} +\section{the available} +\subsection{sectioning} +\subsubsection{commands.} +\paragraph{Paragraphs and} +\subparagraph{subparagraphs are available as well.} +Inside the text, you can also use unnumbered lists, +\begin{itemize} + \item such as + \item this one + \begin{itemize} + \item and they can be nested as well. + \item[>>] You can even turn the bullets into something fancier, + \item[\S] if you so desire. + \end{itemize} +\end{itemize} +Numbered lists are +\begin{enumerate} + \item very + \begin{enumerate} + \item similar + \end{enumerate} +\end{enumerate} +and so are description lists: +\begin{description} + \item[Description list] + A list of terms with a description of each term +\end{description} +The spacing of these lists is geared towards paragraphs of text. +For lists of words and phrases, the \textsf{paralist} package +offers commands +\begin{compactitem} + \item that + \begin{compactitem} + \item are + \begin{compactitem} + \item better + \begin{compactitem} + \item suited + \end{compactitem} + \end{compactitem} + \end{compactitem} +\end{compactitem} +\begin{compactenum} + \item to + \begin{compactenum} + \item this + \begin{compactenum} + \item kind of + \begin{compactenum} + \item content. + \end{compactenum} + \end{compactenum} + \end{compactenum} +\end{compactenum} +The \textsf{amsthm} package provides the commands necessary for the +typesetting of mathematical definitions, theorems, lemmas and +proofs. + +%% We will define several mathematical sectioning commands. +\newtheorem{theorem}{Theorem}[section] %% The numbering of theorems + %% will be reset after each section. +\newtheorem{lemma}[theorem]{Lemma} %% The numbering of lemmas +\newtheorem{corollary}[theorem]{Corollary} %% and corollaries will + %% share the counter with theorems. +\theoremstyle{definition} +\newtheorem{definition}{Definition} +\theoremstyle{remark} +\newtheorem*{remark}{Remark} + +\begin{theorem} + This is a theorem that offers a profound insight into the + mathematical sectioning commands. +\end{theorem} +\begin{theorem}[Another theorem] + This is another theorem. Unlike the first one, this theorem has + been endowed with a name. +\end{theorem} +\begin{lemma} + Let us suppose that $x^2+y^2=z^2$. Then + \begin{equation} + \biggl\langle u\biggm|\sum_{i=1}^nF(e_i,v)e_i\biggr\rangle + =F\biggl(\sum_{i=1}^n\langle e_i|u\rangle e_i,v\biggr). + \end{equation} +\end{lemma} +\begin{proof} + $\nabla^2 f(x,y)=\frac{\partial^2f}{\partial x^2}+ + \frac{\partial^2f}{\partial y^2}$. +\end{proof} +\begin{corollary} + This is a corollary. +\end{corollary} +\begin{remark} + This is a remark. +\end{remark} + +\chapter{Floats and references} +\begin{figure} + \begin{center} + %% PNG and JPG images can be inserted into the document as well, + %% but their resolution needs to be adequate. The minimum is + %% about 100 pixels per 1 centimeter or 300 pixels per 1 inch. + %% That means that a JPG or PNG image typeset at 4 × 4 cm should + %% be 400 × 400 px large at the bare minimum. + %% + %% The optimum is about 250 pixels per 1 centimeter or 600 + %% pixels per 1 inch. That means that a JPG or PNG image typeset + %% at 4 × 4 cm should be 1000 × 1000 px large or larger. + \includegraphics[width=4cm]{fithesis/logo/mu/fithesis-base.pdf} + \end{center} + \caption{The logo of the Masaryk University at 40\,mm} + \label{fig:mulogo1} +\end{figure} + +\begin{figure} + \begin{center} + \begin{minipage}{.66\textwidth} + \includegraphics[width=\textwidth]{fithesis/logo/mu/fithesis-base.pdf} + \end{minipage} + \begin{minipage}{.33\textwidth} + \includegraphics[width=\textwidth]{fithesis/logo/mu/fithesis-base.pdf} \\ + \includegraphics[width=\textwidth]{fithesis/logo/mu/fithesis-base.pdf} + \end{minipage} + \end{center} + \caption{The logo of the Masaryk University at $\frac23$ and + $\frac13$ of text width} + \label{fig:mulogo2} +\end{figure} + +\begin{table} + \begin{tabularx}{\textwidth}{lllX} + \toprule + Day & Min Temp & Max Temp & Summary \\ + \midrule + Monday & $13^{\circ}\mathrm{C}$ & $21^\circ\mathrm{C}$ & A + clear day with low wind and no adverse current advisories. \\ + Tuesday & $11^{\circ}\mathrm{C}$ & $17^\circ\mathrm{C}$ & A + trough of low pressure will come from the northwest. \\ + Wednesday & $10^{\circ}\mathrm{C}$ & + $21^\circ\mathrm{C}$ & Rain will spread to all parts during the + morning. \\ + \bottomrule + \end{tabularx} + \caption{A weather forecast} + \label{tab:weather} +\end{table} + +The logo of the Masaryk University is shown in Figure +\ref{fig:mulogo1} and Figure \ref{fig:mulogo2} at pages +\pageref{fig:mulogo1} and \pageref{fig:mulogo2}. The weather +forecast is shown in Table \ref{tab:weather} at page +\pageref{tab:weather}. The following chapter is Chapter +\ref{chap:matheq} and starts at page \pageref{chap:matheq}. +Items \ref{item:star1}, \ref{item:star2}, and +\ref{item:star3} are starred in the following list: +\begin{compactenum} + \item some text + \item some other text + \item $\star$ \label{item:star1} + \begin{compactenum} + \item some text + \item $\star$ \label{item:star2} + \item some other text + \begin{compactenum} + \item some text + \item some other text + \item yet another piece of text + \item $\star$ \label{item:star3} + \end{compactenum} + \item yet another piece of text + \end{compactenum} + \item yet another piece of text +\end{compactenum} +If your reference points to a place that has not yet been typeset, +the \verb"\ref" command will expand to \textbf{??} during the first +run of +\texttt{pdflatex \jobname.tex} +and a second run is going to be needed for the references to +resolve. With online services -- such as Overleaf -- this is +performed automatically. + +\chapter{Mathematical equations} +\label{chap:matheq} +\TeX{} comes pre-packed with the ability to typeset inline +equations, such as $\mathrm{e}^{ix}=\cos x+i\sin x$, and display +equations, such as \[ + \mathbf{A}^{-1} = \begin{bmatrix} + a & b \\ c & d \\ + \end{bmatrix}^{-1} = + \frac{1}{\det(\mathbf{A})} \begin{bmatrix} + \,\,\,d & \!\!-b \\ -c & \,a \\ + \end{bmatrix} = + \frac{1}{ad - bc} \begin{bmatrix} + \,\,\,d & \!\!-b \\ -c & \,a \\ + \end{bmatrix}. +\] \LaTeX{} defines the automatically numbered \texttt{equation} +environment: +\begin{equation} + \gamma Px = PAx = PAP^{-1}Px. +\end{equation} +The package \textsf{amsmath} provides several additional +environments that can be used to typeset complex equations: +\begin{enumerate} + \item An equation can be spread over multiple lines using the + \texttt{multline} environment: + \begin{multline} + a + b + c + d + e + f + b + c + d + e + f + b + c + d + e + +f \\ + + f + g + h + i + j + k + l + m + n + o + p + q + \end{multline} + + \item Several aligned equations can be typeset using the + \texttt{align} environment: + \begin{align} + a + b &= c + d \\ + u &= v + w + x \\[1ex] + i + j + k + l &= m + \end{align} + + \item The \texttt{alignat} environment is similar to + \texttt{align}, but it doesn't insert horizontal spaces between + the individual columns: + \begin{alignat}{2} + a + b + c &+ d & &= 0 \\ + e &+ f + g & &= 5 + \end{alignat} + + \item Much like chapter, sections, tables, figures, or list + items, equations -- such as \eqref{eq:first} and + \eqref{eq:mine} -- can also be labeled and referenced: + \begin{alignat}{4} + b_{11}x_1 &+ b_{12}x_2 & &+ b_{13}x_3 & & & + &= y_1, \label{eq:first} \\ + b_{21}x_1 &+ b_{22}x_2 & & & &+ b_{24}x_4 & + &= y_2. \tag{My equation} \label{eq:mine} + \end{alignat} + + \item The \texttt{gather} environment makes it possible to + typeset several equations without any alignment: + \begin{gather} + \psi = \psi\psi, \\ + \eta = \eta\eta\eta\eta\eta\eta, \\ + \theta = \theta. + \end{gather} + + \item Several cases can be typeset using the \texttt{cases} + environment: + \begin{equation} + |y| = \begin{cases} + \phantom-y & \text{if }z\geq0, \\ + -y & \text{otherwise}. + \end{cases} + \end{equation} +\end{enumerate} +For the complete list of environments and commands, consult the +\textsf{amsmath} package manual\footnote{ + See \url{http://mirrors.ctan.org/macros/latex/required/amslatex/math/amsldoc.pdf}. + The \texttt{\textbackslash url} command is provided by the + package \textsf{url}. +}. + +\chapter{\textnormal{We \textsf{have} \texttt{several} \textsc{fonts} + \textit{at} \textbf{disposal}}} +The serified roman font is used for the main body of the text. +\textit{Italics are typically used to denote emphasis or +quotations.} \texttt{The teletype font is typically used for source +code listings.} The \textbf{bold}, \textsc{small-caps} and +\textsf{sans-serif} variants of the base roman font can be used to +denote specific types of information. + +\tiny We \scriptsize can \footnotesize also \small change \normalsize +the \large font \Large size, \LARGE although \huge it \Huge +is \huge usually \LARGE not \Large necessary.\normalsize + +A wide variety of mathematical fonts is also available, such as: \[ + \mathrm{ABC}, \mathcal{ABC}, \mathbf{ABC}, \mathsf{ABC}, + \mathit{ABC}, \mathtt{ABC} +\] By loading the \textsf{amsfonts} packages, several additional +fonts will become available: \[ + \mathfrak{ABC}, \mathbb{ABC} +\] Many other mathematical fonts are available\footnote{ + See \url{http://tex.stackexchange.com/a/58124/70941}. +}. + +\chapter{Using lightweight markup} +\shorthandoff{-} +\begin{markdown*}{% + hybrid, + definitionLists, + footnotes, + inlineFootnotes, + hashEnumerators, + fencedCode, + citations, + citationNbsps, +} + +If you decide that \LaTeX{} is too wordy for some parts of your +document, there are [packages](https://www.ctan.org/pkg/markdown +"Markdown") that allow you to use more lightweight markup next +to it. + + ![logo](fithesis/logo/mu/fithesis-base.pdf "The logo of the + Masaryk University") + +This is a bullet list. Unlike numbered lists, bulleted lists +contain an **unordered** set of bullet points. When a bullet point +contains multiple paragraphs, the list is typeset as follows: + + * The first item of a bullet list + + that spans several paragraphs, + * the second item of a bullet list, + * the third item of a bullet list. + +When none of the bullet points contains multiple paragraphs, the +list has a more compact form: + + * The first item of a bullet list, + * the second item of a bullet list, + * the third item of a bullet list. + +Unlike a bulleted list, a numbered list implies chronology or +ordering of the bullet points. When a bullet point +contains multiple paragraphs, the list is typeset as follows: + + 1. The first item of an ordered list + + that spans several paragraphs, + 2. the second item of an ordered list, + 3. the third item of an ordered list. + #. If you are feeling lazy, + #. you can use hash enumerators as well. + +When none of the bullet points contains multiple paragraphs, the +list has a more compact form: + + 6. The first item of an ordered list, + 7. the second item of an ordered list, + 8. the third item of an ordered list. + +Definition lists are used to provide definitions of terms. When +a definition contains multiple paragraphs, the list is typeset +as follows: + +Term 1 + +: Definition 1 + +*Term 2* + +: Definition 2 + + Some code, part of Definition 2 + + Third paragraph of Definition 2. + +When none of the bullet points contains multiple paragraphs, the +list has a more compact form: + +Term 1 +: Definition 1 +*Term 2* +: Definition 2 + +Block quotations are used to include an excerpt from an external +document in way that visually clearly separates the excerpt from +the rest of the work: + +> This is the first level of quoting. +> +> > This is nested blockquote. +> +> Back to the first level. + +Footnotes are used to include additional information to the +document that are not necessary for the understanding of the main +text. Here is a footnote reference^[Here is the footnote.] and +another.[^longnote] + +[^longnote]: Here's one with multiple blocks. + + Subsequent paragraphs are indented to show that they +belong to the previous footnote. + + Some code + + The whole paragraph can be indented, or just the first + line. In this way, multi-paragraph footnotes work like + multi-paragraph list items. + +Citations are used to provide bibliographical references to other +documents. This is a regular citation~[@borgman03, p. 123]. This is +an in-text citation: @borgman03\. You can also cite several authors +at once using both regular~[see @borgman03, p. 123; @greenberg98, +sec. 3.2; and @thanh01] and in-text citations: @borgman03 [p.123; +@greenberg98, sec. 3.2; @thanh01]. + +Code blocks are used to include source code listings into the +document: + + #include + #include + #include + #include + // This is a comment + int main(int argc, char **argv) + { + while (--c > 1 && !fork()); + sleep(c = atoi(v[c])); + printf("%d\n", c); + wait(0); + return 0; + } + +There is an alternative syntax for code blocks that allows you to +specify additional information, such as the language of the source +code. This information can be used for syntax highlighting: + +``` sh +#!/bin/sh +fac() { + if [ "$1" -leq 1 ]; then + echo 1 + else + echo $(("$1" * fac $(("$1" - 1)))) + fi +} +`````````````` + +~~~~~~ Ruby +# Here's a way to empty an array. +joe = [ 'eggs.', 'some', 'break', 'to', 'Have' ] +print(joe.pop, " ") while joe.size > 0 +print "\n" +~~~~~~ + +\end{markdown*} +\shorthandon{-} + +\chapter{Inserting the bibliography} +After linking a bibliography data\-base files to the document using +the \verb"\"\texttt{thesis\discretionary{-}{}{}setup\{bib\discretionary{=}{=}{=}% +\{\textit{file1},\textit{file2},\,\ldots\,\}\}} command, you can +start citing the entries. This is just dummy text +\parencite{borgman03} lightly sprinkled with citations +\parencite[p.~123]{greenberg98}. Several sources can be cited at +once: \cite{borgman03,greenberg98,thanh01}. +\citetitle{greenberg98} was written by \citeauthor{greenberg98} in +\citeyear{greenberg98}. We can also produce \textcite{greenberg98}% +. The full bibliographic citation is: +\emph{\fullcite{greenberg98}}. We can easily insert a bibliographic +citation into the footnote\footfullcite{greenberg98}. + +The \verb"\nocite" command will not generate any +output\nocite{muni}, but it will insert its arguments into +the bibliography. The \verb"\nocite{*}" command will insert all the +records in the bibliography database file into the bibliography. +Try uncommenting the command +%% \nocite{*} +and watch the bibliography section come apart at the seams. + +When typesetting the document for the first time, citing a +\texttt{work} will expand to [\textbf{work}] and the +\verb"\printbibliography" command will produce no output. It is now +necessary to generate the bibliography by running \texttt{biber +\jobname.bcf} from the command line and then by typesetting the +document again twice. During the first run, the bibliography +section and the citations will be typeset, and in the second run, +the bibliography section will appear in the table of contents. + +The \texttt{biber} command needs to be executed from within the +directory, where the \LaTeX\ source file is located. In Windows, +the command line can be opened in a directory by holding down the +\textsf{Shift} key and by clicking the right mouse button while +hovering the cursor over a directory. Select the \textsf{Open +Command Window Here} option in the context menu that opens shortly +afterwards. + +With online services -- such as Overleaf -- or when using an +automatic tool -- such as \LaTeX MK -- all commands are executed +automatically. When you omit the \verb"\printbibliography" command, +its location will be decided by the template. + + {\singlespacing + \printbibliography[heading=bibintoc] %% Print the bibliography. + } + +\chapter{Inserting the index} +After using the \verb"\makeindex" macro and loading the +\texttt{makeidx} package that provides additional indexing +commands, index entries can be created by issuing the \verb"\index" +command. \index{dummy text|(}It is possible to create ranged index +entries, which will encompass a span of text.\index{dummy text|)} +To insert complex typographic material -- such as $\alpha$ +\index{alpha@$\alpha$} or \TeX{} \index{TeX@\TeX} -- +into the index, you need to specify a text string, which will +determine how the entry will be sorted. It is also possible to +create hierarchal entries. \index{vehicles!trucks} +\index{vehicles!speed cars} + +After typesetting the document, it is necessary to generate the +index by running +\begin{center}% + \texttt{texindy -I latex -C utf8 -L }$\langle$\textit{locale}% + $\rangle$\texttt{ \jobname.idx} +\end{center} +from the command line, where $\langle$\textit{locale}$\rangle$ +corresponds to the main locale of your thesis -- such as +\texttt{english}, and then typesetting the document again. + +The \texttt{texindy} command needs to be executed from within the +directory, where the \LaTeX\ source file is located. In Windows, +the command line can be opened in a directory by holding down the +\textsf{Shift} key and by clicking the right mouse button while +hovering the cursor over a directory. Select the \textsf{Open Command +Window Here} option in the context menu that opens shortly +afterwards. + +With online services -- such as Overleaf -- the commands are +executed automatically, although the locale may be erroneously +detected, or the \texttt{makeindex} tool (which is only able to +sort entries that contain digits and letters of the English +alphabet) may be used instead of \texttt{texindy}. In either case, +the index will be ill-sorted. + + \makeatletter\thesis@blocks@clear\makeatother + \phantomsection %% Print the index and insert it into the + \addcontentsline{toc}{chapter}{\indexname} %% table of contents. + \printindex + +\appendix %% Start the appendices. +\chapter{An appendix} +Here you can insert the appendices of your thesis. + +\end{document} diff --git a/macros/latex/contrib/fithesis/example/mu/fss-lualatex.pdf b/macros/latex/contrib/fithesis/example/mu/fss-lualatex.pdf new file mode 100644 index 0000000000..e642cd22e9 Binary files /dev/null and b/macros/latex/contrib/fithesis/example/mu/fss-lualatex.pdf differ diff --git a/macros/latex/contrib/fithesis/example/mu/fss-lualatex.tex b/macros/latex/contrib/fithesis/example/mu/fss-lualatex.tex new file mode 100644 index 0000000000..65365d503b --- /dev/null +++ b/macros/latex/contrib/fithesis/example/mu/fss-lualatex.tex @@ -0,0 +1,658 @@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% I, the copyright holder of this work, release this work into the +%% public domain. This applies worldwide. In some countries this may +%% not be legally possible; if so: I grant anyone the right to use +%% this work for any purpose, without any conditions, unless such +%% conditions are required by law. +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\documentclass[ + digital, %% This option enables the default options for the + %% digital version of a document. Replace with `printed` + %% to enable the default options for the printed version + %% of a document. + twoside, %% This option enables double-sided typesetting. Use at + %% least 120 g/m² paper to prevent show-through. Replace + %% with `oneside` to use one-sided typesetting; use only + %% if you don’t have access to a double-sided printer, + %% or if one-sided typesetting is a formal requirement + %% at your faculty. + table, %% This option causes the coloring of tables. Replace + %% with `notable` to restore plain LaTeX tables. + lof, %% This option prints the List of Figures. Replace with + %% `nolof` to hide the List of Figures. + lot, %% This option prints the List of Tables. Replace with + %% `nolot` to hide the List of Tables. + %% More options are listed in the user guide at + %% . +]{fithesis3} +%% The following section sets up the locales used in the thesis. +\usepackage{polyglossia} %% By using `czech` or `slovak` as the +\setmainlanguage{english} %% main locale instead of `english`, you +%% can typeset the thesis in either Czech or Slovak, respectively. +\setotherlanguages{german, russian, czech, slovak} %% The +%% +%% \begin{otherlanguage}{german} ... \end{otherlanguage} +%% \begin{otherlanguage}{russian} ... \end{otherlanguage} +%% \begin{otherlanguage}{czech} ... \end{otherlanguage} +%% \begin{otherlanguage}{slovak} ... \end{otherlanguage} +%% +%% For non-Latin scripts, it may be necessary to load additional +%% fonts: +\newfontfamily\russianfont[Script=Cyrillic,Ligatures=TeX]{PT Serif} +%% +%% The following section sets up the metadata of the thesis. +\thesissetup{ + date = \the\year/\the\month/\the\day, + university = mu, + faculty = fss, + type = bc, + author = Jane Doe, + gender = f, + advisor = John Smith, + title = LaTeX and Its Impact on the + Information Society, + TeXtitle = \LaTeX\ and Its Impact on the + Information Society, + keywords = {keyword1, keyword2, ...}, + TeXkeywords = {keyword1, keyword2, \ldots}, + abstract = {This is the abstract of my thesis, which can + + span multiple paragraphs.}, + thanks = {These are the acknowledgements for my thesis, which can + + span multiple paragraphs.}, + bib = example.bib, + %% The following keys are only useful, when you're using a + %% locale other than English. You can safely omit them in an + %% English thesis. + keywordsEn = {keyword1, keyword2, ...}, + TeXkeywordsEn = {keyword1, keyword2, \ldots}, + abstractEn = {This is the English abstract of my thesis, which can + + span multiple paragraphs.}, +} +\usepackage{makeidx} %% The `makeidx` package contains +\makeindex %% helper commands for index typesetting. +%% These additional packages are used within the document: +\usepackage{paralist} %% Compact list environments +\usepackage{amsmath} %% Mathematics +\usepackage{amsthm} +\usepackage{amsfonts} +\usepackage{url} %% Hyperlinks +\usepackage{markdown} %% Lightweight markup +\usepackage{listings} %% Source code highlighting +\lstset{ + basicstyle = \ttfamily,% + identifierstyle = \color{black},% + keywordstyle = \color{blue},% + keywordstyle = {[2]\color{cyan}},% + keywordstyle = {[3]\color{olive}},% + stringstyle = \color{teal},% + commentstyle = \itshape\color{magenta}} +\usepackage{floatrow} %% Putting captions above tables +\floatsetup[table]{capposition=top} +\begin{document} +\chapter*{Introduction} +\addcontentsline{toc}{chapter}{Introduction} + +Theses are rumoured to be the capstones of education, so I decided +to write one of my own. If all goes well, I will soon have a +diploma under my belt. Wish me luck! + +\begin{otherlanguage}{czech} +Říká se, že závěrečné práce jsou vyvrcholením studia a tak jsem se +rozhodl jednu také napsat. Pokud vše půjde podle plánu, odnesu si +na konci semestru diplom. Držte mi palce! +\end{otherlanguage} + +\begin{otherlanguage}{slovak} +Hovorí sa, že záverečné práce sú vyvrcholením štúdia a tak som sa +rozhodol jednu tiež napísať. Ak všetko pôjde podľa plánu, odnesiem +si na konci semestra diplom. Držte mi palce! +\end{otherlanguage} + +\begin{otherlanguage}{german} +Man munkelt, dass die Dissertation die Krönung der Ausbildung ist. +Deshalb habe ich mich beschlossen meine eigene zu schreiben. Wenn +alles gut geht, bekomme ich bald ein Diplom. Wünsch mir Glück! +\end{otherlanguage} + +\begin{otherlanguage}{russian} +Говорят, что тезис -- это кульминация обучения. Поэтому я и решил +написать собственный тезис. Если всё сработает по плану, я скоро +получу диплом. Желайте мне удачи! +\end{otherlanguage} + +\chapter{These are} +\section{the available} +\subsection{sectioning} +\subsubsection{commands.} +\paragraph{Paragraphs and} +\subparagraph{subparagraphs are available as well.} +Inside the text, you can also use unnumbered lists, +\begin{itemize} + \item such as + \item this one + \begin{itemize} + \item and they can be nested as well. + \item[>>] You can even turn the bullets into something fancier, + \item[\S] if you so desire. + \end{itemize} +\end{itemize} +Numbered lists are +\begin{enumerate} + \item very + \begin{enumerate} + \item similar + \end{enumerate} +\end{enumerate} +and so are description lists: +\begin{description} + \item[Description list] + A list of terms with a description of each term +\end{description} +The spacing of these lists is geared towards paragraphs of text. +For lists of words and phrases, the \textsf{paralist} package +offers commands +\begin{compactitem} + \item that + \begin{compactitem} + \item are + \begin{compactitem} + \item better + \begin{compactitem} + \item suited + \end{compactitem} + \end{compactitem} + \end{compactitem} +\end{compactitem} +\begin{compactenum} + \item to + \begin{compactenum} + \item this + \begin{compactenum} + \item kind of + \begin{compactenum} + \item content. + \end{compactenum} + \end{compactenum} + \end{compactenum} +\end{compactenum} +The \textsf{amsthm} package provides the commands necessary for the +typesetting of mathematical definitions, theorems, lemmas and +proofs. + +%% We will define several mathematical sectioning commands. +\newtheorem{theorem}{Theorem}[section] %% The numbering of theorems + %% will be reset after each section. +\newtheorem{lemma}[theorem]{Lemma} %% The numbering of lemmas +\newtheorem{corollary}[theorem]{Corollary} %% and corollaries will + %% share the counter with theorems. +\theoremstyle{definition} +\newtheorem{definition}{Definition} +\theoremstyle{remark} +\newtheorem*{remark}{Remark} + +\begin{theorem} + This is a theorem that offers a profound insight into the + mathematical sectioning commands. +\end{theorem} +\begin{theorem}[Another theorem] + This is another theorem. Unlike the first one, this theorem has + been endowed with a name. +\end{theorem} +\begin{lemma} + Let us suppose that $x^2+y^2=z^2$. Then + \begin{equation} + \biggl\langle u\biggm|\sum_{i=1}^nF(e_i,v)e_i\biggr\rangle + =F\biggl(\sum_{i=1}^n\langle e_i|u\rangle e_i,v\biggr). + \end{equation} +\end{lemma} +\begin{proof} + $\nabla^2 f(x,y)=\frac{\partial^2f}{\partial x^2}+ + \frac{\partial^2f}{\partial y^2}$. +\end{proof} +\begin{corollary} + This is a corollary. +\end{corollary} +\begin{remark} + This is a remark. +\end{remark} + +\chapter{Floats and references} +\begin{figure} + \begin{center} + %% PNG and JPG images can be inserted into the document as well, + %% but their resolution needs to be adequate. The minimum is + %% about 100 pixels per 1 centimeter or 300 pixels per 1 inch. + %% That means that a JPG or PNG image typeset at 4 × 4 cm should + %% be 400 × 400 px large at the bare minimum. + %% + %% The optimum is about 250 pixels per 1 centimeter or 600 + %% pixels per 1 inch. That means that a JPG or PNG image typeset + %% at 4 × 4 cm should be 1000 × 1000 px large or larger. + \includegraphics[width=4cm]{fithesis/logo/mu/fithesis-base.pdf} + \end{center} + \caption{The logo of the Masaryk University at 40\,mm} + \label{fig:mulogo1} +\end{figure} + +\begin{figure} + \begin{center} + \begin{minipage}{.66\textwidth} + \includegraphics[width=\textwidth]{fithesis/logo/mu/fithesis-base.pdf} + \end{minipage} + \begin{minipage}{.33\textwidth} + \includegraphics[width=\textwidth]{fithesis/logo/mu/fithesis-base.pdf} \\ + \includegraphics[width=\textwidth]{fithesis/logo/mu/fithesis-base.pdf} + \end{minipage} + \end{center} + \caption{The logo of the Masaryk University at $\frac23$ and + $\frac13$ of text width} + \label{fig:mulogo2} +\end{figure} + +\begin{table} + \begin{tabularx}{\textwidth}{lllX} + \toprule + Day & Min Temp & Max Temp & Summary \\ + \midrule + Monday & $13^{\circ}\mathrm{C}$ & $21^\circ\mathrm{C}$ & A + clear day with low wind and no adverse current advisories. \\ + Tuesday & $11^{\circ}\mathrm{C}$ & $17^\circ\mathrm{C}$ & A + trough of low pressure will come from the northwest. \\ + Wednesday & $10^{\circ}\mathrm{C}$ & + $21^\circ\mathrm{C}$ & Rain will spread to all parts during the + morning. \\ + \bottomrule + \end{tabularx} + \caption{A weather forecast} + \label{tab:weather} +\end{table} + +The logo of the Masaryk University is shown in Figure +\ref{fig:mulogo1} and Figure \ref{fig:mulogo2} at pages +\pageref{fig:mulogo1} and \pageref{fig:mulogo2}. The weather +forecast is shown in Table \ref{tab:weather} at page +\pageref{tab:weather}. The following chapter is Chapter +\ref{chap:matheq} and starts at page \pageref{chap:matheq}. +Items \ref{item:star1}, \ref{item:star2}, and +\ref{item:star3} are starred in the following list: +\begin{compactenum} + \item some text + \item some other text + \item $\star$ \label{item:star1} + \begin{compactenum} + \item some text + \item $\star$ \label{item:star2} + \item some other text + \begin{compactenum} + \item some text + \item some other text + \item yet another piece of text + \item $\star$ \label{item:star3} + \end{compactenum} + \item yet another piece of text + \end{compactenum} + \item yet another piece of text +\end{compactenum} +If your reference points to a place that has not yet been typeset, +the \verb"\ref" command will expand to \textbf{??} during the first +run of +\texttt{lualatex \jobname.tex} +and a second run is going to be needed for the references to +resolve. With online services -- such as Overleaf -- this is +performed automatically. + +\chapter{Mathematical equations} +\label{chap:matheq} +\TeX{} comes pre-packed with the ability to typeset inline +equations, such as $\mathrm{e}^{ix}=\cos x+i\sin x$, and display +equations, such as \[ + \mathbf{A}^{-1} = \begin{bmatrix} + a & b \\ c & d \\ + \end{bmatrix}^{-1} = + \frac{1}{\det(\mathbf{A})} \begin{bmatrix} + \,\,\,d & \!\!-b \\ -c & \,a \\ + \end{bmatrix} = + \frac{1}{ad - bc} \begin{bmatrix} + \,\,\,d & \!\!-b \\ -c & \,a \\ + \end{bmatrix}. +\] \LaTeX{} defines the automatically numbered \texttt{equation} +environment: +\begin{equation} + \gamma Px = PAx = PAP^{-1}Px. +\end{equation} +The package \textsf{amsmath} provides several additional +environments that can be used to typeset complex equations: +\begin{enumerate} + \item An equation can be spread over multiple lines using the + \texttt{multline} environment: + \begin{multline} + a + b + c + d + e + f + b + c + d + e + f + b + c + d + e + +f \\ + + f + g + h + i + j + k + l + m + n + o + p + q + \end{multline} + + \item Several aligned equations can be typeset using the + \texttt{align} environment: + \begin{align} + a + b &= c + d \\ + u &= v + w + x \\[1ex] + i + j + k + l &= m + \end{align} + + \item The \texttt{alignat} environment is similar to + \texttt{align}, but it doesn't insert horizontal spaces between + the individual columns: + \begin{alignat}{2} + a + b + c &+ d & &= 0 \\ + e &+ f + g & &= 5 + \end{alignat} + + \item Much like chapter, sections, tables, figures, or list + items, equations -- such as \eqref{eq:first} and + \eqref{eq:mine} -- can also be labeled and referenced: + \begin{alignat}{4} + b_{11}x_1 &+ b_{12}x_2 & &+ b_{13}x_3 & & & + &= y_1, \label{eq:first} \\ + b_{21}x_1 &+ b_{22}x_2 & & & &+ b_{24}x_4 & + &= y_2. \tag{My equation} \label{eq:mine} + \end{alignat} + + \item The \texttt{gather} environment makes it possible to + typeset several equations without any alignment: + \begin{gather} + \psi = \psi\psi, \\ + \eta = \eta\eta\eta\eta\eta\eta, \\ + \theta = \theta. + \end{gather} + + \item Several cases can be typeset using the \texttt{cases} + environment: + \begin{equation} + |y| = \begin{cases} + \phantom-y & \text{if }z\geq0, \\ + -y & \text{otherwise}. + \end{cases} + \end{equation} +\end{enumerate} +For the complete list of environments and commands, consult the +\textsf{amsmath} package manual\footnote{ + See \url{http://mirrors.ctan.org/macros/latex/required/amslatex/math/amsldoc.pdf}. + The \texttt{\textbackslash url} command is provided by the + package \textsf{url}. +}. + +\chapter{\textnormal{We \textsf{have} \texttt{several} \textsc{fonts} + \textit{at} \textbf{disposal}}} +The serified roman font is used for the main body of the text. +\textit{Italics are typically used to denote emphasis or +quotations.} \texttt{The teletype font is typically used for source +code listings.} The \textbf{bold}, \textsc{small-caps} and +\textsf{sans-serif} variants of the base roman font can be used to +denote specific types of information. + +\tiny We \scriptsize can \footnotesize also \small change \normalsize +the \large font \Large size, \LARGE although \huge it \Huge +is \huge usually \LARGE not \Large necessary.\normalsize + +A wide variety of mathematical fonts is also available, such as: \[ + \mathrm{ABC}, \mathcal{ABC}, \mathbf{ABC}, \mathsf{ABC}, + \mathit{ABC}, \mathtt{ABC} +\] By loading the \textsf{amsfonts} packages, several additional +fonts will become available: \[ + \mathfrak{ABC}, \mathbb{ABC} +\] Many other mathematical fonts are available\footnote{ + See \url{http://tex.stackexchange.com/a/58124/70941}. +}. + +\chapter{Using lightweight markup} +\begin{markdown*}{% + hybrid, + definitionLists, + footnotes, + inlineFootnotes, + hashEnumerators, + fencedCode, + citations, + citationNbsps, +} + +If you decide that \LaTeX{} is too wordy for some parts of your +document, there are [packages](https://www.ctan.org/pkg/markdown +"Markdown") that allow you to use more lightweight markup next +to it. + + ![logo](fithesis/logo/mu/fithesis-base.pdf "The logo of the + Masaryk University") + +This is a bullet list. Unlike numbered lists, bulleted lists +contain an **unordered** set of bullet points. When a bullet point +contains multiple paragraphs, the list is typeset as follows: + + * The first item of a bullet list + + that spans several paragraphs, + * the second item of a bullet list, + * the third item of a bullet list. + +When none of the bullet points contains multiple paragraphs, the +list has a more compact form: + + * The first item of a bullet list, + * the second item of a bullet list, + * the third item of a bullet list. + +Unlike a bulleted list, a numbered list implies chronology or +ordering of the bullet points. When a bullet point +contains multiple paragraphs, the list is typeset as follows: + + 1. The first item of an ordered list + + that spans several paragraphs, + 2. the second item of an ordered list, + 3. the third item of an ordered list. + #. If you are feeling lazy, + #. you can use hash enumerators as well. + +When none of the bullet points contains multiple paragraphs, the +list has a more compact form: + + 6. The first item of an ordered list, + 7. the second item of an ordered list, + 8. the third item of an ordered list. + +Definition lists are used to provide definitions of terms. When +a definition contains multiple paragraphs, the list is typeset +as follows: + +Term 1 + +: Definition 1 + +*Term 2* + +: Definition 2 + + Some code, part of Definition 2 + + Third paragraph of Definition 2. + +When none of the bullet points contains multiple paragraphs, the +list has a more compact form: + +Term 1 +: Definition 1 +*Term 2* +: Definition 2 + +Block quotations are used to include an excerpt from an external +document in way that visually clearly separates the excerpt from +the rest of the work: + +> This is the first level of quoting. +> +> > This is nested blockquote. +> +> Back to the first level. + +Footnotes are used to include additional information to the +document that are not necessary for the understanding of the main +text. Here is a footnote reference^[Here is the footnote.] and +another.[^longnote] + +[^longnote]: Here's one with multiple blocks. + + Subsequent paragraphs are indented to show that they +belong to the previous footnote. + + Some code + + The whole paragraph can be indented, or just the first + line. In this way, multi-paragraph footnotes work like + multi-paragraph list items. + +Citations are used to provide bibliographical references to other +documents. This is a regular citation~[@borgman03, p. 123]. This is +an in-text citation: @borgman03\. You can also cite several authors +at once using both regular~[see @borgman03, p. 123; @greenberg98, +sec. 3.2; and @thanh01] and in-text citations: @borgman03 [p.123; +@greenberg98, sec. 3.2; @thanh01]. + +Code blocks are used to include source code listings into the +document: + + #include + #include + #include + #include + // This is a comment + int main(int argc, char **argv) + { + while (--c > 1 && !fork()); + sleep(c = atoi(v[c])); + printf("%d\n", c); + wait(0); + return 0; + } + +There is an alternative syntax for code blocks that allows you to +specify additional information, such as the language of the source +code. This information can be used for syntax highlighting: + +``` sh +#!/bin/sh +fac() { + if [ "$1" -leq 1 ]; then + echo 1 + else + echo $(("$1" * fac $(("$1" - 1)))) + fi +} +`````````````` + +~~~~~~ Ruby +# Here's a way to empty an array. +joe = [ 'eggs.', 'some', 'break', 'to', 'Have' ] +print(joe.pop, " ") while joe.size > 0 +print "\n" +~~~~~~ + +\end{markdown*} + +\chapter{Inserting the bibliography} +After linking a bibliography data\-base files to the document using +the \verb"\"\texttt{thesis\discretionary{-}{}{}setup\{bib\discretionary{=}{=}{=}% +\{\textit{file1},\textit{file2},\,\ldots\,\}\}} command, you can +start citing the entries. This is just dummy text +\parencite{borgman03} lightly sprinkled with citations +\parencite[p.~123]{greenberg98}. Several sources can be cited at +once: \cite{borgman03,greenberg98,thanh01}. +\citetitle{greenberg98} was written by \citeauthor{greenberg98} in +\citeyear{greenberg98}. We can also produce \textcite{greenberg98}% +. The full bibliographic citation is: +\emph{\fullcite{greenberg98}}. We can easily insert a bibliographic +citation into the footnote\footfullcite{greenberg98}. + +The \verb"\nocite" command will not generate any +output\nocite{muni}, but it will insert its arguments into +the bibliography. The \verb"\nocite{*}" command will insert all the +records in the bibliography database file into the bibliography. +Try uncommenting the command +%% \nocite{*} +and watch the bibliography section come apart at the seams. + +When typesetting the document for the first time, citing a +\texttt{work} will expand to [\textbf{work}] and the +\verb"\printbibliography" command will produce no output. It is now +necessary to generate the bibliography by running \texttt{biber +\jobname.bcf} from the command line and then by typesetting the +document again twice. During the first run, the bibliography +section and the citations will be typeset, and in the second run, +the bibliography section will appear in the table of contents. + +The \texttt{biber} command needs to be executed from within the +directory, where the \LaTeX\ source file is located. In Windows, +the command line can be opened in a directory by holding down the +\textsf{Shift} key and by clicking the right mouse button while +hovering the cursor over a directory. Select the \textsf{Open +Command Window Here} option in the context menu that opens shortly +afterwards. + +With online services -- such as Overleaf -- or when using an +automatic tool -- such as \LaTeX MK -- all commands are executed +automatically. When you omit the \verb"\printbibliography" command, +its location will be decided by the template. + + \printbibliography[heading=bibintoc] %% Print the bibliography. + +\chapter{Inserting the index} +After using the \verb"\makeindex" macro and loading the +\texttt{makeidx} package that provides additional indexing +commands, index entries can be created by issuing the \verb"\index" +command. \index{dummy text|(}It is possible to create ranged index +entries, which will encompass a span of text.\index{dummy text|)} +To insert complex typographic material -- such as $\alpha$ +\index{alpha@$\alpha$} or \TeX{} \index{TeX@\TeX} -- +into the index, you need to specify a text string, which will +determine how the entry will be sorted. It is also possible to +create hierarchal entries. \index{vehicles!trucks} +\index{vehicles!speed cars} + +After typesetting the document, it is necessary to generate the +index by running +\begin{center}% + \texttt{texindy -I latex -C utf8 -L }$\langle$\textit{locale}% + $\rangle$\texttt{ \jobname.idx} +\end{center} +from the command line, where $\langle$\textit{locale}$\rangle$ +corresponds to the main locale of your thesis -- such as +\texttt{english}, and then typesetting the document again. + +The \texttt{texindy} command needs to be executed from within the +directory, where the \LaTeX\ source file is located. In Windows, +the command line can be opened in a directory by holding down the +\textsf{Shift} key and by clicking the right mouse button while +hovering the cursor over a directory. Select the \textsf{Open Command +Window Here} option in the context menu that opens shortly +afterwards. + +With online services -- such as Overleaf -- the commands are +executed automatically, although the locale may be erroneously +detected, or the \texttt{makeindex} tool (which is only able to +sort entries that contain digits and letters of the English +alphabet) may be used instead of \texttt{texindy}. In either case, +the index will be ill-sorted. + + \makeatletter\thesis@blocks@clear\makeatother + \phantomsection %% Print the index and insert it into the + \addcontentsline{toc}{chapter}{\indexname} %% table of contents. + \printindex + +\appendix %% Start the appendices. +\chapter{An appendix} +Here you can insert the appendices of your thesis. + +\end{document} diff --git a/macros/latex/contrib/fithesis/example/mu/fss-pdflatex.pdf b/macros/latex/contrib/fithesis/example/mu/fss-pdflatex.pdf new file mode 100644 index 0000000000..03e8a4e464 Binary files /dev/null and b/macros/latex/contrib/fithesis/example/mu/fss-pdflatex.pdf differ diff --git a/macros/latex/contrib/fithesis/example/mu/fss-pdflatex.tex b/macros/latex/contrib/fithesis/example/mu/fss-pdflatex.tex new file mode 100644 index 0000000000..9ca917560b --- /dev/null +++ b/macros/latex/contrib/fithesis/example/mu/fss-pdflatex.tex @@ -0,0 +1,665 @@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% I, the copyright holder of this work, release this work into the +%% public domain. This applies worldwide. In some countries this may +%% not be legally possible; if so: I grant anyone the right to use +%% this work for any purpose, without any conditions, unless such +%% conditions are required by law. +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\documentclass[ + digital, %% This option enables the default options for the + %% digital version of a document. Replace with `printed` + %% to enable the default options for the printed version + %% of a document. + twoside, %% This option enables double-sided typesetting. Use at + %% least 120 g/m² paper to prevent show-through. Replace + %% with `oneside` to use one-sided typesetting; use only + %% if you don’t have access to a double-sided printer, + %% or if one-sided typesetting is a formal requirement + %% at your faculty. + table, %% This option causes the coloring of tables. Replace + %% with `notable` to restore plain LaTeX tables. + lof, %% This option prints the List of Figures. Replace with + %% `nolof` to hide the List of Figures. + lot, %% This option prints the List of Tables. Replace with + %% `nolot` to hide the List of Tables. + %% More options are listed in the user guide at + %% . +]{fithesis3} +%% The following section sets up the locales used in the thesis. +\usepackage[resetfonts]{cmap} %% We need to load the T2A font encoding +\usepackage[T1,T2A]{fontenc} %% to use the Cyrillic fonts with Russian texts. +\usepackage[ + main=english, %% By using `czech` or `slovak` as the main locale + %% instead of `english`, you can typeset the thesis + %% in either Czech or Slovak, respectively. + english, german, russian, czech, slovak %% The additional keys allow +]{babel} %% foreign texts to be typeset as follows: +%% +%% \begin{otherlanguage}{german} ... \end{otherlanguage} +%% \begin{otherlanguage}{russian} ... \end{otherlanguage} +%% \begin{otherlanguage}{czech} ... \end{otherlanguage} +%% \begin{otherlanguage}{slovak} ... \end{otherlanguage} +%% +%% For non-Latin scripts, it may be necessary to load additional +%% fonts: +\usepackage{paratype} +\def\textrussian#1{{\usefont{T2A}{PTSerif-TLF}{m}{rm}#1}} +%% +%% The following section sets up the metadata of the thesis. +\thesissetup{ + date = \the\year/\the\month/\the\day, + university = mu, + faculty = fss, + type = bc, + author = Jane Doe, + gender = f, + advisor = John Smith, + title = LaTeX and Its Impact on the + Information Society, + TeXtitle = \LaTeX\ and Its Impact on the + Information Society, + keywords = {keyword1, keyword2, ...}, + TeXkeywords = {keyword1, keyword2, \ldots}, + abstract = {This is the abstract of my thesis, which can + + span multiple paragraphs.}, + thanks = {These are the acknowledgements for my thesis, which can + + span multiple paragraphs.}, + bib = example.bib, + %% The following keys are only useful, when you're using a + %% locale other than English. You can safely omit them in an + %% English thesis. + keywordsEn = {keyword1, keyword2, ...}, + TeXkeywordsEn = {keyword1, keyword2, \ldots}, + abstractEn = {This is the English abstract of my thesis, which can + + span multiple paragraphs.}, +} +\usepackage{makeidx} %% The `makeidx` package contains +\makeindex %% helper commands for index typesetting. +%% These additional packages are used within the document: +\usepackage{paralist} %% Compact list environments +\usepackage{amsmath} %% Mathematics +\usepackage{amsthm} +\usepackage{amsfonts} +\usepackage{url} %% Hyperlinks +\usepackage{markdown} %% Lightweight markup +\usepackage{listings} %% Source code highlighting +\lstset{ + basicstyle = \ttfamily,% + identifierstyle = \color{black},% + keywordstyle = \color{blue},% + keywordstyle = {[2]\color{cyan}},% + keywordstyle = {[3]\color{olive}},% + stringstyle = \color{teal},% + commentstyle = \itshape\color{magenta}} +\usepackage{floatrow} %% Putting captions above tables +\floatsetup[table]{capposition=top} +\begin{document} +\chapter*{Introduction} +\addcontentsline{toc}{chapter}{Introduction} + +Theses are rumoured to be the capstones of education, so I decided +to write one of my own. If all goes well, I will soon have a +diploma under my belt. Wish me luck! + +\begin{otherlanguage}{czech} +Říká se, že závěrečné práce jsou vyvrcholením studia a tak jsem se +rozhodl jednu také napsat. Pokud vše půjde podle plánu, odnesu si +na konci semestru diplom. Držte mi palce! +\end{otherlanguage} + +\begin{otherlanguage}{slovak} +Hovorí sa, že záverečné práce sú vyvrcholením štúdia a tak som sa +rozhodol jednu tiež napísať. Ak všetko pôjde podľa plánu, odnesiem +si na konci semestra diplom. Držte mi palce! +\end{otherlanguage} + +\begin{otherlanguage}{german} +Man munkelt, dass die Dissertation die Krönung der Ausbildung ist. +Deshalb habe ich mich beschlossen meine eigene zu schreiben. Wenn +alles gut geht, bekomme ich bald ein Diplom. Wünsch mir Glück! +\end{otherlanguage} + +\begin{otherlanguage}{russian}\textrussian{% +Говорят, что тезис -- это кульминация обучения. Поэтому я и решил +написать собственный тезис. Если всё сработает по плану, я скоро +получу диплом. Желайте мне удачи! +}\end{otherlanguage} + +\chapter{These are} +\section{the available} +\subsection{sectioning} +\subsubsection{commands.} +\paragraph{Paragraphs and} +\subparagraph{subparagraphs are available as well.} +Inside the text, you can also use unnumbered lists, +\begin{itemize} + \item such as + \item this one + \begin{itemize} + \item and they can be nested as well. + \item[>>] You can even turn the bullets into something fancier, + \item[\S] if you so desire. + \end{itemize} +\end{itemize} +Numbered lists are +\begin{enumerate} + \item very + \begin{enumerate} + \item similar + \end{enumerate} +\end{enumerate} +and so are description lists: +\begin{description} + \item[Description list] + A list of terms with a description of each term +\end{description} +The spacing of these lists is geared towards paragraphs of text. +For lists of words and phrases, the \textsf{paralist} package +offers commands +\begin{compactitem} + \item that + \begin{compactitem} + \item are + \begin{compactitem} + \item better + \begin{compactitem} + \item suited + \end{compactitem} + \end{compactitem} + \end{compactitem} +\end{compactitem} +\begin{compactenum} + \item to + \begin{compactenum} + \item this + \begin{compactenum} + \item kind of + \begin{compactenum} + \item content. + \end{compactenum} + \end{compactenum} + \end{compactenum} +\end{compactenum} +The \textsf{amsthm} package provides the commands necessary for the +typesetting of mathematical definitions, theorems, lemmas and +proofs. + +%% We will define several mathematical sectioning commands. +\newtheorem{theorem}{Theorem}[section] %% The numbering of theorems + %% will be reset after each section. +\newtheorem{lemma}[theorem]{Lemma} %% The numbering of lemmas +\newtheorem{corollary}[theorem]{Corollary} %% and corollaries will + %% share the counter with theorems. +\theoremstyle{definition} +\newtheorem{definition}{Definition} +\theoremstyle{remark} +\newtheorem*{remark}{Remark} + +\begin{theorem} + This is a theorem that offers a profound insight into the + mathematical sectioning commands. +\end{theorem} +\begin{theorem}[Another theorem] + This is another theorem. Unlike the first one, this theorem has + been endowed with a name. +\end{theorem} +\begin{lemma} + Let us suppose that $x^2+y^2=z^2$. Then + \begin{equation} + \biggl\langle u\biggm|\sum_{i=1}^nF(e_i,v)e_i\biggr\rangle + =F\biggl(\sum_{i=1}^n\langle e_i|u\rangle e_i,v\biggr). + \end{equation} +\end{lemma} +\begin{proof} + $\nabla^2 f(x,y)=\frac{\partial^2f}{\partial x^2}+ + \frac{\partial^2f}{\partial y^2}$. +\end{proof} +\begin{corollary} + This is a corollary. +\end{corollary} +\begin{remark} + This is a remark. +\end{remark} + +\chapter{Floats and references} +\begin{figure} + \begin{center} + %% PNG and JPG images can be inserted into the document as well, + %% but their resolution needs to be adequate. The minimum is + %% about 100 pixels per 1 centimeter or 300 pixels per 1 inch. + %% That means that a JPG or PNG image typeset at 4 × 4 cm should + %% be 400 × 400 px large at the bare minimum. + %% + %% The optimum is about 250 pixels per 1 centimeter or 600 + %% pixels per 1 inch. That means that a JPG or PNG image typeset + %% at 4 × 4 cm should be 1000 × 1000 px large or larger. + \includegraphics[width=4cm]{fithesis/logo/mu/fithesis-base.pdf} + \end{center} + \caption{The logo of the Masaryk University at 40\,mm} + \label{fig:mulogo1} +\end{figure} + +\begin{figure} + \begin{center} + \begin{minipage}{.66\textwidth} + \includegraphics[width=\textwidth]{fithesis/logo/mu/fithesis-base.pdf} + \end{minipage} + \begin{minipage}{.33\textwidth} + \includegraphics[width=\textwidth]{fithesis/logo/mu/fithesis-base.pdf} \\ + \includegraphics[width=\textwidth]{fithesis/logo/mu/fithesis-base.pdf} + \end{minipage} + \end{center} + \caption{The logo of the Masaryk University at $\frac23$ and + $\frac13$ of text width} + \label{fig:mulogo2} +\end{figure} + +\begin{table} + \begin{tabularx}{\textwidth}{lllX} + \toprule + Day & Min Temp & Max Temp & Summary \\ + \midrule + Monday & $13^{\circ}\mathrm{C}$ & $21^\circ\mathrm{C}$ & A + clear day with low wind and no adverse current advisories. \\ + Tuesday & $11^{\circ}\mathrm{C}$ & $17^\circ\mathrm{C}$ & A + trough of low pressure will come from the northwest. \\ + Wednesday & $10^{\circ}\mathrm{C}$ & + $21^\circ\mathrm{C}$ & Rain will spread to all parts during the + morning. \\ + \bottomrule + \end{tabularx} + \caption{A weather forecast} + \label{tab:weather} +\end{table} + +The logo of the Masaryk University is shown in Figure +\ref{fig:mulogo1} and Figure \ref{fig:mulogo2} at pages +\pageref{fig:mulogo1} and \pageref{fig:mulogo2}. The weather +forecast is shown in Table \ref{tab:weather} at page +\pageref{tab:weather}. The following chapter is Chapter +\ref{chap:matheq} and starts at page \pageref{chap:matheq}. +Items \ref{item:star1}, \ref{item:star2}, and +\ref{item:star3} are starred in the following list: +\begin{compactenum} + \item some text + \item some other text + \item $\star$ \label{item:star1} + \begin{compactenum} + \item some text + \item $\star$ \label{item:star2} + \item some other text + \begin{compactenum} + \item some text + \item some other text + \item yet another piece of text + \item $\star$ \label{item:star3} + \end{compactenum} + \item yet another piece of text + \end{compactenum} + \item yet another piece of text +\end{compactenum} +If your reference points to a place that has not yet been typeset, +the \verb"\ref" command will expand to \textbf{??} during the first +run of +\texttt{pdflatex \jobname.tex} +and a second run is going to be needed for the references to +resolve. With online services -- such as Overleaf -- this is +performed automatically. + +\chapter{Mathematical equations} +\label{chap:matheq} +\TeX{} comes pre-packed with the ability to typeset inline +equations, such as $\mathrm{e}^{ix}=\cos x+i\sin x$, and display +equations, such as \[ + \mathbf{A}^{-1} = \begin{bmatrix} + a & b \\ c & d \\ + \end{bmatrix}^{-1} = + \frac{1}{\det(\mathbf{A})} \begin{bmatrix} + \,\,\,d & \!\!-b \\ -c & \,a \\ + \end{bmatrix} = + \frac{1}{ad - bc} \begin{bmatrix} + \,\,\,d & \!\!-b \\ -c & \,a \\ + \end{bmatrix}. +\] \LaTeX{} defines the automatically numbered \texttt{equation} +environment: +\begin{equation} + \gamma Px = PAx = PAP^{-1}Px. +\end{equation} +The package \textsf{amsmath} provides several additional +environments that can be used to typeset complex equations: +\begin{enumerate} + \item An equation can be spread over multiple lines using the + \texttt{multline} environment: + \begin{multline} + a + b + c + d + e + f + b + c + d + e + f + b + c + d + e + +f \\ + + f + g + h + i + j + k + l + m + n + o + p + q + \end{multline} + + \item Several aligned equations can be typeset using the + \texttt{align} environment: + \begin{align} + a + b &= c + d \\ + u &= v + w + x \\[1ex] + i + j + k + l &= m + \end{align} + + \item The \texttt{alignat} environment is similar to + \texttt{align}, but it doesn't insert horizontal spaces between + the individual columns: + \begin{alignat}{2} + a + b + c &+ d & &= 0 \\ + e &+ f + g & &= 5 + \end{alignat} + + \item Much like chapter, sections, tables, figures, or list + items, equations -- such as \eqref{eq:first} and + \eqref{eq:mine} -- can also be labeled and referenced: + \begin{alignat}{4} + b_{11}x_1 &+ b_{12}x_2 & &+ b_{13}x_3 & & & + &= y_1, \label{eq:first} \\ + b_{21}x_1 &+ b_{22}x_2 & & & &+ b_{24}x_4 & + &= y_2. \tag{My equation} \label{eq:mine} + \end{alignat} + + \item The \texttt{gather} environment makes it possible to + typeset several equations without any alignment: + \begin{gather} + \psi = \psi\psi, \\ + \eta = \eta\eta\eta\eta\eta\eta, \\ + \theta = \theta. + \end{gather} + + \item Several cases can be typeset using the \texttt{cases} + environment: + \begin{equation} + |y| = \begin{cases} + \phantom-y & \text{if }z\geq0, \\ + -y & \text{otherwise}. + \end{cases} + \end{equation} +\end{enumerate} +For the complete list of environments and commands, consult the +\textsf{amsmath} package manual\footnote{ + See \url{http://mirrors.ctan.org/macros/latex/required/amslatex/math/amsldoc.pdf}. + The \texttt{\textbackslash url} command is provided by the + package \textsf{url}. +}. + +\chapter{\textnormal{We \textsf{have} \texttt{several} \textsc{fonts} + \textit{at} \textbf{disposal}}} +The serified roman font is used for the main body of the text. +\textit{Italics are typically used to denote emphasis or +quotations.} \texttt{The teletype font is typically used for source +code listings.} The \textbf{bold}, \textsc{small-caps} and +\textsf{sans-serif} variants of the base roman font can be used to +denote specific types of information. + +\tiny We \scriptsize can \footnotesize also \small change \normalsize +the \large font \Large size, \LARGE although \huge it \Huge +is \huge usually \LARGE not \Large necessary.\normalsize + +A wide variety of mathematical fonts is also available, such as: \[ + \mathrm{ABC}, \mathcal{ABC}, \mathbf{ABC}, \mathsf{ABC}, + \mathit{ABC}, \mathtt{ABC} +\] By loading the \textsf{amsfonts} packages, several additional +fonts will become available: \[ + \mathfrak{ABC}, \mathbb{ABC} +\] Many other mathematical fonts are available\footnote{ + See \url{http://tex.stackexchange.com/a/58124/70941}. +}. + +\chapter{Using lightweight markup} +\shorthandoff{-} +\begin{markdown*}{% + hybrid, + definitionLists, + footnotes, + inlineFootnotes, + hashEnumerators, + fencedCode, + citations, + citationNbsps, +} + +If you decide that \LaTeX{} is too wordy for some parts of your +document, there are [packages](https://www.ctan.org/pkg/markdown +"Markdown") that allow you to use more lightweight markup next +to it. + + ![logo](fithesis/logo/mu/fithesis-base.pdf "The logo of the + Masaryk University") + +This is a bullet list. Unlike numbered lists, bulleted lists +contain an **unordered** set of bullet points. When a bullet point +contains multiple paragraphs, the list is typeset as follows: + + * The first item of a bullet list + + that spans several paragraphs, + * the second item of a bullet list, + * the third item of a bullet list. + +When none of the bullet points contains multiple paragraphs, the +list has a more compact form: + + * The first item of a bullet list, + * the second item of a bullet list, + * the third item of a bullet list. + +Unlike a bulleted list, a numbered list implies chronology or +ordering of the bullet points. When a bullet point +contains multiple paragraphs, the list is typeset as follows: + + 1. The first item of an ordered list + + that spans several paragraphs, + 2. the second item of an ordered list, + 3. the third item of an ordered list. + #. If you are feeling lazy, + #. you can use hash enumerators as well. + +When none of the bullet points contains multiple paragraphs, the +list has a more compact form: + + 6. The first item of an ordered list, + 7. the second item of an ordered list, + 8. the third item of an ordered list. + +Definition lists are used to provide definitions of terms. When +a definition contains multiple paragraphs, the list is typeset +as follows: + +Term 1 + +: Definition 1 + +*Term 2* + +: Definition 2 + + Some code, part of Definition 2 + + Third paragraph of Definition 2. + +When none of the bullet points contains multiple paragraphs, the +list has a more compact form: + +Term 1 +: Definition 1 +*Term 2* +: Definition 2 + +Block quotations are used to include an excerpt from an external +document in way that visually clearly separates the excerpt from +the rest of the work: + +> This is the first level of quoting. +> +> > This is nested blockquote. +> +> Back to the first level. + +Footnotes are used to include additional information to the +document that are not necessary for the understanding of the main +text. Here is a footnote reference^[Here is the footnote.] and +another.[^longnote] + +[^longnote]: Here's one with multiple blocks. + + Subsequent paragraphs are indented to show that they +belong to the previous footnote. + + Some code + + The whole paragraph can be indented, or just the first + line. In this way, multi-paragraph footnotes work like + multi-paragraph list items. + +Citations are used to provide bibliographical references to other +documents. This is a regular citation~[@borgman03, p. 123]. This is +an in-text citation: @borgman03\. You can also cite several authors +at once using both regular~[see @borgman03, p. 123; @greenberg98, +sec. 3.2; and @thanh01] and in-text citations: @borgman03 [p.123; +@greenberg98, sec. 3.2; @thanh01]. + +Code blocks are used to include source code listings into the +document: + + #include + #include + #include + #include + // This is a comment + int main(int argc, char **argv) + { + while (--c > 1 && !fork()); + sleep(c = atoi(v[c])); + printf("%d\n", c); + wait(0); + return 0; + } + +There is an alternative syntax for code blocks that allows you to +specify additional information, such as the language of the source +code. This information can be used for syntax highlighting: + +``` sh +#!/bin/sh +fac() { + if [ "$1" -leq 1 ]; then + echo 1 + else + echo $(("$1" * fac $(("$1" - 1)))) + fi +} +`````````````` + +~~~~~~ Ruby +# Here's a way to empty an array. +joe = [ 'eggs.', 'some', 'break', 'to', 'Have' ] +print(joe.pop, " ") while joe.size > 0 +print "\n" +~~~~~~ + +\end{markdown*} +\shorthandon{-} + +\chapter{Inserting the bibliography} +After linking a bibliography data\-base files to the document using +the \verb"\"\texttt{thesis\discretionary{-}{}{}setup\{bib\discretionary{=}{=}{=}% +\{\textit{file1},\textit{file2},\,\ldots\,\}\}} command, you can +start citing the entries. This is just dummy text +\parencite{borgman03} lightly sprinkled with citations +\parencite[p.~123]{greenberg98}. Several sources can be cited at +once: \cite{borgman03,greenberg98,thanh01}. +\citetitle{greenberg98} was written by \citeauthor{greenberg98} in +\citeyear{greenberg98}. We can also produce \textcite{greenberg98}% +. The full bibliographic citation is: +\emph{\fullcite{greenberg98}}. We can easily insert a bibliographic +citation into the footnote\footfullcite{greenberg98}. + +The \verb"\nocite" command will not generate any +output\nocite{muni}, but it will insert its arguments into +the bibliography. The \verb"\nocite{*}" command will insert all the +records in the bibliography database file into the bibliography. +Try uncommenting the command +%% \nocite{*} +and watch the bibliography section come apart at the seams. + +When typesetting the document for the first time, citing a +\texttt{work} will expand to [\textbf{work}] and the +\verb"\printbibliography" command will produce no output. It is now +necessary to generate the bibliography by running \texttt{biber +\jobname.bcf} from the command line and then by typesetting the +document again twice. During the first run, the bibliography +section and the citations will be typeset, and in the second run, +the bibliography section will appear in the table of contents. + +The \texttt{biber} command needs to be executed from within the +directory, where the \LaTeX\ source file is located. In Windows, +the command line can be opened in a directory by holding down the +\textsf{Shift} key and by clicking the right mouse button while +hovering the cursor over a directory. Select the \textsf{Open +Command Window Here} option in the context menu that opens shortly +afterwards. + +With online services -- such as Overleaf -- or when using an +automatic tool -- such as \LaTeX MK -- all commands are executed +automatically. When you omit the \verb"\printbibliography" command, +its location will be decided by the template. + + \printbibliography[heading=bibintoc] %% Print the bibliography. + +\chapter{Inserting the index} +After using the \verb"\makeindex" macro and loading the +\texttt{makeidx} package that provides additional indexing +commands, index entries can be created by issuing the \verb"\index" +command. \index{dummy text|(}It is possible to create ranged index +entries, which will encompass a span of text.\index{dummy text|)} +To insert complex typographic material -- such as $\alpha$ +\index{alpha@$\alpha$} or \TeX{} \index{TeX@\TeX} -- +into the index, you need to specify a text string, which will +determine how the entry will be sorted. It is also possible to +create hierarchal entries. \index{vehicles!trucks} +\index{vehicles!speed cars} + +After typesetting the document, it is necessary to generate the +index by running +\begin{center}% + \texttt{texindy -I latex -C utf8 -L }$\langle$\textit{locale}% + $\rangle$\texttt{ \jobname.idx} +\end{center} +from the command line, where $\langle$\textit{locale}$\rangle$ +corresponds to the main locale of your thesis -- such as +\texttt{english}, and then typesetting the document again. + +The \texttt{texindy} command needs to be executed from within the +directory, where the \LaTeX\ source file is located. In Windows, +the command line can be opened in a directory by holding down the +\textsf{Shift} key and by clicking the right mouse button while +hovering the cursor over a directory. Select the \textsf{Open Command +Window Here} option in the context menu that opens shortly +afterwards. + +With online services -- such as Overleaf -- the commands are +executed automatically, although the locale may be erroneously +detected, or the \texttt{makeindex} tool (which is only able to +sort entries that contain digits and letters of the English +alphabet) may be used instead of \texttt{texindy}. In either case, +the index will be ill-sorted. + + \makeatletter\thesis@blocks@clear\makeatother + \phantomsection %% Print the index and insert it into the + \addcontentsline{toc}{chapter}{\indexname} %% table of contents. + \printindex + +\appendix %% Start the appendices. +\chapter{An appendix} +Here you can insert the appendices of your thesis. + +\end{document} diff --git a/macros/latex/contrib/fithesis/example/mu/law-lualatex.pdf b/macros/latex/contrib/fithesis/example/mu/law-lualatex.pdf new file mode 100644 index 0000000000..6193dc362e Binary files /dev/null and b/macros/latex/contrib/fithesis/example/mu/law-lualatex.pdf differ diff --git a/macros/latex/contrib/fithesis/example/mu/law-lualatex.tex b/macros/latex/contrib/fithesis/example/mu/law-lualatex.tex new file mode 100644 index 0000000000..6e0080e11c --- /dev/null +++ b/macros/latex/contrib/fithesis/example/mu/law-lualatex.tex @@ -0,0 +1,659 @@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% I, the copyright holder of this work, release this work into the +%% public domain. This applies worldwide. In some countries this may +%% not be legally possible; if so: I grant anyone the right to use +%% this work for any purpose, without any conditions, unless such +%% conditions are required by law. +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\documentclass[ + digital, %% This option enables the default options for the + %% digital version of a document. Replace with `printed` + %% to enable the default options for the printed version + %% of a document. + twoside, %% This option enables double-sided typesetting. Use at + %% least 120 g/m² paper to prevent show-through. Replace + %% with `oneside` to use one-sided typesetting; use only + %% if you don’t have access to a double-sided printer, + %% or if one-sided typesetting is a formal requirement + %% at your faculty. + table, %% This option causes the coloring of tables. Replace + %% with `notable` to restore plain LaTeX tables. + lof, %% This option prints the List of Figures. Replace with + %% `nolof` to hide the List of Figures. + lot, %% This option prints the List of Tables. Replace with + %% `nolot` to hide the List of Tables. + %% More options are listed in the user guide at + %% . +]{fithesis3} +%% The following section sets up the locales used in the thesis. +\usepackage{polyglossia} %% By using `czech` or `slovak` as the +\setmainlanguage{english} %% main locale instead of `english`, you +%% can typeset the thesis in either Czech or Slovak, respectively. +\setotherlanguages{german, russian, czech, slovak} %% The +%% +%% \begin{otherlanguage}{german} ... \end{otherlanguage} +%% \begin{otherlanguage}{russian} ... \end{otherlanguage} +%% \begin{otherlanguage}{czech} ... \end{otherlanguage} +%% \begin{otherlanguage}{slovak} ... \end{otherlanguage} +%% +%% For non-Latin scripts, it may be necessary to load additional +%% fonts: +\newfontfamily\russianfont[Script=Cyrillic,Ligatures=TeX]{PT Serif} +%% +%% The following section sets up the metadata of the thesis. +\thesissetup{ + date = \the\year/\the\month/\the\day, + university = mu, + faculty = law, + department = The Department of Commercial Law, + type = bc, + author = Jane Doe, + gender = f, + advisor = John Smith, + title = The Legal Aspects of the LaTeX Project + Public License, + TeXtitle = The Legal Aspects of the \LaTeX\ Project + Public License, + keywords = {keyword1, keyword2, ...}, + TeXkeywords = {keyword1, keyword2, \ldots}, + abstract = {This is the abstract of my thesis, which can + + span multiple paragraphs.}, + thanks = {These are the acknowledgements for my thesis, which can + + span multiple paragraphs.}, + bib = example.bib, + %% The following keys are only useful, when you're using a + %% locale other than English. You can safely omit them in an + %% English thesis. + keywordsEn = {keyword1, keyword2, ...}, + TeXkeywordsEn = {keyword1, keyword2, \ldots}, + abstractEn = {This is the English abstract of my thesis, which can + + span multiple paragraphs.}, +} +\usepackage{makeidx} %% The `makeidx` package contains +\makeindex %% helper commands for index typesetting. +%% These additional packages are used within the document: +\usepackage{paralist} %% Compact list environments +\usepackage{amsmath} %% Mathematics +\usepackage{amsthm} +\usepackage{amsfonts} +\usepackage{url} %% Hyperlinks +\usepackage{markdown} %% Lightweight markup +\usepackage{listings} %% Source code highlighting +\lstset{ + basicstyle = \ttfamily,% + identifierstyle = \color{black},% + keywordstyle = \color{blue},% + keywordstyle = {[2]\color{cyan}},% + keywordstyle = {[3]\color{olive}},% + stringstyle = \color{teal},% + commentstyle = \itshape\color{magenta}} +\usepackage{floatrow} %% Putting captions above tables +\floatsetup[table]{capposition=top} +\begin{document} +\chapter*{Introduction} +\addcontentsline{toc}{chapter}{Introduction} + +Theses are rumoured to be the capstones of education, so I decided +to write one of my own. If all goes well, I will soon have a +diploma under my belt. Wish me luck! + +\begin{otherlanguage}{czech} +Říká se, že závěrečné práce jsou vyvrcholením studia a tak jsem se +rozhodl jednu také napsat. Pokud vše půjde podle plánu, odnesu si +na konci semestru diplom. Držte mi palce! +\end{otherlanguage} + +\begin{otherlanguage}{slovak} +Hovorí sa, že záverečné práce sú vyvrcholením štúdia a tak som sa +rozhodol jednu tiež napísať. Ak všetko pôjde podľa plánu, odnesiem +si na konci semestra diplom. Držte mi palce! +\end{otherlanguage} + +\begin{otherlanguage}{german} +Man munkelt, dass die Dissertation die Krönung der Ausbildung ist. +Deshalb habe ich mich beschlossen meine eigene zu schreiben. Wenn +alles gut geht, bekomme ich bald ein Diplom. Wünsch mir Glück! +\end{otherlanguage} + +\begin{otherlanguage}{russian} +Говорят, что тезис -- это кульминация обучения. Поэтому я и решил +написать собственный тезис. Если всё сработает по плану, я скоро +получу диплом. Желайте мне удачи! +\end{otherlanguage} + +\chapter{These are} +\section{the available} +\subsection{sectioning} +\subsubsection{commands.} +\paragraph{Paragraphs and} +\subparagraph{subparagraphs are available as well.} +Inside the text, you can also use unnumbered lists, +\begin{itemize} + \item such as + \item this one + \begin{itemize} + \item and they can be nested as well. + \item[>>] You can even turn the bullets into something fancier, + \item[\S] if you so desire. + \end{itemize} +\end{itemize} +Numbered lists are +\begin{enumerate} + \item very + \begin{enumerate} + \item similar + \end{enumerate} +\end{enumerate} +and so are description lists: +\begin{description} + \item[Description list] + A list of terms with a description of each term +\end{description} +The spacing of these lists is geared towards paragraphs of text. +For lists of words and phrases, the \textsf{paralist} package +offers commands +\begin{compactitem} + \item that + \begin{compactitem} + \item are + \begin{compactitem} + \item better + \begin{compactitem} + \item suited + \end{compactitem} + \end{compactitem} + \end{compactitem} +\end{compactitem} +\begin{compactenum} + \item to + \begin{compactenum} + \item this + \begin{compactenum} + \item kind of + \begin{compactenum} + \item content. + \end{compactenum} + \end{compactenum} + \end{compactenum} +\end{compactenum} +The \textsf{amsthm} package provides the commands necessary for the +typesetting of mathematical definitions, theorems, lemmas and +proofs. + +%% We will define several mathematical sectioning commands. +\newtheorem{theorem}{Theorem}[section] %% The numbering of theorems + %% will be reset after each section. +\newtheorem{lemma}[theorem]{Lemma} %% The numbering of lemmas +\newtheorem{corollary}[theorem]{Corollary} %% and corollaries will + %% share the counter with theorems. +\theoremstyle{definition} +\newtheorem{definition}{Definition} +\theoremstyle{remark} +\newtheorem*{remark}{Remark} + +\begin{theorem} + This is a theorem that offers a profound insight into the + mathematical sectioning commands. +\end{theorem} +\begin{theorem}[Another theorem] + This is another theorem. Unlike the first one, this theorem has + been endowed with a name. +\end{theorem} +\begin{lemma} + Let us suppose that $x^2+y^2=z^2$. Then + \begin{equation} + \biggl\langle u\biggm|\sum_{i=1}^nF(e_i,v)e_i\biggr\rangle + =F\biggl(\sum_{i=1}^n\langle e_i|u\rangle e_i,v\biggr). + \end{equation} +\end{lemma} +\begin{proof} + $\nabla^2 f(x,y)=\frac{\partial^2f}{\partial x^2}+ + \frac{\partial^2f}{\partial y^2}$. +\end{proof} +\begin{corollary} + This is a corollary. +\end{corollary} +\begin{remark} + This is a remark. +\end{remark} + +\chapter{Floats and references} +\begin{figure} + \begin{center} + %% PNG and JPG images can be inserted into the document as well, + %% but their resolution needs to be adequate. The minimum is + %% about 100 pixels per 1 centimeter or 300 pixels per 1 inch. + %% That means that a JPG or PNG image typeset at 4 × 4 cm should + %% be 400 × 400 px large at the bare minimum. + %% + %% The optimum is about 250 pixels per 1 centimeter or 600 + %% pixels per 1 inch. That means that a JPG or PNG image typeset + %% at 4 × 4 cm should be 1000 × 1000 px large or larger. + \includegraphics[width=4cm]{fithesis/logo/mu/fithesis-base.pdf} + \end{center} + \caption{The logo of the Masaryk University at 40\,mm} + \label{fig:mulogo1} +\end{figure} + +\begin{figure} + \begin{center} + \begin{minipage}{.66\textwidth} + \includegraphics[width=\textwidth]{fithesis/logo/mu/fithesis-base.pdf} + \end{minipage} + \begin{minipage}{.33\textwidth} + \includegraphics[width=\textwidth]{fithesis/logo/mu/fithesis-base.pdf} \\ + \includegraphics[width=\textwidth]{fithesis/logo/mu/fithesis-base.pdf} + \end{minipage} + \end{center} + \caption{The logo of the Masaryk University at $\frac23$ and + $\frac13$ of text width} + \label{fig:mulogo2} +\end{figure} + +\begin{table} + \begin{tabularx}{\textwidth}{lllX} + \toprule + Day & Min Temp & Max Temp & Summary \\ + \midrule + Monday & $13^{\circ}\mathrm{C}$ & $21^\circ\mathrm{C}$ & A + clear day with low wind and no adverse current advisories. \\ + Tuesday & $11^{\circ}\mathrm{C}$ & $17^\circ\mathrm{C}$ & A + trough of low pressure will come from the northwest. \\ + Wednesday & $10^{\circ}\mathrm{C}$ & + $21^\circ\mathrm{C}$ & Rain will spread to all parts during the + morning. \\ + \bottomrule + \end{tabularx} + \caption{A weather forecast} + \label{tab:weather} +\end{table} + +The logo of the Masaryk University is shown in Figure +\ref{fig:mulogo1} and Figure \ref{fig:mulogo2} at pages +\pageref{fig:mulogo1} and \pageref{fig:mulogo2}. The weather +forecast is shown in Table \ref{tab:weather} at page +\pageref{tab:weather}. The following chapter is Chapter +\ref{chap:matheq} and starts at page \pageref{chap:matheq}. +Items \ref{item:star1}, \ref{item:star2}, and +\ref{item:star3} are starred in the following list: +\begin{compactenum} + \item some text + \item some other text + \item $\star$ \label{item:star1} + \begin{compactenum} + \item some text + \item $\star$ \label{item:star2} + \item some other text + \begin{compactenum} + \item some text + \item some other text + \item yet another piece of text + \item $\star$ \label{item:star3} + \end{compactenum} + \item yet another piece of text + \end{compactenum} + \item yet another piece of text +\end{compactenum} +If your reference points to a place that has not yet been typeset, +the \verb"\ref" command will expand to \textbf{??} during the first +run of +\texttt{lualatex \jobname.tex} +and a second run is going to be needed for the references to +resolve. With online services -- such as Overleaf -- this is +performed automatically. + +\chapter{Mathematical equations} +\label{chap:matheq} +\TeX{} comes pre-packed with the ability to typeset inline +equations, such as $\mathrm{e}^{ix}=\cos x+i\sin x$, and display +equations, such as \[ + \mathbf{A}^{-1} = \begin{bmatrix} + a & b \\ c & d \\ + \end{bmatrix}^{-1} = + \frac{1}{\det(\mathbf{A})} \begin{bmatrix} + \,\,\,d & \!\!-b \\ -c & \,a \\ + \end{bmatrix} = + \frac{1}{ad - bc} \begin{bmatrix} + \,\,\,d & \!\!-b \\ -c & \,a \\ + \end{bmatrix}. +\] \LaTeX{} defines the automatically numbered \texttt{equation} +environment: +\begin{equation} + \gamma Px = PAx = PAP^{-1}Px. +\end{equation} +The package \textsf{amsmath} provides several additional +environments that can be used to typeset complex equations: +\begin{enumerate} + \item An equation can be spread over multiple lines using the + \texttt{multline} environment: + \begin{multline} + a + b + c + d + e + f + b + c + d + e + f + b + c + d + e + +f \\ + + f + g + h + i + j + k + l + m + n + o + p + q + \end{multline} + + \item Several aligned equations can be typeset using the + \texttt{align} environment: + \begin{align} + a + b &= c + d \\ + u &= v + w + x \\[1ex] + i + j + k + l &= m + \end{align} + + \item The \texttt{alignat} environment is similar to + \texttt{align}, but it doesn't insert horizontal spaces between + the individual columns: + \begin{alignat}{2} + a + b + c &+ d & &= 0 \\ + e &+ f + g & &= 5 + \end{alignat} + + \item Much like chapter, sections, tables, figures, or list + items, equations -- such as \eqref{eq:first} and + \eqref{eq:mine} -- can also be labeled and referenced: + \begin{alignat}{4} + b_{11}x_1 &+ b_{12}x_2 & &+ b_{13}x_3 & & & + &= y_1, \label{eq:first} \\ + b_{21}x_1 &+ b_{22}x_2 & & & &+ b_{24}x_4 & + &= y_2. \tag{My equation} \label{eq:mine} + \end{alignat} + + \item The \texttt{gather} environment makes it possible to + typeset several equations without any alignment: + \begin{gather} + \psi = \psi\psi, \\ + \eta = \eta\eta\eta\eta\eta\eta, \\ + \theta = \theta. + \end{gather} + + \item Several cases can be typeset using the \texttt{cases} + environment: + \begin{equation} + |y| = \begin{cases} + \phantom-y & \text{if }z\geq0, \\ + -y & \text{otherwise}. + \end{cases} + \end{equation} +\end{enumerate} +For the complete list of environments and commands, consult the +\textsf{amsmath} package manual\footnote{ + See \url{http://mirrors.ctan.org/macros/latex/required/amslatex/math/amsldoc.pdf}. + The \texttt{\textbackslash url} command is provided by the + package \textsf{url}. +}. + +\chapter{\textnormal{We \textsf{have} \texttt{several} \textsc{fonts} + \textit{at} \textbf{disposal}}} +The serified roman font is used for the main body of the text. +\textit{Italics are typically used to denote emphasis or +quotations.} \texttt{The teletype font is typically used for source +code listings.} The \textbf{bold}, \textsc{small-caps} and +\textsf{sans-serif} variants of the base roman font can be used to +denote specific types of information. + +\tiny We \scriptsize can \footnotesize also \small change \normalsize +the \large font \Large size, \LARGE although \huge it \Huge +is \huge usually \LARGE not \Large necessary.\normalsize + +A wide variety of mathematical fonts is also available, such as: \[ + \mathrm{ABC}, \mathcal{ABC}, \mathbf{ABC}, \mathsf{ABC}, + \mathit{ABC}, \mathtt{ABC} +\] By loading the \textsf{amsfonts} packages, several additional +fonts will become available: \[ + \mathfrak{ABC}, \mathbb{ABC} +\] Many other mathematical fonts are available\footnote{ + See \url{http://tex.stackexchange.com/a/58124/70941}. +}. + +\chapter{Using lightweight markup} +\begin{markdown*}{% + hybrid, + definitionLists, + footnotes, + inlineFootnotes, + hashEnumerators, + fencedCode, + citations, + citationNbsps, +} + +If you decide that \LaTeX{} is too wordy for some parts of your +document, there are [packages](https://www.ctan.org/pkg/markdown +"Markdown") that allow you to use more lightweight markup next +to it. + + ![logo](fithesis/logo/mu/fithesis-base.pdf "The logo of the + Masaryk University") + +This is a bullet list. Unlike numbered lists, bulleted lists +contain an **unordered** set of bullet points. When a bullet point +contains multiple paragraphs, the list is typeset as follows: + + * The first item of a bullet list + + that spans several paragraphs, + * the second item of a bullet list, + * the third item of a bullet list. + +When none of the bullet points contains multiple paragraphs, the +list has a more compact form: + + * The first item of a bullet list, + * the second item of a bullet list, + * the third item of a bullet list. + +Unlike a bulleted list, a numbered list implies chronology or +ordering of the bullet points. When a bullet point +contains multiple paragraphs, the list is typeset as follows: + + 1. The first item of an ordered list + + that spans several paragraphs, + 2. the second item of an ordered list, + 3. the third item of an ordered list. + #. If you are feeling lazy, + #. you can use hash enumerators as well. + +When none of the bullet points contains multiple paragraphs, the +list has a more compact form: + + 6. The first item of an ordered list, + 7. the second item of an ordered list, + 8. the third item of an ordered list. + +Definition lists are used to provide definitions of terms. When +a definition contains multiple paragraphs, the list is typeset +as follows: + +Term 1 + +: Definition 1 + +*Term 2* + +: Definition 2 + + Some code, part of Definition 2 + + Third paragraph of Definition 2. + +When none of the bullet points contains multiple paragraphs, the +list has a more compact form: + +Term 1 +: Definition 1 +*Term 2* +: Definition 2 + +Block quotations are used to include an excerpt from an external +document in way that visually clearly separates the excerpt from +the rest of the work: + +> This is the first level of quoting. +> +> > This is nested blockquote. +> +> Back to the first level. + +Footnotes are used to include additional information to the +document that are not necessary for the understanding of the main +text. Here is a footnote reference^[Here is the footnote.] and +another.[^longnote] + +[^longnote]: Here's one with multiple blocks. + + Subsequent paragraphs are indented to show that they +belong to the previous footnote. + + Some code + + The whole paragraph can be indented, or just the first + line. In this way, multi-paragraph footnotes work like + multi-paragraph list items. + +Citations are used to provide bibliographical references to other +documents. This is a regular citation~[@borgman03, p. 123]. This is +an in-text citation: @borgman03\. You can also cite several authors +at once using both regular~[see @borgman03, p. 123; @greenberg98, +sec. 3.2; and @thanh01] and in-text citations: @borgman03 [p.123; +@greenberg98, sec. 3.2; @thanh01]. + +Code blocks are used to include source code listings into the +document: + + #include + #include + #include + #include + // This is a comment + int main(int argc, char **argv) + { + while (--c > 1 && !fork()); + sleep(c = atoi(v[c])); + printf("%d\n", c); + wait(0); + return 0; + } + +There is an alternative syntax for code blocks that allows you to +specify additional information, such as the language of the source +code. This information can be used for syntax highlighting: + +``` sh +#!/bin/sh +fac() { + if [ "$1" -leq 1 ]; then + echo 1 + else + echo $(("$1" * fac $(("$1" - 1)))) + fi +} +`````````````` + +~~~~~~ Ruby +# Here's a way to empty an array. +joe = [ 'eggs.', 'some', 'break', 'to', 'Have' ] +print(joe.pop, " ") while joe.size > 0 +print "\n" +~~~~~~ + +\end{markdown*} + +\chapter{Inserting the bibliography} +After linking a bibliography data\-base files to the document using +the \verb"\"\texttt{thesis\discretionary{-}{}{}setup\{bib\discretionary{=}{=}{=}% +\{\textit{file1},\textit{file2},\,\ldots\,\}\}} command, you can +start citing the entries. This is just dummy text +\parencite{borgman03} lightly sprinkled with citations +\parencite[p.~123]{greenberg98}. Several sources can be cited at +once: \cite{borgman03,greenberg98,thanh01}. +\citetitle{greenberg98} was written by \citeauthor{greenberg98} in +\citeyear{greenberg98}. We can also produce \textcite{greenberg98}% +. The full bibliographic citation is: +\emph{\fullcite{greenberg98}}. We can easily insert a bibliographic +citation into the footnote\footfullcite{greenberg98}. + +The \verb"\nocite" command will not generate any +output\nocite{muni}, but it will insert its arguments into +the bibliography. The \verb"\nocite{*}" command will insert all the +records in the bibliography database file into the bibliography. +Try uncommenting the command +%% \nocite{*} +and watch the bibliography section come apart at the seams. + +When typesetting the document for the first time, citing a +\texttt{work} will expand to [\textbf{work}] and the +\verb"\printbibliography" command will produce no output. It is now +necessary to generate the bibliography by running \texttt{biber +\jobname.bcf} from the command line and then by typesetting the +document again twice. During the first run, the bibliography +section and the citations will be typeset, and in the second run, +the bibliography section will appear in the table of contents. + +The \texttt{biber} command needs to be executed from within the +directory, where the \LaTeX\ source file is located. In Windows, +the command line can be opened in a directory by holding down the +\textsf{Shift} key and by clicking the right mouse button while +hovering the cursor over a directory. Select the \textsf{Open +Command Window Here} option in the context menu that opens shortly +afterwards. + +With online services -- such as Overleaf -- or when using an +automatic tool -- such as \LaTeX MK -- all commands are executed +automatically. When you omit the \verb"\printbibliography" command, +its location will be decided by the template. + + \printbibliography[heading=bibintoc] %% Print the bibliography. + +\chapter{Inserting the index} +After using the \verb"\makeindex" macro and loading the +\texttt{makeidx} package that provides additional indexing +commands, index entries can be created by issuing the \verb"\index" +command. \index{dummy text|(}It is possible to create ranged index +entries, which will encompass a span of text.\index{dummy text|)} +To insert complex typographic material -- such as $\alpha$ +\index{alpha@$\alpha$} or \TeX{} \index{TeX@\TeX} -- +into the index, you need to specify a text string, which will +determine how the entry will be sorted. It is also possible to +create hierarchal entries. \index{vehicles!trucks} +\index{vehicles!speed cars} + +After typesetting the document, it is necessary to generate the +index by running +\begin{center}% + \texttt{texindy -I latex -C utf8 -L }$\langle$\textit{locale}% + $\rangle$\texttt{ \jobname.idx} +\end{center} +from the command line, where $\langle$\textit{locale}$\rangle$ +corresponds to the main locale of your thesis -- such as +\texttt{english}, and then typesetting the document again. + +The \texttt{texindy} command needs to be executed from within the +directory, where the \LaTeX\ source file is located. In Windows, +the command line can be opened in a directory by holding down the +\textsf{Shift} key and by clicking the right mouse button while +hovering the cursor over a directory. Select the \textsf{Open Command +Window Here} option in the context menu that opens shortly +afterwards. + +With online services -- such as Overleaf -- the commands are +executed automatically, although the locale may be erroneously +detected, or the \texttt{makeindex} tool (which is only able to +sort entries that contain digits and letters of the English +alphabet) may be used instead of \texttt{texindy}. In either case, +the index will be ill-sorted. + + \makeatletter\thesis@blocks@clear\makeatother + \phantomsection %% Print the index and insert it into the + \addcontentsline{toc}{chapter}{\indexname} %% table of contents. + \printindex + +\appendix %% Start the appendices. +\chapter{An appendix} +Here you can insert the appendices of your thesis. + +\end{document} diff --git a/macros/latex/contrib/fithesis/example/mu/law-pdflatex.pdf b/macros/latex/contrib/fithesis/example/mu/law-pdflatex.pdf new file mode 100644 index 0000000000..18cd07d2a9 Binary files /dev/null and b/macros/latex/contrib/fithesis/example/mu/law-pdflatex.pdf differ diff --git a/macros/latex/contrib/fithesis/example/mu/law-pdflatex.tex b/macros/latex/contrib/fithesis/example/mu/law-pdflatex.tex new file mode 100644 index 0000000000..6c4ea5931d --- /dev/null +++ b/macros/latex/contrib/fithesis/example/mu/law-pdflatex.tex @@ -0,0 +1,666 @@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% I, the copyright holder of this work, release this work into the +%% public domain. This applies worldwide. In some countries this may +%% not be legally possible; if so: I grant anyone the right to use +%% this work for any purpose, without any conditions, unless such +%% conditions are required by law. +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\documentclass[ + digital, %% This option enables the default options for the + %% digital version of a document. Replace with `printed` + %% to enable the default options for the printed version + %% of a document. + twoside, %% This option enables double-sided typesetting. Use at + %% least 120 g/m² paper to prevent show-through. Replace + %% with `oneside` to use one-sided typesetting; use only + %% if you don’t have access to a double-sided printer, + %% or if one-sided typesetting is a formal requirement + %% at your faculty. + table, %% This option causes the coloring of tables. Replace + %% with `notable` to restore plain LaTeX tables. + lof, %% This option prints the List of Figures. Replace with + %% `nolof` to hide the List of Figures. + lot, %% This option prints the List of Tables. Replace with + %% `nolot` to hide the List of Tables. + %% More options are listed in the user guide at + %% . +]{fithesis3} +%% The following section sets up the locales used in the thesis. +\usepackage[resetfonts]{cmap} %% We need to load the T2A font encoding +\usepackage[T1,T2A]{fontenc} %% to use the Cyrillic fonts with Russian texts. +\usepackage[ + main=english, %% By using `czech` or `slovak` as the main locale + %% instead of `english`, you can typeset the thesis + %% in either Czech or Slovak, respectively. + english, german, russian, czech, slovak %% The additional keys allow +]{babel} %% foreign texts to be typeset as follows: +%% +%% \begin{otherlanguage}{german} ... \end{otherlanguage} +%% \begin{otherlanguage}{russian} ... \end{otherlanguage} +%% \begin{otherlanguage}{czech} ... \end{otherlanguage} +%% \begin{otherlanguage}{slovak} ... \end{otherlanguage} +%% +%% For non-Latin scripts, it may be necessary to load additional +%% fonts: +\usepackage{paratype} +\def\textrussian#1{{\usefont{T2A}{PTSerif-TLF}{m}{rm}#1}} +%% +%% The following section sets up the metadata of the thesis. +\thesissetup{ + date = \the\year/\the\month/\the\day, + university = mu, + faculty = law, + department = The Department of Commercial Law, + type = bc, + author = Jane Doe, + gender = f, + advisor = John Smith, + title = The Legal Aspects of the LaTeX Project + Public License, + TeXtitle = The Legal Aspects of the \LaTeX\ Project + Public License, + keywords = {keyword1, keyword2, ...}, + TeXkeywords = {keyword1, keyword2, \ldots}, + abstract = {This is the abstract of my thesis, which can + + span multiple paragraphs.}, + thanks = {These are the acknowledgements for my thesis, which can + + span multiple paragraphs.}, + bib = example.bib, + %% The following keys are only useful, when you're using a + %% locale other than English. You can safely omit them in an + %% English thesis. + keywordsEn = {keyword1, keyword2, ...}, + TeXkeywordsEn = {keyword1, keyword2, \ldots}, + abstractEn = {This is the English abstract of my thesis, which can + + span multiple paragraphs.}, +} +\usepackage{makeidx} %% The `makeidx` package contains +\makeindex %% helper commands for index typesetting. +%% These additional packages are used within the document: +\usepackage{paralist} %% Compact list environments +\usepackage{amsmath} %% Mathematics +\usepackage{amsthm} +\usepackage{amsfonts} +\usepackage{url} %% Hyperlinks +\usepackage{markdown} %% Lightweight markup +\usepackage{listings} %% Source code highlighting +\lstset{ + basicstyle = \ttfamily,% + identifierstyle = \color{black},% + keywordstyle = \color{blue},% + keywordstyle = {[2]\color{cyan}},% + keywordstyle = {[3]\color{olive}},% + stringstyle = \color{teal},% + commentstyle = \itshape\color{magenta}} +\usepackage{floatrow} %% Putting captions above tables +\floatsetup[table]{capposition=top} +\begin{document} +\chapter*{Introduction} +\addcontentsline{toc}{chapter}{Introduction} + +Theses are rumoured to be the capstones of education, so I decided +to write one of my own. If all goes well, I will soon have a +diploma under my belt. Wish me luck! + +\begin{otherlanguage}{czech} +Říká se, že závěrečné práce jsou vyvrcholením studia a tak jsem se +rozhodl jednu také napsat. Pokud vše půjde podle plánu, odnesu si +na konci semestru diplom. Držte mi palce! +\end{otherlanguage} + +\begin{otherlanguage}{slovak} +Hovorí sa, že záverečné práce sú vyvrcholením štúdia a tak som sa +rozhodol jednu tiež napísať. Ak všetko pôjde podľa plánu, odnesiem +si na konci semestra diplom. Držte mi palce! +\end{otherlanguage} + +\begin{otherlanguage}{german} +Man munkelt, dass die Dissertation die Krönung der Ausbildung ist. +Deshalb habe ich mich beschlossen meine eigene zu schreiben. Wenn +alles gut geht, bekomme ich bald ein Diplom. Wünsch mir Glück! +\end{otherlanguage} + +\begin{otherlanguage}{russian}\textrussian{% +Говорят, что тезис -- это кульминация обучения. Поэтому я и решил +написать собственный тезис. Если всё сработает по плану, я скоро +получу диплом. Желайте мне удачи! +}\end{otherlanguage} + +\chapter{These are} +\section{the available} +\subsection{sectioning} +\subsubsection{commands.} +\paragraph{Paragraphs and} +\subparagraph{subparagraphs are available as well.} +Inside the text, you can also use unnumbered lists, +\begin{itemize} + \item such as + \item this one + \begin{itemize} + \item and they can be nested as well. + \item[>>] You can even turn the bullets into something fancier, + \item[\S] if you so desire. + \end{itemize} +\end{itemize} +Numbered lists are +\begin{enumerate} + \item very + \begin{enumerate} + \item similar + \end{enumerate} +\end{enumerate} +and so are description lists: +\begin{description} + \item[Description list] + A list of terms with a description of each term +\end{description} +The spacing of these lists is geared towards paragraphs of text. +For lists of words and phrases, the \textsf{paralist} package +offers commands +\begin{compactitem} + \item that + \begin{compactitem} + \item are + \begin{compactitem} + \item better + \begin{compactitem} + \item suited + \end{compactitem} + \end{compactitem} + \end{compactitem} +\end{compactitem} +\begin{compactenum} + \item to + \begin{compactenum} + \item this + \begin{compactenum} + \item kind of + \begin{compactenum} + \item content. + \end{compactenum} + \end{compactenum} + \end{compactenum} +\end{compactenum} +The \textsf{amsthm} package provides the commands necessary for the +typesetting of mathematical definitions, theorems, lemmas and +proofs. + +%% We will define several mathematical sectioning commands. +\newtheorem{theorem}{Theorem}[section] %% The numbering of theorems + %% will be reset after each section. +\newtheorem{lemma}[theorem]{Lemma} %% The numbering of lemmas +\newtheorem{corollary}[theorem]{Corollary} %% and corollaries will + %% share the counter with theorems. +\theoremstyle{definition} +\newtheorem{definition}{Definition} +\theoremstyle{remark} +\newtheorem*{remark}{Remark} + +\begin{theorem} + This is a theorem that offers a profound insight into the + mathematical sectioning commands. +\end{theorem} +\begin{theorem}[Another theorem] + This is another theorem. Unlike the first one, this theorem has + been endowed with a name. +\end{theorem} +\begin{lemma} + Let us suppose that $x^2+y^2=z^2$. Then + \begin{equation} + \biggl\langle u\biggm|\sum_{i=1}^nF(e_i,v)e_i\biggr\rangle + =F\biggl(\sum_{i=1}^n\langle e_i|u\rangle e_i,v\biggr). + \end{equation} +\end{lemma} +\begin{proof} + $\nabla^2 f(x,y)=\frac{\partial^2f}{\partial x^2}+ + \frac{\partial^2f}{\partial y^2}$. +\end{proof} +\begin{corollary} + This is a corollary. +\end{corollary} +\begin{remark} + This is a remark. +\end{remark} + +\chapter{Floats and references} +\begin{figure} + \begin{center} + %% PNG and JPG images can be inserted into the document as well, + %% but their resolution needs to be adequate. The minimum is + %% about 100 pixels per 1 centimeter or 300 pixels per 1 inch. + %% That means that a JPG or PNG image typeset at 4 × 4 cm should + %% be 400 × 400 px large at the bare minimum. + %% + %% The optimum is about 250 pixels per 1 centimeter or 600 + %% pixels per 1 inch. That means that a JPG or PNG image typeset + %% at 4 × 4 cm should be 1000 × 1000 px large or larger. + \includegraphics[width=4cm]{fithesis/logo/mu/fithesis-base.pdf} + \end{center} + \caption{The logo of the Masaryk University at 40\,mm} + \label{fig:mulogo1} +\end{figure} + +\begin{figure} + \begin{center} + \begin{minipage}{.66\textwidth} + \includegraphics[width=\textwidth]{fithesis/logo/mu/fithesis-base.pdf} + \end{minipage} + \begin{minipage}{.33\textwidth} + \includegraphics[width=\textwidth]{fithesis/logo/mu/fithesis-base.pdf} \\ + \includegraphics[width=\textwidth]{fithesis/logo/mu/fithesis-base.pdf} + \end{minipage} + \end{center} + \caption{The logo of the Masaryk University at $\frac23$ and + $\frac13$ of text width} + \label{fig:mulogo2} +\end{figure} + +\begin{table} + \begin{tabularx}{\textwidth}{lllX} + \toprule + Day & Min Temp & Max Temp & Summary \\ + \midrule + Monday & $13^{\circ}\mathrm{C}$ & $21^\circ\mathrm{C}$ & A + clear day with low wind and no adverse current advisories. \\ + Tuesday & $11^{\circ}\mathrm{C}$ & $17^\circ\mathrm{C}$ & A + trough of low pressure will come from the northwest. \\ + Wednesday & $10^{\circ}\mathrm{C}$ & + $21^\circ\mathrm{C}$ & Rain will spread to all parts during the + morning. \\ + \bottomrule + \end{tabularx} + \caption{A weather forecast} + \label{tab:weather} +\end{table} + +The logo of the Masaryk University is shown in Figure +\ref{fig:mulogo1} and Figure \ref{fig:mulogo2} at pages +\pageref{fig:mulogo1} and \pageref{fig:mulogo2}. The weather +forecast is shown in Table \ref{tab:weather} at page +\pageref{tab:weather}. The following chapter is Chapter +\ref{chap:matheq} and starts at page \pageref{chap:matheq}. +Items \ref{item:star1}, \ref{item:star2}, and +\ref{item:star3} are starred in the following list: +\begin{compactenum} + \item some text + \item some other text + \item $\star$ \label{item:star1} + \begin{compactenum} + \item some text + \item $\star$ \label{item:star2} + \item some other text + \begin{compactenum} + \item some text + \item some other text + \item yet another piece of text + \item $\star$ \label{item:star3} + \end{compactenum} + \item yet another piece of text + \end{compactenum} + \item yet another piece of text +\end{compactenum} +If your reference points to a place that has not yet been typeset, +the \verb"\ref" command will expand to \textbf{??} during the first +run of +\texttt{pdflatex \jobname.tex} +and a second run is going to be needed for the references to +resolve. With online services -- such as Overleaf -- this is +performed automatically. + +\chapter{Mathematical equations} +\label{chap:matheq} +\TeX{} comes pre-packed with the ability to typeset inline +equations, such as $\mathrm{e}^{ix}=\cos x+i\sin x$, and display +equations, such as \[ + \mathbf{A}^{-1} = \begin{bmatrix} + a & b \\ c & d \\ + \end{bmatrix}^{-1} = + \frac{1}{\det(\mathbf{A})} \begin{bmatrix} + \,\,\,d & \!\!-b \\ -c & \,a \\ + \end{bmatrix} = + \frac{1}{ad - bc} \begin{bmatrix} + \,\,\,d & \!\!-b \\ -c & \,a \\ + \end{bmatrix}. +\] \LaTeX{} defines the automatically numbered \texttt{equation} +environment: +\begin{equation} + \gamma Px = PAx = PAP^{-1}Px. +\end{equation} +The package \textsf{amsmath} provides several additional +environments that can be used to typeset complex equations: +\begin{enumerate} + \item An equation can be spread over multiple lines using the + \texttt{multline} environment: + \begin{multline} + a + b + c + d + e + f + b + c + d + e + f + b + c + d + e + +f \\ + + f + g + h + i + j + k + l + m + n + o + p + q + \end{multline} + + \item Several aligned equations can be typeset using the + \texttt{align} environment: + \begin{align} + a + b &= c + d \\ + u &= v + w + x \\[1ex] + i + j + k + l &= m + \end{align} + + \item The \texttt{alignat} environment is similar to + \texttt{align}, but it doesn't insert horizontal spaces between + the individual columns: + \begin{alignat}{2} + a + b + c &+ d & &= 0 \\ + e &+ f + g & &= 5 + \end{alignat} + + \item Much like chapter, sections, tables, figures, or list + items, equations -- such as \eqref{eq:first} and + \eqref{eq:mine} -- can also be labeled and referenced: + \begin{alignat}{4} + b_{11}x_1 &+ b_{12}x_2 & &+ b_{13}x_3 & & & + &= y_1, \label{eq:first} \\ + b_{21}x_1 &+ b_{22}x_2 & & & &+ b_{24}x_4 & + &= y_2. \tag{My equation} \label{eq:mine} + \end{alignat} + + \item The \texttt{gather} environment makes it possible to + typeset several equations without any alignment: + \begin{gather} + \psi = \psi\psi, \\ + \eta = \eta\eta\eta\eta\eta\eta, \\ + \theta = \theta. + \end{gather} + + \item Several cases can be typeset using the \texttt{cases} + environment: + \begin{equation} + |y| = \begin{cases} + \phantom-y & \text{if }z\geq0, \\ + -y & \text{otherwise}. + \end{cases} + \end{equation} +\end{enumerate} +For the complete list of environments and commands, consult the +\textsf{amsmath} package manual\footnote{ + See \url{http://mirrors.ctan.org/macros/latex/required/amslatex/math/amsldoc.pdf}. + The \texttt{\textbackslash url} command is provided by the + package \textsf{url}. +}. + +\chapter{\textnormal{We \textsf{have} \texttt{several} \textsc{fonts} + \textit{at} \textbf{disposal}}} +The serified roman font is used for the main body of the text. +\textit{Italics are typically used to denote emphasis or +quotations.} \texttt{The teletype font is typically used for source +code listings.} The \textbf{bold}, \textsc{small-caps} and +\textsf{sans-serif} variants of the base roman font can be used to +denote specific types of information. + +\tiny We \scriptsize can \footnotesize also \small change \normalsize +the \large font \Large size, \LARGE although \huge it \Huge +is \huge usually \LARGE not \Large necessary.\normalsize + +A wide variety of mathematical fonts is also available, such as: \[ + \mathrm{ABC}, \mathcal{ABC}, \mathbf{ABC}, \mathsf{ABC}, + \mathit{ABC}, \mathtt{ABC} +\] By loading the \textsf{amsfonts} packages, several additional +fonts will become available: \[ + \mathfrak{ABC}, \mathbb{ABC} +\] Many other mathematical fonts are available\footnote{ + See \url{http://tex.stackexchange.com/a/58124/70941}. +}. + +\chapter{Using lightweight markup} +\shorthandoff{-} +\begin{markdown*}{% + hybrid, + definitionLists, + footnotes, + inlineFootnotes, + hashEnumerators, + fencedCode, + citations, + citationNbsps, +} + +If you decide that \LaTeX{} is too wordy for some parts of your +document, there are [packages](https://www.ctan.org/pkg/markdown +"Markdown") that allow you to use more lightweight markup next +to it. + + ![logo](fithesis/logo/mu/fithesis-base.pdf "The logo of the + Masaryk University") + +This is a bullet list. Unlike numbered lists, bulleted lists +contain an **unordered** set of bullet points. When a bullet point +contains multiple paragraphs, the list is typeset as follows: + + * The first item of a bullet list + + that spans several paragraphs, + * the second item of a bullet list, + * the third item of a bullet list. + +When none of the bullet points contains multiple paragraphs, the +list has a more compact form: + + * The first item of a bullet list, + * the second item of a bullet list, + * the third item of a bullet list. + +Unlike a bulleted list, a numbered list implies chronology or +ordering of the bullet points. When a bullet point +contains multiple paragraphs, the list is typeset as follows: + + 1. The first item of an ordered list + + that spans several paragraphs, + 2. the second item of an ordered list, + 3. the third item of an ordered list. + #. If you are feeling lazy, + #. you can use hash enumerators as well. + +When none of the bullet points contains multiple paragraphs, the +list has a more compact form: + + 6. The first item of an ordered list, + 7. the second item of an ordered list, + 8. the third item of an ordered list. + +Definition lists are used to provide definitions of terms. When +a definition contains multiple paragraphs, the list is typeset +as follows: + +Term 1 + +: Definition 1 + +*Term 2* + +: Definition 2 + + Some code, part of Definition 2 + + Third paragraph of Definition 2. + +When none of the bullet points contains multiple paragraphs, the +list has a more compact form: + +Term 1 +: Definition 1 +*Term 2* +: Definition 2 + +Block quotations are used to include an excerpt from an external +document in way that visually clearly separates the excerpt from +the rest of the work: + +> This is the first level of quoting. +> +> > This is nested blockquote. +> +> Back to the first level. + +Footnotes are used to include additional information to the +document that are not necessary for the understanding of the main +text. Here is a footnote reference^[Here is the footnote.] and +another.[^longnote] + +[^longnote]: Here's one with multiple blocks. + + Subsequent paragraphs are indented to show that they +belong to the previous footnote. + + Some code + + The whole paragraph can be indented, or just the first + line. In this way, multi-paragraph footnotes work like + multi-paragraph list items. + +Citations are used to provide bibliographical references to other +documents. This is a regular citation~[@borgman03, p. 123]. This is +an in-text citation: @borgman03\. You can also cite several authors +at once using both regular~[see @borgman03, p. 123; @greenberg98, +sec. 3.2; and @thanh01] and in-text citations: @borgman03 [p.123; +@greenberg98, sec. 3.2; @thanh01]. + +Code blocks are used to include source code listings into the +document: + + #include + #include + #include + #include + // This is a comment + int main(int argc, char **argv) + { + while (--c > 1 && !fork()); + sleep(c = atoi(v[c])); + printf("%d\n", c); + wait(0); + return 0; + } + +There is an alternative syntax for code blocks that allows you to +specify additional information, such as the language of the source +code. This information can be used for syntax highlighting: + +``` sh +#!/bin/sh +fac() { + if [ "$1" -leq 1 ]; then + echo 1 + else + echo $(("$1" * fac $(("$1" - 1)))) + fi +} +`````````````` + +~~~~~~ Ruby +# Here's a way to empty an array. +joe = [ 'eggs.', 'some', 'break', 'to', 'Have' ] +print(joe.pop, " ") while joe.size > 0 +print "\n" +~~~~~~ + +\end{markdown*} +\shorthandon{-} + +\chapter{Inserting the bibliography} +After linking a bibliography data\-base files to the document using +the \verb"\"\texttt{thesis\discretionary{-}{}{}setup\{bib\discretionary{=}{=}{=}% +\{\textit{file1},\textit{file2},\,\ldots\,\}\}} command, you can +start citing the entries. This is just dummy text +\parencite{borgman03} lightly sprinkled with citations +\parencite[p.~123]{greenberg98}. Several sources can be cited at +once: \cite{borgman03,greenberg98,thanh01}. +\citetitle{greenberg98} was written by \citeauthor{greenberg98} in +\citeyear{greenberg98}. We can also produce \textcite{greenberg98}% +. The full bibliographic citation is: +\emph{\fullcite{greenberg98}}. We can easily insert a bibliographic +citation into the footnote\footfullcite{greenberg98}. + +The \verb"\nocite" command will not generate any +output\nocite{muni}, but it will insert its arguments into +the bibliography. The \verb"\nocite{*}" command will insert all the +records in the bibliography database file into the bibliography. +Try uncommenting the command +%% \nocite{*} +and watch the bibliography section come apart at the seams. + +When typesetting the document for the first time, citing a +\texttt{work} will expand to [\textbf{work}] and the +\verb"\printbibliography" command will produce no output. It is now +necessary to generate the bibliography by running \texttt{biber +\jobname.bcf} from the command line and then by typesetting the +document again twice. During the first run, the bibliography +section and the citations will be typeset, and in the second run, +the bibliography section will appear in the table of contents. + +The \texttt{biber} command needs to be executed from within the +directory, where the \LaTeX\ source file is located. In Windows, +the command line can be opened in a directory by holding down the +\textsf{Shift} key and by clicking the right mouse button while +hovering the cursor over a directory. Select the \textsf{Open +Command Window Here} option in the context menu that opens shortly +afterwards. + +With online services -- such as Overleaf -- or when using an +automatic tool -- such as \LaTeX MK -- all commands are executed +automatically. When you omit the \verb"\printbibliography" command, +its location will be decided by the template. + + \printbibliography[heading=bibintoc] %% Print the bibliography. + +\chapter{Inserting the index} +After using the \verb"\makeindex" macro and loading the +\texttt{makeidx} package that provides additional indexing +commands, index entries can be created by issuing the \verb"\index" +command. \index{dummy text|(}It is possible to create ranged index +entries, which will encompass a span of text.\index{dummy text|)} +To insert complex typographic material -- such as $\alpha$ +\index{alpha@$\alpha$} or \TeX{} \index{TeX@\TeX} -- +into the index, you need to specify a text string, which will +determine how the entry will be sorted. It is also possible to +create hierarchal entries. \index{vehicles!trucks} +\index{vehicles!speed cars} + +After typesetting the document, it is necessary to generate the +index by running +\begin{center}% + \texttt{texindy -I latex -C utf8 -L }$\langle$\textit{locale}% + $\rangle$\texttt{ \jobname.idx} +\end{center} +from the command line, where $\langle$\textit{locale}$\rangle$ +corresponds to the main locale of your thesis -- such as +\texttt{english}, and then typesetting the document again. + +The \texttt{texindy} command needs to be executed from within the +directory, where the \LaTeX\ source file is located. In Windows, +the command line can be opened in a directory by holding down the +\textsf{Shift} key and by clicking the right mouse button while +hovering the cursor over a directory. Select the \textsf{Open Command +Window Here} option in the context menu that opens shortly +afterwards. + +With online services -- such as Overleaf -- the commands are +executed automatically, although the locale may be erroneously +detected, or the \texttt{makeindex} tool (which is only able to +sort entries that contain digits and letters of the English +alphabet) may be used instead of \texttt{texindy}. In either case, +the index will be ill-sorted. + + \makeatletter\thesis@blocks@clear\makeatother + \phantomsection %% Print the index and insert it into the + \addcontentsline{toc}{chapter}{\indexname} %% table of contents. + \printindex + +\appendix %% Start the appendices. +\chapter{An appendix} +Here you can insert the appendices of your thesis. + +\end{document} diff --git a/macros/latex/contrib/fithesis/example/mu/med-lualatex.pdf b/macros/latex/contrib/fithesis/example/mu/med-lualatex.pdf new file mode 100644 index 0000000000..9e59c9d1f2 Binary files /dev/null and b/macros/latex/contrib/fithesis/example/mu/med-lualatex.pdf differ diff --git a/macros/latex/contrib/fithesis/example/mu/med-lualatex.tex b/macros/latex/contrib/fithesis/example/mu/med-lualatex.tex new file mode 100644 index 0000000000..f8483ad28a --- /dev/null +++ b/macros/latex/contrib/fithesis/example/mu/med-lualatex.tex @@ -0,0 +1,661 @@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% I, the copyright holder of this work, release this work into the +%% public domain. This applies worldwide. In some countries this may +%% not be legally possible; if so: I grant anyone the right to use +%% this work for any purpose, without any conditions, unless such +%% conditions are required by law. +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\documentclass[ + digital, %% This option enables the default options for the + %% digital version of a document. Replace with `printed` + %% to enable the default options for the printed version + %% of a document. + twoside, %% This option enables double-sided typesetting. Use at + %% least 120 g/m² paper to prevent show-through. Replace + %% with `oneside` to use one-sided typesetting; use only + %% if you don’t have access to a double-sided printer, + %% or if one-sided typesetting is a formal requirement + %% at your faculty. + table, %% This option causes the coloring of tables. Replace + %% with `notable` to restore plain LaTeX tables. + lof, %% This option prints the List of Figures. Replace with + %% `nolof` to hide the List of Figures. + lot, %% This option prints the List of Tables. Replace with + %% `nolot` to hide the List of Tables. + %% More options are listed in the user guide at + %% . +]{fithesis3} +%% The following section sets up the locales used in the thesis. +\usepackage{polyglossia} %% By using `czech` or `slovak` as the +\setmainlanguage{english} %% main locale instead of `english`, you +%% can typeset the thesis in either Czech or Slovak, respectively. +\setotherlanguages{german, russian, czech, slovak} %% The +%% +%% \begin{otherlanguage}{german} ... \end{otherlanguage} +%% \begin{otherlanguage}{russian} ... \end{otherlanguage} +%% \begin{otherlanguage}{czech} ... \end{otherlanguage} +%% \begin{otherlanguage}{slovak} ... \end{otherlanguage} +%% +%% For non-Latin scripts, it may be necessary to load additional +%% fonts: +\newfontfamily\russianfont[Script=Cyrillic,Ligatures=TeX]{PT Serif} +%% +%% The following section sets up the metadata of the thesis. +\thesissetup{ + date = \the\year/\the\month/\the\day, + university = mu, + faculty = med, + field = Optometry, + department = The Department of Optometry and + Orthoptics, + type = bc, + author = Jane Doe, + gender = f, + advisor = John Smith, + title = The Curative Effects of Good + Typography on the Quality of Sight, + TeXtitle = The Curative Effects of Good\\ + Typography on the Quality of Sight, + keywords = {keyword1, keyword2, ...}, + TeXkeywords = {keyword1, keyword2, \ldots}, + abstract = {This is the abstract of my thesis, which can + + span multiple paragraphs.}, + thanks = {These are the acknowledgements for my thesis, which can + + span multiple paragraphs.}, + bib = example.bib, + %% The following keys are only useful, when you're using a + %% locale other than English. You can safely omit them in an + %% English thesis. + keywordsEn = {keyword1, keyword2, ...}, + TeXkeywordsEn = {keyword1, keyword2, \ldots}, + abstractEn = {This is the English abstract of my thesis, which can + + span multiple paragraphs.}, +} +\usepackage{makeidx} %% The `makeidx` package contains +\makeindex %% helper commands for index typesetting. +%% These additional packages are used within the document: +\usepackage{paralist} %% Compact list environments +\usepackage{amsmath} %% Mathematics +\usepackage{amsthm} +\usepackage{amsfonts} +\usepackage{url} %% Hyperlinks +\usepackage{markdown} %% Lightweight markup +\usepackage{listings} %% Source code highlighting +\lstset{ + basicstyle = \ttfamily,% + identifierstyle = \color{black},% + keywordstyle = \color{blue},% + keywordstyle = {[2]\color{cyan}},% + keywordstyle = {[3]\color{olive}},% + stringstyle = \color{teal},% + commentstyle = \itshape\color{magenta}} +\usepackage{floatrow} %% Putting captions above tables +\floatsetup[table]{capposition=top} +\begin{document} +\chapter*{Introduction} +\addcontentsline{toc}{chapter}{Introduction} + +Theses are rumoured to be the capstones of education, so I decided +to write one of my own. If all goes well, I will soon have a +diploma under my belt. Wish me luck! + +\begin{otherlanguage}{czech} +Říká se, že závěrečné práce jsou vyvrcholením studia a tak jsem se +rozhodl jednu také napsat. Pokud vše půjde podle plánu, odnesu si +na konci semestru diplom. Držte mi palce! +\end{otherlanguage} + +\begin{otherlanguage}{slovak} +Hovorí sa, že záverečné práce sú vyvrcholením štúdia a tak som sa +rozhodol jednu tiež napísať. Ak všetko pôjde podľa plánu, odnesiem +si na konci semestra diplom. Držte mi palce! +\end{otherlanguage} + +\begin{otherlanguage}{german} +Man munkelt, dass die Dissertation die Krönung der Ausbildung ist. +Deshalb habe ich mich beschlossen meine eigene zu schreiben. Wenn +alles gut geht, bekomme ich bald ein Diplom. Wünsch mir Glück! +\end{otherlanguage} + +\begin{otherlanguage}{russian} +Говорят, что тезис -- это кульминация обучения. Поэтому я и решил +написать собственный тезис. Если всё сработает по плану, я скоро +получу диплом. Желайте мне удачи! +\end{otherlanguage} + +\chapter{These are} +\section{the available} +\subsection{sectioning} +\subsubsection{commands.} +\paragraph{Paragraphs and} +\subparagraph{subparagraphs are available as well.} +Inside the text, you can also use unnumbered lists, +\begin{itemize} + \item such as + \item this one + \begin{itemize} + \item and they can be nested as well. + \item[>>] You can even turn the bullets into something fancier, + \item[\S] if you so desire. + \end{itemize} +\end{itemize} +Numbered lists are +\begin{enumerate} + \item very + \begin{enumerate} + \item similar + \end{enumerate} +\end{enumerate} +and so are description lists: +\begin{description} + \item[Description list] + A list of terms with a description of each term +\end{description} +The spacing of these lists is geared towards paragraphs of text. +For lists of words and phrases, the \textsf{paralist} package +offers commands +\begin{compactitem} + \item that + \begin{compactitem} + \item are + \begin{compactitem} + \item better + \begin{compactitem} + \item suited + \end{compactitem} + \end{compactitem} + \end{compactitem} +\end{compactitem} +\begin{compactenum} + \item to + \begin{compactenum} + \item this + \begin{compactenum} + \item kind of + \begin{compactenum} + \item content. + \end{compactenum} + \end{compactenum} + \end{compactenum} +\end{compactenum} +The \textsf{amsthm} package provides the commands necessary for the +typesetting of mathematical definitions, theorems, lemmas and +proofs. + +%% We will define several mathematical sectioning commands. +\newtheorem{theorem}{Theorem}[section] %% The numbering of theorems + %% will be reset after each section. +\newtheorem{lemma}[theorem]{Lemma} %% The numbering of lemmas +\newtheorem{corollary}[theorem]{Corollary} %% and corollaries will + %% share the counter with theorems. +\theoremstyle{definition} +\newtheorem{definition}{Definition} +\theoremstyle{remark} +\newtheorem*{remark}{Remark} + +\begin{theorem} + This is a theorem that offers a profound insight into the + mathematical sectioning commands. +\end{theorem} +\begin{theorem}[Another theorem] + This is another theorem. Unlike the first one, this theorem has + been endowed with a name. +\end{theorem} +\begin{lemma} + Let us suppose that $x^2+y^2=z^2$. Then + \begin{equation} + \biggl\langle u\biggm|\sum_{i=1}^nF(e_i,v)e_i\biggr\rangle + =F\biggl(\sum_{i=1}^n\langle e_i|u\rangle e_i,v\biggr). + \end{equation} +\end{lemma} +\begin{proof} + $\nabla^2 f(x,y)=\frac{\partial^2f}{\partial x^2}+ + \frac{\partial^2f}{\partial y^2}$. +\end{proof} +\begin{corollary} + This is a corollary. +\end{corollary} +\begin{remark} + This is a remark. +\end{remark} + +\chapter{Floats and references} +\begin{figure} + \begin{center} + %% PNG and JPG images can be inserted into the document as well, + %% but their resolution needs to be adequate. The minimum is + %% about 100 pixels per 1 centimeter or 300 pixels per 1 inch. + %% That means that a JPG or PNG image typeset at 4 × 4 cm should + %% be 400 × 400 px large at the bare minimum. + %% + %% The optimum is about 250 pixels per 1 centimeter or 600 + %% pixels per 1 inch. That means that a JPG or PNG image typeset + %% at 4 × 4 cm should be 1000 × 1000 px large or larger. + \includegraphics[width=4cm]{fithesis/logo/mu/fithesis-base.pdf} + \end{center} + \caption{The logo of the Masaryk University at 40\,mm} + \label{fig:mulogo1} +\end{figure} + +\begin{figure} + \begin{center} + \begin{minipage}{.66\textwidth} + \includegraphics[width=\textwidth]{fithesis/logo/mu/fithesis-base.pdf} + \end{minipage} + \begin{minipage}{.33\textwidth} + \includegraphics[width=\textwidth]{fithesis/logo/mu/fithesis-base.pdf} \\ + \includegraphics[width=\textwidth]{fithesis/logo/mu/fithesis-base.pdf} + \end{minipage} + \end{center} + \caption{The logo of the Masaryk University at $\frac23$ and + $\frac13$ of text width} + \label{fig:mulogo2} +\end{figure} + +\begin{table} + \begin{tabularx}{\textwidth}{lllX} + \toprule + Day & Min Temp & Max Temp & Summary \\ + \midrule + Monday & $13^{\circ}\mathrm{C}$ & $21^\circ\mathrm{C}$ & A + clear day with low wind and no adverse current advisories. \\ + Tuesday & $11^{\circ}\mathrm{C}$ & $17^\circ\mathrm{C}$ & A + trough of low pressure will come from the northwest. \\ + Wednesday & $10^{\circ}\mathrm{C}$ & + $21^\circ\mathrm{C}$ & Rain will spread to all parts during the + morning. \\ + \bottomrule + \end{tabularx} + \caption{A weather forecast} + \label{tab:weather} +\end{table} + +The logo of the Masaryk University is shown in Figure +\ref{fig:mulogo1} and Figure \ref{fig:mulogo2} at pages +\pageref{fig:mulogo1} and \pageref{fig:mulogo2}. The weather +forecast is shown in Table \ref{tab:weather} at page +\pageref{tab:weather}. The following chapter is Chapter +\ref{chap:matheq} and starts at page \pageref{chap:matheq}. +Items \ref{item:star1}, \ref{item:star2}, and +\ref{item:star3} are starred in the following list: +\begin{compactenum} + \item some text + \item some other text + \item $\star$ \label{item:star1} + \begin{compactenum} + \item some text + \item $\star$ \label{item:star2} + \item some other text + \begin{compactenum} + \item some text + \item some other text + \item yet another piece of text + \item $\star$ \label{item:star3} + \end{compactenum} + \item yet another piece of text + \end{compactenum} + \item yet another piece of text +\end{compactenum} +If your reference points to a place that has not yet been typeset, +the \verb"\ref" command will expand to \textbf{??} during the first +run of +\texttt{lualatex \jobname.tex} +and a second run is going to be needed for the references to +resolve. With online services -- such as Overleaf -- this is +performed automatically. + +\chapter{Mathematical equations} +\label{chap:matheq} +\TeX{} comes pre-packed with the ability to typeset inline +equations, such as $\mathrm{e}^{ix}=\cos x+i\sin x$, and display +equations, such as \[ + \mathbf{A}^{-1} = \begin{bmatrix} + a & b \\ c & d \\ + \end{bmatrix}^{-1} = + \frac{1}{\det(\mathbf{A})} \begin{bmatrix} + \,\,\,d & \!\!-b \\ -c & \,a \\ + \end{bmatrix} = + \frac{1}{ad - bc} \begin{bmatrix} + \,\,\,d & \!\!-b \\ -c & \,a \\ + \end{bmatrix}. +\] \LaTeX{} defines the automatically numbered \texttt{equation} +environment: +\begin{equation} + \gamma Px = PAx = PAP^{-1}Px. +\end{equation} +The package \textsf{amsmath} provides several additional +environments that can be used to typeset complex equations: +\begin{enumerate} + \item An equation can be spread over multiple lines using the + \texttt{multline} environment: + \begin{multline} + a + b + c + d + e + f + b + c + d + e + f + b + c + d + e + +f \\ + + f + g + h + i + j + k + l + m + n + o + p + q + \end{multline} + + \item Several aligned equations can be typeset using the + \texttt{align} environment: + \begin{align} + a + b &= c + d \\ + u &= v + w + x \\[1ex] + i + j + k + l &= m + \end{align} + + \item The \texttt{alignat} environment is similar to + \texttt{align}, but it doesn't insert horizontal spaces between + the individual columns: + \begin{alignat}{2} + a + b + c &+ d & &= 0 \\ + e &+ f + g & &= 5 + \end{alignat} + + \item Much like chapter, sections, tables, figures, or list + items, equations -- such as \eqref{eq:first} and + \eqref{eq:mine} -- can also be labeled and referenced: + \begin{alignat}{4} + b_{11}x_1 &+ b_{12}x_2 & &+ b_{13}x_3 & & & + &= y_1, \label{eq:first} \\ + b_{21}x_1 &+ b_{22}x_2 & & & &+ b_{24}x_4 & + &= y_2. \tag{My equation} \label{eq:mine} + \end{alignat} + + \item The \texttt{gather} environment makes it possible to + typeset several equations without any alignment: + \begin{gather} + \psi = \psi\psi, \\ + \eta = \eta\eta\eta\eta\eta\eta, \\ + \theta = \theta. + \end{gather} + + \item Several cases can be typeset using the \texttt{cases} + environment: + \begin{equation} + |y| = \begin{cases} + \phantom-y & \text{if }z\geq0, \\ + -y & \text{otherwise}. + \end{cases} + \end{equation} +\end{enumerate} +For the complete list of environments and commands, consult the +\textsf{amsmath} package manual\footnote{ + See \url{http://mirrors.ctan.org/macros/latex/required/amslatex/math/amsldoc.pdf}. + The \texttt{\textbackslash url} command is provided by the + package \textsf{url}. +}. + +\chapter{\textnormal{We \textsf{have} \texttt{several} \textsc{fonts} + \textit{at} \textbf{disposal}}} +The serified roman font is used for the main body of the text. +\textit{Italics are typically used to denote emphasis or +quotations.} \texttt{The teletype font is typically used for source +code listings.} The \textbf{bold}, \textsc{small-caps} and +\textsf{sans-serif} variants of the base roman font can be used to +denote specific types of information. + +\tiny We \scriptsize can \footnotesize also \small change \normalsize +the \large font \Large size, \LARGE although \huge it \Huge +is \huge usually \LARGE not \Large necessary.\normalsize + +A wide variety of mathematical fonts is also available, such as: \[ + \mathrm{ABC}, \mathcal{ABC}, \mathbf{ABC}, \mathsf{ABC}, + \mathit{ABC}, \mathtt{ABC} +\] By loading the \textsf{amsfonts} packages, several additional +fonts will become available: \[ + \mathfrak{ABC}, \mathbb{ABC} +\] Many other mathematical fonts are available\footnote{ + See \url{http://tex.stackexchange.com/a/58124/70941}. +}. + +\chapter{Using lightweight markup} +\begin{markdown*}{% + hybrid, + definitionLists, + footnotes, + inlineFootnotes, + hashEnumerators, + fencedCode, + citations, + citationNbsps, +} + +If you decide that \LaTeX{} is too wordy for some parts of your +document, there are [packages](https://www.ctan.org/pkg/markdown +"Markdown") that allow you to use more lightweight markup next +to it. + + ![logo](fithesis/logo/mu/fithesis-base.pdf "The logo of the + Masaryk University") + +This is a bullet list. Unlike numbered lists, bulleted lists +contain an **unordered** set of bullet points. When a bullet point +contains multiple paragraphs, the list is typeset as follows: + + * The first item of a bullet list + + that spans several paragraphs, + * the second item of a bullet list, + * the third item of a bullet list. + +When none of the bullet points contains multiple paragraphs, the +list has a more compact form: + + * The first item of a bullet list, + * the second item of a bullet list, + * the third item of a bullet list. + +Unlike a bulleted list, a numbered list implies chronology or +ordering of the bullet points. When a bullet point +contains multiple paragraphs, the list is typeset as follows: + + 1. The first item of an ordered list + + that spans several paragraphs, + 2. the second item of an ordered list, + 3. the third item of an ordered list. + #. If you are feeling lazy, + #. you can use hash enumerators as well. + +When none of the bullet points contains multiple paragraphs, the +list has a more compact form: + + 6. The first item of an ordered list, + 7. the second item of an ordered list, + 8. the third item of an ordered list. + +Definition lists are used to provide definitions of terms. When +a definition contains multiple paragraphs, the list is typeset +as follows: + +Term 1 + +: Definition 1 + +*Term 2* + +: Definition 2 + + Some code, part of Definition 2 + + Third paragraph of Definition 2. + +When none of the bullet points contains multiple paragraphs, the +list has a more compact form: + +Term 1 +: Definition 1 +*Term 2* +: Definition 2 + +Block quotations are used to include an excerpt from an external +document in way that visually clearly separates the excerpt from +the rest of the work: + +> This is the first level of quoting. +> +> > This is nested blockquote. +> +> Back to the first level. + +Footnotes are used to include additional information to the +document that are not necessary for the understanding of the main +text. Here is a footnote reference^[Here is the footnote.] and +another.[^longnote] + +[^longnote]: Here's one with multiple blocks. + + Subsequent paragraphs are indented to show that they +belong to the previous footnote. + + Some code + + The whole paragraph can be indented, or just the first + line. In this way, multi-paragraph footnotes work like + multi-paragraph list items. + +Citations are used to provide bibliographical references to other +documents. This is a regular citation~[@borgman03, p. 123]. This is +an in-text citation: @borgman03\. You can also cite several authors +at once using both regular~[see @borgman03, p. 123; @greenberg98, +sec. 3.2; and @thanh01] and in-text citations: @borgman03 [p.123; +@greenberg98, sec. 3.2; @thanh01]. + +Code blocks are used to include source code listings into the +document: + + #include + #include + #include + #include + // This is a comment + int main(int argc, char **argv) + { + while (--c > 1 && !fork()); + sleep(c = atoi(v[c])); + printf("%d\n", c); + wait(0); + return 0; + } + +There is an alternative syntax for code blocks that allows you to +specify additional information, such as the language of the source +code. This information can be used for syntax highlighting: + +``` sh +#!/bin/sh +fac() { + if [ "$1" -leq 1 ]; then + echo 1 + else + echo $(("$1" * fac $(("$1" - 1)))) + fi +} +`````````````` + +~~~~~~ Ruby +# Here's a way to empty an array. +joe = [ 'eggs.', 'some', 'break', 'to', 'Have' ] +print(joe.pop, " ") while joe.size > 0 +print "\n" +~~~~~~ + +\end{markdown*} + +\chapter{Inserting the bibliography} +After linking a bibliography data\-base files to the document using +the \verb"\"\texttt{thesis\discretionary{-}{}{}setup\{bib\discretionary{=}{=}{=}% +\{\textit{file1},\textit{file2},\,\ldots\,\}\}} command, you can +start citing the entries. This is just dummy text +\parencite{borgman03} lightly sprinkled with citations +\parencite[p.~123]{greenberg98}. Several sources can be cited at +once: \cite{borgman03,greenberg98,thanh01}. +\citetitle{greenberg98} was written by \citeauthor{greenberg98} in +\citeyear{greenberg98}. We can also produce \textcite{greenberg98}% +. The full bibliographic citation is: +\emph{\fullcite{greenberg98}}. We can easily insert a bibliographic +citation into the footnote\footfullcite{greenberg98}. + +The \verb"\nocite" command will not generate any +output\nocite{muni}, but it will insert its arguments into +the bibliography. The \verb"\nocite{*}" command will insert all the +records in the bibliography database file into the bibliography. +Try uncommenting the command +%% \nocite{*} +and watch the bibliography section come apart at the seams. + +When typesetting the document for the first time, citing a +\texttt{work} will expand to [\textbf{work}] and the +\verb"\printbibliography" command will produce no output. It is now +necessary to generate the bibliography by running \texttt{biber +\jobname.bcf} from the command line and then by typesetting the +document again twice. During the first run, the bibliography +section and the citations will be typeset, and in the second run, +the bibliography section will appear in the table of contents. + +The \texttt{biber} command needs to be executed from within the +directory, where the \LaTeX\ source file is located. In Windows, +the command line can be opened in a directory by holding down the +\textsf{Shift} key and by clicking the right mouse button while +hovering the cursor over a directory. Select the \textsf{Open +Command Window Here} option in the context menu that opens shortly +afterwards. + +With online services -- such as Overleaf -- or when using an +automatic tool -- such as \LaTeX MK -- all commands are executed +automatically. When you omit the \verb"\printbibliography" command, +its location will be decided by the template. + + \printbibliography[heading=bibintoc] %% Print the bibliography. + +\chapter{Inserting the index} +After using the \verb"\makeindex" macro and loading the +\texttt{makeidx} package that provides additional indexing +commands, index entries can be created by issuing the \verb"\index" +command. \index{dummy text|(}It is possible to create ranged index +entries, which will encompass a span of text.\index{dummy text|)} +To insert complex typographic material -- such as $\alpha$ +\index{alpha@$\alpha$} or \TeX{} \index{TeX@\TeX} -- +into the index, you need to specify a text string, which will +determine how the entry will be sorted. It is also possible to +create hierarchal entries. \index{vehicles!trucks} +\index{vehicles!speed cars} + +After typesetting the document, it is necessary to generate the +index by running +\begin{center}% + \texttt{texindy -I latex -C utf8 -L }$\langle$\textit{locale}% + $\rangle$\texttt{ \jobname.idx} +\end{center} +from the command line, where $\langle$\textit{locale}$\rangle$ +corresponds to the main locale of your thesis -- such as +\texttt{english}, and then typesetting the document again. + +The \texttt{texindy} command needs to be executed from within the +directory, where the \LaTeX\ source file is located. In Windows, +the command line can be opened in a directory by holding down the +\textsf{Shift} key and by clicking the right mouse button while +hovering the cursor over a directory. Select the \textsf{Open Command +Window Here} option in the context menu that opens shortly +afterwards. + +With online services -- such as Overleaf -- the commands are +executed automatically, although the locale may be erroneously +detected, or the \texttt{makeindex} tool (which is only able to +sort entries that contain digits and letters of the English +alphabet) may be used instead of \texttt{texindy}. In either case, +the index will be ill-sorted. + + \makeatletter\thesis@blocks@clear\makeatother + \phantomsection %% Print the index and insert it into the + \addcontentsline{toc}{chapter}{\indexname} %% table of contents. + \printindex + +\appendix %% Start the appendices. +\chapter{An appendix} +Here you can insert the appendices of your thesis. + +\end{document} diff --git a/macros/latex/contrib/fithesis/example/mu/med-pdflatex.pdf b/macros/latex/contrib/fithesis/example/mu/med-pdflatex.pdf new file mode 100644 index 0000000000..4d4adf5f44 Binary files /dev/null and b/macros/latex/contrib/fithesis/example/mu/med-pdflatex.pdf differ diff --git a/macros/latex/contrib/fithesis/example/mu/med-pdflatex.tex b/macros/latex/contrib/fithesis/example/mu/med-pdflatex.tex new file mode 100644 index 0000000000..4e672a80ad --- /dev/null +++ b/macros/latex/contrib/fithesis/example/mu/med-pdflatex.tex @@ -0,0 +1,668 @@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% I, the copyright holder of this work, release this work into the +%% public domain. This applies worldwide. In some countries this may +%% not be legally possible; if so: I grant anyone the right to use +%% this work for any purpose, without any conditions, unless such +%% conditions are required by law. +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\documentclass[ + digital, %% This option enables the default options for the + %% digital version of a document. Replace with `printed` + %% to enable the default options for the printed version + %% of a document. + twoside, %% This option enables double-sided typesetting. Use at + %% least 120 g/m² paper to prevent show-through. Replace + %% with `oneside` to use one-sided typesetting; use only + %% if you don’t have access to a double-sided printer, + %% or if one-sided typesetting is a formal requirement + %% at your faculty. + table, %% This option causes the coloring of tables. Replace + %% with `notable` to restore plain LaTeX tables. + lof, %% This option prints the List of Figures. Replace with + %% `nolof` to hide the List of Figures. + lot, %% This option prints the List of Tables. Replace with + %% `nolot` to hide the List of Tables. + %% More options are listed in the user guide at + %% . +]{fithesis3} +%% The following section sets up the locales used in the thesis. +\usepackage[resetfonts]{cmap} %% We need to load the T2A font encoding +\usepackage[T1,T2A]{fontenc} %% to use the Cyrillic fonts with Russian texts. +\usepackage[ + main=english, %% By using `czech` or `slovak` as the main locale + %% instead of `english`, you can typeset the thesis + %% in either Czech or Slovak, respectively. + english, german, russian, czech, slovak %% The additional keys allow +]{babel} %% foreign texts to be typeset as follows: +%% +%% \begin{otherlanguage}{german} ... \end{otherlanguage} +%% \begin{otherlanguage}{russian} ... \end{otherlanguage} +%% \begin{otherlanguage}{czech} ... \end{otherlanguage} +%% \begin{otherlanguage}{slovak} ... \end{otherlanguage} +%% +%% For non-Latin scripts, it may be necessary to load additional +%% fonts: +\usepackage{paratype} +\def\textrussian#1{{\usefont{T2A}{PTSerif-TLF}{m}{rm}#1}} +%% +%% The following section sets up the metadata of the thesis. +\thesissetup{ + date = \the\year/\the\month/\the\day, + university = mu, + faculty = med, + field = Optometry, + department = The Department of Optometry and + Orthoptics, + type = bc, + author = Jane Doe, + gender = f, + advisor = John Smith, + title = The Curative Effects of Good + Typography on the Quality of Sight, + TeXtitle = The Curative Effects of Good\\ + Typography on the Quality of Sight, + keywords = {keyword1, keyword2, ...}, + TeXkeywords = {keyword1, keyword2, \ldots}, + abstract = {This is the abstract of my thesis, which can + + span multiple paragraphs.}, + thanks = {These are the acknowledgements for my thesis, which can + + span multiple paragraphs.}, + bib = example.bib, + %% The following keys are only useful, when you're using a + %% locale other than English. You can safely omit them in an + %% English thesis. + keywordsEn = {keyword1, keyword2, ...}, + TeXkeywordsEn = {keyword1, keyword2, \ldots}, + abstractEn = {This is the English abstract of my thesis, which can + + span multiple paragraphs.}, +} +\usepackage{makeidx} %% The `makeidx` package contains +\makeindex %% helper commands for index typesetting. +%% These additional packages are used within the document: +\usepackage{paralist} %% Compact list environments +\usepackage{amsmath} %% Mathematics +\usepackage{amsthm} +\usepackage{amsfonts} +\usepackage{url} %% Hyperlinks +\usepackage{markdown} %% Lightweight markup +\usepackage{listings} %% Source code highlighting +\lstset{ + basicstyle = \ttfamily,% + identifierstyle = \color{black},% + keywordstyle = \color{blue},% + keywordstyle = {[2]\color{cyan}},% + keywordstyle = {[3]\color{olive}},% + stringstyle = \color{teal},% + commentstyle = \itshape\color{magenta}} +\usepackage{floatrow} %% Putting captions above tables +\floatsetup[table]{capposition=top} +\begin{document} +\chapter*{Introduction} +\addcontentsline{toc}{chapter}{Introduction} + +Theses are rumoured to be the capstones of education, so I decided +to write one of my own. If all goes well, I will soon have a +diploma under my belt. Wish me luck! + +\begin{otherlanguage}{czech} +Říká se, že závěrečné práce jsou vyvrcholením studia a tak jsem se +rozhodl jednu také napsat. Pokud vše půjde podle plánu, odnesu si +na konci semestru diplom. Držte mi palce! +\end{otherlanguage} + +\begin{otherlanguage}{slovak} +Hovorí sa, že záverečné práce sú vyvrcholením štúdia a tak som sa +rozhodol jednu tiež napísať. Ak všetko pôjde podľa plánu, odnesiem +si na konci semestra diplom. Držte mi palce! +\end{otherlanguage} + +\begin{otherlanguage}{german} +Man munkelt, dass die Dissertation die Krönung der Ausbildung ist. +Deshalb habe ich mich beschlossen meine eigene zu schreiben. Wenn +alles gut geht, bekomme ich bald ein Diplom. Wünsch mir Glück! +\end{otherlanguage} + +\begin{otherlanguage}{russian}\textrussian{% +Говорят, что тезис -- это кульминация обучения. Поэтому я и решил +написать собственный тезис. Если всё сработает по плану, я скоро +получу диплом. Желайте мне удачи! +}\end{otherlanguage} + +\chapter{These are} +\section{the available} +\subsection{sectioning} +\subsubsection{commands.} +\paragraph{Paragraphs and} +\subparagraph{subparagraphs are available as well.} +Inside the text, you can also use unnumbered lists, +\begin{itemize} + \item such as + \item this one + \begin{itemize} + \item and they can be nested as well. + \item[>>] You can even turn the bullets into something fancier, + \item[\S] if you so desire. + \end{itemize} +\end{itemize} +Numbered lists are +\begin{enumerate} + \item very + \begin{enumerate} + \item similar + \end{enumerate} +\end{enumerate} +and so are description lists: +\begin{description} + \item[Description list] + A list of terms with a description of each term +\end{description} +The spacing of these lists is geared towards paragraphs of text. +For lists of words and phrases, the \textsf{paralist} package +offers commands +\begin{compactitem} + \item that + \begin{compactitem} + \item are + \begin{compactitem} + \item better + \begin{compactitem} + \item suited + \end{compactitem} + \end{compactitem} + \end{compactitem} +\end{compactitem} +\begin{compactenum} + \item to + \begin{compactenum} + \item this + \begin{compactenum} + \item kind of + \begin{compactenum} + \item content. + \end{compactenum} + \end{compactenum} + \end{compactenum} +\end{compactenum} +The \textsf{amsthm} package provides the commands necessary for the +typesetting of mathematical definitions, theorems, lemmas and +proofs. + +%% We will define several mathematical sectioning commands. +\newtheorem{theorem}{Theorem}[section] %% The numbering of theorems + %% will be reset after each section. +\newtheorem{lemma}[theorem]{Lemma} %% The numbering of lemmas +\newtheorem{corollary}[theorem]{Corollary} %% and corollaries will + %% share the counter with theorems. +\theoremstyle{definition} +\newtheorem{definition}{Definition} +\theoremstyle{remark} +\newtheorem*{remark}{Remark} + +\begin{theorem} + This is a theorem that offers a profound insight into the + mathematical sectioning commands. +\end{theorem} +\begin{theorem}[Another theorem] + This is another theorem. Unlike the first one, this theorem has + been endowed with a name. +\end{theorem} +\begin{lemma} + Let us suppose that $x^2+y^2=z^2$. Then + \begin{equation} + \biggl\langle u\biggm|\sum_{i=1}^nF(e_i,v)e_i\biggr\rangle + =F\biggl(\sum_{i=1}^n\langle e_i|u\rangle e_i,v\biggr). + \end{equation} +\end{lemma} +\begin{proof} + $\nabla^2 f(x,y)=\frac{\partial^2f}{\partial x^2}+ + \frac{\partial^2f}{\partial y^2}$. +\end{proof} +\begin{corollary} + This is a corollary. +\end{corollary} +\begin{remark} + This is a remark. +\end{remark} + +\chapter{Floats and references} +\begin{figure} + \begin{center} + %% PNG and JPG images can be inserted into the document as well, + %% but their resolution needs to be adequate. The minimum is + %% about 100 pixels per 1 centimeter or 300 pixels per 1 inch. + %% That means that a JPG or PNG image typeset at 4 × 4 cm should + %% be 400 × 400 px large at the bare minimum. + %% + %% The optimum is about 250 pixels per 1 centimeter or 600 + %% pixels per 1 inch. That means that a JPG or PNG image typeset + %% at 4 × 4 cm should be 1000 × 1000 px large or larger. + \includegraphics[width=4cm]{fithesis/logo/mu/fithesis-base.pdf} + \end{center} + \caption{The logo of the Masaryk University at 40\,mm} + \label{fig:mulogo1} +\end{figure} + +\begin{figure} + \begin{center} + \begin{minipage}{.66\textwidth} + \includegraphics[width=\textwidth]{fithesis/logo/mu/fithesis-base.pdf} + \end{minipage} + \begin{minipage}{.33\textwidth} + \includegraphics[width=\textwidth]{fithesis/logo/mu/fithesis-base.pdf} \\ + \includegraphics[width=\textwidth]{fithesis/logo/mu/fithesis-base.pdf} + \end{minipage} + \end{center} + \caption{The logo of the Masaryk University at $\frac23$ and + $\frac13$ of text width} + \label{fig:mulogo2} +\end{figure} + +\begin{table} + \begin{tabularx}{\textwidth}{lllX} + \toprule + Day & Min Temp & Max Temp & Summary \\ + \midrule + Monday & $13^{\circ}\mathrm{C}$ & $21^\circ\mathrm{C}$ & A + clear day with low wind and no adverse current advisories. \\ + Tuesday & $11^{\circ}\mathrm{C}$ & $17^\circ\mathrm{C}$ & A + trough of low pressure will come from the northwest. \\ + Wednesday & $10^{\circ}\mathrm{C}$ & + $21^\circ\mathrm{C}$ & Rain will spread to all parts during the + morning. \\ + \bottomrule + \end{tabularx} + \caption{A weather forecast} + \label{tab:weather} +\end{table} + +The logo of the Masaryk University is shown in Figure +\ref{fig:mulogo1} and Figure \ref{fig:mulogo2} at pages +\pageref{fig:mulogo1} and \pageref{fig:mulogo2}. The weather +forecast is shown in Table \ref{tab:weather} at page +\pageref{tab:weather}. The following chapter is Chapter +\ref{chap:matheq} and starts at page \pageref{chap:matheq}. +Items \ref{item:star1}, \ref{item:star2}, and +\ref{item:star3} are starred in the following list: +\begin{compactenum} + \item some text + \item some other text + \item $\star$ \label{item:star1} + \begin{compactenum} + \item some text + \item $\star$ \label{item:star2} + \item some other text + \begin{compactenum} + \item some text + \item some other text + \item yet another piece of text + \item $\star$ \label{item:star3} + \end{compactenum} + \item yet another piece of text + \end{compactenum} + \item yet another piece of text +\end{compactenum} +If your reference points to a place that has not yet been typeset, +the \verb"\ref" command will expand to \textbf{??} during the first +run of +\texttt{pdflatex \jobname.tex} +and a second run is going to be needed for the references to +resolve. With online services -- such as Overleaf -- this is +performed automatically. + +\chapter{Mathematical equations} +\label{chap:matheq} +\TeX{} comes pre-packed with the ability to typeset inline +equations, such as $\mathrm{e}^{ix}=\cos x+i\sin x$, and display +equations, such as \[ + \mathbf{A}^{-1} = \begin{bmatrix} + a & b \\ c & d \\ + \end{bmatrix}^{-1} = + \frac{1}{\det(\mathbf{A})} \begin{bmatrix} + \,\,\,d & \!\!-b \\ -c & \,a \\ + \end{bmatrix} = + \frac{1}{ad - bc} \begin{bmatrix} + \,\,\,d & \!\!-b \\ -c & \,a \\ + \end{bmatrix}. +\] \LaTeX{} defines the automatically numbered \texttt{equation} +environment: +\begin{equation} + \gamma Px = PAx = PAP^{-1}Px. +\end{equation} +The package \textsf{amsmath} provides several additional +environments that can be used to typeset complex equations: +\begin{enumerate} + \item An equation can be spread over multiple lines using the + \texttt{multline} environment: + \begin{multline} + a + b + c + d + e + f + b + c + d + e + f + b + c + d + e + +f \\ + + f + g + h + i + j + k + l + m + n + o + p + q + \end{multline} + + \item Several aligned equations can be typeset using the + \texttt{align} environment: + \begin{align} + a + b &= c + d \\ + u &= v + w + x \\[1ex] + i + j + k + l &= m + \end{align} + + \item The \texttt{alignat} environment is similar to + \texttt{align}, but it doesn't insert horizontal spaces between + the individual columns: + \begin{alignat}{2} + a + b + c &+ d & &= 0 \\ + e &+ f + g & &= 5 + \end{alignat} + + \item Much like chapter, sections, tables, figures, or list + items, equations -- such as \eqref{eq:first} and + \eqref{eq:mine} -- can also be labeled and referenced: + \begin{alignat}{4} + b_{11}x_1 &+ b_{12}x_2 & &+ b_{13}x_3 & & & + &= y_1, \label{eq:first} \\ + b_{21}x_1 &+ b_{22}x_2 & & & &+ b_{24}x_4 & + &= y_2. \tag{My equation} \label{eq:mine} + \end{alignat} + + \item The \texttt{gather} environment makes it possible to + typeset several equations without any alignment: + \begin{gather} + \psi = \psi\psi, \\ + \eta = \eta\eta\eta\eta\eta\eta, \\ + \theta = \theta. + \end{gather} + + \item Several cases can be typeset using the \texttt{cases} + environment: + \begin{equation} + |y| = \begin{cases} + \phantom-y & \text{if }z\geq0, \\ + -y & \text{otherwise}. + \end{cases} + \end{equation} +\end{enumerate} +For the complete list of environments and commands, consult the +\textsf{amsmath} package manual\footnote{ + See \url{http://mirrors.ctan.org/macros/latex/required/amslatex/math/amsldoc.pdf}. + The \texttt{\textbackslash url} command is provided by the + package \textsf{url}. +}. + +\chapter{\textnormal{We \textsf{have} \texttt{several} \textsc{fonts} + \textit{at} \textbf{disposal}}} +The serified roman font is used for the main body of the text. +\textit{Italics are typically used to denote emphasis or +quotations.} \texttt{The teletype font is typically used for source +code listings.} The \textbf{bold}, \textsc{small-caps} and +\textsf{sans-serif} variants of the base roman font can be used to +denote specific types of information. + +\tiny We \scriptsize can \footnotesize also \small change \normalsize +the \large font \Large size, \LARGE although \huge it \Huge +is \huge usually \LARGE not \Large necessary.\normalsize + +A wide variety of mathematical fonts is also available, such as: \[ + \mathrm{ABC}, \mathcal{ABC}, \mathbf{ABC}, \mathsf{ABC}, + \mathit{ABC}, \mathtt{ABC} +\] By loading the \textsf{amsfonts} packages, several additional +fonts will become available: \[ + \mathfrak{ABC}, \mathbb{ABC} +\] Many other mathematical fonts are available\footnote{ + See \url{http://tex.stackexchange.com/a/58124/70941}. +}. + +\chapter{Using lightweight markup} +\shorthandoff{-} +\begin{markdown*}{% + hybrid, + definitionLists, + footnotes, + inlineFootnotes, + hashEnumerators, + fencedCode, + citations, + citationNbsps, +} + +If you decide that \LaTeX{} is too wordy for some parts of your +document, there are [packages](https://www.ctan.org/pkg/markdown +"Markdown") that allow you to use more lightweight markup next +to it. + + ![logo](fithesis/logo/mu/fithesis-base.pdf "The logo of the + Masaryk University") + +This is a bullet list. Unlike numbered lists, bulleted lists +contain an **unordered** set of bullet points. When a bullet point +contains multiple paragraphs, the list is typeset as follows: + + * The first item of a bullet list + + that spans several paragraphs, + * the second item of a bullet list, + * the third item of a bullet list. + +When none of the bullet points contains multiple paragraphs, the +list has a more compact form: + + * The first item of a bullet list, + * the second item of a bullet list, + * the third item of a bullet list. + +Unlike a bulleted list, a numbered list implies chronology or +ordering of the bullet points. When a bullet point +contains multiple paragraphs, the list is typeset as follows: + + 1. The first item of an ordered list + + that spans several paragraphs, + 2. the second item of an ordered list, + 3. the third item of an ordered list. + #. If you are feeling lazy, + #. you can use hash enumerators as well. + +When none of the bullet points contains multiple paragraphs, the +list has a more compact form: + + 6. The first item of an ordered list, + 7. the second item of an ordered list, + 8. the third item of an ordered list. + +Definition lists are used to provide definitions of terms. When +a definition contains multiple paragraphs, the list is typeset +as follows: + +Term 1 + +: Definition 1 + +*Term 2* + +: Definition 2 + + Some code, part of Definition 2 + + Third paragraph of Definition 2. + +When none of the bullet points contains multiple paragraphs, the +list has a more compact form: + +Term 1 +: Definition 1 +*Term 2* +: Definition 2 + +Block quotations are used to include an excerpt from an external +document in way that visually clearly separates the excerpt from +the rest of the work: + +> This is the first level of quoting. +> +> > This is nested blockquote. +> +> Back to the first level. + +Footnotes are used to include additional information to the +document that are not necessary for the understanding of the main +text. Here is a footnote reference^[Here is the footnote.] and +another.[^longnote] + +[^longnote]: Here's one with multiple blocks. + + Subsequent paragraphs are indented to show that they +belong to the previous footnote. + + Some code + + The whole paragraph can be indented, or just the first + line. In this way, multi-paragraph footnotes work like + multi-paragraph list items. + +Citations are used to provide bibliographical references to other +documents. This is a regular citation~[@borgman03, p. 123]. This is +an in-text citation: @borgman03\. You can also cite several authors +at once using both regular~[see @borgman03, p. 123; @greenberg98, +sec. 3.2; and @thanh01] and in-text citations: @borgman03 [p.123; +@greenberg98, sec. 3.2; @thanh01]. + +Code blocks are used to include source code listings into the +document: + + #include + #include + #include + #include + // This is a comment + int main(int argc, char **argv) + { + while (--c > 1 && !fork()); + sleep(c = atoi(v[c])); + printf("%d\n", c); + wait(0); + return 0; + } + +There is an alternative syntax for code blocks that allows you to +specify additional information, such as the language of the source +code. This information can be used for syntax highlighting: + +``` sh +#!/bin/sh +fac() { + if [ "$1" -leq 1 ]; then + echo 1 + else + echo $(("$1" * fac $(("$1" - 1)))) + fi +} +`````````````` + +~~~~~~ Ruby +# Here's a way to empty an array. +joe = [ 'eggs.', 'some', 'break', 'to', 'Have' ] +print(joe.pop, " ") while joe.size > 0 +print "\n" +~~~~~~ + +\end{markdown*} +\shorthandon{-} + +\chapter{Inserting the bibliography} +After linking a bibliography data\-base files to the document using +the \verb"\"\texttt{thesis\discretionary{-}{}{}setup\{bib\discretionary{=}{=}{=}% +\{\textit{file1},\textit{file2},\,\ldots\,\}\}} command, you can +start citing the entries. This is just dummy text +\parencite{borgman03} lightly sprinkled with citations +\parencite[p.~123]{greenberg98}. Several sources can be cited at +once: \cite{borgman03,greenberg98,thanh01}. +\citetitle{greenberg98} was written by \citeauthor{greenberg98} in +\citeyear{greenberg98}. We can also produce \textcite{greenberg98}% +. The full bibliographic citation is: +\emph{\fullcite{greenberg98}}. We can easily insert a bibliographic +citation into the footnote\footfullcite{greenberg98}. + +The \verb"\nocite" command will not generate any +output\nocite{muni}, but it will insert its arguments into +the bibliography. The \verb"\nocite{*}" command will insert all the +records in the bibliography database file into the bibliography. +Try uncommenting the command +%% \nocite{*} +and watch the bibliography section come apart at the seams. + +When typesetting the document for the first time, citing a +\texttt{work} will expand to [\textbf{work}] and the +\verb"\printbibliography" command will produce no output. It is now +necessary to generate the bibliography by running \texttt{biber +\jobname.bcf} from the command line and then by typesetting the +document again twice. During the first run, the bibliography +section and the citations will be typeset, and in the second run, +the bibliography section will appear in the table of contents. + +The \texttt{biber} command needs to be executed from within the +directory, where the \LaTeX\ source file is located. In Windows, +the command line can be opened in a directory by holding down the +\textsf{Shift} key and by clicking the right mouse button while +hovering the cursor over a directory. Select the \textsf{Open +Command Window Here} option in the context menu that opens shortly +afterwards. + +With online services -- such as Overleaf -- or when using an +automatic tool -- such as \LaTeX MK -- all commands are executed +automatically. When you omit the \verb"\printbibliography" command, +its location will be decided by the template. + + \printbibliography[heading=bibintoc] %% Print the bibliography. + +\chapter{Inserting the index} +After using the \verb"\makeindex" macro and loading the +\texttt{makeidx} package that provides additional indexing +commands, index entries can be created by issuing the \verb"\index" +command. \index{dummy text|(}It is possible to create ranged index +entries, which will encompass a span of text.\index{dummy text|)} +To insert complex typographic material -- such as $\alpha$ +\index{alpha@$\alpha$} or \TeX{} \index{TeX@\TeX} -- +into the index, you need to specify a text string, which will +determine how the entry will be sorted. It is also possible to +create hierarchal entries. \index{vehicles!trucks} +\index{vehicles!speed cars} + +After typesetting the document, it is necessary to generate the +index by running +\begin{center}% + \texttt{texindy -I latex -C utf8 -L }$\langle$\textit{locale}% + $\rangle$\texttt{ \jobname.idx} +\end{center} +from the command line, where $\langle$\textit{locale}$\rangle$ +corresponds to the main locale of your thesis -- such as +\texttt{english}, and then typesetting the document again. + +The \texttt{texindy} command needs to be executed from within the +directory, where the \LaTeX\ source file is located. In Windows, +the command line can be opened in a directory by holding down the +\textsf{Shift} key and by clicking the right mouse button while +hovering the cursor over a directory. Select the \textsf{Open Command +Window Here} option in the context menu that opens shortly +afterwards. + +With online services -- such as Overleaf -- the commands are +executed automatically, although the locale may be erroneously +detected, or the \texttt{makeindex} tool (which is only able to +sort entries that contain digits and letters of the English +alphabet) may be used instead of \texttt{texindy}. In either case, +the index will be ill-sorted. + + \makeatletter\thesis@blocks@clear\makeatother + \phantomsection %% Print the index and insert it into the + \addcontentsline{toc}{chapter}{\indexname} %% table of contents. + \printindex + +\appendix %% Start the appendices. +\chapter{An appendix} +Here you can insert the appendices of your thesis. + +\end{document} diff --git a/macros/latex/contrib/fithesis/example/mu/ped-lualatex.pdf b/macros/latex/contrib/fithesis/example/mu/ped-lualatex.pdf new file mode 100644 index 0000000000..d9ea42f658 Binary files /dev/null and b/macros/latex/contrib/fithesis/example/mu/ped-lualatex.pdf differ diff --git a/macros/latex/contrib/fithesis/example/mu/ped-lualatex.tex b/macros/latex/contrib/fithesis/example/mu/ped-lualatex.tex new file mode 100644 index 0000000000..d00cf73bf5 --- /dev/null +++ b/macros/latex/contrib/fithesis/example/mu/ped-lualatex.tex @@ -0,0 +1,662 @@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% I, the copyright holder of this work, release this work into the +%% public domain. This applies worldwide. In some countries this may +%% not be legally possible; if so: I grant anyone the right to use +%% this work for any purpose, without any conditions, unless such +%% conditions are required by law. +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\documentclass[ + digital, %% This option enables the default options for the + %% digital version of a document. Replace with `printed` + %% to enable the default options for the printed version + %% of a document. + twoside, %% This option enables double-sided typesetting. Use at + %% least 120 g/m² paper to prevent show-through. Replace + %% with `oneside` to use one-sided typesetting; use only + %% if you don’t have access to a double-sided printer, + %% or if one-sided typesetting is a formal requirement + %% at your faculty. + table, %% This option causes the coloring of tables. Replace + %% with `notable` to restore plain LaTeX tables. + lof, %% This option prints the List of Figures. Replace with + %% `nolof` to hide the List of Figures. + lot, %% This option prints the List of Tables. Replace with + %% `nolot` to hide the List of Tables. + %% More options are listed in the user guide at + %% . +]{fithesis3} +%% The following section sets up the locales used in the thesis. +\usepackage{polyglossia} %% By using `czech` or `slovak` as the +\setmainlanguage{english} %% main locale instead of `english`, you +%% can typeset the thesis in either Czech or Slovak, respectively. +\setotherlanguages{german, russian, czech, slovak} %% The +%% +%% \begin{otherlanguage}{german} ... \end{otherlanguage} +%% \begin{otherlanguage}{russian} ... \end{otherlanguage} +%% \begin{otherlanguage}{czech} ... \end{otherlanguage} +%% \begin{otherlanguage}{slovak} ... \end{otherlanguage} +%% +%% For non-Latin scripts, it may be necessary to load additional +%% fonts: +\newfontfamily\russianfont[Script=Cyrillic,Ligatures=TeX]{PT Serif} +%% +%% The following section sets up the metadata of the thesis. +\thesissetup{ + date = \the\year/\the\month/\the\day, + university = mu, + faculty = ped, + type = bc, + department = Department of Primary Pedagogy, + author = Jane Doe, + gender = f, + advisor = John Smith, + title = The Challenges of Teaching LaTeX + to Preschool Children, + TeXtitle = The Challenges of Teaching \LaTeX\ + to Preschool Children, + keywords = {keyword1, keyword2, ...}, + TeXkeywords = {keyword1, keyword2, \ldots}, + abstract = {This is the abstract of my thesis, which can + + span multiple paragraphs.}, + thanks = {These are the acknowledgements for my thesis, which can + + span multiple paragraphs.}, + bib = example.bib, + %% The following keys are only useful, when you're using a + %% locale other than English. You can safely omit them in an + %% English thesis. + keywordsEn = {keyword1, keyword2, ...}, + TeXkeywordsEn = {keyword1, keyword2, \ldots}, + abstractEn = {This is the English abstract of my thesis, which can + + span multiple paragraphs.}, +} +\usepackage{makeidx} %% The `makeidx` package contains +\makeindex %% helper commands for index typesetting. +%% These additional packages are used within the document: +\usepackage{paralist} %% Compact list environments +\usepackage{amsmath} %% Mathematics +\usepackage{amsthm} +\usepackage{amsfonts} +\usepackage{url} %% Hyperlinks +\usepackage{markdown} %% Lightweight markup +\usepackage{listings} %% Source code highlighting +\lstset{ + basicstyle = \ttfamily,% + identifierstyle = \color{black},% + keywordstyle = \color{blue},% + keywordstyle = {[2]\color{cyan}},% + keywordstyle = {[3]\color{olive}},% + stringstyle = \color{teal},% + commentstyle = \itshape\color{magenta}} +\usepackage{floatrow} %% Putting captions above tables +\floatsetup[table]{capposition=top} +\begin{document} +\chapter*{Introduction} +\addcontentsline{toc}{chapter}{Introduction} + +Theses are rumoured to be the capstones of education, so I decided +to write one of my own. If all goes well, I will soon have a +diploma under my belt. Wish me luck! + +\begin{otherlanguage}{czech} +Říká se, že závěrečné práce jsou vyvrcholením studia a tak jsem se +rozhodl jednu také napsat. Pokud vše půjde podle plánu, odnesu si +na konci semestru diplom. Držte mi palce! +\end{otherlanguage} + +\begin{otherlanguage}{slovak} +Hovorí sa, že záverečné práce sú vyvrcholením štúdia a tak som sa +rozhodol jednu tiež napísať. Ak všetko pôjde podľa plánu, odnesiem +si na konci semestra diplom. Držte mi palce! +\end{otherlanguage} + +\begin{otherlanguage}{german} +Man munkelt, dass die Dissertation die Krönung der Ausbildung ist. +Deshalb habe ich mich beschlossen meine eigene zu schreiben. Wenn +alles gut geht, bekomme ich bald ein Diplom. Wünsch mir Glück! +\end{otherlanguage} + +\begin{otherlanguage}{russian} +Говорят, что тезис -- это кульминация обучения. Поэтому я и решил +написать собственный тезис. Если всё сработает по плану, я скоро +получу диплом. Желайте мне удачи! +\end{otherlanguage} + +\chapter{These are} +\section{the available} +\subsection{sectioning} +\subsubsection{commands.} +\paragraph{Paragraphs and} +\subparagraph{subparagraphs are available as well.} +Inside the text, you can also use unnumbered lists, +\begin{itemize} + \item such as + \item this one + \begin{itemize} + \item and they can be nested as well. + \item[>>] You can even turn the bullets into something fancier, + \item[\S] if you so desire. + \end{itemize} +\end{itemize} +Numbered lists are +\begin{enumerate} + \item very + \begin{enumerate} + \item similar + \end{enumerate} +\end{enumerate} +and so are description lists: +\begin{description} + \item[Description list] + A list of terms with a description of each term +\end{description} +The spacing of these lists is geared towards paragraphs of text. +For lists of words and phrases, the \textsf{paralist} package +offers commands +\begin{compactitem} + \item that + \begin{compactitem} + \item are + \begin{compactitem} + \item better + \begin{compactitem} + \item suited + \end{compactitem} + \end{compactitem} + \end{compactitem} +\end{compactitem} +\begin{compactenum} + \item to + \begin{compactenum} + \item this + \begin{compactenum} + \item kind of + \begin{compactenum} + \item content. + \end{compactenum} + \end{compactenum} + \end{compactenum} +\end{compactenum} +The \textsf{amsthm} package provides the commands necessary for the +typesetting of mathematical definitions, theorems, lemmas and +proofs. + +%% We will define several mathematical sectioning commands. +\newtheorem{theorem}{Theorem}[section] %% The numbering of theorems + %% will be reset after each section. +\newtheorem{lemma}[theorem]{Lemma} %% The numbering of lemmas +\newtheorem{corollary}[theorem]{Corollary} %% and corollaries will + %% share the counter with theorems. +\theoremstyle{definition} +\newtheorem{definition}{Definition} +\theoremstyle{remark} +\newtheorem*{remark}{Remark} + +\begin{theorem} + This is a theorem that offers a profound insight into the + mathematical sectioning commands. +\end{theorem} +\begin{theorem}[Another theorem] + This is another theorem. Unlike the first one, this theorem has + been endowed with a name. +\end{theorem} +\begin{lemma} + Let us suppose that $x^2+y^2=z^2$. Then + \begin{equation} + \biggl\langle u\biggm|\sum_{i=1}^nF(e_i,v)e_i\biggr\rangle + =F\biggl(\sum_{i=1}^n\langle e_i|u\rangle e_i,v\biggr). + \end{equation} +\end{lemma} +\begin{proof} + $\nabla^2 f(x,y)=\frac{\partial^2f}{\partial x^2}+ + \frac{\partial^2f}{\partial y^2}$. +\end{proof} +\begin{corollary} + This is a corollary. +\end{corollary} +\begin{remark} + This is a remark. +\end{remark} + +\chapter{Floats and references} +\begin{figure} + \begin{center} + %% PNG and JPG images can be inserted into the document as well, + %% but their resolution needs to be adequate. The minimum is + %% about 100 pixels per 1 centimeter or 300 pixels per 1 inch. + %% That means that a JPG or PNG image typeset at 4 × 4 cm should + %% be 400 × 400 px large at the bare minimum. + %% + %% The optimum is about 250 pixels per 1 centimeter or 600 + %% pixels per 1 inch. That means that a JPG or PNG image typeset + %% at 4 × 4 cm should be 1000 × 1000 px large or larger. + \includegraphics[width=4cm]{fithesis/logo/mu/fithesis-base.pdf} + \end{center} + \caption{The logo of the Masaryk University at 40\,mm} + \label{fig:mulogo1} +\end{figure} + +\begin{figure} + \begin{center} + \begin{minipage}{.66\textwidth} + \includegraphics[width=\textwidth]{fithesis/logo/mu/fithesis-base.pdf} + \end{minipage} + \begin{minipage}{.33\textwidth} + \includegraphics[width=\textwidth]{fithesis/logo/mu/fithesis-base.pdf} \\ + \includegraphics[width=\textwidth]{fithesis/logo/mu/fithesis-base.pdf} + \end{minipage} + \end{center} + \caption{The logo of the Masaryk University at $\frac23$ and + $\frac13$ of text width} + \label{fig:mulogo2} +\end{figure} + +\begin{table} + \begin{tabularx}{\textwidth}{lllX} + \toprule + Day & Min Temp & Max Temp & Summary \\ + \midrule + Monday & $13^{\circ}\mathrm{C}$ & $21^\circ\mathrm{C}$ & A + clear day with low wind and no adverse current advisories. \\ + Tuesday & $11^{\circ}\mathrm{C}$ & $17^\circ\mathrm{C}$ & A + trough of low pressure will come from the northwest. \\ + Wednesday & $10^{\circ}\mathrm{C}$ & + $21^\circ\mathrm{C}$ & Rain will spread to all parts during the + morning. \\ + \bottomrule + \end{tabularx} + \caption{A weather forecast} + \label{tab:weather} +\end{table} + +The logo of the Masaryk University is shown in Figure +\ref{fig:mulogo1} and Figure \ref{fig:mulogo2} at pages +\pageref{fig:mulogo1} and \pageref{fig:mulogo2}. The weather +forecast is shown in Table \ref{tab:weather} at page +\pageref{tab:weather}. The following chapter is Chapter +\ref{chap:matheq} and starts at page \pageref{chap:matheq}. +Items \ref{item:star1}, \ref{item:star2}, and +\ref{item:star3} are starred in the following list: +\begin{compactenum} + \item some text + \item some other text + \item $\star$ \label{item:star1} + \begin{compactenum} + \item some text + \item $\star$ \label{item:star2} + \item some other text + \begin{compactenum} + \item some text + \item some other text + \item yet another piece of text + \item $\star$ \label{item:star3} + \end{compactenum} + \item yet another piece of text + \end{compactenum} + \item yet another piece of text +\end{compactenum} +If your reference points to a place that has not yet been typeset, +the \verb"\ref" command will expand to \textbf{??} during the first +run of +\texttt{lualatex \jobname.tex} +and a second run is going to be needed for the references to +resolve. With online services -- such as Overleaf -- this is +performed automatically. + +\chapter{Mathematical equations} +\label{chap:matheq} +\TeX{} comes pre-packed with the ability to typeset inline +equations, such as $\mathrm{e}^{ix}=\cos x+i\sin x$, and display +equations, such as \[ + \mathbf{A}^{-1} = \begin{bmatrix} + a & b \\ c & d \\ + \end{bmatrix}^{-1} = + \frac{1}{\det(\mathbf{A})} \begin{bmatrix} + \,\,\,d & \!\!-b \\ -c & \,a \\ + \end{bmatrix} = + \frac{1}{ad - bc} \begin{bmatrix} + \,\,\,d & \!\!-b \\ -c & \,a \\ + \end{bmatrix}. +\] \LaTeX{} defines the automatically numbered \texttt{equation} +environment: +\begin{equation} + \gamma Px = PAx = PAP^{-1}Px. +\end{equation} +The package \textsf{amsmath} provides several additional +environments that can be used to typeset complex equations: +\begin{enumerate} + \item An equation can be spread over multiple lines using the + \texttt{multline} environment: + \begin{multline} + a + b + c + d + e + f + b + c + d + e + f + b + c + d + e + +f \\ + + f + g + h + i + j + k + l + m + n + o + p + q + \end{multline} + + \item Several aligned equations can be typeset using the + \texttt{align} environment: + \begin{align} + a + b &= c + d \\ + u &= v + w + x \\[1ex] + i + j + k + l &= m + \end{align} + + \item The \texttt{alignat} environment is similar to + \texttt{align}, but it doesn't insert horizontal spaces between + the individual columns: + \begin{alignat}{2} + a + b + c &+ d & &= 0 \\ + e &+ f + g & &= 5 + \end{alignat} + + \item Much like chapter, sections, tables, figures, or list + items, equations -- such as \eqref{eq:first} and + \eqref{eq:mine} -- can also be labeled and referenced: + \begin{alignat}{4} + b_{11}x_1 &+ b_{12}x_2 & &+ b_{13}x_3 & & & + &= y_1, \label{eq:first} \\ + b_{21}x_1 &+ b_{22}x_2 & & & &+ b_{24}x_4 & + &= y_2. \tag{My equation} \label{eq:mine} + \end{alignat} + + \item The \texttt{gather} environment makes it possible to + typeset several equations without any alignment: + \begin{gather} + \psi = \psi\psi, \\ + \eta = \eta\eta\eta\eta\eta\eta, \\ + \theta = \theta. + \end{gather} + + \item Several cases can be typeset using the \texttt{cases} + environment: + \begin{equation} + |y| = \begin{cases} + \phantom-y & \text{if }z\geq0, \\ + -y & \text{otherwise}. + \end{cases} + \end{equation} +\end{enumerate} +For the complete list of environments and commands, consult the +\textsf{amsmath} package manual\footnote{ + See \url{http://mirrors.ctan.org/macros/latex/required/amslatex/math/amsldoc.pdf}. + The \texttt{\textbackslash url} command is provided by the + package \textsf{url}. +}. + +\chapter{\textnormal{We \textsf{have} \texttt{several} \textsc{fonts} + \textit{at} \textbf{disposal}}} +The serified roman font is used for the main body of the text. +\textit{Italics are typically used to denote emphasis or +quotations.} \texttt{The teletype font is typically used for source +code listings.} The \textbf{bold}, \textsc{small-caps} and +\textsf{sans-serif} variants of the base roman font can be used to +denote specific types of information. + +\tiny We \scriptsize can \footnotesize also \small change \normalsize +the \large font \Large size, \LARGE although \huge it \Huge +is \huge usually \LARGE not \Large necessary.\normalsize + +A wide variety of mathematical fonts is also available, such as: \[ + \mathrm{ABC}, \mathcal{ABC}, \mathbf{ABC}, \mathsf{ABC}, + \mathit{ABC}, \mathtt{ABC} +\] By loading the \textsf{amsfonts} packages, several additional +fonts will become available: \[ + \mathfrak{ABC}, \mathbb{ABC} +\] Many other mathematical fonts are available\footnote{ + See \url{http://tex.stackexchange.com/a/58124/70941}. +}. + +\chapter{Using lightweight markup} +\begin{markdown*}{% + hybrid, + definitionLists, + footnotes, + inlineFootnotes, + hashEnumerators, + fencedCode, + citations, + citationNbsps, +} + +If you decide that \LaTeX{} is too wordy for some parts of your +document, there are [packages](https://www.ctan.org/pkg/markdown +"Markdown") that allow you to use more lightweight markup next +to it. + + ![logo](fithesis/logo/mu/fithesis-base.pdf "The logo of the + Masaryk University") + +This is a bullet list. Unlike numbered lists, bulleted lists +contain an **unordered** set of bullet points. When a bullet point +contains multiple paragraphs, the list is typeset as follows: + + * The first item of a bullet list + + that spans several paragraphs, + * the second item of a bullet list, + * the third item of a bullet list. + +When none of the bullet points contains multiple paragraphs, the +list has a more compact form: + + * The first item of a bullet list, + * the second item of a bullet list, + * the third item of a bullet list. + +Unlike a bulleted list, a numbered list implies chronology or +ordering of the bullet points. When a bullet point +contains multiple paragraphs, the list is typeset as follows: + + 1. The first item of an ordered list + + that spans several paragraphs, + 2. the second item of an ordered list, + 3. the third item of an ordered list. + #. If you are feeling lazy, + #. you can use hash enumerators as well. + +When none of the bullet points contains multiple paragraphs, the +list has a more compact form: + + 6. The first item of an ordered list, + 7. the second item of an ordered list, + 8. the third item of an ordered list. + +Definition lists are used to provide definitions of terms. When +a definition contains multiple paragraphs, the list is typeset +as follows: + +Term 1 + +: Definition 1 + +*Term 2* + +: Definition 2 + + Some code, part of Definition 2 + + Third paragraph of Definition 2. + +When none of the bullet points contains multiple paragraphs, the +list has a more compact form: + +Term 1 +: Definition 1 +*Term 2* +: Definition 2 + +Block quotations are used to include an excerpt from an external +document in way that visually clearly separates the excerpt from +the rest of the work: + +> This is the first level of quoting. +> +> > This is nested blockquote. +> +> Back to the first level. + +Footnotes are used to include additional information to the +document that are not necessary for the understanding of the main +text. Here is a footnote reference^[Here is the footnote.] and +another.[^longnote] + +[^longnote]: Here's one with multiple blocks. + + Subsequent paragraphs are indented to show that they +belong to the previous footnote. + + Some code + + The whole paragraph can be indented, or just the first + line. In this way, multi-paragraph footnotes work like + multi-paragraph list items. + +Citations are used to provide bibliographical references to other +documents. This is a regular citation~[@borgman03, p. 123]. This is +an in-text citation: @borgman03\. You can also cite several authors +at once using both regular~[see @borgman03, p. 123; @greenberg98, +sec. 3.2; and @thanh01] and in-text citations: @borgman03 [p.123; +@greenberg98, sec. 3.2; @thanh01]. + +Code blocks are used to include source code listings into the +document: + + #include + #include + #include + #include + // This is a comment + int main(int argc, char **argv) + { + while (--c > 1 && !fork()); + sleep(c = atoi(v[c])); + printf("%d\n", c); + wait(0); + return 0; + } + +There is an alternative syntax for code blocks that allows you to +specify additional information, such as the language of the source +code. This information can be used for syntax highlighting: + +``` sh +#!/bin/sh +fac() { + if [ "$1" -leq 1 ]; then + echo 1 + else + echo $(("$1" * fac $(("$1" - 1)))) + fi +} +`````````````` + +~~~~~~ Ruby +# Here's a way to empty an array. +joe = [ 'eggs.', 'some', 'break', 'to', 'Have' ] +print(joe.pop, " ") while joe.size > 0 +print "\n" +~~~~~~ + +\end{markdown*} + +\chapter{Inserting the bibliography} +After linking a bibliography data\-base files to the document using +the \verb"\"\texttt{thesis\discretionary{-}{}{}setup\{bib\discretionary{=}{=}{=}% +\{\textit{file1},\textit{file2},\,\ldots\,\}\}} command, you can +start citing the entries. This is just dummy text +\parencite{borgman03} lightly sprinkled with citations +\parencite[p.~123]{greenberg98}. Several sources can be cited at +once: \cite{borgman03,greenberg98,thanh01}. +\citetitle{greenberg98} was written by \citeauthor{greenberg98} in +\citeyear{greenberg98}. We can also produce \textcite{greenberg98}% +\ or %% Let us define a compound command: +\def\citeauthoryear#1{(\textcite{#1},~\citeyear{#1})}% +\citeauthoryear{greenberg98}% +. The full bibliographic citation is: +\emph{\fullcite{greenberg98}}. We can easily insert a bibliographic +citation into the footnote\footfullcite{greenberg98}. + +The \verb"\nocite" command will not generate any +output\nocite{muni}, but it will insert its arguments into +the bibliography. The \verb"\nocite{*}" command will insert all the +records in the bibliography database file into the bibliography. +Try uncommenting the command +%% \nocite{*} +and watch the bibliography section come apart at the seams. + +When typesetting the document for the first time, citing a +\texttt{work} will expand to [\textbf{work}] and the +\verb"\printbibliography" command will produce no output. It is now +necessary to generate the bibliography by running \texttt{biber +\jobname.bcf} from the command line and then by typesetting the +document again twice. During the first run, the bibliography +section and the citations will be typeset, and in the second run, +the bibliography section will appear in the table of contents. + +The \texttt{biber} command needs to be executed from within the +directory, where the \LaTeX\ source file is located. In Windows, +the command line can be opened in a directory by holding down the +\textsf{Shift} key and by clicking the right mouse button while +hovering the cursor over a directory. Select the \textsf{Open +Command Window Here} option in the context menu that opens shortly +afterwards. + +With online services -- such as Overleaf -- or when using an +automatic tool -- such as \LaTeX MK -- all commands are executed +automatically. When you omit the \verb"\printbibliography" command, +its location will be decided by the template. + + \printbibliography[heading=bibintoc] %% Print the bibliography. + +\chapter{Inserting the index} +After using the \verb"\makeindex" macro and loading the +\texttt{makeidx} package that provides additional indexing +commands, index entries can be created by issuing the \verb"\index" +command. \index{dummy text|(}It is possible to create ranged index +entries, which will encompass a span of text.\index{dummy text|)} +To insert complex typographic material -- such as $\alpha$ +\index{alpha@$\alpha$} or \TeX{} \index{TeX@\TeX} -- +into the index, you need to specify a text string, which will +determine how the entry will be sorted. It is also possible to +create hierarchal entries. \index{vehicles!trucks} +\index{vehicles!speed cars} + +After typesetting the document, it is necessary to generate the +index by running +\begin{center}% + \texttt{texindy -I latex -C utf8 -L }$\langle$\textit{locale}% + $\rangle$\texttt{ \jobname.idx} +\end{center} +from the command line, where $\langle$\textit{locale}$\rangle$ +corresponds to the main locale of your thesis -- such as +\texttt{english}, and then typesetting the document again. + +The \texttt{texindy} command needs to be executed from within the +directory, where the \LaTeX\ source file is located. In Windows, +the command line can be opened in a directory by holding down the +\textsf{Shift} key and by clicking the right mouse button while +hovering the cursor over a directory. Select the \textsf{Open Command +Window Here} option in the context menu that opens shortly +afterwards. + +With online services -- such as Overleaf -- the commands are +executed automatically, although the locale may be erroneously +detected, or the \texttt{makeindex} tool (which is only able to +sort entries that contain digits and letters of the English +alphabet) may be used instead of \texttt{texindy}. In either case, +the index will be ill-sorted. + + \makeatletter\thesis@blocks@clear\makeatother + \phantomsection %% Print the index and insert it into the + \addcontentsline{toc}{chapter}{\indexname} %% table of contents. + \printindex + +\appendix %% Start the appendices. +\chapter{An appendix} +Here you can insert the appendices of your thesis. + +\end{document} diff --git a/macros/latex/contrib/fithesis/example/mu/ped-pdflatex.pdf b/macros/latex/contrib/fithesis/example/mu/ped-pdflatex.pdf new file mode 100644 index 0000000000..70c2689c1b Binary files /dev/null and b/macros/latex/contrib/fithesis/example/mu/ped-pdflatex.pdf differ diff --git a/macros/latex/contrib/fithesis/example/mu/ped-pdflatex.tex b/macros/latex/contrib/fithesis/example/mu/ped-pdflatex.tex new file mode 100644 index 0000000000..04b0d63297 --- /dev/null +++ b/macros/latex/contrib/fithesis/example/mu/ped-pdflatex.tex @@ -0,0 +1,669 @@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% I, the copyright holder of this work, release this work into the +%% public domain. This applies worldwide. In some countries this may +%% not be legally possible; if so: I grant anyone the right to use +%% this work for any purpose, without any conditions, unless such +%% conditions are required by law. +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\documentclass[ + digital, %% This option enables the default options for the + %% digital version of a document. Replace with `printed` + %% to enable the default options for the printed version + %% of a document. + twoside, %% This option enables double-sided typesetting. Use at + %% least 120 g/m² paper to prevent show-through. Replace + %% with `oneside` to use one-sided typesetting; use only + %% if you don’t have access to a double-sided printer, + %% or if one-sided typesetting is a formal requirement + %% at your faculty. + table, %% This option causes the coloring of tables. Replace + %% with `notable` to restore plain LaTeX tables. + lof, %% This option prints the List of Figures. Replace with + %% `nolof` to hide the List of Figures. + lot, %% This option prints the List of Tables. Replace with + %% `nolot` to hide the List of Tables. + %% More options are listed in the user guide at + %% . +]{fithesis3} +%% The following section sets up the locales used in the thesis. +\usepackage[resetfonts]{cmap} %% We need to load the T2A font encoding +\usepackage[T1,T2A]{fontenc} %% to use the Cyrillic fonts with Russian texts. +\usepackage[ + main=english, %% By using `czech` or `slovak` as the main locale + %% instead of `english`, you can typeset the thesis + %% in either Czech or Slovak, respectively. + english, german, russian, czech, slovak %% The additional keys allow +]{babel} %% foreign texts to be typeset as follows: +%% +%% \begin{otherlanguage}{german} ... \end{otherlanguage} +%% \begin{otherlanguage}{russian} ... \end{otherlanguage} +%% \begin{otherlanguage}{czech} ... \end{otherlanguage} +%% \begin{otherlanguage}{slovak} ... \end{otherlanguage} +%% +%% For non-Latin scripts, it may be necessary to load additional +%% fonts: +\usepackage{paratype} +\def\textrussian#1{{\usefont{T2A}{PTSerif-TLF}{m}{rm}#1}} +%% +%% The following section sets up the metadata of the thesis. +\thesissetup{ + date = \the\year/\the\month/\the\day, + university = mu, + faculty = ped, + type = bc, + department = Department of Primary Pedagogy, + author = Jane Doe, + gender = f, + advisor = John Smith, + title = The Challenges of Teaching LaTeX + to Preschool Children, + TeXtitle = The Challenges of Teaching \LaTeX\ + to Preschool Children, + keywords = {keyword1, keyword2, ...}, + TeXkeywords = {keyword1, keyword2, \ldots}, + abstract = {This is the abstract of my thesis, which can + + span multiple paragraphs.}, + thanks = {These are the acknowledgements for my thesis, which can + + span multiple paragraphs.}, + bib = example.bib, + %% The following keys are only useful, when you're using a + %% locale other than English. You can safely omit them in an + %% English thesis. + keywordsEn = {keyword1, keyword2, ...}, + TeXkeywordsEn = {keyword1, keyword2, \ldots}, + abstractEn = {This is the English abstract of my thesis, which can + + span multiple paragraphs.}, +} +\usepackage{makeidx} %% The `makeidx` package contains +\makeindex %% helper commands for index typesetting. +%% These additional packages are used within the document: +\usepackage{paralist} %% Compact list environments +\usepackage{amsmath} %% Mathematics +\usepackage{amsthm} +\usepackage{amsfonts} +\usepackage{url} %% Hyperlinks +\usepackage{markdown} %% Lightweight markup +\usepackage{listings} %% Source code highlighting +\lstset{ + basicstyle = \ttfamily,% + identifierstyle = \color{black},% + keywordstyle = \color{blue},% + keywordstyle = {[2]\color{cyan}},% + keywordstyle = {[3]\color{olive}},% + stringstyle = \color{teal},% + commentstyle = \itshape\color{magenta}} +\usepackage{floatrow} %% Putting captions above tables +\floatsetup[table]{capposition=top} +\begin{document} +\chapter*{Introduction} +\addcontentsline{toc}{chapter}{Introduction} + +Theses are rumoured to be the capstones of education, so I decided +to write one of my own. If all goes well, I will soon have a +diploma under my belt. Wish me luck! + +\begin{otherlanguage}{czech} +Říká se, že závěrečné práce jsou vyvrcholením studia a tak jsem se +rozhodl jednu také napsat. Pokud vše půjde podle plánu, odnesu si +na konci semestru diplom. Držte mi palce! +\end{otherlanguage} + +\begin{otherlanguage}{slovak} +Hovorí sa, že záverečné práce sú vyvrcholením štúdia a tak som sa +rozhodol jednu tiež napísať. Ak všetko pôjde podľa plánu, odnesiem +si na konci semestra diplom. Držte mi palce! +\end{otherlanguage} + +\begin{otherlanguage}{german} +Man munkelt, dass die Dissertation die Krönung der Ausbildung ist. +Deshalb habe ich mich beschlossen meine eigene zu schreiben. Wenn +alles gut geht, bekomme ich bald ein Diplom. Wünsch mir Glück! +\end{otherlanguage} + +\begin{otherlanguage}{russian}\textrussian{% +Говорят, что тезис -- это кульминация обучения. Поэтому я и решил +написать собственный тезис. Если всё сработает по плану, я скоро +получу диплом. Желайте мне удачи! +}\end{otherlanguage} + +\chapter{These are} +\section{the available} +\subsection{sectioning} +\subsubsection{commands.} +\paragraph{Paragraphs and} +\subparagraph{subparagraphs are available as well.} +Inside the text, you can also use unnumbered lists, +\begin{itemize} + \item such as + \item this one + \begin{itemize} + \item and they can be nested as well. + \item[>>] You can even turn the bullets into something fancier, + \item[\S] if you so desire. + \end{itemize} +\end{itemize} +Numbered lists are +\begin{enumerate} + \item very + \begin{enumerate} + \item similar + \end{enumerate} +\end{enumerate} +and so are description lists: +\begin{description} + \item[Description list] + A list of terms with a description of each term +\end{description} +The spacing of these lists is geared towards paragraphs of text. +For lists of words and phrases, the \textsf{paralist} package +offers commands +\begin{compactitem} + \item that + \begin{compactitem} + \item are + \begin{compactitem} + \item better + \begin{compactitem} + \item suited + \end{compactitem} + \end{compactitem} + \end{compactitem} +\end{compactitem} +\begin{compactenum} + \item to + \begin{compactenum} + \item this + \begin{compactenum} + \item kind of + \begin{compactenum} + \item content. + \end{compactenum} + \end{compactenum} + \end{compactenum} +\end{compactenum} +The \textsf{amsthm} package provides the commands necessary for the +typesetting of mathematical definitions, theorems, lemmas and +proofs. + +%% We will define several mathematical sectioning commands. +\newtheorem{theorem}{Theorem}[section] %% The numbering of theorems + %% will be reset after each section. +\newtheorem{lemma}[theorem]{Lemma} %% The numbering of lemmas +\newtheorem{corollary}[theorem]{Corollary} %% and corollaries will + %% share the counter with theorems. +\theoremstyle{definition} +\newtheorem{definition}{Definition} +\theoremstyle{remark} +\newtheorem*{remark}{Remark} + +\begin{theorem} + This is a theorem that offers a profound insight into the + mathematical sectioning commands. +\end{theorem} +\begin{theorem}[Another theorem] + This is another theorem. Unlike the first one, this theorem has + been endowed with a name. +\end{theorem} +\begin{lemma} + Let us suppose that $x^2+y^2=z^2$. Then + \begin{equation} + \biggl\langle u\biggm|\sum_{i=1}^nF(e_i,v)e_i\biggr\rangle + =F\biggl(\sum_{i=1}^n\langle e_i|u\rangle e_i,v\biggr). + \end{equation} +\end{lemma} +\begin{proof} + $\nabla^2 f(x,y)=\frac{\partial^2f}{\partial x^2}+ + \frac{\partial^2f}{\partial y^2}$. +\end{proof} +\begin{corollary} + This is a corollary. +\end{corollary} +\begin{remark} + This is a remark. +\end{remark} + +\chapter{Floats and references} +\begin{figure} + \begin{center} + %% PNG and JPG images can be inserted into the document as well, + %% but their resolution needs to be adequate. The minimum is + %% about 100 pixels per 1 centimeter or 300 pixels per 1 inch. + %% That means that a JPG or PNG image typeset at 4 × 4 cm should + %% be 400 × 400 px large at the bare minimum. + %% + %% The optimum is about 250 pixels per 1 centimeter or 600 + %% pixels per 1 inch. That means that a JPG or PNG image typeset + %% at 4 × 4 cm should be 1000 × 1000 px large or larger. + \includegraphics[width=4cm]{fithesis/logo/mu/fithesis-base.pdf} + \end{center} + \caption{The logo of the Masaryk University at 40\,mm} + \label{fig:mulogo1} +\end{figure} + +\begin{figure} + \begin{center} + \begin{minipage}{.66\textwidth} + \includegraphics[width=\textwidth]{fithesis/logo/mu/fithesis-base.pdf} + \end{minipage} + \begin{minipage}{.33\textwidth} + \includegraphics[width=\textwidth]{fithesis/logo/mu/fithesis-base.pdf} \\ + \includegraphics[width=\textwidth]{fithesis/logo/mu/fithesis-base.pdf} + \end{minipage} + \end{center} + \caption{The logo of the Masaryk University at $\frac23$ and + $\frac13$ of text width} + \label{fig:mulogo2} +\end{figure} + +\begin{table} + \begin{tabularx}{\textwidth}{lllX} + \toprule + Day & Min Temp & Max Temp & Summary \\ + \midrule + Monday & $13^{\circ}\mathrm{C}$ & $21^\circ\mathrm{C}$ & A + clear day with low wind and no adverse current advisories. \\ + Tuesday & $11^{\circ}\mathrm{C}$ & $17^\circ\mathrm{C}$ & A + trough of low pressure will come from the northwest. \\ + Wednesday & $10^{\circ}\mathrm{C}$ & + $21^\circ\mathrm{C}$ & Rain will spread to all parts during the + morning. \\ + \bottomrule + \end{tabularx} + \caption{A weather forecast} + \label{tab:weather} +\end{table} + +The logo of the Masaryk University is shown in Figure +\ref{fig:mulogo1} and Figure \ref{fig:mulogo2} at pages +\pageref{fig:mulogo1} and \pageref{fig:mulogo2}. The weather +forecast is shown in Table \ref{tab:weather} at page +\pageref{tab:weather}. The following chapter is Chapter +\ref{chap:matheq} and starts at page \pageref{chap:matheq}. +Items \ref{item:star1}, \ref{item:star2}, and +\ref{item:star3} are starred in the following list: +\begin{compactenum} + \item some text + \item some other text + \item $\star$ \label{item:star1} + \begin{compactenum} + \item some text + \item $\star$ \label{item:star2} + \item some other text + \begin{compactenum} + \item some text + \item some other text + \item yet another piece of text + \item $\star$ \label{item:star3} + \end{compactenum} + \item yet another piece of text + \end{compactenum} + \item yet another piece of text +\end{compactenum} +If your reference points to a place that has not yet been typeset, +the \verb"\ref" command will expand to \textbf{??} during the first +run of +\texttt{pdflatex \jobname.tex} +and a second run is going to be needed for the references to +resolve. With online services -- such as Overleaf -- this is +performed automatically. + +\chapter{Mathematical equations} +\label{chap:matheq} +\TeX{} comes pre-packed with the ability to typeset inline +equations, such as $\mathrm{e}^{ix}=\cos x+i\sin x$, and display +equations, such as \[ + \mathbf{A}^{-1} = \begin{bmatrix} + a & b \\ c & d \\ + \end{bmatrix}^{-1} = + \frac{1}{\det(\mathbf{A})} \begin{bmatrix} + \,\,\,d & \!\!-b \\ -c & \,a \\ + \end{bmatrix} = + \frac{1}{ad - bc} \begin{bmatrix} + \,\,\,d & \!\!-b \\ -c & \,a \\ + \end{bmatrix}. +\] \LaTeX{} defines the automatically numbered \texttt{equation} +environment: +\begin{equation} + \gamma Px = PAx = PAP^{-1}Px. +\end{equation} +The package \textsf{amsmath} provides several additional +environments that can be used to typeset complex equations: +\begin{enumerate} + \item An equation can be spread over multiple lines using the + \texttt{multline} environment: + \begin{multline} + a + b + c + d + e + f + b + c + d + e + f + b + c + d + e + +f \\ + + f + g + h + i + j + k + l + m + n + o + p + q + \end{multline} + + \item Several aligned equations can be typeset using the + \texttt{align} environment: + \begin{align} + a + b &= c + d \\ + u &= v + w + x \\[1ex] + i + j + k + l &= m + \end{align} + + \item The \texttt{alignat} environment is similar to + \texttt{align}, but it doesn't insert horizontal spaces between + the individual columns: + \begin{alignat}{2} + a + b + c &+ d & &= 0 \\ + e &+ f + g & &= 5 + \end{alignat} + + \item Much like chapter, sections, tables, figures, or list + items, equations -- such as \eqref{eq:first} and + \eqref{eq:mine} -- can also be labeled and referenced: + \begin{alignat}{4} + b_{11}x_1 &+ b_{12}x_2 & &+ b_{13}x_3 & & & + &= y_1, \label{eq:first} \\ + b_{21}x_1 &+ b_{22}x_2 & & & &+ b_{24}x_4 & + &= y_2. \tag{My equation} \label{eq:mine} + \end{alignat} + + \item The \texttt{gather} environment makes it possible to + typeset several equations without any alignment: + \begin{gather} + \psi = \psi\psi, \\ + \eta = \eta\eta\eta\eta\eta\eta, \\ + \theta = \theta. + \end{gather} + + \item Several cases can be typeset using the \texttt{cases} + environment: + \begin{equation} + |y| = \begin{cases} + \phantom-y & \text{if }z\geq0, \\ + -y & \text{otherwise}. + \end{cases} + \end{equation} +\end{enumerate} +For the complete list of environments and commands, consult the +\textsf{amsmath} package manual\footnote{ + See \url{http://mirrors.ctan.org/macros/latex/required/amslatex/math/amsldoc.pdf}. + The \texttt{\textbackslash url} command is provided by the + package \textsf{url}. +}. + +\chapter{\textnormal{We \textsf{have} \texttt{several} \textsc{fonts} + \textit{at} \textbf{disposal}}} +The serified roman font is used for the main body of the text. +\textit{Italics are typically used to denote emphasis or +quotations.} \texttt{The teletype font is typically used for source +code listings.} The \textbf{bold}, \textsc{small-caps} and +\textsf{sans-serif} variants of the base roman font can be used to +denote specific types of information. + +\tiny We \scriptsize can \footnotesize also \small change \normalsize +the \large font \Large size, \LARGE although \huge it \Huge +is \huge usually \LARGE not \Large necessary.\normalsize + +A wide variety of mathematical fonts is also available, such as: \[ + \mathrm{ABC}, \mathcal{ABC}, \mathbf{ABC}, \mathsf{ABC}, + \mathit{ABC}, \mathtt{ABC} +\] By loading the \textsf{amsfonts} packages, several additional +fonts will become available: \[ + \mathfrak{ABC}, \mathbb{ABC} +\] Many other mathematical fonts are available\footnote{ + See \url{http://tex.stackexchange.com/a/58124/70941}. +}. + +\chapter{Using lightweight markup} +\shorthandoff{-} +\begin{markdown*}{% + hybrid, + definitionLists, + footnotes, + inlineFootnotes, + hashEnumerators, + fencedCode, + citations, + citationNbsps, +} + +If you decide that \LaTeX{} is too wordy for some parts of your +document, there are [packages](https://www.ctan.org/pkg/markdown +"Markdown") that allow you to use more lightweight markup next +to it. + + ![logo](fithesis/logo/mu/fithesis-base.pdf "The logo of the + Masaryk University") + +This is a bullet list. Unlike numbered lists, bulleted lists +contain an **unordered** set of bullet points. When a bullet point +contains multiple paragraphs, the list is typeset as follows: + + * The first item of a bullet list + + that spans several paragraphs, + * the second item of a bullet list, + * the third item of a bullet list. + +When none of the bullet points contains multiple paragraphs, the +list has a more compact form: + + * The first item of a bullet list, + * the second item of a bullet list, + * the third item of a bullet list. + +Unlike a bulleted list, a numbered list implies chronology or +ordering of the bullet points. When a bullet point +contains multiple paragraphs, the list is typeset as follows: + + 1. The first item of an ordered list + + that spans several paragraphs, + 2. the second item of an ordered list, + 3. the third item of an ordered list. + #. If you are feeling lazy, + #. you can use hash enumerators as well. + +When none of the bullet points contains multiple paragraphs, the +list has a more compact form: + + 6. The first item of an ordered list, + 7. the second item of an ordered list, + 8. the third item of an ordered list. + +Definition lists are used to provide definitions of terms. When +a definition contains multiple paragraphs, the list is typeset +as follows: + +Term 1 + +: Definition 1 + +*Term 2* + +: Definition 2 + + Some code, part of Definition 2 + + Third paragraph of Definition 2. + +When none of the bullet points contains multiple paragraphs, the +list has a more compact form: + +Term 1 +: Definition 1 +*Term 2* +: Definition 2 + +Block quotations are used to include an excerpt from an external +document in way that visually clearly separates the excerpt from +the rest of the work: + +> This is the first level of quoting. +> +> > This is nested blockquote. +> +> Back to the first level. + +Footnotes are used to include additional information to the +document that are not necessary for the understanding of the main +text. Here is a footnote reference^[Here is the footnote.] and +another.[^longnote] + +[^longnote]: Here's one with multiple blocks. + + Subsequent paragraphs are indented to show that they +belong to the previous footnote. + + Some code + + The whole paragraph can be indented, or just the first + line. In this way, multi-paragraph footnotes work like + multi-paragraph list items. + +Citations are used to provide bibliographical references to other +documents. This is a regular citation~[@borgman03, p. 123]. This is +an in-text citation: @borgman03\. You can also cite several authors +at once using both regular~[see @borgman03, p. 123; @greenberg98, +sec. 3.2; and @thanh01] and in-text citations: @borgman03 [p.123; +@greenberg98, sec. 3.2; @thanh01]. + +Code blocks are used to include source code listings into the +document: + + #include + #include + #include + #include + // This is a comment + int main(int argc, char **argv) + { + while (--c > 1 && !fork()); + sleep(c = atoi(v[c])); + printf("%d\n", c); + wait(0); + return 0; + } + +There is an alternative syntax for code blocks that allows you to +specify additional information, such as the language of the source +code. This information can be used for syntax highlighting: + +``` sh +#!/bin/sh +fac() { + if [ "$1" -leq 1 ]; then + echo 1 + else + echo $(("$1" * fac $(("$1" - 1)))) + fi +} +`````````````` + +~~~~~~ Ruby +# Here's a way to empty an array. +joe = [ 'eggs.', 'some', 'break', 'to', 'Have' ] +print(joe.pop, " ") while joe.size > 0 +print "\n" +~~~~~~ + +\end{markdown*} +\shorthandon{-} + +\chapter{Inserting the bibliography} +After linking a bibliography data\-base files to the document using +the \verb"\"\texttt{thesis\discretionary{-}{}{}setup\{bib\discretionary{=}{=}{=}% +\{\textit{file1},\textit{file2},\,\ldots\,\}\}} command, you can +start citing the entries. This is just dummy text +\parencite{borgman03} lightly sprinkled with citations +\parencite[p.~123]{greenberg98}. Several sources can be cited at +once: \cite{borgman03,greenberg98,thanh01}. +\citetitle{greenberg98} was written by \citeauthor{greenberg98} in +\citeyear{greenberg98}. We can also produce \textcite{greenberg98}% +\ or %% Let us define a compound command: +\def\citeauthoryear#1{(\textcite{#1},~\citeyear{#1})}% +\citeauthoryear{greenberg98}% +. The full bibliographic citation is: +\emph{\fullcite{greenberg98}}. We can easily insert a bibliographic +citation into the footnote\footfullcite{greenberg98}. + +The \verb"\nocite" command will not generate any +output\nocite{muni}, but it will insert its arguments into +the bibliography. The \verb"\nocite{*}" command will insert all the +records in the bibliography database file into the bibliography. +Try uncommenting the command +%% \nocite{*} +and watch the bibliography section come apart at the seams. + +When typesetting the document for the first time, citing a +\texttt{work} will expand to [\textbf{work}] and the +\verb"\printbibliography" command will produce no output. It is now +necessary to generate the bibliography by running \texttt{biber +\jobname.bcf} from the command line and then by typesetting the +document again twice. During the first run, the bibliography +section and the citations will be typeset, and in the second run, +the bibliography section will appear in the table of contents. + +The \texttt{biber} command needs to be executed from within the +directory, where the \LaTeX\ source file is located. In Windows, +the command line can be opened in a directory by holding down the +\textsf{Shift} key and by clicking the right mouse button while +hovering the cursor over a directory. Select the \textsf{Open +Command Window Here} option in the context menu that opens shortly +afterwards. + +With online services -- such as Overleaf -- or when using an +automatic tool -- such as \LaTeX MK -- all commands are executed +automatically. When you omit the \verb"\printbibliography" command, +its location will be decided by the template. + + \printbibliography[heading=bibintoc] %% Print the bibliography. + +\chapter{Inserting the index} +After using the \verb"\makeindex" macro and loading the +\texttt{makeidx} package that provides additional indexing +commands, index entries can be created by issuing the \verb"\index" +command. \index{dummy text|(}It is possible to create ranged index +entries, which will encompass a span of text.\index{dummy text|)} +To insert complex typographic material -- such as $\alpha$ +\index{alpha@$\alpha$} or \TeX{} \index{TeX@\TeX} -- +into the index, you need to specify a text string, which will +determine how the entry will be sorted. It is also possible to +create hierarchal entries. \index{vehicles!trucks} +\index{vehicles!speed cars} + +After typesetting the document, it is necessary to generate the +index by running +\begin{center}% + \texttt{texindy -I latex -C utf8 -L }$\langle$\textit{locale}% + $\rangle$\texttt{ \jobname.idx} +\end{center} +from the command line, where $\langle$\textit{locale}$\rangle$ +corresponds to the main locale of your thesis -- such as +\texttt{english}, and then typesetting the document again. + +The \texttt{texindy} command needs to be executed from within the +directory, where the \LaTeX\ source file is located. In Windows, +the command line can be opened in a directory by holding down the +\textsf{Shift} key and by clicking the right mouse button while +hovering the cursor over a directory. Select the \textsf{Open Command +Window Here} option in the context menu that opens shortly +afterwards. + +With online services -- such as Overleaf -- the commands are +executed automatically, although the locale may be erroneously +detected, or the \texttt{makeindex} tool (which is only able to +sort entries that contain digits and letters of the English +alphabet) may be used instead of \texttt{texindy}. In either case, +the index will be ill-sorted. + + \makeatletter\thesis@blocks@clear\makeatother + \phantomsection %% Print the index and insert it into the + \addcontentsline{toc}{chapter}{\indexname} %% table of contents. + \printindex + +\appendix %% Start the appendices. +\chapter{An appendix} +Here you can insert the appendices of your thesis. + +\end{document} diff --git a/macros/latex/contrib/fithesis/example/mu/phil-lualatex.pdf b/macros/latex/contrib/fithesis/example/mu/phil-lualatex.pdf new file mode 100644 index 0000000000..ed21bf2deb Binary files /dev/null and b/macros/latex/contrib/fithesis/example/mu/phil-lualatex.pdf differ diff --git a/macros/latex/contrib/fithesis/example/mu/phil-lualatex.tex b/macros/latex/contrib/fithesis/example/mu/phil-lualatex.tex new file mode 100644 index 0000000000..8aa2139809 --- /dev/null +++ b/macros/latex/contrib/fithesis/example/mu/phil-lualatex.tex @@ -0,0 +1,650 @@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% I, the copyright holder of this work, release this work into the +%% public domain. This applies worldwide. In some countries this may +%% not be legally possible; if so: I grant anyone the right to use +%% this work for any purpose, without any conditions, unless such +%% conditions are required by law. +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\documentclass[ + digital, %% This option enables the default options for the + %% digital version of a document. Replace with `printed` + %% to enable the default options for the printed version + %% of a document. + twoside, %% This option enables double-sided typesetting. Use at + %% least 120 g/m² paper to prevent show-through. Replace + %% with `oneside` to use one-sided typesetting; use only + %% if you don’t have access to a double-sided printer, + %% or if one-sided typesetting is a formal requirement + %% at your faculty. + table, %% This option causes the coloring of tables. Replace + %% with `notable` to restore plain LaTeX tables. + lof, %% This option prints the List of Figures. Replace with + %% `nolof` to hide the List of Figures. + lot, %% This option prints the List of Tables. Replace with + %% `nolot` to hide the List of Tables. + %% More options are listed in the user guide at + %% . +]{fithesis3} +%% The following section sets up the locales used in the thesis. +\usepackage{polyglossia} %% By using `czech` or `slovak` as the +\setmainlanguage{english} %% main locale instead of `english`, you +%% can typeset the thesis in either Czech or Slovak, respectively. +\setotherlanguages{german, russian, czech, slovak} %% The +%% +%% \begin{otherlanguage}{german} ... \end{otherlanguage} +%% \begin{otherlanguage}{russian} ... \end{otherlanguage} +%% \begin{otherlanguage}{czech} ... \end{otherlanguage} +%% \begin{otherlanguage}{slovak} ... \end{otherlanguage} +%% +%% For non-Latin scripts, it may be necessary to load additional +%% fonts: +\newfontfamily\russianfont[Script=Cyrillic,Ligatures=TeX]{PT Serif} +%% +%% The following section sets up the metadata of the thesis. +\thesissetup{ + date = \the\year/\the\month/\the\day, + university = mu, + faculty = phil, + department = Department of Psychology, + field = Cognitive Sciences, + type = bc, + author = Jane Doe, + gender = f, + advisor = John Smith, + title = What Can Typography Tell Us + About the Nature of Man, + TeXtitle = What Can Typography Tell Us\\ + About the Nature of Man, + thanks = {These are the acknowledgements for my thesis, which can + + span multiple paragraphs.}, + bib = example.bib, +} +\usepackage{makeidx} %% The `makeidx` package contains +\makeindex %% helper commands for index typesetting. +%% These additional packages are used within the document: +\usepackage{paralist} %% Compact list environments +\usepackage{amsmath} %% Mathematics +\usepackage{amsthm} +\usepackage{amsfonts} +\usepackage{url} %% Hyperlinks +\usepackage{markdown} %% Lightweight markup +\usepackage{listings} %% Source code highlighting +\lstset{ + basicstyle = \ttfamily,% + identifierstyle = \color{black},% + keywordstyle = \color{blue},% + keywordstyle = {[2]\color{cyan}},% + keywordstyle = {[3]\color{olive}},% + stringstyle = \color{teal},% + commentstyle = \itshape\color{magenta}} +\usepackage{floatrow} %% Putting captions above tables +\floatsetup[table]{capposition=top} +\begin{document} +\chapter*{Introduction} +\addcontentsline{toc}{chapter}{Introduction} + +Theses are rumoured to be the capstones of education, so I decided +to write one of my own. If all goes well, I will soon have a +diploma under my belt. Wish me luck! + +\begin{otherlanguage}{czech} +Říká se, že závěrečné práce jsou vyvrcholením studia a tak jsem se +rozhodl jednu také napsat. Pokud vše půjde podle plánu, odnesu si +na konci semestru diplom. Držte mi palce! +\end{otherlanguage} + +\begin{otherlanguage}{slovak} +Hovorí sa, že záverečné práce sú vyvrcholením štúdia a tak som sa +rozhodol jednu tiež napísať. Ak všetko pôjde podľa plánu, odnesiem +si na konci semestra diplom. Držte mi palce! +\end{otherlanguage} + +\begin{otherlanguage}{german} +Man munkelt, dass die Dissertation die Krönung der Ausbildung ist. +Deshalb habe ich mich beschlossen meine eigene zu schreiben. Wenn +alles gut geht, bekomme ich bald ein Diplom. Wünsch mir Glück! +\end{otherlanguage} + +\begin{otherlanguage}{russian} +Говорят, что тезис -- это кульминация обучения. Поэтому я и решил +написать собственный тезис. Если всё сработает по плану, я скоро +получу диплом. Желайте мне удачи! +\end{otherlanguage} + +\chapter{These are} +\section{the available} +\subsection{sectioning} +\subsubsection{commands.} +\paragraph{Paragraphs and} +\subparagraph{subparagraphs are available as well.} +Inside the text, you can also use unnumbered lists, +\begin{itemize} + \item such as + \item this one + \begin{itemize} + \item and they can be nested as well. + \item[>>] You can even turn the bullets into something fancier, + \item[\S] if you so desire. + \end{itemize} +\end{itemize} +Numbered lists are +\begin{enumerate} + \item very + \begin{enumerate} + \item similar + \end{enumerate} +\end{enumerate} +and so are description lists: +\begin{description} + \item[Description list] + A list of terms with a description of each term +\end{description} +The spacing of these lists is geared towards paragraphs of text. +For lists of words and phrases, the \textsf{paralist} package +offers commands +\begin{compactitem} + \item that + \begin{compactitem} + \item are + \begin{compactitem} + \item better + \begin{compactitem} + \item suited + \end{compactitem} + \end{compactitem} + \end{compactitem} +\end{compactitem} +\begin{compactenum} + \item to + \begin{compactenum} + \item this + \begin{compactenum} + \item kind of + \begin{compactenum} + \item content. + \end{compactenum} + \end{compactenum} + \end{compactenum} +\end{compactenum} +The \textsf{amsthm} package provides the commands necessary for the +typesetting of mathematical definitions, theorems, lemmas and +proofs. + +%% We will define several mathematical sectioning commands. +\newtheorem{theorem}{Theorem}[section] %% The numbering of theorems + %% will be reset after each section. +\newtheorem{lemma}[theorem]{Lemma} %% The numbering of lemmas +\newtheorem{corollary}[theorem]{Corollary} %% and corollaries will + %% share the counter with theorems. +\theoremstyle{definition} +\newtheorem{definition}{Definition} +\theoremstyle{remark} +\newtheorem*{remark}{Remark} + +\begin{theorem} + This is a theorem that offers a profound insight into the + mathematical sectioning commands. +\end{theorem} +\begin{theorem}[Another theorem] + This is another theorem. Unlike the first one, this theorem has + been endowed with a name. +\end{theorem} +\begin{lemma} + Let us suppose that $x^2+y^2=z^2$. Then + \begin{equation} + \biggl\langle u\biggm|\sum_{i=1}^nF(e_i,v)e_i\biggr\rangle + =F\biggl(\sum_{i=1}^n\langle e_i|u\rangle e_i,v\biggr). + \end{equation} +\end{lemma} +\begin{proof} + $\nabla^2 f(x,y)=\frac{\partial^2f}{\partial x^2}+ + \frac{\partial^2f}{\partial y^2}$. +\end{proof} +\begin{corollary} + This is a corollary. +\end{corollary} +\begin{remark} + This is a remark. +\end{remark} + +\chapter{Floats and references} +\begin{figure} + \begin{center} + %% PNG and JPG images can be inserted into the document as well, + %% but their resolution needs to be adequate. The minimum is + %% about 100 pixels per 1 centimeter or 300 pixels per 1 inch. + %% That means that a JPG or PNG image typeset at 4 × 4 cm should + %% be 400 × 400 px large at the bare minimum. + %% + %% The optimum is about 250 pixels per 1 centimeter or 600 + %% pixels per 1 inch. That means that a JPG or PNG image typeset + %% at 4 × 4 cm should be 1000 × 1000 px large or larger. + \includegraphics[width=4cm]{fithesis/logo/mu/fithesis-base.pdf} + \end{center} + \caption{The logo of the Masaryk University at 40\,mm} + \label{fig:mulogo1} +\end{figure} + +\begin{figure} + \begin{center} + \begin{minipage}{.66\textwidth} + \includegraphics[width=\textwidth]{fithesis/logo/mu/fithesis-base.pdf} + \end{minipage} + \begin{minipage}{.33\textwidth} + \includegraphics[width=\textwidth]{fithesis/logo/mu/fithesis-base.pdf} \\ + \includegraphics[width=\textwidth]{fithesis/logo/mu/fithesis-base.pdf} + \end{minipage} + \end{center} + \caption{The logo of the Masaryk University at $\frac23$ and + $\frac13$ of text width} + \label{fig:mulogo2} +\end{figure} + +\begin{table} + \begin{tabularx}{\textwidth}{lllX} + \toprule + Day & Min Temp & Max Temp & Summary \\ + \midrule + Monday & $13^{\circ}\mathrm{C}$ & $21^\circ\mathrm{C}$ & A + clear day with low wind and no adverse current advisories. \\ + Tuesday & $11^{\circ}\mathrm{C}$ & $17^\circ\mathrm{C}$ & A + trough of low pressure will come from the northwest. \\ + Wednesday & $10^{\circ}\mathrm{C}$ & + $21^\circ\mathrm{C}$ & Rain will spread to all parts during the + morning. \\ + \bottomrule + \end{tabularx} + \caption{A weather forecast} + \label{tab:weather} +\end{table} + +The logo of the Masaryk University is shown in Figure +\ref{fig:mulogo1} and Figure \ref{fig:mulogo2} at pages +\pageref{fig:mulogo1} and \pageref{fig:mulogo2}. The weather +forecast is shown in Table \ref{tab:weather} at page +\pageref{tab:weather}. The following chapter is Chapter +\ref{chap:matheq} and starts at page \pageref{chap:matheq}. +Items \ref{item:star1}, \ref{item:star2}, and +\ref{item:star3} are starred in the following list: +\begin{compactenum} + \item some text + \item some other text + \item $\star$ \label{item:star1} + \begin{compactenum} + \item some text + \item $\star$ \label{item:star2} + \item some other text + \begin{compactenum} + \item some text + \item some other text + \item yet another piece of text + \item $\star$ \label{item:star3} + \end{compactenum} + \item yet another piece of text + \end{compactenum} + \item yet another piece of text +\end{compactenum} +If your reference points to a place that has not yet been typeset, +the \verb"\ref" command will expand to \textbf{??} during the first +run of +\texttt{lualatex \jobname.tex} +and a second run is going to be needed for the references to +resolve. With online services -- such as Overleaf -- this is +performed automatically. + +\chapter{Mathematical equations} +\label{chap:matheq} +\TeX{} comes pre-packed with the ability to typeset inline +equations, such as $\mathrm{e}^{ix}=\cos x+i\sin x$, and display +equations, such as \[ + \mathbf{A}^{-1} = \begin{bmatrix} + a & b \\ c & d \\ + \end{bmatrix}^{-1} = + \frac{1}{\det(\mathbf{A})} \begin{bmatrix} + \,\,\,d & \!\!-b \\ -c & \,a \\ + \end{bmatrix} = + \frac{1}{ad - bc} \begin{bmatrix} + \,\,\,d & \!\!-b \\ -c & \,a \\ + \end{bmatrix}. +\] \LaTeX{} defines the automatically numbered \texttt{equation} +environment: +\begin{equation} + \gamma Px = PAx = PAP^{-1}Px. +\end{equation} +The package \textsf{amsmath} provides several additional +environments that can be used to typeset complex equations: +\begin{enumerate} + \item An equation can be spread over multiple lines using the + \texttt{multline} environment: + \begin{multline} + a + b + c + d + e + f + b + c + d + e + f + b + c + d + e + +f \\ + + f + g + h + i + j + k + l + m + n + o + p + q + \end{multline} + + \item Several aligned equations can be typeset using the + \texttt{align} environment: + \begin{align} + a + b &= c + d \\ + u &= v + w + x \\[1ex] + i + j + k + l &= m + \end{align} + + \item The \texttt{alignat} environment is similar to + \texttt{align}, but it doesn't insert horizontal spaces between + the individual columns: + \begin{alignat}{2} + a + b + c &+ d & &= 0 \\ + e &+ f + g & &= 5 + \end{alignat} + + \item Much like chapter, sections, tables, figures, or list + items, equations -- such as \eqref{eq:first} and + \eqref{eq:mine} -- can also be labeled and referenced: + \begin{alignat}{4} + b_{11}x_1 &+ b_{12}x_2 & &+ b_{13}x_3 & & & + &= y_1, \label{eq:first} \\ + b_{21}x_1 &+ b_{22}x_2 & & & &+ b_{24}x_4 & + &= y_2. \tag{My equation} \label{eq:mine} + \end{alignat} + + \item The \texttt{gather} environment makes it possible to + typeset several equations without any alignment: + \begin{gather} + \psi = \psi\psi, \\ + \eta = \eta\eta\eta\eta\eta\eta, \\ + \theta = \theta. + \end{gather} + + \item Several cases can be typeset using the \texttt{cases} + environment: + \begin{equation} + |y| = \begin{cases} + \phantom-y & \text{if }z\geq0, \\ + -y & \text{otherwise}. + \end{cases} + \end{equation} +\end{enumerate} +For the complete list of environments and commands, consult the +\textsf{amsmath} package manual\footnote{ + See \url{http://mirrors.ctan.org/macros/latex/required/amslatex/math/amsldoc.pdf}. + The \texttt{\textbackslash url} command is provided by the + package \textsf{url}. +}. + +\chapter{\textnormal{We \textsf{have} \texttt{several} \textsc{fonts} + \textit{at} \textbf{disposal}}} +The serified roman font is used for the main body of the text. +\textit{Italics are typically used to denote emphasis or +quotations.} \texttt{The teletype font is typically used for source +code listings.} The \textbf{bold}, \textsc{small-caps} and +\textsf{sans-serif} variants of the base roman font can be used to +denote specific types of information. + +\tiny We \scriptsize can \footnotesize also \small change \normalsize +the \large font \Large size, \LARGE although \huge it \Huge +is \huge usually \LARGE not \Large necessary.\normalsize + +A wide variety of mathematical fonts is also available, such as: \[ + \mathrm{ABC}, \mathcal{ABC}, \mathbf{ABC}, \mathsf{ABC}, + \mathit{ABC}, \mathtt{ABC} +\] By loading the \textsf{amsfonts} packages, several additional +fonts will become available: \[ + \mathfrak{ABC}, \mathbb{ABC} +\] Many other mathematical fonts are available\footnote{ + See \url{http://tex.stackexchange.com/a/58124/70941}. +}. + +\chapter{Using lightweight markup} +\begin{markdown*}{% + hybrid, + definitionLists, + footnotes, + inlineFootnotes, + hashEnumerators, + fencedCode, + citations, + citationNbsps, +} + +If you decide that \LaTeX{} is too wordy for some parts of your +document, there are [packages](https://www.ctan.org/pkg/markdown +"Markdown") that allow you to use more lightweight markup next +to it. + + ![logo](fithesis/logo/mu/fithesis-base.pdf "The logo of the + Masaryk University") + +This is a bullet list. Unlike numbered lists, bulleted lists +contain an **unordered** set of bullet points. When a bullet point +contains multiple paragraphs, the list is typeset as follows: + + * The first item of a bullet list + + that spans several paragraphs, + * the second item of a bullet list, + * the third item of a bullet list. + +When none of the bullet points contains multiple paragraphs, the +list has a more compact form: + + * The first item of a bullet list, + * the second item of a bullet list, + * the third item of a bullet list. + +Unlike a bulleted list, a numbered list implies chronology or +ordering of the bullet points. When a bullet point +contains multiple paragraphs, the list is typeset as follows: + + 1. The first item of an ordered list + + that spans several paragraphs, + 2. the second item of an ordered list, + 3. the third item of an ordered list. + #. If you are feeling lazy, + #. you can use hash enumerators as well. + +When none of the bullet points contains multiple paragraphs, the +list has a more compact form: + + 6. The first item of an ordered list, + 7. the second item of an ordered list, + 8. the third item of an ordered list. + +Definition lists are used to provide definitions of terms. When +a definition contains multiple paragraphs, the list is typeset +as follows: + +Term 1 + +: Definition 1 + +*Term 2* + +: Definition 2 + + Some code, part of Definition 2 + + Third paragraph of Definition 2. + +When none of the bullet points contains multiple paragraphs, the +list has a more compact form: + +Term 1 +: Definition 1 +*Term 2* +: Definition 2 + +Block quotations are used to include an excerpt from an external +document in way that visually clearly separates the excerpt from +the rest of the work: + +> This is the first level of quoting. +> +> > This is nested blockquote. +> +> Back to the first level. + +Footnotes are used to include additional information to the +document that are not necessary for the understanding of the main +text. Here is a footnote reference^[Here is the footnote.] and +another.[^longnote] + +[^longnote]: Here's one with multiple blocks. + + Subsequent paragraphs are indented to show that they +belong to the previous footnote. + + Some code + + The whole paragraph can be indented, or just the first + line. In this way, multi-paragraph footnotes work like + multi-paragraph list items. + +Citations are used to provide bibliographical references to other +documents. This is a regular citation~[@borgman03, p. 123]. This is +an in-text citation: @borgman03\. You can also cite several authors +at once using both regular~[see @borgman03, p. 123; @greenberg98, +sec. 3.2; and @thanh01] and in-text citations: @borgman03 [p.123; +@greenberg98, sec. 3.2; @thanh01]. + +Code blocks are used to include source code listings into the +document: + + #include + #include + #include + #include + // This is a comment + int main(int argc, char **argv) + { + while (--c > 1 && !fork()); + sleep(c = atoi(v[c])); + printf("%d\n", c); + wait(0); + return 0; + } + +There is an alternative syntax for code blocks that allows you to +specify additional information, such as the language of the source +code. This information can be used for syntax highlighting: + +``` sh +#!/bin/sh +fac() { + if [ "$1" -leq 1 ]; then + echo 1 + else + echo $(("$1" * fac $(("$1" - 1)))) + fi +} +`````````````` + +~~~~~~ Ruby +# Here's a way to empty an array. +joe = [ 'eggs.', 'some', 'break', 'to', 'Have' ] +print(joe.pop, " ") while joe.size > 0 +print "\n" +~~~~~~ + +\end{markdown*} + +\chapter{Inserting the bibliography} +After linking a bibliography data\-base files to the document using +the \verb"\"\texttt{thesis\discretionary{-}{}{}setup\{bib\discretionary{=}{=}{=}% +\{\textit{file1},\textit{file2},\,\ldots\,\}\}} command, you can +start citing the entries. This is just dummy text +\parencite{borgman03} lightly sprinkled with citations +\parencite[p.~123]{greenberg98}. Several sources can be cited at +once: \cite{borgman03,greenberg98,thanh01}. +\citetitle{greenberg98} was written by \citeauthor{greenberg98} in +\citeyear{greenberg98}. We can also produce \textcite{greenberg98}% +\ or %% Let us define a compound command: +\def\citeauthoryear#1{(\textcite{#1},~\citeyear{#1})}% +\citeauthoryear{greenberg98}% +. The full bibliographic citation is: +\emph{\fullcite{greenberg98}}. We can easily insert a bibliographic +citation into the footnote\footfullcite{greenberg98}. + +The \verb"\nocite" command will not generate any +output\nocite{muni}, but it will insert its arguments into +the bibliography. The \verb"\nocite{*}" command will insert all the +records in the bibliography database file into the bibliography. +Try uncommenting the command +%% \nocite{*} +and watch the bibliography section come apart at the seams. + +When typesetting the document for the first time, citing a +\texttt{work} will expand to [\textbf{work}] and the +\verb"\printbibliography" command will produce no output. It is now +necessary to generate the bibliography by running \texttt{biber +\jobname.bcf} from the command line and then by typesetting the +document again twice. During the first run, the bibliography +section and the citations will be typeset, and in the second run, +the bibliography section will appear in the table of contents. + +The \texttt{biber} command needs to be executed from within the +directory, where the \LaTeX\ source file is located. In Windows, +the command line can be opened in a directory by holding down the +\textsf{Shift} key and by clicking the right mouse button while +hovering the cursor over a directory. Select the \textsf{Open +Command Window Here} option in the context menu that opens shortly +afterwards. + +With online services -- such as Overleaf -- or when using an +automatic tool -- such as \LaTeX MK -- all commands are executed +automatically. When you omit the \verb"\printbibliography" command, +its location will be decided by the template. + + \printbibliography[heading=bibintoc] %% Print the bibliography. + +\chapter{Inserting the index} +After using the \verb"\makeindex" macro and loading the +\texttt{makeidx} package that provides additional indexing +commands, index entries can be created by issuing the \verb"\index" +command. \index{dummy text|(}It is possible to create ranged index +entries, which will encompass a span of text.\index{dummy text|)} +To insert complex typographic material -- such as $\alpha$ +\index{alpha@$\alpha$} or \TeX{} \index{TeX@\TeX} -- +into the index, you need to specify a text string, which will +determine how the entry will be sorted. It is also possible to +create hierarchal entries. \index{vehicles!trucks} +\index{vehicles!speed cars} + +After typesetting the document, it is necessary to generate the +index by running +\begin{center}% + \texttt{texindy -I latex -C utf8 -L }$\langle$\textit{locale}% + $\rangle$\texttt{ \jobname.idx} +\end{center} +from the command line, where $\langle$\textit{locale}$\rangle$ +corresponds to the main locale of your thesis -- such as +\texttt{english}, and then typesetting the document again. + +The \texttt{texindy} command needs to be executed from within the +directory, where the \LaTeX\ source file is located. In Windows, +the command line can be opened in a directory by holding down the +\textsf{Shift} key and by clicking the right mouse button while +hovering the cursor over a directory. Select the \textsf{Open Command +Window Here} option in the context menu that opens shortly +afterwards. + +With online services -- such as Overleaf -- the commands are +executed automatically, although the locale may be erroneously +detected, or the \texttt{makeindex} tool (which is only able to +sort entries that contain digits and letters of the English +alphabet) may be used instead of \texttt{texindy}. In either case, +the index will be ill-sorted. + + \makeatletter\thesis@blocks@clear\makeatother + \phantomsection %% Print the index and insert it into the + \addcontentsline{toc}{chapter}{\indexname} %% table of contents. + \printindex + +\appendix %% Start the appendices. +\chapter{An appendix} +Here you can insert the appendices of your thesis. + +\end{document} diff --git a/macros/latex/contrib/fithesis/example/mu/phil-pdflatex.pdf b/macros/latex/contrib/fithesis/example/mu/phil-pdflatex.pdf new file mode 100644 index 0000000000..5983cf9800 Binary files /dev/null and b/macros/latex/contrib/fithesis/example/mu/phil-pdflatex.pdf differ diff --git a/macros/latex/contrib/fithesis/example/mu/phil-pdflatex.tex b/macros/latex/contrib/fithesis/example/mu/phil-pdflatex.tex new file mode 100644 index 0000000000..2811b6bfa5 --- /dev/null +++ b/macros/latex/contrib/fithesis/example/mu/phil-pdflatex.tex @@ -0,0 +1,657 @@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% I, the copyright holder of this work, release this work into the +%% public domain. This applies worldwide. In some countries this may +%% not be legally possible; if so: I grant anyone the right to use +%% this work for any purpose, without any conditions, unless such +%% conditions are required by law. +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\documentclass[ + digital, %% This option enables the default options for the + %% digital version of a document. Replace with `printed` + %% to enable the default options for the printed version + %% of a document. + twoside, %% This option enables double-sided typesetting. Use at + %% least 120 g/m² paper to prevent show-through. Replace + %% with `oneside` to use one-sided typesetting; use only + %% if you don’t have access to a double-sided printer, + %% or if one-sided typesetting is a formal requirement + %% at your faculty. + table, %% This option causes the coloring of tables. Replace + %% with `notable` to restore plain LaTeX tables. + lof, %% This option prints the List of Figures. Replace with + %% `nolof` to hide the List of Figures. + lot, %% This option prints the List of Tables. Replace with + %% `nolot` to hide the List of Tables. + %% More options are listed in the user guide at + %% . +]{fithesis3} +%% The following section sets up the locales used in the thesis. +\usepackage[resetfonts]{cmap} %% We need to load the T2A font encoding +\usepackage[T1,T2A]{fontenc} %% to use the Cyrillic fonts with Russian texts. +\usepackage[ + main=english, %% By using `czech` or `slovak` as the main locale + %% instead of `english`, you can typeset the thesis + %% in either Czech or Slovak, respectively. + english, german, russian, czech, slovak %% The additional keys allow +]{babel} %% foreign texts to be typeset as follows: +%% +%% \begin{otherlanguage}{german} ... \end{otherlanguage} +%% \begin{otherlanguage}{russian} ... \end{otherlanguage} +%% \begin{otherlanguage}{czech} ... \end{otherlanguage} +%% \begin{otherlanguage}{slovak} ... \end{otherlanguage} +%% +%% For non-Latin scripts, it may be necessary to load additional +%% fonts: +\usepackage{paratype} +\def\textrussian#1{{\usefont{T2A}{PTSerif-TLF}{m}{rm}#1}} +%% +%% The following section sets up the metadata of the thesis. +\thesissetup{ + date = \the\year/\the\month/\the\day, + university = mu, + faculty = phil, + department = Department of Psychology, + field = Cognitive Sciences, + type = bc, + author = Jane Doe, + gender = f, + advisor = John Smith, + title = What Can Typography Tell Us + About the Nature of Man, + TeXtitle = What Can Typography Tell Us\\ + About the Nature of Man, + thanks = {These are the acknowledgements for my thesis, which can + + span multiple paragraphs.}, + bib = example.bib, +} +\usepackage{makeidx} %% The `makeidx` package contains +\makeindex %% helper commands for index typesetting. +%% These additional packages are used within the document: +\usepackage{paralist} %% Compact list environments +\usepackage{amsmath} %% Mathematics +\usepackage{amsthm} +\usepackage{amsfonts} +\usepackage{url} %% Hyperlinks +\usepackage{markdown} %% Lightweight markup +\usepackage{listings} %% Source code highlighting +\lstset{ + basicstyle = \ttfamily,% + identifierstyle = \color{black},% + keywordstyle = \color{blue},% + keywordstyle = {[2]\color{cyan}},% + keywordstyle = {[3]\color{olive}},% + stringstyle = \color{teal},% + commentstyle = \itshape\color{magenta}} +\usepackage{floatrow} %% Putting captions above tables +\floatsetup[table]{capposition=top} +\begin{document} +\chapter*{Introduction} +\addcontentsline{toc}{chapter}{Introduction} + +Theses are rumoured to be the capstones of education, so I decided +to write one of my own. If all goes well, I will soon have a +diploma under my belt. Wish me luck! + +\begin{otherlanguage}{czech} +Říká se, že závěrečné práce jsou vyvrcholením studia a tak jsem se +rozhodl jednu také napsat. Pokud vše půjde podle plánu, odnesu si +na konci semestru diplom. Držte mi palce! +\end{otherlanguage} + +\begin{otherlanguage}{slovak} +Hovorí sa, že záverečné práce sú vyvrcholením štúdia a tak som sa +rozhodol jednu tiež napísať. Ak všetko pôjde podľa plánu, odnesiem +si na konci semestra diplom. Držte mi palce! +\end{otherlanguage} + +\begin{otherlanguage}{german} +Man munkelt, dass die Dissertation die Krönung der Ausbildung ist. +Deshalb habe ich mich beschlossen meine eigene zu schreiben. Wenn +alles gut geht, bekomme ich bald ein Diplom. Wünsch mir Glück! +\end{otherlanguage} + +\begin{otherlanguage}{russian}\textrussian{% +Говорят, что тезис -- это кульминация обучения. Поэтому я и решил +написать собственный тезис. Если всё сработает по плану, я скоро +получу диплом. Желайте мне удачи! +}\end{otherlanguage} + +\chapter{These are} +\section{the available} +\subsection{sectioning} +\subsubsection{commands.} +\paragraph{Paragraphs and} +\subparagraph{subparagraphs are available as well.} +Inside the text, you can also use unnumbered lists, +\begin{itemize} + \item such as + \item this one + \begin{itemize} + \item and they can be nested as well. + \item[>>] You can even turn the bullets into something fancier, + \item[\S] if you so desire. + \end{itemize} +\end{itemize} +Numbered lists are +\begin{enumerate} + \item very + \begin{enumerate} + \item similar + \end{enumerate} +\end{enumerate} +and so are description lists: +\begin{description} + \item[Description list] + A list of terms with a description of each term +\end{description} +The spacing of these lists is geared towards paragraphs of text. +For lists of words and phrases, the \textsf{paralist} package +offers commands +\begin{compactitem} + \item that + \begin{compactitem} + \item are + \begin{compactitem} + \item better + \begin{compactitem} + \item suited + \end{compactitem} + \end{compactitem} + \end{compactitem} +\end{compactitem} +\begin{compactenum} + \item to + \begin{compactenum} + \item this + \begin{compactenum} + \item kind of + \begin{compactenum} + \item content. + \end{compactenum} + \end{compactenum} + \end{compactenum} +\end{compactenum} +The \textsf{amsthm} package provides the commands necessary for the +typesetting of mathematical definitions, theorems, lemmas and +proofs. + +%% We will define several mathematical sectioning commands. +\newtheorem{theorem}{Theorem}[section] %% The numbering of theorems + %% will be reset after each section. +\newtheorem{lemma}[theorem]{Lemma} %% The numbering of lemmas +\newtheorem{corollary}[theorem]{Corollary} %% and corollaries will + %% share the counter with theorems. +\theoremstyle{definition} +\newtheorem{definition}{Definition} +\theoremstyle{remark} +\newtheorem*{remark}{Remark} + +\begin{theorem} + This is a theorem that offers a profound insight into the + mathematical sectioning commands. +\end{theorem} +\begin{theorem}[Another theorem] + This is another theorem. Unlike the first one, this theorem has + been endowed with a name. +\end{theorem} +\begin{lemma} + Let us suppose that $x^2+y^2=z^2$. Then + \begin{equation} + \biggl\langle u\biggm|\sum_{i=1}^nF(e_i,v)e_i\biggr\rangle + =F\biggl(\sum_{i=1}^n\langle e_i|u\rangle e_i,v\biggr). + \end{equation} +\end{lemma} +\begin{proof} + $\nabla^2 f(x,y)=\frac{\partial^2f}{\partial x^2}+ + \frac{\partial^2f}{\partial y^2}$. +\end{proof} +\begin{corollary} + This is a corollary. +\end{corollary} +\begin{remark} + This is a remark. +\end{remark} + +\chapter{Floats and references} +\begin{figure} + \begin{center} + %% PNG and JPG images can be inserted into the document as well, + %% but their resolution needs to be adequate. The minimum is + %% about 100 pixels per 1 centimeter or 300 pixels per 1 inch. + %% That means that a JPG or PNG image typeset at 4 × 4 cm should + %% be 400 × 400 px large at the bare minimum. + %% + %% The optimum is about 250 pixels per 1 centimeter or 600 + %% pixels per 1 inch. That means that a JPG or PNG image typeset + %% at 4 × 4 cm should be 1000 × 1000 px large or larger. + \includegraphics[width=4cm]{fithesis/logo/mu/fithesis-base.pdf} + \end{center} + \caption{The logo of the Masaryk University at 40\,mm} + \label{fig:mulogo1} +\end{figure} + +\begin{figure} + \begin{center} + \begin{minipage}{.66\textwidth} + \includegraphics[width=\textwidth]{fithesis/logo/mu/fithesis-base.pdf} + \end{minipage} + \begin{minipage}{.33\textwidth} + \includegraphics[width=\textwidth]{fithesis/logo/mu/fithesis-base.pdf} \\ + \includegraphics[width=\textwidth]{fithesis/logo/mu/fithesis-base.pdf} + \end{minipage} + \end{center} + \caption{The logo of the Masaryk University at $\frac23$ and + $\frac13$ of text width} + \label{fig:mulogo2} +\end{figure} + +\begin{table} + \begin{tabularx}{\textwidth}{lllX} + \toprule + Day & Min Temp & Max Temp & Summary \\ + \midrule + Monday & $13^{\circ}\mathrm{C}$ & $21^\circ\mathrm{C}$ & A + clear day with low wind and no adverse current advisories. \\ + Tuesday & $11^{\circ}\mathrm{C}$ & $17^\circ\mathrm{C}$ & A + trough of low pressure will come from the northwest. \\ + Wednesday & $10^{\circ}\mathrm{C}$ & + $21^\circ\mathrm{C}$ & Rain will spread to all parts during the + morning. \\ + \bottomrule + \end{tabularx} + \caption{A weather forecast} + \label{tab:weather} +\end{table} + +The logo of the Masaryk University is shown in Figure +\ref{fig:mulogo1} and Figure \ref{fig:mulogo2} at pages +\pageref{fig:mulogo1} and \pageref{fig:mulogo2}. The weather +forecast is shown in Table \ref{tab:weather} at page +\pageref{tab:weather}. The following chapter is Chapter +\ref{chap:matheq} and starts at page \pageref{chap:matheq}. +Items \ref{item:star1}, \ref{item:star2}, and +\ref{item:star3} are starred in the following list: +\begin{compactenum} + \item some text + \item some other text + \item $\star$ \label{item:star1} + \begin{compactenum} + \item some text + \item $\star$ \label{item:star2} + \item some other text + \begin{compactenum} + \item some text + \item some other text + \item yet another piece of text + \item $\star$ \label{item:star3} + \end{compactenum} + \item yet another piece of text + \end{compactenum} + \item yet another piece of text +\end{compactenum} +If your reference points to a place that has not yet been typeset, +the \verb"\ref" command will expand to \textbf{??} during the first +run of +\texttt{pdflatex \jobname.tex} +and a second run is going to be needed for the references to +resolve. With online services -- such as Overleaf -- this is +performed automatically. + +\chapter{Mathematical equations} +\label{chap:matheq} +\TeX{} comes pre-packed with the ability to typeset inline +equations, such as $\mathrm{e}^{ix}=\cos x+i\sin x$, and display +equations, such as \[ + \mathbf{A}^{-1} = \begin{bmatrix} + a & b \\ c & d \\ + \end{bmatrix}^{-1} = + \frac{1}{\det(\mathbf{A})} \begin{bmatrix} + \,\,\,d & \!\!-b \\ -c & \,a \\ + \end{bmatrix} = + \frac{1}{ad - bc} \begin{bmatrix} + \,\,\,d & \!\!-b \\ -c & \,a \\ + \end{bmatrix}. +\] \LaTeX{} defines the automatically numbered \texttt{equation} +environment: +\begin{equation} + \gamma Px = PAx = PAP^{-1}Px. +\end{equation} +The package \textsf{amsmath} provides several additional +environments that can be used to typeset complex equations: +\begin{enumerate} + \item An equation can be spread over multiple lines using the + \texttt{multline} environment: + \begin{multline} + a + b + c + d + e + f + b + c + d + e + f + b + c + d + e + +f \\ + + f + g + h + i + j + k + l + m + n + o + p + q + \end{multline} + + \item Several aligned equations can be typeset using the + \texttt{align} environment: + \begin{align} + a + b &= c + d \\ + u &= v + w + x \\[1ex] + i + j + k + l &= m + \end{align} + + \item The \texttt{alignat} environment is similar to + \texttt{align}, but it doesn't insert horizontal spaces between + the individual columns: + \begin{alignat}{2} + a + b + c &+ d & &= 0 \\ + e &+ f + g & &= 5 + \end{alignat} + + \item Much like chapter, sections, tables, figures, or list + items, equations -- such as \eqref{eq:first} and + \eqref{eq:mine} -- can also be labeled and referenced: + \begin{alignat}{4} + b_{11}x_1 &+ b_{12}x_2 & &+ b_{13}x_3 & & & + &= y_1, \label{eq:first} \\ + b_{21}x_1 &+ b_{22}x_2 & & & &+ b_{24}x_4 & + &= y_2. \tag{My equation} \label{eq:mine} + \end{alignat} + + \item The \texttt{gather} environment makes it possible to + typeset several equations without any alignment: + \begin{gather} + \psi = \psi\psi, \\ + \eta = \eta\eta\eta\eta\eta\eta, \\ + \theta = \theta. + \end{gather} + + \item Several cases can be typeset using the \texttt{cases} + environment: + \begin{equation} + |y| = \begin{cases} + \phantom-y & \text{if }z\geq0, \\ + -y & \text{otherwise}. + \end{cases} + \end{equation} +\end{enumerate} +For the complete list of environments and commands, consult the +\textsf{amsmath} package manual\footnote{ + See \url{http://mirrors.ctan.org/macros/latex/required/amslatex/math/amsldoc.pdf}. + The \texttt{\textbackslash url} command is provided by the + package \textsf{url}. +}. + +\chapter{\textnormal{We \textsf{have} \texttt{several} \textsc{fonts} + \textit{at} \textbf{disposal}}} +The serified roman font is used for the main body of the text. +\textit{Italics are typically used to denote emphasis or +quotations.} \texttt{The teletype font is typically used for source +code listings.} The \textbf{bold}, \textsc{small-caps} and +\textsf{sans-serif} variants of the base roman font can be used to +denote specific types of information. + +\tiny We \scriptsize can \footnotesize also \small change \normalsize +the \large font \Large size, \LARGE although \huge it \Huge +is \huge usually \LARGE not \Large necessary.\normalsize + +A wide variety of mathematical fonts is also available, such as: \[ + \mathrm{ABC}, \mathcal{ABC}, \mathbf{ABC}, \mathsf{ABC}, + \mathit{ABC}, \mathtt{ABC} +\] By loading the \textsf{amsfonts} packages, several additional +fonts will become available: \[ + \mathfrak{ABC}, \mathbb{ABC} +\] Many other mathematical fonts are available\footnote{ + See \url{http://tex.stackexchange.com/a/58124/70941}. +}. + +\chapter{Using lightweight markup} +\shorthandoff{-} +\begin{markdown*}{% + hybrid, + definitionLists, + footnotes, + inlineFootnotes, + hashEnumerators, + fencedCode, + citations, + citationNbsps, +} + +If you decide that \LaTeX{} is too wordy for some parts of your +document, there are [packages](https://www.ctan.org/pkg/markdown +"Markdown") that allow you to use more lightweight markup next +to it. + + ![logo](fithesis/logo/mu/fithesis-base.pdf "The logo of the + Masaryk University") + +This is a bullet list. Unlike numbered lists, bulleted lists +contain an **unordered** set of bullet points. When a bullet point +contains multiple paragraphs, the list is typeset as follows: + + * The first item of a bullet list + + that spans several paragraphs, + * the second item of a bullet list, + * the third item of a bullet list. + +When none of the bullet points contains multiple paragraphs, the +list has a more compact form: + + * The first item of a bullet list, + * the second item of a bullet list, + * the third item of a bullet list. + +Unlike a bulleted list, a numbered list implies chronology or +ordering of the bullet points. When a bullet point +contains multiple paragraphs, the list is typeset as follows: + + 1. The first item of an ordered list + + that spans several paragraphs, + 2. the second item of an ordered list, + 3. the third item of an ordered list. + #. If you are feeling lazy, + #. you can use hash enumerators as well. + +When none of the bullet points contains multiple paragraphs, the +list has a more compact form: + + 6. The first item of an ordered list, + 7. the second item of an ordered list, + 8. the third item of an ordered list. + +Definition lists are used to provide definitions of terms. When +a definition contains multiple paragraphs, the list is typeset +as follows: + +Term 1 + +: Definition 1 + +*Term 2* + +: Definition 2 + + Some code, part of Definition 2 + + Third paragraph of Definition 2. + +When none of the bullet points contains multiple paragraphs, the +list has a more compact form: + +Term 1 +: Definition 1 +*Term 2* +: Definition 2 + +Block quotations are used to include an excerpt from an external +document in way that visually clearly separates the excerpt from +the rest of the work: + +> This is the first level of quoting. +> +> > This is nested blockquote. +> +> Back to the first level. + +Footnotes are used to include additional information to the +document that are not necessary for the understanding of the main +text. Here is a footnote reference^[Here is the footnote.] and +another.[^longnote] + +[^longnote]: Here's one with multiple blocks. + + Subsequent paragraphs are indented to show that they +belong to the previous footnote. + + Some code + + The whole paragraph can be indented, or just the first + line. In this way, multi-paragraph footnotes work like + multi-paragraph list items. + +Citations are used to provide bibliographical references to other +documents. This is a regular citation~[@borgman03, p. 123]. This is +an in-text citation: @borgman03\. You can also cite several authors +at once using both regular~[see @borgman03, p. 123; @greenberg98, +sec. 3.2; and @thanh01] and in-text citations: @borgman03 [p.123; +@greenberg98, sec. 3.2; @thanh01]. + +Code blocks are used to include source code listings into the +document: + + #include + #include + #include + #include + // This is a comment + int main(int argc, char **argv) + { + while (--c > 1 && !fork()); + sleep(c = atoi(v[c])); + printf("%d\n", c); + wait(0); + return 0; + } + +There is an alternative syntax for code blocks that allows you to +specify additional information, such as the language of the source +code. This information can be used for syntax highlighting: + +``` sh +#!/bin/sh +fac() { + if [ "$1" -leq 1 ]; then + echo 1 + else + echo $(("$1" * fac $(("$1" - 1)))) + fi +} +`````````````` + +~~~~~~ Ruby +# Here's a way to empty an array. +joe = [ 'eggs.', 'some', 'break', 'to', 'Have' ] +print(joe.pop, " ") while joe.size > 0 +print "\n" +~~~~~~ + +\end{markdown*} +\shorthandon{-} + +\chapter{Inserting the bibliography} +After linking a bibliography data\-base files to the document using +the \verb"\"\texttt{thesis\discretionary{-}{}{}setup\{bib\discretionary{=}{=}{=}% +\{\textit{file1},\textit{file2},\,\ldots\,\}\}} command, you can +start citing the entries. This is just dummy text +\parencite{borgman03} lightly sprinkled with citations +\parencite[p.~123]{greenberg98}. Several sources can be cited at +once: \cite{borgman03,greenberg98,thanh01}. +\citetitle{greenberg98} was written by \citeauthor{greenberg98} in +\citeyear{greenberg98}. We can also produce \textcite{greenberg98}% +\ or %% Let us define a compound command: +\def\citeauthoryear#1{(\textcite{#1},~\citeyear{#1})}% +\citeauthoryear{greenberg98}% +. The full bibliographic citation is: +\emph{\fullcite{greenberg98}}. We can easily insert a bibliographic +citation into the footnote\footfullcite{greenberg98}. + +The \verb"\nocite" command will not generate any +output\nocite{muni}, but it will insert its arguments into +the bibliography. The \verb"\nocite{*}" command will insert all the +records in the bibliography database file into the bibliography. +Try uncommenting the command +%% \nocite{*} +and watch the bibliography section come apart at the seams. + +When typesetting the document for the first time, citing a +\texttt{work} will expand to [\textbf{work}] and the +\verb"\printbibliography" command will produce no output. It is now +necessary to generate the bibliography by running \texttt{biber +\jobname.bcf} from the command line and then by typesetting the +document again twice. During the first run, the bibliography +section and the citations will be typeset, and in the second run, +the bibliography section will appear in the table of contents. + +The \texttt{biber} command needs to be executed from within the +directory, where the \LaTeX\ source file is located. In Windows, +the command line can be opened in a directory by holding down the +\textsf{Shift} key and by clicking the right mouse button while +hovering the cursor over a directory. Select the \textsf{Open +Command Window Here} option in the context menu that opens shortly +afterwards. + +With online services -- such as Overleaf -- or when using an +automatic tool -- such as \LaTeX MK -- all commands are executed +automatically. When you omit the \verb"\printbibliography" command, +its location will be decided by the template. + + \printbibliography[heading=bibintoc] %% Print the bibliography. + +\chapter{Inserting the index} +After using the \verb"\makeindex" macro and loading the +\texttt{makeidx} package that provides additional indexing +commands, index entries can be created by issuing the \verb"\index" +command. \index{dummy text|(}It is possible to create ranged index +entries, which will encompass a span of text.\index{dummy text|)} +To insert complex typographic material -- such as $\alpha$ +\index{alpha@$\alpha$} or \TeX{} \index{TeX@\TeX} -- +into the index, you need to specify a text string, which will +determine how the entry will be sorted. It is also possible to +create hierarchal entries. \index{vehicles!trucks} +\index{vehicles!speed cars} + +After typesetting the document, it is necessary to generate the +index by running +\begin{center}% + \texttt{texindy -I latex -C utf8 -L }$\langle$\textit{locale}% + $\rangle$\texttt{ \jobname.idx} +\end{center} +from the command line, where $\langle$\textit{locale}$\rangle$ +corresponds to the main locale of your thesis -- such as +\texttt{english}, and then typesetting the document again. + +The \texttt{texindy} command needs to be executed from within the +directory, where the \LaTeX\ source file is located. In Windows, +the command line can be opened in a directory by holding down the +\textsf{Shift} key and by clicking the right mouse button while +hovering the cursor over a directory. Select the \textsf{Open Command +Window Here} option in the context menu that opens shortly +afterwards. + +With online services -- such as Overleaf -- the commands are +executed automatically, although the locale may be erroneously +detected, or the \texttt{makeindex} tool (which is only able to +sort entries that contain digits and letters of the English +alphabet) may be used instead of \texttt{texindy}. In either case, +the index will be ill-sorted. + + \makeatletter\thesis@blocks@clear\makeatother + \phantomsection %% Print the index and insert it into the + \addcontentsline{toc}{chapter}{\indexname} %% table of contents. + \printindex + +\appendix %% Start the appendices. +\chapter{An appendix} +Here you can insert the appendices of your thesis. + +\end{document} diff --git a/macros/latex/contrib/fithesis/example/mu/sci-lualatex.pdf b/macros/latex/contrib/fithesis/example/mu/sci-lualatex.pdf new file mode 100644 index 0000000000..f325377c23 Binary files /dev/null and b/macros/latex/contrib/fithesis/example/mu/sci-lualatex.pdf differ diff --git a/macros/latex/contrib/fithesis/example/mu/sci-lualatex.tex b/macros/latex/contrib/fithesis/example/mu/sci-lualatex.tex new file mode 100644 index 0000000000..2196d089ac --- /dev/null +++ b/macros/latex/contrib/fithesis/example/mu/sci-lualatex.tex @@ -0,0 +1,693 @@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% I, the copyright holder of this work, release this work into the +%% public domain. This applies worldwide. In some countries this may +%% not be legally possible; if so: I grant anyone the right to use +%% this work for any purpose, without any conditions, unless such +%% conditions are required by law. +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\documentclass[ + digital, %% This option enables the default options for the + %% digital version of a document. Replace with `printed` + %% to enable the default options for the printed version + %% of a document. + twoside, %% This option enables double-sided typesetting. Use at + %% least 120 g/m² paper to prevent show-through. Replace + %% with `oneside` to use one-sided typesetting; use only + %% if you don’t have access to a double-sided printer, + %% or if one-sided typesetting is a formal requirement + %% at your faculty. + table, %% This option causes the coloring of tables. Replace + %% with `notable` to restore plain LaTeX tables. + lof, %% This option prints the List of Figures. Replace with + %% `nolof` to hide the List of Figures. + lot, %% This option prints the List of Tables. Replace with + %% `nolot` to hide the List of Tables. + %% More options are listed in the user guide at + %% . +]{fithesis3} +%% The following section sets up the locales used in the thesis. +\usepackage{polyglossia} %% By using `czech` or `slovak` as the +\setmainlanguage{english} %% main locale instead of `english`, you +%% can typeset the thesis in either Czech or Slovak, respectively. +\setotherlanguages{german, russian, czech, slovak} %% The +%% +%% \begin{otherlanguage}{german} ... \end{otherlanguage} +%% \begin{otherlanguage}{russian} ... \end{otherlanguage} +%% \begin{otherlanguage}{czech} ... \end{otherlanguage} +%% \begin{otherlanguage}{slovak} ... \end{otherlanguage} +%% +%% For non-Latin scripts, it may be necessary to load additional +%% fonts: +\newfontfamily\russianfont[Script=Cyrillic,Ligatures=TeX]{PT Serif} +%% +%% The following section sets up the metadata of the thesis. +\thesissetup{ + date = \the\year/\the\month/\the\day, + university = mu, + faculty = sci, + department = Ústav matematiky a štatistiky, + departmentEn = Department of Mathematics and + Statistics, + extra = { + departmentCs = Ústav matematiky a statistiky, + }, + programme = Matematika, + programmeEn = Mathematics, + extra = { + programmeCs = Matematika, + }, + field = Finančná a poistná matematika, + fieldEn = Financial and Insurance Mathematics, + extra = { + fieldCs = Finanční a pojistná matematika, + }, + type = bc, + author = Jane Doe, + gender = f, + advisor = John Smith, + title = Princípy matematickej sadzby v programe TeX, + TeXtitle = Princípy matematickej sadzby\\v~programe \TeX, + titleEn = The Principles of the Typesetting of + Mathematics in TeX: the Program, + TeXtitleEn = The Principles of the Typesetting of + Mathematics in \TeX: the Program, + extra = { + titleCs = Principy matematické sazby v programu TeX, + TeXtitleCs = Principy matematické sazby\\v~programu \TeX, + }, + keywords = {kľúčové slovo 1, kľúčové slovo 2, ...}, + TeXkeywords = {kľúčové slovo 1, kľúčové slovo 2, \ldots}, + keywordsEn = {keyword1, keyword2, ...}, + TeXkeywordsEn = {keyword1, keyword2, \ldots}, + extra = { + keywordsCs = {klíčové slovo 1, klíčové slovo 2, ...}, + TeXkeywordsCs = {klíčové slovo 1, klíčové slovo 2, \ldots}, + }, + abstract = {This is the abstract of my thesis, which can + + span multiple paragraphs.}, + abstractEn = {This is the English abstract of my thesis, which can + + span multiple paragraphs.}, + extra = { + abstractCs = {This is the Czech abstract of my thesis, which can + + span multiple paragraphs.}, + }, + thanks = {These are the acknowledgements for my thesis, which can + + span multiple paragraphs.}, + bib = example.bib, + %% Uncomment the following line (by removing the % symbol at + %% the beginning) and replace `assignment.pdf` with the + %% filename of your scanned thesis assignment. + % assignment = assignment.pdf, +} +\usepackage{makeidx} %% The `makeidx` package contains +\makeindex %% helper commands for index typesetting. +%% These additional packages are used within the document: +\usepackage{paralist} %% Compact list environments +\usepackage{amsmath} %% Mathematics +\usepackage{amsthm} +\usepackage{amsfonts} +\usepackage{url} %% Hyperlinks +\usepackage{markdown} %% Lightweight markup +\usepackage{listings} %% Source code highlighting +\lstset{ + basicstyle = \ttfamily,% + identifierstyle = \color{black},% + keywordstyle = \color{blue},% + keywordstyle = {[2]\color{cyan}},% + keywordstyle = {[3]\color{olive}},% + stringstyle = \color{teal},% + commentstyle = \itshape\color{magenta}} +\usepackage{floatrow} %% Putting captions above tables +\floatsetup[table]{capposition=top} +\begin{document} +\chapter*{Introduction} +\addcontentsline{toc}{chapter}{Introduction} + +Theses are rumoured to be the capstones of education, so I decided +to write one of my own. If all goes well, I will soon have a +diploma under my belt. Wish me luck! + +\begin{otherlanguage}{czech} +Říká se, že závěrečné práce jsou vyvrcholením studia a tak jsem se +rozhodl jednu také napsat. Pokud vše půjde podle plánu, odnesu si +na konci semestru diplom. Držte mi palce! +\end{otherlanguage} + +\begin{otherlanguage}{slovak} +Hovorí sa, že záverečné práce sú vyvrcholením štúdia a tak som sa +rozhodol jednu tiež napísať. Ak všetko pôjde podľa plánu, odnesiem +si na konci semestra diplom. Držte mi palce! +\end{otherlanguage} + +\begin{otherlanguage}{german} +Man munkelt, dass die Dissertation die Krönung der Ausbildung ist. +Deshalb habe ich mich beschlossen meine eigene zu schreiben. Wenn +alles gut geht, bekomme ich bald ein Diplom. Wünsch mir Glück! +\end{otherlanguage} + +\begin{otherlanguage}{russian} +Говорят, что тезис -- это кульминация обучения. Поэтому я и решил +написать собственный тезис. Если всё сработает по плану, я скоро +получу диплом. Желайте мне удачи! +\end{otherlanguage} + +\chapter{These are} +\section{the available} +\subsection{sectioning} +\subsubsection{commands.} +\paragraph{Paragraphs and} +\subparagraph{subparagraphs are available as well.} +Inside the text, you can also use unnumbered lists, +\begin{itemize} + \item such as + \item this one + \begin{itemize} + \item and they can be nested as well. + \item[>>] You can even turn the bullets into something fancier, + \item[\S] if you so desire. + \end{itemize} +\end{itemize} +Numbered lists are +\begin{enumerate} + \item very + \begin{enumerate} + \item similar + \end{enumerate} +\end{enumerate} +and so are description lists: +\begin{description} + \item[Description list] + A list of terms with a description of each term +\end{description} +The spacing of these lists is geared towards paragraphs of text. +For lists of words and phrases, the \textsf{paralist} package +offers commands +\begin{compactitem} + \item that + \begin{compactitem} + \item are + \begin{compactitem} + \item better + \begin{compactitem} + \item suited + \end{compactitem} + \end{compactitem} + \end{compactitem} +\end{compactitem} +\begin{compactenum} + \item to + \begin{compactenum} + \item this + \begin{compactenum} + \item kind of + \begin{compactenum} + \item content. + \end{compactenum} + \end{compactenum} + \end{compactenum} +\end{compactenum} +The \textsf{amsthm} package provides the commands necessary for the +typesetting of mathematical definitions, theorems, lemmas and +proofs. + +%% We will define several mathematical sectioning commands. +\newtheorem{theorem}{Theorem}[section] %% The numbering of theorems + %% will be reset after each section. +\newtheorem{lemma}[theorem]{Lemma} %% The numbering of lemmas +\newtheorem{corollary}[theorem]{Corollary} %% and corollaries will + %% share the counter with theorems. +\theoremstyle{definition} +\newtheorem{definition}{Definition} +\theoremstyle{remark} +\newtheorem*{remark}{Remark} + +\begin{theorem} + This is a theorem that offers a profound insight into the + mathematical sectioning commands. +\end{theorem} +\begin{theorem}[Another theorem] + This is another theorem. Unlike the first one, this theorem has + been endowed with a name. +\end{theorem} +\begin{lemma} + Let us suppose that $x^2+y^2=z^2$. Then + \begin{equation} + \biggl\langle u\biggm|\sum_{i=1}^nF(e_i,v)e_i\biggr\rangle + =F\biggl(\sum_{i=1}^n\langle e_i|u\rangle e_i,v\biggr). + \end{equation} +\end{lemma} +\begin{proof} + $\nabla^2 f(x,y)=\frac{\partial^2f}{\partial x^2}+ + \frac{\partial^2f}{\partial y^2}$. +\end{proof} +\begin{corollary} + This is a corollary. +\end{corollary} +\begin{remark} + This is a remark. +\end{remark} + +\chapter{Floats and references} +\begin{figure} + \begin{center} + %% PNG and JPG images can be inserted into the document as well, + %% but their resolution needs to be adequate. The minimum is + %% about 100 pixels per 1 centimeter or 300 pixels per 1 inch. + %% That means that a JPG or PNG image typeset at 4 × 4 cm should + %% be 400 × 400 px large at the bare minimum. + %% + %% The optimum is about 250 pixels per 1 centimeter or 600 + %% pixels per 1 inch. That means that a JPG or PNG image typeset + %% at 4 × 4 cm should be 1000 × 1000 px large or larger. + \includegraphics[width=4cm]{fithesis/logo/mu/fithesis-base.pdf} + \end{center} + \caption{The logo of the Masaryk University at 40\,mm} + \label{fig:mulogo1} +\end{figure} + +\begin{figure} + \begin{center} + \begin{minipage}{.66\textwidth} + \includegraphics[width=\textwidth]{fithesis/logo/mu/fithesis-base.pdf} + \end{minipage} + \begin{minipage}{.33\textwidth} + \includegraphics[width=\textwidth]{fithesis/logo/mu/fithesis-base.pdf} \\ + \includegraphics[width=\textwidth]{fithesis/logo/mu/fithesis-base.pdf} + \end{minipage} + \end{center} + \caption{The logo of the Masaryk University at $\frac23$ and + $\frac13$ of text width} + \label{fig:mulogo2} +\end{figure} + +\begin{table} + \begin{tabularx}{\textwidth}{lllX} + \toprule + Day & Min Temp & Max Temp & Summary \\ + \midrule + Monday & $13^{\circ}\mathrm{C}$ & $21^\circ\mathrm{C}$ & A + clear day with low wind and no adverse current advisories. \\ + Tuesday & $11^{\circ}\mathrm{C}$ & $17^\circ\mathrm{C}$ & A + trough of low pressure will come from the northwest. \\ + Wednesday & $10^{\circ}\mathrm{C}$ & + $21^\circ\mathrm{C}$ & Rain will spread to all parts during the + morning. \\ + \bottomrule + \end{tabularx} + \caption{A weather forecast} + \label{tab:weather} +\end{table} + +The logo of the Masaryk University is shown in Figure +\ref{fig:mulogo1} and Figure \ref{fig:mulogo2} at pages +\pageref{fig:mulogo1} and \pageref{fig:mulogo2}. The weather +forecast is shown in Table \ref{tab:weather} at page +\pageref{tab:weather}. The following chapter is Chapter +\ref{chap:matheq} and starts at page \pageref{chap:matheq}. +Items \ref{item:star1}, \ref{item:star2}, and +\ref{item:star3} are starred in the following list: +\begin{compactenum} + \item some text + \item some other text + \item $\star$ \label{item:star1} + \begin{compactenum} + \item some text + \item $\star$ \label{item:star2} + \item some other text + \begin{compactenum} + \item some text + \item some other text + \item yet another piece of text + \item $\star$ \label{item:star3} + \end{compactenum} + \item yet another piece of text + \end{compactenum} + \item yet another piece of text +\end{compactenum} +If your reference points to a place that has not yet been typeset, +the \verb"\ref" command will expand to \textbf{??} during the first +run of +\texttt{lualatex \jobname.tex} +and a second run is going to be needed for the references to +resolve. With online services -- such as Overleaf -- this is +performed automatically. + +\chapter{Mathematical equations} +\label{chap:matheq} +\TeX{} comes pre-packed with the ability to typeset inline +equations, such as $\mathrm{e}^{ix}=\cos x+i\sin x$, and display +equations, such as \[ + \mathbf{A}^{-1} = \begin{bmatrix} + a & b \\ c & d \\ + \end{bmatrix}^{-1} = + \frac{1}{\det(\mathbf{A})} \begin{bmatrix} + \,\,\,d & \!\!-b \\ -c & \,a \\ + \end{bmatrix} = + \frac{1}{ad - bc} \begin{bmatrix} + \,\,\,d & \!\!-b \\ -c & \,a \\ + \end{bmatrix}. +\] \LaTeX{} defines the automatically numbered \texttt{equation} +environment: +\begin{equation} + \gamma Px = PAx = PAP^{-1}Px. +\end{equation} +The package \textsf{amsmath} provides several additional +environments that can be used to typeset complex equations: +\begin{enumerate} + \item An equation can be spread over multiple lines using the + \texttt{multline} environment: + \begin{multline} + a + b + c + d + e + f + b + c + d + e + f + b + c + d + e + +f \\ + + f + g + h + i + j + k + l + m + n + o + p + q + \end{multline} + + \item Several aligned equations can be typeset using the + \texttt{align} environment: + \begin{align} + a + b &= c + d \\ + u &= v + w + x \\[1ex] + i + j + k + l &= m + \end{align} + + \item The \texttt{alignat} environment is similar to + \texttt{align}, but it doesn't insert horizontal spaces between + the individual columns: + \begin{alignat}{2} + a + b + c &+ d & &= 0 \\ + e &+ f + g & &= 5 + \end{alignat} + + \item Much like chapter, sections, tables, figures, or list + items, equations -- such as \eqref{eq:first} and + \eqref{eq:mine} -- can also be labeled and referenced: + \begin{alignat}{4} + b_{11}x_1 &+ b_{12}x_2 & &+ b_{13}x_3 & & & + &= y_1, \label{eq:first} \\ + b_{21}x_1 &+ b_{22}x_2 & & & &+ b_{24}x_4 & + &= y_2. \tag{My equation} \label{eq:mine} + \end{alignat} + + \item The \texttt{gather} environment makes it possible to + typeset several equations without any alignment: + \begin{gather} + \psi = \psi\psi, \\ + \eta = \eta\eta\eta\eta\eta\eta, \\ + \theta = \theta. + \end{gather} + + \item Several cases can be typeset using the \texttt{cases} + environment: + \begin{equation} + |y| = \begin{cases} + \phantom-y & \text{if }z\geq0, \\ + -y & \text{otherwise}. + \end{cases} + \end{equation} +\end{enumerate} +For the complete list of environments and commands, consult the +\textsf{amsmath} package manual\footnote{ + See \url{http://mirrors.ctan.org/macros/latex/required/amslatex/math/amsldoc.pdf}. + The \texttt{\textbackslash url} command is provided by the + package \textsf{url}. +}. + +\chapter{\textnormal{We \textsf{have} \texttt{several} \textsc{fonts} + \textit{at} \textbf{disposal}}} +The serified roman font is used for the main body of the text. +\textit{Italics are typically used to denote emphasis or +quotations.} \texttt{The teletype font is typically used for source +code listings.} The \textbf{bold}, \textsc{small-caps} and +\textsf{sans-serif} variants of the base roman font can be used to +denote specific types of information. + +\tiny We \scriptsize can \footnotesize also \small change \normalsize +the \large font \Large size, \LARGE although \huge it \Huge +is \huge usually \LARGE not \Large necessary.\normalsize + +A wide variety of mathematical fonts is also available, such as: \[ + \mathrm{ABC}, \mathcal{ABC}, \mathbf{ABC}, \mathsf{ABC}, + \mathit{ABC}, \mathtt{ABC} +\] By loading the \textsf{amsfonts} packages, several additional +fonts will become available: \[ + \mathfrak{ABC}, \mathbb{ABC} +\] Many other mathematical fonts are available\footnote{ + See \url{http://tex.stackexchange.com/a/58124/70941}. +}. + +\chapter{Using lightweight markup} +\begin{markdown*}{% + hybrid, + definitionLists, + footnotes, + inlineFootnotes, + hashEnumerators, + fencedCode, + citations, + citationNbsps, +} + +If you decide that \LaTeX{} is too wordy for some parts of your +document, there are [packages](https://www.ctan.org/pkg/markdown +"Markdown") that allow you to use more lightweight markup next +to it. + + ![logo](fithesis/logo/mu/fithesis-base.pdf "The logo of the + Masaryk University") + +This is a bullet list. Unlike numbered lists, bulleted lists +contain an **unordered** set of bullet points. When a bullet point +contains multiple paragraphs, the list is typeset as follows: + + * The first item of a bullet list + + that spans several paragraphs, + * the second item of a bullet list, + * the third item of a bullet list. + +When none of the bullet points contains multiple paragraphs, the +list has a more compact form: + + * The first item of a bullet list, + * the second item of a bullet list, + * the third item of a bullet list. + +Unlike a bulleted list, a numbered list implies chronology or +ordering of the bullet points. When a bullet point +contains multiple paragraphs, the list is typeset as follows: + + 1. The first item of an ordered list + + that spans several paragraphs, + 2. the second item of an ordered list, + 3. the third item of an ordered list. + #. If you are feeling lazy, + #. you can use hash enumerators as well. + +When none of the bullet points contains multiple paragraphs, the +list has a more compact form: + + 6. The first item of an ordered list, + 7. the second item of an ordered list, + 8. the third item of an ordered list. + +Definition lists are used to provide definitions of terms. When +a definition contains multiple paragraphs, the list is typeset +as follows: + +Term 1 + +: Definition 1 + +*Term 2* + +: Definition 2 + + Some code, part of Definition 2 + + Third paragraph of Definition 2. + +When none of the bullet points contains multiple paragraphs, the +list has a more compact form: + +Term 1 +: Definition 1 +*Term 2* +: Definition 2 + +Block quotations are used to include an excerpt from an external +document in way that visually clearly separates the excerpt from +the rest of the work: + +> This is the first level of quoting. +> +> > This is nested blockquote. +> +> Back to the first level. + +Footnotes are used to include additional information to the +document that are not necessary for the understanding of the main +text. Here is a footnote reference^[Here is the footnote.] and +another.[^longnote] + +[^longnote]: Here's one with multiple blocks. + + Subsequent paragraphs are indented to show that they +belong to the previous footnote. + + Some code + + The whole paragraph can be indented, or just the first + line. In this way, multi-paragraph footnotes work like + multi-paragraph list items. + +Citations are used to provide bibliographical references to other +documents. This is a regular citation~[@borgman03, p. 123]. This is +an in-text citation: @borgman03\. You can also cite several authors +at once using both regular~[see @borgman03, p. 123; @greenberg98, +sec. 3.2; and @thanh01] and in-text citations: @borgman03 [p.123; +@greenberg98, sec. 3.2; @thanh01]. + +Code blocks are used to include source code listings into the +document: + + #include + #include + #include + #include + // This is a comment + int main(int argc, char **argv) + { + while (--c > 1 && !fork()); + sleep(c = atoi(v[c])); + printf("%d\n", c); + wait(0); + return 0; + } + +There is an alternative syntax for code blocks that allows you to +specify additional information, such as the language of the source +code. This information can be used for syntax highlighting: + +``` sh +#!/bin/sh +fac() { + if [ "$1" -leq 1 ]; then + echo 1 + else + echo $(("$1" * fac $(("$1" - 1)))) + fi +} +`````````````` + +~~~~~~ Ruby +# Here's a way to empty an array. +joe = [ 'eggs.', 'some', 'break', 'to', 'Have' ] +print(joe.pop, " ") while joe.size > 0 +print "\n" +~~~~~~ + +\end{markdown*} + +\chapter{Inserting the bibliography} +After linking a bibliography data\-base files to the document using +the \verb"\"\texttt{thesis\discretionary{-}{}{}setup\{bib\discretionary{=}{=}{=}% +\{\textit{file1},\textit{file2},\,\ldots\,\}\}} command, you can +start citing the entries. This is just dummy text +\parencite{borgman03} lightly sprinkled with citations +\parencite[p.~123]{greenberg98}. Several sources can be cited at +once: \cite{borgman03,greenberg98,thanh01}. +\citetitle{greenberg98} was written by \citeauthor{greenberg98} in +\citeyear{greenberg98}. We can also produce \textcite{greenberg98}% +\ or %% Let us define a compound command: +\def\citeauthoryear#1{(\textcite{#1},~\citeyear{#1})}% +\citeauthoryear{greenberg98}% +. The full bibliographic citation is: +\emph{\fullcite{greenberg98}}. We can easily insert a bibliographic +citation into the footnote\footfullcite{greenberg98}. + +The \verb"\nocite" command will not generate any +output\nocite{muni}, but it will insert its arguments into +the bibliography. The \verb"\nocite{*}" command will insert all the +records in the bibliography database file into the bibliography. +Try uncommenting the command +%% \nocite{*} +and watch the bibliography section come apart at the seams. + +When typesetting the document for the first time, citing a +\texttt{work} will expand to [\textbf{work}] and the +\verb"\printbibliography" command will produce no output. It is now +necessary to generate the bibliography by running \texttt{biber +\jobname.bcf} from the command line and then by typesetting the +document again twice. During the first run, the bibliography +section and the citations will be typeset, and in the second run, +the bibliography section will appear in the table of contents. + +The \texttt{biber} command needs to be executed from within the +directory, where the \LaTeX\ source file is located. In Windows, +the command line can be opened in a directory by holding down the +\textsf{Shift} key and by clicking the right mouse button while +hovering the cursor over a directory. Select the \textsf{Open +Command Window Here} option in the context menu that opens shortly +afterwards. + +With online services -- such as Overleaf -- or when using an +automatic tool -- such as \LaTeX MK -- all commands are executed +automatically. When you omit the \verb"\printbibliography" command, +its location will be decided by the template. + + \printbibliography[heading=bibintoc] %% Print the bibliography. + +\chapter{Inserting the index} +After using the \verb"\makeindex" macro and loading the +\texttt{makeidx} package that provides additional indexing +commands, index entries can be created by issuing the \verb"\index" +command. \index{dummy text|(}It is possible to create ranged index +entries, which will encompass a span of text.\index{dummy text|)} +To insert complex typographic material -- such as $\alpha$ +\index{alpha@$\alpha$} or \TeX{} \index{TeX@\TeX} -- +into the index, you need to specify a text string, which will +determine how the entry will be sorted. It is also possible to +create hierarchal entries. \index{vehicles!trucks} +\index{vehicles!speed cars} + +After typesetting the document, it is necessary to generate the +index by running +\begin{center}% + \texttt{texindy -I latex -C utf8 -L }$\langle$\textit{locale}% + $\rangle$\texttt{ \jobname.idx} +\end{center} +from the command line, where $\langle$\textit{locale}$\rangle$ +corresponds to the main locale of your thesis -- such as +\texttt{english}, and then typesetting the document again. + +The \texttt{texindy} command needs to be executed from within the +directory, where the \LaTeX\ source file is located. In Windows, +the command line can be opened in a directory by holding down the +\textsf{Shift} key and by clicking the right mouse button while +hovering the cursor over a directory. Select the \textsf{Open Command +Window Here} option in the context menu that opens shortly +afterwards. + +With online services -- such as Overleaf -- the commands are +executed automatically, although the locale may be erroneously +detected, or the \texttt{makeindex} tool (which is only able to +sort entries that contain digits and letters of the English +alphabet) may be used instead of \texttt{texindy}. In either case, +the index will be ill-sorted. + + \makeatletter\thesis@blocks@clear\makeatother + \phantomsection %% Print the index and insert it into the + \addcontentsline{toc}{chapter}{\indexname} %% table of contents. + \printindex + +\appendix %% Start the appendices. +\chapter{An appendix} +Here you can insert the appendices of your thesis. + +\end{document} diff --git a/macros/latex/contrib/fithesis/example/mu/sci-pdflatex.pdf b/macros/latex/contrib/fithesis/example/mu/sci-pdflatex.pdf new file mode 100644 index 0000000000..de60004980 Binary files /dev/null and b/macros/latex/contrib/fithesis/example/mu/sci-pdflatex.pdf differ diff --git a/macros/latex/contrib/fithesis/example/mu/sci-pdflatex.tex b/macros/latex/contrib/fithesis/example/mu/sci-pdflatex.tex new file mode 100644 index 0000000000..6b2e09372b --- /dev/null +++ b/macros/latex/contrib/fithesis/example/mu/sci-pdflatex.tex @@ -0,0 +1,700 @@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% I, the copyright holder of this work, release this work into the +%% public domain. This applies worldwide. In some countries this may +%% not be legally possible; if so: I grant anyone the right to use +%% this work for any purpose, without any conditions, unless such +%% conditions are required by law. +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\documentclass[ + digital, %% This option enables the default options for the + %% digital version of a document. Replace with `printed` + %% to enable the default options for the printed version + %% of a document. + twoside, %% This option enables double-sided typesetting. Use at + %% least 120 g/m² paper to prevent show-through. Replace + %% with `oneside` to use one-sided typesetting; use only + %% if you don’t have access to a double-sided printer, + %% or if one-sided typesetting is a formal requirement + %% at your faculty. + table, %% This option causes the coloring of tables. Replace + %% with `notable` to restore plain LaTeX tables. + lof, %% This option prints the List of Figures. Replace with + %% `nolof` to hide the List of Figures. + lot, %% This option prints the List of Tables. Replace with + %% `nolot` to hide the List of Tables. + %% More options are listed in the user guide at + %% . +]{fithesis3} +%% The following section sets up the locales used in the thesis. +\usepackage[resetfonts]{cmap} %% We need to load the T2A font encoding +\usepackage[T1,T2A]{fontenc} %% to use the Cyrillic fonts with Russian texts. +\usepackage[ + main=slovak, %% By using `czech` or `english` as the main locale + %% instead of `slovak`, you can typeset the thesis + %% in either Czech or English, respectively. + english, german, russian, czech, slovak %% The additional keys allow +]{babel} %% foreign texts to be typeset as follows: +%% +%% \begin{otherlanguage}{german} ... \end{otherlanguage} +%% \begin{otherlanguage}{russian} ... \end{otherlanguage} +%% \begin{otherlanguage}{czech} ... \end{otherlanguage} +%% \begin{otherlanguage}{slovak} ... \end{otherlanguage} +%% +%% For non-Latin scripts, it may be necessary to load additional +%% fonts: +\usepackage{paratype} +\def\textrussian#1{{\usefont{T2A}{PTSerif-TLF}{m}{rm}#1}} +%% +%% The following section sets up the metadata of the thesis. +\thesissetup{ + date = \the\year/\the\month/\the\day, + university = mu, + faculty = sci, + department = Ústav matematiky a štatistiky, + departmentEn = Department of Mathematics and + Statistics, + extra = { + departmentCs = Ústav matematiky a statistiky, + }, + programme = Matematika, + programmeEn = Mathematics, + extra = { + programmeCs = Matematika, + }, + field = Finančná a poistná matematika, + fieldEn = Financial and Insurance Mathematics, + extra = { + fieldCs = Finanční a pojistná matematika, + }, + type = bc, + author = Jane Doe, + gender = f, + advisor = John Smith, + title = Princípy matematickej sadzby v programe TeX, + TeXtitle = Princípy matematickej sadzby\\v~programe \TeX, + titleEn = The Principles of the Typesetting of + Mathematics in TeX: the Program, + TeXtitleEn = The Principles of the Typesetting of + Mathematics in \TeX: the Program, + extra = { + titleCs = Principy matematické sazby v programu TeX, + TeXtitleCs = Principy matematické sazby\\v~programu \TeX, + }, + keywords = {kľúčové slovo 1, kľúčové slovo 2, ...}, + TeXkeywords = {kľúčové slovo 1, kľúčové slovo 2, \ldots}, + keywordsEn = {keyword1, keyword2, ...}, + TeXkeywordsEn = {keyword1, keyword2, \ldots}, + extra = { + keywordsCs = {klíčové slovo 1, klíčové slovo 2, ...}, + TeXkeywordsCs = {klíčové slovo 1, klíčové slovo 2, \ldots}, + }, + abstract = {This is the abstract of my thesis, which can + + span multiple paragraphs.}, + abstractEn = {This is the English abstract of my thesis, which can + + span multiple paragraphs.}, + extra = { + abstractCs = {This is the Czech abstract of my thesis, which can + + span multiple paragraphs.}, + }, + thanks = {These are the acknowledgements for my thesis, which can + + span multiple paragraphs.}, + bib = example.bib, + %% Uncomment the following line (by removing the % symbol at + %% the beginning) and replace `assignment.pdf` with the + %% filename of your scanned thesis assignment. + % assignment = assignment.pdf, +} +\usepackage{makeidx} %% The `makeidx` package contains +\makeindex %% helper commands for index typesetting. +%% These additional packages are used within the document: +\usepackage{paralist} %% Compact list environments +\usepackage{amsmath} %% Mathematics +\usepackage{amsthm} +\usepackage{amsfonts} +\usepackage{url} %% Hyperlinks +\usepackage{markdown} %% Lightweight markup +\usepackage{listings} %% Source code highlighting +\lstset{ + basicstyle = \ttfamily,% + identifierstyle = \color{black},% + keywordstyle = \color{blue},% + keywordstyle = {[2]\color{cyan}},% + keywordstyle = {[3]\color{olive}},% + stringstyle = \color{teal},% + commentstyle = \itshape\color{magenta}} +\usepackage{floatrow} %% Putting captions above tables +\floatsetup[table]{capposition=top} +\begin{document} +\chapter*{Introduction} +\addcontentsline{toc}{chapter}{Introduction} + +Theses are rumoured to be the capstones of education, so I decided +to write one of my own. If all goes well, I will soon have a +diploma under my belt. Wish me luck! + +\begin{otherlanguage}{czech} +Říká se, že závěrečné práce jsou vyvrcholením studia a tak jsem se +rozhodl jednu také napsat. Pokud vše půjde podle plánu, odnesu si +na konci semestru diplom. Držte mi palce! +\end{otherlanguage} + +\begin{otherlanguage}{slovak} +Hovorí sa, že záverečné práce sú vyvrcholením štúdia a tak som sa +rozhodol jednu tiež napísať. Ak všetko pôjde podľa plánu, odnesiem +si na konci semestra diplom. Držte mi palce! +\end{otherlanguage} + +\begin{otherlanguage}{german} +Man munkelt, dass die Dissertation die Krönung der Ausbildung ist. +Deshalb habe ich mich beschlossen meine eigene zu schreiben. Wenn +alles gut geht, bekomme ich bald ein Diplom. Wünsch mir Glück! +\end{otherlanguage} + +\begin{otherlanguage}{russian}\textrussian{% +Говорят, что тезис -- это кульминация обучения. Поэтому я и решил +написать собственный тезис. Если всё сработает по плану, я скоро +получу диплом. Желайте мне удачи! +}\end{otherlanguage} + +\chapter{These are} +\section{the available} +\subsection{sectioning} +\subsubsection{commands.} +\paragraph{Paragraphs and} +\subparagraph{subparagraphs are available as well.} +Inside the text, you can also use unnumbered lists, +\begin{itemize} + \item such as + \item this one + \begin{itemize} + \item and they can be nested as well. + \item[>>] You can even turn the bullets into something fancier, + \item[\S] if you so desire. + \end{itemize} +\end{itemize} +Numbered lists are +\begin{enumerate} + \item very + \begin{enumerate} + \item similar + \end{enumerate} +\end{enumerate} +and so are description lists: +\begin{description} + \item[Description list] + A list of terms with a description of each term +\end{description} +The spacing of these lists is geared towards paragraphs of text. +For lists of words and phrases, the \textsf{paralist} package +offers commands +\begin{compactitem} + \item that + \begin{compactitem} + \item are + \begin{compactitem} + \item better + \begin{compactitem} + \item suited + \end{compactitem} + \end{compactitem} + \end{compactitem} +\end{compactitem} +\begin{compactenum} + \item to + \begin{compactenum} + \item this + \begin{compactenum} + \item kind of + \begin{compactenum} + \item content. + \end{compactenum} + \end{compactenum} + \end{compactenum} +\end{compactenum} +The \textsf{amsthm} package provides the commands necessary for the +typesetting of mathematical definitions, theorems, lemmas and +proofs. + +%% We will define several mathematical sectioning commands. +\newtheorem{theorem}{Theorem}[section] %% The numbering of theorems + %% will be reset after each section. +\newtheorem{lemma}[theorem]{Lemma} %% The numbering of lemmas +\newtheorem{corollary}[theorem]{Corollary} %% and corollaries will + %% share the counter with theorems. +\theoremstyle{definition} +\newtheorem{definition}{Definition} +\theoremstyle{remark} +\newtheorem*{remark}{Remark} + +\begin{theorem} + This is a theorem that offers a profound insight into the + mathematical sectioning commands. +\end{theorem} +\begin{theorem}[Another theorem] + This is another theorem. Unlike the first one, this theorem has + been endowed with a name. +\end{theorem} +\begin{lemma} + Let us suppose that $x^2+y^2=z^2$. Then + \begin{equation} + \biggl\langle u\biggm|\sum_{i=1}^nF(e_i,v)e_i\biggr\rangle + =F\biggl(\sum_{i=1}^n\langle e_i|u\rangle e_i,v\biggr). + \end{equation} +\end{lemma} +\begin{proof} + $\nabla^2 f(x,y)=\frac{\partial^2f}{\partial x^2}+ + \frac{\partial^2f}{\partial y^2}$. +\end{proof} +\begin{corollary} + This is a corollary. +\end{corollary} +\begin{remark} + This is a remark. +\end{remark} + +\chapter{Floats and references} +\begin{figure} + \begin{center} + %% PNG and JPG images can be inserted into the document as well, + %% but their resolution needs to be adequate. The minimum is + %% about 100 pixels per 1 centimeter or 300 pixels per 1 inch. + %% That means that a JPG or PNG image typeset at 4 × 4 cm should + %% be 400 × 400 px large at the bare minimum. + %% + %% The optimum is about 250 pixels per 1 centimeter or 600 + %% pixels per 1 inch. That means that a JPG or PNG image typeset + %% at 4 × 4 cm should be 1000 × 1000 px large or larger. + \includegraphics[width=4cm]{fithesis/logo/mu/fithesis-base.pdf} + \end{center} + \caption{The logo of the Masaryk University at 40\,mm} + \label{fig:mulogo1} +\end{figure} + +\begin{figure} + \begin{center} + \begin{minipage}{.66\textwidth} + \includegraphics[width=\textwidth]{fithesis/logo/mu/fithesis-base.pdf} + \end{minipage} + \begin{minipage}{.33\textwidth} + \includegraphics[width=\textwidth]{fithesis/logo/mu/fithesis-base.pdf} \\ + \includegraphics[width=\textwidth]{fithesis/logo/mu/fithesis-base.pdf} + \end{minipage} + \end{center} + \caption{The logo of the Masaryk University at $\frac23$ and + $\frac13$ of text width} + \label{fig:mulogo2} +\end{figure} + +\begin{table} + \begin{tabularx}{\textwidth}{lllX} + \toprule + Day & Min Temp & Max Temp & Summary \\ + \midrule + Monday & $13^{\circ}\mathrm{C}$ & $21^\circ\mathrm{C}$ & A + clear day with low wind and no adverse current advisories. \\ + Tuesday & $11^{\circ}\mathrm{C}$ & $17^\circ\mathrm{C}$ & A + trough of low pressure will come from the northwest. \\ + Wednesday & $10^{\circ}\mathrm{C}$ & + $21^\circ\mathrm{C}$ & Rain will spread to all parts during the + morning. \\ + \bottomrule + \end{tabularx} + \caption{A weather forecast} + \label{tab:weather} +\end{table} + +The logo of the Masaryk University is shown in Figure +\ref{fig:mulogo1} and Figure \ref{fig:mulogo2} at pages +\pageref{fig:mulogo1} and \pageref{fig:mulogo2}. The weather +forecast is shown in Table \ref{tab:weather} at page +\pageref{tab:weather}. The following chapter is Chapter +\ref{chap:matheq} and starts at page \pageref{chap:matheq}. +Items \ref{item:star1}, \ref{item:star2}, and +\ref{item:star3} are starred in the following list: +\begin{compactenum} + \item some text + \item some other text + \item $\star$ \label{item:star1} + \begin{compactenum} + \item some text + \item $\star$ \label{item:star2} + \item some other text + \begin{compactenum} + \item some text + \item some other text + \item yet another piece of text + \item $\star$ \label{item:star3} + \end{compactenum} + \item yet another piece of text + \end{compactenum} + \item yet another piece of text +\end{compactenum} +If your reference points to a place that has not yet been typeset, +the \verb"\ref" command will expand to \textbf{??} during the first +run of +\texttt{pdflatex \jobname.tex} +and a second run is going to be needed for the references to +resolve. With online services -- such as Overleaf -- this is +performed automatically. + +\chapter{Mathematical equations} +\label{chap:matheq} +\TeX{} comes pre-packed with the ability to typeset inline +equations, such as $\mathrm{e}^{ix}=\cos x+i\sin x$, and display +equations, such as \[ + \mathbf{A}^{-1} = \begin{bmatrix} + a & b \\ c & d \\ + \end{bmatrix}^{-1} = + \frac{1}{\det(\mathbf{A})} \begin{bmatrix} + \,\,\,d & \!\!-b \\ -c & \,a \\ + \end{bmatrix} = + \frac{1}{ad - bc} \begin{bmatrix} + \,\,\,d & \!\!-b \\ -c & \,a \\ + \end{bmatrix}. +\] \LaTeX{} defines the automatically numbered \texttt{equation} +environment: +\begin{equation} + \gamma Px = PAx = PAP^{-1}Px. +\end{equation} +The package \textsf{amsmath} provides several additional +environments that can be used to typeset complex equations: +\begin{enumerate} + \item An equation can be spread over multiple lines using the + \texttt{multline} environment: + \begin{multline} + a + b + c + d + e + f + b + c + d + e + f + b + c + d + e + +f \\ + + f + g + h + i + j + k + l + m + n + o + p + q + \end{multline} + + \item Several aligned equations can be typeset using the + \texttt{align} environment: + \begin{align} + a + b &= c + d \\ + u &= v + w + x \\[1ex] + i + j + k + l &= m + \end{align} + + \item The \texttt{alignat} environment is similar to + \texttt{align}, but it doesn't insert horizontal spaces between + the individual columns: + \begin{alignat}{2} + a + b + c &+ d & &= 0 \\ + e &+ f + g & &= 5 + \end{alignat} + + \item Much like chapter, sections, tables, figures, or list + items, equations -- such as \eqref{eq:first} and + \eqref{eq:mine} -- can also be labeled and referenced: + \begin{alignat}{4} + b_{11}x_1 &+ b_{12}x_2 & &+ b_{13}x_3 & & & + &= y_1, \label{eq:first} \\ + b_{21}x_1 &+ b_{22}x_2 & & & &+ b_{24}x_4 & + &= y_2. \tag{My equation} \label{eq:mine} + \end{alignat} + + \item The \texttt{gather} environment makes it possible to + typeset several equations without any alignment: + \begin{gather} + \psi = \psi\psi, \\ + \eta = \eta\eta\eta\eta\eta\eta, \\ + \theta = \theta. + \end{gather} + + \item Several cases can be typeset using the \texttt{cases} + environment: + \begin{equation} + |y| = \begin{cases} + \phantom-y & \text{if }z\geq0, \\ + -y & \text{otherwise}. + \end{cases} + \end{equation} +\end{enumerate} +For the complete list of environments and commands, consult the +\textsf{amsmath} package manual\footnote{ + See \url{http://mirrors.ctan.org/macros/latex/required/amslatex/math/amsldoc.pdf}. + The \texttt{\textbackslash url} command is provided by the + package \textsf{url}. +}. + +\chapter{\textnormal{We \textsf{have} \texttt{several} \textsc{fonts} + \textit{at} \textbf{disposal}}} +The serified roman font is used for the main body of the text. +\textit{Italics are typically used to denote emphasis or +quotations.} \texttt{The teletype font is typically used for source +code listings.} The \textbf{bold}, \textsc{small-caps} and +\textsf{sans-serif} variants of the base roman font can be used to +denote specific types of information. + +\tiny We \scriptsize can \footnotesize also \small change \normalsize +the \large font \Large size, \LARGE although \huge it \Huge +is \huge usually \LARGE not \Large necessary.\normalsize + +A wide variety of mathematical fonts is also available, such as: \[ + \mathrm{ABC}, \mathcal{ABC}, \mathbf{ABC}, \mathsf{ABC}, + \mathit{ABC}, \mathtt{ABC} +\] By loading the \textsf{amsfonts} packages, several additional +fonts will become available: \[ + \mathfrak{ABC}, \mathbb{ABC} +\] Many other mathematical fonts are available\footnote{ + See \url{http://tex.stackexchange.com/a/58124/70941}. +}. + +\chapter{Using lightweight markup} +\shorthandoff{-} +\begin{markdown*}{% + hybrid, + definitionLists, + footnotes, + inlineFootnotes, + hashEnumerators, + fencedCode, + citations, + citationNbsps, +} + +If you decide that \LaTeX{} is too wordy for some parts of your +document, there are [packages](https://www.ctan.org/pkg/markdown +"Markdown") that allow you to use more lightweight markup next +to it. + + ![logo](fithesis/logo/mu/fithesis-base.pdf "The logo of the + Masaryk University") + +This is a bullet list. Unlike numbered lists, bulleted lists +contain an **unordered** set of bullet points. When a bullet point +contains multiple paragraphs, the list is typeset as follows: + + * The first item of a bullet list + + that spans several paragraphs, + * the second item of a bullet list, + * the third item of a bullet list. + +When none of the bullet points contains multiple paragraphs, the +list has a more compact form: + + * The first item of a bullet list, + * the second item of a bullet list, + * the third item of a bullet list. + +Unlike a bulleted list, a numbered list implies chronology or +ordering of the bullet points. When a bullet point +contains multiple paragraphs, the list is typeset as follows: + + 1. The first item of an ordered list + + that spans several paragraphs, + 2. the second item of an ordered list, + 3. the third item of an ordered list. + #. If you are feeling lazy, + #. you can use hash enumerators as well. + +When none of the bullet points contains multiple paragraphs, the +list has a more compact form: + + 6. The first item of an ordered list, + 7. the second item of an ordered list, + 8. the third item of an ordered list. + +Definition lists are used to provide definitions of terms. When +a definition contains multiple paragraphs, the list is typeset +as follows: + +Term 1 + +: Definition 1 + +*Term 2* + +: Definition 2 + + Some code, part of Definition 2 + + Third paragraph of Definition 2. + +When none of the bullet points contains multiple paragraphs, the +list has a more compact form: + +Term 1 +: Definition 1 +*Term 2* +: Definition 2 + +Block quotations are used to include an excerpt from an external +document in way that visually clearly separates the excerpt from +the rest of the work: + +> This is the first level of quoting. +> +> > This is nested blockquote. +> +> Back to the first level. + +Footnotes are used to include additional information to the +document that are not necessary for the understanding of the main +text. Here is a footnote reference^[Here is the footnote.] and +another.[^longnote] + +[^longnote]: Here's one with multiple blocks. + + Subsequent paragraphs are indented to show that they +belong to the previous footnote. + + Some code + + The whole paragraph can be indented, or just the first + line. In this way, multi-paragraph footnotes work like + multi-paragraph list items. + +Citations are used to provide bibliographical references to other +documents. This is a regular citation~[@borgman03, p. 123]. This is +an in-text citation: @borgman03\. You can also cite several authors +at once using both regular~[see @borgman03, p. 123; @greenberg98, +sec. 3.2; and @thanh01] and in-text citations: @borgman03 [p.123; +@greenberg98, sec. 3.2; @thanh01]. + +Code blocks are used to include source code listings into the +document: + + #include + #include + #include + #include + // This is a comment + int main(int argc, char **argv) + { + while (--c > 1 && !fork()); + sleep(c = atoi(v[c])); + printf("%d\n", c); + wait(0); + return 0; + } + +There is an alternative syntax for code blocks that allows you to +specify additional information, such as the language of the source +code. This information can be used for syntax highlighting: + +``` sh +#!/bin/sh +fac() { + if [ "$1" -leq 1 ]; then + echo 1 + else + echo $(("$1" * fac $(("$1" - 1)))) + fi +} +`````````````` + +~~~~~~ Ruby +# Here's a way to empty an array. +joe = [ 'eggs.', 'some', 'break', 'to', 'Have' ] +print(joe.pop, " ") while joe.size > 0 +print "\n" +~~~~~~ + +\end{markdown*} +\shorthandon{-} + +\chapter{Inserting the bibliography} +After linking a bibliography data\-base files to the document using +the \verb"\"\texttt{thesis\discretionary{-}{}{}setup\{bib\discretionary{=}{=}{=}% +\{\textit{file1},\textit{file2},\,\ldots\,\}\}} command, you can +start citing the entries. This is just dummy text +\parencite{borgman03} lightly sprinkled with citations +\parencite[p.~123]{greenberg98}. Several sources can be cited at +once: \cite{borgman03,greenberg98,thanh01}. +\citetitle{greenberg98} was written by \citeauthor{greenberg98} in +\citeyear{greenberg98}. We can also produce \textcite{greenberg98}% +\ or %% Let us define a compound command: +\def\citeauthoryear#1{(\textcite{#1},~\citeyear{#1})}% +\citeauthoryear{greenberg98}% +. The full bibliographic citation is: +\emph{\fullcite{greenberg98}}. We can easily insert a bibliographic +citation into the footnote\footfullcite{greenberg98}. + +The \verb"\nocite" command will not generate any +output\nocite{muni}, but it will insert its arguments into +the bibliography. The \verb"\nocite{*}" command will insert all the +records in the bibliography database file into the bibliography. +Try uncommenting the command +%% \nocite{*} +and watch the bibliography section come apart at the seams. + +When typesetting the document for the first time, citing a +\texttt{work} will expand to [\textbf{work}] and the +\verb"\printbibliography" command will produce no output. It is now +necessary to generate the bibliography by running \texttt{biber +\jobname.bcf} from the command line and then by typesetting the +document again twice. During the first run, the bibliography +section and the citations will be typeset, and in the second run, +the bibliography section will appear in the table of contents. + +The \texttt{biber} command needs to be executed from within the +directory, where the \LaTeX\ source file is located. In Windows, +the command line can be opened in a directory by holding down the +\textsf{Shift} key and by clicking the right mouse button while +hovering the cursor over a directory. Select the \textsf{Open +Command Window Here} option in the context menu that opens shortly +afterwards. + +With online services -- such as Overleaf -- or when using an +automatic tool -- such as \LaTeX MK -- all commands are executed +automatically. When you omit the \verb"\printbibliography" command, +its location will be decided by the template. + + \printbibliography[heading=bibintoc] %% Print the bibliography. + +\chapter{Inserting the index} +After using the \verb"\makeindex" macro and loading the +\texttt{makeidx} package that provides additional indexing +commands, index entries can be created by issuing the \verb"\index" +command. \index{dummy text|(}It is possible to create ranged index +entries, which will encompass a span of text.\index{dummy text|)} +To insert complex typographic material -- such as $\alpha$ +\index{alpha@$\alpha$} or \TeX{} \index{TeX@\TeX} -- +into the index, you need to specify a text string, which will +determine how the entry will be sorted. It is also possible to +create hierarchal entries. \index{vehicles!trucks} +\index{vehicles!speed cars} + +After typesetting the document, it is necessary to generate the +index by running +\begin{center}% + \texttt{texindy -I latex -C utf8 -L }$\langle$\textit{locale}% + $\rangle$\texttt{ \jobname.idx} +\end{center} +from the command line, where $\langle$\textit{locale}$\rangle$ +corresponds to the main locale of your thesis -- such as +\texttt{english}, and then typesetting the document again. + +The \texttt{texindy} command needs to be executed from within the +directory, where the \LaTeX\ source file is located. In Windows, +the command line can be opened in a directory by holding down the +\textsf{Shift} key and by clicking the right mouse button while +hovering the cursor over a directory. Select the \textsf{Open Command +Window Here} option in the context menu that opens shortly +afterwards. + +With online services -- such as Overleaf -- the commands are +executed automatically, although the locale may be erroneously +detected, or the \texttt{makeindex} tool (which is only able to +sort entries that contain digits and letters of the English +alphabet) may be used instead of \texttt{texindy}. In either case, +the index will be ill-sorted. + + \makeatletter\thesis@blocks@clear\makeatother + \phantomsection %% Print the index and insert it into the + \addcontentsline{toc}{chapter}{\indexname} %% table of contents. + \printindex + +\appendix %% Start the appendices. +\chapter{An appendix} +Here you can insert the appendices of your thesis. + +\end{document} -- cgit v1.2.3