Created an IS option to do the right thing with languages and babel
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
\documentclass[12pt,a4paper,titlepage]{memoir}
|
\documentclass[12pt,a4paper,titlepage]{memoir}
|
||||||
|
\usepackage[IS]{rubook}
|
||||||
\usepackage{ruthesis}
|
\usepackage{ruthesis}
|
||||||
|
|
||||||
\title{M.Sc. (and BSc.) Thesis Template for \theInstitution{}}
|
\title{M.Sc. (and BSc.) Thesis Template for \theInstitution{}}
|
||||||
@@ -28,9 +29,6 @@
|
|||||||
%%% Formatting code inclusion and snippets
|
%%% Formatting code inclusion and snippets
|
||||||
%% "final" option to force it to display code
|
%% "final" option to force it to display code
|
||||||
|
|
||||||
\usepackage[english]{babel}
|
|
||||||
%%% Biber will change internal macros to follow the language you choose
|
|
||||||
%%% options: english, icelandic
|
|
||||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
|
|
||||||
\begin{document}
|
\begin{document}
|
||||||
|
|||||||
@@ -28,7 +28,6 @@
|
|||||||
\makeindex{}
|
\makeindex{}
|
||||||
\indexintoc{}
|
\indexintoc{}
|
||||||
|
|
||||||
|
|
||||||
%%%%%% Useful Packages %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
%%%%%% Useful Packages %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
\usepackage{lipsum}%provides us with text for testing
|
\usepackage{lipsum}%provides us with text for testing
|
||||||
%% usage: \lipsum[STARTNUM-ENDNUM]
|
%% usage: \lipsum[STARTNUM-ENDNUM]
|
||||||
@@ -41,13 +40,9 @@
|
|||||||
%%% Formatting code inclusion and snippets
|
%%% Formatting code inclusion and snippets
|
||||||
%% "final" option to force it to display code
|
%% "final" option to force it to display code
|
||||||
|
|
||||||
\usepackage[english]{babel}
|
|
||||||
%%% Biber will change internal macros to follow the language you choose
|
|
||||||
%%% options: english, icelandic
|
|
||||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
|
|
||||||
\begin{document}
|
\begin{document}
|
||||||
|
|
||||||
\maketitle
|
\maketitle
|
||||||
\copyrightpage{}
|
\copyrightpage{}
|
||||||
\signaturepage{}
|
\signaturepage{}
|
||||||
|
|||||||
45
rubook.sty
45
rubook.sty
@@ -42,8 +42,10 @@
|
|||||||
\newbool{debug}
|
\newbool{debug}
|
||||||
\newbool{draftbool}
|
\newbool{draftbool}
|
||||||
\newbool{online}
|
\newbool{online}
|
||||||
|
\newbool{IS}
|
||||||
\newbool{proof}
|
\newbool{proof}
|
||||||
|
|
||||||
|
|
||||||
%% ---------------- Declaration of Class Options--------------------
|
%% ---------------- Declaration of Class Options--------------------
|
||||||
%% Remember that we have \AtEndOfClass{},\AtEndOfPackage{}
|
%% Remember that we have \AtEndOfClass{},\AtEndOfPackage{}
|
||||||
%% \AtBeginDocument{}, \AtEndDocument{}
|
%% \AtBeginDocument{}, \AtEndDocument{}
|
||||||
@@ -55,26 +57,28 @@
|
|||||||
%% \PackageError{class-name}{error-text}{help-text}
|
%% \PackageError{class-name}{error-text}{help-text}
|
||||||
|
|
||||||
% Generalized settings
|
% Generalized settings
|
||||||
\DeclareOption{debug}{%
|
\DeclareOption{debug}{%
|
||||||
\booltrue{debug}
|
\booltrue{debug}
|
||||||
\typeout{rubook option: debug}%
|
\typeout{rubook option: debug}%
|
||||||
\typeout{DEBUG MODE ENABLED! PREPARE FOR VERBOSITY!}}
|
\typeout{DEBUG MODE ENABLED! PREPARE FOR VERBOSITY!}}
|
||||||
|
|
||||||
\DeclareOption{draft}{\booltrue{draftbool}}
|
\DeclareOption{draft}{\booltrue{draftbool}}
|
||||||
|
|
||||||
|
\DeclareOption{IS}{\booltrue{IS}}
|
||||||
|
|
||||||
\DeclareOption{online}{
|
\DeclareOption{online}{
|
||||||
\setbool{online}{true}
|
\setbool{online}{true}
|
||||||
\typeout{rubook option: online}
|
\typeout{rubook option: online}
|
||||||
}
|
}
|
||||||
|
|
||||||
\DeclareOption{forcegraphics}{%
|
\DeclareOption{forcegraphics}{%
|
||||||
\PassOptionsToPackage{final}{graphicx}
|
\PassOptionsToPackage{final}{graphicx}
|
||||||
\PassOptionsToPackage{final}{pdfpages}
|
\PassOptionsToPackage{final}{pdfpages}
|
||||||
\PassOptionsToPackage{final}{hyperref}
|
\PassOptionsToPackage{final}{hyperref}
|
||||||
%% add any other elements that should be included in draft
|
%% add any other elements that should be included in draft
|
||||||
\finalifforcegraphics{graphicx}%We have to catch graphicx early
|
\finalifforcegraphics{graphicx}%We have to catch graphicx early
|
||||||
\setbool{forcegraphics}{true}\typeout{rubook option: forcegraphics}%
|
\setbool{forcegraphics}{true}\typeout{rubook option: forcegraphics}%
|
||||||
}%
|
}%
|
||||||
|
|
||||||
%%% Memoir test: Memoir Manual 21.2 p.367
|
%%% Memoir test: Memoir Manual 21.2 p.367
|
||||||
%% Only works with the memoir class!!!!!!!!!!!!!!!
|
%% Only works with the memoir class!!!!!!!!!!!!!!!
|
||||||
@@ -105,6 +109,11 @@
|
|||||||
\RequirePackage[utf8]{inputenc}
|
\RequirePackage[utf8]{inputenc}
|
||||||
% allows UTF encoding, needed for Icelandic and other accented characters
|
% allows UTF encoding, needed for Icelandic and other accented characters
|
||||||
|
|
||||||
|
\ifbool{IS}
|
||||||
|
{\RequirePackage[english,icelandic]{babel}}%%Icelandic main language
|
||||||
|
{\RequirePackage[icelandic,english]{babel}}%%English main language
|
||||||
|
|
||||||
|
|
||||||
% \RequirePackage[autostyle,strict]{csquotes}
|
% \RequirePackage[autostyle,strict]{csquotes}
|
||||||
%% http://mirrors.concertpass.com/tex-archive/macros/latex/contrib/csquotes/csquotes.pdf
|
%% http://mirrors.concertpass.com/tex-archive/macros/latex/contrib/csquotes/csquotes.pdf
|
||||||
%% You invoke with \enquote{} and \blockquote{}
|
%% You invoke with \enquote{} and \blockquote{}
|
||||||
@@ -153,10 +162,6 @@
|
|||||||
%% WARNING: If this breaks you will get very very weird errors
|
%% WARNING: If this breaks you will get very very weird errors
|
||||||
|
|
||||||
%% ---------------- Miscellaneous Packages ----------------------
|
%% ---------------- Miscellaneous Packages ----------------------
|
||||||
\RequirePackage{lipsum}
|
|
||||||
% generates some test text for seeing how pages lay out
|
|
||||||
%% usage: \lipsum[STARTNUM-ENDNUM]
|
|
||||||
|
|
||||||
\RequirePackage{booktabs}
|
\RequirePackage{booktabs}
|
||||||
%% Format tables properly as in a book
|
%% Format tables properly as in a book
|
||||||
%% \toprule,\midrule,\bottomrule
|
%% \toprule,\midrule,\bottomrule
|
||||||
|
|||||||
399
ruthesis.sty
399
ruthesis.sty
@@ -18,10 +18,395 @@
|
|||||||
\NeedsTeXFormat{LaTeX2e}
|
\NeedsTeXFormat{LaTeX2e}
|
||||||
\typeout{Thesis Class for Reykjavik University \fileversion@ruthesis <\filedate@ruthesis>, by \fileauthor@ruthesis}
|
\typeout{Thesis Class for Reykjavik University \fileversion@ruthesis <\filedate@ruthesis>, by \fileauthor@ruthesis}
|
||||||
|
|
||||||
%% ---------------- Execution of Options -----------------------------
|
%% ---------------- Critical packages -----------------------------
|
||||||
%\ProcessOptions\relax% this stops searching for a * in \ProcessOtions*
|
% Toolbox of many many macros that make a lot of latex code smarter and more robust
|
||||||
%\LoadClassWithOptions{rubook}% our parent class.
|
% Incl: \newbool, \ifbool, etc.
|
||||||
\RequirePackage{rubook}%
|
% http://texdoc.net/texmf-dist/doc/latex/etoolbox/etoolbox.pdf
|
||||||
|
\RequirePackage{etoolbox}
|
||||||
|
|
||||||
|
%% ---------------- Boolean switches -----------------------------
|
||||||
|
%% Booleans make it easy to enable and disable parts of the template
|
||||||
|
\newbool{debug}
|
||||||
|
\newbool{draftbool}
|
||||||
|
\newbool{online}
|
||||||
|
\newbool{IS}
|
||||||
|
\newbool{proof}
|
||||||
|
|
||||||
|
|
||||||
|
%% ---------------- Declaration of Class Options--------------------
|
||||||
|
%% Remember that we have \AtEndOfClass{},\AtEndOfPackage{}
|
||||||
|
%% \AtBeginDocument{}, \AtEndDocument{}
|
||||||
|
%% If you want execution conditional on file existence
|
||||||
|
%% \IfFileExists{filename}{true}{false}
|
||||||
|
%% \InputIfFileExists{filename}{true}{false}
|
||||||
|
%% For error reporting
|
||||||
|
%% \ClassError{class-name}{error-text}{help-text}
|
||||||
|
%% \PackageError{class-name}{error-text}{help-text}
|
||||||
|
|
||||||
|
% Generalized settings
|
||||||
|
\DeclareOption{debug}{%
|
||||||
|
\booltrue{debug}
|
||||||
|
\typeout{rubook option: debug}%
|
||||||
|
\typeout{DEBUG MODE ENABLED! PREPARE FOR VERBOSITY!}}
|
||||||
|
|
||||||
|
\DeclareOption{draft}{\booltrue{draftbool}}
|
||||||
|
|
||||||
|
\DeclareOption{IS}{\booltrue{IS}}
|
||||||
|
|
||||||
|
\DeclareOption{online}{
|
||||||
|
\setbool{online}{true}
|
||||||
|
\typeout{rubook option: online}
|
||||||
|
}
|
||||||
|
|
||||||
|
\DeclareOption{forcegraphics}{%
|
||||||
|
\PassOptionsToPackage{final}{graphicx}
|
||||||
|
\PassOptionsToPackage{final}{pdfpages}
|
||||||
|
\PassOptionsToPackage{final}{hyperref}
|
||||||
|
%% add any other elements that should be included in draft
|
||||||
|
\finalifforcegraphics{graphicx}%We have to catch graphicx early
|
||||||
|
\setbool{forcegraphics}{true}\typeout{rubook option: forcegraphics}%
|
||||||
|
}%
|
||||||
|
|
||||||
|
%%% Memoir test: Memoir Manual 21.2 p.367
|
||||||
|
%% Only works with the memoir class!!!!!!!!!!!!!!!
|
||||||
|
%% Only works with the memoir class!!!!!!!!!!!!!!!
|
||||||
|
\@ifclassloaded{memoir}{\let\endruthesis\relax}{\let\endruthesis\endinput
|
||||||
|
\PackageError{ruthesis}{The ruthesis package only works with the memoir class}%
|
||||||
|
{\@ehd}}
|
||||||
|
\endruthesis
|
||||||
|
%%---------------- Execution of Options -----------------------------
|
||||||
|
\ProcessOptions\relax% this stops searching for a * in \ProcessOptions*
|
||||||
|
%% Read page 20 of http://latex-project.org/guides/clsguide.pdf
|
||||||
|
%% carefully before modifying any of the execution and previous section.
|
||||||
|
%% ---------------- Package Loading -----------------------------
|
||||||
|
|
||||||
|
\ifbool{online}
|
||||||
|
{\ExecuteOptions{openany}}%% Online format does not have right-vs-left
|
||||||
|
{\ExecuteOptions{openright}}%% All of our printed formats are going to be opening to the right
|
||||||
|
|
||||||
|
%% Now to print the status of all the booleans if debug boolean is set
|
||||||
|
%% Any boolean testing must be after the \LoadClass otherwise the Option execution
|
||||||
|
%% has not completed.
|
||||||
|
\ifbool{debug}{%
|
||||||
|
\ifbool{online}{\typeout{rubook bool: online}}{}
|
||||||
|
\ifbool{forcegraphics}{\typeout{rubook bool: forcegraphics}}{}
|
||||||
|
\ifbool{proof}{\typeout{rubook bool: proof}}{}
|
||||||
|
\ifbool{debug}{\typeout{rubook bool: debug}}{}
|
||||||
|
}{}
|
||||||
|
|
||||||
|
%% ---------------- Internationalization -----------------------------
|
||||||
|
%% Unicode setup
|
||||||
|
\RequirePackage[T1]{fontenc}
|
||||||
|
\RequirePackage[utf8]{inputenc}
|
||||||
|
% allows UTF encoding, needed for Icelandic and other accented characters
|
||||||
|
|
||||||
|
\ifbool{IS}
|
||||||
|
{\RequirePackage[english,icelandic]{babel}}%%Icelandic main language
|
||||||
|
{\RequirePackage[icelandic,english]{babel}}%%English main language
|
||||||
|
|
||||||
|
|
||||||
|
% \RequirePackage[autostyle,strict]{csquotes}
|
||||||
|
%% http://mirrors.concertpass.com/tex-archive/macros/latex/contrib/csquotes/csquotes.pdf
|
||||||
|
%% You invoke with \enquote{} and \blockquote{}
|
||||||
|
%% csquotes must be loaded before babel for AUCTeX
|
||||||
|
%% autostyle: update style as language changes in document
|
||||||
|
%% strict: any warnings become errors
|
||||||
|
%% Don't forget to load Babel!
|
||||||
|
|
||||||
|
%% Babel allows various automatic text to be in selected languages
|
||||||
|
%% But to use the options, you have to always load it, even for english
|
||||||
|
%% The languages must be specified in order.
|
||||||
|
|
||||||
|
%% ---------------- Graphics ------------------------------
|
||||||
|
\RequirePackage{graphicx}
|
||||||
|
%% GraphicsX converts and includes graphics intelligently
|
||||||
|
|
||||||
|
\graphicspath{{graphics/}{Graphics/}{./}}
|
||||||
|
%% This is a list of folders to search for graphics files to include
|
||||||
|
%% Each path should be in a {}.
|
||||||
|
%% Make sure that the upper/lowercase of the letters matches the folder or
|
||||||
|
%% you may have weird problems with partners using OSX or Linux.
|
||||||
|
%% Note that you don't have to put the folder where the .tex file is, it is
|
||||||
|
%% included automatically, though it is bad practice to put your
|
||||||
|
%% graphics there
|
||||||
|
%% LaTeX will search from left to right in the list, so you can put "cropped" versions
|
||||||
|
%% in the first directory and it will grab them first. e.g.
|
||||||
|
%\graphicspath{{graphics-cropped/}{graphics/}{Graphics/}{./}}
|
||||||
|
%%
|
||||||
|
%% If you put a // at the end of the path, it will recursively search for graphics
|
||||||
|
%% files on unix-based (OSX, Linux, etc.) platforms.
|
||||||
|
|
||||||
|
|
||||||
|
%% ---------------- URLs and Paths -----------------------------
|
||||||
|
\PassOptionsToPackage{obeyspaces,spaces,hyphens,allowmove}{url}
|
||||||
|
\RequirePackage{url}
|
||||||
|
%% The url package typesets url's and unix file paths nicely when they
|
||||||
|
%% become long. \url{}
|
||||||
|
%% Also defines \path{} which works with filepaths including windows paths.
|
||||||
|
%% Watch out that you leave a space after a last \ e.g. \path{C:\ }
|
||||||
|
%% You need another verbatim environment to make those typeset properly.
|
||||||
|
%% Also defines the \path{} command for paths
|
||||||
|
%% Option: obeyspace to deal with spaces in a path/url
|
||||||
|
%% Option: spaces to do linebreaks at the spaces.
|
||||||
|
%% Option: hyphens to do linebreaks at hyphens.
|
||||||
|
%% Option: allowmove makes URLs not-fragile, so they can go in things that move
|
||||||
|
%% WARNING: If this breaks you will get very very weird errors
|
||||||
|
|
||||||
|
%% ---------------- Miscellaneous Packages ----------------------
|
||||||
|
\RequirePackage{booktabs}
|
||||||
|
%% Format tables properly as in a book
|
||||||
|
%% \toprule,\midrule,\bottomrule
|
||||||
|
|
||||||
|
%% ---------------- Fonts -----------------------------
|
||||||
|
%%% For help, read http://latex-project.org/guides/fntguide.pdf
|
||||||
|
%%
|
||||||
|
% save the current font size
|
||||||
|
\newlength{\normaltextsize}
|
||||||
|
\setlength{\normaltextsize}{\f@size pt}
|
||||||
|
|
||||||
|
%% Font guide at
|
||||||
|
%% http://latex-project.org/guides/fntguide.pdf
|
||||||
|
|
||||||
|
% set the font defaults (if they need to be further adjusted)
|
||||||
|
%\renewcommand{\encodingdefault}{t1}
|
||||||
|
|
||||||
|
%\renewcommand{\rmdefault}{ptm} % adobe times
|
||||||
|
%\renewcommand{\sfdefault}{phv} % adobe helvetica
|
||||||
|
%\renewcommand{\ttdefault}{pcr} % adobe courier
|
||||||
|
%% cmr : computer modern roman
|
||||||
|
%% cmss : computer modern sans oblique
|
||||||
|
%% cmm : computer modern math
|
||||||
|
%% ptm : (postscript) Adobe Times
|
||||||
|
%% phv : (postscript) Adobe Helvetica
|
||||||
|
%% pcr : (postscript) Adobe Courier
|
||||||
|
|
||||||
|
%\renewcommand{\familydefault}{\sfdefault} % switch to \sfdefault if you want to force sanserif
|
||||||
|
%% \familydefault should be one of the short letter codes such as "lm" or "ptm"
|
||||||
|
%\renewcommand{\familydefault}{\rmdefault}
|
||||||
|
|
||||||
|
%\renewcommand{\seriesdefault}{m}
|
||||||
|
%% m : medium
|
||||||
|
%% b : bold
|
||||||
|
%% bx : bold extended
|
||||||
|
%% sb : semi bold
|
||||||
|
%% c : condensed
|
||||||
|
|
||||||
|
%\renewcommand{\shapedefault}{n}
|
||||||
|
%% n : upshape (normal)
|
||||||
|
%% it : italics
|
||||||
|
%% sl : slanted
|
||||||
|
%% sc : small caps
|
||||||
|
|
||||||
|
%%\fontsize{12pt}{14pt} % args: fontsize, baselineskip (font+space)
|
||||||
|
%% normal sequence of increasing sizes: 5,7,8,9,10,12,14.4,17.28,20.74,24.88
|
||||||
|
|
||||||
|
%% Specific fonts
|
||||||
|
%% Note that you can leave off elements and it will use the last value set (or default??)
|
||||||
|
% \def\myfont{\fontencoding{T1}\fontfamily{lm}\fontseries{m}\fontshape{n}\fontsize{14pt}{16pt}\selectfont}
|
||||||
|
% \fontsize{SIZE}{BASELINESKIP}
|
||||||
|
|
||||||
|
\def\titletitlefont{\fontseries{b}\fontsize{17pt}{20pt}\selectfont}
|
||||||
|
\def\titletextfont{\fontsize{14pt}{16pt}\selectfont}
|
||||||
|
\def\titleinfofont{\fontsize{12}{14}\selectfont}
|
||||||
|
\def\sigtextfont{\fontsize{12pt}{14pt}\selectfont}
|
||||||
|
\def\warningfont{\fontseries{b}\fontsize{24pt}{28pt}\selectfont}
|
||||||
|
|
||||||
|
%%%%%%%%%%%%%%%%% Colors %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%5
|
||||||
|
%% Setting colors in text
|
||||||
|
%% Usage:
|
||||||
|
%% \textcolor{rured}{Some text.}
|
||||||
|
%% {\color{rured}Some text.}
|
||||||
|
\RequirePackage{xcolor}
|
||||||
|
\definecolor{rugray}{rgb}{0.2,0.2,0.2}
|
||||||
|
\definecolor{rured}{rgb}{0.84,0.10,0.13}
|
||||||
|
|
||||||
|
%% ---------------- Main Code -----------------------------
|
||||||
|
%% Remember that we can declare commands (to make fragile things safe)
|
||||||
|
%% The * form is for ``short'' commands, not longer than a paragraph
|
||||||
|
%% \DeclareRobustCommand{cmd}[num][default]{definition}
|
||||||
|
%% \DeclareRobustCommand*{cmd}[num][default]{definition}
|
||||||
|
%% For checking if commands are redefined
|
||||||
|
%% \CheckCommand{cmd}[num][default]{definition}
|
||||||
|
|
||||||
|
|
||||||
|
%% Spacing modes from the memoir class
|
||||||
|
%\SingleSpacing{} % single spacing
|
||||||
|
%\OnehalfSpacing{} % one and a half
|
||||||
|
%\DoubleSpacing{} % Double spacing, very ugly.
|
||||||
|
|
||||||
|
%% The official guidelines say to put the page in the middle bottom, but
|
||||||
|
%% that was clearly written for the MS Word users. We follow proper book setup.
|
||||||
|
|
||||||
|
%% Comprehensive list of styles for memoir is in 7.2 (page 106)
|
||||||
|
%% If you need to adjust the style on the chapters, modify chapter
|
||||||
|
%% predefined styles:
|
||||||
|
%% empty: no header nor footer
|
||||||
|
%% plain: page num in bot center
|
||||||
|
%% simple: pagenum and marks on top outer edges
|
||||||
|
%\makeoddhead{chapter}{}{}{} %to change only one side
|
||||||
|
|
||||||
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
|
%%%%%%%%%%%%%%%%%%%%%%%% TITLE PAGE %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
|
|
||||||
|
%% Some may need a different front logo
|
||||||
|
\newcommand{\frontlogo@ruthesis}{ru-logo}
|
||||||
|
\newcommand{\frontlogo}[1]{\renewcommand{\frontlogo@ruthesis}{#1}}
|
||||||
|
|
||||||
|
\renewcommand{\maketitlehooka}{\begin{centering}\includegraphics[width=4cm]{\frontlogo@ruthesis}\par\end{centering}\vspace{2mm}}%
|
||||||
|
\renewcommand{\pretitle}{\begin{center}\titletitlefont}%
|
||||||
|
\renewcommand{\posttitle}{\par\end{center}}
|
||||||
|
|
||||||
|
% \renewcommand{\maketitlehookb}{\begin{center}\titletextfont{}by\end{center}\vspace{1mm}}
|
||||||
|
% 1mm adjustment to center the "by". I've disabled it because I think the "by" looks unprofessional.
|
||||||
|
|
||||||
|
\renewcommand{\preauthor}{\titletextfont\begin{center}\large\par}
|
||||||
|
\renewcommand{\postauthor}{\par\end{center}}
|
||||||
|
\newcommand{\titledetails}[1]{\renewcommand{\maketitlehookc}{#1}}
|
||||||
|
\renewcommand{\predate}{\begin{center}\large}
|
||||||
|
\renewcommand{\postdate}{\par\end{center}}
|
||||||
|
\aliaspagestyle{title}{empty}
|
||||||
|
%% ----- COPYRIGHT PAGE -----------------------------------------------------------------------
|
||||||
|
\newcommand{\copyrightpage}{
|
||||||
|
% actually in books, this is often on the left side
|
||||||
|
\begin{coverleft}
|
||||||
|
\begin{vplace}[1.0] % ratio of space above and below
|
||||||
|
\centering
|
||||||
|
\OnehalfSpacing%
|
||||||
|
Copyright\\
|
||||||
|
\theauthor\\
|
||||||
|
\thedate\\
|
||||||
|
\end{vplace}
|
||||||
|
\end{coverleft}
|
||||||
|
}
|
||||||
|
|
||||||
|
%% ---------- Page Styles --------------------------------------------------------------
|
||||||
|
%% ---------------------------------------------------------------------------------------------
|
||||||
|
%% Setup the formatting at the beginning of the document (Front material)
|
||||||
|
%% TODO: use the memoir \frontmatter \mainmatter \backmatter
|
||||||
|
%% See documentation, page 73
|
||||||
|
|
||||||
|
%%%%%%%%% PARAGRAPH ADJUSTMENTS %%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
|
\newlength{\savedparindent}
|
||||||
|
\newcommand{\disableindents}{\setlength{\parindent}{0pt}}
|
||||||
|
\newcommand{\enableindents}{\setlength{\parindent}{\savedparindent}}
|
||||||
|
|
||||||
|
\AtBeginDocument{
|
||||||
|
\frontmatter
|
||||||
|
\setlength{\savedparindent}{\parindent} % save the current parindent
|
||||||
|
\SingleSpacing%
|
||||||
|
}
|
||||||
|
|
||||||
|
%% Disable clearforchapter on formats that do not need blank pages
|
||||||
|
\ifbool{online}{\renewcommand{\clearforchapter}{\newpage}}{}
|
||||||
|
\ifbool{draftbool}{\renewcommand{\clearforchapter}{\newpage}}
|
||||||
|
% waste less blank pages in draft mode
|
||||||
|
% see p123 http://ctan.uib.no/macros/latex/contrib/memoir/memman.pdf
|
||||||
|
|
||||||
|
|
||||||
|
\newenvironment{cover}% commonalities for the cover material
|
||||||
|
{\thispagestyle{cover}%
|
||||||
|
\pagestyle{cover}%
|
||||||
|
\clearforchapter% clear to chapter setting if note online
|
||||||
|
\disableindents%
|
||||||
|
\titletextfont\SingleSpacing}%
|
||||||
|
{%\setlength{\TPMargin}{0mm} %% margins inside the textblock
|
||||||
|
\enableindents{}\newpage}%
|
||||||
|
|
||||||
|
|
||||||
|
\newenvironment{coverleft}%This is material that is OK being on the
|
||||||
|
%backside
|
||||||
|
{\thispagestyle{cover}%
|
||||||
|
\pagestyle{cover}%
|
||||||
|
\cleartoverso%
|
||||||
|
%\clearforchapter% clear to chapter setting
|
||||||
|
\disableindents%
|
||||||
|
\titletextfont\SingleSpacing}%
|
||||||
|
{%\setlength{\TPMargin}{0mm} %% margins inside the textblock
|
||||||
|
%% I don't remember why we need to mess with \TPmargin --foley
|
||||||
|
\enableindents{}\newpage}%
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
%% ----- DEDICATIONS ---------- ---------------------------------------------------------------
|
||||||
|
\newenvironment{dedications}{\begin{cover}\begin{vplace}[0.33]% ratio of space above and below
|
||||||
|
\begin{center}\em}
|
||||||
|
{\end{center}\normalfont\end{vplace}\end{cover}}
|
||||||
|
|
||||||
|
%%%%%%%%%%%% DRAFT AND PROOF MARKS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
|
\newcommand{\draftmark}{}
|
||||||
|
\newcommand{\draftbigmark}{}
|
||||||
|
|
||||||
|
\ifbool{proof}{\renewcommand{\draftmark}{{\color{blue}\textsc{Proof}}}%
|
||||||
|
\renewcommand{\draftbigmark}{{\color{blue}\warningfont{}*** \draftmark{} *** \\PLEASE DO NOT DISTRIBUTE\\}}}{}
|
||||||
|
\ifbool{draftbool}{\renewcommand{\draftmark}{{\color{red}\textsc{Draft}}}%
|
||||||
|
\renewcommand{\draftbigmark}{{\color{red}\warningfont{}*** \draftmark{} *** \\PLEASE DO NOT DISTRIBUTE\\}}}{}%
|
||||||
|
%%% Page styles Memoir Manual ch7.2 p109
|
||||||
|
\aliaspagestyle{book}{simple}
|
||||||
|
\aliaspagestyle{chapter}{plain}%At the beginning we want page numbers on chapters
|
||||||
|
\aliaspagestyle{cleared}{simple}
|
||||||
|
\aliaspagestyle{part}{empty}
|
||||||
|
\aliaspagestyle{title}{simple}
|
||||||
|
\aliaspagestyle{titlinpage}{empty}
|
||||||
|
|
||||||
|
% \ifboolexpr{bool {draftbool} or bool {proof}}{
|
||||||
|
% \makeoddfoot{cover}{}{\thepage}{\draftmark}
|
||||||
|
% \makeevenfoot{cover}{\draftmark}{\thepage}{}
|
||||||
|
% %\makeoddfoot{plain}{}{\thepage}{\draftmark}
|
||||||
|
% %\makeevenfoot{plain}{\draftmark}{\thepage}{}
|
||||||
|
% \makeoddfoot{simple}{}{}{\draftmark}
|
||||||
|
% \makeevenfoot{simple}{\draftmark}{}{}
|
||||||
|
% }{}
|
||||||
|
|
||||||
|
\makepagestyle{plain}% Just page numbers in corners
|
||||||
|
\makeevenhead{plain}{\thepage}{}{}
|
||||||
|
\makeoddhead{plain}{}{}{\thepage}
|
||||||
|
|
||||||
|
\makepagestyle{cover}% The cover pages have no page numbers
|
||||||
|
\makeoddfoot{cover}{}{}{}
|
||||||
|
\makeevenfoot{cover}{}{}{}
|
||||||
|
|
||||||
|
\newcommand{\coverchapter}[1]{\clearforchapter\pagestyle{cover}\chapter{#1}\thispagestyle{cover}}
|
||||||
|
|
||||||
|
|
||||||
|
%%% Section numbering and the Table of Contents
|
||||||
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%55
|
||||||
|
\maxsecnumdepth{subsubsection} % default by \mainmatter in preamble
|
||||||
|
%\setsecnumdepth{subsubsection} % can be changed later
|
||||||
|
\maxtocdepth{subsubsection} % default by \mainmatter in preamble
|
||||||
|
%\settocdepth{subsubsection} % can be changed later
|
||||||
|
|
||||||
|
%%% Code to include files if they exist
|
||||||
|
\newcommand{\InputIfExists}[1]{\IfFileExists{#1}{\input{#1}}{}}
|
||||||
|
|
||||||
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
|
%% TWEAKS
|
||||||
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
|
%%
|
||||||
|
%% Some adjustments to float placement
|
||||||
|
\setcounter{topnumber}{5} \def\topfraction{1} \setcounter{bottomnumber}{4}
|
||||||
|
\def\bottomfraction{1} \setcounter{totalnumber}{10} \def\textfraction{0}
|
||||||
|
\def\floatpagefraction{.5}
|
||||||
|
|
||||||
|
%\def\@makefnmark{\rlap{\@textsuperscript{\@thefnmark}}}
|
||||||
|
%% Not sure why there was a footnote adjustment on the cover
|
||||||
|
%% Disabling for now.
|
||||||
|
|
||||||
|
%% Penalties for various text placement issues
|
||||||
|
\clubpenalty=10000%% orphan lines
|
||||||
|
\widowpenalty=10000%% widow lines
|
||||||
|
\hfuzz=1pt%% avoid overfilled hboxes
|
||||||
|
\vfuzz=5pt%% avoid overfilled vboxes
|
||||||
|
%\newcommand{\draftnote}[1]{\ifdraft{{\color{gray}#1}}}
|
||||||
|
|
||||||
|
\AtEndDocument{
|
||||||
|
\typeout{*******************************************************************}
|
||||||
|
\typeout{Make sure you print this at 100\% scaling on A4 paper.}
|
||||||
|
\typeout{This is not the default on many computers, so watch out!}
|
||||||
|
\typeout{Any adjustment to the size will mess up margins and text alignment.}
|
||||||
|
\typeout{*******************************************************************}
|
||||||
|
\typeout{}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
%%%%%%%%%%%%%%%%%%%% Packages %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
%%%%%%%%%%%%%%%%%%%% Packages %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
|
|
||||||
@@ -262,9 +647,9 @@
|
|||||||
% change \personinfo to make the entries needed
|
% change \personinfo to make the entries needed
|
||||||
% Because this is inside a command, we escape the #1 as ##1
|
% Because this is inside a command, we escape the #1 as ##1
|
||||||
\renewcommand{\personinfo}[5]{&\hdashrule{\signaturex}{1pt}{1pt}\\&##1\\\vspace{\signaturey}\\}
|
\renewcommand{\personinfo}[5]{&\hdashrule{\signaturex}{1pt}{1pt}\\&##1\\\vspace{\signaturey}\\}
|
||||||
% \begin{compactitem}[]
|
\begin{compactitem}[]
|
||||||
% \signline{date}{50mm}
|
\signline{date}{50mm}
|
||||||
% \end{compactitem}
|
\end{compactitem}
|
||||||
\begin{tabular}{lll}
|
\begin{tabular}{lll}
|
||||||
Student:\\
|
Student:\\
|
||||||
\personinfo{\theauthor}{}{}{}{}\\
|
\personinfo{\theauthor}{}{}{}{}\\
|
||||||
|
|||||||
@@ -1,9 +1,15 @@
|
|||||||
\documentclass{memoir}
|
%\documentclass{memoir}
|
||||||
|
\documentclass{article}
|
||||||
|
\usepackage[online,IS]{ruthesis}
|
||||||
%\usepackage{graphicx}
|
%\usepackage{graphicx}
|
||||||
\title{Minimal Document for PhD Testing}
|
\title{Minimal Document for Testing}
|
||||||
\author{Joseph T. Foley \and Someone Else}
|
\author{Joseph T. Foley \and Someone Else}
|
||||||
% \author: Use \and as a separator and \thanks{details} for additional info
|
% \author: Use \and as a separator and \thanks{details} for additional info
|
||||||
\date{\today}
|
\date{\today}
|
||||||
|
% \usepackage[icelandic,english]{babel}
|
||||||
|
% \usepackage[english,icelandic]{babel}
|
||||||
|
%\usepackage[icelandic]{babel}
|
||||||
|
|
||||||
\begin{document}
|
\begin{document}
|
||||||
% \frontrequiredpages{}
|
% \frontrequiredpages{}
|
||||||
%\ects{30}
|
%\ects{30}
|
||||||
@@ -12,6 +18,20 @@
|
|||||||
%% Titlepage the Memoir way
|
%% Titlepage the Memoir way
|
||||||
\maketitle
|
\maketitle
|
||||||
|
|
||||||
|
% \babelensure{icelandic}
|
||||||
|
\selectlanguage{icelandic}
|
||||||
|
\begin{abstract}
|
||||||
|
This is a test abstract in Icelandic.
|
||||||
|
\end{abstract}
|
||||||
|
|
||||||
|
\selectlanguage{english}
|
||||||
|
\begin{abstract}
|
||||||
|
This is a test abstract in English.
|
||||||
|
\end{abstract}
|
||||||
|
|
||||||
|
\newpage
|
||||||
|
\chapter{Test Chapter}
|
||||||
|
blah blah blah
|
||||||
%\copyrightpage{}%%RUM: Not mentioned
|
%\copyrightpage{}%%RUM: Not mentioned
|
||||||
%\signaturepage{}%%RUM: "Signature page (standard format)
|
%\signaturepage{}%%RUM: "Signature page (standard format)
|
||||||
%\archivesigpage{}%%RUM: Not mentioned, optional, but should be required
|
%\archivesigpage{}%%RUM: Not mentioned, optional, but should be required
|
||||||
Reference in New Issue
Block a user