arnaucube
arnaucube/davinci-paperPublic Self-hosted repository
davinci-paper/v1/build/preamble-macros.tex
v1/build/preamble-macros.texRaw
 1% !TeX root = main.tex
 2
 3% Doc sytle
 4\setcounter{secnumdepth}{3} %enumerate sections up to depth 3 (subsubsection)
 5
 6% Working directory
 7\newcommand{\definedir}[2]{\newcommand{#1}{#2}}
 8\definedir{\secs}{../sections}
 9\definedir{\figs}{../figures}
10\definedir{\bib}{../bibliography}
11
12% Comments
13\newcommand{\marta}[1]{\todo[size=\small, color=red!40]{\textbf{Marta}: #1}}
14\newcommand{\martai}[1]{\todo[inline, size=\small, color=red!40]{\textbf{Marta}: #1}}
15\newcommand{\xavi}[1]{\todo[size=\small, color=green!40]{\textbf{xavi}: #1}}
16\newcommand{\xavii}[1]{\todo[inline, size=\small, color=green!40]{\textbf{Xavi}: #1}}
17\newcommand{\fede}[1]{\todo[size=\small, color=blue!40]{\textbf{Fede}: #1}}
18\newcommand{\fedei}[1]{\todo[inline, size=\small, color=blue!40]{\textbf{Fede}: #1}}
19\newcommand{\ema}[1]{\todo[size=\small, color=irabge!40]{\textbf{Ema}: #1}}
20\newcommand{\emai}[1]{\todo[inline, size=\small, color=orange!40]{\textbf{Ema}: #1}}
21
22% Mathbb
23\newcommand{\N}{\ensuremath{\mathbb{N}}\xspace}
24\newcommand{\Z}{\ensuremath{\mathbb{Z}}\xspace}
25\newcommand{\G}{\ensuremath{\mathbb{G}}\xspace}
26\newcommand{\F}{\ensuremath{\mathbb{F}}}
27
28% Consensus
29\newcommand{\valid}{\texttt{valid}\xspace}
30\newcommand{\invalid}{\texttt{invalid}\xspace}
31\newcommand{\noquorum}{\texttt{noQuorum}\xspace}
32\newcommand{\nocandidate}{\texttt{noCandidate}\xspace}
33\newcommand{\nil}{\texttt{NIL}\xspace}
34\newcommand{\final}{\texttt{final}\xspace}
35\newcommand{\score}{\texttt{score}\xspace}
36\newcommand{\stepvotes}{\texttt{stepVotes}\xspace}
37\newcommand{\unknown}{\texttt{unknown}\xspace}
38\newcommand{\round}{\texttt{R}\xspace}
39\newcommand{\seed}{\texttt{seed}\xspace}
40\newcommand{\step}{\texttt{S}\xspace}
41\newcommand{\credit}{\texttt{c}\xspace}
42\newcommand{\accepted}{\texttt{accepted}\xspace}
43\newcommand{\attested}{\texttt{attested}\xspace}
44\newcommand{\confirmed}{\texttt{confirmed}\xspace}
45\newcommand{\failed}{\texttt{failed}\xspace}
46\newcommand{\stake}{\texttt{stake}\xspace}
47\newcommand{\amount}{\texttt{amount}\xspace}
48\newcommand{\height}{\texttt{height}\xspace}
49\newcommand{\epoch}{\texttt{epoch}\xspace}
50\newcommand{\minstake}{\texttt{minStake}\xspace}
51
52% Others
53\newcommand{\dusk}{{\footnotesize{\sf{DUSK}}}\xspace}
54\newcommand{\noi}{\noindent}
55
56% freefootnote
57\let\svthefootnote\thefootnote
58\newcommand\freefootnote[1]{%
59	\let\thefootnote\relax%
60	\footnotetext{#1}%
61	\let\thefootnote\svthefootnote%
62}
63
64% draft watermark
65\ifdraft{\SetWatermarkScale{4}}{\SetWatermarkScale{0}}
66
67% new foonote referencing a previous footmark
68\makeatletter
69\newcommand\footnoteref[1]{\protected@xdef\@thefnmark{\ref{#1}}\@footnotemark}
70\makeatother