-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpreamble.tex
More file actions
134 lines (102 loc) · 2.84 KB
/
Copy pathpreamble.tex
File metadata and controls
134 lines (102 loc) · 2.84 KB
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
% \usepackage[
% hidelinks,
% colorlinks=false,
% pdftex,
% pdfpagelabels,
% bookmarks,
% hyperindex,
% hyperfigures,
% linktoc=all,
% bookmarksnumbered=true,
% bookmarksopen=true
% ]{hyperref}
\hypersetup{}
% Recommended, but optional, packages for figures and better typesetting:
\usepackage{microtype}
\usepackage{caption}
\usepackage{subcaption}
\usepackage{booktabs} % for professional tables
\usepackage{tabularx}
\usepackage[T1]{fontenc} % use 8-bit T1 fonts
\usepackage{amsfonts} % blackboard math symbols
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{nicefrac} % compact symbols for 1/2, etc.
\usepackage[utf8]{inputenc}
\usepackage[pdftex]{graphicx}
% declare the path(s) where your graphic files are
\graphicspath{{images/}}
% and their extensions so you won't have to specify these with
% every instance of \includegraphics
\DeclareGraphicsExtensions{.pdf,.jpeg,.png}
\usepackage{algorithm}
\usepackage{algorithmic}
\usepackage{url}
% \usepackage{geometry}
% % \usepackage{color}
% \usepackage[dvipsnames,table]{xcolor}
\usepackage{wrapfig}
% % correct bad hyphenation here
\hyphenation{}
\usepackage{natbib}
% diagrams
\usepackage{tikz}
\usetikzlibrary{bayesnet}
% plots
\usepackage{pgfplots}
\pgfplotsset{compat=1.15}
% environment to fit diagrams
\usepackage{environ}
\makeatletter
\newsavebox{\measure@tikzpicture}
\NewEnviron{scaletikzpicturetowidth}[1]{%
\def\tikz@width{#1}%
\def\tikzscale{1}\begin{lrbox}{\measure@tikzpicture}%
\BODY
\end{lrbox}%
\pgfmathparse{#1/\wd\measure@tikzpicture}%
\edef\tikzscale{\pgfmathresult}%
\BODY
}
\makeatother
% support referencing external document
\usepackage{xr}
\makeatletter
\newcommand*{\addFileDependency}[1]{% argument=file name and extension
\typeout{(#1)}
\@addtofilelist{#1}
\IfFileExists{#1}{}{\typeout{No file #1.}}
}
\makeatother
\newcommand*{\myexternaldocument}[1]{%
\externaldocument{#1}%
\addFileDependency{#1.tex}%
\addFileDependency{#1.aux}%
}
% carry counters between external documents
\newcounter{docpart}
\def\savestatus{%
\newwrite\tempfile%
\immediate\openout\tempfile=docstatus\arabic{docpart}.dat%
\immediate\write\tempfile{\thesection}%
\immediate\write\tempfile{\theequation}%
\immediate\closeout\tempfile%
}
\newcounter{olddocpart}
\def\recallstatus{%
\setcounter{olddocpart}{\arabic{docpart}}
\addtocounter{olddocpart}{-1}
\newread\rtempfile%
\openin\rtempfile=docstatus\arabic{olddocpart}.dat%
\read\rtempfile to \tmp%
\setcounter{section}{\tmp}
\read\rtempfile to \tmp%
\setcounter{equation}{\tmp}%
\closein\rtempfile%
}
% Attempt to make hyperref and algorithmic work together better:
% \newcommand{\theHalgorithm}{\arabic{algorithm}}
\usepackage{wrapfig}
\usepackage{multirow}
% add notations
\input{preamble-notations}