forked from PalmaITEM/deliverables-template
-
Notifications
You must be signed in to change notification settings - Fork 2
/
PriMa.cls
157 lines (142 loc) · 4.6 KB
/
PriMa.cls
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
%%---------------------------------------------------
%% BASED ON: http://netcommons.eu/
%% Edited by David Palma, SINet: https://sinet.item.ntnu.no
%% (tweaked by Bjarte M. Østvold for PriMa: https://www.prima-itn.eu/)
%%---------------------------------------------------
%\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{PriMa}
\LoadClass[a4paper,twoside,final,10pt,headings=small]{scrreprt}
% --------------------------------------------
% Load packages
% --------------------------------------------
\usepackage[utf8]{inputenc}
\usepackage{xspace}
\usepackage[english]{babel}
\usepackage{url}
\usepackage{latexsym}
\usepackage{enumerate}
\usepackage{rotating}
\usepackage{framed}
\usepackage{fancybox}
%REMOVED \usepackage{fancyhdr}
\usepackage[automark]{scrlayer-scrpage}
%\usepackage{fancyvrb}
\usepackage{scrhack}
\usepackage{float}
\usepackage{times}
\usepackage{array}
\usepackage{booktabs}
\usepackage{amsmath,amsthm, amsfonts, amssymb, amsxtra,amsopn}
\usepackage{setspace}
\usepackage{multirow}
\usepackage{nccmath}
\usepackage{tikz}
\usepackage[center,bf]{caption}
\usepackage{lastpage}
\usetikzlibrary{calc}
% Color Links
\usepackage[pdftex,hyperfigures,hyperindex,bookmarksnumbered,colorlinks, bookmarks, breaklinks, linktocpage,citecolor=blue,urlcolor=blue,linkcolor=black,pdftitle={PriMa},pdfauthor={PriMa}]{hyperref}
\usepackage{graphicx}
\usepackage[a4paper,margin=2cm,heightrounded]{geometry}
\graphicspath{{images/}}
\DeclareGraphicsExtensions{.pdf,.png,.jpg}
%% Make sections blue
\usepackage{sectsty}
\definecolor{primablue}{HTML}{1569C7}
\allsectionsfont{\color{primablue}}
%%--Set the section number depth.
\setcounter{secnumdepth}{3}
\setcounter{tocdepth}{4}
\setcounter{page}{2}
\setkomafont{pageheadfoot}{\small} % Make footer small and upright (cf. koma doc)
\bibliographystyle{IEEEtran}
\sloppy
%%--------------------------------------------
%%-- Definition and Quotation commands.
%%--------------------------------------------
\newtheorem{dbdefine}{Definition}[section]
\newtheorem{dbtheorem}{Theorem}[section]
\newtheorem{dblemma}{Lemma}[section]
\newtheorem{dbnotate}{Notation}[section]
\newtheorem{dbaxiom}{Axiom}[section]
\newenvironment{dbproof}[1][Proof]
{\noindent \textbf{#1: }}{\hfill $\blacksquare$}
%%-----------------------------------------------
%%-- Float related environments and commands.
%%-----------------------------------------------
%%--Modify behavior of the figure and table environment.
\def\fps@figure{hbt}
\def\fnum@figure{\textbf{\figurename~\thefigure}}
\def\fps@table{htb}
\def\fnum@table{\textbf{\tablename~\thetable}}
\def\mathfigure{\thesisfiguretrue\figure}
\def\endmathfigure{\endfigure\thesisfigurefalse}
% --------------------------------------------
% Headers
% --------------------------------------------
%REMOVED \pagestyle{fancyplain}
\pagestyle{scrheadings}
\renewcommand{\chaptermark}[1]{\markboth{\thechapter.\ #1}{}}
\renewcommand{\sectionmark}[1]{\markright{\thesection.\ #1}}
\makeatletter
\makeindex
\makeglossary
\setcounter{tocdepth}{4}
\setcounter{secnumdepth}{4}
\newcommand{\indic}{\mathtt{1}\!\!\mathtt{l}}
\newcommand{\proba}{\mathbb{P}}
\newcommand{\esper}{\mathbb{E}}
\newcommand{\Nats}{I\!\!N}
\newcommand{\nats}{I\!\!N}
\newcommand{\Reals}{I\!\!R}
\newcommand{\reals}{I\!\!R}
\newcommand{\espalm}{\mathbb{E}_N^{o}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% No indent and small paragraph sep.
\setlength{\parindent}{0mm}
\addtolength{\parskip}{1mm}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Floating figures
\renewcommand\floatpagefraction{.9}
\renewcommand\topfraction{.9}
\renewcommand\bottomfraction{.9}
\renewcommand\textfraction{.1}
\setcounter{totalnumber}{50}
\setcounter{topnumber}{50}
\setcounter{bottomnumber}{50}
\endinput
%% --The \tableofcontents.
\renewcommand\tableofcontents{%
\renewcommand{\contentsname}{Table of Contents}
\if@twocolumn
\@restonecoltrue\onecolumn
\else
\@restonecolfalse
\fi
\oldchapter*{\contentsname
\@mkboth{\uppercase{\contentsname}}{\uppercase{\contentsname}}}%
\@starttoc{toc}%
\if@restonecol\twocolumn\fi}
%% --The \listoffigures command.
\renewcommand\listoffigures{%
\if@twocolumn
\@restonecoltrue\onecolumn
\else
\@restonecolfalse
\fi
\oldchapter*{\listfigurename
\@mkboth{\uppercase{\listfigurename}}{\uppercase{\listfigurename}}}%
\@starttoc{lof}%
\if@restonecol\twocolumn\fi}
%% --The \listoftables command.
\renewcommand\listoftables{%
\if@twocolumn%
\@restonecoltrue\onecolumn%
\else%
\@restonecolfalse%
\fi%
\oldchapter*{\listtablename%
\@mkboth{\uppercase{\listtablename}}{\uppercase{\listtablename}}}%
\@starttoc{lot}%
\if@restonecol\twocolumn\fi}
\endinput