From 38eb7854492f11377f98902824b15acc1f41413c Mon Sep 17 00:00:00 2001
From: witiko <witiko@gmail.com>
Date: Tue, 5 May 2015 20:25:01 +0200
Subject: [PATCH] Added the `table` and `oldtable` options.

---
 fithesis3/style/mu/base.dtx      | 176 +++++++++++++++++++++++--------
 fithesis3/style/mu/econ.dtx      |   9 +-
 fithesis3/style/mu/fi.dtx        |   9 +-
 fithesis3/style/mu/fsps.dtx      |   9 +-
 fithesis3/style/mu/fss.dtx       |   9 +-
 fithesis3/style/mu/law.dtx       |   9 +-
 fithesis3/style/mu/med.dtx       |   9 +-
 fithesis3/style/mu/ped.dtx       |   9 +-
 fithesis3/style/mu/phil.dtx      |   9 +-
 fithesis3/style/mu/sci.dtx       |  14 ++-
 fithesis3/test/econ-oldtable.tex |  13 +++
 fithesis3/test/econ-table.tex    |  12 +++
 fithesis3/test/fi-oldtable.tex   |  13 +++
 fithesis3/test/fi-table.tex      |  12 +++
 fithesis3/test/fsps-oldtable.tex |  13 +++
 fithesis3/test/fsps-table.tex    |  12 +++
 fithesis3/test/fss-oldtable.tex  |  13 +++
 fithesis3/test/fss-table.tex     |  12 +++
 fithesis3/test/law-oldtable.tex  |  13 +++
 fithesis3/test/law-table.tex     |  12 +++
 fithesis3/test/med-oldtable.tex  |  13 +++
 fithesis3/test/med-table.tex     |  12 +++
 fithesis3/test/ped-oldtable.tex  |  13 +++
 fithesis3/test/ped-table.tex     |  12 +++
 fithesis3/test/phil-oldtable.tex |  13 +++
 fithesis3/test/phil-table.tex    |  12 +++
 fithesis3/test/sci-oldtable.tex  |  13 +++
 fithesis3/test/sci-table.tex     |  12 +++
 pdflatex.tex                     |   2 +-
 xelatex.tex                      |   2 +-
 30 files changed, 410 insertions(+), 81 deletions(-)
 create mode 100644 fithesis3/test/econ-oldtable.tex
 create mode 100644 fithesis3/test/econ-table.tex
 create mode 100644 fithesis3/test/fi-oldtable.tex
 create mode 100644 fithesis3/test/fi-table.tex
 create mode 100644 fithesis3/test/fsps-oldtable.tex
 create mode 100644 fithesis3/test/fsps-table.tex
 create mode 100644 fithesis3/test/fss-oldtable.tex
 create mode 100644 fithesis3/test/fss-table.tex
 create mode 100644 fithesis3/test/law-oldtable.tex
 create mode 100644 fithesis3/test/law-table.tex
 create mode 100644 fithesis3/test/med-oldtable.tex
 create mode 100644 fithesis3/test/med-table.tex
 create mode 100644 fithesis3/test/ped-oldtable.tex
 create mode 100644 fithesis3/test/ped-table.tex
 create mode 100644 fithesis3/test/phil-oldtable.tex
 create mode 100644 fithesis3/test/phil-table.tex
 create mode 100644 fithesis3/test/sci-oldtable.tex
 create mode 100644 fithesis3/test/sci-table.tex

diff --git a/fithesis3/style/mu/base.dtx b/fithesis3/style/mu/base.dtx
index f3bcfa4..27a170c 100644
--- a/fithesis3/style/mu/base.dtx
+++ b/fithesis3/style/mu/base.dtx
@@ -24,7 +24,7 @@
 %     starts on an left-hand (even-numbered) page.
 %
 %     The \DescribeMacro{\ifthesis@twoside@}|\ifthesis@twoside@|
-%     conditional is set to \textit{false} or \textit{true},
+%     conditional is set to \texttt{false} or \texttt{true},
 %     respectively. This value can be tested in the subsequently
 %     loaded style files.
 %   \item\texttt{onecolumn}, \texttt{twocolumn} -- The document
@@ -32,11 +32,32 @@
 %     respectively.
 %   \item\texttt{draft}, \texttt{final} -- Overful lines are or
 %     aren't marked within the document, respectively.
-%   \item\texttt{monochrome}, \texttt{color} -- The
+%   \item\texttt{monochrome}, \texttt{color} -- Certain
+%     typographical elements are going to be typeset in color. The
 %     \DescribeMacro{\ifthesis@color@}|\ifthesis@color@| conditional
-%     is set to \textit{false} or \textit{true}, respectively.
+%     is set to \texttt{false} or \texttt{true}, respectively.
 %     This value can be tested in the subsequently loaded style
 %     files.
