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

All trailing %s were removed. Fithesis2 code refactored and reformatted.

parent 506cf029
Loading
Loading
Loading
Loading
+39 −35
Original line number Diff line number Diff line
@@ -52,11 +52,15 @@
%<*class>
\NeedsTeXFormat{LaTeX2e}
% Define `\thesis@version` and store it in the `VERSION.tex` file \fi
\def\thesis@version{2016/01/07 v0.3.31:1-dev fithesis3 MU thesis class}
\def\thesis@version{2016/01/07 v0.3.31:2-dev fithesis3 MU thesis class}
% {\newwrite\f\openout\f=VERSION\write\f{\thesis@version}\closeout\f}
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% \changes{v0.3.31:2}{2016/01/07}{All trailing \%s were removed.
%   Some of the inherited \textsf{fithesis2} code in the
%   \texttt{fithesis-1*.clo} and \texttt{style/mu/fithesis-base.sty}
%   files was refactored and reformatted.}
% \changes{v0.3.31:1}{2016/01/07}{The redefinition of \cs{appendix}
%   from the \texttt{fithesis-1*.clo}, which broke the hyperref
%   links to the appendices, were removed.}
@@ -407,9 +411,9 @@
%    \begin{macrocode}
\def\thesis@basepath{fithesis/}
\define@key{thesis}{basePath}{%
  \ifx\thesis@empty#1\thesis@empty%
  \ifx\thesis@empty#1\thesis@empty
    \def\thesis@basepath{}%
  \else%
  \else
    \def\thesis@basepath{#1/}%
  \fi}
%    \end{macrocode}
@@ -477,7 +481,7 @@
      \else%              /<path> -> /<path>/
        #1#2#3#4/%
      \fi
    \else%
    \else
      \if#1.%
        \ifx#2\empty%           . -> ./
          ./%
@@ -503,7 +507,7 @@
      \else
        \thesis@basepath#1#2#3#4/%
      \fi
    \fi%
    \fi
  \fi}
