-
Notifications
You must be signed in to change notification settings - Fork 4
/
preamble.tex
52 lines (43 loc) · 1.47 KB
/
preamble.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
% Package includes
\usepackage{caption}
\usepackage{changepage}
\usepackage[style=iso]{datetime2}
\usepackage{enumitem}
\usepackage{graphicx}
\usepackage[a4paper,margin=20mm]{geometry}
\usepackage{float}
\usepackage[colorlinks,citecolor=Navy,linkcolor=Navy]{hyperref}
\usepackage{longtable}
\usepackage{textcomp}
\usepackage[svgnames]{xcolor}
\usepackage[nocolor]{drawstack}
\setlength{\parskip}{0.5\baselineskip}
\setlength{\tabcolsep}{4pt}
\newenvironment{smalltables}{\small}{\normalsize}
% include this to debug page layout:
% \usepackage{showframe}
\captionsetup[table]{labelformat=empty}
\graphicspath{ {./images/} }
% commands to format instruction and register names
\newcommand{\insn}[1]{\texttt{#1}}
\newcommand{\reg}[1]{\texttt{#1}}
\newcommand{\an}{\texttt{a\textit{n}}}
% some formatting helpers
\newcommand{\fixme}[1]{\textcolor{purple}{\textit{FIXME: #1}}}
\newcommand{\note}[1]{
\begin{adjustwidth}{3cm}{}
\begin{flushright}
\textit{#1}
\end{flushright}
\vspace{\parskip}
\end{adjustwidth}
}
% Similar to \cellpt command from drawstack package, but points
% to the next divider between cells. See drawstack.sty for the
% definition of \cellptr. This differs only in "\value{cellnb}-0.5"
% instead of "\value{cellnb}-1".
\newcommand{\cellptrdiv}[1]{
\draw[<-,line width=0.7pt] (0,\value{cellnb}-0.5) +(2,\value{ptrnb}*0.1) -- +(2.5,\value{ptrnb}*0.45);
\draw (2.5,\value{ptrnb}*0.5+\value{cellnb}-0.5) node[anchor=west] {#1};
\addtocounter{ptrnb}{1}
}