+%   \item\texttt{oldtable}, \texttt{table} -- If the
+%     |\ifthesis@color@| conditional is \texttt{true}, then the
+%     definition of the \texttt{tabular} and \texttt{tabularx}
+%     commands aren't or are going to be altered, respectively,
+%     to better match the style. The \DescribeMacro%
+%     {\ifthesis@newtable@}|\ifthesis@newtable@| conditional
+%     is set to \texttt{false} or \texttt{true}, respectively.
+%
+%     The choice of the name is deliberate -- the redefinition of
+%     the table environments depends on the \textsf{xcolor}
+%     package, which needs to be loaded with the \texttt{table}
+%     option. Since so many other packages depend on the
+%     \textsf{xcolor} package and this style file is leaded at the
+%     very end of the preamble, there would either be a great
+%     chance of an option clash, or the option would have to be
+%     passed to the \textsf{xcolor} package from the body of the
+%     \textsf{fithesis3} class thus breaking the encapsulation.
+%     Naming the option \texttt{option} forces the option to be
+%     processed by the \textsf{xcolor} package as well and it is
+%     therefore an elegant solution to the problem at hand.
 %   \item\texttt{lot}, \texttt{nolot} -- |\listoftables| is or
 %     isn't going to be included in the
 %     \DescribeMacro{\thesis@blocks@tables}|\thesis@blocks@tables|
@@ -50,13 +71,13 @@
 %     is or isn't going to expand to the thesis cover.
 %
 %     The \DescribeMacro{\ifthesis@cover@}|\ifthesis@cover@|
-%     conditional is set to \textit{false} or \textit{true},
+%     conditional is set to \texttt{false} or \texttt{true},
 %     respectively. This value can be tested in the subsequently
 %     loaded style files.
 % \end{itemize}
 % The defaults are \texttt{12pt}, \texttt{twoside}, \texttt{final},
-% \texttt{monochrome}, \texttt{nolof}, \texttt{nolot} and
-% \texttt{nocover}.
+% \texttt{monochrome}, \texttt{oldtable}, \texttt{nolof},
+% \texttt{nolot} and \texttt{nocover}.
 %    \begin{macrocode}
 \DeclareOption{10pt}{\def\thesis@ptsize{0}}
 \DeclareOption{11pt}{\def\thesis@ptsize{1}}
@@ -73,6 +94,9 @@
 \newif\ifthesis@color@
 \DeclareOption{monochrome}{\thesis@color@false}
 \DeclareOption{color}{\thesis@color@true}
+\newif\ifthesis@newtable@
+\DeclareOption{table}{\thesis@newtable@true}
+\DeclareOption{oldtable}{\thesis@newtable@false}
 \DeclareOption{nolot}{\def\thesis@blocks@lot{}}
 \DeclareOption{lot}{\let\thesis@blocks@lot\listoftables}
 \DeclareOption{nolof}{\def\thesis@blocks@lof{}}
@@ -82,34 +106,14 @@
 \DeclareOption{cover}{\thesis@cover@true}
 
 % Options executed by default
-\ExecuteOptions{12pt,twoside,final,monochrome,lot,lof,nocover}
+\ExecuteOptions{12pt,twoside,final,monochrome,oldtable,lot,lof,
+  nocover}
 \ProcessOptions
 %    \end{macrocode}
 % The file loads the following packages: \begin{itemize}
 %   \item\textsf{xcolor} -- Adds support for color manipulation.
 %   \item\textsf{ifxetex} -- Used to detect the \Hologo{XeTeX}
 %     engine.
-%   \item\textsf{mathpazo} -- The virtual \texttt{mathpazo} fonts
-%     will be used for math. This package does not get loaded in
-%     \Hologo{XeTeX}.
-%   \item\textsf{tgpagella} -- Changes the default roman font family
-%     to \TeX\ Gyre Pagella. This package does not get loaded in
-%     \Hologo{XeTeX}.
-%   \item\textsf{lmodern} -- Changes the default sans-serif and
-%     monotype font faces to Latin Modern instead of the default
-%     Computer Modern font family.
-%   \item\textsf{cmap} -- Places an an explicit \texttt{ToUnicode}
-%     map in the resulting PDF file, allowing for extraction of
-%     the text of the document. This package does not get loaded
-%     under \Hologo{XeTeX}.
-%   \item\textsf{fontenc} -- The font encoding is set to Cork. This
-%     package does not get loaded under \Hologo{XeTeX}.
-%   \item\textsf{fontspec} -- Allows the selection of
-%     system-installed fonts. This package only gets loaded under
-%     \Hologo{XeTeX}.
-%   \item\textsf{unicode-math} -- Allows the selection of
-%     system-installed mathematical fonts. This package only gets
-%     loaded under \Hologo{XeTeX}.
 %   \item\textsf{graphix} -- Adds support for the inclusion of
 %     graphics files.
 %   \item\textsf{pdfpages} -- Adds support for the injection of PDF
@@ -120,20 +124,49 @@
 %   \item\textsf{keyval} -- Adds support for parsing
 %     comma-delimited lists of key-value pairs.
 % \end{itemize}
