-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpreamble.sty
155 lines (134 loc) · 3.68 KB
/
preamble.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
\ProvidesPackage{preamble}
\iflncs
\usepackage[pdftex]{graphicx}
% \usepackage[linesnumbered,ruled,noend]{algorithm2e}
\usepackage[english]{babel}
\usepackage{amsmath}
\usepackage{algorithm}
\usepackage{longtable}
\usepackage{calc}
% \usepackage{subfigure}
\usepackage{caption}
\usepackage{subcaption}
\fi
\usepackage{algpseudocode}
\iflncs
\let\proof\relax
\let\endproof\relax
\fi
\usepackage{amsthm}
\usepackage{mathtools}
\usepackage{amssymb}
\usepackage{lmodern}
\usepackage[T1]{fontenc}
\usepackage{listings}
\usepackage{graphviz}
\usepackage{dot2texi}
\usepackage{tikz}
\usepackage{pgfplots}
\usetikzlibrary{shapes,arrows}
\usepackage{color}
\usepackage{hyperref}
\def\UrlBreaks{\do\/\do-}
\usepackage{import}
\usepackage{hhline}
\usepackage{paralist}
\usepackage{thm-restate}
\usepackage{marvosym}
\usepackage{calc}
%code options with \lstlisting
\lstset{frame=tb,
showstringspaces=false,
columns=flexible,
basicstyle=\ttfamily,
keywordstyle=\color{blue},
commentstyle=\color{dkgreen},
stringstyle=\color{mauve},
breaklines=true,
breakatwhitespace=true,
tabsize=3,
escapeinside={(*@}{@*)},
frame=n
}
\lstdefinestyle{numbers}{numbers=left, stepnumber=1, numberstyle=\tiny, numbersep=10pt}
\let\origthelstnumber\thelstnumber
\makeatletter
\newcommand*\Suppressnumber{%
\lst@AddToHook{OnNewLine}{%
\let\thelstnumber\relax%
\advance\c@lstnumber-\@ne\relax%
}%
}
\newcommand*\Reactivatenumber{%
\lst@AddToHook{OnNewLine}{%
\let\thelstnumber\origthelstnumber%
\advance\c@lstnumber\@ne\relax}%
}
%bitcoin character
\def\bitcoin{%
\leavevmode
\vtop{\offinterlineskip %\bfseries
\setbox0=\hbox{B}%
\setbox2=\hbox to\wd0{\hfil\hskip-.03em
\vrule height .3ex width .15ex\hskip .08em
\vrule height .3ex width .15ex\hfil}
\vbox{\copy2\box0}\box2}}
%fontsize between \LARGE and \huge
\makeatletter
\newcommand\semihuge{\@setfontsize\semihuge{19.22}{23.88}}
\makeatother
%environment for separate proof
\newenvironment{sepproof}[1]{\noindent \textbf{#1}}{\qed \smallskip \ \\}
%environment for proof sketch
\newenvironment{proofsketch}{\noindent \textit{Proof Sketch.}}{\qed \smallskip \ \\}
%eliminate section numbering from \subsection
\renewcommand{\thesubsection}{\arabic{subsection}}
%page style set to plain
\pagestyle{plain}
% \bibliographystyle{splncs}
%PDF bookmarks
\definecolor{darkblue}{rgb}{0.0,0.0,0.3}
\hypersetup{colorlinks,breaklinks,
linkcolor=darkblue,urlcolor=darkblue,
anchorcolor=darkblue,citecolor=darkblue}
%custom figures counter
\newcounter{figcount}
\newcommand{\figlabel}[1]{\refstepcounter{figcount}\arabic{figcount}\label{#1}}
\algblockdefx[Contract]{Contract}{EndContract}
[1]{\textbf{contract #1}}
[0]{\textbf{end contract}}
\algblockdefx[Payable]{Payable}{EndPayable}
[2]{\textbf{payable function #1}(#2)}
[0]{\textbf{end function}}
\algblockdefx[Internal]{Internal}{EndInternal}
[2]{\textbf{internal function #1}(#2)}
[0]{\textbf{end function}}
\def\Let#1#2{\State $#1\gets#2$}
\newcommand{\CommentLine}[1]{
\State \(\triangleright\) \text{#1}
}
\hyphenation{block-chain}
\hyphenation{block-chains}
\hyphenation{in-ter-led-ger}
\hyphenation{pol-ka-dot}
\hyphenation{ten-der-mint}
\hyphenation{NI-Po-PoW}
\hyphenation{NI-Po-PoWs}
\hyphenation{side-chain side-chains}
\hyphenation{cryp-to-cur-ren-cy cryp-to-cur-ren-cies}
\hyphenation{bit-coin bit-coins}
\hyphenation{ethe-re-um}
\hyphenation{mo-ne-ro}
\hyphenation{dec-red}
\hyphenation{Ouro-boros}
\newcommand{\pluseq}{\mathrel{+}=}
\newcommand{\minuseq}{\mathrel{-}=}
\newcommand{\stareq}{\mathrel{*}=}
\newcommand{\slasheq}{\mathrel{/}=}
\newcommand\blfootnote[1]{%
\begingroup
\renewcommand\thefootnote{}\footnote{#1}%
\addtocounter{footnote}{-1}%
\endgroup
}
\input{macros}