-
Notifications
You must be signed in to change notification settings - Fork 0
/
MainPackages.tex
209 lines (165 loc) · 6.66 KB
/
MainPackages.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
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
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
% -------- Packages --------
% This package just gives you a quick way to dump in some sample text.
% You can remove it -- it's just here for the examples.
\usepackage{blindtext}
% This package means empty pages (pages with no text) won't get stuff
% like chapter names at the top of the page. It's mostly cosmetic.
\usepackage{emptypage}
% The graphicx package adds the \includegraphics command,
% which is your basic command for adding a picture.
\usepackage{graphicx}
% The float package improves LaTeX's handling of floats,
% and also adds the option to *force* LaTeX to put the float
% HERE, with the [H] option to the float environment.
\usepackage{float}
% The amsmath package enhances the various ways of including
% maths, including adding the align environment for aligned
% equations.
\usepackage{amsmath}
% Use these two packages together -- they define symbols
% for e.g. units that you can use in both text and math mode.
\usepackage{gensymb}
\usepackage{textcomp}
% You may also want the units package for making little
% fractions for unit specifications.
%\usepackage{units}
% The setspace package lets you use 1.5-sized or double line spacing.
\usepackage{setspace}
\setstretch{1.5}
% That just does body text -- if you want to expand *everything*,
% including footnotes and tables, use this instead:
%\renewcommand{\baselinestretch}{1.5}
% PGFPlots is either a really clunky or really good way to add graphs
% into your document, depending on your point of view.
% There's waaaaay too much information on using this to cover here,
% so, you might want to start here:
% http://pgfplots.sourceforge.net/
% or here:
% http://pgfplots.sourceforge.net/pgfplots.pdf
%\usepackage{pgfplots}
%\pgfplotsset{compat=1.3} % <- this fixed axis labels in the version I was using
% PGFPlotsTable can help you make tables a little more easily than
% usual in LaTeX.
% If you're going to have to paste data in a lot, I'd suggest using it.
% You might want to start with the manual, here:
% http://pgfplots.sourceforge.net/pgfplotstable.pdf
%\usepackage{pgfplotstable}
% These settings are also recommended for using with pgfplotstable.
%\pgfplotstableset{
% % these columns/<colname>/.style={<options>} things define a style
% % which applies to <colname> only.
% empty cells with={--}, % replace empty cells with '--'
% every head row/.style={before row=\toprule,after row=\midrule},
% every last row/.style={after row=\bottomrule}
%}
% The mhchem package provides chemistry formula typesetting commands
% e.g. \ce{H2O}
%\usepackage[version=3]{mhchem}
% And the chemfig package gives a weird command for adding Lewis
% diagrams, for e.g. organic molecules
%\usepackage{chemfig}
% The linenumbers command from the lineno package adds line numbers
% alongside your text that can be useful for discussing edits
% in drafts.
% Remove or comment out the command for proper versions.
%\usepackage[modulo]{lineno}
%\linenumbers
%\renewcommand\linenumberfont{\normalfont\itshape\footnotesize}
% Alternatively, you can use the ifdraft package to let you add
% commands that will only be used in draft versions
%\usepackage{ifdraft}
% For example, the following adds a watermark if the draft mode is on.
%\ifdraft{
% \usepackage{draftwatermark}
% \SetWatermarkText{\shortstack{\textsc{Draft Mode}\\ \strut \\ \strut \\ \strut}}
% \SetWatermarkScale{0.5}
% \SetWatermarkAngle{90}
%}
% The multirow package adds the option to make cells span
% rows in tables.
\usepackage{multirow}
% Subfig allows you to create figures within figures, to, for example,
% make a single figure with 4 individually labeled and referenceable
% sub-figures.
% It's quite fiddly to use, so check the documentation.
%\usepackage{subfig}
% DG comment: subfig is broken. https://tex.stackexchange.com/questions/13625/subcaption-vs-subfig-best-package-for-referencing-a-subfigure
% The natbib package allows book-type citations commonly used in
% longer works, and less commonly in science articles (IME).
% e.g. (Saucer et al., 1993) rather than [1]
% More details are here: http://merkel.zoneo.net/Latex/natbib.php
\usepackage[numbers,sort&compress]{natbib}
% The bibentry package (along with the \nobibliography* command)
% allows putting full reference lines inline.
% See:
% http://tex.stackexchange.com/questions/2905/how-can-i-list-references-from-bibtex-file-in-line-with-commentary
%\usepackage{bibentry}
% The isorot package allows you to put things sideways
% (or indeed, at any angle) on a page.
% This can be useful for wide graphs or other figures.
%\usepackage{isorot}
% The caption package adds more options for caption formatting.
% This set-up makes hanging labels, makes the caption text smaller
% than the body text, and makes the label bold.
% Highly recommended.
\usepackage[format=hang,font=small,labelfont=bf]{caption}
% If you're getting into defining your own commands, you might want
% to check out the etoolbox package -- it defines a few commands
% that can make it easier to make commands robust.
\usepackage{etoolbox}
% Loads Libertine and Biolinum fonts
\usepackage[sb]{libertine}
% I hoped this would allow me to reference the Krinov data properly, but it didn't work
%\usepackage{libertinegc}
\usepackage[utf8]{inputenc}
%\usepackage[russian]{babel}
% Introduces a few neat typographic tricks
\usepackage[stretch = 16]{microtype}
% Package to set images to be maximum text width
\usepackage[export]{adjustbox}
% for making lettered lists
\usepackage{enumitem}
% Highlighting
\usepackage{color,soul}
\definecolor{lightgray}{gray}{0.85}
\sethlcolor{lightgray}
% for insering full pdf pages (used by me for making ethics applications into appendices
\usepackage{pdfpages}
\includepdfset{offset= 0cm -3cm}
% For full page figures with the caption on the previous page
\usepackage{phffullpagefigure}
% %for code chunks
\usepackage{listings}
\usepackage[framed]{matlab-prettifier}
%for multi-line equations
\usepackage{amsmath}
% For quoting hack
\usepackage{xparse}
\usepackage{quoting}
\NewDocumentEnvironment{citequote}{m}
{%
\begin{quoting}[indentfirst=false,font=itshape]
\bigquotes{r}{``} \centering
}
{%
\bigquotes{l}{''}%
\item\relax\hspace*{\fill}\citeauthor{#1}\ \textup{\cite{#1}}%
\end{quoting}
}
\newcommand{\bigquotes}[2]{%
{%
\raisebox{\dimexpr\fontcharht\font`A-\height}{\Large\bfseries#2}%
}%
}
\NewDocumentEnvironment{itquote}{m} %as above but without the ref. I can't get rid of the {m} and I don't know why
{%
\begin{quoting}[indentfirst=false,font=itshape]
\bigquotes{r}{``} \centering
}
{%
\bigquotes{l}{''}%
\end{quoting}
}
% For rounding numbers
\usepackage{numprint}
% https://tex.stackexchange.com/questions/9132/rounding-numbers-in-a-table-truncating-text-in-table