-
Notifications
You must be signed in to change notification settings - Fork 1
/
mydiss.sty
100 lines (84 loc) · 3.28 KB
/
mydiss.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
97
98
99
100
\ProvidesPackage{mydiss}
\usepackage{microtype}
\usepackage{newpxtext}
\usepackage[text-hat-accent]{euler}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{upquote}
\usepackage{verbatim}
\usepackage{csvsimple}
\usepackage{pgfplots}
\usepackage{pgfplotstable}
\usepackage{tikz}
\usepackage[parfill]{parskip}
\usepackage[hidelinks]{hyperref}
\usepackage[outputdir=out]{minted}
\usepackage{graphicx}
\usepackage{xcolor}
\usepackage[margin=2cm,headheight=13.6pt]{geometry}
\usepackage[margin=10pt,font=small,labelfont=bf,labelsep=endash,textfont=it]{caption}
\usepackage{longtable,booktabs}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{subfig}
\usepackage{dirtree}
\usepackage{wrapfig}
\usepackage{excludeonly}
\usepackage{enumitem}
\usepackage{titlesec}
\usepackage{array}
\usepackage{etoolbox}
\usepackage{placeins}
\usepackage{pgf}
\usepgfplotslibrary{groupplots}
\usepgfplotslibrary{fillbetween}
\pgfplotsset{compat=1.13}
\setminted{fontsize=\footnotesize}
\newmintedfile[ocamlcode]{ocaml}{frame=single,framesep=7pt}
\newmintedfile[jscode]{js}{frame=single,framesep=7pt}
\newmintedfile[clojurecode]{clj}{frame=single,framesep=7pt}
\newminted[ocamlcode-in]{ocaml}{frame=single,framesep=7pt,autogobble}
\DeclareUnicodeCharacter{2060}{\nolinebreak}
\setlength{\emergencystretch}{3em} % prevent overfull lines
\providecommand{\tightlist}{%
\setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}
\raggedbottom % try to avoid widows and orphans
\sloppy
\clubpenalty1000%
\widowpenalty1000%
% \addtolength{\oddsidemargin}{6mm} % adjust margins
% \addtolength{\evensidemargin}{-8mm}
\renewcommand{\baselinestretch}{1.1} % adjust line spacing to make
% more readable
\numberwithin{listing}{chapter}
\makeatletter
\patchcmd{\ttlh@hang}{\parindent\z@}{\parindent\z@\leavevmode}{}{}
\patchcmd{\ttlh@hang}{\noindent}{}{}{}
\makeatother
% \titleformat{\chapter}[display]{\normalfont\huge\bfseries}{\chaptertitlename\ \thechapter}{20pt}{\Huge}
\newcommand{\hsp}{\hspace{20pt}}
\definecolor{gray75}{gray}{0.75}
\titleformat{\chapter}[hang]{\Huge\bfseries}{\thechapter\hsp\textcolor{gray75}{|}\hsp}{0pt}{\Huge\bfseries}
% this alters "before" spacing (the second length argument) to 0
\titlespacing*{\chapter}{0pt}{0pt}{20pt}
\titlespacing*{\section}{0pt}{0pt}{0pt}
\titlespacing*{\subsection}{0pt}{0pt}{0pt}
\titlespacing*{\subsubsection}{0pt}{0pt}{0pt}
\titlespacing*{\paragraph} {0pt}{0pt}{1em}
% title spacing defaults
% \titlespacing*{\chapter} {0pt}{50pt}{40pt}
% \titlespacing*{\section} {0pt}{3.5ex plus 1ex minus .2ex}{2.3ex plus .2ex}
% \titlespacing*{\subsection} {0pt}{3.25ex plus 1ex minus .2ex}{1.5ex plus .2ex}
% \titlespacing*{\subsubsection}{0pt}{3.25ex plus 1ex minus .2ex}{1.5ex plus .2ex}
% \titlespacing*{\paragraph} {0pt}{3.25ex plus 1ex minus .2ex}{1em}
% \titlespacing*{\subparagraph} {\parindent}{3.25ex plus 1ex minus .2ex}{1em}
\usepackage{pifont}% http://ctan.org/pkg/pifont
% \newcommand{\cmark}{\ding{52}}%
\definecolor{green1}{rgb}{0.0, 0.5, 0.0}
\definecolor{red1}{rgb}{1.0, 0.01, 0.24}
\newcommand{\cmark}{\textcolor{green1}{\checkmark}}%
\newcommand{\xmark}{\textcolor{red1}{\ding{55}}}%
\usepackage{xpatch,letltxmacro}
\LetLtxMacro{\cminted}{\minted}
\let\endcminted\endminted
\xpretocmd{\cminted}{\RecustomVerbatimEnvironment{Verbatim}{BVerbatim}{}}{}{}