-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrcstalk.sty
168 lines (146 loc) · 4.91 KB
/
rcstalk.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
156
157
158
159
160
161
162
163
164
165
166
167
168
%% -*- LaTeX -*-
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{rcstalk}
\DeclareOption{oldspacing}{}
\ProcessOptions\relax
%\renewcommand{\baselinestretch}{1.2}
\usepackage[oldspacing]{rcsutil}
\usepackage{fontspec}
\usepackage{xkcdcolors}
%
% Tikz/PGF
%
\usepackage{tikz}
\usetikzlibrary{shapes,arrows,shadows,positioning,patterns,matrix,calc}
\usepackage{pgf}
\usepackage{pgfplots}
\pgfplotsset{compat=1.17}
%
% Set Fonts
%
\usepackage[default]{opensans}
\usepackage{sourcecodepro}
%\setmonofont{Consolas}
%\setsansfont{OpenSans-SemiBold}[
% BoldFont=OpenSans-ExtraBold,
% ItalicFont=OpenSans-SemiBoldItalic,
% BoldItalicFont=OpenSans-ExtraBoldItalic
%]
%\setmainfont{OpenSans-SemiBold}
\setbeamercovered{invisible}
% http://tex.stackexchange.com/questions/9261/using-opacity-in-tikz-causes-strange-rendering-in-acrobat
% http://tex.stackexchange.com/questions/29523/inkscape-pdf-includegraphics-xelatex-changed-colors/29532
\pdfpageattr{/Group <</S /Transparency /I true /CS /DeviceRGB>>}
% http://tex.stackexchange.com/questions/26071/how-can-i-have-colored-and-underlined-links-with-hyperref
\Hy@AtBeginDocument{%
% Overrides border definition set with colorlinks=true:
\def\@pdfborder{0 0 1}
% Overrides border style set with colorlinks=true
% Hyperlink border style will be underline of width 1pt
\def\@pdfborderstyle{/S/U/W 1}
}
%
% Some colors
%
%% \newcommand<>{\Blue}[1]{{\color#2{beamer@blendedblue}#1}}
%% \newcommand{\Green}[1]{\mbox{}{\color[rgb]{0,.8,0}#1}}
%% \newcommand{\Black}[1]{\mbox{}{\color[rgb]{0,0,0}#1}}
%% \newcommand{\Maroon}[1]{\mbox{}{\color[rgb]{.79,.19,.38}#1}}
%% \newcommand{\Purple}[1]{\mbox{}{\color[rgb]{.5,0,1}#1}}
%% \newcommand{\Orange}[1]{\mbox{}{\color[rgb]{.9,.55,0}#1}}
\newcommand{\Magenta}[1]{\mbox{}{\color[rgb]{1,0,1}#1}}
\def\Green{\textcolor{few-green-bright}}
\def\Orange{\textcolor{few-orange-bright}}
\def\Maroon{\textcolor{xkcdMaroon}} %few-blue-bright}}
\def\Blue{\textcolor{xkcdBlue}} %few-blue-bright}}
\def\Pink{\textcolor{few-pink-bright}}
\def\Purple{\textcolor{few-purple-bright}}
\def\Brown{\textcolor{few-brown-bright}}
%
% Listings with ` and ' as escape codes
%
%\definecolor{comment}{rgb}{0,0,1}
%\usepackage{listings}
\lstdefinestyle{ccode}{
showstringspaces=false,
stringstyle={\ttfamily\color{string}},
language=C,escapeinside=`',columns=flexible,commentstyle=\color{comment},
keepspaces=true,
morekeywords={_Atomic,bool},
basicstyle=\ttfamily
}
\lstnewenvironment{ccode}[1][]%
{\lstset{style=ccode,basicstyle=\ttfamily\openup-.17\baselineskip,#1}}%
{}
\lstnewenvironment{smallccode}[1][]%
{\lstset{style=ccode,%
basicstyle=\small\ttfamily\openup-.17\baselineskip,#1}}%
{}
\lstdefinestyle{javacode}{
showstringspaces=false,
stringstyle={\ttfamily\color{string}},
language=Java,
escapeinside=`',
columns=flexible,
commentstyle=\color{comment},
basicstyle=\ttfamily
}
\lstnewenvironment{javacode}[1][]%
{\lstset{style=javacode,basicstyle=\ttfamily\openup-.17\baselineskip,#1}}%
{}
\lstnewenvironment{asm}[1][]%
{\lstset{language=[x64]Assembler,
escapeinside=`',%
columns=flexible,%
comment=[l]\#,%
commentstyle=\color{comment},%
basicstyle=\ttfamily\openup-.17\baselineskip,%
#1}}%
{}
% Prosper compatibility
% Note, make sure you never have:
% {...
% \end{slide}}
% As the closing } will mess up verbatim compatibility. You must say:
% \end{slide}
% } % - where the \end{slide} is on its own line
\newenvironment{slide}[1]%
{\begin{frame}[fragile,environment=slide]
\frametitle{{#1}}%
\par\vskip0.5\baselineskip minus 0.2\baselineskip}
{\end{frame}}
\def\widen#1{}
% Compatibility
\let\slname=\frametitle
%
% Extension codes
%
\makeatletter
\newcommand{\extensioncode}{{%
\@ifundefined{theextensioncode}{\input{extensioncode}}{}%
\setbox0=\hbox{\texttt{\theextensioncode{}}}%
\@ifundefined{exposeextensioncode}%
{\hbox to\wd0{\cleaders\vrule height \ht0 depth \dp0\hfill}}%
{\unhbox0}%
}}
\makeatother
\title{CS350: Operating Systems}
\author{Ali Mashtizadeh}
\institute{University of Waterloo}
\date{}
\newcommand{\cref}[2]{\href{https://rcs.uwaterloo.ca/~ali/#1}{#2}}
\newcommand{\man}[1]{\href{https://man.freebsd.org/cgi/man.cgi?query=#1}{\texttt{#1}}}
\newcommand{\manp}[1]{\href{https://man.freebsd.org/cgi/man.cgi?query=#1}{\texttt{#1()}}}
\newcommand{\grok}[1]{\href{https://cs350.rcs.uwaterloo.ca/opengrok/xref/#1}{#1}}
\newcommand{\grokdef}[1]{\href{https://cs350.rcs.uwaterloo.ca/opengrok/search?defs=#1}{#1}}
%
% This string gets extracted as the name of the link for index.html on
% the lecture notes page. It is an error not to call topic.
%
\makeatletter
\newcommand{\topic}[1]{%
\def\my@topic{#1}\immediate\write16{Lecture Topic: \my@topic}}
\makeatother
\AtEndDocument{\expandafter\ifx\csname my@topic\endcsname\relax%
% This error happens if you don't call \topic
\ErrorMustCallTopic\fi}