-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpreamble.sty
96 lines (87 loc) · 2.52 KB
/
preamble.sty
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
\ProvidesPackage{preamble}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc,url}
%\usepackage{babel,textcomp}
\usepackage{graphicx}
\usepackage{pdfpages}
\usepackage{fancyhdr}
\usepackage{afterpage}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{caption}
\usepackage{mathtools}
\usepackage{listings}
\usepackage{color}
\usepackage[margin=1.2in]{geometry}
%\usepackage[hidelinks]{hyperref} % make links black
\usepackage{hyperref}
%\hypersetup{
%colorlinks=false,
%colorlinks=true,
% citecolor=black,
% filecolor=black,
% linkcolor=red,
% urlcolor=blue,
% linktoc=all,
% linktocpage,
%}
\pagestyle{fancy}
\fancyhead{}
\fancyfoot{}
\renewcommand{\headrulewidth}{0.0pt}
\renewcommand{\footrulewidth}{0.0pt}
\fancyhead[R]{\thepage}
\fancyhead[L]{\emph{}}
\renewcommand{\vec}[1]{\mathbf{#1}} % vektorer i bf fremfor pil
\let\oldhat\hat
\renewcommand{\hat}[1]{\oldhat{\mathbf{#1}}} % enhetsvektorer i bf med hatt
\definecolor{keywords}{RGB}{50,50,250}
\definecolor{comments}{RGB}{190,70,20} % Orange
\definecolor{red}{RGB}{160,0,0}
\definecolor{green}{RGB}{0,150,0}
\definecolor{grey}{RGB}{225,225,225}
\lstdefinestyle{terminal}
{
frame=single,
basicstyle=\ttfamily,%\small,
}
\lstdefinestyle{fortran}
{
frame=shadowbox,
rulesepcolor=\color{black},
language=Fortran,
basicstyle=\ttfamily,%\small,
keywordstyle=\bf\color{keywords},
morekeywords={as,range,len,float},
commentstyle=\color{comments},
stringstyle=\color{red},
showstringspaces={false}
}
\lstdefinestyle{python}
{
%frame=shadowbox,
rulesepcolor=\color{black},
language=Python,
basicstyle=\ttfamily,%\small,
keywordstyle=\bf\color{keywords},
morekeywords={as,range,len,float},
commentstyle=\color{comments},
stringstyle=\color{red},
showstringspaces={false}
}
% numbers=left, # Numbered lines
% numbersep=5pt, # Dist from num to code
% numberstyle=\small,%\color{mygray},
% identifierstyle=\color{green}%,
% backgroundcolor=\color{},
% emph={MyClass,__init__}, % Custom highlighting
% emphstyle=\ttb\color{deepred}} % Custom highlighting style
% Custom commands
\newcommand{\pder}[2]{\frac{\partial #1}{\partial #2}}
\newcommand{\ppder}[2]{\frac{\partial^2 #1}{\partial^2 #2^2}}
\newcommand{\half}{\frac{1}{2}}
\newcommand{\intO}{\int_{\Omega}}
\newcommand{\intdO}{\int_{\partial\Omega}}
\newcommand{\intu}{\int^1_{-1}}
\newcommand{\ti}[1]{\tilde{#1}}
\newcommand{\md}{\;\mathrm{d}}