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

The `printed` and `digital` class options are available for the `mu/`

style files. These set all the options appropriate for either the
printed or the digital versions of a document.
parent 129fee40
Loading
Loading
Loading
Loading
+10 −9
Original line number Diff line number Diff line
@@ -8,9 +8,10 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\documentclass[
  color, %% This option enables colorful typesetting. Replace with
         %% `monochrome`, if you are going to print the thesis on
         %% a monochromatic printer.
  digital, %% This option enables the default options for the
           %% digital version of a document. Replace with `printed`
           %% to enable the default options for the printed version
           %% of a document.
  table,   %% Causes the coloring of tables. Replace with `notable`
           %% to restore plain tables.
  lof,     %% Prints the List of Figures. Replace with `nolof` to
+6 −1
Original line number Diff line number Diff line
@@ -51,11 +51,16 @@
%<*class>
\NeedsTeXFormat{LaTeX2e}
% Define `\thesis@version` and store it in the `VERSION.tex` file \fi
\def\thesis@version{2015/12/08 v0.3.29:1-dev fithesis3 MU thesis class}
\def\thesis@version{2015/12/09 v0.3.29:2-dev fithesis3 MU thesis class}
% {\newwrite\f\openout\f=VERSION\write\f{\thesis@version}\closeout\f}
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% \changes{v0.3.29:2}{2015/12/09}{The \texttt{printed} and
%   \texttt{digital} class options, which set all the options
%   appropriate for either the printed or the digital versions of a
%   document, are now available for the style files of the Masaryk
%   University in Brno. [VN]}
% \changes{v0.3.29:1}{2015/12/08}{The initial pages of the styles
%   of the Masaryk University in Brno are no longer page-numbered,
%   so that hyperref links work correctly. [VN]}
+20 −8
Original line number Diff line number Diff line
%    \begin{macrocode}
\documentclass[color,table,nolot]{fithesis3}
\documentclass[digital,nocover,nolot]{fithesis3}
\usepackage[english]{babel}
\usepackage{hologo}
\usepackage{fancyvrb}
@@ -352,14 +352,26 @@
  \end{minted}
  is used. The following list summarizes the options that are
  supported by the \textsf{fithesis3} class and their meaning.
  Options that are enabled by default are \textit{set in italics}.

  Options that are enabled by default are
  {\makeatletter
  % This macro formats a default class option.
  \def\thguide@default{\itshape}
  \def\thguide@default{\itshape}%
  % This macro formats a class option.
  \let\thguide@itemfmt\textbf
  % This macro formats a default printed option.
  \def\thguide@printed{\color{blue}}%
  % This macro formats a default digital option.
  \def\thguide@digital{\color{red}}%
  \thguide@itemfmt{\thguide@default set in italics}.
  \begin{description}
    \item[digital] This option sets the options that are the
      default for the digital version of a thesis. These options
      are \thguide@itemfmt{\thguide@default \thguide@digital set in
      red}.
    \item[\thguide@default printed] This option sets the options
      that are the default for the printed version of a thesis.
      These options are \thguide@itemfmt{\thguide@default
      \thguide@printed set in blue}.
    \item[10pt, 11pt, \thguide@default12pt]
      These options set the font size of the main text to either
      10\,pt, 11\,pt, or 12\,pt, respectively. Using the 12\,pt
@@ -456,14 +468,14 @@
%% Here goes the rest of the document.
      \end{minted}
%</sci,fi>
    \item[color]
    \item[\thguide@default\thguide@digital color]
      This option enables the use of colors. A colorful version of
      the document is more visually pleasing, but shouldn't be used
      in a printed version, if you don't have access to a color
      printer. Unless you have a compelling reason not to, always
      use this option in the electronic version that you are going
      to publish online.
    \item[\thguide@default monochrome]
    \item[\thguide@default\thguide@printed monochrome]
      This option disables colors. Disabling colors is generally
      discouraged, unless you don't have access to a color printer.
      However, due to the prevalence of monochrome printing, this
@@ -498,14 +510,14 @@
    \item[nolof]
      This option removes the list of figures from the front matter
      of the thesis.
    \item[cover]
    \item[\thguide@default\thguide@digital cover]
      This option instructs the class to typeset the cover of the
      thesis on the first pages of the resulting document. A cover
      should be generally present in the electronic version of the
      document for completeness. The cover should not appear inside
      the printed document and should only serve as a template for
      the text imprinted on the front cover of the thesis cover.
    \item[\thguide@default nocover]
    \item[\thguide@default\thguide@printed nocover]
      This option forbids the typesetting of the thesis cover.
      Use, if you are typesetting the printed version of a thesis
      and you are not going to have a cover made for your thesis.
+71 −43
Original line number Diff line number Diff line
@@ -7,29 +7,49 @@
% after \texttt{style/fithesis-base.sty}, regardless of the value
% of the |\thesis@style| macro.
%    \begin{macrocode}
\ProvidesPackage{fithesis/style/mu/fithesis-base}[2015/11/17]
\ProvidesPackage{fithesis/style/mu/fithesis-base}[2015/12/09]
\NeedsTeXFormat{LaTeX2e}
%    \end{macrocode}
% The file recognizes the following options: \begin{itemize}
%   \item\texttt{10pt}, \texttt{11pt}, \texttt{12pt} -- Sets the
%     type size to 10, 11 or 12 points respectively.
%    \begin{macrocode}
\DeclareOption{10pt}{\def\thesis@ptsize{0}}
\DeclareOption{11pt}{\def\thesis@ptsize{1}}
\DeclareOption{12pt}{\def\thesis@ptsize{2}}
%    \end{macrocode}
%   \item\texttt{oneside}, \texttt{twoside} -- The document is
%   going to be either single- or double-sided, respectively. In a
%   double-sided document, headers, page numbering, margin notes
%   and several other elements will be arranged based on the parity
%   of the page. Blank pages will also be inserted prior the
%   beginning of each chapter to ensure that it starts on a
%   right-hand (odd-numbered) page. The
%     going to be either single- or double-sided, respectively. In
%     a double-sided document, headers, page numbering, margin
%     notes and several other elements will be arranged based on
%     the parity of the page. Blank pages will also be inserted
%     prior the beginning of each chapter to ensure that it starts
%     on a right-hand (odd-numbered) page. The
%     \DescribeMacro{\ifthesis@twoside@}|\ifthesis@twoside@|
%     conditional is set to either \texttt{false} or \texttt{true},
%     respectively.
%    \begin{macrocode}
\newif\ifthesis@twoside@
\DeclareOption{oneside}{%
  \thesis@twoside@false\@twosidefalse\@mparswitchfalse}
\DeclareOption{twoside}{%
  \thesis@twoside@true \@twosidetrue \@mparswitchtrue}
%    \end{macrocode}
%   \item\texttt{onecolumn}, \texttt{twocolumn} -- The document
%     is going to be set in either a single column or in two
%     columns, respectively.
%    \begin{macrocode}
\DeclareOption{onecolumn}{\@twocolumnfalse}
\DeclareOption{twocolumn}{\@twocolumntrue}
%    \end{macrocode}
%   \item\texttt{draft}, \texttt{final} -- Overful lines either are
%     or aren't marked within the document, respectively, and
%     graphics either aren't or are inserted into the document,
%     respectively.
%    \begin{macrocode}
\DeclareOption{draft}{\setlength\overfullrule{5pt}}
\DeclareOption{final}{\setlength\overfullrule{0pt}}
%    \end{macrocode}
%   \item\texttt{palatino}, \texttt{nopalatino} -- The roman
%     text font family and the math font family is going to be
%     either set to Palatino or left untouched, respectively. The
@@ -38,12 +58,22 @@
%     \texttt{true} or \texttt{false}, respectively. The
%     Palatino font is a part of the visual identity of the Faculty
%     of Informatics at which the document class was created.
%    \begin{macrocode}
\newif\ifthesis@palatino@
\DeclareOption{palatino}{\thesis@palatino@true}
\DeclareOption{nopalatino}{\thesis@palatino@false}
%    \end{macrocode}
%   \item\texttt{color}, \texttt{monochrome} -- Certain
%     typographical elements either are or aren't going to be
%     typeset in color, respectively. The
%     \DescribeMacro{\ifthesis@color@}|\ifthesis@color@|
%     conditional is set to either \texttt{true} or \texttt{false},
%     respectively.
%    \begin{macrocode}
\newif\ifthesis@color@
\DeclareOption{monochrome}{\thesis@color@false}
\DeclareOption{color}{\thesis@color@true}
%    \end{macrocode}
%   \item\texttt{microtype}, \texttt{nomicrotype} -- The
%     microtypographic extension of modern \TeX\ engines -- such as
%     \hologo{pdfTeX}, \Hologo{XeTeX}, or \Hologo{LuaTeX} -- is or isn't
@@ -51,6 +81,11 @@
%     \DescribeMacro{\ifthesis@microtype@}|\ifthesis@microtype@|
%     conditional is set to either \texttt{true} or \texttt{false},
%     respectively.
%    \begin{macrocode}
\newif\ifthesis@microtype@
\DeclareOption{microtype}{\thesis@microtype@true}
\DeclareOption{nomicrotype}{\thesis@microtype@false}
%    \end{macrocode}
%   \item\texttt{table}, \texttt{oldtable} -- If the
%     |\ifthesis@color@| conditional is \texttt{true}, then the
%     definitions of the \texttt{tabular}, \texttt{tabularx}, and
@@ -60,6 +95,12 @@
%     conditional is set to either \texttt{true} or \texttt{false},
%     respectively.
%
%    \begin{macrocode}
\newif\ifthesis@newtable@
\DeclareOption{table}{\thesis@newtable@true}
\DeclareOption{oldtable}{\thesis@newtable@false}
%    \end{macrocode}
%
%     The choice of the option name is deliberate -- the
%     redefinition of the table environments depends on the
%     \textsf{xcolor} package, which needs to be loaded with the
@@ -77,10 +118,18 @@
%     or isn't going to be included in the
%     \DescribeMacro{\thesis@blocks@tables}|\thesis@|^^A
%     \discretionary{}{}{}|blocks@tables| block, respectively.
%    \begin{macrocode}
\DeclareOption{nolot}{\def\thesis@blocks@lot{}}
\DeclareOption{lot}{\let\thesis@blocks@lot\listoftables}
%    \end{macrocode}
%   \item\texttt{lof}, \texttt{nolof} -- |\listoffigures| is or
%     isn't going to be included in the
%     \DescribeMacro{\thesis@blocks@tables}|\thesis@|^^A
%     \discretionary{}{}{}|blocks@tables| block, respectively.
%    \begin{macrocode}
\DeclareOption{nolof}{\def\thesis@blocks@lof{}}
\DeclareOption{lof}{\let\thesis@blocks@lof\listoffigures}
%    \end{macrocode}
%   \item\texttt{cover}, \texttt{nocover} -- The
%     \DescribeMacro{\thesis@blocks@cover}|\thesis@blocks@cover|
%     either is going to expand to either the thesis cover or
@@ -88,45 +137,24 @@
%     \DescribeMacro{\ifthesis@cover@}|\ifthesis@cover@|
%     conditional is set to \texttt{false} or \texttt{true},
%     respectively.
% \end{itemize}
%    \begin{macrocode}
\DeclareOption{10pt}{\def\thesis@ptsize{0}}
\DeclareOption{11pt}{\def\thesis@ptsize{1}}
\DeclareOption{12pt}{\def\thesis@ptsize{2}}
\newif\ifthesis@twoside@
\DeclareOption{oneside}{%
  \thesis@twoside@false\@twosidefalse\@mparswitchfalse}
\DeclareOption{twoside}{%
  \thesis@twoside@true \@twosidetrue \@mparswitchtrue}
\DeclareOption{onecolumn}{\@twocolumnfalse}
\DeclareOption{twocolumn}{\@twocolumntrue}
\DeclareOption{draft}{\setlength\overfullrule{5pt}}
\DeclareOption{final}{\setlength\overfullrule{0pt}}
\newif\ifthesis@color@
\DeclareOption{monochrome}{\thesis@color@false}
\DeclareOption{color}{\thesis@color@true}
\newif\ifthesis@microtype@
\DeclareOption{microtype}{\thesis@microtype@true}
\DeclareOption{nomicrotype}{\thesis@microtype@false}
\newif\ifthesis@palatino@
\DeclareOption{palatino}{\thesis@palatino@true}
\DeclareOption{nopalatino}{\thesis@palatino@false}
\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{}}
\DeclareOption{lof}{\let\thesis@blocks@lof\listoffigures}
\newif\ifthesis@cover@
\DeclareOption{nocover}{\thesis@cover@false}
\DeclareOption{cover}{\thesis@cover@true}
%    \end{macrocode}
%   \item\texttt{digital}, \texttt{printed} -- These macrooptions
%     set the options that are appropriate for either the printed or
%     for the digital version of the document, respectively.
%    \begin{macrocode}
\DeclareOption{digital}{\ExecuteOptions{color,cover}}
\DeclareOption{printed}{\ExecuteOptions{monochrome,nocover}}
%    \end{macrocode}
% \end{itemize}
% These are the default options:
%    \begin{macrocode}
\ExecuteOptions{12pt,twoside,final,monochrome,microtype,%
  palatino,oldtable,lot,lof,nocover}
\ProcessOptions
\ExecuteOptions{%
  printed,12pt,twoside,final,microtype,palatino,oldtable,lot,lof}
\ProcessOptions*
%    \end{macrocode}
% The file uses English locale strings within the macros.
%    \begin{macrocode}