-% In addition to that, the \textsf{hyperref} package is configured
-% to support both roman and arabic page numbering in one document
-% and to decorate hyperlinks with an underline instead of a
-% rectangular box. Under \Hologo{XeTeX}, the \textsf{TeX Gyre
-% Pagella} and \textsf{TeX Gyre Pagella Math} are selected as the
-% main text and math fonts.
 %    \begin{macrocode}
 \thesis@require{xcolor}
+\thesis@require{graphicx}
+\thesis@require{pdfpages}
+\thesis@require{keyval}
 \thesis@require{ifxetex}
+%    \end{macrocode}
+% The following packages get only loaded, when the document is
+% being typeset using the \Hologo{XeTeX} engine: \begin{itemize}
+%   \item\textsf{fontspec} -- Allows the selection of
+%     system-installed fonts. This package only gets loaded under
+%     \Hologo{XeTeX}.
+%   \item\textsf{unicode-math} -- Allows the selection of
+%     system-installed mathematical fonts. This package only gets
+%     loaded under \Hologo{XeTeX}.
+% \end{itemize}
+% Under \Hologo{XeTeX}, the \textsf{TeX Gyre Pagella} and
+% \textsf{TeX Gyre Pagella Math} are also selected as the main text
+% and math fonts.
+%    \begin{macrocode}
 \ifxetex
   \thesis@require{fontspec}
   \thesis@require{unicode-math}
   \setmainfont[Ligatures=TeX]{TeX Gyre Pagella}
-  \setmathfont[math-style=ISO,bold-style=ISO,vargreek-shape=TeX]{TG Pagella Math}
+  \setmathfont[math-style=ISO,bold-style=ISO,vargreek-shape=TeX]%
+    {TG Pagella Math}
+%    \end{macrocode}
+% The following packages get only loaded, when the document is
+% not being typeset using the \Hologo{XeTeX} engine:
+% \begin{itemize}
+%   \item\textsf{mathpazo} -- The virtual \texttt{mathpazo} fonts
+%     will be used for math.
+%   \item\textsf{tgpagella} -- Changes the default roman font
+%     family to \TeX\ Gyre Pagella.
+%   \item\textsf{lmodern} -- Changes the default sans-serif and
+%     monotype font faces to Latin Modern instead of the default
+%     Computer Modern font family.
+%   \item\textsf{cmap} -- Places an an explicit \texttt{ToUnicode}
+%     map in the resulting PDF file, allowing for extraction of
+%     the text of the document.
+%   \item\textsf{fontenc} -- The font encoding is set to Cork.
+% \end{itemize}
+%    \begin{macrocode}
 \else
   \thesis@require{lmodern}
   \thesis@require{mathpazo}
@@ -141,10 +174,47 @@
   \RequirePackage[resetfonts]{cmap}
   \RequirePackage[T1]{fontenc}
 \fi
-\thesis@require{graphicx}
-\thesis@require{pdfpages}
+%    \end{macrocode}
+% If the |\thesis@newtable@| and |\thesis@color@| conditionals are
+% \texttt{true}, then the following package gets loaded:
+% \begin{itemize}
+%   \item\textsf{tabularx} -- Provides the \texttt{tabularx}
+%     environment, which enables the typesetting of tables with
+%     variable-width columns.
+% \end{itemize}
+% Subsequently, the \texttt{tabular} and \texttt{tabularx}
+% environments are redefined to better match the style.
+%    \begin{macrocode}
+\ifthesis@newtable@\ifthesis@color@
+  \thesis@require{tabularx}
+  \thesis@require{booktabs}
+  % The redefinition of `tabular`
+  \let\thesis@newtable@old\tabular
+  \let\thesis@newtable@endold\endtabular
+  \renewenvironment{tabular}%
+    {\rowcolors{1}{thesis@color@tableOdd}%
+                  {thesis@color@tableEven}%
+     \thesis@newtable@old}%
+    {\thesis@newtable@endold}
+  % The redefinition of `tabularx`
+  \let\thesis@newtable@oldx\tabularx
+  \let\thesis@newtable@endoldx\endtabularx
+  \renewenvironment{tabularx}%
+    {\rowcolors{1}{thesis@color@tableOdd}%
+                  {thesis@color@tableEven}%
+     \thesis@newtable@oldx}%
+    {\thesis@newtable@endoldx}
+  % Adjust the measurements
+  \setlength{\aboverulesep}{0pt}
+  \setlength{\belowrulesep}{0pt}
+  \setlength{\extrarowheight}{.75ex}
+\fi\fi
+%    \end{macrocode}
+% The \textsf{hyperref} package is configured to support both roman
+% and arabic page numbering in one document and to decorate
+% hyperlinks with an underline instead of a rectangular box.
+%    \begin{macrocode}
 \thesis@require{hyperref}
