diff --git a/example.bib b/example.bib new file mode 100644 index 0000000..5732a1a --- /dev/null +++ b/example.bib @@ -0,0 +1,356 @@ +@preamble{ "\newcommand{\noopsort}[1]{} " + # "\newcommand{\printfirst}[2]{#1} " + # "\newcommand{\singleletter}[1]{#1} " + # "\newcommand{\switchargs}[2]{#2#1} " } + +@ARTICLE{article-minimal, + author = {L[eslie] A. Aamport}, + title = {The Gnats and Gnus Document Preparation System}, + journal = {\mbox{G-Animal's} Journal}, + year = 1986, +} + +@ARTICLE{article-full, + author = {L[eslie] A. Aamport}, + title = {The Gnats and Gnus Document Preparation System}, + journal = {\mbox{G-Animal's} Journal}, + year = 1986, + volume = 41, + number = 7, + pages = "73+", + month = jul, + note = "This is a full ARTICLE entry", +} + +The KEY field is here to override the KEY field in the journal being +cross referenced (so is the NOTE field, in addition to its imparting +information). + +@ARTICLE{article-crossref, + crossref = {WHOLE-JOURNAL}, + key = "", + author = {L[eslie] A. Aamport}, + title = {The Gnats and Gnus Document Preparation System}, + pages = "73+", + note = "This is a cross-referencing ARTICLE entry", +} + +@ARTICLE{whole-journal, + key = "GAJ", + journal = {\mbox{G-Animal's} Journal}, + year = 1986, + volume = 41, + number = 7, + month = jul, + note = {The entire issue is devoted to gnats and gnus + (this entry is a cross-referenced ARTICLE (journal))}, +} + +@INBOOK{inbook-minimal, + author = "Donald E. Knuth", + title = "Fundamental Algorithms", + publisher = "Addison-Wesley", + year = "{\noopsort{1973b}}1973", + chapter = "1.2", +} + +@INBOOK{inbook-full, + author = "Donald E. Knuth", + title = "Fundamental Algorithms", + volume = 1, + series = "The Art of Computer Programming", + publisher = "Addison-Wesley", + address = "Reading, Massachusetts", + edition = "Second", + month = "10~" # jan, + year = "{\noopsort{1973b}}1973", + type = "Section", + chapter = "1.2", + pages = "10--119", + note = "This is a full INBOOK entry", +} + +@INBOOK{inbook-crossref, + crossref = "whole-set", + title = "Fundamental Algorithms", + volume = 1, + series = "The Art of Computer Programming", + edition = "Second", + year = "{\noopsort{1973b}}1973", + type = "Section", + chapter = "1.2", + note = "This is a cross-referencing INBOOK entry", +} + +@BOOK{book-minimal, + author = "Donald E. Knuth", + title = "Seminumerical Algorithms", + publisher = "Addison-Wesley", + year = "{\noopsort{1973c}}1981", +} + +@BOOK{book-full, + author = "Donald E. Knuth", + title = "Seminumerical Algorithms", + volume = 2, + series = "The Art of Computer Programming", + publisher = "Addison-Wesley", + address = "Reading, Massachusetts", + edition = "Second", + month = "10~" # jan, + year = "{\noopsort{1973c}}1981", + note = "This is a full BOOK entry", +} + +@BOOK{book-crossref, + crossref = "whole-set", + title = "Seminumerical Algorithms", + volume = 2, + series = "The Art of Computer Programming", + edition = "Second", + year = "{\noopsort{1973c}}1981", + note = "This is a cross-referencing BOOK entry", +} + +@BOOK{whole-set, + author = "Donald E. Knuth", + publisher = "Addison-Wesley", + title = "The Art of Computer Programming", + series = "Four volumes", + year = "{\noopsort{1973a}}{\switchargs{--90}{1968}}", + note = "Seven volumes planned (this is a cross-referenced set of BOOKs)", +} + +@BOOKLET{booklet-minimal, + key = "Kn{\printfirst{v}{1987}}", + title = "The Programming of Computer Art", +} + +@BOOKLET{booklet-full, + author = "Jill C. Knvth", + title = "The Programming of Computer Art", + howpublished = "Vernier Art Center", + address = "Stanford, California", + month = feb, + year = 1988, + note = "This is a full BOOKLET entry", +} + +@INCOLLECTION{incollection-minimal, + author = "Daniel D. Lincoll", + title = "Semigroups of Recurrences", + booktitle = "High Speed Computer and Algorithm Organization", + publisher = "Academic Press", + year = 1977, +} + +@INCOLLECTION{incollection-full, + author = "Daniel D. Lincoll", + title = "Semigroups of Recurrences", + editor = "David J. Lipcoll and D. H. Lawrie and A. H. Sameh", + booktitle = "High Speed Computer and Algorithm Organization", + number = 23, + series = "Fast Computers", + chapter = 3, + type = "Part", + pages = "179--183", + publisher = "Academic Press", + address = "New York", + edition = "Third", + month = sep, + year = 1977, + note = "This is a full INCOLLECTION entry", +} + +@INCOLLECTION{incollection-crossref, + crossref = "whole-collection", + author = "Daniel D. Lincoll", + title = "Semigroups of Recurrences", + pages = "179--183", + note = "This is a cross-referencing INCOLLECTION entry", +} + +@BOOK{whole-collection, + editor = "David J. Lipcoll and D. H. Lawrie and A. H. Sameh", + title = "High Speed Computer and Algorithm Organization", + booktitle = "High Speed Computer and Algorithm Organization", + number = 23, + series = "Fast Computers", + publisher = "Academic Press", + address = "New York", + edition = "Third", + month = sep, + year = 1977, + note = "This is a cross-referenced BOOK (collection) entry", +} + +@MANUAL{manual-minimal, + key = "Manmaker", + title = "The Definitive Computer Manual", +} + +@MANUAL{manual-full, + author = "Larry Manmaker", + title = "The Definitive Computer Manual", + organization = "Chips-R-Us", + address = "Silicon Valley", + edition = "Silver", + month = apr # "-" # may, + year = 1986, + note = "This is a full MANUAL entry", +} + +@MASTERSTHESIS{mastersthesis-minimal, + author = "{\'{E}}douard Masterly", + title = "Mastering Thesis Writing", + school = "Stanford University", + year = 1988, +} + +@MASTERSTHESIS{mastersthesis-full, + author = "{\'{E}}douard Masterly", + title = "Mastering Thesis Writing", + school = "Stanford University", + type = "Master's project", + address = "English Department", + month = jun # "-" # aug, + year = 1988, + note = "This is a full MASTERSTHESIS entry", +} + +@MISC{misc-minimal, + key = "Missilany", + note = "This is a minimal MISC entry", +} + +@MISC{misc-full, + author = "Joe-Bob Missilany", + title = "Handing out random pamphlets in airports", + howpublished = "Handed out at O'Hare", + month = oct, + year = 1984, + note = "This is a full MISC entry", +} + +@STRING{STOC-key = "OX{\singleletter{stoc}}"} + +@STRING{ACM = "The OX Association for Computing Machinery"} + +@STRING{STOC = " Symposium on the Theory of Computing"} + +@INPROCEEDINGS{inproceedings-minimal, + author = "Alfred V. Oaho and Jeffrey D. Ullman and Mihalis Yannakakis", + title = "On Notions of Information Transfer in {VLSI} Circuits", + booktitle = "Proc. Fifteenth Annual ACM" # STOC, + year = 1983, +} + +@INPROCEEDINGS{inproceedings-full, + author = "Alfred V. Oaho and Jeffrey D. Ullman and Mihalis Yannakakis", + title = "On Notions of Information Transfer in {VLSI} Circuits", + editor = "Wizard V. Oz and Mihalis Yannakakis", + booktitle = "Proc. Fifteenth Annual ACM" # STOC, + number = 17, + series = "All ACM Conferences", + pages = "133--139", + month = mar, + year = 1983, + address = "Boston", + organization = ACM, + publisher = "Academic Press", + note = "This is a full INPROCEDINGS entry", +} + +@INPROCEEDINGS{inproceedings-crossref, + crossref = "whole-proceedings", + author = "Alfred V. Oaho and Jeffrey D. Ullman and Mihalis Yannakakis", + title = "On Notions of Information Transfer in {VLSI} Circuits", + organization = "", + pages = "133--139", + note = "This is a cross-referencing INPROCEEDINGS entry", +} + +@PROCEEDINGS{proceedings-minimal, + key = STOC-key, + title = "Proc. Fifteenth Annual" # STOC, + year = 1983, +} + +@PROCEEDINGS{proceedings-full, + editor = "Wizard V. Oz and Mihalis Yannakakis", + title = "Proc. Fifteenth Annual" # STOC, + number = 17, + series = "All ACM Conferences", + month = mar, + year = 1983, + address = "Boston", + organization = ACM, + publisher = "Academic Press", + note = "This is a full PROCEEDINGS entry", +} + +@PROCEEDINGS{whole-proceedings, + key = STOC-key, + organization = ACM, + title = "Proc. Fifteenth Annual" # STOC, + address = "Boston", + year = 1983, + booktitle = "Proc. Fifteenth Annual ACM" # STOC, + note = "This is a cross-referenced PROCEEDINGS", +} + +@PHDTHESIS{phdthesis-minimal, + author = "F. Phidias Phony-Baloney", + title = "Fighting Fire with Fire: Festooning {F}rench Phrases", + school = "Fanstord University", + year = 1988, +} + +@PHDTHESIS{phdthesis-full, + author = "F. Phidias Phony-Baloney", + title = "Fighting Fire with Fire: Festooning {F}rench Phrases", + school = "Fanstord University", + type = "{PhD} Dissertation", + address = "Department of French", + month = jun # "-" # aug, + year = 1988, + note = "This is a full PHDTHESIS entry", +} + +@TECHREPORT{techreport-minimal, + author = "Tom Terrific", + title = "An {$O(n \log n / \! \log\log n)$} Sorting Algorithm", + institution = "Fanstord University", + year = 1988, +} + +@TECHREPORT{techreport-full, + author = "Tom T{\'{e}}rrific", + title = "An {$O(n \log n / \! \log\log n)$} Sorting Algorithm", + institution = "Fanstord University", + type = "Wishful Research Result", + number = "7", + address = "Computer Science Department, Fanstord, California", + month = oct, + year = 1988, + note = "This is a full TECHREPORT entry", +} + +@UNPUBLISHED{unpublished-minimal, + author = "Ulrich {\"{U}}nderwood and Ned {\~N}et and Paul Pot", + title = "Lower Bounds for Wishful Research Results", + note = "Talk at Fanstord University (this is a minimal UNPUBLISHED entry)", +} + +@UNPUBLISHED{unpublished-full, + author = "Ulrich {\"{U}}nderwood and Ned {\~N}et and Paul Pot", + title = "Lower Bounds for Wishful Research Results", + month = nov # ", " # dec, + year = 1988, + note = "Talk at Fanstord University (this is a full UNPUBLISHED entry)", +} + +@MISC{random-note-crossref, + key = {Volume-2}, + note = "Volume~2 is listed under Knuth \cite{book-full}" +} diff --git a/fi-lualatex.tex b/fi-lualatex.tex new file mode 100644 index 0000000..c7472f3 --- /dev/null +++ b/fi-lualatex.tex @@ -0,0 +1,485 @@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% 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. + table, %% Causes the coloring of tables. Replace with `notable` + %% to restore plain tables. + lof, %% Prints the List of Figures. Replace with `nolof` to + %% hide the List of Figures. + lot, %% 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}, +} +\thesislong{abstract}{ + This is the abstract of my thesis, which can + + span multiple paragraphs. +} +\thesislong{thanks}{ + This is the acknowledgement for my thesis, which can + + span multiple paragraphs. +} +%% The following section sets up the bibliography. +\usepackage{csquotes} +\usepackage[ %% When typesetting the bibliography, the + backend=biber, %% `numeric` style will be used for the + style=numeric, %% entries and the `numeric-comp` style + citestyle=numeric-comp, %% for the references to the entries. The + sorting=none, %% entries will be sorted in cite order. + sortlocale=auto %% For more unformation about the available +]{biblatex} %% `style`s and `citestyles`, see: +%% . +\addbibresource{example.bib} %% The bibliograpic database within + %% the file `example.bib` will be used. +\usepackage{makeidx} %% The `makeidx` package contains +\makeindex %% helper commands for index typesetting. +%% These additional packages are used within the document: +\usepackage{paralist} +\usepackage{amsmath} +\usepackage{amsthm} +\usepackage{amsfonts} +\usepackage{url} +\usepackage{menukeys} +\begin{document} +\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{corr}[theorem]{Corrolary} %% and corrolaries 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{corr} + This is a corrolary. +\end{corr} +\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 250 pixels per 1 centimeter. That means that a JPG or + %% PNG image typeset at 40 × 40 mm should be 1000 × 1000 px + %% large at minimum. + \includegraphics[width=40mm]{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{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} + \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{Inserting the bibliography} +After loading the \texttt{biblatex} package and linking a +bibliography data\-base file to the document using the +\verb"\addbibresource" command, you can start citing the entries. +This is just dummy text \cite{inbook-full} lightly sprinkled with +citations \cite[p.~123]{incollection-full}. Several sources can be +cited at once \cite{whole-collection, manual-minimal,manual-full}. +\citetitle{inbook-full} was written by \citeauthor{inbook-full} in +\citeyear{inbook-full}. We can also produce \textcite{inbook-full} +or%% Let us define a compound command: +\def\citeauthoryear#1{(\textcite{#1},~\citeyear{#1})} +\citeauthoryear{inbook-full}. The full bibliographic citation is: +\emph{\fullcite{inbook-full}}. We can easily insert a bibliographic +citation into the footnote\footfullcite{inbook-full}. + +The \verb"\nocite" command will not generate any +output\nocite{booklet-full}, but it will insert its argument 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 +\keys{Shift} key and by clicking the right mouse button while +hovering the cursor over a directory. Select the \menu{Open +Command Window Here} option in the context menu that opens shortly +afterwards. + +With online services -- such as Overleaf -- all commands are +executed automatically. + +{\makeatletter %% Use the correct localization of the quotations. + \thesis@selectLocale{\thesis@locale}\makeatother +\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 +\keys{Shift} key and by clicking the right mouse button while +hovering the cursor over a directory. Select the \menu{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/fi-pdflatex.tex b/fi-pdflatex.tex new file mode 100644 index 0000000..0452b58 --- /dev/null +++ b/fi-pdflatex.tex @@ -0,0 +1,492 @@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% 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. + table, %% Causes the coloring of tables. Replace with `notable` + %% to restore plain tables. + lof, %% Prints the List of Figures. Replace with `nolof` to + %% hide the List of Figures. + lot, %% 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. + 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}, +} +\thesislong{abstract}{ + This is the abstract of my thesis, which can + + span multiple paragraphs. +} +\thesislong{thanks}{ + This is the acknowledgement for my thesis, which can + + span multiple paragraphs. +} +%% The following section sets up the bibliography. +\usepackage{csquotes} +\usepackage[ %% When typesetting the bibliography, the + backend=biber, %% `numeric` style will be used for the + style=numeric, %% entries and the `numeric-comp` style + citestyle=numeric-comp, %% for the references to the entries. The + sorting=none, %% entries will be sorted in cite order. + sortlocale=auto %% For more unformation about the available +]{biblatex} %% `style`s and `citestyles`, see: +%% . +\addbibresource{example.bib} %% The bibliograpic database within + %% the file `example.bib` will be used. +\usepackage{makeidx} %% The `makeidx` package contains +\makeindex %% helper commands for index typesetting. +%% These additional packages are used within the document: +\usepackage{paralist} +\usepackage{amsmath} +\usepackage{amsthm} +\usepackage{amsfonts} +\usepackage{url} +\usepackage{menukeys} +\begin{document} +\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{corr}[theorem]{Corrolary} %% and corrolaries 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{corr} + This is a corrolary. +\end{corr} +\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 250 pixels per 1 centimeter. That means that a JPG or + %% PNG image typeset at 40 × 40 mm should be 1000 × 1000 px + %% large at minimum. + \includegraphics[width=40mm]{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{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} + \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{Inserting the bibliography} +After loading the \texttt{biblatex} package and linking a +bibliography data\-base file to the document using the +\verb"\addbibresource" command, you can start citing the entries. +This is just dummy text \cite{inbook-full} lightly sprinkled with +citations \cite[p.~123]{incollection-full}. Several sources can be +cited at once \cite{whole-collection, manual-minimal,manual-full}. +\citetitle{inbook-full} was written by \citeauthor{inbook-full} in +\citeyear{inbook-full}. We can also produce \textcite{inbook-full} +or%% Let us define a compound command: +\def\citeauthoryear#1{(\textcite{#1},~\citeyear{#1})} +\citeauthoryear{inbook-full}. The full bibliographic citation is: +\emph{\fullcite{inbook-full}}. We can easily insert a bibliographic +citation into the footnote\footfullcite{inbook-full}. + +The \verb"\nocite" command will not generate any +output\nocite{booklet-full}, but it will insert its argument 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 +\keys{Shift} key and by clicking the right mouse button while +hovering the cursor over a directory. Select the \menu{Open +Command Window Here} option in the context menu that opens shortly +afterwards. + +With online services -- such as Overleaf -- all commands are +executed automatically. + +{\csname captions\languagename\endcsname %% Temporarily override +%% the BibLaTeX localization with the original babel definitions. +\makeatletter %% Use the correct localization of the quotations. + \thesis@selectLocale{\thesis@locale}\makeatother +\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 +\keys{Shift} key and by clicking the right mouse button while +hovering the cursor over a directory. Select the \menu{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/fithesis/locale/fithesis-czech.def b/fithesis/locale/fithesis-czech.def new file mode 100644 index 0000000..e4b6ec6 --- /dev/null +++ b/fithesis/locale/fithesis-czech.def @@ -0,0 +1,108 @@ +%% +%% This is file `fithesis-czech.def', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% czech.dtx (with options: `base') +%% +%% Copyright 1998--2015 Daniel Marek (DM), Jan Pavlovič (JP), +%% Vít Novotný (VN), Petr Sojka (PS) +%% http://www.fi.muni.cz/tech/unix/tex/fithesis.xhtml +%% Faculty of Informatics, Masaryk University (Brno, Czech Republic) +%% +%% This work may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either version +%% 1.3 of this license or (at your option) any later version. +%% The latest version of this license is available at +%% +%% http://www.latex-project.org/lppl.txt +%% +%% and version 1.3 or later is part of all distributions of LaTeX +%% version 2005/12/01 or later. +%% +%% This work has the LPPL maintenance status `maintained'. +%% +%% The Current Maintainer of this work is Vít Novotný (VN). +%% Send bug reports, requests for additions and questions +%% either to the fithesis discussion forum at +%% +%% http://is.muni.cz/auth/df/fithesis-sazba/ +%% +%% or to the e-mail address . +%% +%% +%% MODIFICATION ADVICE: +%% +%% If you want to customize this file, it is best to make a copy of +%% the source file(s) from which it was produced. Use a different +%% name for your copy(ies) and modify the copy(ies); this will ensure +%% that your modifications do not get overwritten when you install a +%% new release of the standard system. You should also ensure that +%% your modified source file does not generate any modified file with +%% the same name as a standard file. +%% +%% You will also need to produce your own, suitably named, .ins file to +%% control the generation of files from your source file; this file +%% should contain your own preambles for the files it generates, not +%% those in the standard .ins files. +%% +%% The names of the source files used are shown above. +%% +\ProvidesFile{fithesis/locale/fithesis-czech.def}[2016/03/22] + +\gdef\thesis@czech@gender@koncovka{% + \ifthesis@woman a\fi} + +\gdef\thesis@czech@csquotesStyle{german} + +\gdef\thesis@czech@universityName{Název univerzity} +\gdef\thesis@czech@facultyName{Název fakulty} +\gdef\thesis@czech@assignment{Místo tohoto listu vložte kopii + oficiálního podepsaného zadání práce.} +\gdef\thesis@czech@declaration{Text prohlášení ...} + +\gdef\thesis@czech@spring{jaro} +\gdef\thesis@czech@fall{podzim} +\gdef\thesis@czech@semester{% + \thesis@{czech@\thesis@season} \thesis@seasonYear} + +\gdef\thesis@czech@fieldTitle{Obor} +\gdef\thesis@czech@advisorTitle{Vedoucí práce} +\gdef\thesis@czech@authorTitle{Autor} +\gdef\thesis@czech@abstractTitle{Shrnutí} +\gdef\thesis@czech@keywordsTitle{Klíčová slova} +\gdef\thesis@czech@thanksTitle{Poděkování} +\gdef\thesis@czech@declarationTitle{Prohlášení} +\gdef\thesis@czech@idTitle{ID} +\gdef\thesis@czech@typeName{% + \ifx\thesis@type\thesis@sempaper + Seminární práce% + \else\ifx\thesis@type\thesis@bachelors + Bakalářská práce% + \else\ifx\thesis@type\thesis@masters + Diplomová práce% + \else\ifx\thesis@type\thesis@doctoral + Disertační práce% + \else\ifx\thesis@type\thesis@rigorous + Rigorózní práce% + \else + <>% + \fi\fi\fi\fi\fi} +\gdef\thesis@czech@typeName@akuzativ{% + \ifx\thesis@type\thesis@sempaper + Seminární práci% + \else\ifx\thesis@type\thesis@bachelors + Bakalářskou práci% + \else\ifx\thesis@type\thesis@masters + Diplomovou práci% + \else\ifx\thesis@type\thesis@doctoral + Disertační práci% + \else\ifx\thesis@type\thesis@rigorous + Rigorózní práci% + \else + <>% + \fi\fi\fi\fi\fi} +\endinput +%% +%% End of file `fithesis-czech.def'. diff --git a/fithesis/locale/fithesis-english.def b/fithesis/locale/fithesis-english.def new file mode 100644 index 0000000..9836e02 --- /dev/null +++ b/fithesis/locale/fithesis-english.def @@ -0,0 +1,91 @@ +%% +%% This is file `fithesis-english.def', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% english.dtx (with options: `base') +%% +%% Copyright 1998--2015 Daniel Marek (DM), Jan Pavlovič (JP), +%% Vít Novotný (VN), Petr Sojka (PS) +%% http://www.fi.muni.cz/tech/unix/tex/fithesis.xhtml +%% Faculty of Informatics, Masaryk University (Brno, Czech Republic) +%% +%% This work may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either version +%% 1.3 of this license or (at your option) any later version. +%% The latest version of this license is available at +%% +%% http://www.latex-project.org/lppl.txt +%% +%% and version 1.3 or later is part of all distributions of LaTeX +%% version 2005/12/01 or later. +%% +%% This work has the LPPL maintenance status `maintained'. +%% +%% The Current Maintainer of this work is Vít Novotný (VN). +%% Send bug reports, requests for additions and questions +%% either to the fithesis discussion forum at +%% +%% http://is.muni.cz/auth/df/fithesis-sazba/ +%% +%% or to the e-mail address . +%% +%% +%% MODIFICATION ADVICE: +%% +%% If you want to customize this file, it is best to make a copy of +%% the source file(s) from which it was produced. Use a different +%% name for your copy(ies) and modify the copy(ies); this will ensure +%% that your modifications do not get overwritten when you install a +%% new release of the standard system. You should also ensure that +%% your modified source file does not generate any modified file with +%% the same name as a standard file. +%% +%% You will also need to produce your own, suitably named, .ins file to +%% control the generation of files from your source file; this file +%% should contain your own preambles for the files it generates, not +%% those in the standard .ins files. +%% +%% The names of the source files used are shown above. +%% +\ProvidesFile{fithesis/locale/fithesis-english.def}[2016/03/22] + +\gdef\thesis@english@universityName{University name} +\gdef\thesis@english@facultyName{Faculty name} +\gdef\thesis@english@assignment{Replace this page with a copy + of the official signed thesis assignment.} +\gdef\thesis@english@declaration{Declaration text ...} + +\gdef\thesis@english@csquotesStyle{english} + +\gdef\thesis@english@spring{Spring} +\gdef\thesis@english@fall{Fall} +\gdef\thesis@english@semester{% + \thesis@{english@\thesis@season} \thesis@seasonYear} + +\gdef\thesis@english@fieldTitle{Field of study} +\gdef\thesis@english@advisorTitle{Advisor} +\gdef\thesis@english@authorTitle{Author} +\gdef\thesis@english@abstractTitle{Abstract} +\gdef\thesis@english@keywordsTitle{Keywords} +\gdef\thesis@english@thanksTitle{Acknowledgement} +\gdef\thesis@english@declarationTitle{Declaration} +\gdef\thesis@english@idTitle{ID} +\gdef\thesis@english@typeName{% + \ifx\thesis@type\thesis@sempaper + Seminar Paper% + \else\ifx\thesis@type\thesis@bachelors + Bachelor's Thesis% + \else\ifx\thesis@type\thesis@masters + Master's Thesis% + \else\ifx\thesis@type\thesis@doctoral + Doctoral Thesis% + \else\ifx\thesis@type\thesis@rigorous + Rigorous Thesis% + \else + <>% + \fi\fi\fi\fi\fi} +\endinput +%% +%% End of file `fithesis-english.def'. diff --git a/fithesis/locale/fithesis-slovak.def b/fithesis/locale/fithesis-slovak.def new file mode 100644 index 0000000..c82a19d --- /dev/null +++ b/fithesis/locale/fithesis-slovak.def @@ -0,0 +1,109 @@ +%% +%% This is file `fithesis-slovak.def', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% slovak.dtx (with options: `base') +%% +%% Copyright 1998--2015 Daniel Marek (DM), Jan Pavlovič (JP), +%% Vít Novotný (VN), Petr Sojka (PS) +%% http://www.fi.muni.cz/tech/unix/tex/fithesis.xhtml +%% Faculty of Informatics, Masaryk University (Brno, Czech Republic) +%% +%% This work may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either version +%% 1.3 of this license or (at your option) any later version. +%% The latest version of this license is available at +%% +%% http://www.latex-project.org/lppl.txt +%% +%% and version 1.3 or later is part of all distributions of LaTeX +%% version 2005/12/01 or later. +%% +%% This work has the LPPL maintenance status `maintained'. +%% +%% The Current Maintainer of this work is Vít Novotný (VN). +%% Send bug reports, requests for additions and questions +%% either to the fithesis discussion forum at +%% +%% http://is.muni.cz/auth/df/fithesis-sazba/ +%% +%% or to the e-mail address . +%% +%% +%% MODIFICATION ADVICE: +%% +%% If you want to customize this file, it is best to make a copy of +%% the source file(s) from which it was produced. Use a different +%% name for your copy(ies) and modify the copy(ies); this will ensure +%% that your modifications do not get overwritten when you install a +%% new release of the standard system. You should also ensure that +%% your modified source file does not generate any modified file with +%% the same name as a standard file. +%% +%% You will also need to produce your own, suitably named, .ins file to +%% control the generation of files from your source file; this file +%% should contain your own preambles for the files it generates, not +%% those in the standard .ins files. +%% +%% The names of the source files used are shown above. +%% +\ProvidesFile{fithesis/locale/fithesis-slovak.def}[2016/03/22] + +\gdef\thesis@slovak@gender@koncovka{% + \ifthesis@woman a\fi} + +\gdef\thesis@slovak@csquotesStyle{german} + +\gdef\thesis@slovak@universityName{Názov univerzity} +\gdef\thesis@slovak@facultyName{Názov fakulty} +\gdef\thesis@slovak@assignment{Namiesto tejto stránky vložte kópiu + oficiálneho podpísaného zadania práce.} +\gdef\thesis@slovak@declaration{Text prehlásenie ...} + +\gdef\thesis@slovak@spring{jar} +\gdef\thesis@slovak@fall{jeseň} +\gdef\thesis@slovak@semester{% + \thesis@{slovak@\thesis@season} \thesis@seasonYear} + +\gdef\thesis@slovak@fieldTitle{Odbor} +\gdef\thesis@slovak@advisorTitle{Vedúci práce} +\gdef\thesis@slovak@authorTitle{Autor} +\gdef\thesis@slovak@abstractTitle{Zhrnutie} +\gdef\thesis@slovak@keywordsTitle{Kľúčové slová} +\gdef\thesis@slovak@thanksTitle{Poďakovanie} +\gdef\thesis@slovak@declarationTitle{Prehlásenie} +\gdef\thesis@slovak@idTitle{ID} +\gdef\thesis@slovak@typeName{% + \ifx\thesis@type\thesis@sempaper + Seminárna práca% + \else\ifx\thesis@type\thesis@bachelors + Bakalárska práca% + \else\ifx\thesis@type\thesis@masters + Diplomová práca% + \else\ifx\thesis@type\thesis@doctoral + Dizertačná práca% + \else\ifx\thesis@type\thesis@rigorous + Rigorózna práca% + \else + <>% + \fi\fi\fi\fi\fi} +\gdef\thesis@slovak@typeName@akuzativ{% + \ifx\thesis@type\thesis@sempaper + Seminárnu prácu% + \else\ifx\thesis@type\thesis@bachelors + Bakalársku prácu% + \else\ifx\thesis@type\thesis@masters + Diplomovú prácu% + \else\ifx\thesis@type\thesis@doctoral + Dizertačnú prácu% + \else\ifx\thesis@type\thesis@rigorous + Rigoróznu prácu% + \else + <>% + \fi\fi\fi\fi\fi} + +\endinput +%% +%% End of file `fithesis-slovak.def'. diff --git a/fithesis/locale/mu/fi/fithesis-czech.def b/fithesis/locale/mu/fi/fithesis-czech.def new file mode 100644 index 0000000..8f5ef09 --- /dev/null +++ b/fithesis/locale/mu/fi/fithesis-czech.def @@ -0,0 +1,70 @@ +%% +%% This is file `mu/fi/fithesis-czech.def', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% czech.dtx (with options: `mu/fi') +%% +%% Copyright 1998--2015 Daniel Marek (DM), Jan Pavlovič (JP), +%% Vít Novotný (VN), Petr Sojka (PS) +%% http://www.fi.muni.cz/tech/unix/tex/fithesis.xhtml +%% Faculty of Informatics, Masaryk University (Brno, Czech Republic) +%% +%% This work may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either version +%% 1.3 of this license or (at your option) any later version. +%% The latest version of this license is available at +%% +%% http://www.latex-project.org/lppl.txt +%% +%% and version 1.3 or later is part of all distributions of LaTeX +%% version 2005/12/01 or later. +%% +%% This work has the LPPL maintenance status `maintained'. +%% +%% The Current Maintainer of this work is Vít Novotný (VN). +%% Send bug reports, requests for additions and questions +%% either to the fithesis discussion forum at +%% +%% http://is.muni.cz/auth/df/fithesis-sazba/ +%% +%% or to the e-mail address . +%% +%% +%% MODIFICATION ADVICE: +%% +%% If you want to customize this file, it is best to make a copy of +%% the source file(s) from which it was produced. Use a different +%% name for your copy(ies) and modify the copy(ies); this will ensure +%% that your modifications do not get overwritten when you install a +%% new release of the standard system. You should also ensure that +%% your modified source file does not generate any modified file with +%% the same name as a standard file. +%% +%% You will also need to produce your own, suitably named, .ins file to +%% control the generation of files from your source file; this file +%% should contain your own preambles for the files it generates, not +%% those in the standard .ins files. +%% +%% The names of the source files used are shown above. +%% +\ProvidesFile{fithesis/locale/mu/fi/fithesis-czech.def}[2015/06/26] + +\gdef\thesis@czech@facultyName{Fakulta informatiky} +\gdef\thesis@czech@assignment{Místo tohoto listu + vložte kopie oficiálního podepsaného zadání práce a + prohlášení autora školního díla.} +\gdef\thesis@czech@declaration{% + Prohlašuji, že tato \thesis@lower{czech@typeName} je mým + původním autorským dílem, které jsem vypracoval% + \thesis@czech@gender@koncovka\ samostatně. Všechny zdroje, + prameny a literaturu, které jsem při vypracování + používal\thesis@czech@gender@koncovka\ nebo z~nich + čerpal\thesis@czech@gender@koncovka, v~práci řádně cituji + s~uvedením úplného odkazu na příslušný zdroj.} + +\gdef\thesis@czech@advisorSignature{Podpis vedoucího} +\endinput +%% +%% End of file `mu/fi/fithesis-czech.def'. diff --git a/fithesis/locale/mu/fi/fithesis-english.def b/fithesis/locale/mu/fi/fithesis-english.def new file mode 100644 index 0000000..971b6f6 --- /dev/null +++ b/fithesis/locale/mu/fi/fithesis-english.def @@ -0,0 +1,63 @@ +%% +%% This is file `mu/fi/fithesis-english.def', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% english.dtx (with options: `mu/fi') +%% +%% Copyright 1998--2015 Daniel Marek (DM), Jan Pavlovič (JP), +%% Vít Novotný (VN), Petr Sojka (PS) +%% http://www.fi.muni.cz/tech/unix/tex/fithesis.xhtml +%% Faculty of Informatics, Masaryk University (Brno, Czech Republic) +%% +%% This work may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either version +%% 1.3 of this license or (at your option) any later version. +%% The latest version of this license is available at +%% +%% http://www.latex-project.org/lppl.txt +%% +%% and version 1.3 or later is part of all distributions of LaTeX +%% version 2005/12/01 or later. +%% +%% This work has the LPPL maintenance status `maintained'. +%% +%% The Current Maintainer of this work is Vít Novotný (VN). +%% Send bug reports, requests for additions and questions +%% either to the fithesis discussion forum at +%% +%% http://is.muni.cz/auth/df/fithesis-sazba/ +%% +%% or to the e-mail address . +%% +%% +%% MODIFICATION ADVICE: +%% +%% If you want to customize this file, it is best to make a copy of +%% the source file(s) from which it was produced. Use a different +%% name for your copy(ies) and modify the copy(ies); this will ensure +%% that your modifications do not get overwritten when you install a +%% new release of the standard system. You should also ensure that +%% your modified source file does not generate any modified file with +%% the same name as a standard file. +%% +%% You will also need to produce your own, suitably named, .ins file to +%% control the generation of files from your source file; this file +%% should contain your own preambles for the files it generates, not +%% those in the standard .ins files. +%% +%% The names of the source files used are shown above. +%% +\ProvidesFile{fithesis/locale/mu/fi/fithesis-english.def}[2015/06/26] + +\gdef\thesis@english@facultyName{Faculty of Informatics} +\gdef\thesis@english@assignment{Replace this page with a copy + of the official signed thesis assignment and the copy of the + Statement of an Author.} + +\gdef\thesis@english@advisorSignature{Signature of Thesis + \thesis@english@advisorTitle} +\endinput +%% +%% End of file `mu/fi/fithesis-english.def'. diff --git a/fithesis/locale/mu/fi/fithesis-slovak.def b/fithesis/locale/mu/fi/fithesis-slovak.def new file mode 100644 index 0000000..33f67f0 --- /dev/null +++ b/fithesis/locale/mu/fi/fithesis-slovak.def @@ -0,0 +1,71 @@ +%% +%% This is file `mu/fi/fithesis-slovak.def', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% slovak.dtx (with options: `mu/fi') +%% +%% Copyright 1998--2015 Daniel Marek (DM), Jan Pavlovič (JP), +%% Vít Novotný (VN), Petr Sojka (PS) +%% http://www.fi.muni.cz/tech/unix/tex/fithesis.xhtml +%% Faculty of Informatics, Masaryk University (Brno, Czech Republic) +%% +%% This work may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either version +%% 1.3 of this license or (at your option) any later version. +%% The latest version of this license is available at +%% +%% http://www.latex-project.org/lppl.txt +%% +%% and version 1.3 or later is part of all distributions of LaTeX +%% version 2005/12/01 or later. +%% +%% This work has the LPPL maintenance status `maintained'. +%% +%% The Current Maintainer of this work is Vít Novotný (VN). +%% Send bug reports, requests for additions and questions +%% either to the fithesis discussion forum at +%% +%% http://is.muni.cz/auth/df/fithesis-sazba/ +%% +%% or to the e-mail address . +%% +%% +%% MODIFICATION ADVICE: +%% +%% If you want to customize this file, it is best to make a copy of +%% the source file(s) from which it was produced. Use a different +%% name for your copy(ies) and modify the copy(ies); this will ensure +%% that your modifications do not get overwritten when you install a +%% new release of the standard system. You should also ensure that +%% your modified source file does not generate any modified file with +%% the same name as a standard file. +%% +%% You will also need to produce your own, suitably named, .ins file to +%% control the generation of files from your source file; this file +%% should contain your own preambles for the files it generates, not +%% those in the standard .ins files. +%% +%% The names of the source files used are shown above. +%% + +\ProvidesFile{fithesis/locale/mu/fi/fithesis-slovak.def}[2015/06/26] + +\gdef\thesis@slovak@facultyName{Fakulta informatiky} +\gdef\thesis@slovak@assignment{Namiesto tejto stránky vložte kópiu + oficiálneho podpísaného zadania práce a prehlásenie autora + školského diela.} +\gdef\thesis@slovak@declaration{% + Prehlasujem, že táto \thesis@lower{slovak@typeName} je mojím + pôvodným autorským dielom, ktoré som vypracoval% + \thesis@slovak@gender@koncovka\ samostatne. Všetky zdroje, + pramene a literatúru, ktoré som pri vypracovaní + používal\thesis@slovak@gender@koncovka\ alebo z~nich + čerpal\thesis@slovak@gender@koncovka, v~práci riadne citujem + s~uvedením úplného odkazu na príslušný zdroj.} + +\gdef\thesis@slovak@advisorSignature{Podpis vedúceho} +\endinput +%% +%% End of file `mu/fi/fithesis-slovak.def'. diff --git a/fithesis/locale/mu/fithesis-czech.def b/fithesis/locale/mu/fithesis-czech.def new file mode 100644 index 0000000..35765e1 --- /dev/null +++ b/fithesis/locale/mu/fithesis-czech.def @@ -0,0 +1,67 @@ +%% +%% This is file `mu/fithesis-czech.def', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% czech.dtx (with options: `mu') +%% +%% Copyright 1998--2015 Daniel Marek (DM), Jan Pavlovič (JP), +%% Vít Novotný (VN), Petr Sojka (PS) +%% http://www.fi.muni.cz/tech/unix/tex/fithesis.xhtml +%% Faculty of Informatics, Masaryk University (Brno, Czech Republic) +%% +%% This work may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either version +%% 1.3 of this license or (at your option) any later version. +%% The latest version of this license is available at +%% +%% http://www.latex-project.org/lppl.txt +%% +%% and version 1.3 or later is part of all distributions of LaTeX +%% version 2005/12/01 or later. +%% +%% This work has the LPPL maintenance status `maintained'. +%% +%% The Current Maintainer of this work is Vít Novotný (VN). +%% Send bug reports, requests for additions and questions +%% either to the fithesis discussion forum at +%% +%% http://is.muni.cz/auth/df/fithesis-sazba/ +%% +%% or to the e-mail address . +%% +%% +%% MODIFICATION ADVICE: +%% +%% If you want to customize this file, it is best to make a copy of +%% the source file(s) from which it was produced. Use a different +%% name for your copy(ies) and modify the copy(ies); this will ensure +%% that your modifications do not get overwritten when you install a +%% new release of the standard system. You should also ensure that +%% your modified source file does not generate any modified file with +%% the same name as a standard file. +%% +%% You will also need to produce your own, suitably named, .ins file to +%% control the generation of files from your source file; this file +%% should contain your own preambles for the files it generates, not +%% those in the standard .ins files. +%% +%% The names of the source files used are shown above. +%% +\ProvidesFile{fithesis/locale/mu/fithesis-czech.def}[2016/03/22] + +\gdef\thesis@czech@universityName{Masarykova univerzita} +\gdef\thesis@czech@declaration{Prohlašuji, že jsem + \thesis@lower{czech@typeName@akuzativ} zpracoval% + \thesis@czech@gender@koncovka\ samostatně a + použil\thesis@czech@gender@koncovka\ jen prameny + uvedené~v seznamu literatury.} + +\gdef\thesis@czech@bib@title{Bibliografický záznam} +\gdef\thesis@czech@bib@pages{str} + +\gdef\thesis@czech@idTitle{UČO} +\endinput +%% +%% End of file `mu/fithesis-czech.def'. diff --git a/fithesis/locale/mu/fithesis-english.def b/fithesis/locale/mu/fithesis-english.def new file mode 100644 index 0000000..3906a1e --- /dev/null +++ b/fithesis/locale/mu/fithesis-english.def @@ -0,0 +1,66 @@ +%% +%% This is file `mu/fithesis-english.def', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% english.dtx (with options: `mu') +%% +%% Copyright 1998--2015 Daniel Marek (DM), Jan Pavlovič (JP), +%% Vít Novotný (VN), Petr Sojka (PS) +%% http://www.fi.muni.cz/tech/unix/tex/fithesis.xhtml +%% Faculty of Informatics, Masaryk University (Brno, Czech Republic) +%% +%% This work may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either version +%% 1.3 of this license or (at your option) any later version. +%% The latest version of this license is available at +%% +%% http://www.latex-project.org/lppl.txt +%% +%% and version 1.3 or later is part of all distributions of LaTeX +%% version 2005/12/01 or later. +%% +%% This work has the LPPL maintenance status `maintained'. +%% +%% The Current Maintainer of this work is Vít Novotný (VN). +%% Send bug reports, requests for additions and questions +%% either to the fithesis discussion forum at +%% +%% http://is.muni.cz/auth/df/fithesis-sazba/ +%% +%% or to the e-mail address . +%% +%% +%% MODIFICATION ADVICE: +%% +%% If you want to customize this file, it is best to make a copy of +%% the source file(s) from which it was produced. Use a different +%% name for your copy(ies) and modify the copy(ies); this will ensure +%% that your modifications do not get overwritten when you install a +%% new release of the standard system. You should also ensure that +%% your modified source file does not generate any modified file with +%% the same name as a standard file. +%% +%% You will also need to produce your own, suitably named, .ins file to +%% control the generation of files from your source file; this file +%% should contain your own preambles for the files it generates, not +%% those in the standard .ins files. +%% +%% The names of the source files used are shown above. +%% +\ProvidesFile{fithesis/locale/mu/fithesis-english.def}[2016/03/22] +\gdef\thesis@english@universityName{Masaryk University} +\gdef\thesis@english@declaration{% + Hereby I declare that this paper is my original authorial work, + which I have worked out on my own. All sources, references, and + literature used or excerpted during elaboration of this work are + properly cited and listed in complete reference to the due source.} + +\gdef\thesis@english@bib@title{Bibliographic record} +\gdef\thesis@english@bib@pages{p} + +\gdef\thesis@english@idTitle{UČO} +\endinput +%% +%% End of file `mu/fithesis-english.def'. diff --git a/fithesis/locale/mu/fithesis-slovak.def b/fithesis/locale/mu/fithesis-slovak.def new file mode 100644 index 0000000..160806b --- /dev/null +++ b/fithesis/locale/mu/fithesis-slovak.def @@ -0,0 +1,68 @@ +%% +%% This is file `mu/fithesis-slovak.def', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% slovak.dtx (with options: `mu') +%% +%% Copyright 1998--2015 Daniel Marek (DM), Jan Pavlovič (JP), +%% Vít Novotný (VN), Petr Sojka (PS) +%% http://www.fi.muni.cz/tech/unix/tex/fithesis.xhtml +%% Faculty of Informatics, Masaryk University (Brno, Czech Republic) +%% +%% This work may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either version +%% 1.3 of this license or (at your option) any later version. +%% The latest version of this license is available at +%% +%% http://www.latex-project.org/lppl.txt +%% +%% and version 1.3 or later is part of all distributions of LaTeX +%% version 2005/12/01 or later. +%% +%% This work has the LPPL maintenance status `maintained'. +%% +%% The Current Maintainer of this work is Vít Novotný (VN). +%% Send bug reports, requests for additions and questions +%% either to the fithesis discussion forum at +%% +%% http://is.muni.cz/auth/df/fithesis-sazba/ +%% +%% or to the e-mail address . +%% +%% +%% MODIFICATION ADVICE: +%% +%% If you want to customize this file, it is best to make a copy of +%% the source file(s) from which it was produced. Use a different +%% name for your copy(ies) and modify the copy(ies); this will ensure +%% that your modifications do not get overwritten when you install a +%% new release of the standard system. You should also ensure that +%% your modified source file does not generate any modified file with +%% the same name as a standard file. +%% +%% You will also need to produce your own, suitably named, .ins file to +%% control the generation of files from your source file; this file +%% should contain your own preambles for the files it generates, not +%% those in the standard .ins files. +%% +%% The names of the source files used are shown above. +%% +\ProvidesFile{fithesis/locale/mu/fithesis-slovak.def}[2016/03/22] + +\gdef\thesis@slovak@universityName{Masarykova univerzita} +\gdef\thesis@slovak@declaration{% + Prehlasujem, že som predloženú \thesis@lower{% + slovak@typeName@akuzativ} vypracoval% + \thesis@slovak@gender@koncovka\ samostatne len s~použitím + uvedenej literatúry a prameňov.} + +\gdef\thesis@slovak@bib@title{Bibliografický záznam} +\gdef\thesis@slovak@bib@pages{str} + +\gdef\thesis@slovak@idTitle{UČO} + +\endinput +%% +%% End of file `mu/fithesis-slovak.def'. diff --git a/fithesis/logo/mu/fithesis-base-color.pdf b/fithesis/logo/mu/fithesis-base-color.pdf new file mode 100644 index 0000000..b12fe86 Binary files /dev/null and b/fithesis/logo/mu/fithesis-base-color.pdf differ diff --git a/fithesis/logo/mu/fithesis-base.pdf b/fithesis/logo/mu/fithesis-base.pdf new file mode 100644 index 0000000..0f4b7ad Binary files /dev/null and b/fithesis/logo/mu/fithesis-base.pdf differ diff --git a/fithesis/logo/mu/fithesis-fi-color.pdf b/fithesis/logo/mu/fithesis-fi-color.pdf new file mode 100644 index 0000000..e697dff Binary files /dev/null and b/fithesis/logo/mu/fithesis-fi-color.pdf differ diff --git a/fithesis/logo/mu/fithesis-fi.pdf b/fithesis/logo/mu/fithesis-fi.pdf new file mode 100644 index 0000000..d2e77fc Binary files /dev/null and b/fithesis/logo/mu/fithesis-fi.pdf differ diff --git a/fithesis/style/fithesis-base.sty b/fithesis/style/fithesis-base.sty new file mode 100644 index 0000000..be7c454 --- /dev/null +++ b/fithesis/style/fithesis-base.sty @@ -0,0 +1,56 @@ +%% +%% This is file `fithesis-base.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% base.dtx +%% +%% Copyright 1998--2015 Daniel Marek (DM), Jan Pavlovič (JP), +%% Vít Novotný (VN), Petr Sojka (PS) +%% http://www.fi.muni.cz/tech/unix/tex/fithesis.xhtml +%% Faculty of Informatics, Masaryk University (Brno, Czech Republic) +%% +%% This work may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either version +%% 1.3 of this license or (at your option) any later version. +%% The latest version of this license is available at +%% +%% http://www.latex-project.org/lppl.txt +%% +%% and version 1.3 or later is part of all distributions of LaTeX +%% version 2005/12/01 or later. +%% +%% This work has the LPPL maintenance status `maintained'. +%% +%% The Current Maintainer of this work is Vít Novotný (VN). +%% Send bug reports, requests for additions and questions +%% either to the fithesis discussion forum at +%% +%% http://is.muni.cz/auth/df/fithesis-sazba/ +%% +%% or to the e-mail address . +%% +%% +%% MODIFICATION ADVICE: +%% +%% If you want to customize this file, it is best to make a copy of +%% the source file(s) from which it was produced. Use a different +%% name for your copy(ies) and modify the copy(ies); this will ensure +%% that your modifications do not get overwritten when you install a +%% new release of the standard system. You should also ensure that +%% your modified source file does not generate any modified file with +%% the same name as a standard file. +%% +%% You will also need to produce your own, suitably named, .ins file to +%% control the generation of files from your source file; this file +%% should contain your own preambles for the files it generates, not +%% those in the standard .ins files. +%% +%% The names of the source files used are shown above. +%% +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{fithesis/style/fithesis-base}[2015/06/23] +\endinput +%% +%% End of file `fithesis-base.sty'. diff --git a/fithesis/style/mu/fithesis-10.clo b/fithesis/style/mu/fithesis-10.clo new file mode 100644 index 0000000..9a3b023 --- /dev/null +++ b/fithesis/style/mu/fithesis-10.clo @@ -0,0 +1,282 @@ +%% +%% This is file `fithesis-10.clo', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% base.dtx (with options: `opt,10pt') +%% +%% Copyright 1998--2015 Daniel Marek (DM), Jan Pavlovič (JP), +%% Vít Novotný (VN), Petr Sojka (PS) +%% http://www.fi.muni.cz/tech/unix/tex/fithesis.xhtml +%% Faculty of Informatics, Masaryk University (Brno, Czech Republic) +%% +%% This work may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either version +%% 1.3 of this license or (at your option) any later version. +%% The latest version of this license is available at +%% +%% http://www.latex-project.org/lppl.txt +%% +%% and version 1.3 or later is part of all distributions of LaTeX +%% version 2005/12/01 or later. +%% +%% This work has the LPPL maintenance status `maintained'. +%% +%% The Current Maintainer of this work is Vít Novotný (VN). +%% Send bug reports, requests for additions and questions +%% either to the fithesis discussion forum at +%% +%% http://is.muni.cz/auth/df/fithesis-sazba/ +%% +%% or to the e-mail address . +%% +%% +%% MODIFICATION ADVICE: +%% +%% If you want to customize this file, it is best to make a copy of +%% the source file(s) from which it was produced. Use a different +%% name for your copy(ies) and modify the copy(ies); this will ensure +%% that your modifications do not get overwritten when you install a +%% new release of the standard system. You should also ensure that +%% your modified source file does not generate any modified file with +%% the same name as a standard file. +%% +%% You will also need to produce your own, suitably named, .ins file to +%% control the generation of files from your source file; this file +%% should contain your own preambles for the files it generates, not +%% those in the standard .ins files. +%% +%% The names of the source files used are shown above. +%% +\ProvidesFile{fithesis/style/mu/fithesis-10.clo}[2016/01/07] + +\renewcommand{\normalsize}{\fontsize\@xpt{12}\selectfont +\abovedisplayskip 10\p@ plus2\p@ minus5\p@ +\belowdisplayskip \abovedisplayskip +\abovedisplayshortskip \z@ plus3\p@ +\belowdisplayshortskip 6\p@ plus3\p@ minus3\p@ +\let\@listi\@listI} + +\renewcommand{\small}{\fontsize\@ixpt{11}\selectfont +\abovedisplayskip 8.5\p@ plus3\p@ minus4\p@ +\belowdisplayskip \abovedisplayskip +\abovedisplayshortskip \z@ plus2\p@ +\belowdisplayshortskip 4\p@ plus2\p@ minus2\p@ +\def\@listi{\leftmargin\leftmargini +\topsep 4\p@ plus2\p@ minus2\p@\parsep 2\p@ plus\p@ minus\p@ +\itemsep \parsep}} + +\renewcommand{\footnotesize}{\fontsize\@viiipt{9.5}\selectfont +\abovedisplayskip 6\p@ plus2\p@ minus4\p@ +\belowdisplayskip \abovedisplayskip +\abovedisplayshortskip \z@ plus\p@ +\belowdisplayshortskip 3\p@ plus\p@ minus2\p@ +\def\@listi{\leftmargin\leftmargini %% Added 22 Dec 87 +\topsep 3\p@ plus\p@ minus\p@\parsep 2\p@ plus\p@ minus\p@ +\itemsep \parsep}} + +\renewcommand{\scriptsize}{\fontsize\@viipt{8pt}\selectfont} +\renewcommand{\tiny}{\fontsize\@vpt{6pt}\selectfont} +\renewcommand{\large}{\fontsize\@xiipt{14pt}\selectfont} +\renewcommand{\Large}{\fontsize\@xivpt{18pt}\selectfont} +\renewcommand{\LARGE}{\fontsize\@xviipt{22pt}\selectfont} +\renewcommand{\huge}{\fontsize\@xxpt{25pt}\selectfont} +\renewcommand{\Huge}{\fontsize\@xxvpt{30pt}\selectfont} + + +\def\thesis@titlePage@normalsize{\fontsize\@xiipt{14.5}% +\selectfont\abovedisplayskip 12\p@ plus3\p@ minus7\p@ +\belowdisplayskip \abovedisplayskip +\abovedisplayshortskip \z@ plus3\p@ +\belowdisplayshortskip 6.5\p@ plus3.5\p@ minus3\p@ +\let\@listi\@listI} + +\def\thesis@titlePage@small{\fontsize\@xipt{13.6}\selectfont +\abovedisplayskip 11\p@ plus3\p@ minus6\p@ +\belowdisplayskip \abovedisplayskip +\abovedisplayshortskip \z@ plus3\p@ +\belowdisplayshortskip 6.5\p@ plus3.5\p@ minus3\p@ +\def\@listi{\leftmargin\leftmargini %% Added 22 Dec 87 +\parsep 4.5\p@ plus2\p@ minus\p@ + \itemsep \parsep + \topsep 9\p@ plus3\p@ minus5\p@}} + +\def\thesis@titlePage@footnotesize{\fontsize\@xpt{12}\selectfont +\abovedisplayskip 10\p@ plus2\p@ minus5\p@ +\belowdisplayskip \abovedisplayskip +\abovedisplayshortskip \z@ plus3\p@ +\belowdisplayshortskip 6\p@ plus3\p@ minus3\p@ +\def\@listi{\leftmargin\leftmargini %% Added 22 Dec 87 +\topsep 6\p@ plus2\p@ minus2\p@\parsep 3\p@ plus2\p@ minus\p@ +\itemsep \parsep}} + +\def\thesis@titlePage@scriptsize{\fontsize\@viiipt{9.5pt}\selectfont} +\def\thesis@titlePage@tiny{\fontsize\@vipt{7pt}\selectfont} +\def\thesis@titlePage@large{\fontsize\@xivpt{18pt}\selectfont} +\def\thesis@titlePage@Large{\fontsize\@xviipt{22pt}\selectfont} +\def\thesis@titlePage@LARGE{\fontsize\@xxpt{25pt}\selectfont} +\def\thesis@titlePage@huge{\fontsize\@xxvpt{30pt}\selectfont} +\def\thesis@titlePage@Huge{\fontsize\@xxvpt{30pt}\selectfont} + +\let\@normalsize\normalsize +\normalsize + +\if@twoside + \oddsidemargin 0.75in + \evensidemargin 0.4in + \marginparwidth 0pt +\else + \oddsidemargin 0.75in + \evensidemargin 0.75in + \marginparwidth 0pt +\fi +\marginparsep 10pt + +\topmargin 0.4in + +\headheight 20pt +\headsep 10pt +\topskip 10pt +\footskip 30pt + +\textheight = 43\baselineskip +\advance\textheight by \topskip +\textwidth 5.0truein +\columnsep 10pt +\columnseprule 0pt + +\footnotesep 6.65pt +\skip\footins 9pt plus 4pt minus 2pt +\floatsep 12pt plus 2pt minus 2pt +\textfloatsep 20pt plus 2pt minus 4pt +\intextsep 12pt plus 2pt minus 2pt +\dblfloatsep 12pt plus 2pt minus 2pt +\dbltextfloatsep 20pt plus 2pt minus 4pt + +\@fptop 0pt plus 1fil +\@fpsep 8pt plus 2fil +\@fpbot 0pt plus 1fil +\@dblfptop 0pt plus 1fil +\@dblfpsep 8pt plus 2fil +\@dblfpbot 0pt plus 1fil +\marginparpush 5pt + +\parskip 0pt plus 1pt +\partopsep 2pt plus 1pt minus 1pt + +\@lowpenalty 51 +\@medpenalty 151 +\@highpenalty 301 +\@beginparpenalty -\@lowpenalty +\@endparpenalty -\@lowpenalty +\@itempenalty -\@lowpenalty + +\def\@makechapterhead#1{{% + \setlength\parindent{\z@}% + \setlength\parskip {\z@}% + \ifnum + \c@secnumdepth >\m@ne + \par\nobreak + \vskip 10\p@ + \fi + \Large \ChapFont \thechapter{} \space #1\par + \nobreak + \vskip 20\p@}} + +\def\@makeschapterhead#1{{% + \setlength\parindent{\z@}% + \setlength\parskip {\z@}% + \Large \ChapFont #1\par + \nobreak + \vskip 20\p@}} + +\def\chapter{% + \clearpage + \thispagestyle{plain} + \global\@topnum\z@ + \@afterindentfalse + \secdef\@chapter\@schapter} + +\def\@chapter[#1]#2{% + \ifnum \c@secnumdepth + >\m@ne + \refstepcounter{chapter}% + \typeout{\@chapapp\space\thechapter.}% + \addcontentsline{toc}{chapter}{\protect + \numberline{\thechapter}\bfseries #1} + \else + \addcontentsline{toc}{chapter}{\bfseries #1} + \fi + \chaptermark{#1}% + \addtocontents{lof}% + {\protect\addvspace{4\p@}} + \addtocontents{lot}% + {\protect\addvspace{4\p@}} + \if@twocolumn + \@topnewpage[\@makechapterhead{#2}]% + \else + \@makechapterhead{#2}% + \@afterheading + \fi +} + +\def\section{\@startsection{section}{1}{\z@}{% + -3.5ex plus-1ex minus-.2ex}{2.3ex plus.2ex}{% + \reset@font\large\bfseries}} +\def\subsection{\@startsection{subsection}{2}{\z@}{% + -3.25ex plus-1ex minus-.2ex}{1.5ex plus.2ex}{% + \reset@font\normalsize\bfseries}} +\def\subsubsection{\@startsection{subsubsection}{3}{\z@}{% + -3.25ex plus-1ex minus-.2ex}{1.5ex plus.2ex}{% + \reset@font\normalsize}} +\def\paragraph{\@startsection{paragraph}{4}{\z@}{% + 3.25ex plus1ex minus.2ex}{-1em}{% + \reset@font\normalsize\bfseries}} +\def\subparagraph{\@startsection{subparagraph}{4}{\parindent}{% + 3.25ex plus1ex minus.2ex}{-1em}{% + \reset@font\normalsize\bfseries}} + +\setcounter{secnumdepth}{2} + +\leftmargini 2.5em +\leftmarginii 2.2em % > \labelsep + width of '(m)' +\leftmarginiii 1.87em % > \labelsep + width of 'vii.' +\leftmarginiv 1.7em % > \labelsep + width of 'M.' +\leftmarginv 1em +\leftmarginvi 1em + +\leftmargin\leftmargini +\labelsep .5em +\labelwidth\leftmargini\advance\labelwidth-\labelsep + +\def\@listI{\leftmargin\leftmargini \parsep 4\p@ plus2\p@ minus\p@ +\topsep 8\p@ plus2\p@ minus4\p@ +\itemsep 4\p@ plus2\p@ minus\p@} + +\let\@listi\@listI +\@listi + +\def\@listii{\leftmargin\leftmarginii + \labelwidth\leftmarginii\advance\labelwidth-\labelsep + \topsep 4\p@ plus2\p@ minus\p@ + \parsep 2\p@ plus\p@ minus\p@ + \itemsep \parsep} + +\def\@listiii{\leftmargin\leftmarginiii + \labelwidth\leftmarginiii\advance\labelwidth-\labelsep + \topsep 2\p@ plus\p@ minus\p@ + \parsep \z@ \partopsep\p@ plus\z@ minus\p@ + \itemsep \topsep} + +\def\@listiv{\leftmargin\leftmarginiv + \labelwidth\leftmarginiv\advance\labelwidth-\labelsep} + +\def\@listv{\leftmargin\leftmarginv + \labelwidth\leftmarginv\advance\labelwidth-\labelsep} + +\def\@listvi{\leftmargin\leftmarginvi + \labelwidth\leftmarginvi\advance\labelwidth-\labelsep} +\endinput +%% +%% End of file `fithesis-10.clo'. diff --git a/fithesis/style/mu/fithesis-11.clo b/fithesis/style/mu/fithesis-11.clo new file mode 100644 index 0000000..25cc598 --- /dev/null +++ b/fithesis/style/mu/fithesis-11.clo @@ -0,0 +1,281 @@ +%% +%% This is file `fithesis-11.clo', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% base.dtx (with options: `opt,11pt') +%% +%% Copyright 1998--2015 Daniel Marek (DM), Jan Pavlovič (JP), +%% Vít Novotný (VN), Petr Sojka (PS) +%% http://www.fi.muni.cz/tech/unix/tex/fithesis.xhtml +%% Faculty of Informatics, Masaryk University (Brno, Czech Republic) +%% +%% This work may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either version +%% 1.3 of this license or (at your option) any later version. +%% The latest version of this license is available at +%% +%% http://www.latex-project.org/lppl.txt +%% +%% and version 1.3 or later is part of all distributions of LaTeX +%% version 2005/12/01 or later. +%% +%% This work has the LPPL maintenance status `maintained'. +%% +%% The Current Maintainer of this work is Vít Novotný (VN). +%% Send bug reports, requests for additions and questions +%% either to the fithesis discussion forum at +%% +%% http://is.muni.cz/auth/df/fithesis-sazba/ +%% +%% or to the e-mail address . +%% +%% +%% MODIFICATION ADVICE: +%% +%% If you want to customize this file, it is best to make a copy of +%% the source file(s) from which it was produced. Use a different +%% name for your copy(ies) and modify the copy(ies); this will ensure +%% that your modifications do not get overwritten when you install a +%% new release of the standard system. You should also ensure that +%% your modified source file does not generate any modified file with +%% the same name as a standard file. +%% +%% You will also need to produce your own, suitably named, .ins file to +%% control the generation of files from your source file; this file +%% should contain your own preambles for the files it generates, not +%% those in the standard .ins files. +%% +%% The names of the source files used are shown above. +%% +\ProvidesFile{fithesis/style/mu/fithesis-11.clo}[2016/01/07] + +\renewcommand{\normalsize}{\fontsize\@xipt{14}\selectfont +\abovedisplayskip 11\p@ plus3\p@ minus6\p@ +\belowdisplayskip \abovedisplayskip +\belowdisplayshortskip 6.5\p@ plus3.5\p@ minus3\p@ +\let\@listi\@listI} + +\renewcommand{\small}{\fontsize\@xpt{12}\selectfont +\abovedisplayskip 10\p@ plus2\p@ minus5\p@ +\belowdisplayskip \abovedisplayskip +\abovedisplayshortskip \z@ plus3\p@ +\belowdisplayshortskip 6\p@ plus3\p@ minus3\p@ +\def\@listi{\leftmargin\leftmargini +\topsep 6\p@ plus2\p@ minus2\p@\parsep 3\p@ plus2\p@ minus\p@ +\itemsep \parsep}} + +\renewcommand{\footnotesize}{\fontsize\@ixpt{11}\selectfont +\abovedisplayskip 8\p@ plus2\p@ minus4\p@ +\belowdisplayskip \abovedisplayskip +\abovedisplayshortskip \z@ plus\p@ +\belowdisplayshortskip 4\p@ plus2\p@ minus2\p@ +\def\@listi{\leftmargin\leftmargini +\topsep 4\p@ plus2\p@ minus2\p@\parsep 2\p@ plus\p@ minus\p@ +\itemsep \parsep}} + +\renewcommand{\scriptsize}{\fontsize\@viiipt{9.5pt}\selectfont} +\renewcommand{\tiny}{\fontsize\@vipt{7pt}\selectfont} +\renewcommand{\large}{\fontsize\@xiipt{14pt}\selectfont} +\renewcommand{\Large}{\fontsize\@xivpt{18pt}\selectfont} +\renewcommand{\LARGE}{\fontsize\@xviipt{22pt}\selectfont} +\renewcommand{\huge}{\fontsize\@xxpt{25pt}\selectfont} +\renewcommand{\Huge}{\fontsize\@xxvpt{30pt}\selectfont} + + +\def\thesis@titlePage@normalsize{\fontsize\@xiipt{14.5}% +\selectfont\abovedisplayskip 12\p@ plus3\p@ minus7\p@ +\belowdisplayskip \abovedisplayskip +\abovedisplayshortskip \z@ plus3\p@ +\belowdisplayshortskip 6.5\p@ plus3.5\p@ minus3\p@ +\let\@listi\@listI} + +\def\thesis@titlePage@small{\fontsize\@xipt{13.6}\selectfont +\abovedisplayskip 11\p@ plus3\p@ minus6\p@ +\belowdisplayskip \abovedisplayskip +\abovedisplayshortskip \z@ plus3\p@ +\belowdisplayshortskip 6.5\p@ plus3.5\p@ minus3\p@ +\def\@listi{\leftmargin\leftmargini %% Added 22 Dec 87 +\parsep 4.5\p@ plus2\p@ minus\p@ + \itemsep \parsep + \topsep 9\p@ plus3\p@ minus5\p@}} + +\def\thesis@titlePage@footnotesize{\fontsize\@xpt{12}\selectfont +\abovedisplayskip 10\p@ plus2\p@ minus5\p@ +\belowdisplayskip \abovedisplayskip +\abovedisplayshortskip \z@ plus3\p@ +\belowdisplayshortskip 6\p@ plus3\p@ minus3\p@ +\def\@listi{\leftmargin\leftmargini %% Added 22 Dec 87 +\topsep 6\p@ plus2\p@ minus2\p@\parsep 3\p@ plus2\p@ minus\p@ +\itemsep \parsep}} + +\def\thesis@titlePage@scriptsize{\fontsize\@viiipt{9.5pt}\selectfont} +\def\thesis@titlePage@tiny{\fontsize\@vipt{7pt}\selectfont} +\def\thesis@titlePage@large{\fontsize\@xivpt{18pt}\selectfont} +\def\thesis@titlePage@Large{\fontsize\@xviipt{22pt}\selectfont} +\def\thesis@titlePage@LARGE{\fontsize\@xxpt{25pt}\selectfont} +\def\thesis@titlePage@huge{\fontsize\@xxvpt{30pt}\selectfont} +\def\thesis@titlePage@Huge{\fontsize\@xxvpt{30pt}\selectfont} + +\let\@normalsize\normalsize +\normalsize + +\if@twoside + \oddsidemargin 0.75in + \evensidemargin 0.4in + \marginparwidth 0pt +\else + \oddsidemargin 0.75in + \evensidemargin 0.75in + \marginparwidth 0pt +\fi +\marginparsep 10pt + +\topmargin 0.4in + +\headheight 20pt +\headsep 10pt +\topskip 10pt +\footskip 30pt + +\textheight = 39\baselineskip +\advance\textheight by \topskip +\textwidth 5.0truein +\columnsep 10pt +\columnseprule 0pt + +\footnotesep 7.7pt +\skip\footins 10pt plus 4pt minus 2pt +\floatsep 12pt plus 2pt minus 2pt +\textfloatsep 20pt plus 2pt minus 4pt +\intextsep 12pt plus 2pt minus 2pt +\dblfloatsep 12pt plus 2pt minus 2pt +\dbltextfloatsep 20pt plus 2pt minus 4pt + +\@fptop 0pt plus 1fil +\@fpsep 8pt plus 2fil +\@fpbot 0pt plus 1fil +\@dblfptop 0pt plus 1fil +\@dblfpsep 8pt plus 2fil +\@dblfpbot 0pt plus 1fil +\marginparpush 5pt + +\parskip 0pt plus 0pt +\partopsep 3pt plus 1pt minus 2pt + +\@lowpenalty 51 +\@medpenalty 151 +\@highpenalty 301 +\@beginparpenalty -\@lowpenalty +\@endparpenalty -\@lowpenalty +\@itempenalty -\@lowpenalty + +\def\@makechapterhead#1{{% + \setlength\parindent{\z@}% + \setlength\parskip {\z@}% + \ifnum + \c@secnumdepth >\m@ne + \par\nobreak + \vskip 10\p@ + \fi + \Large \ChapFont \thechapter{} \space #1\par + \nobreak + \vskip 20\p@}} + +\def\@makeschapterhead#1{{% + \setlength\parindent{\z@}% + \setlength\parskip {\z@}% + \Large \ChapFont #1\par + \nobreak + \vskip 20\p@}} + +\def\chapter{% + \clearpage + \thispagestyle{plain} + \global\@topnum\z@ + \@afterindentfalse + \secdef\@chapter\@schapter} + +\def\@chapter[#1]#2{% + \ifnum \c@secnumdepth + >\m@ne + \refstepcounter{chapter}% + \typeout{\@chapapp\space\thechapter.}% + \addcontentsline{toc}{chapter}{\protect + \numberline{\thechapter}\bfseries #1} + \else + \addcontentsline{toc}{chapter}{\bfseries #1} + \fi + \chaptermark{#1}% + \addtocontents{lof}% + {\protect\addvspace{4\p@}} + \addtocontents{lot}% + {\protect\addvspace{4\p@}} + \if@twocolumn + \@topnewpage[\@makechapterhead{#2}]% + \else + \@makechapterhead{#2}% + \@afterheading + \fi +} + +\def\section{\@startsection{section}{1}{\z@}{% + -3.5ex plus-1ex minus-.2ex}{2.3ex plus.2ex}{% + \reset@font\large\bfseries}} +\def\subsection{\@startsection{subsection}{2}{\z@}{% + -3.25ex plus-1ex minus-.2ex}{1.5ex plus.2ex}{% + \reset@font\normalsize\bfseries}} +\def\subsubsection{\@startsection{subsubsection}{3}{\z@}{% + -3.25ex plus-1ex minus-.2ex}{1.5ex plus.2ex}{% + \reset@font\normalsize}} +\def\paragraph{\@startsection{paragraph}{4}{\z@}{% + 3.25ex plus1ex minus.2ex}{-1em}{% + \reset@font\normalsize\bfseries}} +\def\subparagraph{\@startsection{subparagraph}{4}{\parindent}{% + 3.25ex plus1ex minus.2ex}{-1em}{% + \reset@font\normalsize\bfseries}} + +\setcounter{secnumdepth}{2} + +\leftmargini 2.5em +\leftmarginii 2.2em % > \labelsep + width of '(m)' +\leftmarginiii 1.87em % > \labelsep + width of 'vii.' +\leftmarginiv 1.7em % > \labelsep + width of 'M.' +\leftmarginv 1em +\leftmarginvi 1em + +\leftmargin\leftmargini +\labelsep .5em +\labelwidth\leftmargini\advance\labelwidth-\labelsep + +\def\@listI{\leftmargin\leftmargini \parsep 4.5\p@ plus2\p@ minus\p@ +\topsep 9\p@ plus3\p@ minus5\p@ +\itemsep 4.5\p@ plus2\p@ minus\p@} + +\let\@listi\@listI +\@listi + +\def\@listii{\leftmargin\leftmarginii + \labelwidth\leftmarginii\advance\labelwidth-\labelsep + \topsep 4.5\p@ plus2\p@ minus\p@ + \parsep 2\p@ plus\p@ minus\p@ + \itemsep \parsep} + +\def\@listiii{\leftmargin\leftmarginiii + \labelwidth\leftmarginiii\advance\labelwidth-\labelsep + \topsep 2\p@ plus\p@ minus\p@ + \parsep \z@ \partopsep \p@ plus\z@ minus\p@ + \itemsep \topsep} + +\def\@listiv{\leftmargin\leftmarginiv + \labelwidth\leftmarginiv\advance\labelwidth-\labelsep} + +\def\@listv{\leftmargin\leftmarginv + \labelwidth\leftmarginv\advance\labelwidth-\labelsep} + +\def\@listvi{\leftmargin\leftmarginvi + \labelwidth\leftmarginvi\advance\labelwidth-\labelsep} +\endinput +%% +%% End of file `fithesis-11.clo'. diff --git a/fithesis/style/mu/fithesis-12.clo b/fithesis/style/mu/fithesis-12.clo new file mode 100644 index 0000000..93cc729 --- /dev/null +++ b/fithesis/style/mu/fithesis-12.clo @@ -0,0 +1,258 @@ +%% +%% This is file `fithesis-12.clo', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% base.dtx (with options: `opt,12pt') +%% +%% Copyright 1998--2015 Daniel Marek (DM), Jan Pavlovič (JP), +%% Vít Novotný (VN), Petr Sojka (PS) +%% http://www.fi.muni.cz/tech/unix/tex/fithesis.xhtml +%% Faculty of Informatics, Masaryk University (Brno, Czech Republic) +%% +%% This work may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either version +%% 1.3 of this license or (at your option) any later version. +%% The latest version of this license is available at +%% +%% http://www.latex-project.org/lppl.txt +%% +%% and version 1.3 or later is part of all distributions of LaTeX +%% version 2005/12/01 or later. +%% +%% This work has the LPPL maintenance status `maintained'. +%% +%% The Current Maintainer of this work is Vít Novotný (VN). +%% Send bug reports, requests for additions and questions +%% either to the fithesis discussion forum at +%% +%% http://is.muni.cz/auth/df/fithesis-sazba/ +%% +%% or to the e-mail address . +%% +%% +%% MODIFICATION ADVICE: +%% +%% If you want to customize this file, it is best to make a copy of +%% the source file(s) from which it was produced. Use a different +%% name for your copy(ies) and modify the copy(ies); this will ensure +%% that your modifications do not get overwritten when you install a +%% new release of the standard system. You should also ensure that +%% your modified source file does not generate any modified file with +%% the same name as a standard file. +%% +%% You will also need to produce your own, suitably named, .ins file to +%% control the generation of files from your source file; this file +%% should contain your own preambles for the files it generates, not +%% those in the standard .ins files. +%% +%% The names of the source files used are shown above. +%% +\ProvidesFile{fithesis/style/mu/fithesis-12.clo}[2016/01/07] + +\def\thesis@titlePage@normalsize{\fontsize\@xiipt{14.5}% +\selectfont\abovedisplayskip 12\p@ plus3\p@ minus7\p@ +\belowdisplayskip \abovedisplayskip +\abovedisplayshortskip \z@ plus3\p@ +\belowdisplayshortskip 6.5\p@ plus3.5\p@ minus3\p@ +\let\@listi\@listI} + +\def\thesis@titlePage@small{\fontsize\@xipt{13.6}\selectfont +\abovedisplayskip 11\p@ plus3\p@ minus6\p@ +\belowdisplayskip \abovedisplayskip +\abovedisplayshortskip \z@ plus3\p@ +\belowdisplayshortskip 6.5\p@ plus3.5\p@ minus3\p@ +\def\@listi{\leftmargin\leftmargini %% Added 22 Dec 87 +\parsep 4.5\p@ plus2\p@ minus\p@ + \itemsep \parsep + \topsep 9\p@ plus3\p@ minus5\p@}} + +\def\thesis@titlePage@footnotesize{\fontsize\@xpt{12}\selectfont +\abovedisplayskip 10\p@ plus2\p@ minus5\p@ +\belowdisplayskip \abovedisplayskip +\abovedisplayshortskip \z@ plus3\p@ +\belowdisplayshortskip 6\p@ plus3\p@ minus3\p@ +\def\@listi{\leftmargin\leftmargini %% Added 22 Dec 87 +\topsep 6\p@ plus2\p@ minus2\p@\parsep 3\p@ plus2\p@ minus\p@ +\itemsep \parsep}} + +\def\thesis@titlePage@scriptsize{\fontsize\@viiipt{9.5pt}\selectfont} +\def\thesis@titlePage@tiny{\fontsize\@vipt{7pt}\selectfont} +\def\thesis@titlePage@large{\fontsize\@xivpt{18pt}\selectfont} +\def\thesis@titlePage@Large{\fontsize\@xviipt{22pt}\selectfont} +\def\thesis@titlePage@LARGE{\fontsize\@xxpt{25pt}\selectfont} +\def\thesis@titlePage@huge{\fontsize\@xxvpt{30pt}\selectfont} +\def\thesis@titlePage@Huge{\fontsize\@xxvpt{30pt}\selectfont} + +\renewcommand{\normalsize}{\thesis@titlePage@normalsize} +\renewcommand{\small}{\thesis@titlePage@small} +\renewcommand{\footnotesize}{\thesis@titlePage@footnotesize} +\renewcommand{\scriptsize}{\thesis@titlePage@scriptsize} +\renewcommand{\tiny}{\thesis@titlePage@tiny} +\renewcommand{\large}{\thesis@titlePage@large} +\renewcommand{\Large}{\thesis@titlePage@Large} +\renewcommand{\LARGE}{\thesis@titlePage@LARGE} +\renewcommand{\huge}{\thesis@titlePage@huge} +\renewcommand{\Huge}{\thesis@titlePage@Huge} +\let\@normalsize\normalsize +\normalsize + +\if@twoside + \oddsidemargin 0.75in + \evensidemargin 0.4in + \marginparwidth 0pt +\else + \oddsidemargin 0.75in + \evensidemargin 0.75in + \marginparwidth 0pt +\fi +\marginparsep 10pt + +\topmargin 0.4in + +\headheight 20pt +\headsep 10pt +\topskip 10pt +\footskip 30pt + +\textheight = 37\baselineskip +\advance\textheight by \topskip +\textwidth 5.0truein +\columnsep 10pt +\columnseprule 0pt + +\footnotesep 8.4pt +\skip\footins 10.8pt plus 4pt minus 2pt +\floatsep 14pt plus 2pt minus 4pt +\textfloatsep 20pt plus 2pt minus 4pt +\intextsep 14pt plus 4pt minus 4pt +\dblfloatsep 14pt plus 2pt minus 4pt +\dbltextfloatsep 20pt plus 2pt minus 4pt + +\@fptop 0pt plus 1fil +\@fpsep 10pt plus 2fil +\@fpbot 0pt plus 1fil +\@dblfptop 0pt plus 1fil +\@dblfpsep 10pt plus 2fil +\@dblfpbot 0pt plus 1fil +\marginparpush 7pt + +\parskip 0pt plus 0pt +\partopsep 3pt plus 2pt minus 2pt + +\@lowpenalty 51 +\@medpenalty 151 +\@highpenalty 301 +\@beginparpenalty -\@lowpenalty +\@endparpenalty -\@lowpenalty +\@itempenalty -\@lowpenalty + +\def\@makechapterhead#1{{% + \setlength\parindent{\z@}% + \setlength\parskip {\z@}% + \ifnum + \c@secnumdepth >\m@ne + \par\nobreak + \vskip 10\p@ + \fi + \Large \ChapFont \thechapter{} \space #1\par + \nobreak + \vskip 20\p@}} + +\def\@makeschapterhead#1{{% + \setlength\parindent{\z@}% + \setlength\parskip {\z@}% + \Large \ChapFont #1\par + \nobreak + \vskip 20\p@}} + +\def\chapter{% + \clearpage + \thispagestyle{plain} + \global\@topnum\z@ + \@afterindentfalse + \secdef\@chapter\@schapter} + +\def\@chapter[#1]#2{% + \ifnum \c@secnumdepth + >\m@ne + \refstepcounter{chapter}% + \typeout{\@chapapp\space\thechapter.}% + \addcontentsline{toc}{chapter}{\protect + \numberline{\thechapter}\bfseries #1} + \else + \addcontentsline{toc}{chapter}{\bfseries #1} + \fi + \chaptermark{#1}% + \addtocontents{lof}% + {\protect\addvspace{4\p@}} + \addtocontents{lot}% + {\protect\addvspace{4\p@}} + \if@twocolumn + \@topnewpage[\@makechapterhead{#2}]% + \else + \@makechapterhead{#2}% + \@afterheading + \fi +} + +\def\section{\@startsection{section}{1}{\z@}{% + -3.5ex plus-1ex minus-.2ex}{2.3ex plus.2ex}{% + \reset@font\large\bfseries}} +\def\subsection{\@startsection{subsection}{2}{\z@}{% + -3.25ex plus-1ex minus-.2ex}{1.5ex plus.2ex}{% + \reset@font\normalsize\bfseries}} +\def\subsubsection{\@startsection{subsubsection}{3}{\z@}{% + -3.25ex plus-1ex minus-.2ex}{1.5ex plus.2ex}{% + \reset@font\normalsize}} +\def\paragraph{\@startsection{paragraph}{4}{\z@}{% + 3.25ex plus1ex minus.2ex}{-1em}{% + \reset@font\normalsize\bfseries}} +\def\subparagraph{\@startsection{subparagraph}{4}{\parindent}{% + 3.25ex plus1ex minus.2ex}{-1em}{% + \reset@font\normalsize\bfseries}} + +\setcounter{secnumdepth}{2} + +\leftmargini 2.5em +\leftmarginii 2.2em % > \labelsep + width of '(m)' +\leftmarginiii 1.87em % > \labelsep + width of 'vii.' +\leftmarginiv 1.7em % > \labelsep + width of 'M.' +\leftmarginv 1em +\leftmarginvi 1em + +\leftmargin\leftmargini +\labelsep .5em +\labelwidth\leftmargini\advance\labelwidth-\labelsep + +\def\@listI{\leftmargin\leftmargini \parsep 5\p@ plus2.5\p@ minus\p@ +\topsep 10\p@ plus4\p@ minus6\p@ +\itemsep 5\p@ plus2.5\p@ minus\p@} + +\let\@listi\@listI +\@listi + +\def\@listii{\leftmargin\leftmarginii + \labelwidth\leftmarginii\advance\labelwidth-\labelsep + \topsep 5\p@ plus2.5\p@ minus\p@ + \parsep 2.5\p@ plus\p@ minus\p@ + \itemsep \parsep} + +\def\@listiii{\leftmargin\leftmarginiii + \labelwidth\leftmarginiii\advance\labelwidth-\labelsep + \topsep 2.5\p@ plus\p@ minus\p@ + \parsep \z@ \partopsep \p@ plus\z@ minus\p@ + \itemsep \topsep} + +\def\@listiv{\leftmargin\leftmarginiv + \labelwidth\leftmarginiv\advance\labelwidth-\labelsep} + +\def\@listv{\leftmargin\leftmarginv + \labelwidth\leftmarginv\advance\labelwidth-\labelsep} + +\def\@listvi{\leftmargin\leftmarginvi + \labelwidth\leftmarginvi\advance\labelwidth-\labelsep} +\endinput +%% +%% End of file `fithesis-12.clo'. diff --git a/fithesis/style/mu/fithesis-base.sty b/fithesis/style/mu/fithesis-base.sty new file mode 100644 index 0000000..7204eb7 --- /dev/null +++ b/fithesis/style/mu/fithesis-base.sty @@ -0,0 +1,526 @@ +%% +%% This is file `fithesis-base.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% base.dtx (with options: `base') +%% +%% Copyright 1998--2016 Daniel Marek (DM), Jan Pavlovič (JP), +%% Vít Novotný (VN), Petr Sojka (PS) +%% http://www.fi.muni.cz/tech/unix/tex/fithesis.xhtml +%% Faculty of Informatics, Masaryk University (Brno, Czech Republic) +%% +%% This work may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either version +%% 1.3 of this license or (at your option) any later version. +%% The latest version of this license is available at +%% +%% http://www.latex-project.org/lppl.txt +%% +%% and version 1.3 or later is part of all distributions of LaTeX +%% version 2005/12/01 or later. +%% +%% This work has the LPPL maintenance status `maintained'. +%% +%% The Current Maintainer of this work is Vít Novotný (VN). +%% Send bug reports, requests for additions and questions +%% either to the fithesis discussion forum at +%% +%% http://is.muni.cz/auth/df/fithesis-sazba/ +%% +%% or to the e-mail address . +%% +%% +%% MODIFICATION ADVICE: +%% +%% If you want to customize this file, it is best to make a copy of +%% the source file(s) from which it was produced. Use a different +%% name for your copy(ies) and modify the copy(ies); this will ensure +%% that your modifications do not get overwritten when you install a +%% new release of the standard system. You should also ensure that +%% your modified source file does not generate any modified file with +%% the same name as a standard file. +%% +%% You will also need to produce your own, suitably named, .ins file to +%% control the generation of files from your source file; this file +%% should contain your own preambles for the files it generates, not +%% those in the standard .ins files. +%% +%% The names of the source files used are shown above. +%% +\ProvidesPackage{fithesis/style/mu/fithesis-base}[2016/04/12] +\NeedsTeXFormat{LaTeX2e} +\DeclareOption{10pt}{\def\thesis@ptsize{0}} +\DeclareOption{11pt}{\def\thesis@ptsize{1}} +\DeclareOption{12pt}{\def\thesis@ptsize{2}} +\newif\ifthesis@twoside@ +\DeclareOption{oneside}{% + \thesis@twoside@false\@twosidefalse\@mparswitchfalse} +\DeclareOption{twoside}{% + \thesis@twoside@true \@twosidetrue \@mparswitchtrue} +\DeclareOption{onecolumn}{\@twocolumnfalse} +\DeclareOption{twocolumn}{\@twocolumntrue} +\DeclareOption{draft}{\setlength\overfullrule{5pt}} +\DeclareOption{final}{\setlength\overfullrule{0pt}} +\newif\ifthesis@palatino@ +\DeclareOption{palatino}{\thesis@palatino@true} +\DeclareOption{nopalatino}{\thesis@palatino@false} +\newif\ifthesis@color@ +\DeclareOption{monochrome}{\thesis@color@false} +\DeclareOption{color}{\thesis@color@true} +\newif\ifthesis@microtype@ +\DeclareOption{microtype}{\thesis@microtype@true} +\DeclareOption{nomicrotype}{\thesis@microtype@false} +\newif\ifthesis@newtable@ +\DeclareOption{table}{\thesis@newtable@true} +\DeclareOption{oldtable}{\thesis@newtable@false} +\DeclareOption{nolot}{\let\thesis@blocks@lot\relax} +\DeclareOption{lot}{\let\thesis@blocks@lot\listoftables} +\DeclareOption{nolof}{\let\thesis@blocks@lof\relax} +\DeclareOption{lof}{\let\thesis@blocks@lof\listoffigures} +\newif\ifthesis@cover@ +\DeclareOption{nocover}{\thesis@cover@false} +\DeclareOption{cover}{\thesis@cover@true} +\DeclareOption{digital}{\ExecuteOptions{color,cover}} +\DeclareOption{printed}{\ExecuteOptions{monochrome,nocover}} +\ExecuteOptions{% + printed,12pt,twoside,final,microtype,palatino,oldtable,lot,lof} +\ProcessOptions* +\thesis@requireLocale{english} +\thesis@require{xcolor} +\thesis@require{graphicx} +\thesis@require{pdfpages} +\thesis@require{keyval} +\thesis@require{ifxetex} +\thesis@require{ifluatex} +\ifthesis@microtype@ + \thesis@require[final,babel]{microtype} +\fi +{\let\x\expandafter +\x\global\x\let\x\ifthesis@xeluatex\csname if% + \ifxetex true\else + \ifluatex\x\x\x t\x\x\x r\x\x\x u\x\x\x e% + \else f\x\x\x a\x\x\x l\x\x\x s\x\x\x e% + \fi + \fi\endcsname} +\ifthesis@xeluatex + \ifthesis@palatino@ + \thesis@require{fontspec} + \thesis@require{unicode-math} + \setmainfont[Ligatures=TeX]{TeX Gyre Pagella} + \setmathfont[math-style=ISO,bold-style=ISO,vargreek-shape=TeX]% + {texgyrepagella-math.otf} + \fi +\else + \ifthesis@palatino@ + \RequirePackage[resetfonts]{cmap} + \thesis@require{lmodern} + \thesis@require{mathpazo} + \thesis@require{tgpagella} + \RequirePackage[T1]{fontenc} + \fi +\fi +\let\thesis@newtable@old\tabular +\let\endthesis@newtable@old\endtabular +\ifthesis@newtable@ + % Load the packages. + \thesis@require{tabularx} + \thesis@require{tabu} + \thesis@require{booktabs} + % Adjust the measurements. + \setlength{\aboverulesep}{0pt} + \setlength{\belowrulesep}{0pt} + \setlength{\extrarowheight}{.75ex} + \ifthesis@color@ + % The redefinition of `tabular` + \renewenvironment{tabular}% + {\rowcolors{1}{thesis@color@tableOdd}% + {thesis@color@tableEven}% + \thesis@newtable@old}% + {\endthesis@newtable@old} + % The redefinition of `tabularx` + \let\thesis@newtable@oldx\tabularx + \let\endthesis@newtable@oldx\endtabularx + \renewenvironment{tabularx}% + {\rowcolors{1}{thesis@color@tableEven}% + {thesis@color@tableOdd}% + \thesis@newtable@oldx}% + {\endthesis@newtable@oldx} + % The redefinition of `tabu` + \let\thesis@newtable@oldtabu\tabu + \let\endthesis@newtable@oldtabu\endtabu + \renewenvironment{tabu}% + {\rowcolors{1}{thesis@color@tableEven}% + {thesis@color@tableOdd}% + \thesis@newtable@oldtabu}% + {\endthesis@newtable@oldtabu} + \fi +\fi +\thesis@require{hyperref} +\hypersetup{pdfborderstyle={/S/U/W 1}} % Less obtrusive borders +\widowpenalty 10000 +\clubpenalty 10000 +\def\thesis@color@setup#1{% + \setkeys{thesis@color}{#1}} +\define@key{thesis@color}{links}{% + \definecolor{thesis@color@links}#1 + \hypersetup{linkbordercolor=thesis@color@links}} +\define@key{thesis@color}{tableOdd}{% + \definecolor{thesis@color@tableOdd}#1} +\define@key{thesis@color}{tableEven}{% + \definecolor{thesis@color@tableEven}#1} +\define@key{thesis@color}{tableEmph}{% + \definecolor{thesis@color@tableEmph}#1} +\def\thesis@blocks@coverMatter{% + \pagenumbering{gobble}} +\def\thesis@blocks@frontMatter{% + \thesis@blocks@clear + \pagestyle{plain} + \parindent 1.5em + \setcounter{page}{1} + \pagenumbering{roman}} +\def\thesis@blocks@clear{% + \ifthesis@twoside@ + \clearpage + \thispagestyle{empty}% + \cleardoublepage + \else + \newpage + \fi} +\def\thesis@blocks@clearRight{% + \ifthesis@twoside@ + \clearpage + \ifodd\value{page}% + \thispagestyle{empty}% + \hbox{}% + \newpage + \fi + \else + \newpage + \fi} +\newcommand{\thesis@blocks@facultyLogo@monochrome}[1]% + [width=40mm]{{% + \edef\@path{\thesis@logopath\thesis@facultyLogo}% + \includegraphics[#1]{\@path}}} +\newcommand{\thesis@blocks@facultyLogo@color}[1]% + [width=40mm]{{% + \edef\@path{\thesis@logopath\thesis@facultyLogo + \ifthesis@color@-color\fi}% + \includegraphics[#1]{\@path}}} +\newcommand{\thesis@blocks@universityLogo@monochrome}[1]% + [width=40mm]{{% + \edef\@path{\thesis@logopath\thesis@universityLogo}% + \includegraphics[#1]{\@path}}} +\newcommand{\thesis@blocks@universityLogo@color}[1]% + [width=40mm]{{% + \edef\@path{\thesis@logopath\thesis@universityLogo + \ifthesis@color@-color\fi}% + \includegraphics[#1]{\@path}}} +\let\thesis@department@name\thesis@department +\let\thesis@departmentEn@name\thesis@departmentEn +\let\thesis@field@name\thesis@field +\let\thesis@fieldEn@name\thesis@fieldEn +\def\thesis@blocks@cover{% + \ifthesis@cover@ + \thesis@blocks@clear + \begin{alwayssingle}% + \thispagestyle{empty}% + \begin{center}% + \thesis@blocks@cover@header + \thesis@blocks@facultyLogo@monochrome\\[0.4in]% + \let\footnotesize\small + \let\footnoterule\relax{}% + \thesis@blocks@cover@content + \par\vfill + \thesis@blocks@cover@footer + \end{center}% + \end{alwayssingle}% + \fi} +\newif\ifthesis@blocks@cover@university@ +\thesis@blocks@cover@university@true +\newif\ifthesis@blocks@cover@faculty@ +\thesis@blocks@cover@faculty@true +\newif\ifthesis@blocks@cover@department@ +\thesis@blocks@cover@department@false +\newif\ifthesis@blocks@cover@field@ +\thesis@blocks@cover@field@false + +\def\thesis@blocks@cover@header{% + {\sc\ifthesis@blocks@cover@university@ + \thesis@titlePage@LARGE\thesis@@{universityName}\\% + \fi\ifthesis@blocks@cover@faculty@ + \thesis@titlePage@Large\thesis@@{facultyName}\\% + \fi\ifthesis@blocks@cover@department@ + \thesis@titlePage@large\thesis@department@name\\% + \fi} + \ifthesis@blocks@cover@field@ + {\thesis@titlePage@large\vskip 1em% + {\bf\thesis@@{fieldTitle}:} \thesis@field@name}% + \fi\vskip 2em} +\def\thesis@blocks@cover@content{% + {\thesis@titlePage@Huge\bf\thesis@TeXtitle\par\vfil}% + \vskip 0.8in% + {\thesis@titlePage@large\sc\thesis@@{typeName}}\\[0.3in]% + {\thesis@titlePage@Large\bf\thesis@author}} +\def\thesis@blocks@cover@footer{% + {\thesis@titlePage@large\thesis@place, \thesis@@{semester}}} +\def\thesis@blocks@titlePage{% + \thesis@blocks@clear + \begin{alwayssingle}% + \thispagestyle{empty}% + \begin{center}% + \thesis@blocks@titlePage@header + \thesis@blocks@facultyLogo@color\\[0.4in]% + \let\footnotesize\small + \let\footnoterule\relax{}% + \thesis@blocks@titlePage@content + \par\vfill + \thesis@blocks@titlePage@footer + \end{center}% + \end{alwayssingle}} +\newif\ifthesis@blocks@titlePage@university@ +\thesis@blocks@titlePage@university@true +\newif\ifthesis@blocks@titlePage@faculty@ +\thesis@blocks@titlePage@faculty@true +\newif\ifthesis@blocks@titlePage@department@ +\thesis@blocks@titlePage@department@false +\newif\ifthesis@blocks@titlePage@field@ +\thesis@blocks@titlePage@field@false + +\def\thesis@blocks@titlePage@header{% + {\sc\ifthesis@blocks@titlePage@university@ + \thesis@titlePage@LARGE\thesis@@{universityName}\\% + \fi\ifthesis@blocks@titlePage@faculty@ + \thesis@titlePage@Large\thesis@@{facultyName}\\% + \fi\ifthesis@blocks@titlePage@department@ + \thesis@titlePage@large\thesis@department@name\\% + \fi} + \ifthesis@blocks@titlePage@field@ + {\thesis@titlePage@large\vskip 1em% + {\bf\thesis@@{fieldTitle}:} \thesis@field@name}% + \fi\vskip 2em} +\let\thesis@blocks@titlePage@content=\thesis@blocks@cover@content +\let\thesis@blocks@titlePage@footer=\thesis@blocks@cover@footer +\def\thesis@blocks@toc{% + \thesis@blocks@clear + \tableofcontents} +\def\thesis@blocks@tables{% + \thesis@blocks@toc + \thesis@blocks@lot + \thesis@blocks@lof} +\def\thesis@blocks@declaration{% + \thesis@blocks@clear + \begin{alwayssingle}% + \chapter*{\thesis@@{declarationTitle}}% + \thesis@declaration + \vskip 2cm% + \hfill\thesis@author + \end{alwayssingle}} +\def\thesis@blocks@thanks{% + \ifx\thesis@thanks\undefined\else + \thesis@blocks@clear + \begin{alwayssingle}% + \chapter*{\vspace*{\fill}\thesis@@{thanksTitle}}% + \thesis@thanks + \end{alwayssingle}% + \fi} +\def\thesis@blocks@abstract{% + \begin{alwayssingle}% + % Start the new chapter without clearing the right page + {\def\cleardoublepage{} + \chapter*{\thesis@@{abstractTitle}}}% + \noindent\thesis@abstract + \par\vfil\null + \end{alwayssingle}} +\def\thesis@blocks@abstractEn{% + \ifthesis@english\else + {\thesis@selectLocale{english}% + \begin{alwayssingle}% + % Start the new chapter without clearing the right page + {\def\cleardoublepage{}% + \chapter*{\thesis@english@abstractTitle}% + \thesis@abstractEn}% + \par\vfil\null + \end{alwayssingle}}% + \fi} +\def\thesis@blocks@keywords{% + \begin{alwayssingle}% + % Start the new chapter without clearing the right page + {\def\cleardoublepage{}% + \chapter*{\thesis@@{keywordsTitle}}% + \noindent\thesis@TeXkeywords}% + \par\vfil\null + \end{alwayssingle}} +\def\thesis@blocks@keywordsEn{% + \ifthesis@english\else + {\thesis@selectLocale{english}% + \begin{alwayssingle}% + % Start the new chapter without clearing the right page + {\def\cleardoublepage{}% + \chapter*{\thesis@english@keywordsTitle}% + \thesis@TeXkeywordsEn}% + \par\vfil\null + \end{alwayssingle}}% + \fi} +\newif\ifthesis@blocks@assignment@ +\thesis@blocks@assignment@true +\def\thesis@blocks@assignment{% + \ifthesis@blocks@assignment@ + \ifx\thesis@assignmentFiles\undefined + % Typeset a placeholder page. + \thesis@blocks@clear + \begin{alwayssingle}% + \thispagestyle{empty}% + \addtocounter{page}{-\ifthesis@twoside@2\else1\fi}% + \noindent\textit{\thesis@@{assignment}}% + \end{alwayssingle}% + \else + {\edef\@pdfList{\thesis@assignmentFiles}% + \ifx\@pdfList\empty\else + \let\ea\expandafter + % Inject the specified PDF documents. + \def\@inject##1,{\thesis@blocks@clear + \def\@args{##1}\def\@relax{\relax}% + \ifx\@args\@relax\else + % Trim leading spaces. + \edef\@trimmed{\romannumeral-`\.##1}% + \includepdf[pages=-]\@trimmed + \ea\@inject\fi}% + \ea\@inject\@pdfList,\relax,% + \fi}% + \fi + \fi} +\def\thesis@blocks@mainMatter{% + \thesis@blocks@clear + \setcounter{page}{1} + \pagenumbering{arabic} + \pagestyle{thesisheadings} + \parindent 1.5em\relax} +\def\thesis@blocks@bibEntry{% + \chapter*{\thesis@@{bib@title}} + \noindent\thesis@upper{author@tail}, \thesis@author@head. + \emph{\thesis@title}. \thesis@place: \thesis@@{universityName}, + \thesis@@{facultyName}, \thesis@department@name, \thesis@year. + \thesis@pages\ \thesis@@{bib@pages}. + \thesis@@{advisorTitle}: \thesis@advisor + \thesis@blocks@clearRight} +\setcounter{tocdepth}{2} + +\setcounter{secnumdepth}{2} + +\input\thesis@stylepath mu/fithesis-1\thesis@ptsize.clo\relax + +\def\ps@thesisheadings{% + \def\chaptermark##1{% + \markright{% + \ifnum\c@secnumdepth >\m@ne + \thechapter.\ % + \fi ##1}} + \let\@oddfoot\@empty + \let\@oddhead\@empty + \def\@oddhead{% + \vbox{% + \hbox to \textwidth{% + \hfil{\sc\rightmark}}% + \vskip 4pt\hrule}} + \if@twoside + \def\@evenhead{% + \vbox{% + \hbox to \textwidth{% + {\sc\rightmark}% + \hfil} + \vskip 4pt\hrule}} + \else + \let\@evenhead\@oddhead + \fi + \def\@oddfoot{\hfil\PageFont\thepage} + \if@twoside + \def\@evenfoot{\PageFont\thepage\hfil}% + \else + \let\@evenfoot\@oddfoot + \fi + \let\@mkboth\markboth} + +\renewcommand*\chapter{% + \thesis@blocks@clear + \thispagestyle{plain}% + \global\@topnum\z@ + \@afterindentfalse + \secdef\@chapter\@schapter} + +\renewcommand*\part{% + \thesis@blocks@clear + \if@twocolumn + \onecolumn + \@tempswatrue + \else + \@tempswafalse + \fi + \hbox{}\vfil + \secdef\@part\@spart} + +\newif\if@restonecol +\def\alwayssingle{% + \@restonecolfalse\if@twocolumn\@restonecoltrue\onecolumn\fi} +\def\endalwayssingle{\if@restonecol\twocolumn\fi} + +\pdfstringdefDisableCommands{% + \let\MakeUppercase\relax} + +\renewcommand*\toc@font[1]{% + \ifcase #1\relax + \bfseries % \chapter (0) + \or + \slshape % \section (1) +\else + \rmfamily % \subsection (2), \subsubsection (3) + % \paragraph, \subparagraph (4) + \fi} + +\renewcommand*\l@part[2]{% + \ifnum \c@tocdepth >-2\relax + \addpenalty{-\@highpenalty}% + \ifnum \c@tocdepth >0\relax + \addvspace{2.25em \@plus\p@}% + \else + \addvspace{1.0em \@plus\p@}% + \fi + \begingroup + \setlength\@tempdima{3em}% + \parindent \z@ \rightskip \@pnumwidth + \parfillskip -\@pnumwidth + {\leavevmode + \normalfont \bfseries #1\hfil \hb@xt@\@pnumwidth{\hss #2}}\par + \nobreak + \global\@nobreaktrue + \everypar{\global\@nobreakfalse\everypar{}}% + \endgroup + \fi} + +\renewcommand*\l@chapter[2]{% + \ifnum \c@tocdepth >0\relax + \addpenalty{-\@highpenalty}% + \addvspace{1.0em \@plus\p@}% + \setlength\@tempdima{1.5em}% + \begingroup + \parindent \z@ \rightskip \@pnumwidth + \parfillskip -\@pnumwidth + \leavevmode \bfseries + \advance\leftskip\@tempdima + \hskip -\leftskip + #1\nobreak\hfil \nobreak\hb@xt@\@pnumwidth{\hss #2}\par + \penalty\@highpenalty + \endgroup + \else + \@dottedtocline{0}{0em}{1.5em}{#1}{#2} + \fi} + +\renewcommand*\l@section{\@dottedtocline{1}{1.5em}{2.3em}} +\renewcommand*\l@subsection{\@dottedtocline{2}{3.8em}{3.2em}} +\renewcommand*\l@subsubsection{\@dottedtocline{3}{7.0em}{4.1em}} +\renewcommand*\l@paragraph{\@dottedtocline{4}{10.0em}{5.0em}} +\renewcommand*\l@subparagraph{\@dottedtocline{4}{12.0em}{6.0em}} +\endinput +%% +%% End of file `fithesis-base.sty'. diff --git a/fithesis/style/mu/fithesis-fi.sty b/fithesis/style/mu/fithesis-fi.sty new file mode 100644 index 0000000..a94e842 --- /dev/null +++ b/fithesis/style/mu/fithesis-fi.sty @@ -0,0 +1,112 @@ +%% +%% This is file `fithesis-fi.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% fi.dtx +%% +%% Copyright 1998--2015 Daniel Marek (DM), Jan Pavlovič (JP), +%% Vít Novotný (VN), Petr Sojka (PS) +%% http://www.fi.muni.cz/tech/unix/tex/fithesis.xhtml +%% Faculty of Informatics, Masaryk University (Brno, Czech Republic) +%% +%% This work may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either version +%% 1.3 of this license or (at your option) any later version. +%% The latest version of this license is available at +%% +%% http://www.latex-project.org/lppl.txt +%% +%% and version 1.3 or later is part of all distributions of LaTeX +%% version 2005/12/01 or later. +%% +%% This work has the LPPL maintenance status `maintained'. +%% +%% The Current Maintainer of this work is Vít Novotný (VN). +%% Send bug reports, requests for additions and questions +%% either to the fithesis discussion forum at +%% +%% http://is.muni.cz/auth/df/fithesis-sazba/ +%% +%% or to the e-mail address . +%% +%% +%% MODIFICATION ADVICE: +%% +%% If you want to customize this file, it is best to make a copy of +%% the source file(s) from which it was produced. Use a different +%% name for your copy(ies) and modify the copy(ies); this will ensure +%% that your modifications do not get overwritten when you install a +%% new release of the standard system. You should also ensure that +%% your modified source file does not generate any modified file with +%% the same name as a standard file. +%% +%% You will also need to produce your own, suitably named, .ins file to +%% control the generation of files from your source file; this file +%% should contain your own preambles for the files it generates, not +%% those in the standard .ins files. +%% +%% The names of the source files used are shown above. +%% +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{fithesis/style/mu/fithesis-fi}[2016/01/07] +\thesis@color@setup{ + links={HTML}{FFD451}, + tableEmph={HTML}{FFD451}, + tableOdd={HTML}{FFF9E5}, + tableEven={HTML}{FFECB3}} +\ifx\thesis@type\thesis@bachelors\else +\ifx\thesis@type\thesis@masters\else + \thesis@blocks@assignment@false +\fi\fi +\def\thesis@blocks@titlePage@content{% + {\thesis@titlePage@Huge\bf\thesis@TeXtitle\par\vfil}\vskip 0.8in + {\thesis@titlePage@large\sc\thesis@@{typeName}\\[0.3in]} + {\thesis@titlePage@Large\bf\thesis@author} + % If this is a rigorous thesis, typeset the name of the + % thesis advisor. + \ifx\thesis@type\thesis@rigorous + {\thesis@titlePage@large\\[0.3in] + {\bf\thesis@@{advisorTitle}:} \thesis@advisor} + \fi}% +\def\thesis@blocks@titlePage@footer{% + {\thesis@titlePage@large\thesis@place, \thesis@@{semester} + % If this is a rigorous thesis, create space for the advisor's + % signature + \ifx\thesis@type\thesis@rigorous + \let\@A\relax\newlength{\@A} + \settowidth{\@A}{\thesis@@{advisorSignature}} + \setlength{\@A}{\@A+1cm} + \hfill\raisebox{-0.5em}{\parbox{\@A}{ + \centering + \rule{\@A}{1pt}\\ + \thesis@@{advisorSignature} + }} + \fi}} +\def\thesis@blocks@declaration{% + \thesis@blocks@clear + \begin{alwayssingle}% + \chapter*{\thesis@@{declarationTitle}}% + \thesis@declaration + \vskip 2cm% + \hfill\thesis@author + \par\vfill\noindent + \textbf{\thesis@@{advisorTitle}:} \thesis@advisor + \par\vfil + \end{alwayssingle}} +\def\thesis@blocks@preamble{% + \thesis@blocks@coverMatter + \thesis@blocks@cover + \thesis@blocks@titlePage + \thesis@blocks@frontMatter + \thesis@blocks@assignment + \thesis@blocks@declaration + \thesis@blocks@thanks + \thesis@blocks@clearRight + \thesis@blocks@abstract + \thesis@blocks@keywords + \thesis@blocks@tables} +\endinput +%% +%% End of file `fithesis-fi.sty'. diff --git a/fithesis3.cls b/fithesis3.cls new file mode 100644 index 0000000..26c0c6d --- /dev/null +++ b/fithesis3.cls @@ -0,0 +1,471 @@ +%% +%% This is file `fithesis3.cls', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% fithesis.dtx (with options: `class') +%% +%% Copyright 1998--2016 Daniel Marek (DM), Jan Pavlovič (JP), +%% Vít Novotný (VN), Petr Sojka (PS) +%% http://www.fi.muni.cz/tech/unix/tex/fithesis.xhtml +%% Faculty of Informatics, Masaryk University (Brno, Czech Republic) +%% +%% This work may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either version +%% 1.3 of this license or (at your option) any later version. +%% The latest version of this license is available at +%% +%% http://www.latex-project.org/lppl.txt +%% +%% and version 1.3 or later is part of all distributions of LaTeX +%% version 2005/12/01 or later. +%% +%% This work has the LPPL maintenance status `maintained'. +%% +%% The Current Maintainer of this work is Vít Novotný (VN). +%% Send bug reports, requests for additions and questions +%% either to the fithesis discussion forum at +%% +%% http://is.muni.cz/auth/df/fithesis-sazba/ +%% +%% or to the e-mail address . +%% +%% +%% MODIFICATION ADVICE: +%% +%% If you want to customize this file, it is best to make a copy of +%% the source file(s) from which it was produced. Use a different +%% name for your copy(ies) and modify the copy(ies); this will ensure +%% that your modifications do not get overwritten when you install a +%% new release of the standard system. You should also ensure that +%% your modified source file does not generate any modified file with +%% the same name as a standard file. +%% +%% You will also need to produce your own, suitably named, .ins file to +%% control the generation of files from your source file; this file +%% should contain your own preambles for the files it generates, not +%% those in the standard .ins files. +%% +%% The names of the source files used are shown above. +%% +\NeedsTeXFormat{LaTeX2e} +{\def\thesis@versiondef#1#2{ + \gdef\thesis@version@number{#1} + \gdef\thesis@version@date{#2} + \gdef\thesis@version{#2 #1 fithesis3 MU thesis class}} +\thesis@versiondef{v0.3.37}{2016/04/12}} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\ProvidesClass{fithesis3}[\thesis@version] +\ifx\thesis@backend\undefined + \def\thesis@backend{[a4paper]{rapport3}} +\fi\expandafter\LoadClass\thesis@backend +\RequirePackage{keyval} +\RequirePackage{etoolbox} +\RequirePackage{ltxcmds} +\RequirePackage{ifxetex} +\RequirePackage{ifluatex} +\ifxetex\else\ifluatex\else + \RequirePackage[utf8]{inputenc} +\fi\fi +\def\thesissetup#1{% + \setkeys{thesis}{#1}} +\def\thesis@basepath{fithesis/} +\define@key{thesis}{basePath}{% + \ifx\thesis@empty#1\thesis@empty + \def\thesis@basepath{}% + \else + \def\thesis@basepath{#1/}% + \fi} +\def\thesis@logopath{\thesis@basepath logo/\thesis@university/} +\define@key{thesis}{logoPath}{% + \def\thesis@logopath{\thesis@subdir#1% + \empty\empty\empty\empty}} +\def\thesis@stylepath{\thesis@basepath style/} +\define@key{thesis}{stylePath}{% + \def\thesis@stylepath{\thesis@subdir#1% + \empty\empty\empty\empty}} +\def\thesis@localepath{\thesis@basepath locale/} +\define@key{thesis}{localePath}{% + \def\thesis@localepath{\thesis@subdir#1% + \empty\empty\empty\empty}} +\def\thesis@subdir#1#2#3#4\empty{% + \ifx#1\empty% -> + \thesis@basepath + \else + \if#1/% + \ifx#2\empty% / -> / + /% + \else% / -> // + #1#2#3#4/% + \fi + \else + \if#1.% + \ifx#2\empty% . -> ./ + ./% + \else + \if#2.% + \ifx#3\empty% .. -> ../ + ../% + \else + \if#3/% ../ -> ..// + ../#4/% + \else + \thesis@basepath#1#2#3#4/% + \fi + \fi + \else + \if#2/% ./ -> .// + ./#3#4/% + \else + \thesis@basepath#1#2#3#4/% + \fi + \fi + \fi + \else + \thesis@basepath#1#2#3#4/% + \fi + \fi + \fi} +\newcommand{\thesis@def}[2][]{% + \expandafter\def\csname thesis@#2\endcsname{% + <<\ifx\thesis@empty#1\thesis@empty#2\else#1\fi>>}} +\def\thesis@declaration{\thesis@@{declaration}} +\long\def\KV@thesis@declaration#1{% + \long\def\thesis@declaration{#1}} +\newif\ifthesis@woman\thesis@womanfalse +\define@key{thesis}{gender}{% + \def\thesis@male{m}% + \def\thesis@arg{#1}% + \ifx\thesis@male\thesis@arg + \thesis@womanfalse + \else + \thesis@womantrue + \fi} +\def\thesis@parseAuthor#1{% + \def\thesis@author{#1}% + \def\thesis@author@head{\expandafter\expandafter\expandafter + \@gobble\thesis@head#1 \relax}% + \def\thesis@author@tail{\thesis@tail#1 \relax}} +\thesis@def{author}% +\thesis@def[author]{author@head}% +\thesis@def[author]{author@tail}% +\define@key{thesis}{author}{% + \thesis@parseAuthor{#1}} +\let\author\thesis@parseAuthor +\thesis@def{id} +\define@key{thesis}{id}{% + \def\thesis@id{#1}} +\def\thesis@sempaper{sem} +\def\thesis@bachelors{bc} +\def\thesis@masters{mgr} +\def\thesis@doctoral{d} +\def\thesis@rigorous{r} +\let\thesis@type\thesis@bachelors +\define@key{thesis}{type}{% + \def\thesis@type{#1}} +\def\thesis@university{mu} +\define@key{thesis}{university}{% + \def\thesis@university{#1}} +\def\thesis@faculty{fi} +\define@key{thesis}{faculty}{% + \def\thesis@faculty{#1}} +\thesis@def{department} +\define@key{thesis}{department}{% + \def\thesis@department{#1}} +\thesis@def{departmentEn} +\define@key{thesis}{departmentEn}{% + \def\thesis@departmentEn{#1}} +\thesis@def{programme} +\define@key{thesis}{programme}{% + \def\thesis@programme{#1}} +\thesis@def{programmeEn} +\define@key{thesis}{programmeEn}{% + \def\thesis@programmeEn{#1}} +\thesis@def{field} +\define@key{thesis}{field}{% + \def\thesis@field{#1}} +\thesis@def{fieldEn} +\define@key{thesis}{fieldEn}{% + \def\thesis@fieldEn{#1}} +\def\thesis@universityLogo{fithesis-base} +\define@key{thesis}{universityLogo}{% + \def\thesis@universityLogo{#1}} +\def\thesis@facultyLogo{fithesis-\thesis@faculty} +\define@key{thesis}{facultyLogo}{% + \def\thesis@facultyLogo{#1}} +\def\thesis@style{\thesis@university/fithesis-\thesis@faculty} +\define@key{thesis}{style}{% + \def\thesis@style{#1}} +\newif\ifthesis@style@inheritance\thesis@style@inheritancetrue +\define@key{thesis}{styleInheritance}[true]{% + \begingroup + \def\@true{true}% + \def\@arg{#1}% + \ifx\@true\@arg + \endgroup\thesis@style@inheritancetrue + \else + \endgroup\thesis@style@inheritancefalse + \fi} +\def\thesis@locale{% + % Babel / polyglossia detection + \ifx\languagename\undefined + english\else\languagename\fi} +\define@key{thesis}{locale}{% + \def\thesis@locale{#1}} +\def\ifthesis@english{ + \expandafter\def\expandafter\@english\expandafter{\string + \english}% + \expandafter\expandafter\expandafter\def\expandafter + \expandafter\expandafter\@locale\expandafter\expandafter + \expandafter{\expandafter\string\csname\thesis@locale\endcsname}% + \expandafter\csname\expandafter i\expandafter f\ifx\@locale + \@english + true% + \else + false% + \fi\endcsname} +\newif\ifthesis@locale@inheritance\thesis@locale@inheritancetrue +\define@key{thesis}{localeInheritance}[true]{% + \begingroup + \def\@true{true}% + \def\@arg{#1}% + \ifx\@true\@arg + \endgroup\thesis@locale@inheritancetrue + \else + \endgroup\thesis@locale@inheritancefalse + \fi} +\def\thesis@parseDate#1/#2/#3|{{ + % Set the basic macros + \gdef\thesis@date{#1/#2/#3}% + \gdef\thesis@year{#1}% + \gdef\thesis@month{#2}% + \gdef\thesis@day{#3}% + + % Set the season + \newcount\@month\expandafter\@month\thesis@month\relax + \ifnum\@month>8\gdef\thesis@season{fall} + \else\ifnum\@month<3\gdef\thesis@season{fall} + \else \gdef\thesis@season{spring} + \fi\fi + + % Set the academic year + \newcount\@year\expandafter\@year\thesis@year\relax + \ifnum\@month>8% + \edef\@yearA{\the\@year}% + \advance\@year 1\edef\@yearB{\the\@year}% + \advance\@year-1 + \else + \advance\@year-1\edef\@yearA{\the\@year}% + \advance\@year 1\edef\@yearB{\the\@year}% + \fi + \global\edef\thesis@academicYear{\@yearA/\@yearB} + + % Set the season year + \ifnum\@month>2\else + \advance\@year-1 + \fi + \global\edef\thesis@seasonYear{\the\@year}}} + +\edef\thesis@date{\the\year/\the\month/\the\day}% +\expandafter\thesis@parseDate\thesis@date|% + +\define@key{thesis}{date}{{% + \edef\@date{#1}% + \expandafter\thesis@parseDate\@date|}} +\def\thesis@place{Brno} +\define@key{thesis}{place}{% + \def\thesis@place{#1}} +\thesis@def{title} +\define@key{thesis}{title}{% + \def\thesis@title{#1}} +\def\title#1{\def\thesis@title{#1}} +\let\maketitle\relax +\def\thesis@TeXtitle{\thesis@title} +\define@key{thesis}{TeXtitle}{% + \def\thesis@TeXtitle{#1}} +\thesis@def{titleEn} +\define@key{thesis}{titleEn}{% + \def\thesis@titleEn{#1}} +\def\thesis@TeXtitleEn{\thesis@titleEn} +\define@key{thesis}{TeXtitleEn}{% + \def\thesis@TeXtitleEn{#1}} +\thesis@def{keywords} +\define@key{thesis}{keywords}{% + \def\thesis@keywords{#1}} +\def\thesis@TeXkeywords{\thesis@keywords} +\define@key{thesis}{TeXkeywords}{% + \def\thesis@TeXkeywords{#1}} +\thesis@def{keywordsEn} +\define@key{thesis}{keywordsEn}{% + \def\thesis@keywordsEn{#1}} +\def\thesis@TeXkeywordsEn{\thesis@keywordsEn} +\define@key{thesis}{TeXkeywordsEn}{% + \def\thesis@TeXkeywordsEn{#1}} +\thesis@def{abstract} +\long\def\KV@thesis@abstract#1{% + \long\def\thesis@abstract{#1}} +\thesis@def{abstractEn} +\long\def\KV@thesis@abstractEn#1{% + \long\def\thesis@abstractEn{#1}} +\thesis@def{advisor} +\define@key{thesis}{advisor}{\def\thesis@advisor{#1}} +\long\def\KV@thesis@thanks#1{% + \long\def\thesis@thanks{#1}} +\define@key{thesis}{assignment}{% + \def\thesis@assignmentFiles{#1}} +\newif\ifthesis@auto\thesis@autotrue +\define@key{thesis}{autoLayout}[true]{% + \def\@true{true}% + \def\@arg{#1}% + \ifx\@true\@arg + \thesis@autotrue + \else + \thesis@autofalse + \fi} +\def\thesis@preamble{% + {\thesis@selectLocale{\thesis@locale}% + \thesis@blocks@preamble\clearpage} + \thesis@blocks@mainMatter} + +\def\thesis@postamble{{% + \thesis@selectLocale{\thesis@locale}% + \thesis@blocks@postamble}} + +\let\thesis@blocks@preamble\relax +\let\thesis@blocks@postamble\relax +\let\thesis@blocks@mainMatter\relax +\long\def\thesislong#1#2{% + \csname KV@thesis@#1\endcsname{#2}} +\newif\ifthesis@loaded\thesis@loadedfalse +\AtEndPreamble{\thesisload} +\def\thesis@load{\thesisload} +\def\thesisload{% + \ifthesis@loaded\else + \thesis@loadedtrue + \makeatletter + \ifx\thesis@locale\empty\else + \edef\thesis@locale{\thesis@locale} + \thesis@requireLocale{\thesis@locale} + \ifluatex + \ltx@ifpackageloaded{babel}{}{ + % See + \RequirePackage[base]{babel}} + \fi + \ifx\languagename\empty\else + \begingroup + \edef\@doclocale{\languagename}% + \ifx\@doclocale\thesis@locale + \endgroup + \AtBeginDocument{% + \thesis@selectLocale{\thesis@locale}}% + \else + \endgroup + \fi + \fi + \fi + \ifx\thesis@style\empty\else + \thesis@requireStyle{\thesis@style} + \fi + \thesis@require{hyperref} + \hypersetup{ + unicode=true, + pdfencoding=auto, + pdftitle=\thesis@title, + pdfauthor=\thesis@author, + pdfkeywords=\thesis@keywords, + pdfcreator=\thesis@version} + \ifthesis@auto + \AtBeginDocument{\thesis@preamble} + \AtEndDocument{\thesis@postamble} + \fi + \makeatother + \fi} +\def\thesis@exists#1#2{% + \IfFileExists{#1}{#2}{% + \ClassWarning{fithesis3}{File #1 doesn't exist}}} +\def\thesis@input#1{% + \thesis@exists{#1}{\input{#1}}} +\newcommand\thesis@require[2][]{% + \@ifpackageloaded{#2}{}{\RequirePackage[#1]{#2}}} +\newcommand\thesis@requireIfExists[2][]{% + \thesis@exists{#2.sty}{\thesis@require[#1]{#2}}} +\def\thesis@requireStyle#1{% + \ifthesis@style@inheritance + \thesis@requireIfExists{\thesis@stylepath fithesis-base}% + \thesis@requireIfExists{\thesis@stylepath\thesis@university + /fithesis-base} + \fi + \thesis@requireIfExists{\thesis@stylepath#1}} +\def\thesis@requireLocale#1{% + % Ignore redundant requests + \expandafter\ifx\csname thesis@#1@required\endcsname\relax + \expandafter\def\csname thesis@#1@required\endcsname{}% + \@ifpackageloaded{polyglossia}{\setotherlanguage{#1}}{} + \thesis@input{\thesis@localepath fithesis-#1.def}% + \ifthesis@locale@inheritance + \thesis@input{\thesis@localepath\thesis@university/% + fithesis-#1.def}% + \thesis@input{\thesis@localepath\thesis@university/% + \thesis@faculty/fithesis-#1.def}% + \fi + \fi} +\def\thesis@#1{\csname thesis@#1\endcsname} +\def\thesis@@#1{\thesis@{\thesis@locale @#1}} +\def\thesis@lower#1{{% + \let\ea\expandafter + \ea\ea\ea\ea\ea\ea\ea\ea\ea\ea\ea\ea\ea\ea\ea\lowercase\ea\ea\ea + \ea\ea\ea\ea\ea\ea\ea\ea\ea\ea\ea\ea{\ea\ea\ea\ea\ea\ea\ea\ea\ea + \ea\ea\ea\ea\ea\ea\@gobble\ea\ea\ea\string\ea\csname\csname the% + sis@#1\endcsname\endcsname}}} +\def\thesis@upper#1{{% + \let\ea\expandafter + \ea\ea\ea\ea\ea\ea\ea\ea\ea\ea\ea\ea\ea\ea\ea\uppercase\ea\ea\ea + \ea\ea\ea\ea\ea\ea\ea\ea\ea\ea\ea\ea{\ea\ea\ea\ea\ea\ea\ea\ea\ea + \ea\ea\ea\ea\ea\ea\@gobble\ea\ea\ea\string\ea\csname\csname the% + sis@#1\endcsname\endcsname}}} +\def\thesis@@lower#1{\thesis@lower{\thesis@locale @#1}} +\def\thesis@@upper#1{\thesis@upper{\thesis@locale @#1}} +\def\thesis@head#1 #2{% + \ifx\relax#2% + \expandafter\@gobbletwo + \else + \ #1% + \fi + \thesis@head#2}% +\def\thesis@tail#1 #2{% + \ifx\relax#2% + #1% + \expandafter\@gobbletwo + \fi + \thesis@tail#2}% +\AtEndDocument{\write\@auxout{\noexpand\gdef\noexpand\thesis@pages{\thepage}}} +\ifx\thesis@pages\undefined\def\thesis@pages{??}\fi +\AtEndPreamble{\thesis@require{csquotes}} +\def\thesis@selectLocale#1{% + \edef\thesis@locale{#1}% + \csq@setstyle{\thesis@@{csquotesStyle}}% + \ltx@ifpackageloaded{polyglossia}{% + \selectlanguage{\thesis@locale} + }{% + \language\csname l@\thesis@locale\endcsname + }} +\def\thesis@patch#1#2{% + \def\thesis@patch@versions{#1}% + \def\thesis@patch@action{#2}% + \def\thesis@patch@next##1,{% + \def\thesis@patch@arg{##1}% + \def\thesis@patch@relax{\relax}% + \ifx\thesis@patch@arg\thesis@version@number + \def\thesis@patch@next####1\relax,{}% + \expandafter\thesis@patch@action + \expandafter\thesis@patch@next + \else\ifx\thesis@patch@arg\thesis@patch@relax\else + \expandafter\expandafter\expandafter\thesis@patch@next + \fi\fi}% + \expandafter\expandafter\expandafter\thesis@patch@next + \expandafter\thesis@patch@versions\expandafter,\relax,} +\endinput +%% +%% End of file `fithesis3.cls'. diff --git a/polyglossia.lua b/polyglossia.lua new file mode 100644 index 0000000..bd1afa5 --- /dev/null +++ b/polyglossia.lua @@ -0,0 +1,161 @@ +require('luatex-hyphen') + +local luatexhyphen = luatexhyphen +local byte = unicode.utf8.byte + +local polyglossia_module = { + name = "polyglossia", + version = 1.3, + date = "2013/05/11", + description = "Polyglossia", + author = "Elie Roux", + copyright = "Elie Roux", + license = "CC0" +} + +local error, warning, info, log = + luatexbase.provides_module(polyglossia_module) + +polyglossia = polyglossia or {} +local polyglossia = polyglossia + +local current_language +local last_language +local default_language + +polyglossia.newloader_loaded_languages = { } +polyglossia.newloader_max_langid = 0 +local newloader_available_languages = dofile(kpse.find_file('language.dat.lua')) +-- Suggestion by Dohyun Kim on #129 +local t = { } +for k, v in pairs(newloader_available_languages) do + t[k] = v + for _, vv in pairs(v.synonyms) do + t[vv] = v + end +end +newloader_available_languages = t + +local function loadlang(lang, id) + if luatexhyphen.lookupname(lang) then + luatexhyphen.loadlanguage(lang, id) + end +end + +local function select_language(lang, id) + loadlang(lang, id) + current_language = lang + last_language = lang +end + +local function set_default_language(lang, id) + polyglossia.default_language = lang +end + +local function falsefun() + return false +end + +local function disable_hyphenation() + luatexbase.add_to_callback("hyphenate", falsefun, "polyglossia.disable_hyphenation") +end + +local function enable_hyphenation() + luatexbase.remove_from_callback("hyphenate", "polyglossia.disable_hyphenation") +end + +local check_char + +if luaotfload and luaotfload.aux and luaotfload.aux.font_has_glyph then + local font_has_glyph = luaotfload.aux.font_has_glyph + function check_char(chr) + local codepoint = tonumber(chr) + if not codepoint then codepoint = byte(chr) end + if font_has_glyph(font.current(), codepoint) then + tex.sprint('1') + else + tex.sprint('0') + end + end +else + local ids = fonts.identifiers or fonts.ids or fonts.hashes.identifiers + function check_char(chr) -- always in current font + local otfdata = ids[font.current()].characters + local codepoint = tonumber(chr) + if not codepoint then codepoint = byte(chr) end + if otfdata and otfdata[codepoint] then + tex.print('1') + else + tex.print('0') + end + end +end + +local function load_frpt() + require('polyglossia-frpt') +end + +local function load_tibt_eol() + require('polyglossia-tibt') +end + +-- New hyphenation pattern loader: use language.dat.lua directly and the language identifiers +local function newloader(langentry) + loaded_language = polyglossia.newloader_loaded_languages[langentry] + if loaded_language then + texio.write_nl('term and log', 'Language ' .. langentry .. ' already loaded; id is ' .. lang.id(loaded_language)) + -- texio.write_nl('term and log', 'Language ' .. langentry .. ' already loaded with patterns ' .. tostring(loaded_language) .. '; id is ' .. lang.id(loaded_language)) + -- texio.write_nl('term and log', 'Language ' .. langentry .. ' already loaded with patterns ' .. loaded_language['patterns'] .. '; id is ' .. lang.id(loaded_language)) + return lang.id(loaded_language) + else + langdata = newloader_available_languages[langentry] + if langdata and langdata['special'] == 'language0' then return 0 end + + if langdata then + print("Language data for " .. langentry) + for k, v in pairs(langdata) do + print(k, tostring(v)) + end + polyglossia.newloader_max_langid = polyglossia.newloader_max_langid + 1 + -- langobject = lang.new(newloader_max_langid) + lang.new(); lang.new(); lang.new() + langobject = lang.new() + texio.write_nl('term and log', langdata.patterns) + if langdata.patterns and langdata.patterns ~= '' then + pattfilepath = kpse.find_file(langdata.patterns) + if pattfilepath then + pattfile = io.open(pattfilepath) + lang.patterns(langobject, pattfile:read('*all')) + pattfile:close() + end + end + if langdata.hyphenation and langdata.hyphenation ~= '' then + hyphfilepath = kpse.find_file(langdata.hyphenation) + if hyphfilepath then + hyphfile = io.open(hyphfilepath) + lang.hyphenation(langobject, hyphfile:read('*all')) + hyphfile:close() + end + end + polyglossia.newloader_loaded_languages[langentry] = langobject + + texio.write_nl('term and log', 'Language ' .. langentry .. ' was not yet loaded; created with id ' .. lang.id(langobject)) + return lang.id(langobject) + else + texio.write_nl('term and log', 'Language ' .. langentry .. ' not found in language.dat.lua') + return 255 + end + end +end + +polyglossia.loadlang = loadlang +polyglossia.select_language = select_language +polyglossia.set_default_language = set_default_language +polyglossia.current_language = current_language -- doesn't seem to be working well :-( +polyglossia.default_language = default_language +polyglossia.check_char = check_char +polyglossia.load_frpt = load_frpt +polyglossia.load_tibt_eol = load_tibt_eol +polyglossia.disable_hyphenation = disable_hyphenation +polyglossia.enable_hyphenation = enable_hyphenation +polyglossia.newloader = newloader diff --git a/polyglossia.sty b/polyglossia.sty new file mode 100644 index 0000000..0a9da21 --- /dev/null +++ b/polyglossia.sty @@ -0,0 +1,871 @@ +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{polyglossia}[2015/03/25 v1.42.4 + Alternative to Babel for XeLaTeX and LuaLaTeX] +\RequirePackage{etoolbox} +\RequirePackage{makecmds} +\RequirePackage{xkeyval}[2008/08/13] +% Will raise error if used with anything else than XeTeX or LuaTeX +\RequirePackage{fontspec}[2010/06/08]% v2.0 +% Ironically, ifluatex.sty is included by some other package if we run +% LuaTeX, but it's not if we run XeTeX, and we need it to know which of +% the two engines it is! Hence we include it here. +\RequirePackage{ifluatex} +% For symmetry with ifluatex +\RequirePackage{ifxetex} +% fontspec now uses LaTeX3 packages such as expl3, so we need this: +\ExplSyntaxOn + +%% This is for compatibility with Babel-aware package: +\cslet{ver@babel.sty}{\@empty} % this "fakes" babel +\def\languageshorthands#1{\relax} %this is for scrlttr2 class +\AtEndPreamble{\let\bbl@set@language\xpg@set@language} %for biblatex +\AtEndPreamble{\let\bbl@main@language\xpg@main@language} %for biblatex + +\ifluatex + \RequirePackage{luatexbase} % already included by fontspec, but needed here + \RequireLuaModule{polyglossia} +\fi + +% Useful for getting list of loaded languages and variants. Like babel's bbl@loaded +\let\xpg@loaded\@empty +\let\xpg@vloaded\@empty + +%% custom message macros +\providecommand*{\xpg@error}[1]{% + \PackageError{polyglossia}{#1}{}% +} + +\providecommand*{\xpg@warning}[1]{% + \PackageWarning{polyglossia}{#1}% +} + +\providecommand*{\xpg@info}[1]{% + \PackageInfo{polyglossia}% + {#1\@gobble}% +} %% the \@gobble is to prevent displaying the line nr + +%TODO change all instances of \xpg@nopatterns in gloss-*.ldf files +\providecommand*{\xpg@nopatterns@fallback}[2][nohyphenation]{% + \xpg@warning{No~ hyphenation~ patterns~ were~ loaded~ for~ `#2'\MessageBreak + I~ will~ use~ \string\language=\string\l@ #1\space instead}% + \expandafter\adddialect\csname l@#2\expandafter\endcsname\csname l@#1\endcsname\relax} + +\providecommand*{\xpg@nopatterns}[1]{% + \xpg@warning{No~ hyphenation~ patterns~ were~ loaded~ for~ `#1'\MessageBreak + I~ will~ use~ \string\language=\string\l@nohyphenation\space instead}% + %%TODO? \expandafter\adddialect\csname l@#1\endcsname\l@nohyphenation\relax + } + +\def\xpg@ill@value#1#2{% + \xpg@warning{Illegal~ value~ (#1)~ for~ #2}} + +%% use macro if defined, else warn that it is not +\def\csuse@warn#1{% + \ifcsundef{#1}{\xpg@warning{ \expandafter\string\csname #1\endcsname\space is~ not~ defined}}% + {\csname #1\endcsname}} + +%% ensure directionality if bidi is loaded, else ignore +\def\@@ensure@dir#1{\ifcsundef{@ensure@dir}{#1}{\@ensure@dir{#1}}} +\def\@@ensure@maindir#1{\ifcsundef{@ensure@maindir}{#1}{\@ensure@maindir{#1}}} + +%% Used by the language definitions files for right-to-left languages +\def\RequireBidi{% + \ifxetex + \RequirePackage{bidi} + \else\ifluatex + \RequirePackage{luabidi} + \else + \xpg@warning{You’re running a TeX engine that is not LuaTeX or XeTeX.\MessageBreak +That is almost guaranteed to cause problems.} + \fi\fi} + +%% compatibility with babel +\let\addto\gappto% gappto is defined in etoolbox + +%% == Utility macros == +%% They are needed because \MakeUppercase and \MakeLowercase are protected, +%% but we need to change case while defining csnames when setting up fonts for +%% non-Latin scripts. For instance with "Script=Arabic" we need to lowercase +%% "Arabic" to create \arabicfont. +\def\xpg@uppercasefirst#1{\expandafter\xpg@@uppercasefirst #1} +\def\xpg@@uppercasefirst#1{% + \if a#1A\else + \if b#1B\else + \if c#1C\else + \if d#1D\else + \if e#1E\else + \if f#1F\else + \if g#1G\else + \if h#1H\else + \if i#1I\else + \if j#1J\else + \if k#1K\else + \if l#1L\else + \if m#1M\else + \if n#1N\else + \if o#1O\else + \if p#1P\else + \if q#1Q\else + \if r#1R\else + \if s#1S\else + \if t#1T\else + \if u#1U\else + \if v#1V\else + \if w#1W\else + \if x#1X\else + \if y#1Y\else + \if z#1Z\else + \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi +} + +\def\xpg@lowercasefirst#1{\expandafter\xpg@@lowercasefirst #1} +\def\xpg@@lowercasefirst#1{% + \if A#1a\else + \if B#1b\else + \if C#1c\else + \if D#1d\else + \if E#1e\else + \if F#1f\else + \if G#1g\else + \if H#1h\else + \if I#1i\else + \if J#1j\else + \if K#1k\else + \if L#1l\else + \if M#1m\else + \if N#1n\else + \if O#1o\else + \if P#1p\else + \if Q#1q\else + \if R#1r\else + \if S#1s\else + \if T#1t\else + \if U#1u\else + \if V#1v\else + \if W#1w\else + \if X#1x\else + \if Y#1y\else + \if Z#1z\else + \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi +} + +%% NEW EXPERIMENTAL SETUP INTERFACE FOR GLOSS FILES +%% options currently available: +%% language : the name of the language (as understood by fontspec) +%% hyphennames : the different hyphenation patterns to try (comma separated list) +%%% TODO: if pattern is prefixed by !, then it should be loaded as a fallback, with \xpg@nopatterns@fallback - i.e. with a warning: e.g. sanskrit for hindi, or catalan for asturian. – Also for languages with variants! (English and German, etc.) +%% script : the name of the script (as understood by fontspec) – default is Latin +%% direction : the direction of the script: LR or RL +%% scripttag : the OpenType tag for the script +%% langtag : the OpenType tag for the language +%% hyphenmins : the hyphenmins for this language (comma-sep list of two integers) +%% frenchspacing : boolean +%% indentfirst : boolean +%% fontsetup : boolean +%% TODO: nouppercase : boolean (for scripts like Arabic, Devanagari, etc which have no concept of uppercase/lowercase) +%% TODO: localalph = {,} +%% TODO: localnumber = +%% or even better localdigits = {0123456789} for fully automatic setup + +\newif\if@xpg@language@really@defined@ +\newcommand*\PolyglossiaSetup[2]{% + %define booleans etoolbox style and set defaults + %% TODO ? \providetoggle{#1@setup@done}% + \providetoggle{#1@RL}% + \providetoggle{#1@latin}\toggletrue{#1@latin}% + \providetoggle{#1@scriptlangequal}% whether lang and script names are same: e.g. Hebrew, Arabic + \providebool{#1@fontsetup}% + \providebool{#1@indentfirst}% + \providebool{#1@frenchspacing}% + % we initialize these so that we can use \gappto below + \csgdef{init@extras@#1}{}% + \csgdef{init@noextras@#1}{}% we don't use this yet: remove? + \csgdef{xpg@langname@#1}{\xpg@uppercasefirst{#1}}% + %needed for docsvlist with hyphennames key: + \def\do##1{% + \xpg@check@ifdefined{#1} + \if@xpg@language@really@defined@\else + \ifstrequal{#1}{##1}{}% + {\xpg@ifdefined{##1}% + {\expandafter\ifx\csname l@##1\endcsname\l@nohyphenation\else\csletcs{l@#1}{l@##1}\xpg@set@language@luatex@iv{##1}\fi}% + {\csdef{l@##1}{l@nohyphenation}}% + }% + \fi + }% + %define all keys: + \xpg@define@keys{#1}% + \setkeys[xpg@setup]{#1}{#2}% + % here we do the fontsetup: + \ifbool{#1@fontsetup}% + {\xpg@fontsetup@auto{#1}}% + {\xpg@info{Skipping~ automatic~ font~ setup~ for~ language~ #1}}% + %% TODO? \toggletrue{#1@setup@done}% + % reinit \do + \def\do##1{\setotherlanguage{##1}}% +} + +\def\xpg@first#1,#2{#1} +\def\xpg@second#1,#2{#2} + +\def\xpg@define@keys#1{% + \define@key[xpg@setup]{#1}{script}{% + \ifstrequal{##1}{Latin}% + {\toggletrue{#1@latin}}% + {\togglefalse{#1@latin}}% + \csgdef{xpg@scriptname@#1}{##1}% + \csgdef{xpg@scriptname@#1@lc}{\xpg@lowercasefirst{##1}}}% + \define@key[xpg@setup]{#1}{scripttag}{% + \csgdef{xpg@scripttag@#1}{##1}}% + \define@key[xpg@setup]{#1}{language}{% + \csgdef{xpg@langname@#1}{##1}}% + \define@key[xpg@setup]{#1}{langtag}{% + \csgdef{xpg@langtag@#1}{##1}}% + \define@key[xpg@setup]{#1}{hyphennames}[{#1}]{% + \docsvlist{##1}% + % if l@#1 does not yet exist, + % we assign it to nohyphenation + % we do this here in case the hyphennames key was omitted + \xpg@ifdefined{#1}{}% + {\xpg@nopatterns{\csname xpg@langname@#1\endcsname}% + \expandafter\adddialect\csname l@#1\endcsname\l@nohyphenation\relax}% + \csdef{#1@language}{% + \ifbool{xpg@hyphenation@disabled}{% + \xdef\xpg@lastlanguage{\the\csname l@#1\endcsname}% + }{% + \ifluatex% + \xpg@set@language@luatex@iv{#1}% + \fi% + \language=\csname l@#1\endcsname% + }% + }% + }% + \define@choicekey+[xpg@setup]{#1}{direction}[\val\nr]{LR,RL}[LR]% + {\ifcase\nr\relax + \togglefalse{#1@RL}% + \or + \toggletrue{#1@RL}% + \ifcsundef{RTL}{\ifluatex\RequirePackage{luabidi}\else\RequirePackage{bidi}\fi}{}% FIXME Use \RequireBidi and remove calls in individual gloss files. + \fi}% + {\xpg@warning{#1: Invalid value \val\space for key "direction"}}% + \define@key[xpg@setup]{#1}{hyphenmins}[{2,3}]% + {\begingroup\edef\x{\endgroup + \noexpand\setlocalhyphenmins{#1}{\xpg@first##1}{\xpg@second##1}}\x} + \define@boolkey[xpg@setup]{#1}[#1@]{frenchspacing}[true]{% + \ifbool{#1@frenchspacing}% + {\csgappto{init@extras@#1}{\frenchspacing}}% + {\csgappto{init@extras@#1}{\nonfrenchspacing}}}% + \define@boolkey[xpg@setup]{#1}[#1@]{indentfirst}[true]{% + \ifbool{#1@indentfirst}% + {\csgappto{init@extras@#1}{\french@indent}}% + {\csgappto{init@extras@#1}{\nofrench@indent}}}% +% \define@choicekey*+[xpg@setup]{#1}{fontsetup}[\val\nr]{none,custom,auto}[none]% +% %{\csgdef{#1@fontsetup}{\val}}% +% {\xpg@fontsetup{\val}{#1}}% +% {\xpg@warning{Invalid value \val\space for key "fontsetup" in module "#1"}}% + \define@boolkey[xpg@setup]{#1}[#1@]{fontsetup}[true]{}% + %TODO assign csnames corr. to localized alph and Alph + % \define@key[xpg@setup]{#1}{localalph}[{#1@alph,#1@Alph}]{% + % \cslet{xpg@localalph@#1}{\expandafter\csname\xpg@first##1\endcsname}% + % \cslet{xpg@localAlph@#1}{\expandafter\csname\xpg@second##1\endcsname}% + %}% + %TODO same thing with localdigits +} + +\def\xpg@lastlanguage{0}% + +\providebool{xpg@hyphenation@disabled}% +\boolfalse{xpg@hyphenation@disabled} + +\def\xpg@disablehyphenation{% + \ifbool{xpg@hyphenation@disabled}{}{% + \booltrue{xpg@hyphenation@disabled}% + \xdef\xpg@lastlanguage{\the\language}% + \xpg@set@language@luatex@iv{nohyphenation} + \language=\l@nohyphenation% + \ifluatex % + \directlua{polyglossia.disable_hyphenation()}% + \fi % + }% +} + +\def\xpg@enablehyphenation{% + \ifbool{xpg@hyphenation@disabled}{% + \boolfalse{xpg@hyphenation@disabled}% + \language=\csname xpg@lastlanguage\endcsname% + \ifluatex % + \directlua{polyglossia.enable_hyphenation()}% + \fi % + }{}% +} + +\let\disablehyphenation\xpg@disablehyphenation +\let\enablehyphenation\xpg@enablehyphenation + +%\def\xpg@fontsetup#1{\xpg@csifdef@warn{xpg@fontsetup@#1}} +%\def\xpg@fontsetup@none#1{\csgdef{#1@font}{\ifcsdef{#1font}{\csname #1font\endcsname}{}}} %<-- simplistic +%\def\xpg@fontsetup@custom#1{\csuse{#1@font}} + +\def\xpg@fontsetup@auto#1{\iftoggle{#1@latin}% + {\xpg@fontsetup@latin{#1}}% + {\xpg@fontsetup@nonlatin{#1}}% +} + +\def\xpg@addfontfeature@lang#1#2{% #1 is langtag, #2 is langname + % Turkish is a special case: tag can be TRK or TUR + \edef\tmp@Turkish{Turkish}% + \edef\tmp@@langname{#2}% + % \ifstrequal{#2}{Turkish}% + \ifx\tmp@@langname\tmp@Turkish + \fontspec_if_language:nTF {TRK}% + {\addfontfeature{Language=Turkish}}% + {\fontspec_if_language:nTF {TUR}% + {\addfontfeature{Language=Turkish}}% + {}}% + % else not Turkish + \else + \edef\tmp@@langparam{Language=#2}% + \expandafter\expandafter\expandafter\fontspec_if_language:nTF \expandafter{#1}% + {\expandafter\expandafter\expandafter\addfontfeature\expandafter{\tmp@@langparam}}% + {}% + \fi +} + +\def\xpg@addfontfeature@script#1#2{% #1 is scripttag, #2 is scriptname + \edef\tmp@@scriptparam{Script=#2}% + \expandafter\expandafter\expandafter\fontspec_if_script:nTF \expandafter{#1}% + {\expandafter\expandafter\expandafter\addfontfeature\expandafter{\tmp@@scriptparam}}% + {\xpg@error{The~ current~ roman~ font~ does~ not~ contain~ the~ \expandafter\noexpand#2 ~ script!\MessageBreak + Please~ define~ \expandafter\string\csname \xpg@lowercasefirst{#2}font\endcsname\space with~ \string\newfontfamily}}% +} + +\def\xpg@fontsetup@latin#1{% + \begingroup + \csgdef{#1@font@rm}{% + \ifcsdef{#1font}{\csname #1font\endcsname}% + {\edef\tmp@langtag{\csuse{xpg@langtag@#1}}% + \edef\tmp@langname{\csuse{xpg@langname@#1}}% + \rmfamilylatin% + \ifcsvoid{xpg@langtag@#1}{}{% + \ifcsvoid{xpg@langname@#1}{}{% + \xpg@addfontfeature@lang{\tmp@langtag}{\tmp@langname}}% + }}}% + \csgdef{#1@font@sf}{% + \ifcsdef{#1fontsf}{\csname #1fontsf\endcsname}% + {\edef\tmp@langtag{\csuse{xpg@langtag@#1}}% + \edef\tmp@langname{\csuse{xpg@langname@#1}}% + \sffamilylatin% + \ifcsvoid{xpg@langtag@#1}{}{% + \ifcsvoid{xpg@langname@#1}{}{% + \xpg@addfontfeature@lang{\tmp@langtag}{\tmp@langname}}% + }}}% + \csgdef{#1@font@tt}{% + \ifcsdef{#1fonttt}{\csname #1fonttt\endcsname}% + {\edef\tmp@langtag{\csuse{xpg@langtag@#1}}% + \edef\tmp@langname{\csuse{xpg@langname@#1}}% + \ttfamilylatin% + \ifcsvoid{xpg@langtag@#1}{}{% + \ifcsvoid{xpg@langname@#1}{}{% + \xpg@addfontfeature@lang{\tmp@langtag}{\tmp@langname}}% + }}}% + \endgroup +} + +\def\xpg@fontsetup@nonlatin#1{% + \begingroup + \edef\tmp@langname@lc{#1}% eg ukrainian + \edef\tmp@scriptname@lc{\csuse{xpg@scriptname@#1@lc}}% eg cyrillic + \ifx\tmp@scriptname@lc\tmp@langname@lc + \toggletrue{#1@scriptlangequal}% + \else + \togglefalse{#1@scriptlangequal}% + \fi + \csgdef{#1@font@rm}{% + \ifcsdef{#1font}% + {\@nameuse{#1font}}% + {\edef\tmp@scripttag{\csuse{xpg@scripttag@#1}}% eg cyrl + \edef\tmp@scriptname{\csuse{xpg@scriptname@#1}}% eg Cyrillic + \edef\tmp@langtag{\csuse{xpg@langtag@#1}}% eg UKR + \edef\tmp@langname{\csuse{xpg@langname@#1}}% eg Ukrainian + \providetoggle{#1@use@script@font}% + \iftoggle{#1@scriptlangequal}% + {\rmfamilylatin}% + {\expandafter\ifcsname\csuse{xpg@scriptname@#1@lc} font\endcsname% eg \cyrillicfont + \toggletrue{#1@use@script@font}% + \expandafter\csname\csuse{xpg@scriptname@#1@lc} font\endcsname + \else + \rmfamilylatin + \fi} + \iftoggle{#1@use@script@font}{}{% + \ifcsvoid{xpg@scripttag@#1}{}{% + \ifcsvoid{xpg@scriptname@#1}{}{% + \xpg@addfontfeature@script{\tmp@scripttag}{\tmp@scriptname}}}}% + \ifcsvoid{xpg@langtag@#1}{}{% + \ifcsvoid{xpg@langname@#1}{}{% + \xpg@addfontfeature@lang{\tmp@langtag}{\tmp@langname}}}% + }}% + \csgdef{#1@font@sf}{% + \ifcsdef{#1fontsf}% + {\@nameuse{#1fontsf}}% + {\edef\tmp@scripttag{\csuse{xpg@scripttag@#1}}% eg cyrl + \edef\tmp@scriptname{\csuse{xpg@scriptname@#1}}% eg Cyrillic + \edef\tmp@langtag{\csuse{xpg@langtag@#1}}% eg UKR + \edef\tmp@langname{\csuse{xpg@langname@#1}}% eg Ukrainian + \providetoggle{#1@use@script@fontsf}% + \iftoggle{#1@scriptlangequal}% + {\sffamilylatin}% + {\expandafter\ifcsname\csuse{xpg@scriptname@#1@lc} fontsf\endcsname% eg \cyrillicfontsf + \toggletrue{#1@use@script@fontsf}% + \expandafter\csname\csuse{xpg@scriptname@#1@lc} fontsf\endcsname + \else + \sffamilylatin + \fi} + \iftoggle{#1@use@script@fontsf}{}{% + \ifcsvoid{xpg@scripttag@#1}{}{% + \ifcsvoid{xpg@scriptname@#1}{}{% + \xpg@addfontfeature@script{\tmp@scripttag}{\tmp@scriptname}}}}% + \ifcsvoid{xpg@langtag@#1}{}{% + \ifcsvoid{xpg@langname@#1}{}{% + \xpg@addfontfeature@lang{\tmp@langtag}{\tmp@langname}}}% + }}% + \csgdef{#1@font@tt}{% + \ifcsdef{#1fonttt}% + {\@nameuse{#1fonttt}}% + {\edef\tmp@scripttag{\csuse{xpg@scripttag@#1}}% eg cyrl + \edef\tmp@scriptname{\csuse{xpg@scriptname@#1}}% eg Cyrillic + \edef\tmp@langtag{\csuse{xpg@langtag@#1}}% eg UKR + \edef\tmp@langname{\csuse{xpg@langname@#1}}% eg Ukrainian + \providetoggle{#1@use@script@fonttt}% + \iftoggle{#1@scriptlangequal}% + {\ttfamilylatin}% + {\expandafter\ifcsname\csuse{xpg@scriptname@#1@lc} fonttt\endcsname% eg \cyrillicfonttt + \toggletrue{#1@use@script@fonttt}% + \expandafter\csname\csuse{xpg@scriptname@#1@lc} fonttt\endcsname + \else + \ttfamilylatin + \fi} + \iftoggle{#1@use@script@fonttt}{}{% + \ifcsvoid{xpg@scripttag@#1}{}{% + \ifcsvoid{xpg@scriptname@#1}{}{% + \xpg@addfontfeature@script{\tmp@scripttag}{\tmp@scriptname}}}}% + \ifcsvoid{xpg@langtag@#1}{}{% + \ifcsvoid{xpg@langname@#1}{}{% + \xpg@addfontfeature@lang{\tmp@langtag}{\tmp@langname}}}% + }}% + \endgroup +} + +%%% END OF PolyglossiaSetup + +%% ensure localization of \markright and \markboth commands +%%% THIS IS NOW DISABLED BY DEFAULT +\define@boolkey{polyglossia}[xpg@]{localmarks}[false]{% + \ifbool{xpg@localmarks}{% + \xpg@info{Option:~ localmarks}% + \def\local@marks##1{% + \def\markboth####1####2{% + \begingroup + \let\label\relax \let\index\relax \let\glossary\relax + \unrestored@protected@xdef\@themark + {{\foreignlanguage{##1}{% + \protect\@@ensure@maindir{####1}}}% + {\foreignlanguage{##1}{% + \protect\@@ensure@maindir{####2}}}}% + \@temptokena \expandafter{\@themark}% + \mark{\the\@temptokena}% + \endgroup + \if@nobreak\ifvmode\nobreak\fi\fi}% + \def\markright####1{% + \begingroup + \let\label\relax \let\index\relax \let\glossary\relax + \expandafter\@markright\@themark + {\foreignlanguage{##1}{\protect\@@ensure@maindir{####1}}}% + \@temptokena \expandafter{\@themark}% + \mark{\the\@temptokena}% + \endgroup + \if@nobreak\ifvmode\nobreak\fi\fi}% + \def\@markright####1####2####3{\@temptokena{\protect\@@ensure@maindir{####1}}% + \unrestored@protected@xdef\@themark{{\the\@temptokena}% + {\protect\@@ensure@maindir{####3}}}}}% + }{% else + \def\local@marks##1{}% + }% +} +\setkeys{polyglossia}{localmarks=false} + +% Easy way out – Arthur, 2012-08-01 +\ifcsdef{newXeTeXintercharclass}{% +% to reset the intercharclass of a character to "normal" +\newXeTeXintercharclass\xpg@normalclass %TODO +}{} + +%% when no patterns are available, we use \l@nohyphenation, assigned to 255 +%% (suggestion by Enrico Gregorio) +\@ifundefined{l@nohyphenation}{\chardef\l@nohyphenation=255 }{} + +%we call this macro when a gloss file is not found for a given language +\def\xpg@nogloss#1{% + \xpg@warning{File~ gloss-#1.ldf~ does~ not~ exist!\MessageBreak + I~ will~ nevertheless~ try~ to~ use~ hyphenation~ patterns~ for~ #1.}% + \PolyglossiaSetup{#1}{hyphenmins,hyphennames={#1},fontsetup=true}% + % the above amounts to: + %\ifcsundef{l@#1}% + % {\expandafter\adddialect\csname l@#1\endcsname\l@nohyphenation\relax}% + % {\setlocalhyphenmins{#1}{2}{3}}% + %\csdef{#1@language}{\language=\csname l@#1\endcsname}% +} + +\newcommand{\xpg@input}[1]{% + \chardef\xpg@atcatcode\catcode`\@ + \makeatletter + \input{#1}\catcode`\@=\xpg@atcatcode} + +\newcommand{\setdefaultlanguage}[2][]{% + \edef\xpg@loaded{#2\ifx\xpg@loaded\@empty\else,\xpg@loaded\fi}% + \IfFileExists{gloss-#2.ldf}% + {\ifcsundef{#2@loaded}% + {\xpg@input{gloss-#2.ldf}% + \xpg@info{Default~ language~ is~ #2}% + \def\languagename{#2}% + \ifluatex % + \directlua{polyglossia.set_default_language('\luatexluaescapestring{\string#2}')}% + \fi % + % This is needed because \arabic is a built-in LaTeX command: + % so now we have \begin{Arabic}... instead of \begin{arabic}... + \ifstrequal{#2}{arabic}% + {\newenvironment{Arabic}[1][]{\begin{otherlanguage}[####1]{arabic}}% + {\end{otherlanguage}}}% + {\newenvironment{#2}[1][]{\begin{otherlanguage}[####1]{#2}}% + {\end{otherlanguage}}}% + \expandafter\newcommand\csname text#2\endcsname[2][]{% + \ifcsdef{RTL}% + {\iftoggle{#2@RL}% + {\@ensure@RTL{\foreignlanguage[####1]{#2}{####2}}}% + {\@ensure@LTR{\foreignlanguage[####1]{#2}{####2}}}% + }% else bidi not loaded + {\iftoggle{#2@RL}% + {\xpg@error{Language~ #2~ is~ right-to-left,~ but~ bidi~ package~ was~ not~ loaded!}}% + {\foreignlanguage[####1]{#2}{####2}}% + }% + }% + \csletcs{local#2}{text#2}% + \csgdef{#2@loaded}{}% + \gdef\xpg@main@language{#2}% + }% + {\xpg@warning{gloss-#2.ldf~ is~ already~ loaded!}}%: + %% The following settings are for the default language and script: + \iftoggle{#2@RL}{\@RTLmaintrue}{}% this tells bidi.sty that the document is RTL + \AtBeginDocument{% + \selectlanguage[#1]{#2}% + \selectbackgroundlanguage{#2}}% + }% + %ELSE + {\xpg@nogloss{#2}}% +} + +\let\setmainlanguage=\setdefaultlanguage + +\newcommand{\resetdefaultlanguage}[2][]{% + \ifcsundef{#2@loaded}{% + \xpg@error{gloss-#2.ldf~ is~ not~ loaded!}}% + {\csuse{no\xpg@main@language @globalnumbers}% disable globalnumbers of previously defined default language + \csuse{noextras@\xpg@main@language}% + \csuse{init@noextras@\xpg@main@language}% + \def\languagename{#2}% + \iftoggle{#2@RL}{\@rlmaintrue\@rl@footnotetrue}{}% + \selectlanguage[#1]{#2}% + \selectbackgroundlanguage{#2}}} + +\expandafter\ifx\familydefault\sfdefault + \def\familytype{sf} +\else\expandafter\ifx\familydefault\ttdefault + \def\familytype{tt} +\else + \def\familytype{rm} +\fi\fi +% This robustifies the redefinitions of \family (suggestion by Enrico Gregorio) +% e.g. to prevent expansion of the \familytype redefinition in auxiliary files +\csgappto{rmfamily~}{\def\familytype{rm}} +\csgappto{sffamily~}{\def\familytype{sf}} +\csgappto{ttfamily~}{\def\familytype{tt}} +% This saves the normalfont for the latin script since we may change normalfont in other scripts +\let\normalfontlatin=\normalfont% +\let\rmfamilylatin=\rmfamily% +\let\sffamilylatin=\sffamily% +\let\ttfamilylatin=\ttfamily% + +\def\resetfontlatin{% + \let\rmfamily=\rmfamilylatin% + \let\sffamily=\sffamilylatin% + \let\ttfamily=\ttfamilylatin% + \let\normalfont=\normalfontlatin} + +\def\selectfontfamilylatin{% + \def\tmp@tt{tt}\def\tmp@sf{sf}% + \ifx\familytype\tmp@tt% + \ttfamilylatin% + \else\ifx\familytype\tmp@sf% + \sffamilylatin% + \else\rmfamilylatin\fi\fi} + +\def\xpg@select@fontfamily#1{% + \def\tmp@tt{tt}\def\tmp@sf{sf}% + \ifx\familytype\tmp@tt + \csuse@warn{#1@font@tt}% + \else\ifx\familytype\tmp@sf + \csuse@warn{#1@font@sf}% + \else\csuse@warn{#1@font@rm}\fi\fi} + +\def\xpg@set@normalfont#1{% + \letcs{\rmfamily}{#1@font@rm}% + \letcs{\sffamily}{#1@font@sf}% + \letcs{\ttfamily}{#1@font@tt}% + \gdef\normalfont{\protect\xpg@select@fontfamily{#1}}% + \gdef\reset@font{\protect\normalfont}% +} + +\let\@@fterindentfalse\@afterindentfalse +\def\french@indent{\let\@afterindentfalse\@afterindenttrue + \@afterindenttrue} +\def\nofrench@indent{\let\@afterindentfalse\@@fterindentfalse + \@afterindentfalse} + +\newcommand{\selectbackgroundlanguage}[1]{% + \iftoggle{#1@latin}{}{\xpg@set@normalfont{#1}}% + \csuse{#1@globalnumbers}% + } + +\newcommand{\setotherlanguage}[2][]{% + \edef\xpg@loaded{#2\ifx\xpg@loaded\@empty\else,\xpg@loaded\fi}% + \IfFileExists{gloss-#2.ldf}% + {\ifcsundef{#2@loaded}% + {\xpg@input{gloss-#2.ldf}% + \setkeys{#2}{#1}% + \edef\@tmpa{arabic}% + \edef\@tmpb{#2}% + \ifx\@tmpb\@tmpa% + \newenvironment{Arabic}[1][]{\begin{otherlanguage}[####1]{arabic}}% + {\end{otherlanguage}}% + \else + \newenvironment{#2}[1][]{\begin{otherlanguage}[####1]{#2}}% + {\end{otherlanguage}}% + \fi + \expandafter\newcommand\csname text#2\endcsname[2][]{% + \ifcsdef{RTL}% + {\iftoggle{#2@RL}% + {\@ensure@RTL{\foreignlanguage[####1]{#2}{####2}}}% + {\@ensure@LTR{\foreignlanguage[####1]{#2}{####2}}}% + }% else bidi not loaded + {\iftoggle{#2@RL}% + {\xpg@error{Language~ #2~ is~ right-to-left,~ but~ bidi~ package~ was~ not~ loaded!}}% + {\foreignlanguage[####1]{#2}{####2}}% + }% + }% + \csletcs{local#2}{text#2}% + \csgdef{#2@loaded}{}% + }% + {\xpg@warning{gloss-#2.ldf~ is~ already~ loaded!}}% + }% + %ELSE + {\xpg@nogloss{#2}}% +} + +\newcommand\setotherlanguages[1]{% + \def\do##1{\setotherlanguage{##1}}% + \docsvlist{#1}}% + +\def\common@language{% FIXME is this really needed??? + \ifbool{xpg@hyphenation@disabled}{% + \xdef\xpg@lastlanguage{\z@}% + }{% + \language=\z@ + }% + \lefthyphenmin=\tw@ + \righthyphenmin=\thr@@} + +\def\noextrascurrent#1{\csuse{noextras@#1}} + +\def\xpg@initial@setup{\ifcsundef{languagename}{}% + {\noextrascurrent{\languagename}}% + \common@language} + +\AtBeginDocument{\xpg@initial@setup} + +\providecommand{\foreignlanguage}{} + +\renewcommand{\foreignlanguage}[3][]{% + \ifcsundef{#2@loaded}% + {\xpg@nogloss{#2}}% + {{\select@@language{#2}% + \setkeys{#2}{#1}% + \use@localhyphenmins{#2}% + \ifbool{#2@frenchspacing}{\frenchspacing}{\nonfrenchspacing}% + \csuse{inlineextras@#2}% + #3}% + }% +} + +% otherlanguage* is the environment equivalent of \foreignlanguage +\expandafter\providecommand\csname otherlanguage*\endcsname{} +\renewenvironment{otherlanguage*}[2][]{% + \ifcsundef{#2@loaded}% + {\xpg@nogloss{#2}}% + {\select@@language{#2}% + \setkeys{#2}{#1}% + \use@localhyphenmins{#2}% + \ifbool{#2@frenchspacing}{\frenchspacing}{\nonfrenchspacing}% + \csuse{inlineextras@#2}\csuse{date#2}% + }% +}{} + +%Hook that other package authors can use +%(for instance biblatex): +\newcommand*{\xpg@hook@setlanguage}{} + +\providecommand{\selectlanguage}{} +\renewcommand{\selectlanguage}[2][]{% + \ifcsundef{#2@loaded}% + {\xpg@nogloss{#2}}% + {\def\xpg@pop@language{% + \xpg@set@language{\languagename}% + \xpg@hook@setlanguage% + \let\emp@langname\@undefined}% + \aftergroup\xpg@pop@language% + % If the optional argument sets a value for the key “variant”, copy it to xpg@langvariant + \def\do##1{% + \def\xpg@parsekeyvalue####1=####2\relax{% + \def\@tmpa{####1} + \def\@tmpb{variant} + \ifx\@tmpa\@tmpb\setkeys{xpg@langvariant}{##1}\fi + }% + \xpg@parsekeyvalue##1=\relax + }% + \docsvlist{#1} + \setkeys{#2}{#1}% + \xpg@set@language{#2}% + }% +} + +% Save any variant in csv list of variants +\define@key{xpg@langvariant}{variant}{% + \edef\xpg@vloaded{#1\ifx\xpg@vloaded\@empty\else,\xpg@vloaded\fi}} + +\newcommand{\xpg@set@language}[1]{% + \select@language{#1}% + \if@filesw% + \protected@write\@auxout{}{\protect\select@language{#1}}% + \addtocontents{toc}{\protect\select@language{#1}}% + \addtocontents{lof}{\protect\select@language{#1}}% + \addtocontents{lot}{\protect\select@language{#1}}% + \fi +} + +\def\xpg@set@language@luatex@iii#1#2{% + % here we use lu@texhyphen@loaded@\the\language, the same as in babel + \ifcsdef{bbl@hyphendata@#2}{}{% + \global\@namedef{bbl@hyphendata@\the\language}{}% + \directlua{polyglossia.select_language('\luatexluaescapestring{\string#1}', \the\csname l@#1\endcsname)}% + } +} + +\newcommand\xpg@check@ifdefined[1]{% + \expandafter\ifx\csname l@#1\endcsname\relax\@xpg@language@really@defined@false\else + \ifx\csname l@#1\endcsname\l@nohyphenation\@xpg@language@really@defined@false\else + \@xpg@language@really@defined@true + \fi + \fi +} + +\newcommand\xpg@ifdefined[3]{% + \ifluatex + \xpg@set@language@luatex@iv{#1}% + \fi + \xpg@check@ifdefined{#1} + \if@xpg@language@really@defined@#2\else#3\fi +}% + +\newcommand\xpg@set@language@luatex@iv[1]{% + \ifluatex + \xpg@check@ifdefined{#1}% + \if@xpg@language@really@defined@\else + \expandafter\chardef\csname l@#1\endcsname=\directlua{tex.sprint(polyglossia.newloader('#1'))}% + \fi + \language\directlua{tex.sprint(polyglossia.newloader('#1'))}% + \fi +} + +\newcommand\xpg@set@language@luatex@ii[1]{% + \ifluatex % + \xpg@set@language@luatex@iii{#1}{\expandafter\the\csname l@#1\endcsname} + \fi % +} + +\def\select@language#1{% + \ifluatex % + \xpg@set@language@luatex@iii{#1}{\the\language} + \fi % + \xpg@initial@setup% + \select@@language{#1}% + \ifcsundef{setRL}{}% + {\iftoggle{#1@RL}{\setRL}{\setLR}}% + \csuse{captions#1}% + \local@marks{#1}% + \csuse{init@extras@#1}% + \csuse{blockextras@#1}% +} + +% Common code for `\select@language' and `\foreignlanguage'. +\newcommand{\select@@language}[1]{% + \edef\languagename{#1}% + \xpg@select@fontfamily{#1}% + \csuse@warn{#1@language}% + \csuse{date#1}% + \csuse{#1@numbers}% + \use@localhyphenmins{#1}% +} + + +\let\xpg@pop@language\relax + +\provideenvironment{otherlanguage}{}{} + +\renewenvironment{otherlanguage}[2][] + {\selectlanguage[#1]{#2}} + {} + +\newcommand{\setlocalhyphenmins}[3]{% + \xpg@ifdefined{#1}{% + \expandafter\ifx\csname l@#1\endcsname\l@nohyphenation% + \xpg@warning{\string\setlocalhyphenmin\space~ useless~ for~ unhyphenated~ language~ #1}% + \else + \providehyphenmins{#1}{#2#3}% + \fi + }{% + \xpg@warning{\string\setlocalhyphenmin\space~ useless~ for~ unknown~ language~ #1}% + }}% + +\def\use@localhyphenmins#1{% + \ifcsundef{#1hyphenmins}{}% + {\expandafter\expandafter\expandafter\set@hyphenmins\csname #1hyphenmins\endcsname\relax}} + +\define@boolkey{polyglossia}[system@]{babelshorthands}[false]{} + +\AtEndPreamble{\@ifpackageloaded{bidi}{\providecommand*{\aemph}[1]{$\overline{\hboxR{#1}}$}}{}}% TODO Make that work for luabidi too. + +%% Package Options %% +\DeclareOption{nolocalmarks}{\setkeys{polyglossia}{localmarks=false}} +\DeclareOption{localmarks}{\setkeys{polyglossia}{localmarks=true}} +\DeclareOption{babelshorthands}{\setkeys{polyglossia}{babelshorthands=true}} +\DeclareOption{quiet}{% + \gdef\@latex@info#1{\relax}% no latex info + \gdef\@font@info#1{\relax}% no latex font info + \gdef\@font@warning#1{\relax}% no latex font warnings + \gdef\zf@PackageInfo#1{\relax}% no fontspec info + \gdef\xpg@info#1{\relax}}% no polyglossia info +% +% FIXME these should also be loaded \AtEndOfPackage !!! +\def\xpg@option#1#2{% + \ifcsundef{xpg@main@language}{\setdefaultlanguage}{\setotherlanguage}% + [#1]{#2}} +\ExplSyntaxOff +\ProcessOptions* +\endinput