%    \end{macrocode}
% \end{macro}
@@ -544,10 +548,10 @@
\define@key{thesis}{gender}{%
  \def\thesis@male{m}%
  \def\thesis@arg{#1}%
  \ifx\thesis@male\thesis@arg%
    \thesis@womanfalse%
  \else%
    \thesis@womantrue%
  \ifx\thesis@male\thesis@arg
    \thesis@womanfalse
  \else
    \thesis@womantrue
  \fi}
%    \end{macrocode}
% \end{macro}
@@ -572,7 +576,7 @@
%    \begin{macrocode}
\def\thesis@parseAuthor#1{%
  \def\thesis@author{#1}%
  \def\thesis@author@head{\expandafter\expandafter\expandafter%
  \def\thesis@author@head{\expandafter\expandafter\expandafter
    \@gobble\thesis@head#1 \relax}%
  \def\thesis@author@tail{\thesis@tail#1 \relax}}
\thesis@def{author}%
@@ -826,7 +830,7 @@
%    \begin{macrocode}
\def\thesis@locale{%
  % Babel / polyglossia detection
  \ifx\languagename\undefined%
  \ifx\languagename\undefined
  english\else\languagename\fi}
\define@key{thesis}{locale}{%
  \def\thesis@locale{#1}}
@@ -841,15 +845,15 @@
% or not the current locale is English.
%    \begin{macrocode}
\def\ifthesis@english{
  \expandafter\def\expandafter\@english\expandafter{\string%
  \expandafter\def\expandafter\@english\expandafter{\string
  \english}%
  \expandafter\expandafter\expandafter\def\expandafter%
  \expandafter\expandafter\@locale\expandafter\expandafter%
  \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%
  \expandafter\csname\expandafter i\expandafter f\ifx\@locale
  \@english
    true%
  \else%
  \else
    false%
  \fi\endcsname}
%    \end{macrocode}
@@ -1147,10 +1151,10 @@
\define@key{thesis}{autoLayout}[true]{%
  \def\@true{true}%
  \def\@arg{#1}%
  \ifx\@true\@arg%
    \thesis@autotrue%
  \else%
    \thesis@autofalse%
  \ifx\@true\@arg
    \thesis@autotrue
  \else
    \thesis@autofalse
  \fi}
%    \end{macrocode}
% \end{macro} ^^A The nested \ifthesis@auto macro definition
@@ -1219,9 +1223,9 @@
\newif\ifthesis@loaded\thesis@loadedfalse
\AtEndPreamble{\thesis@load}
\def\thesis@load{%
  \ifthesis@loaded\else%
  \ifthesis@loaded\else
    \thesis@loadedtrue
    \makeatletter%
    \makeatletter
%    \end{macrocode}
% First, the name of the main locale file is fully expanded and
% loaded using the |\thesis@requireLocale| macro. If the user
@@ -1337,11 +1341,11 @@
% named package files within the \TeX\ directory structure.
%    \begin{macrocode}
\def\thesis@requireStyle#1{%
  \ifthesis@style@inheritance%
  \ifthesis@style@inheritance
    \thesis@requireIfExists{\thesis@stylepath fithesis-base}%
    \thesis@requireIfExists{\thesis@stylepath\thesis@university%
    \thesis@requireIfExists{\thesis@stylepath\thesis@university
      /fithesis-base}
  \fi%
  \fi
  \thesis@requireIfExists{\thesis@stylepath#1}}
%    \end{macrocode}
% \end{macro}\begin{macro}{\thesis@requireLocale}
@@ -1372,11 +1376,11 @@
%    \begin{macrocode}
\def\thesis@requireLocale#1{%
  % Ignore redundant requests
  \expandafter\ifx\csname thesis@#1@required\endcsname\relax%
  \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%
    \ifthesis@locale@inheritance
      \thesis@input{\thesis@localepath\thesis@university/%
        fithesis-#1.def}%
      \thesis@input{\thesis@localepath\thesis@university/%
@@ -1412,13 +1416,13 @@
% active characters and command sequences.
%    \begin{macrocode}
\def\thesis@lower#1{{%
  \let\ea\expandafter%
  \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%
  \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%
@@ -1444,16 +1448,16 @@
%    \begin{macrocode}
\def\thesis@head#1 #2{%
  \ifx\relax#2%
    \expandafter\@gobbletwo%
  \else%
    \expandafter\@gobbletwo
  \else
    \ #1%
  \fi%
  \fi
  \thesis@head#2}%
\def\thesis@tail#1 #2{%
  \ifx\relax#2%
    #1%
    \expandafter\@gobbletwo%
  \fi%
    \expandafter\@gobbletwo
  \fi
  \thesis@tail#2}%
%    \end{macrocode}
% \subsection{General purpose macros}
+6 −6
Original line number Diff line number Diff line
@@ -152,7 +152,7 @@
  \textsf{hyperref}, \textsf{microtype}%
  {\makeatletter
  % This macro typesets loaded packages.
  \def\thguide@prnpkg#1{\ltx@ifpackageloaded%
  \def\thguide@prnpkg#1{\ltx@ifpackageloaded
    {#1}{, \textsf{#1}}{}}%
  \thguide@prnpkg{tikz}%
  \thguide@prnpkg{changepage}%
@@ -410,7 +410,7 @@
      theses%
%<*econ,med>
      , although it is more readable and uses the page more
      effectively in the case of the \thesis@english@facultyName%
      effectively in the case of the \thesis@english@facultyName
%</econ,med>
      ; you should consult its use with your thesis advisor. If you
      decide to use the two-column format, remember that you also
@@ -852,15 +852,15 @@
  {\makeatletter
    % This macro typesets the meaning of another macro.
    \def\thguide@macromeaning#1{%
      \let\ea\expandafter%
      \ea\let\ea\thguide@macro\csname#1\endcsname%
      \let\ea\expandafter
      \ea\let\ea\thguide@macro\csname#1\endcsname
      \ea\def\ea\thguide@meaning\ea{\meaning\thguide@macro}%
      \def\thguide@parse##1 ##2{%
        ##1\ifx##2\relax\ea\@gobbletwo\else\\\fi\thguide@parse##2}%
      \begin{verse}%
        \ea\ifx\thguide@macro\relax%
        \ea\ifx\thguide@macro\relax
          $\langle$\emph{empty}$\rangle$
        \else%
        \else
          \tt\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\ea\thguide@parse\ea
          \ea\ea\ea\ea\ea\ea\ea\ea\ea\ea\ea\ea\ea\ea\@gobbletwo\ea
+20 −20
Original line number Diff line number Diff line
@@ -2,7 +2,7 @@
% This is the base file of the Czech locale.\iffalse
%<*base>
% \fi\begin{macrocode}
\ProvidesFile{fithesis/locale/fithesis-czech.def}[2016/01/05]
\ProvidesFile{fithesis/locale/fithesis-czech.def}[2016/01/07]
%    \end{macrocode}
% The locale file defines all the private macros mandated by the
% locale file interface.
@@ -43,27 +43,27 @@
\gdef\thesis@czech@semester{%
  \thesis@{czech@\thesis@season} \thesis@seasonYear}
\gdef\thesis@czech@typeName{%
  \ifx\thesis@type\thesis@bachelors%
  \ifx\thesis@type\thesis@bachelors
    Bakalářská práce%
  \else\ifx\thesis@type\thesis@masters%
  \else\ifx\thesis@type\thesis@masters
    Diplomová práce%
  \else\ifx\thesis@type\thesis@doctoral%
  \else\ifx\thesis@type\thesis@doctoral
    Disertační práce%
  \else\ifx\thesis@type\thesis@rigorous%
  \else\ifx\thesis@type\thesis@rigorous
    Rigorózní práce%
  \else%
  \else
    <<Neznámý typ práce (\thesis@type)>>%
  \fi\fi\fi\fi}
\gdef\thesis@czech@typeName@akuzativ{%
  \ifx\thesis@type\thesis@bachelors%
  \ifx\thesis@type\thesis@bachelors
    Bakalářskou práci%
  \else\ifx\thesis@type\thesis@masters%
  \else\ifx\thesis@type\thesis@masters
    Diplomovou práci%
  \else\ifx\thesis@type\thesis@doctoral%
  \else\ifx\thesis@type\thesis@doctoral
    Disertační práci%
  \else\ifx\thesis@type\thesis@rigorous%
  \else\ifx\thesis@type\thesis@rigorous
    Rigorózní práci%
  \else%
  \else
    <<Neznámý typ práce (\thesis@type)>>%
  \fi\fi\fi\fi}
%    \end{macrocode}\iffalse
@@ -229,7 +229,7 @@
% \iffalse
%<*mu/phil>
% \fi\begin{macrocode}
\ProvidesFile{fithesis/locale/mu/phil/fithesis-czech.def}[2015/06/26]
\ProvidesFile{fithesis/locale/mu/phil/fithesis-czech.def}[2016/01/07]

% Zástupné texty
\gdef\thesis@czech@facultyName{Filozofická fakulta}
@@ -240,23 +240,23 @@

% Ostatní
\gdef\thesis@czech@typeName{%
  \ifx\thesis@type\thesis@bachelors%
  \ifx\thesis@type\thesis@bachelors
    Bakalářská diplomová práce%
  \else\ifx\thesis@type\thesis@masters%
  \else\ifx\thesis@type\thesis@masters
    Magisterská diplomová práce%
  \else\ifx\thesis@type\thesis@doctoral%
  \else\ifx\thesis@type\thesis@doctoral
    Disertační práce%
  \else%
  \else
    <<Neznámý typ práce (\thesis@type)>>%
  \fi\fi\fi}
\gdef\thesis@czech@typeName@akuzativ{%
  \ifx\thesis@type\thesis@bachelors%
  \ifx\thesis@type\thesis@bachelors
    Diplomovou práci%
  \else\ifx\thesis@type\thesis@masters%
  \else\ifx\thesis@type\thesis@masters
    Diplomovou práci%
  \else\ifx\thesis@type\thesis@doctoral%
  \else\ifx\thesis@type\thesis@doctoral
    Disertační práci%
  \else%
  \else
    <<Neznámý typ práce (\thesis@type)>>%
  \fi\fi\fi}
%    \end{macrocode}\iffalse
+6 −6
Original line number Diff line number Diff line
@@ -2,7 +2,7 @@
% This is the base file of the English locale.\iffalse
%<*base>
% \fi\begin{macrocode}
\ProvidesFile{fithesis/locale/fithesis-english.def}[2016/01/05]
\ProvidesFile{fithesis/locale/fithesis-english.def}[2016/01/07]
%    \end{macrocode}
% The locale file defines all the private macros mandated by the
% locale file interface.
@@ -32,15 +32,15 @@
\gdef\thesis@english@semester{%
  \thesis@{english@\thesis@season} \thesis@seasonYear}
\gdef\thesis@english@typeName{%
  \ifx\thesis@type\thesis@bachelors%
  \ifx\thesis@type\thesis@bachelors
    Bachelor's Thesis%
  \else\ifx\thesis@type\thesis@masters%
  \else\ifx\thesis@type\thesis@masters
    Master's Thesis%
  \else\ifx\thesis@type\thesis@doctoral%
  \else\ifx\thesis@type\thesis@doctoral
    Doctoral Thesis%
  \else\ifx\thesis@type\thesis@rigorous%
  \else\ifx\thesis@type\thesis@rigorous
    Rigorous Thesis%
  \else%
  \else
    <<Unknown thesis type (\thesis@type)>>%
  \fi\fi\fi\fi}
%    \end{macrocode}\iffalse
+20 −20
Original line number Diff line number Diff line
@@ -2,7 +2,7 @@
% This is the base file of the Slovak locale.\iffalse
%<*base>
% \fi\begin{macrocode}
\ProvidesFile{fithesis/locale/fithesis-slovak.def}[2016/01/05]
\ProvidesFile{fithesis/locale/fithesis-slovak.def}[2016/01/07]
%    \end{macrocode}
% The locale file defines all the private macros mandated by the
% locale file interface.
@@ -43,27 +43,27 @@
\gdef\thesis@slovak@semester{%
  \thesis@{slovak@\thesis@season} \thesis@seasonYear}
\gdef\thesis@slovak@typeName{%
  \ifx\thesis@type\thesis@bachelors%
  \ifx\thesis@type\thesis@bachelors
    Bakalárska práca%
  \else\ifx\thesis@type\thesis@masters%
  \else\ifx\thesis@type\thesis@masters
    Diplomová práca%
  \else\ifx\thesis@type\thesis@doctoral%
  \else\ifx\thesis@type\thesis@doctoral
    Dizertačná práca%
  \else\ifx\thesis@type\thesis@rigorous%
  \else\ifx\thesis@type\thesis@rigorous
    Rigorózna práca%
  \else%
  \else
    <<Neznámy typ práce (\thesis@type)>>%
  \fi\fi\fi\fi}
\gdef\thesis@slovak@typeName@akuzativ{%
  \ifx\thesis@type\thesis@bachelors%
  \ifx\thesis@type\thesis@bachelors
    Bakalársku prácu%
  \else\ifx\thesis@type\thesis@masters%
  \else\ifx\thesis@type\thesis@masters
    Diplomovú prácu%
  \else\ifx\thesis@type\thesis@doctoral%
  \else\ifx\thesis@type\thesis@doctoral
    Dizertačnú prácu%
  \else\ifx\thesis@type\thesis@rigorous%
  \else\ifx\thesis@type\thesis@rigorous
    Rigoróznu prácu%
  \else%
  \else
    <<Neznámy typ práce (\thesis@type)>>%
  \fi\fi\fi\fi}
%    \end{macrocode}\iffalse
@@ -231,7 +231,7 @@
% \iffalse
%<*mu/phil>
% \fi\begin{macrocode}
\ProvidesFile{fithesis/locale/mu/phil/fithesis-slovak.def}[2015/06/26]
\ProvidesFile{fithesis/locale/mu/phil/fithesis-slovak.def}[2016/01/07]

% Zástupné texty
\gdef\thesis@slovak@facultyName{Filozofická fakulta}
@@ -244,23 +244,23 @@

% Rôzne
\gdef\thesis@slovak@typeName{%
  \ifx\thesis@type\thesis@bachelors%
  \ifx\thesis@type\thesis@bachelors
    Bakalárska diplomová práca%
  \else\ifx\thesis@type\thesis@masters%
  \else\ifx\thesis@type\thesis@masters
    Magisterská diplomová práca%
  \else\ifx\thesis@type\thesis@doctoral%
  \else\ifx\thesis@type\thesis@doctoral
    Dizertačná práca%
  \else%
  \else
    <<Neznámy typ práce (\thesis@type)>>%
  \fi\fi\fi}
\gdef\thesis@slovak@typeName@akuzativ{%
  \ifx\thesis@type\thesis@bachelors%
  \ifx\thesis@type\thesis@bachelors
    Diplomovú prácu%
  \else\ifx\thesis@type\thesis@masters%
  \else\ifx\thesis@type\thesis@masters
    Diplomovú prácu%
  \else\ifx\thesis@type\thesis@doctoral%
  \else\ifx\thesis@type\thesis@doctoral
    Dizertačnú prácu%
  \else%
  \else
    <<Neznámý typ práce (\thesis@type)>>%
  \fi\fi\fi}
%    \end{macrocode}\iffalse
Loading