-\thesis@require{keyval}
 \hypersetup{
   pdfborderstyle={/S/U/W 1}, % Less obtrusive borders
   plainpages=false,          % Multiple page numbering support
@@ -166,12 +236,31 @@
 % The following key-value pairs are supported:
 % \begin{enumerate}
 %   \item\marg{\texttt{links}=color} -- Sets the color of hyperref
-%     links to \textit{color}. The default color is specified by
-%     the \textsf{hyperref} package.
+%     links to \textit{color} and stores it under the name
+%     \texttt{thesis@color@links}. The default color of links is
+%     specified by the \textsf{hyperref} package.
+%   \item\marg{\texttt{tableOdd}=color} -- Stores the color of the
+%     odd rows of the redefined \texttt{tabular} and
+%     \texttt{tabularx} environments under the name
+%     \texttt{thesis@color@tableOdd}.
+%   \item\marg{\texttt{tableEven}=color} -- Stores the color of the
+%     even rows of the redefined \texttt{tabular} and
+%     \texttt{tabularx} environments under the name
+%     \texttt{thesis@color@tableEven}.
+%   \item\marg{\texttt{tableEven}=color} -- Stores the color of an
+%     emphasized cell in the table for usage by the user under the
+%     name \texttt{thesis@color@tableEven}.
 % \end{enumerate}
 %    \begin{macrocode}
 \define@key{thesis@color}{links}{%
-  \hypersetup{linkbordercolor=#1}}
+  \definecolor{thesis@color@links}#1
+  \hypersetup{linkbordercolor=thesis@color@links}}
+\define@key{thesis@color}{tableOdd}{%
+  \definecolor{thesis@color@tableOdd}#1}
+\define@key{thesis@color}{tableEven}{%
+  \definecolor{thesis@color@tableEven}#1}
+\define@key{thesis@color}{tableEmph}{%
+  \definecolor{thesis@color@tableEmph}#1}
 %    \end{macrocode}
 % The file defines several blocks to be used in the redefinitions
 % of the |\thesis@preamble| and |\thesis@postable| private macros
@@ -323,7 +412,10 @@
 %        cover page
 % \end{itemize}
 % This allows the subsequently loaded style files to only redefine
-% certain parts of the title page.
+% certain parts of the title page. Depending on the value of the
+% |\ifthesis@color@| conditional, the faculty logo is loaded from
+% either |\thesis@logopath|, if \texttt{false}, or from
+% |\thesis@logopath color/|, if \texttt{true}.
 %    \begin{macrocode}
 \def\thesis@blocks@titlePage{%
     \thesis@blocks@clear%
diff --git a/fithesis3/style/mu/econ.dtx b/fithesis3/style/mu/econ.dtx
index f6be16e..a8f09a5 100644
--- a/fithesis3/style/mu/econ.dtx
+++ b/fithesis3/style/mu/econ.dtx
@@ -11,10 +11,11 @@
 %    \end{macrocode}
 % The file defines the color used with the hyperlinks.
 %    \begin{macrocode}
-\definecolor{thesis@color@faculty}{HTML}{7C211E}
-\definecolor{thesis@color@facultylight}{HTML}{DAC1BF}
-\definecolor{thesis@color@facultyxlight}{HTML}{EFE4E3}
-\thesis@color@setup{links=thesis@color@faculty}
+\thesis@color@setup{
+  links={HTML}{7C211E},
+  tableEmph={HTML}{7C211E},
+  tableOdd={HTML}{EFE4E3},
+  tableEven={HTML}{DAC1BF}}
 %    \end{macrocode}
 % In addition to the main locale, the file also requires the
 % English locale.
diff --git a/fithesis3/style/mu/fi.dtx b/fithesis3/style/mu/fi.dtx
index 9ff5afd..7820cec 100644
--- a/fithesis3/style/mu/fi.dtx
+++ b/fithesis3/style/mu/fi.dtx
@@ -10,10 +10,11 @@
 %    \end{macrocode}
 % The file defines the color used with the hyperlinks.
 %    \begin{macrocode}
-\definecolor{thesis@color@faculty}{HTML}{FFD451}
-\definecolor{thesis@color@facultylight}{HTML}{FFECB3}
-\definecolor{thesis@color@facultyxlight}{HTML}{FFF9E5}
-\thesis@color@setup{links=thesis@color@faculty}
+\thesis@color@setup{
+  links={HTML}{FFD451},
+  tableEmph={HTML}{FFD451},
+  tableOdd={HTML}{FFF9E5},
+  tableEven={HTML}{FFECB3}}
 %    \end{macrocode}
 % \begin{macro}{\thesis@blocks@titlePage}
 % The style file redefines the cover and title page footers to
diff --git a/fithesis3/style/mu/fsps.dtx b/fithesis3/style/mu/fsps.dtx
index 367f1d9..00b33d7 100644
--- a/fithesis3/style/mu/fsps.dtx
+++ b/fithesis3/style/mu/fsps.dtx
@@ -10,10 +10,11 @@
 %    \end{macrocode}
 % The file defines the color used with the hyperlinks.
 %    \begin{macrocode}
-\definecolor{thesis@color@faculty}{HTML}{0042BA}
-\definecolor{thesis@color@facultylight}{HTML}{BBC7DD}
-\definecolor{thesis@color@facultyxlight}{HTML}{E4E9F1}
-\thesis@color@setup{links=thesis@color@facultylight}
+\thesis@color@setup{
+  links={HTML}{BBC7DD},
+  tableEmph={HTML}{0042BA},
+  tableOdd={HTML}{E4E9F1},
+  tableEven={HTML}{BBC7DD}}
 %    \end{macrocode}
 % The style file configures the title page header to include the
 % field name.
diff --git a/fithesis3/style/mu/fss.dtx b/fithesis3/style/mu/fss.dtx
index eec51b1..4f004cc 100644
--- a/fithesis3/style/mu/fss.dtx
+++ b/fithesis3/style/mu/fss.dtx
@@ -19,10 +19,11 @@
 %    \end{macrocode}
 % The file defines the color used with the hyperlinks.
 %    \begin{macrocode}
-\definecolor{thesis@color@faculty}{HTML}{007B69}
-\definecolor{thesis@color@facultylight}{HTML}{B8DAD5}
-\definecolor{thesis@color@facultyxlight}{HTML}{E3F1EE}
-\thesis@color@setup{links=thesis@color@faculty}
+\thesis@color@setup{
+  links={HTML}{007B69},
+  tableEmph={HTML}{007B69},
+  tableOdd={HTML}{E3F1EE},
+  tableEven={HTML}{B8DAD5}}
 %    \end{macrocode}
 % In addition to the main locale, the file also requires the
 % English locale.
diff --git a/fithesis3/style/mu/law.dtx b/fithesis3/style/mu/law.dtx
index 8f2ef1a..f228588 100644
--- a/fithesis3/style/mu/law.dtx
+++ b/fithesis3/style/mu/law.dtx
@@ -10,10 +10,11 @@
 %    \end{macrocode}
 % The file defines the color used with the hyperlinks.
 %    \begin{macrocode}
-\definecolor{thesis@color@faculty}{HTML}{80379B}
-\definecolor{thesis@color@facultylight}{HTML}{D3BADC}
-\definecolor{thesis@color@facultyxlight}{HTML}{F0E7F3}
-\thesis@color@setup{links=thesis@color@faculty}
+\thesis@color@setup{
+  links={HTML}{80379B},
+  tableEmph={HTML}{80379B},
+  tableOdd={HTML}{F0E7F3},
+  tableEven={HTML}{D3BADC}}
 %    \end{macrocode}
 % In addition to the main locale, the file also requires the
 % English locale.
diff --git a/fithesis3/style/mu/med.dtx b/fithesis3/style/mu/med.dtx
index b56e4a0..01548f6 100644
--- a/fithesis3/style/mu/med.dtx
+++ b/fithesis3/style/mu/med.dtx
@@ -11,10 +11,11 @@
 %    \end{macrocode}
 % The file defines the color used with the hyperlinks.
 %    \begin{macrocode}
-\definecolor{thesis@color@faculty}{HTML}{F2532D}
-\definecolor{thesis@color@facultylight}{HTML}{FFBFC2}
-\definecolor{thesis@color@facultyxlight}{HTML}{FFE3E5}
-\thesis@color@setup{links=thesis@color@faculty}
+\thesis@color@setup{
+  links={HTML}{F2532D},
+  tableEmph={HTML}{F2532D},
+  tableOdd={HTML}{FFE3E5},
+  tableEven={HTML}{FFBFC2}}
 %    \end{macrocode}
 % In addition to the main locale, the file also requires the
 % English locale.
diff --git a/fithesis3/style/mu/ped.dtx b/fithesis3/style/mu/ped.dtx
index a51ab5f..9375f9b 100644
--- a/fithesis3/style/mu/ped.dtx
+++ b/fithesis3/style/mu/ped.dtx
@@ -10,10 +10,11 @@
 %    \end{macrocode}
 % The file defines the color used with the hyperlinks.
 %    \begin{macrocode}
-\definecolor{thesis@color@faculty}{HTML}{FFA02F}
-\definecolor{thesis@color@facultylight}{HTML}{FFDEB7}
-\definecolor{thesis@color@facultyxlight}{HTML}{FFF1E0}
-\thesis@color@setup{links=thesis@color@faculty}
+\thesis@color@setup{
+  links={HTML}{FFA02F},
+  tableEmph={HTML}{FFA02F},
+  tableOdd={HTML}{FFF1E0},
+  tableEven={HTML}{FFDEB7}}
 %    \end{macrocode}
 % In addition to the main locale, the file also requires the
 % English locale.
diff --git a/fithesis3/style/mu/phil.dtx b/fithesis3/style/mu/phil.dtx
index f95cac2..41bb32d 100644
--- a/fithesis3/style/mu/phil.dtx
+++ b/fithesis3/style/mu/phil.dtx
@@ -10,10 +10,11 @@
 %    \end{macrocode}
 % The file defines the color used with the hyperlinks.
 %    \begin{macrocode}
-\definecolor{thesis@color@faculty}{HTML}{00A1DE}
-\definecolor{thesis@color@facultylight}{HTML}{B8E4F5}
-\definecolor{thesis@color@facultyxlight}{HTML}{E0F3FA}
-\thesis@color@setup{links=thesis@color@faculty}
+\thesis@color@setup{
+  links={HTML}{00A1DE},
+  tableEmph={HTML}{00A1DE},
+  tableOdd={HTML}{E0F3FA},
+  tableEven={HTML}{B8E4F5}}
 %    \end{macrocode}
 % The style file configures the title page header to include the
 % department and the field name.
diff --git a/fithesis3/style/mu/sci.dtx b/fithesis3/style/mu/sci.dtx
index b9c22b9..f3a6229 100644
--- a/fithesis3/style/mu/sci.dtx
+++ b/fithesis3/style/mu/sci.dtx
@@ -10,10 +10,11 @@
 %    \end{macrocode}
 % The file defines the color used with the hyperlinks.
 %    \begin{macrocode}
-\definecolor{thesis@color@faculty}{HTML}{00AF3F}
-\definecolor{thesis@color@facultylight}{HTML}{B8E8C9}
-\definecolor{thesis@color@facultyxlight}{HTML}{E0F5E8}
-\thesis@color@setup{links=thesis@color@faculty}
+\thesis@color@setup{
+  links={HTML}{00AF3F},
+  tableEmph={HTML}{00AF3F},
+  tableOdd={HTML}{E0F5E8},
+  tableEven={HTML}{B8E8C9}}
 %    \end{macrocode}
 % In addition to the main locale, the file also requires the
 % Czech and English locales.
@@ -269,7 +270,10 @@
 %    \end{macrocode}
 % \end{macro}\begin{macro}{\thesis@blocks@titlePage}
 % The |\thesis@blocks@titlePage| private macro typesets the thesis
-% title page.
+% title page. Depending on the value of the |\ifthesis@color@|
+% conditional, the faculty logo is loaded from either
+% |\thesis@logopath|, if \texttt{false}, or from
+% |\thesis@logopath color/|, if \texttt{true}.
 % \begin{macrocode}
 \def\thesis@blocks@titlePage{{%
   \edef\thesis@logopath@color{\thesis@logopath\ifthesis@color@ color/\fi}
diff --git a/fithesis3/test/econ-oldtable.tex b/fithesis3/test/econ-oldtable.tex
new file mode 100644
index 0000000..e939b81
--- /dev/null
+++ b/fithesis3/test/econ-oldtable.tex
@@ -0,0 +1,13 @@
+\documentclass[oldtable,color]{../fithesis3}
+\usepackage{tabularx}
+\thesissetup{basepath=.., faculty=econ}
+\begin{document}
+  \begin{tabular}{ccc}
+    a&b&c\\
+    d&e&f
+  \end{tabular}
+  \begin{tabularx}{\textwidth}{ccc}
+    a&b&c\\
+    d&e&f
+  \end{tabularx}
+\end{document}
diff --git a/fithesis3/test/econ-table.tex b/fithesis3/test/econ-table.tex
new file mode 100644
index 0000000..33d9a11
--- /dev/null
+++ b/fithesis3/test/econ-table.tex
@@ -0,0 +1,12 @@
+\documentclass[table,color]{../fithesis3}
+\thesissetup{basepath=.., faculty=econ}
+\begin{document}
+  \begin{tabular}{ccc}
+    a&b&c\\
+    d&e&f
+  \end{tabular}
+  \begin{tabularx}{\textwidth}{ccc}
+    a&b&c\\
+    d&e&f
+  \end{tabularx}
+\end{document}
diff --git a/fithesis3/test/fi-oldtable.tex b/fithesis3/test/fi-oldtable.tex
new file mode 100644
index 0000000..8ad47ad
--- /dev/null
+++ b/fithesis3/test/fi-oldtable.tex
@@ -0,0 +1,13 @@
+\documentclass[oldtable,color]{../fithesis3}
+\usepackage{tabularx}
+\thesissetup{basepath=.., faculty=fi}
+\begin{document}
+  \begin{tabular}{ccc}
+    a&b&c\\
+    d&e&f
+  \end{tabular}
+  \begin{tabularx}{\textwidth}{ccc}
+    a&b&c\\
+    d&e&f
+  \end{tabularx}
+\end{document}
diff --git a/fithesis3/test/fi-table.tex b/fithesis3/test/fi-table.tex
new file mode 100644
index 0000000..bf66107
--- /dev/null
+++ b/fithesis3/test/fi-table.tex
@@ -0,0 +1,12 @@
+\documentclass[table,color]{../fithesis3}
+\thesissetup{basepath=.., faculty=fi}
+\begin{document}
+  \begin{tabular}{ccc}
+    a&b&c\\
+    d&e&f
+  \end{tabular}
+  \begin{tabularx}{\textwidth}{ccc}
+    a&b&c\\
+    d&e&f
+  \end{tabularx}
+\end{document}
diff --git a/fithesis3/test/fsps-oldtable.tex b/fithesis3/test/fsps-oldtable.tex
new file mode 100644
index 0000000..5636c5b
--- /dev/null
+++ b/fithesis3/test/fsps-oldtable.tex
@@ -0,0 +1,13 @@
+\documentclass[oldtable,color]{../fithesis3}
+\usepackage{tabularx}
+\thesissetup{basepath=.., faculty=fsps}
+\begin{document}
+  \begin{tabular}{ccc}
+    a&b&c\\
+    d&e&f
+  \end{tabular}
+  \begin{tabularx}{\textwidth}{ccc}
+    a&b&c\\
+    d&e&f
+  \end{tabularx}
+\end{document}
diff --git a/fithesis3/test/fsps-table.tex b/fithesis3/test/fsps-table.tex
new file mode 100644
index 0000000..c18c8c4
--- /dev/null
+++ b/fithesis3/test/fsps-table.tex
@@ -0,0 +1,12 @@
+\documentclass[table,color]{../fithesis3}
+\thesissetup{basepath=.., faculty=fsps}
+\begin{document}
+  \begin{tabular}{ccc}
+    a&b&c\\
+    d&e&f
+  \end{tabular}
+  \begin{tabularx}{\textwidth}{ccc}
+    a&b&c\\
+    d&e&f
+  \end{tabularx}
+\end{document}
diff --git a/fithesis3/test/fss-oldtable.tex b/fithesis3/test/fss-oldtable.tex
new file mode 100644
index 0000000..f4eb58f
--- /dev/null
+++ b/fithesis3/test/fss-oldtable.tex
@@ -0,0 +1,13 @@
+\documentclass[oldtable,color]{../fithesis3}
+\usepackage{tabularx}
+\thesissetup{basepath=.., faculty=fss}
+\begin{document}
+  \begin{tabular}{ccc}
+    a&b&c\\
+    d&e&f
+  \end{tabular}
+  \begin{tabularx}{\textwidth}{ccc}
+    a&b&c\\
+    d&e&f
+  \end{tabularx}
+\end{document}
diff --git a/fithesis3/test/fss-table.tex b/fithesis3/test/fss-table.tex
new file mode 100644
index 0000000..9722222
--- /dev/null
+++ b/fithesis3/test/fss-table.tex
@@ -0,0 +1,12 @@
+\documentclass[table,color]{../fithesis3}
+\thesissetup{basepath=.., faculty=fss}
+\begin{document}
+  \begin{tabular}{ccc}
+    a&b&c\\
+    d&e&f
+  \end{tabular}
+  \begin{tabularx}{\textwidth}{ccc}
+    a&b&c\\
+    d&e&f
+  \end{tabularx}
+\end{document}
diff --git a/fithesis3/test/law-oldtable.tex b/fithesis3/test/law-oldtable.tex
new file mode 100644
index 0000000..3c9de9b
--- /dev/null
+++ b/fithesis3/test/law-oldtable.tex
@@ -0,0 +1,13 @@
+\documentclass[oldtable,color]{../fithesis3}
+\usepackage{tabularx}
+\thesissetup{basepath=.., faculty=law}
+\begin{document}
+  \begin{tabular}{ccc}
+    a&b&c\\
+    d&e&f
+  \end{tabular}
+  \begin{tabularx}{\textwidth}{ccc}
+    a&b&c\\
+    d&e&f
+  \end{tabularx}
+\end{document}
diff --git a/fithesis3/test/law-table.tex b/fithesis3/test/law-table.tex
new file mode 100644
index 0000000..b69a8ec
--- /dev/null
+++ b/fithesis3/test/law-table.tex
@@ -0,0 +1,12 @@
+\documentclass[table,color]{../fithesis3}
+\thesissetup{basepath=.., faculty=law}
+\begin{document}
+  \begin{tabular}{ccc}
+    a&b&c\\
+    d&e&f
+  \end{tabular}
+  \begin{tabularx}{\textwidth}{ccc}
+    a&b&c\\
+    d&e&f
+  \end{tabularx}
+\end{document}
diff --git a/fithesis3/test/med-oldtable.tex b/fithesis3/test/med-oldtable.tex
new file mode 100644
index 0000000..ad667fa
--- /dev/null
+++ b/fithesis3/test/med-oldtable.tex
@@ -0,0 +1,13 @@
+\documentclass[oldtable,color]{../fithesis3}
+\usepackage{tabularx}
+\thesissetup{basepath=.., faculty=med}
+\begin{document}
+  \begin{tabular}{ccc}
+    a&b&c\\
+    d&e&f
+  \end{tabular}
+  \begin{tabularx}{\textwidth}{ccc}
+    a&b&c\\
+    d&e&f
+  \end{tabularx}
+\end{document}
diff --git a/fithesis3/test/med-table.tex b/fithesis3/test/med-table.tex
new file mode 100644
index 0000000..9018fe3
--- /dev/null
+++ b/fithesis3/test/med-table.tex
@@ -0,0 +1,12 @@
+\documentclass[table,color]{../fithesis3}
+\thesissetup{basepath=.., faculty=med}
+\begin{document}
+  \begin{tabular}{ccc}
+    a&b&c\\
+    d&e&f
+  \end{tabular}
+  \begin{tabularx}{\textwidth}{ccc}
+    a&b&c\\
+    d&e&f
+  \end{tabularx}
+\end{document}
diff --git a/fithesis3/test/ped-oldtable.tex b/fithesis3/test/ped-oldtable.tex
new file mode 100644
index 0000000..4524625
--- /dev/null
+++ b/fithesis3/test/ped-oldtable.tex
@@ -0,0 +1,13 @@
+\documentclass[oldtable,color]{../fithesis3}
+\usepackage{tabularx}
+\thesissetup{basepath=.., faculty=ped}
+\begin{document}
+  \begin{tabular}{ccc}
+    a&b&c\\
+    d&e&f
+  \end{tabular}
+  \begin{tabularx}{\textwidth}{ccc}
+    a&b&c\\
+    d&e&f
+  \end{tabularx}
+\end{document}
diff --git a/fithesis3/test/ped-table.tex b/fithesis3/test/ped-table.tex
new file mode 100644
index 0000000..2bb346b
--- /dev/null
+++ b/fithesis3/test/ped-table.tex
@@ -0,0 +1,12 @@
+\documentclass[table,color]{../fithesis3}
+\thesissetup{basepath=.., faculty=ped}
+\begin{document}
+  \begin{tabular}{ccc}
+    a&b&c\\
+    d&e&f
+  \end{tabular}
+  \begin{tabularx}{\textwidth}{ccc}
+    a&b&c\\
+    d&e&f
+  \end{tabularx}
+\end{document}
diff --git a/fithesis3/test/phil-oldtable.tex b/fithesis3/test/phil-oldtable.tex
new file mode 100644
index 0000000..b6f7615
--- /dev/null
+++ b/fithesis3/test/phil-oldtable.tex
@@ -0,0 +1,13 @@
+\documentclass[oldtable,color]{../fithesis3}
+\usepackage{tabularx}
+\thesissetup{basepath=.., faculty=phil}
+\begin{document}
+  \begin{tabular}{ccc}
+    a&b&c\\
+    d&e&f
+  \end{tabular}
+  \begin{tabularx}{\textwidth}{ccc}
+    a&b&c\\
+    d&e&f
+  \end{tabularx}
+\end{document}
diff --git a/fithesis3/test/phil-table.tex b/fithesis3/test/phil-table.tex
new file mode 100644
index 0000000..ff6217e
--- /dev/null
+++ b/fithesis3/test/phil-table.tex
@@ -0,0 +1,12 @@
+\documentclass[table,color]{../fithesis3}
+\thesissetup{basepath=.., faculty=phil}
+\begin{document}
+  \begin{tabular}{ccc}
+    a&b&c\\
+    d&e&f
+  \end{tabular}
+  \begin{tabularx}{\textwidth}{ccc}
+    a&b&c\\
+    d&e&f
+  \end{tabularx}
+\end{document}
diff --git a/fithesis3/test/sci-oldtable.tex b/fithesis3/test/sci-oldtable.tex
new file mode 100644
index 0000000..ee525d0
--- /dev/null
+++ b/fithesis3/test/sci-oldtable.tex
@@ -0,0 +1,13 @@
+\documentclass[oldtable,color]{../fithesis3}
+\usepackage{tabularx}
+\thesissetup{basepath=.., faculty=sci}
+\begin{document}
+  \begin{tabular}{ccc}
+    a&b&c\\
+    d&e&f
+  \end{tabular}
+  \begin{tabularx}{\textwidth}{ccc}
+    a&b&c\\
+    d&e&f
+  \end{tabularx}
+\end{document}
diff --git a/fithesis3/test/sci-table.tex b/fithesis3/test/sci-table.tex
new file mode 100644
index 0000000..a4e80c3
--- /dev/null
+++ b/fithesis3/test/sci-table.tex
@@ -0,0 +1,12 @@
+\documentclass[table,color]{../fithesis3}
+\thesissetup{basepath=.., faculty=sci}
+\begin{document}
+  \begin{tabular}{ccc}
+    a&b&c\\
+    d&e&f
+  \end{tabular}
+  \begin{tabularx}{\textwidth}{ccc}
+    a&b&c\\
+    d&e&f
+  \end{tabularx}
+\end{document}
diff --git a/pdflatex.tex b/pdflatex.tex
index 9e4603e..3644a5e 100644
--- a/pdflatex.tex
+++ b/pdflatex.tex
@@ -1,4 +1,4 @@
-\documentclass[color,cover]{fithesis3/fithesis3}
+\documentclass[table,color,cover]{fithesis3/fithesis3}
 \usepackage[english]{babel}
 \usepackage{amsmath}
 \usepackage{tabularx}
diff --git a/xelatex.tex b/xelatex.tex
index 7a7757c..297eff6 100644
--- a/xelatex.tex
+++ b/xelatex.tex
@@ -1,4 +1,4 @@
-\documentclass[color,cover]{fithesis3/fithesis3}
+\documentclass[table,color,cover]{fithesis3/fithesis3}
 \usepackage{polyglossia}
 \setmainlanguage{english}
 \usepackage{amsmath}
-- 
GitLab