kthesis style stock and margins processed in rubook.cls
This commit is contained in:
10
main.tex
10
main.tex
@@ -1,9 +1,10 @@
|
||||
%%%% This is the general thesis/project report template for most users
|
||||
\documentclass[10pt,showtrims,a4paper]{memoir}
|
||||
%% Memoir options
|
||||
\documentclass[10pt,showtrims,b5paper]{rubook}
|
||||
%% RU Book options (subclass of memoir)
|
||||
%% 10pt: default font -- DO NOT CHANGE
|
||||
%% showtrims: indicate where printer will cut to size
|
||||
%% a4paper: printer's stock size before cutting to b5
|
||||
%% a4paper or b5paper: paper stock size.
|
||||
%% If A4, show cut lines. If b5, no cut lines.
|
||||
\usepackage[]{ruthesis}
|
||||
%% Options for ruthesis in []:
|
||||
%% IS Icelandic is main language, otherwise default to English
|
||||
@@ -38,8 +39,7 @@
|
||||
}
|
||||
|
||||
\begin{document}
|
||||
% \printedcover{TITLE IN CAPS}{13-0000000}% {TITLE}{ISBN} Primarily for PhD
|
||||
%% TODO: There may be an official cover graphic, need to investigate --foley
|
||||
%% TODO: get the official cover graphic and have the system fill in the fields for you
|
||||
\maketitle{}
|
||||
\copyrightpage{}
|
||||
% If this is a PhD, register for an ISSN and ISBN, then:
|
||||
|
||||
88
rubook.cls
Normal file
88
rubook.cls
Normal file
@@ -0,0 +1,88 @@
|
||||
%% ---------------------------------------------------------------------------------------------
|
||||
%% LaTeX Base Class Reykjavík University Books
|
||||
%% ---------------------------------------------------------------------------------------------
|
||||
%% Original Author: Lars Engebretsen (KTH)
|
||||
%% Source not found on Google, an archived copy [2004/12/14 v2.1 Document Class for KTH Theses] can be found at
|
||||
%% https://repository.cs.ru.is/svn/thesis-template/trunk/non-ru/kth.se/kthesis/tex/latex/kthesis/kthesis.cls
|
||||
%% Refactored in 2017 by Gabriel Hjort Blindell <ghb AT kth.se>
|
||||
%% Source at https://github.com/gablin/ghb-thesis/blob/master/kthesis.cls
|
||||
%% This has a Creative Commons Attribution-NoDerivatives 4.0
|
||||
%% <http://creativecommons.org/licenses/by-nc-nd/4.0/> for details).
|
||||
%% Which means we sadly can't modify it for our use.
|
||||
%% Refactored from Lars' version on 2022-05-22: Joseph Timothy Foley <foley AT ru.is>
|
||||
%% Questions, comments, complaints: latex@RU.IS
|
||||
%% Created on 2022-05-22
|
||||
%% This code is distributed under the MIT license
|
||||
%% Details at LICENSE.md
|
||||
%% --------------- Identification ----------------------------
|
||||
\NeedsTeXFormat{LaTeX2e}
|
||||
\newcommand{\fileversion@rubook}{Revision 1.0}
|
||||
\newcommand{\filedate@rubook}{2022/05/22}% must be YYYY/MM/DD!
|
||||
\newcommand{\fileauthor@rubook}{Joseph Timothy Foley, foley at RU.IS}
|
||||
\ProvidesPackage{rubook}[\filedate@rubook by \fileauthor@rubook]
|
||||
\typeout{Book Class for Reykjavik University \fileversion@rubook <\filedate@rubook>, by \fileauthor@rubook}
|
||||
|
||||
\newcommand{\@rubook@setpapersize@afour}{\stockaiv{}}
|
||||
\newcommand{\@rubook@setpapersize@bfive}{\stockbv{}}
|
||||
%\def\@rubook@setpapersize@afour{%
|
||||
% \setstocksize{297mm}{210mm}
|
||||
% \settrimmedsize{297mm}{210mm}{*}
|
||||
% \settypeblocksize{49pc}{33pc}{*}}
|
||||
% \def\@rubook@setpapersize@bfive{%
|
||||
% \setstocksize{297mm}{210mm}
|
||||
% \settrimmedsize{239mm}{169mm}{*}
|
||||
% \setlength{\trimtop}{\stockheight}
|
||||
% \addtolength{\trimtop}{-\paperheight}
|
||||
% \setlength{\trimtop}{0.5\trimtop}
|
||||
% \setlength{\trimedge}{\stockwidth}
|
||||
% \addtolength{\trimedge}{-\paperwidth}
|
||||
% \ifpdf
|
||||
% \AtBeginDocument{%
|
||||
% \setlength{\pdfpagewidth}{\stockwidth}
|
||||
% \setlength{\pdfpageheight}{\stockheight}}
|
||||
% \fi
|
||||
% \settypeblocksize{43pc}{30pc}{*}}
|
||||
|
||||
\DeclareOption{g5paper}{\OptionNotUsed}
|
||||
\DeclareOption{a3paper}{\OptionNotUsed}
|
||||
\DeclareOption{a4paper}{\def\rubook@papersize{afour}}% paper stock a4
|
||||
\DeclareOption{a6paper}{\OptionNotUsed}
|
||||
\DeclareOption{a5paper}{\OptionNotUsed}
|
||||
\DeclareOption{b3paper}{\OptionNotUsed}
|
||||
\DeclareOption{b4paper}{\OptionNotUsed}
|
||||
\DeclareOption{b5paper}{\def\rubook@papersize{bfive}}% paper stock b5
|
||||
\DeclareOption{b6paper}{\OptionNotUsed}
|
||||
\DeclareOption{letterpaper}{\OptionNotUsed}
|
||||
\DeclareOption{legalpaper}{\OptionNotUsed}
|
||||
\DeclareOption{executivepaper}{\OptionNotUsed}
|
||||
\DeclareOption{ebook}{\OptionNotUsed}
|
||||
\DeclareOption{landscape}{\OptionNotUsed}
|
||||
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{memoir}}
|
||||
\ExecuteOptions{b5paper}
|
||||
\ProcessOptions\relax
|
||||
\LoadClass[a4paper]{memoir}
|
||||
\@nameuse{@rubook@setpapersize@\rubook@papersize}
|
||||
|
||||
|
||||
%%%%%%%%%%%%%%%% MARGINS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
%% Note: The old MS word template uses even 25.4mm margins which works poorly as a bound book
|
||||
\setxlvchars{}\setlxvchars{}
|
||||
%% calculate textblock based upon character size
|
||||
\trimLmarks{}% trim marks get cut off
|
||||
\pagebv{}% cut to b5
|
||||
%\settrims{0pt}{0pt}
|
||||
\setpageml{\paperheight}{\paperwidth}{*}%page area on middle left for cutting
|
||||
%\checkandfixthelayout% implement the margins if we weren't using canonic
|
||||
|
||||
\RequirePackage{canoniclayout}
|
||||
%% Canonic layout calculates margins that look nice
|
||||
%% Based upon a rectangle formed with a circle on the width
|
||||
|
||||
|
||||
%% Some debugging code to check length calculation.
|
||||
\newcommand{\showlengths@rubook}{
|
||||
\uselengthunit{mm} % showlen package
|
||||
Lengths: (with round off error from floats)\\
|
||||
pagecenterx:\printlength{\pagecenterx}\\
|
||||
pagecentery:\printlength{\pagecentery}\\
|
||||
}
|
||||
25
ruthesis.sty
25
ruthesis.sty
@@ -1,5 +1,5 @@
|
||||
%% ---------------------------------------------------------------------------------------------
|
||||
%% LaTeX Base Class Reykjavík University Theses/Dissertations/Books,
|
||||
%% LaTeX Base Package Reykjavík University Theses/Dissertations/Books,
|
||||
%% ---------------------------------------------------------------------------------------------
|
||||
%% Original Author: Bjórn Þór Jónsson (bjorn AT ru.is)
|
||||
%% Refactored/Simplified on 2020-02-03: Joseph Timothy Foley <foley AT ru.is>
|
||||
@@ -113,29 +113,6 @@
|
||||
%% But to use the options, you have to always load it, even for english
|
||||
%% The languages must be specified in order.
|
||||
|
||||
%%%%%%%%%%%%%%%% MARGINS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
%% WARNING: memoir class has its own margin macros
|
||||
%% Do not use the geometry package!!!!
|
||||
|
||||
%% Note: The old MS word template uses even 25.4mm margins which works poorly as a bound book
|
||||
\setxlvchars{}
|
||||
\setlxvchars{}
|
||||
\trimLmarks{}% trim marks get cut off
|
||||
\stockaiv{}% paper stock a4
|
||||
\pagebv{}% cut to b5
|
||||
%\settrims{0pt}{0pt}
|
||||
\setpagebl{\paperheight}{\paperwidth}{*}%page area on bottom left for cutting
|
||||
%\checkandfixthelayout% implement the margins
|
||||
|
||||
\RequirePackage{canoniclayout}
|
||||
|
||||
%% Some debugging code to check length calculation.
|
||||
\newcommand{\showlengths@ruthesis}{
|
||||
\uselengthunit{mm} % showlen package
|
||||
Lengths: (with round off error from floats)\\
|
||||
pagecenterx:\printlength{\pagecenterx}\\
|
||||
pagecentery:\printlength{\pagecentery}\\
|
||||
}
|
||||
|
||||
|
||||
%% ---------------- Graphics ------------------------------
|
||||
|
||||
Reference in New Issue
Block a user