Unverified Commit 79d4344f authored by Vít Starý Novotný's avatar Vít Starý Novotný
Browse files

Protect #1 in \thesis@xpatch error, add a missing argument of ClassError

Fix spacing in \thesis@xpatch calls
parent 06fa9d11
Loading
Loading
Loading
Loading
+7 −6
Original line number Diff line number Diff line
@@ -1832,7 +1832,7 @@
  }}
%    \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{fithesis4.cls}) matches any of the comma-delimited
@@ -1857,13 +1857,14 @@
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\thesis@xpatch}
% The |\thesis@xpatch| macro is used to to replace code in a searched
% macro by the replacement code via \textit{xpatchcmd} If the 
% \textit{xpatchcmd} fails, a class error is written to the output.
% 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}{The command #1 does not contain searched text}}}
    {\ClassError{fithesis4}{The command \string#1 does not contain the searched text}{}}}
%    \end{macrocode}
% \end{macro}
% \iffalse
+1 −1
Original line number Diff line number Diff line
@@ -884,7 +884,7 @@
      \fi
      \ifthesis@blocks@titlePage@programme@
        \vspace{0.25cm}%
        {\sf\thesis@titlePage@large\thesis@@{bib@programme}: \thesis@programme\par}
        {\sf\thesis@titlePage@large\thesis@@{bib@programme}: \thesis@programme\par}%
      \fi
      \ifthesis@blocks@titlePage@field@
        \vspace{0.25cm}%
+1 −2
Original line number Diff line number Diff line
@@ -86,8 +86,7 @@
% macro does not include the title of the thesis, and typesets the
% name of the author at the bottom of the page.
%    \begin{macrocode}
\thesis@xpatch{\thesis@blocks@cover}
{%
\thesis@xpatch\thesis@blocks@cover{%
  \vfill
  {\bf\thesis@titlePage@Huge\thesis@TeXtitle\par}%
  \vspace{1.5cm}%
+8 −8
Original line number Diff line number Diff line
@@ -45,11 +45,11 @@
% \changes{v1.0.0}{2021/05/06}{Added redefinition of the cover to include
%   the faculty seal. [TV]}
%    \begin{macrocode}
\thesis@xpatch{\thesis@blocks@cover}
{\vfill
\thesis@xpatch\thesis@blocks@cover{%
  \vfill
  {\bf\thesis@titlePage@Huge\thesis@TeXtitle\par}%
}
{\vspace{2cm}%
}{%
  \vspace{2cm}%
  \thesis@blocks@facultyLogo@monochrome\par
  \vspace{2cm}%
  {\bf\thesis@titlePage@Huge\thesis@TeXtitle\par}%
+12 −12
Original line number Diff line number Diff line
@@ -57,8 +57,8 @@
%    \begin{macrocode}
\thesis@blocks@titlePage@programme@false

\thesis@xpatch{\thesis@blocks@titlePage}
{{\sf\thesis@titlePage@large\thesis@@{advisorTitle}: \thesis@advisor\par}%
\thesis@xpatch\thesis@blocks@titlePage{%
  {\sf\thesis@titlePage@large\thesis@@{advisorTitle}: \thesis@advisor\par}%
   \vspace{0.75cm}%
   \ifthesis@blocks@titlePage@department@
     {\sf\thesis@titlePage@large\thesis@department@name\par}%
@@ -76,15 +76,15 @@
   \vfill
}{}

\thesis@xpatch{\thesis@blocks@titlePage}
{{\sf\thesis@titlePage@large\thesis@@upper{facultyName}\par}%
\thesis@xpatch\thesis@blocks@titlePage{%
  {\sf\thesis@titlePage@large\thesis@@upper{facultyName}\par}%
  \vfill
}
{{\sf\thesis@titlePage@large\thesis@@upper{facultyName}\par}%
}{%
  {\sf\thesis@titlePage@large\thesis@@upper{facultyName}\par}%
  \vspace{0.75cm}%
  {\sf\thesis@titlePage@large\thesis@field\par}%
  \vspace{0.25cm}%
 {\sf\thesis@titlePage@large\thesis@department@name\par}
  {\sf\thesis@titlePage@large\thesis@department@name\par}%
  \vspace{4cm}%
}
%    \end{macrocode}
Loading