Many changes and adding examples
- Fix use of sizes (maybe set exception for 13pt?) - Prepare keys for margins - Show example of bibfile modification on the go - Show how to use `\xkvview` to check defined keys
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -25,3 +25,5 @@
|
|||||||
*.log
|
*.log
|
||||||
*.run.xml
|
*.run.xml
|
||||||
*.tdo
|
*.tdo
|
||||||
|
*.bbl
|
||||||
|
*.blg
|
||||||
|
|||||||
@@ -2,5 +2,25 @@
|
|||||||
author = {Donald E. Knuth},
|
author = {Donald E. Knuth},
|
||||||
year = {1986},
|
year = {1986},
|
||||||
title = {The {\TeX} Book},
|
title = {The {\TeX} Book},
|
||||||
publisher = {Addison-Wesley Professional}
|
publisher = {Addison-Wesley Professional},
|
||||||
|
arXivId = {2307.11596}
|
||||||
|
},
|
||||||
|
@article{FalseGGJ,
|
||||||
|
author = {Victoria Gould and Ambroise Grau and Marianne Johnson},
|
||||||
|
journal = {Trying},
|
||||||
|
title = {The structure of {E}nd({E}nd($\mathcal{T}_n$))},
|
||||||
|
year = {2024},
|
||||||
|
month = jul,
|
||||||
|
arXivId = {2307.11596}
|
||||||
|
},
|
||||||
|
@article{GGJ23,
|
||||||
|
author = {Victoria Gould and Ambroise Grau and Marianne Johnson},
|
||||||
|
journal = {Submitted},
|
||||||
|
title = {The structure of {E}nd($\mathcal{T}_n$)},
|
||||||
|
year = {2023},
|
||||||
|
month = jul,
|
||||||
|
archiveprefix = {arXiv},
|
||||||
|
creationdate = {2023-08-05T16:13:02},
|
||||||
|
eprint = {2307.11596}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
@@ -27,7 +27,7 @@
|
|||||||
%%% ==== Begin file
|
%%% ==== Begin file
|
||||||
% FORMAT: Font size must be at least 11pt, 12pt is set as default
|
% FORMAT: Font size must be at least 11pt, 12pt is set as default
|
||||||
% TODO: Change `draft` to `final` for the published version.
|
% TODO: Change `draft` to `final` for the published version.
|
||||||
\documentclass[draft,8pt]{uoythesis}
|
\documentclass[foredge=*,margins={spine=3cm,foredge=2cm},draft,pagenb=foot,hyperoptions={colorlinks=true}]{uoythesis}
|
||||||
|
|
||||||
% Import the personal options for the class
|
% Import the personal options for the class
|
||||||
\usepackage{thesisoptions}
|
\usepackage{thesisoptions}
|
||||||
@@ -44,6 +44,9 @@
|
|||||||
% \submitdate{September 2020} % FORMAT: [month] [year].
|
% \submitdate{September 2020} % FORMAT: [month] [year].
|
||||||
% % Defaults to current month if unset.
|
% % Defaults to current month if unset.
|
||||||
|
|
||||||
|
\makeatletter
|
||||||
|
\newcommand{\displaysize}{Size: \f@size}
|
||||||
|
\makeatother
|
||||||
|
|
||||||
\begin{document}
|
\begin{document}
|
||||||
% FORMAT: All pages should be numbered continuously.
|
% FORMAT: All pages should be numbered continuously.
|
||||||
@@ -107,6 +110,15 @@ I hope this will be useful to many others.}\todo[color=red!60, inline, size=foot
|
|||||||
|
|
||||||
This section is where you thank your funding body, the department, your supervisor, your most loved campus geese, or whoever else you think is necessary and contributed to your achievement.
|
This section is where you thank your funding body, the department, your supervisor, your most loved campus geese, or whoever else you think is necessary and contributed to your achievement.
|
||||||
|
|
||||||
|
\displaysize\\
|
||||||
|
options: \makeatletter \@classoptionslist \makeatother\\
|
||||||
|
\showmargins
|
||||||
|
\uoythsetup{margins={spine=1cm}}
|
||||||
|
\showmargins
|
||||||
|
|
||||||
|
\xkvview{family=uoythesis}
|
||||||
|
\xkvview{family=uoythesis.cls}
|
||||||
|
|
||||||
\medskip
|
\medskip
|
||||||
As for myself, I want to thank Alessandro for his template which makes the perfectionist inside me happy to pick up a well done job and to augment it at my wish.
|
As for myself, I want to thank Alessandro for his template which makes the perfectionist inside me happy to pick up a well done job and to augment it at my wish.
|
||||||
|
|
||||||
@@ -129,6 +141,7 @@ This section should include a text similar to:
|
|||||||
\end{verbatim}
|
\end{verbatim}
|
||||||
If you have submitted a paper (either already published or currently under review), this should be explicitly mentioned in this section with a reference to its bibliography entry.
|
If you have submitted a paper (either already published or currently under review), this should be explicitly mentioned in this section with a reference to its bibliography entry.
|
||||||
|
|
||||||
|
This is a test \cite{FalseGGJ,GGJ23}.
|
||||||
% WARNING: Any material included in the thesis that has been presented before
|
% WARNING: Any material included in the thesis that has been presented before
|
||||||
% should be mentioned here, with full references for papers published
|
% should be mentioned here, with full references for papers published
|
||||||
% or under review.
|
% or under review.
|
||||||
|
|||||||
@@ -87,6 +87,7 @@
|
|||||||
%%% ===== Bibliography setup
|
%%% ===== Bibliography setup
|
||||||
\usepackage[eprint, % Include information for pre-prints.
|
\usepackage[eprint, % Include information for pre-prints.
|
||||||
doi=false,
|
doi=false,
|
||||||
|
eprint=true,
|
||||||
url=false,
|
url=false,
|
||||||
maxnames=10, % Truncate lists of more than 10 authors.
|
maxnames=10, % Truncate lists of more than 10 authors.
|
||||||
giveninits=true, % Only output the initials of an author's given
|
giveninits=true, % Only output the initials of an author's given
|
||||||
@@ -97,7 +98,15 @@
|
|||||||
]{biblatex}
|
]{biblatex}
|
||||||
\addbibresource{\subfix{Bibfiles/firstbib.bib}}
|
\addbibresource{\subfix{Bibfiles/firstbib.bib}}
|
||||||
|
|
||||||
|
\DeclareSourcemap{
|
||||||
|
\maps[datatype=bibtex]{
|
||||||
|
\map{
|
||||||
|
\pertype{article}
|
||||||
|
\step[fieldsource=arXivId, fieldtarget=eprint, final]
|
||||||
|
\step[fieldset=archiveprefix, fieldvalue={arXiv}]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
%%% ===== Styling for my theorems
|
%%% ===== Styling for my theorems
|
||||||
\theoremstyle{plain} % the style for theorem, propositions and lemmas
|
\theoremstyle{plain} % the style for theorem, propositions and lemmas
|
||||||
|
|||||||
@@ -20,8 +20,8 @@
|
|||||||
% https://git.tigrau.ovh/Ambroise/LaTeX-Templates/.
|
% https://git.tigrau.ovh/Ambroise/LaTeX-Templates/.
|
||||||
|
|
||||||
|
|
||||||
% Comments starting with FORMAT highlight requirements from the UoY thesis
|
% Comments starting with `FORMAT` highlight requirements from the
|
||||||
% regulations, as of November 2023.
|
% University of York thesis regulations, as of November 2023.
|
||||||
% See https://www.york.ac.uk/research/graduate-school/academic/thesis/format/#tab-2
|
% See https://www.york.ac.uk/research/graduate-school/academic/thesis/format/#tab-2
|
||||||
|
|
||||||
\NeedsTeXFormat{LaTeX2e}
|
\NeedsTeXFormat{LaTeX2e}
|
||||||
@@ -29,73 +29,134 @@
|
|||||||
|
|
||||||
\providecommand{\is@uoyth@classloaded}{true}
|
\providecommand{\is@uoyth@classloaded}{true}
|
||||||
\RequirePackage{xkeyval}
|
\RequirePackage{xkeyval}
|
||||||
|
\RequirePackage{etoolbox}
|
||||||
|
\RequirePackage{xstring}
|
||||||
|
|
||||||
|
% To be able to check which keys are set
|
||||||
|
\RequirePackage{xkvview}
|
||||||
|
\let\tablename=\undefined % reset this which is defined in memoir
|
||||||
|
|
||||||
%%% Set class options
|
%%% Set class options
|
||||||
|
\newcommand{\uoyth@tmp@classoptionslist}{}
|
||||||
|
\newcommand{\AddToClassOptionList}[1]{\csappto{uoyth@tmp@classoptionslist}{, #1}}
|
||||||
|
%\newcommand{\changeoptions}[1]{\cspreto{@classoptionslist}{#1,}}
|
||||||
\newcommand{\RaiseBooleanValueWarning}[1]{
|
\newcommand{\RaiseBooleanValueWarning}[1]{
|
||||||
\ClassError{uoythesis}{The option {#1} must be set with either true or false}{Option #1 only accepts a boolean value}
|
\ClassError{uoythesis}{The option {#1} must be set with either true or false}{Option #1 only accepts a boolean value}
|
||||||
}
|
}
|
||||||
\newcommand{\RaiseFontSizeValueWarning}[1]{
|
\newcommand{\RaiseFontSizeValueWarning}[1]{
|
||||||
\ClassWarning{uoythesis}{You gave size '#1' which is too small according to the guidelines. Automatically changing to the smallest value accepted: 11pt}
|
\ClassWarning{uoythesis}{You gave size '#1' which is too small according to the guidelines. Automatically changing to the smallest value accepted: 11pt. (Classoptions:\@classoptionslist )}
|
||||||
|
}
|
||||||
|
\newcommand{\uoyth@fontsize}{12pt}
|
||||||
|
\newcommand{\uoyth@SetFontSize}[1]{
|
||||||
|
\AddToClassOptionList{#1}
|
||||||
|
\renewcommand{\uoyth@fontsize}{#1}
|
||||||
|
\PassOptionsToClass{#1}{memoir}
|
||||||
}
|
}
|
||||||
|
|
||||||
% options passed onto memoir: draft, final, oneside, twoside
|
% options passed onto memoir: draft, final, oneside, twoside
|
||||||
|
|
||||||
\newif\ifuoyth@draft
|
\newif\ifuoyth@draft
|
||||||
\uoyth@draftfalse
|
\uoyth@draftfalse
|
||||||
\DeclareOptionX{draft}{\uoyth@drafttrue \PassOptionsToClass{draft}{memoir}}
|
\DeclareOptionX{draft}{\uoyth@drafttrue \PassOptionsToClass{draft}{memoir}}
|
||||||
|
\DeclareOptionX{final}{\uoyth@draftfalse \PassOptionsToClass{final}{memoir}}
|
||||||
\newif\ifuoyth@onesided
|
\newif\ifuoyth@onesided
|
||||||
\uoyth@onesidedfalse
|
\uoyth@onesidedfalse
|
||||||
\PassOptionsToClass{twoside}{memoir}
|
|
||||||
\DeclareOptionX{oneside}{\uoyth@onesidedtrue \PassOptionsToClass{oneside}{memoir}}
|
\DeclareOptionX{oneside}{\uoyth@onesidedtrue \PassOptionsToClass{oneside}{memoir}}
|
||||||
|
\DeclareOptionX{twoside}{\uoyth@onesidedfalse \PassOptionsToClass{twoside}{memoir}}
|
||||||
|
|
||||||
% new available options: pagenbhead, pagenbfoot, noxr, nohyperref, hyperfinal, margins
|
% new available options: pagenb (head or foot), noxr, nohyperref, hyperfinal, margins
|
||||||
\newif\ifuoyth@pgnbhead
|
\newif\ifuoyth@pgnbhead
|
||||||
\uoyth@pgnbheadtrue
|
\uoyth@pgnbheadtrue
|
||||||
\define@choicekey*{uoythesis.cls}{pagenb}[\userval\choiceval]{head,foot}[head]{
|
\define@choicekey*+{uoythesis.cls}{pagenb}[\userval\choiceval]{head,foot}[head]{
|
||||||
\ifcase\choiceval\relax
|
\ifcase\choiceval\relax
|
||||||
\uoyth@pgnbheadtrue
|
\uoyth@pgnbheadtrue
|
||||||
\or
|
\or
|
||||||
\uoyth@pgnbheadfalse
|
\uoyth@pgnbheadfalse
|
||||||
\fi
|
\fi
|
||||||
|
}{
|
||||||
|
\ClassWarning{uoythesis}{The \texttt{pagenb} option must be set to either `head' or `foot', but you gave `#1'}
|
||||||
}
|
}
|
||||||
\ExecuteOptionsX{pagenb=head}
|
\ExecuteOptionsX{pagenb=head}
|
||||||
\define@boolkey+{uoythesis.cls}[uoyth@]{noxr}[true]{}{\RaiseBooleanValueWarning{noxr}}
|
\define@boolkey+{uoythesis.cls}[uoyth@]{noxr}[true]{}{\RaiseBooleanValueWarning{noxr}}
|
||||||
\ExecuteOptionsX{noxr=false}
|
\ExecuteOptionsX{noxr=false}
|
||||||
\define@boolkey+{uoythesis.cls}[uoyth@]{nohyperref}[true]{}{\RaiseBooleanValueWarning{nohyperref}}
|
\define@boolkey+{uoythesis.cls}[uoyth@]{nohyperref}[true]{}{\RaiseBooleanValueWarning{nohyperref}}
|
||||||
\ExecuteOptionsX{nohyperref=false}
|
\ExecuteOptionsX{nohyperref=false}
|
||||||
\define@boolkey+{uoythesis.cls}[uoyth@]{hyperfinal}[true]{}{\RaiseBooleanValueWarning{nohyperref}}
|
\define@boolkey+{uoythesis.cls}[uoyth@]{hyperfinal}[true]{}{\RaiseBooleanValueWarning{hyperfinal}}
|
||||||
\ExecuteOptionsX{hyperfinal}
|
\ExecuteOptionsX{hyperfinal}
|
||||||
\DeclareOptionX{hyperoptions}{
|
\DeclareOptionX{hyperoptions}{
|
||||||
\ClassInfo{uoythesis.cls}{Passing options '#1' to package hyperref}
|
\ClassInfo{uoythesis}{Passing options '#1' to package hyperref}
|
||||||
\PassOptionsToPackage{#1}{hyperref}
|
\PassOptionsToPackage{#1}{hyperref}
|
||||||
}
|
}
|
||||||
%\ExecuteOptionsX{hyperoptions={}}
|
\ExecuteOptionsX{hyperoptions={}}
|
||||||
|
|
||||||
% FORMAT: Font size must be at least 11pt, with 12pt recommended
|
\define@cmdkey{uoythesis.cls}[uoyth@]{spine}{}
|
||||||
\newcommand{\uoyth@fontsize}{12pt}
|
\define@cmdkey{uoythesis.cls}[uoyth@]{foredge}{}
|
||||||
\newcommand{\uoyth@setsmallfontsize}{
|
\define@cmdkey{uoythesis.cls}[uoyth@]{hratio}{}
|
||||||
\renewcommand{\uoyth@fontsize}{11pt}
|
\define@cmdkey{uoythesis.cls}[uoyth@]{top}{}
|
||||||
\PassOptionsToClass{11pt}{memoir}
|
\define@cmdkey{uoythesis.cls}[uoyth@]{bottom}{}
|
||||||
|
\define@cmdkey{uoythesis.cls}[uoyth@]{vratio}{}
|
||||||
|
\define@cmdkey{uoythesis.cls}[uoyth@]{margins}{\setkeys{uoythesis.cls}{#1}}
|
||||||
|
|
||||||
|
\newcommand{\showmargins}{
|
||||||
|
all margins=\key@ifundefined{uoythesis.cls}{margins}{undef}{`\uoyth@margins '};
|
||||||
|
spine=\key@ifundefined{uoythesis.cls}{spine}{undef}{`\uoyth@spine '};
|
||||||
|
foredge=\key@ifundefined{uoythesis.cls}{foredge}{undef}{\@ifundefined{uoyth@foredge}{unset}{`\uoyth@foredge'}}
|
||||||
}
|
}
|
||||||
\DeclareOptionX{8pt}{\uoyth@setsmallfontsize \RaiseFontSizeValueWarning{\CurrentOption}}
|
\newcommand{\uoythsetup}[1]{\setkeys{uoythesis.cls}{#1}}
|
||||||
\DeclareOptionX{9pt}{\uoyth@setsmallfontsize \RaiseFontSizeValueWarning{\CurrentOption}}
|
% FORMAT: Font size must be at least 11pt, so we disable small values
|
||||||
\DeclareOptionX{10pt}{\uoyth@setsmallfontsize \RaiseFontSizeValueWarning{\CurrentOption}}
|
%\DeclareOptionX{8pt}{
|
||||||
|
% \RaiseFontSizeValueWarning{\CurrentOption}
|
||||||
|
% \changeoptions{11pt}
|
||||||
|
% \ChangeSizeToSmallest
|
||||||
|
% \ClassWarning{uoythesis}{Options passed are KV:\XKV@classoptionslist; and normal:\@classoptionslist}
|
||||||
|
%}
|
||||||
|
%\DeclareOptionX{9pt}{
|
||||||
|
% \RaiseFontSizeValueWarning{\CurrentOption} \ChangeSizeToSmallest
|
||||||
|
%}
|
||||||
|
%\DeclareOptionX{10pt}{
|
||||||
|
% \RaiseFontSizeValueWarning{\CurrentOption} \ChangeSizeToSmallest
|
||||||
|
%}
|
||||||
|
%\DeclareOptionX{13pt}{
|
||||||
|
% \ClassInfo{uoythesis}{Font size 13pt not available, downsizing to 12pt}
|
||||||
|
% \uoyth@SetFontSize{12pt}
|
||||||
|
%}
|
||||||
|
|
||||||
% Pass all remaining unknown options to memoir to deal with them
|
% Pass all remaining unknown options to memoir to deal with them
|
||||||
\DeclareOptionX*{%
|
\DeclareOptionX*{%
|
||||||
|
\IfEndWith{\CurrentOption}{pt}{ % this is possibly a font size
|
||||||
|
\StrGobbleRight{\CurrentOption}{2}[\val]
|
||||||
|
\IfInteger{\val}{ % as a font size verifies if at least 11
|
||||||
|
\ifnum\val<12 % if too small, set to 11 and raise warning
|
||||||
|
\RaiseFontSizeValueWarning{\CurrentOption}
|
||||||
|
\uoyth@SetFontSize{11pt}
|
||||||
|
\else
|
||||||
|
\uoyth@SetFontSize{\CurrentOption}
|
||||||
|
\fi
|
||||||
|
}{
|
||||||
\PassOptionsToClass{\CurrentOption}{memoir}
|
\PassOptionsToClass{\CurrentOption}{memoir}
|
||||||
}
|
}
|
||||||
|
}{
|
||||||
% FORMAT: Avoid blank pages.
|
\PassOptionsToClass{\CurrentOption}{memoir}
|
||||||
\PassOptionsToClass{openany}{memoir}
|
}
|
||||||
|
}
|
||||||
% FORMAT: The document must be on A4 paper.
|
|
||||||
\PassOptionsToClass{a4paper}{memoir}
|
|
||||||
|
|
||||||
\ProcessOptionsX
|
\ProcessOptionsX
|
||||||
\LoadClass[\uoyth@fontsize]{memoir}
|
\ifuoyth@draft
|
||||||
|
\AddToClassOptionList{draft}
|
||||||
|
\else
|
||||||
|
\AddToClassOptionList{final}
|
||||||
|
\fi
|
||||||
|
\ifuoyth@onesided
|
||||||
|
\AddToClassOptionList{oneside}
|
||||||
|
\else
|
||||||
|
\AddToClassOptionList{twoside}
|
||||||
|
\fi
|
||||||
|
|
||||||
\disable@keys{uoythesis.cls}{draft,oneside,8pt,9pt,10pt}
|
\renewcommand{\@classoptionslist}{\uoyth@tmp@classoptionslist}
|
||||||
|
% FORMAT: Document must be on A4 paper and avoid blank pages when starting new chapters
|
||||||
|
\LoadClass[a4paper,openany,\uoyth@fontsize]{memoir}
|
||||||
|
|
||||||
|
\disable@keys{uoythesis.cls}{draft,oneside}
|
||||||
|
|
||||||
|
|
||||||
\ifuoyth@hyperfinal
|
\ifuoyth@hyperfinal
|
||||||
|
|||||||
Reference in New Issue
Block a user