%% thesisoptions.sty
%% Copyright 2022 A. Grau
%
% This work may be distributed and/or modified under the conditions of the LaTeX
% Project Public License, either version 1.3 of this license or (at your option)
% any later version, with the exception that distribution of Derived Work is not
% subject to the requirements of section 6.2.
% The latest version of this license is in
%   http://www.latex-project.org/lppl.txt
% and version 1.3 or later is part of all distributions of LaTeX version
% 2005/12/01 or later.
%
% Current version: v1.0
% Changelog:
% 2022/07/08: Creation of this helper package for the yorkthesis.cls class
%
% This work has the LPPL maintenance status `maintained`.
%
% The Current Maintainer of this work is A. Grau.
%
% This work consists of all the files listed in the README.md,
% and provides a copy of the original hosted on
% https://git.tigrau.ovh/Ambroise/LaTeX-Templates/.

\ProvidesPackage{thesisoptions}[2022/07/08 v1.0 Options for the York Thesis class]

%%% ==== Fonts
\usepackage[utf8]{inputenx}  % Allow unicode input
\usepackage[T1]{fontenc}
\usepackage{lmodern}         % A nice scalable font based on Computer Modern.
                             % For more options, see e.g.
                             % https://tex.stackexchange.com/a/59706/27664


%%% ==== Margins
% Margins of the document can be set using some helper macros defined in the class file.
% The block size of the document will adjust relatively to the values of the margin defined.
% Horizontal margins are set relatively to the spine edge of the page, while vertical ones
% are relatively to the upper edge.
% Defaults: The defaults margins are 3cm on spine and foredge and 4cm on upper and lower edges.
% Commands: The available commands are the following:
%           \horizontalmarginsvalue, \horizontalmarginsratio, \verticalmarginsvalue and
%           \verticalmarginsratio which all takes one required parameter and one optional. It
%           is expected that at most one of the horizontal commands and at most one of the
%           vertical commands is called (see limitations below).
% Arguments: For the \horizontal* commands the required one is the spine margin with its unit,
%           and the upper edge margin with its unit for the \vertical* commands.
%           For the \*marginsvalue commands the optional argument is the opposite edge margin
%           value with its unit (with default the same value as the required argument), and for
%           the \*marginsratio it corresponds to a ratio between the margin set for the reference
%           and the margin obtained for the opposite side (with default value 1, meaning that
%           margin values will be the same), under the rule: oppside = ratio * refside.
% Limitations: Since the horizontal ratio cannot be set if the margins on both the spine and the
%            foredge sides are set, this ratio is discarded. This means that calling both the
%            \horizontalmarginsvalue and \horizontalmarginsratio commands will set the spine margin
%            to the value set by the last of the two commands called, and the foredge margin will
%            set by the value found in \horizontalmarginsvalue (with spine value if not explicitely
%            given). Similarly for vertical ratio.
% Hack it: Check the cls for the definitions of these macros and use the memoir accordingly.
% Examples:
%   \horizontalmarginsvalue{3cm} -> sets both spine and foredge margin to 3cm (current default)
%   \horizontalmarginsvalue[2cm]{3cm} -> sets spine to 3cm and foredge to 2cm
%   \horizontalmarginsratio[0.8]{40mm} -> sets spine to 4cm and foredge to 3.2cm (4*0.8)
\horizontalmarginsvalue{3cm}
\verticalmarginsvalue{4cm}

%%% ==== Styling chapters/sections
% See the manual of the `memoir` class for more predefined styles:
% - Appendix B for chapter styles (or for more examples consult
%   https://ctan.uib.no/info/latex-samples/MemoirChapStyles/MemoirChapStyles.pdf);
% - Section 6.9 for lower level heading styles.
% To learn how to define your own, see Chapter 6.
% The order of call between \headstyles and \chapterstyle is important since
% the chapter header is defined in both of these, but the former defines
% the other sections style headers, so calling \headstyle second would
% override the parameters of \chapterstyle.

% As a baseline choice, I use dowding for the [sub]sections headers (defined
% in memoir.dtx in `\makeheadstyles{dowding}`) and then I set the chapter style to
% dash (defined in `\makechapterstyle{dash}`)
\headstyles{dowding}
\chapterstyle{dash}

% Personal styling choice, modifying the look and placement of section headers
% (using the definitions in file for the base code but suppressing \centering
% to manually set the indentation)
\setsecheadstyle{\normalfont\large\MakeTextUppercase} % large CAPS
\setsubsecheadstyle{\normalfont\scshape} % small caps
\setsubsecindent{1em}
\setsubsubsecheadstyle{\normalfont\normalsize\itshape} % italicised for subsubsection
\setsubsubsecindent{2em}
\setparaheadstyle{\normalfont\normalsize\slshape} % slanted for paragraphs
% Making the title and number of the chapter bigger and bold
\renewcommand*{\chapnumfont}{\normalfont\LARGE\bfseries}
\renewcommand*{\chaptitlefont}{\normalfont\LARGE\bfseries}

%%% ==== Styling lists
% Uncomment one of the options below to reduce the spacing between list items.
% See Section 8.6 of the manual of the `memoir` class.
\firmlists   % Slightly less space than the default
% \tightlists  % No extra space

%%% ==== Differences between draft and final version
\ifdraftdoc
  %% Extra options for draft versions only
  % NOTE: `draftwatermark` needs a scalable font.
  \usepackage[firstpageonly]{draftwatermark}  % Watermark on the front page
\else
  %% Extra options for final versions only
  \usepackage{microtype}                      % Enable microtypographical adjustments
\fi






%%%% ==== DEBUG
% If you want the version of the packages you use appear when they load in the log file, uncomment the following line:
\listfiles
