diff options
author | Norbert Preining <norbert@preining.info> | 2021-05-26 03:05:34 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2021-05-26 03:05:34 +0000 |
commit | 8982c52e00ffb3fb5a913fc60913ebd9070f091a (patch) | |
tree | 6a395986e3502fefcf42364f8dd87519b45a2441 /macros/latex/contrib/fithesis/fithesis.dtx | |
parent | 07dc96bc3bbd691fc52aca15a172eaf41a89d873 (diff) |
CTAN sync 202105260305
Diffstat (limited to 'macros/latex/contrib/fithesis/fithesis.dtx')
-rw-r--r-- | macros/latex/contrib/fithesis/fithesis.dtx | 132 |
1 files changed, 93 insertions, 39 deletions
diff --git a/macros/latex/contrib/fithesis/fithesis.dtx b/macros/latex/contrib/fithesis/fithesis.dtx index bfda069bcf..842b36127e 100644 --- a/macros/latex/contrib/fithesis/fithesis.dtx +++ b/macros/latex/contrib/fithesis/fithesis.dtx @@ -19,6 +19,7 @@ \usepackage{paralist} \usepackage{multicol} + % Making paragraphs numbered \makeatletter \renewcommand\paragraph{\@startsection{paragraph}{4}{\z@}% @@ -55,8 +56,8 @@ {\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.51}{2020/03/09}} + \gdef\thesis@version{#2 #1 fithesis4 MU thesis class}} +\thesis@versiondef{v1.0.0}{2021/05/24}} % {\newwrite\f\openout\f=VERSION\write\f{\thesis@version}\closeout\f} % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -416,20 +417,17 @@ % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % -% \title{The \textsf{fithesis3} class for the typesetting of theses written +% \title{The \textsf{fithesis4} class for the typesetting of theses written % at the Masaryk University in Brno} -% \author{Daniel Marek, Jan Pavlovič, Vít Novotný, Petr Sojka} +% \author{Daniel Marek, Jan Pavlovič, Vít Novotný, Tereza Vrabcová, Petr Sojka} % \date{\today} % \maketitle % % \begin{abstract} % \noindent This document details the design and the implementation -% of the \textsf{fithesis3} document class. It contains technical +% of the \textsf{fithesis4} document class. It contains technical % information for anyone who wishes to extend the class with their -% locale or style files. Users who only wish to use the class are -% advised to consult the guides distributed along with the class, -% which only document the parts of the public API relevant to the -% given style files. +% locale or style files. % \end{abstract} % % \tableofcontents @@ -439,9 +437,9 @@ % The class requires the class specified in |\thesis@backend|, % whose default value is |[a4paper]{rapport3}|. If a different % base class is desired, it can be specified by redefining -% |\thesis@backend| prior to loading the \textsf{fithesis3} class. +% |\thesis@backend| prior to loading the \textsf{fithesis4} class. % \begin{macrocode} -\ProvidesClass{fithesis3}[\thesis@version] +\ProvidesClass{fithesis4}[\thesis@version] \ifx\thesis@backend\undefined \def\thesis@backend{[a4paper]{rapport3}} \fi\expandafter\LoadClass\thesis@backend @@ -464,6 +462,9 @@ % \item\textsf{inputenc} -- Used to enable the input UTF-8 % encoding. This package does not get loaded under % the \Hologo{XeTeX} and \Hologo{LuaTeX} engines. +% \changes{v1.0.0}{2021/04/30}{Added \cs{thesis@xpatch} command. [TV]} +% \item\textsf{xpatch} -- Used to redefine parts of code +% in macros without redefining the whole macro. % \end{itemize} % The \texttt{hyperref} package is also conditionally loaded during % the expansion of the |\thesis@load| macro (see Section @@ -478,6 +479,7 @@ \ifxetex\else\ifluatex\else \RequirePackage[utf8]{inputenc} \fi\fi +\RequirePackage{xpatch} % \end{macrocode} % \section{Public API} % \label{sec:public-api} @@ -771,7 +773,8 @@ % The Faculty of Medicine & \texttt{med} \\ % The Faculty of Education & \texttt{ped} \\ % The Faculty of Arts & \texttt{phil} \\ -% The Faculty of Sports Studies & \texttt{fsps} \\\bottomrule +% The Faculty of Sports Studies & \texttt{fsps} \\ +% The Faculty of Pharmacy & \texttt{pharm} \\\bottomrule % \end{tabularx}\end{center} % The \textit{identifier} is stored within the |\thesis@faculty| % macro, whose implicit value is \texttt{fi}. @@ -786,7 +789,7 @@ % The \marg{\texttt{department}=name} pair sets the name of the % department, at which the thesis is being written, to % \textit{name}. Unlike the university and faculty identifiers, -% \textsf{fithesis3} does not prescribe the format of the +% \textsf{fithesis4} does not prescribe the format of the % \textit{name}; the style files may internally parse it, or % typeset it as-is. The \textit{name} is stored within the % |\thesis@department| macro. @@ -864,13 +867,19 @@ % filename of the logo file to be used as the university logo to % \textit{filename}. The \textit{filename} is stored within the % |\thesis@universityLogo| macro, whose implicit value is -% \texttt{fithesis-base}. The \texttt{fithesis-} prefix serves to -% prevent package clashes with other similarly named files within -% the \TeX\ directory structure. The logo file is loaded from the -% |\thesis@logopath|\discretionary{}{}{}|\thesis@universityLogo| -% path. -% \begin{macrocode} -\def\thesis@universityLogo{fithesis-base} +% \texttt{fithesis-base}|-\thesis@locale|. The \texttt{fithesis-} +% prefix serves to prevent package clashes with other similarly +% named files within the \TeX\ directory structure. The logo file +% is loaded from the |\thesis@logopath|\discretionary{}{}{}^^A +% |\thesis@universityLogo| path. +% \changes{v1.0.0}{2021/03/19}{^^A +% Change \cs{thesis@universityLogo}, +% \cs{thesis@blocks@universityLogo@monochrome}, and +% \cs{thesis@blocks@universityLogo@color} to use the new logotype +% of the Masaryk University in Brno in the correct size and +% localization. Add \cs{thesis@blocks@seal}. [VN]} +% \begin{macrocode} +\def\thesis@universityLogo{fithesis-base-\thesis@locale} \define@key{thesis}{universityLogo}{% \def\thesis@universityLogo{#1}} % \end{macrocode} @@ -881,13 +890,19 @@ % of the logo file to be used as the faculty logo to % \textit{filename}. The \textit{filename} is stored within the % |\thesis@|\discretionary{}{}{}|facultyLogo| macro, whose -% implicit value is |fithesis-\thesis@faculty|. The +% implicit value is |fithesis-\thesis@faculty-\thesis@locale|. The % \texttt{fithesis-} prefix serves to prevent package clashes with % other similarly named files within the \TeX\ directory structure. % The logo file is loaded from the % |\thesis@logopath\thesis@facultyLogo| path. -% \begin{macrocode} -\def\thesis@facultyLogo{fithesis-\thesis@faculty} +% \changes{v1.0.0}{2021/04/24}{^^A +% Change \cs{thesis@facultyLogo}, +% \cs{thesis@blocks@facultyLogo@monochrome}, and +% \cs{thesis@blocks@facultyLogo@color} to use the new logotype +% of the Masaryk University in Brno in the correct size and +% localization. Add \cs{thesis@blocks@seal}. [VN]} +% \begin{macrocode} +\def\thesis@facultyLogo{fithesis-\thesis@faculty-\thesis@locale} \define@key{thesis}{facultyLogo}{% \def\thesis@facultyLogo{#1}} % \end{macrocode} @@ -896,13 +911,15 @@ % \subsubsection{The \texttt{style} key} % The \marg{\texttt{style}=filename} pair sets the filename of the % style file to be used to \textit{filename}. The \textit{filename} -% is stored within the |\thesis@style| macro, whose -% implicit value is |\thesis@university/fithesis-\thesis@faculty|. +% is stored within the |\thesis@style| macro, whose implicit value is +% |\thesis@university/fithesis-\thesis@university-\thesis@faculty|. % When the \textit{filename} is an empty token string, no style % files will be loaded during the main routine (see Section % \ref{sec:thesisload}). +% \changes{v1.0.0}{2021/02/21}{Files were renamed after +% breaking changes in package loading after PR 438 in \LaTeXe. [VN]} % \begin{macrocode} -\def\thesis@style{\thesis@university/fithesis-\thesis@faculty} +\def\thesis@style{\thesis@university/fithesis-\thesis@university-\thesis@faculty} \define@key{thesis}{style}{% \def\thesis@style{#1}} % \end{macrocode} @@ -1252,6 +1269,7 @@ % When the |\thesis@assignmentFiles| macro is defined and % non-empty, the style files should take that as a cue that the % user wishes to typeset the thesis assignment. + % \begin{macro}{\thesis@bibFiles} % \subsubsection{The \texttt{bib} key} % The \marg{\texttt{bib}=list} pair sets the comma-delimited @@ -1525,15 +1543,17 @@ \thesis@requireLocale{\thesis@locale} \fi % \end{macrocode} -% Coerce LuaTeX into defining |\l@|\textit{locale} for +% Coerce Lua\TeX{} into defining |\l@|\textit{locale} for % \textit{locale}s with known hyphenation patterns, unless -% \textsf{babel} has been loaded. In that case -% |\l@|\textit{locale} has already been defined. +% \textsf{babel} or \textsf{polyglossia} have been loaded. +% In that case, |\l@|\textit{locale} has already been defined. +% \changes{v1.0.0}{2020/02/21}{Only load \textsf{babel} in +% Lua\TeX{} if \textsf{polyglossia} has not been loaded yet.} % \begin{macrocode} \ifluatex \ltx@ifpackageloaded{babel}{}{ - % See <article.gmane.org/gmane.comp.tex.luatex.user/5680> - \RequirePackage[base]{babel}} + \ltx@ifpackageloaded{polyglossia}{}{ + \thesis@require{babel}}} \fi % \end{macrocode} % Fix the value of the |\ifthesis@english| macro. @@ -1627,7 +1647,7 @@ % \begin{macrocode} \def\thesis@exists#1#2{% \IfFileExists{#1}{#2}{% - \ClassWarning{fithesis3}{File #1 doesn't exist}}} + \ClassWarning{fithesis4}{File #1 doesn't exist}}} % \end{macrocode} % \end{macro}\begin{macro}{\thesis@input} % The |\thesis@input|\marg{file} macro inputs the given @@ -1656,9 +1676,11 @@ % If inheritance is enabled for style files, then the % |\thesis@requireStyle|\marg{style} macro sequentially % loads each of the following files, provided they exist: +% \changes{v1.0.0}{2021/02/21}{Files were renamed after +% breaking changes in package loading after PR 438 in \LaTeXe. [VN]} % \begin{enumerate} % \item|\thesis@stylepath fithesis-base.sty| -% \item|\thesis@stylepath\thesis@university/fithesis-base.sty| +% \item|\thesis@stylepath\thesis@university/fithesis-\thesis@university-base.sty| % \item|\thesis@stylepath| \textit{style}|.sty| % \end{enumerate}If inheritance is disabled for style files, then % only the last listed file is loaded. The \texttt{fithesis-} @@ -1669,7 +1691,7 @@ \ifthesis@style@inheritance \thesis@requireIfExists{\thesis@stylepath fithesis-base}% \thesis@requireIfExists{\thesis@stylepath\thesis@university - /fithesis-base} + /fithesis-\thesis@university-base} \fi \thesis@requireIfExists{\thesis@stylepath#1}} % \end{macrocode} @@ -1811,10 +1833,10 @@ }} % \end{macrocode} % \begin{macro}{\thesis@patch} -% The |\thesis@patch|\oarg{versions}\oarg{patch} macro expands +% The |\thesis@patch|\marg{versions}\marg{patch} macro expands % \textit{patch}, if |\thesis@version|\texttt{\discretionary{@}^^A % {@}{@}}|number| (defined at the top of the file -% \texttt{fithesis3.cls}) matches any of the comma-delimited +% \texttt{fithesis4.cls}) matches any of the comma-delimited % \textit{versions}. This macro enables the simple deployment of % version-targeted patches. % \begin{macrocode} @@ -1835,19 +1857,32 @@ \expandafter\thesis@patch@versions\expandafter,\relax,} % \end{macrocode} % \end{macro} +% \begin{macro}{\thesis@xpatch} +% \changes{v1.0.0}{2021/04/30}{Added \cs{thesis@xpatch} command. [TV]} +% The |\thesis@xpatch|\marg{command}\marg{search}\marg{replace} macro +% is used to to replace \textit{search} with \textit{replace} in the definition +% of \textit{command}. If the replacement fails, a class error is written to +% the output. +% \begin{macrocode} +\long\def\thesis@xpatch#1#2#3{% + \xpatchcmd{#1}{#2}{#3}{}% + {\ClassError{fithesis4}{% + Command \string#1 does not contain the searched text}{}}} +% \end{macrocode} +% \end{macro} % \iffalse %</class> % ^^A Old fithesis classes %<*oldclass1> \NeedsTeXFormat{LaTeX2e} -\ProvidesClass{oldfithesis1}[2015/03/04 old fithesis will load fithesis3 MU thesis class] +\ProvidesClass{oldfithesis1}[2015/03/04 old fithesis will load fithesis2 MU thesis class] \ClassWarning{oldfithesis1}{% You are using the fithesis class, which has been deprecated. - The fithesis3 class will be used instead. + The fithesis2 class will be used instead. For more information, see <http://www.fi.muni.cz/tech/unix/tex/fithesis.xhtml>% -}\LoadClass{fithesis3} +}\LoadClass{fithesis2} %</oldclass1> % @@ -1863,6 +1898,19 @@ }\LoadClass{fithesis3} %</oldclass2> +% +%<*oldclass3> + +\NeedsTeXFormat{LaTeX2e} +\ProvidesClass{oldfithesis3}[2018/11/17 old fithesis3 will load fithesis4 MU thesis class] + +\ClassWarning{oldfithesis3}{% + You are using the fithesis3 class, which has been deprecated. + The fithesis4 class will be used instead. + For more information, see <http://www.fi.muni.cz/tech/unix/tex/fithesis.xhtml>% +}\LoadClass{fithesis4} + +%</oldclass3> % \fi % % \subsection{Locale files} @@ -1934,6 +1982,10 @@ % of the author's signature field % \item|\thesis@|\textit{locale}|@formattedDate| -- A formatted % date +% \changes{v1.0.0}{2021/02/26}{Lifted the \texttt{advisorSignature} +% string to the global locale file interface. [VN]} +% \item|\thesis@|\textit{locale}|@advisorSignature| -- The label +% of the author's signature field % \end{itemize} where \textit{locale} is the name of the locale. % % \def\file#1{\paragraph{The \texttt{#1} file}} @@ -2002,3 +2054,5 @@ % \input{style/mu/med.dtx} % \subsubsection{The style files of the Faculty of Sports Studies} % \input{style/mu/fsps.dtx} +% \subsubsection{The style files of the Faculty of Pharmacy} +% \input{style/mu/pharm.dtx} |