Commit e932dd90 authored by Vít Novotný's avatar Vít Novotný
Browse files

Added `\thesis@patch`.

parent cfebef40
Loading
Loading
Loading
Loading
+31 −1
Original line number Original line Diff line number Diff line
@@ -52,11 +52,16 @@
%<*class>
%<*class>
\NeedsTeXFormat{LaTeX2e}
\NeedsTeXFormat{LaTeX2e}
% Define `\thesis@version` and store it in the `VERSION.tex` file \fi
% Define `\thesis@version` and store it in the `VERSION.tex` file \fi
\def\thesis@version{2016/02/18 v0.3.32 fithesis3 MU thesis class}
{\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.33}{2016/02/19}}
% {\newwrite\f\openout\f=VERSION\write\f{\thesis@version}\closeout\f}
% {\newwrite\f\openout\f=VERSION\write\f{\thesis@version}\closeout\f}
%
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%
% \changes{v0.3.33}  {2016/02/19}{Added \cs{thesis@patch}.}
% \changes{v0.3.32}  {2016/02/18}{Fixed a regression from 
% \changes{v0.3.32}  {2016/02/18}{Fixed a regression from 
%   v0.3.27:2 -- The margins in \cs{thesis@blocks@mainMatter} were
%   v0.3.27:2 -- The margins in \cs{thesis@blocks@mainMatter} were
%   corrected in the style files of the Faculty of Economics and
%   corrected in the style files of the Faculty of Economics and
@@ -1510,6 +1515,31 @@
    \language\csname l@\thesis@locale\endcsname
    \language\csname l@\thesis@locale\endcsname
  }}
  }}
%    \end{macrocode}
%    \end{macrocode}
% \begin{macro}{\thesis@patch}
% The |\thesis@patch|\oarg{versions}\oarg{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
% \textit{versions}. This macro enables the simple deployment of
% version-targeted patches.
%    \begin{macrocode}
\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,}
%    \end{macrocode}
% \end{macro}
% \iffalse
% \iffalse
%</class>
%</class>
% ^^A Old fithesis classes
% ^^A Old fithesis classes