summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/fithesis/fithesis.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/source/latex/fithesis/fithesis.dtx')
-rw-r--r--Master/texmf-dist/source/latex/fithesis/fithesis.dtx234
1 files changed, 211 insertions, 23 deletions
diff --git a/Master/texmf-dist/source/latex/fithesis/fithesis.dtx b/Master/texmf-dist/source/latex/fithesis/fithesis.dtx
index 6cd07cfd184..857f69825b5 100644
--- a/Master/texmf-dist/source/latex/fithesis/fithesis.dtx
+++ b/Master/texmf-dist/source/latex/fithesis/fithesis.dtx
@@ -56,11 +56,12 @@
\gdef\thesis@version@number{#1}
\gdef\thesis@version@date{#2}
\gdef\thesis@version{#2 #1 fithesis3 MU thesis class}}
-\thesis@versiondef{v0.3.44}{2017/05/18}}
+\thesis@versiondef{v0.3.46}{2017/06/02}}
% {\newwrite\f\openout\f=VERSION\write\f{\thesis@version}\closeout\f}
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
+% ^^A Since 0.3.45, all changes are documented at the change sites.
% \changes{v0.3.44} {2017/05/18}{Fixed the color in the logo of FI
% MU. [VN]}
% \changes{v0.3.44} {2017/05/18}{The captions in the examples for
@@ -484,17 +485,22 @@
% Any \oarg{options} passed to the class will be handed down to the
% loaded style files. The supported options are therefore documented
% in the subsections of Section \ref{sec:style-files} dedicated to
-% the respective style files. At the moment, all options are
-% processed by the \texttt{style/mu/fithesis-base.sty} style file
-% documented in Section \ref{sec:fithesis-mu-base}.
+% the respective style files.
+%
+% The class options specify the \emph{form} of the document.
%
% \subsection{The \cs{thesissetup} macro}
% \begin{macro}{\thesissetup}
% The main public macro is the |\thesissetup|\marg{keyvals}
% command, where \textit{keyvals} is a comma-delimited list of
-% key-value pairs as defined by the \textsf{keyval} package. This
-% macro needs to be included prior to the beginning of a \LaTeX\
-% document. When used, the \textit{keyvals} are processed.
+% \textit{key}=\textit{value} pairs as defined by the
+% \textsf{keyval} package. This macro needs to be included prior to
+% the beginning of a \LaTeX\ document. When the macro is expanded,
+% the \textit{key}=\textit{value} pairs are processed.
+%
+% Contrary to the class options, the \textit{key}=\textit{value}
+% pairs of the \cs{thesissetup} macro specify metainformation about
+% the document.
% \begin{macrocode}
\long\def\thesissetup#1{%
\setkeys{thesis}{#1}}
@@ -1280,8 +1286,26 @@
\thesis@autofalse
\fi}
% \end{macrocode}
-% \end{macro} ^^A The nested \ifthesis@auto macro definition
-% \end{macro} ^^A The \thesissetup macro definition
+% \end{macro}\begin{macro}{\thesis@pages@preamble}
+% The \cs{thesis@pages@preamble} macro contains the last page
+% number within the preamble of the document. During the first
+% \TeX{} compilation, the macro expands to ??.
+% \changes{v0.3.45}{2017/05/24}{Defined the
+% \cs{thesis@pages@preamble} and \cs{thesis@pages@postamble}
+% macros. The patch was submitted by Juraj Pálenik. [VN]}
+% \begin{macrocode}
+\ifx\thesis@pages@preamble\undefined
+ \def\thesis@pages@preamble{??}\fi
+% \end{macrocode}
+% \end{macro}\begin{macro}{\thesis@pages@postamble}
+% The \cs{thesis@pages@postamble} macro contains the last page
+% number prior to the postamble of the document. During the first
+% \TeX{} compilation, the macro expands to ??.
+% \begin{macrocode}
+\ifx\thesis@pages@postamble\undefined
+ \def\thesis@pages@postamble{??}\fi
+% \end{macrocode}
+% \end{macro}
% The \DescribeMacro{\thesis@preamble}|\thesis@preamble|
% and \DescribeMacro{\thesis@postamble}|\thesis@postamble|
% macros temporarily switch to the hyphenation patterns and the
@@ -1290,29 +1314,172 @@
% \DescribeMacro{\thesis@blocks@preamble}|\thesis@blocks@preamble|
% or
% \DescribeMacro{\thesis@blocks@postamble}|\thesis@blocks@postamble|
-% macros, respectively.
+% macros, respectively; the latter two macros are to be redefined
+% by the loaded style files.
%
-% Before leaving the group, the |\thesis@preamble| macro clears the
-% page. After leaving the group, the |\thesis@preamble| macro sets
-% up the style of the main matter by expanding the
+% After expanding |\thesis@blocks@preamble| inside a \TeX{} group,
+% the |\thesis@preamble| macro defines the
+% \cs{thesis@pages@preamble} macro, writes the definition to the
+% auxiliary file, and clears the page. After leaving the group,
+% the |\thesis@preamble| sets up the style of the main matter by
+% expanding the
% \DescribeMacro{\thesis@blocks@mainMatter}|\thesis@blocks@mainMatter|
-% macro. All the aforementioned |@block@| macros are defined as
-% |\relax| and are subject to redefinition by the loaded style
-% files.
+% macro.
% \begin{macrocode}
\def\thesis@preamble{%
{\thesis@selectLocale{\thesis@locale}%
- \thesis@blocks@preamble\clearpage}
+ \thesis@blocks@preamble
+ \gdef\thesis@pages@preamble{\thepage}
+ \write\@auxout{\noexpand\gdef\noexpand
+ \thesis@pages@preamble{\thepage}}
+ \clearpage}
\thesis@blocks@mainMatter}
-\def\thesis@postamble{{%
- \thesis@selectLocale{\thesis@locale}%
+\let\thesis@blocks@preamble\relax
+\let\thesis@blocks@mainMatter\relax
+% \end{macro}
+% Before expanding |\thesis@blocks@postamble| inside a \TeX{}
+% group, the |\thesis@postamble| macro defines the
+% \cs{thesis@pages@postamble} macro, writes the definition to the
+% auxiliary file, and clears the page.
+% \begin{macrocode}
+\def\thesis@postamble{%
+ \gdef\thesis@pages@postamble{\thepage}
+ \write\@auxout{\noexpand\gdef\noexpand
+ \thesis@pages@postamble{\thepage}}
+ {\thesis@selectLocale{\thesis@locale}%
\thesis@blocks@postamble}}
-\let\thesis@blocks@preamble\relax
\let\thesis@blocks@postamble\relax
-\let\thesis@blocks@mainMatter\relax
% \end{macrocode}
+% \subsubsection{The \texttt{extra} key}
+% \changes{v0.3.45}{2017/05/29}{Added the \texttt{extra} key
+% to \cs{thesissetup} and defined the helper
+% \cs{thesis@def@extra} macro. [VN]}
+% The \marg{\texttt{extra}=\marg{keyvals}} pair enables the
+% definition of extra data fields, where \textit{keyvals} is a
+% comma-delimited list of \textit{key}=\textit{value} pairs as
+% defined by the \textsf{keyval} package. For each
+% \textit{key}=\textit{value} pair, a |\thesis@extra@|\textit{key}
+% is defined to be \textit{value}. These extra data fields are
+% provided as a unified interface for passing additional data to
+% the style and locale files.
+% \begin{macrocode}
+\def\thesis@extra@KV@prefix{KV@thesis@extra@}
+\def\thesis@extra@XKV@fams{thesis@extra}
+\long\def\KV@thesis@extra#1{%
+% \end{macrocode}
+% Patch the \textsc{xkeyval} package to support unknown keys.
+% \begin{macrocode}
+ \long\def\XKV@s@tk@ys##1=##2=##3\@nil{%
+ \XKV@g@tkeyname##1=\@nil\XKV@tkey
+ \expandafter\KV@@sp@def\expandafter\XKV@tkey\expandafter{\XKV@tkey}%
+ \ifx\XKV@tkey\@empty
+ \XKV@toks{##2}%
+ \ifcat$\the\XKV@toks$\else
+ \XKV@err{no key specified for value `\the\XKV@toks'}%
+ \fi
+ \else
+ \@expandtwoargs\in@{,\XKV@tkey,}{,\XKV@na,}%
+ \ifin@\else
+ \XKV@knftrue
+ \KV@@sp@def\XKV@tempa{##2}%
+ \ifXKV@preset\XKV@s@tk@ys@{##3}\else
+ \ifXKV@pl
+ \XKV@for@eo\XKV@fams\XKV@tfam{%
+ \XKV@makehd\XKV@tfam
+ \XKV@s@tk@ys@{##3}%
+ }%
+ \else
+ \XKV@whilist\XKV@fams\XKV@tfam\ifXKV@knf\fi{%
+ \XKV@makehd\XKV@tfam
+ \XKV@s@tk@ys@{##3}%
+ }%
+ \fi
+ \fi
+ \ifXKV@knf
+ \ifXKV@inpox
+ \ifx\XKV@doxs\relax
+ \ifx\@currext\@clsextension\else
+ \let\CurrentOption\XKV@tkey\@unknownoptionerror
+ \fi
+ \else\XKV@doxs\fi
+ \else
+ \ifXKV@st
+ \XKV@addtolist@o\XKV@rm\CurrentOption
+ \else
+ \ifx\XKV@fams\thesis@extra@XKV@fams
+ \expandafter\long\expandafter\def\csname%
+ thesis@extra@\XKV@tkey\endcsname{##2}%
+ \else
+ \XKV@err{`\XKV@tkey' undefined in families
+ `\XKV@fams'}%
+ \fi
+ \fi
+ \fi
+ \else
+ \ifXKV@inpox\ifx\XKV@testclass\XKV@documentclass
+ \expandafter\XKV@useoption\expandafter{\CurrentOption}%
+ \fi\fi
+ \fi
+ \fi
+ \fi
+ }%
+ \setkeys{thesis@extra}{#1}%
+ \def\KV@prefix{KV@thesis@}}
+% \end{macrocode}
+% Patch the \textsc{keyval} package to support unknown keys.
+% \begin{macrocode}
+\long\def\KV@split#1=#2=#3\relax{%
+ \KV@@sp@def\@tempa{#1}%
+ \ifx\@tempa\@empty\else
+ \expandafter\let\expandafter\@tempc
+ \csname\KV@prefix\@tempa\endcsname
+ \ifx\@tempc\relax
+ \ifx\KV@prefix\thesis@extra@KV@prefix
+ \KV@@sp@def\@tempb{#2}%
+ \expandafter\let\csname thesis@extra@\@tempa\endcsname
+ \@tempb%
+ \else
+ \KV@errx
+ {\@tempa\space undefined}%
+ \fi
+ \else
+ \ifx\@empty#3\@empty
+ \KV@default
+ \else
+ \KV@@sp@def\@tempb{#2}%
+ \expandafter\@tempc\expandafter{\@tempb}\relax
+ \fi
+ \fi
+ \fi}
+% \end{macrocode}
+% \begin{macro}{\thesis@def@extra}
+% The |\thesis@def@extra|\oarg{definition}\marg{name} macro defines
+% the |\thesis@extra@|\textit{name} macro to expand
+% to either \textit{definition}, if specified, or to
+% |\thesis@placeholder@extra@|\textit{name}, where
+% |\thesis@placeholder@extra@|\textit{name} is defined to expand to
+% <<extra@\textit{name}>>. If |\thesis@extra@|\textit{name} has
+% already been defined by the user, |\thesis@def@extra| has no
+% effect.
+% \begin{macrocode}
+\newcommand{\thesis@def@extra}[2][]{%
+ \expandafter\ifx\csname thesis@extra@#2\endcsname\relax
+ \def\thesis@placeholder@extra{<<extra@#2>>}%
+ \expandafter\let\csname thesis@placeholder@extra@#2\endcsname
+ \thesis@placeholder@extra
+ \def\thesis@arg{#1}%
+ \ifx\empty\thesis@arg
+ \expandafter\let\csname thesis@extra@#2\endcsname
+ \thesis@placeholder@extra
+ \else
+ \expandafter\def\csname thesis@extra@#2\endcsname{#1}%
+ \fi
+ \fi}
+% \end{macrocode}
+% \end{macro}
+% \end{macro} ^^A The \thesissetup macro definition
% \subsection{The \cs{thesislong} macro}\label{sec:thesislong}
% \begin{macro}{\thesislong}
% The public macro |\thesislong|\marg{key}\marg{value}, can be
@@ -1367,6 +1534,20 @@
\RequirePackage[base]{babel}}
\fi
% \end{macrocode}
+% Fix the value of the |\ifthesis@english| macro.
+% \changes{v0.3.45}{2017/05/23}{Updated the \cs{ifthesis@english}
+% macro, so that it no longer dynamically reacts to changes of
+% the locale. Instead, it is now based on the main locale during
+% the expansion of \cs{thesisload}.}
+% \begin{macrocode}
+\ifthesis@english
+ \expandafter\expandafter\expandafter\let\expandafter\expandafter
+ \csname ifthesis@english\endcsname\csname iftrue\endcsname
+\else
+ \expandafter\expandafter\expandafter\let\expandafter\expandafter
+ \csname ifthesis@english\endcsname\csname iffalse\endcsname
+\fi
+% \end{macrocode}
% Consequently, the style files are loaded. If the user specified an
% explicit empty string as the value of |\thesis@style|, do nothing.
% \begin{macrocode}
@@ -1600,8 +1781,8 @@
% \end{macrocode}
% \subsection{General purpose macros}
% The \DescribeMacro{\thesis@pages}|\thesis@pages| macro contains
-% the total number of pages within the document. During the first
-% \TeX\ compilation, the macro expands to \texttt{??}.
+% the last page number within the document. During the first \TeX\
+% compilation, the macro expands to \texttt{??}.
% \begin{macrocode}
\ifx\thesis@pages\undefined\def\thesis@pages{??}\fi
% \end{macrocode}
@@ -1746,6 +1927,13 @@
% the current semester
% \item|\thesis@|\textit{locale}|@typeName| -- The name of the
% thesis type
+% \changes{v0.3.46}{2017/06/02}{Lifted the \texttt{authorSignature}
+% and \texttt{formattedDate} strings to the global locale file
+% interface. [VN]}
+% \item|\thesis@|\textit{locale}|@authorSignature| -- The label
+% of the author's signature field
+% \item|\thesis@|\textit{locale}|@formattedDate| -- A formatted
+% date
% \end{itemize} where \textit{locale} is the name of the locale.
%
% \def\file#1{\paragraph{The \texttt{#1} file}}