% -----------------------------*- LaTeX -*------------------------------ % SCRIBE.STY -- Make scribe notes % % Constantine Caramanis; August, 2007 % % Modified from a version by Jeff Erickson (jeffe@cs.uiuc.edu), July 29, 1998 % % Loosely based on the MIT/Berkeley scribe notes macros, but % written from scratch. % % ---------------------------------------------------------------------- % USAGE: % % \documentstyle[12pt]{report} NOT article! % \usepackage{scribe} % ... % \begin{document} % \course{EECS 227} optional % \coursetitle{Optimization} optional % \semester{Fall 2004} optional % \lecturer{Jeff Erickson} optional % \scribe{Joe. A Student} required % \lecturenumber{17} required (must be a number) % \lecturedate{October 12} required (omit year) % \maketitle % ---------------------------------------------------------------------- % The stuff before \maketitle can be in any order, but it has to go % before \maketitle. % % The lecture number appears in all page, section, theorem, figure, % table, and equation numbers. It must be a single positive % integer; ranges like 3--5 are not (yet) properly supported. % % Automatically loads the amsmath package, which is a Good Thing, % especially if you're going to use a lot of math. See ``The LaTeX % Companion'' for details! % % To get a proof, use \begin{proof}...\end{proof}. You can attach % an optional argument, just as with the standard latex theorem % environment. You can also define new proof-like environments with % \newproof{foo}{bar}, just like \newtheorem. % ---------------------------------------------------------------------- \RequirePackage{amsmath,amssymb} \def\course#1{\def\@course{#1}} \course{EE 381V} \def\coursetitle#1{\def\@coursetitle{#1}} \coursetitle{Convex Optimization --- Theory and Applications} \def\semester#1{\def\@semester{#1}} \semester{Fall 2007} \def\lecturer#1{\def\@lecturer{#1}} \lecturer{Constantine Caramanis} \def\scribe#1{\def\@scribe{#1}} % \@scribe intentionally undefined \def\lecturenumber#1{\def\@lecturenumber{#1}} % \@lecturenumber intentionally undefined \def\lecturedate#1{\def\@lecturedate{#1}} % \@lecturedata intentionally undefined \def\xxx{\vphantom{()}} \def\maketitle { \def\@oddhead{\underline{\hbox to\textwidth{\textbf{% \rlap{\@course\phantom{()}}\hfil Lecture~\@lecturenumber~--- \@lecturedate \hfil\llap{\@semester}}}}} \def\@oddfoot{\hfil\@lecturenumber-\thepage\hfil} \def\ps@myfirst{\ps@plain\def\@oddfoot{\hfil\@lecturenumber-\thepage\hfil}} \thispagestyle{myfirst} \noindent \framebox[\textwidth]{\vbox to 0.75in{ \hbox to\textwidth{~\textbf{\rlap{\@course: \@coursetitle\xxx} \hfil\llap{\@semester}}~} \vss \hbox to \textwidth{\Large\hfill Lecture \@lecturenumber~--- \@lecturedate\hfill} \vss \hbox to \textwidth{~\textsl{\rlap{Lecturer: \@lecturer\xxx} \hfill\llap{Scribe: \@scribe}}~} }} \setcounter{chapter}{\@lecturenumber} \bigskip } % ---------------------------------------------------------------------- % Add a period after the theorem number, and make theorems slanted % instead of italic to help distinguish text from math. % ---------------------------------------------------------------------- \def\@begintheorem#1#2{\trivlist \item[\hskip \labelsep{\bf #1\ #2.}]\sl} \def\@opargbegintheorem#1#2#3{\trivlist \item[\hskip \labelsep{\bf #1\ #2\ (#3).}]\sl} % ---------------------------------------------------------------------- % Standard lemma, theorem, and corollary environments. % ---------------------------------------------------------------------- \newtheorem{lemma}{Lemma}[chapter] \newtheorem{theorem}[lemma]{Theorem} \newtheorem{corollary}[lemma]{Corollary} % ---------------------------------------------------------------------- % \newproof{type}{Text}[post] -- Define a new proof-like environment. % Proofs are just like theorems, except they aren't numbered, and % their text is (by default) set in roman type. Proofs can take % optional arguments, just like theorems. The optional ``post'' % argument specifies a postscript, like a QED symbol. % ---------------------------------------------------------------------- \def\newproof#1#2{\@ifnextchar[{\@xnproof{#1}{#2}}{\@xnproof{#1}{#2}[]}} \def\@xnproof#1#2[#3]{\expandafter\@ifdefinable\csname #1\endcsname {\global\@namedef{#1}{\@prf{#2}}\global\@namedef{end#1}{\@endprf{#3}}}} \def\@prf#1{\@ifnextchar[{\@xprf{#1}}{\@yprf{#1}}} \def\@xprf#1[#2]{\begin{trivlist}\item[\hskip\labelsep{\bf #1\ (#2):}]} \def\@yprf#1{\begin{trivlist}\item[\hskip\labelsep{\bf #1:}]} \def\@endprf#1{#1\end{trivlist}} % ---------------------------------------------------------------------- % Standard proof environment. % ---------------------------------------------------------------------- \@ifundefined{square}{\let\square\Box}{} \def\QED{{\boldmath$\square$}} \def\markatright#1{\leavevmode\unskip\nobreak\quad\hspace*{\fill}{#1}} \def\qed{\markatright{\QED}} \newproof{proof}{Proof}[\qed] % ---------------------------------------------------------------------- % Make captions smaller than the text, make their titles bold. % Arguments: #1 == figure name: "Figure 5" % #2 == caption: "Papers by \Erdos, 1900--2000 (projected)" % Put less space after floats, since captions are smaller % ---------------------------------------------------------------------- \long\def\@makecaption#1#2{ \vskip 10pt \setbox\@tempboxa\hbox{{\small \textbf{#1.} #2}} \ifdim \wd\@tempboxa >\hsize % IF longer than one line: {\footnotesize \textbf{#1.} #2\par}% THEN set as ordinary paragraph. \else % ELSE center. \hbox to\hsize{\hfil\box\@tempboxa\hfil} \fi} \dbltextfloatsep 18pt plus 2pt minus 4pt % was 20pt plus 2pt minus 4pt \textfloatsep 18pt plus 2pt minus 4pt % was 20pt plus 2pt minus 4pt % ---------------------------------------------------------------------- % Dangerous bend environments, stolen from TeXbook and slightly % massaged. % % Invoke as \begin{[d]danger}...\end{[d]danger}. The enclosed text % is offset just like any other list (theorem, proof, etc.) Puts % sign[s] in front of first two lines of first paragraph, which are % (supposedly) never split by a page boundary. Does NOT shrink or % otherwise modify the text. % ---------------------------------------------------------------------- % The dangerous bend signs are the correct size to match two lines of % Computer Modern 9pt type. We really ought to scale them up to % fit whatever size we're using, but we don't. Unfortunately, manfnt % is actually a 10pt font, so if we want to match 11pt Computer % Modern, we have to scale manfnt to 12.222222pt! Thanks, Don. % ---------------------------------------------------------------------- \font\manual=manfnt \def\dbend{{\manual\char127}} % dangerous bend sign % Danger, Will Robinson! \def\danger{\begin{trivlist}\item[]\noindent% \begingroup\hangindent=3pc\hangafter=-2%\clubpenalty=10000% \def\par{\endgraf\endgroup}% \hbox to0pt{\hskip-\hangindent\dbend\hfill}\ignorespaces} \def\enddanger{\par\end{trivlist}} % Danger! Danger! \def\ddanger{\begin{trivlist}\item[]\noindent% \begingroup\hangindent=3pc\hangafter=-2%\clubpenalty=10000% \def\par{\endgraf\endgroup}% \hbox to0pt{\hskip-\hangindent\dbend\kern2pt\dbend\hfill}\ignorespaces} \def\endddanger{\par\end{trivlist}} % Formatting \oddsidemargin .00in \evensidemargin .00in \marginparwidth 0.07 true in \addtolength{\headsep}{0.25in} \textheight 8.5 true in \textwidth 6.5 true in \clubpenalty=10000 \topmargin -1.30cm %\oddsidemargin -0.5cm %\evensidemargin -0.5cm %\textwidth 17.3cm \headheight 0.00cm \headsep 0.7in %\textheight 24cm %\parskip 0.06in % additional definitions \newtheorem{proposition}[lemma]{Proposition} \newenvironment{definition}[1][Definition]{\begin{trivlist} \item[\hskip \labelsep {\bfseries #1}]}{\end{trivlist}} \newtheorem{remark}{Remark} \newcommand{\R}{\mathbb R} \newcommand{\vect}[1]{{\boldsymbol #1 }} \newcommand{\ceil}[1]{\left\lceil #1 \right\rceil} \newcommand{\floor}[1]{\left\lfloor #1 \right\rfloor} \newcommand{\inprod}[2]{\langle #1 , #2 \rangle } \newcommand{\bc}{\begin{center}} \newcommand{\ec}{\end{center}} \newcommand{\bz}{\vect{z}} \newcommand{\vv}[1]{\boldsymbol #1} \newcommand{\by}{\mbox{\boldmath $y$}} \newcommand{\refs}[1]{(\ref{#1})} \newcommand{\refds}[2]{({#1}.\ref{#2})} \newcommand{\bX}{\vect{X}} \newcommand{\bx}{\vect{x}} \newcommand{\bZ}{\boldsymbol Z} \newcommand{\N}{\mathbb N} \newcommand{\m}[1]{\mathcal{#1}} %COMMANDS \newcommand{\be}{\begin{equation}} \newcommand{\ee}{\end{equation}} \newcommand{\beaa}{\begin{eqnarray*}} \newcommand{\eeaa}{\end{eqnarray*}} \newcommand{\ben}{\begin{enumerate}} \newcommand{\een}{\end{enumerate}} \newcommand{\db}{\hspace*{\fill}{\zapf o}} \newcommand{\cpn}[1]{\caption{\myfont #1}} \newcommand{\bpn}{\begin{proposition}\twlsf} \newcommand{\epn}{\db\end{proposition}} \newcommand{\bdm}{\begin{displaymath}} \newcommand{\edm}{\end{displaymath}} \newcommand{\supp}{\rm{supp}} \newcommand{\op}[1]{\mbox{op}_{#1}} \newcommand{\conv}{\mathop{\rm conv}} \newcommand{\cl}{\mathop{\rm cl}} \newcommand{\epi}{\mathop{\rm epi}} \newcommand{\st}{\mathop{\rm st}}