-
Notifications
You must be signed in to change notification settings - Fork 1
/
dynlearn.sty
411 lines (339 loc) · 12.8 KB
/
dynlearn.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
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
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% dynlearn.sty
%
% A style file for papers by the Crutchfield group
%
% This document is broken into many sections, separated by concept and
% libraries required.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Basic imports
% generic stuff
\usepackage{etex} %
\usepackage{ifpdf} % write flexible commands
\usepackage{xspace} % let macros play nice with spaces
\usepackage[table]{xcolor} % colors
\usepackage{setspace} %
% figures
\PassOptionsToPackage{final}{graphicx} % keep things consistant
\usepackage{graphicx} % \includegraphics
% formatting of particular things %
\makeatletter % pagebackref doesn't work with beamer
\@ifclassloaded{beamer}{}{\PassOptionsToPackage{pagebackref}{hyperref}}
\makeatother
\usepackage{hyperref}
\usepackage{url} % format URLs
\usepackage[super]{nth} % 1st, 2nd, etc
\usepackage{contour} % draw an outline around text
\usepackage{verbatim} %
\usepackage{ragged2e} %
\usepackage{attrib} %
\usepackage{adjustbox} %
\usepackage[absolute,overlay]{textpos} %
\usepackage{calc} %
% math formating, fonts, and symbols
\usepackage{amsmath} %
\usepackage{amscd} %
\usepackage{amsfonts} %
\usepackage{amssymb} %
\usepackage{amsthm} %
\usepackage{scalerel} %
\usepackage{bm} % bold
\usepackage{bbm} % more bold
\usepackage{braket} % bras and kets for quantum
\usepackage{mathtools} % mathclap, etc
\usepackage{etoolbox} %
\usepackage{textcomp} %
\usepackage{stmaryrd} % some computer science symbols
\usepackage{nicefrac} % pretty fractions
% generic packages for nicer fonts
\usepackage[T1]{fontenc} % allow copy/paste of unicode
\usepackage{lmodern} % nicer looking font
\usepackage[scaled=0.72]{beramono} % more nicer fonts
\usepackage{microtype} % friendlier word spacing
% format algorithms in pseudocode
\usepackage{algorithm} %
\usepackage{algorithmicx} % algorithmic doesn't work with revtex
% better tables
\usepackage{booktabs} % nicer tables
\usepackage{dcolumn} % align by decimal in tables
\usepackage{multirow} % multirow support in tables
\makeatletter
\@ifclassloaded{revtex4-1}
{
\usepackage[caption=false]{subfig} % subfigures; caption and subcaption
% are incompatible with revtex4.1
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% foreign stuff, stolen from (and not included because of build systems)
% \usepackage[abbreviations]{foreign}
\DeclareRobustCommand\eg{\textit{e.g.}\xspace}
\DeclareRobustCommand\ie{\textit{i.e.}\xspace}
\DeclareRobustCommand\etal{\textit{et al.}\xspace}
}
{
\usepackage{caption}
\usepackage{subcaption}
\usepackage[abbreviations]{foreign}
}
\@ifclassloaded{beamer}
{
\usepackage[backend=biber,
autocite=superscript,
doi=false,
url=false,
sorting=none,
bibstyle=numeric,
citestyle=numeric,
bibencoding=utf8,
]{biblatex}
\usepackage[useregional,showdow]{datetime2}
\setbeamertemplate{bibliography item}{\insertbiblabel}
}
{
% if not using beamer...
\usepackage{enumitem} % customizable list environments
}
\@ifclassloaded{beamerposter}
{
}
{
\usepackage{bm} % bold
\usepackage{bbm} % more bold
}
\makeatother
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% colors
% different authors
\definecolor{ryan}{RGB}{64, 0, 64}
\definecolor{nix}{RGB}{255, 0, 0}
\definecolor{ucdblue1}{cmyk}{.87,.46,0,.49} % RGB (17,70,129,255) HTML(A) 114681(FF)
\definecolor{ucdblue2}{cmyk}{1., .56, 0., .34}
\colorlet{ucdblue}{ucdblue2}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% fixme: put todos and such in the document
\usepackage[inline,nomargin,author=]{fixme}
\makeatletter
\def\@lox@prtc{\section*{\@fxlistfixmename}\begingroup\def\@dotsep{4.5}}
\def\@lox@psttc{\endgroup}
\makeatother
\fxsetup{theme=color,mode=multiuser}
\fxsetface{inline}{\bfseries}
\FXRegisterAuthor{jpc}{ajpc}{JPC}
\FXRegisterAuthor{rgj}{argj}{\color{ryan}RGJ}
\FXRegisterAuthor{jrm}{ajrm}{JRM}
\FXRegisterAuthor{je}{aje}{\color{green!66!black}JE}
\FXRegisterAuthor{ca}{aca}{CA}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% siunitx setup
\usepackage[binary-units]{siunitx} % format units including bits
\sisetup{quotient-mode=fraction, fraction-function=\nicefrac}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% cmvec setup
% \usepackage{cmvec}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% epigraph setup
\usepackage{epigraph}
\renewcommand{\epigraphflush}{center}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% TikZ related imports
\usepackage{tikz}
\usetikzlibrary{arrows}
\usetikzlibrary{automata}
\usetikzlibrary{calc}
\usetikzlibrary{decorations.markings}
\usetikzlibrary{decorations.pathreplacing}
\usetikzlibrary{external}
\usetikzlibrary{fit}
\usetikzlibrary{intersections}
\usetikzlibrary{patterns}
\usetikzlibrary{plotmarks}
\usetikzlibrary{positioning}
\usetikzlibrary{through}
\pgfkeys{/pgf/images/include external/.code=\includegraphics{#1}}
%% Externalization of TikZ images
% Uncomment to enable:
\tikzexternalize
\tikzsetexternalprefix{tikz_cache/}
%% e-Machine style and supporting code
\input{vaucanson.tikz}
%% I-Diagram stuff
\input{idiagrams.tikz}
%%% pgfplots
\usepackage{pgfplots}
\usepgfplotslibrary{colorbrewer}
\usepgfplotslibrary{fillbetween}
\usepgfplotslibrary{groupplots}
\usepgfplotslibrary{units}
\pgfplotsset{compat=newest}
%% allow visibility stuff in tikz
% \tikzset{
% invisible/.style={opacity=0.2},
% visible on/.style={alt={#1{}{invisible}}},
% alt/.code args={<#1>#2#3}{%
% \alt<#1>{\pgfkeysalso{#2}}{\pgfkeysalso{#3}}%
% }
% }
%% Dynamically add plot labels to the legend, commented out because it is
%% incompatible with the standard legend code. Useful in Beamer talks.
% \pgfplotsset{
% legend entry/.initial=,
% every axis plot post/.code={%
% \pgfkeysgetvalue{/pgfplots/legend entry}\tempValue
% \ifx\tempValue\empty
% \pgfkeysalso{/pgfplots/forget plot}%
% \else
% \expandafter\addlegendentry\expandafter{\tempValue}%
% \fi
% },
% }
\usepackage{pgfplotstable}
\usepackage{tcolorbox}
\tcbuselibrary{breakable}
\tcbuselibrary{skins}
\usepackage{circuitikz}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% colors
\colorlet {past_color} {red}
\colorlet {pres_color} {blue}
\colorlet {futu_color} {black!30!green}
\colorlet {temp_color_1} {red!50!blue}
\colorlet {temp_color_2} {red!50!green}
\colorlet {temp_color_3} {blue!50!green}
\colorlet {hmu_color} {blue!67!green}
\colorlet {rhomu_color} {temp_color_1!80!blue}
\colorlet {rmu_color} {blue}
\colorlet {bmu_1_color} {temp_color_1}
\colorlet {bmu_2_color} {temp_color_3}
\colorlet {qmu_color} {temp_color_1!67!green}
\colorlet {wmu_color} {temp_color_2!57!blue}
\colorlet {sigmamu_color} {temp_color_2}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Used for code samples
%% listings
\usepackage{listings}
\lstdefinestyle{mypython}{
language=Python, % Code langugage
basicstyle=\small\ttfamily, % Code font, Examples: \footnotesize, \ttfamily
keywordstyle=\color{green!50!black}, % Keywords font ('*' = uppercase)
commentstyle=\color{gray}, % Comments font
numbers=left, % Line nums position
numberstyle=\tiny, % Line-numbers fonts
stepnumber=1, % Step between two line-numbers
numbersep=5pt, % How far are line-numbers from code
backgroundcolor=\color{gray!10}, % Choose background color
frame=none, % A frame around the code
tabsize=2, % Default tab size
captionpos=b, % Caption-position = bottom
breaklines=true, % Automatic line breaking?
breakatwhitespace=false, % Automatic breaks only at whitespace?
showspaces=false, % Dont make spaces visible
showtabs=false, % Dont make tabls visible
morekeywords={as}, % Additional keywords
}
%% minted
\makeatletter
\@ifclassloaded{beamer}
{
\usepackage{minted}
% automatic line breaks:
\ExplSyntaxOn
\box_new:N \l_fvrb_box
\tl_new:N \l_fvrb_tl
\RenewDocumentCommand \FancyVerbFormatLine { m }
{
\hbox_set:Nn \l_fvrb_box { #1 }
\dim_compare:nNnTF { \box_wd:N \l_fvrb_box }>{ \linewidth }
{%box to big
\tl_set:Nn \l_fvrb_tl { #1 }
\fvrb_use_tl:N \l_fvrb_tl
}
{%box fits
\box_use:N \l_fvrb_box
}
}
\cs_new:Npn \fvrb_use_tl:N #1
{
\group_begin:
\null\hfill\vbox_set:Nn \l_fvrb_box
{\hsize=\linewidth
\renewcommand\thelinenumber{
\ifnum\value{linenumber}=1\relax\else\fi
}
\begin{internallinenumbers}
\advance\hsize by -2em
\hspace*{-2em}\tl_use:N #1
\end{internallinenumbers}
}
\box_use:N \l_fvrb_box
\group_end:
}
\ExplSyntaxOff
}
{
}
\makeatother
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Various theorem styles
\theoremstyle{plain} \newtheorem{Lem}{Lemma}
\theoremstyle{plain} \newtheorem*{ProLem}{Proof}
\theoremstyle{plain} \newtheorem{Cor}{Corollary}
\theoremstyle{plain} \newtheorem*{ProCor}{Proof}
\theoremstyle{plain} \newtheorem{The}{Theorem}
\theoremstyle{plain} \newtheorem*{ProThe}{Proof}
\theoremstyle{plain} \newtheorem{Prop}{Proposition}
\theoremstyle{plain} \newtheorem*{ProProp}{Proof}
\theoremstyle{plain} \newtheorem*{Conj}{Conjecture}
\theoremstyle{plain} \newtheorem*{Rem}{Remark}
\theoremstyle{plain} \newtheorem{Def}{Definition}
\theoremstyle{plain} \newtheorem*{Not}{Notation}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Configure cleveref
\usepackage[capitalise]{cleveref} % Automatically label references
\crefname{Lem}{Lemma}{Lemmas}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Logos
\newcommand{\csclogo}{
\centering
\tikzsetnextfilename{csclogo}
\begin{tikzpicture}
\draw (0, 0) node {\includegraphics[height=1.0cm]{images/expanded_logo_cmyk_blue}};
\draw (0, 0.7) node [color=ucdblue, scale=0.9] {\small Complexity Sciences Center};
\end{tikzpicture}
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Finally, computational mechanics and information theory macros
\DeclareMathOperator*{\argmax}{arg\,max}
\DeclareMathOperator*{\argmin}{arg\,min}
\input{cmechabbrev}
\input{infotheory}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Uncomment to list package versions:
% \listfiles
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Document configuration
\setlength{\parindent}{0pt}
\setlength{\parskip}{3pt plus 2pt minus 2pt}
\def \justify {\justifying \leftskip 0.0cm \rightskip 0.5cm}
\newcommand{\vtiny}{\fontsize{5.5pt}{1pt}\selectfont}
\makeatletter
\@ifclassloaded{beamer}
{
\hypersetup{
linkcolor={blue!50!black},
citecolor={blue!50!black},
urlcolor={blue!80!black},
}
}
{
\hypersetup{
colorlinks,
linkcolor={blue!50!black},
citecolor={blue!50!black},
urlcolor={blue!80!black},
}
}
\makeatother
% working paper commands
\newcommand{\arxiv}[1]{\href{http://arxiv.org/abs/#1}{\texttt{arXiv}:#1}}
% SFI working papers do not have friendly URLs:
\newcommand{\sfiwp}[1]{Santa Fe Institute Working Paper #1}