-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpackages.tex
86 lines (71 loc) · 2.18 KB
/
packages.tex
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
%--------------------
% Packages
% -------------------
\documentclass[11pt,a4paper]{article}
\usepackage[T1]{fontenc}
\usepackage{mathptmx} % Use Times Font
\usepackage{fancyhdr}
\usepackage[pdftex]{graphicx} % Required for including pictures
\usepackage[english]{babel} % Swedish translations
\usepackage[pdftex,linkcolor=black,pdfborder={0 0 0}]{hyperref} % Format links for pdf
\usepackage{calc} % To reset the counter in the document after title page
\usepackage{enumitem} % Includes lists
\usepackage{amsmath}
\frenchspacing % No double spacing between sentences
\linespread{1.2} % Set linespace
\usepackage[a4paper, lmargin=0.1666\paperwidth, rmargin=0.1666\paperwidth, tmargin=0.1111\paperheight, bmargin=0.1111\paperheight]{geometry} %margins
\usepackage{parskip}
\usepackage[font=footnotesize,labelfont=bf]{caption}
\usepackage[all]{nowidow} % Tries to remove widows
\usepackage[protrusion=true,expansion=true]{microtype} % Improves typography, load after fontpackage is selected
\usepackage{graphicx}
\usepackage{float}
\usepackage{csquotes}
% Sub-figures
\usepackage{caption}
\usepackage{subcaption}
% Colors
\usepackage{color}
\usepackage[usenames,dvipsnames]{xcolor}
\definecolor{codebg}{rgb}{0.95,0.95,0.95}
\definecolor{DarkBlue}{RGB}{25,25,112}
\hypersetup{
colorlinks=true,
linkcolor=DarkBlue,
filecolor=magenta,
urlcolor=MidnightBlue,
citecolor=MidnightBlue
}
\usepackage{lmodern}
\usepackage{minted}
% Math
\usepackage{textcomp}
\usepackage{times}
% bibliography
\usepackage[
backend=biber,
style=alphabetic,
sorting=ynt
]{biblatex}
\addbibresource{bibliography.bib}
% Macros
\def\changemargin#1#2{\list{}{\rightmargin#2\leftmargin#1}\item[]}
\let\endchangemargin=\endlist
\newcommand{\HRule}[1]{\rule{\linewidth}{#1}}
\setcounter{tocdepth}{5}
\setcounter{secnumdepth}{5}
% Char count
\newread\tmp
\usepackage{xfp}
\newcommand{\quickcharcount}[1]{%
\immediate\write18{texcount -1 -sum -merge -char #1.tex > #1-chars.sum}%
\openin\tmp=#1-chars.sum%
\read\tmp to \thechar%
\closein\tmp%
}
\newcommand{\quickwordcount}[1]{%
\immediate\write18{texcount -1 -sum -merge #1.tex > #1-words.sum}%
\openin\tmp=#1-words.sum%
\read\tmp to \theword%
\closein\tmp%
}