% technionThesis % Written by Boaz Shuval. \NeedsTeXFormat{LaTeX2e} \ProvidesClass{technionThesis}[2019/1/28 Class for Technion thesis] % This is a template for writing a thesis according to the Technion specifications. % Version: 1.0 % NOTE: There is a bug in the memoir package in TEXLIVE 2018. % Therefore, it is advised to compile using TEXLIVE 2017. % The current (As of January 2019) version of overleaf runs TEXLIVE 2017. \LoadClass[a4paper, 11pt, twoside, extrafontsizes]{memoir} % Support for `if' commands: \newtoggle, \toggletrue, \togglefalse, \iftoggle, etc. \RequirePackage{etoolbox} \RequirePackage{xifthen} \newboolean{addpublist} \setboolean{addpublist}{false} \newboolean{addacknowledgments} \setboolean{addacknowledgments}{false} \newboolean{firstpar} \setboolean{firstpar}{false} \newboolean{advisementif} \setboolean{advisementif}{false} \newboolean{uselibertine} \setboolean{uselibertine}{false} % %%% OPTIONS \newif\if@loadhyperref \DeclareOption{hyperref}{\@loadhyperreftrue} \DeclareOption{publist}{\setboolean{addpublist}{true}} \DeclareOption{addack}{\setboolean{addacknowledgments}{true}} \DeclareOption{advisement}{\setboolean{advisementif}{true}} \DeclareOption{spacepar}{\nonzeroparskip} \DeclareOption{firstparindent}{\setboolean{firstpar}{true}} % Indent first paragraph of chapter/section \DeclareOption{libertine}{\setboolean{uselibertine}{true}} \ProcessOptions\relax \PassOptionsToPackage{no-math}{fontspec} % Fix \left \right spacing \let\originalleft\left \let\originalright\right \renewcommand{\left}{\mathopen{}\mathclose\bgroup\originalleft} \renewcommand{\right}{\aftergroup\egroup\originalright} % Load fonts/symbols. \RequirePackage[T1]{fontenc} \RequirePackage{centernot} \RequirePackage{textcomp} \RequirePackage{calc} \RequirePackage[cmex10]{mathtools} %cmex10 is needed for IEEEtran class %This also loads amsmath, and pass cmex10 to it. \interdisplaylinepenalty=2500 % Allows breaking aligned equations among pages. \RequirePackage{amssymb,amsthm} \RequirePackage{thmtools} \ifthenelse{\boolean{uselibertine}}{% \RequirePackage[libertine, noamssymbols,cmbraces, liby]{newtxmath} \RequirePackage[no-math]{fontspec} \RequirePackage{libertine} \RequirePackage{cabin} \setmonofont[Mapping=tex-text]{Inconsolata} \RequirePackage{eucal} \DeclareFontFamily{U}{fplmbb}{} \DeclareFontShape{U}{fplmbb}{m}{n}{<-> fplmbb}{} \DeclareMathAlphabet{\mathbb}{U}{fplmbb}{m}{n} }{} % Black square at end of proof: \renewcommand{\qedsymbol}{\ensuremath{\blacksquare}} \RequirePackage[nodayofweek,short]{datetime} % Including graphics, enabling subfigure environments \RequirePackage{graphicx} \RequirePackage[caption = false]{subfig} % see https://danangcity45.wordpress.com/2015/05/13/figures-subfigures-and-tables-in-latex/ % This also enables \begin{subtable} with the same syntax. % Tikz is useful for LaTeX drawings, inserting Matlab figures, etc. \RequirePackage{tikz} %Also loads xcolor \RequirePackage{pgfplots} \usetikzlibrary{decorations.markings, decorations.pathreplacing, shapes.misc, shapes.arrows, arrows, arrows.meta} \usetikzlibrary{calc, intersections, patterns, positioning, fit} \RequirePackage{stackrel} % Extends LaTeX's stackrel to support above and below: \stackrel[below]{above}{sign/arrow/etc} \RequirePackage{accents} % Adds ability to generate new accents for symbols. % For defining abbreviations that determine spacing after them \RequirePackage{xspace} % Support for tabbing environments \RequirePackage{tabto} % For adding algorithms \usepackage[ruled,vlined]{algorithm2e} % Fix algorithm numbering \renewcommand{\thealgocf}{\arabic{chapter}.\arabic{algocf}} % Adding urls \RequirePackage{url} % Tables: \RequirePackage{longtable} % Tabular environemnt longer than one page, useful for the abstract % Nicer tables using top/mid/bottom rules. % Guidelines: Do not use vertical or double lines, ever. This package adds the % (*) \toprule (thick line above table), % (*) \midrule (thin line mid table), % (*) \cmidrule{x-y} (thin line spanning columns x-y), % (*) \bottomrule commands (thick line beneath table). \RequirePackage{booktabs} \RequirePackage{multirow} % Multirow support: %%%% Environments % (proof environment is defined by amsmath or amsthm so no need to define it) \theoremstyle{plain} % Header bold, numbered, Text in italics \newtheorem{theorem}{Theorem}[chapter] \newtheorem{lemma}[theorem]{Lemma} % Numbering based on "theorem" \newtheorem{proposition}[theorem]{Proposition} % Numbering based on "theorem" \newtheorem{corollary}[theorem]{Corollary} % Numbering based on "theorem" \newtheorem{conjecture}{Conjecture} \theoremstyle{definition} % Header bold, numbered, text normal \newtheorem{definition}{Definition}[chapter] \newtheorem{example}{Example}[chapter] \newtheorem{assumption}{Assumption}[chapter] \renewcommand{\theassumption}{\Alph{assumption}} \newtheorem{condition}{Condition} \renewcommand{\thecondition}{\Alph{condition}} \theoremstyle{remark} % Header in italics, numbered, text normal \newtheorem{remark}{Remark}[chapter] \newtheorem{question}{Question} \newtheorem*{discussion}{Discussion} % Usage: \begin{example}[continues=