/
macros.tex
executable file
·160 lines (115 loc) · 3.42 KB
/
macros.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
%% To do: trim these definitions
\newcommand\nc\newcommand
\nc\rnc\renewcommand
\usepackage{epsfig}
\usepackage{latexsym}
%% %% lhs2tex messes with verbatim, and I lose spacing.
%% \usepackage{fancyvrb}
%% \usepackage{enumitem}
%% \setlist[1]{labelindent=\parindent,itemsep=0.5in,label=$\bullet$}
%% \setlist[2]{labelindent=\parindent,itemsep=0.5in,label=$\bullet$}
\nc\out[1]{}
\nc\mynoteOut[2]{\mynote{#1}\out{#2}}
% While working, use these defs
%% \nc\mynote[1]{{\em [#1]}}
%% \nc\mynotefoot[1]{\footnote{\mynote{#1}}}
% But for the submission, use these
\nc\mynote\out
\nc\mynotefoot\out
\nc\todo{\mynote{To do.}}
\nc\figlabel[1]{\label{fig:#1}}
\nc\figref[1]{Figure~\ref{fig:#1}}
\nc\needcite{\mynote{ref}}
% \nc{\Opid}[1]{\operatorname{#1}}
\nc{\Opid}[1]{\Varid{#1}}
\nc{\Varap}[1]{\Opid{#1}\,}
\nc{\Varapp}[2]{\Varap{#1}{(#2)}}
\nc\wpicture[2]{\includegraphics[width=#1]{Figures/#2}}
\nc\wfig[2]{
\begin{center}
\wpicture{#1}{#2}
\end{center}
}
\nc\fig[1]{\wfig{4in}{#1}}
\nc\usebg[1]{\usebackgroundtemplate{\wpicture{1.2\textwidth}{#1}}}
\nc\framet[2]{\frame{\frametitle{#1}#2}}
\nc\framel[2]{\framet{\hypertarget{#1}{#1}}{#2}}
\nc\hidden[1]{}
\newcommand{\Pair}{\Varid{Pair}}
\newcommand{\stat}[6]{
#1 & #2 & #3 & #4 & #5 & #6 \\ \hline
}
\newcommand{\fftStats}[1]{
\begin{center}
\begin{tabular}{|c|c|c|c|c|c|}
\hline
\stat{Type}{$+$}{$\times$}{$-$}{total}{max depth} \hline
#1
\hline
\end{tabular}
\end{center}
}
\nc{\subo}{_{\!\mathit{1}}}
\nc\partframe[1]{\framet{}{\begin{center} \vspace{6ex} {\Huge \textcolor{partColor}{#1}} \end{center}}}
\nc\symTwo[1]{\mathbin{#1\!\!\!#1}}
\nc\symThree[1]{\mathbin{#1\!\!#1\!\!#1}}
\usefonttheme{serif}
\usepackage{framed}
\usepackage{hyperref}
\usepackage{color}
\definecolor{linkColor}{rgb}{0,0.42,0.3}
\definecolor{partColor}{rgb}{0,0,0.8}
\hypersetup{colorlinks=true,urlcolor=linkColor, linkcolor=partColor}
\usepackage{graphicx}
\usepackage{color}
\DeclareGraphicsExtensions{.pdf,.png,.jpg}
\usepackage{geometry}
% \usepackage[a4paper]{geometry}
%% \usepackage{wasysym}
\usepackage{mathabx}
\usepackage{setspace}
\usepackage{enumerate}
\usepackage{tikzsymbols}
% \usepackage{fancybox}
\usepackage[many]{tcolorbox}
\tcbset{enhanced,boxrule=0.5pt,colframe=black!50!blue,colback=white,boxsep=-2pt,drop fuzzy shadow}
\usepackage[absolute,overlay]{textpos} % ,showboxes
\TPGrid{364}{273} %% roughly page size in points
\useinnertheme[shadow]{rounded}
% \useoutertheme{default}
\useoutertheme{shadow}
\useoutertheme{infolines}
% Suppress navigation arrows
\setbeamertemplate{navigation symbols}{}
\newcommand\sourced[1]{\href{#1}{\tiny (source)}}
\author{\href{http://conal.net}{Conal Elliott}}
\graphicspath{{Figures/}}
\definecolor{shadecolor}{rgb}{0.95,0.95,0.95}
\setlength{\fboxsep}{0.75ex}
\setlength{\fboxrule}{0.15pt}
%% \setlength{\shadowsize}{2pt}
%% \nc\cbox[1]{\raisebox{-0.5\height}{\fbox{#1}}}
\nc\cpic[2]{\fbox{\wpicture{#1}{circuits/#2}}}
\nc\ccap[3]{
\begin{minipage}[c]{0.48\textwidth}
\begin{center}
\cpic{#2}{#3}\par\vspace{0.5ex}#1\par
\end{center}
\end{minipage}
}
\setlength{\itemsep}{2ex}
\setlength{\parskip}{1ex}
% \setstretch{1.2} % ??
\nc\pitem{\pause\item}
%% Double quote symbol
\nc\dq{\text{\tt\char34}}
%% Quoted haskell string with formatted content
\nc\hquoted[1]{\dq\!#1\!\dq}
%% Pandoc introduces tightlist
\nc\tightlist{\itemsep1ex}
\nc\btimes{\pmb{\times}}
\nc\bzero{\pmb{0}}
\nc\bplus{\pmb{+}}
% \nc\bcomp{\pmb{\circ}}
\nc\bcomp{\circ}
%% \usepackage{stmaryrd}