% Scribe template for CS199 Beyond Worst Case Analysis. To use this style file
% place it in the same directory as the tex file and include it in the
% document's preamble with...
%
% \usepackage{bwca-scribe}
%
% To create the title header, use the \lecture macro below at the top of the
% document's body. This style file imports a number of useful packages, sets
% counters for the scribe note relative to the lecture number and aliases a
% number of mathematical symbols.

\usepackage{graphics}
\usepackage{graphicx}
\usepackage{microtype}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{amsthm}
\usepackage{algorithm}
\usepackage{algpseudocode}
\usepackage{fullpage,color}
\usepackage{enumerate}
\usepackage{url,hyperref}
\usepackage{multicol}
\usepackage{fancyhdr}
\usepackage{paralist}

\newcommand{\etal}{{\em et al.}\ }
\newcommand{\assign}{\leftarrow}
\newcommand{\eps}{\epsilon}
\newcommand{\opt}{\textup{\textsc{opt}}}
\newcommand{\alg}{\textup{\textsc{alg}}}
\newcommand{\pr}{\textup{Pr}}
\newcommand{\event}{\mathcal{E}}
\newcommand{\expect}{\mathbb{E}}
\newcommand{\variance}{\mathbf{Var}}

\DeclareMathOperator*{\argmin}{\arg\!\min}
\DeclareMathOperator*{\argmax}{\arg\!\max}
\DeclareMathOperator*{\trace}{\textup{tr}}
\DeclareMathOperator*{\rank}{\textup{rank}}

\setlength{\topmargin}{-0.6 in}
\setlength{\textwidth}{6.5 in}
\setlength{\textheight}{8.5 in}
\setlength{\headsep}{0.75 in}
\setlength{\parindent}{0 in}
\setlength{\parskip}{0.2 in}

\newcounter{lecnum}
\renewcommand{\thepage}{\arabic{page}}
\renewcommand{\thesection}{\thelecnum.\arabic{section}}
\renewcommand{\theequation}{\thelecnum.\arabic{equation}}
\renewcommand{\thefigure}{\thelecnum.\arabic{figure}}
\renewcommand{\thetable}{\thelecnum.\arabic{table}}

% Theorem environments
\newtheorem{theorem}{Theorem}[lecnum]
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{proposition}[theorem]{Proposition}
\newtheorem{claim}[theorem]{Claim}
\newtheorem{corollary}[theorem]{Corollary}
\newtheorem{definition}[theorem]{Definition}

\theoremstyle{definition}
\newtheorem{example}[theorem]{Example}

% The following macro is used to generate the header.
% usage: \lecture{LECTURE NUMBER}{TITLE}{SCRIBE}{DATE}
\newcommand{\lecture}[4]{
   \pagestyle{myheadings}
   \thispagestyle{plain}
   \newpage
   \setcounter{lecnum}{#1}
   \setcounter{page}{1}
   \noindent
   \begin{center}
   \framebox{
      \vbox{\vspace{2mm}
    \hbox to 6.28in {{\bf Beyond Worst Case Analysis
                        \hfill Fall 2018}}
       \vspace{6mm}
       \hbox to 6.28in {{\Large \hfill Lecture #1: #2  \hfill}}
       \vspace{5mm}
       \hbox to 6.28in {{Scribe: #3 \hfill #4}}
      \vspace{2mm}}
   }
   \end{center}
   \markboth{Lecture #1: #2}{Lecture #1: #2}
   \vspace*{4mm}
}

% Useful for creating boxes to contain algorithms
\renewenvironment{quote}
  {\list{}{\leftmargin=1em\rightmargin=1em}\item[]}
  {\endlist}

% For referencing boxes that contain algorithms
\newcommand{\alglabel}[1]{\refstepcounter{algorithm}\label{#1}}

% Use this command for a figure; it puts a figure in wherever you want it.
% usage: \fig{NUMBER}{SPACE-IN-INCHES}{CAPTION}
\newcommand{\fig}[3]{
	\vspace{#2}
	\begin{center}
	Figure \thelecnum.#1:~#3
	\end{center}
}
