%
% Author
%
\newcommand{\MyName}{Nevin L.\ Zhang}
\newcommand{\AddressLong}
 {Department of Computer Science \\
  Hong Kong University of Science and Technology \\
  Clear Water Bay, Kowloon \\
  Hong Kong \\
  {\tt lzhang@cs.ust.hk}
 }
\newcommand{\AddressShort}
 {Department of Computer Science \\
  Hong Kong University of Science and Technology \\
  {\tt lzhang@cs.ust.hk}
 }

%
% Figure
%
\newcommand{\figwidth}[3]
 {\centerline{\mbox{\psfig{file=#1/#2,width=#3}}}}
\newcommand{\figwidthrotate}[3]
 {\centerline{\mbox{\psfig{file=#1/#2,width=#3,angle=90}}}}
\newcommand{\efigwidth}[3]
 {\centerline{\mbox{\epsfig{file=#1/#2,width=#3}}}}
\newcommand{\efigwidthrotate}[3]
 {\centerline{\mbox{\epsfig{file=#1/#2,width=#3,angle=90}}}}

%
% Program
%
\newenvironment{code}{\begin{tt}\begin{tabular}{l}}{\end{tabular}\end{tt}}

%
% Slide
%
\newcounter{slidestyle}
\newcounter{slide}      
\newcommand{\slide}[2]
 {\ifnum\value{slidestyle}=0\slidestylezero{#1}{#2}
  \else\ifnum\value{slidestyle}=1\slidestyleone{#1}{#2}
  \else\typeout{Warning---Unrecognized slide style}
  \fi\fi
   \addtocounter{slide}{1}   
 }

%\pagestyle{empty}
%
% Lecture
%
\newcommand{\lecture}[3]
 {\setcounter{slidestyle}{0}
  \setlength{\oddsidemargin}{-1cm}
  \setlength{\evensidemargin}{-1cm}
  \setlength{\topmargin}{1cm}
  \setlength{\headheight}{0cm}
  \setlength{\headsep}{0cm}
  \setlength{\textheight}{25cm}
  \setlength{\textwidth}{18cm}
  \setlength{\footskip}{0cm}
  \newcommand{\TopicNumber}{#1}
  \newcommand{\Title}{#2}
  \newcommand{\Date}{#3}
  \renewcommand{\maketitle}
   {\setcounter{page}{0}
    \thispagestyle{empty}
    \slide{{\LARGE\bf \CourseNumber \vspace{0.5cm} \\ \CourseName}}
     {\begin{center}
      {\Large\bf Lecture \TopicNumber: \Title}
      \end{center}
      \vspace{1.5cm}
      \begin{center}
      {\large\sl \MyName} \\
      \vspace{0.5cm}
      \AddressShort
      \par\vspace{1cm}
      \Date
      \end{center}
     }
   }
 }
\newcommand{\slidestylezero}[2]
 {\setlength{\unitlength}{1cm}
  \begin{picture}(25, 17)
  \put(4.5, 8.5){\oval(25, 17)}
  \put(4.5, 16){\makebox(0,0)[t]
                {\begin{minipage}{24cm}
                 \begin{center}
                 {\LARGE\sc #1}
                 \end{center}
                 \end{minipage}
                }
              }
  \put(4.5, 7.5){\makebox(0,0)
                  {\begin{minipage}{24cm}
                   {\Large\sf
                   #2
                   }
                   \end{minipage}
                  }
                }
 \put(4.5, -0.25){\makebox(0,0)[t]
                   {\begin{minipage}{24cm}
                        \begin{center}
                        \ifnum\value{slide}=0
                        \else
                          {\large \theslide }
                        \fi
                        \end{center}
                    \end{minipage}
                   }
                 }      
  \put(4.5, -0.25){\makebox(0,0)[t]
                   {\begin{minipage}{24cm}
                    \CourseNumber \hfill \Title
                    \end{minipage}
                   }
                 }
  \end{picture}
  \newpage
 }

%
% Talk
%
\newcommand{\talk}[3]
 {\setcounter{slidestyle}{1}
  \setlength{\oddsidemargin}{-1cm}
  \setlength{\evensidemargin}{-1cm}
  \setlength{\topmargin}{-1cm}
  \setlength{\headheight}{0cm}
  \setlength{\headsep}{0cm}
  \setlength{\textheight}{27cm}
  \setlength{\textwidth}{18cm}
  \setlength{\footskip}{0cm}
  \newcommand{\Title}{#1}
  \newcommand{\ShortTitle}{#2}
  \renewcommand{\maketitle}
   {\slide{\ }
     {\begin{center}
      {\Large\bf \Title}
      \end{center}
      \vspace{2.5cm}
      \begin{center}
      {\large\sl \MyName} \\
      \vspace{0.625cm}
      \AddressShort
      \end{center}
     }
   }
 }
\newcommand{\slidestyleone}[2]
 {\setlength{\unitlength}{1cm}
  \begin{picture}(17,26)
  \put(8.5,13){\oval(17,26)}
  \put(8.5,25){\makebox(0,0)[t]
                {\begin{minipage}{16cm}
                 \begin{center}
                 {\LARGE\sc #1}
                 \end{center}
                 \end{minipage}
                }
              }
  \put(8.5,13.5){\makebox(0,0)
                  {\begin{minipage}{16cm}
                   {\Large\sf
                   #2
                   }
                   \end{minipage}
                  }
                }
  \put(8.5,-0.25){\makebox(0,0)[t]
                   {\begin{minipage}{16cm}
                    \ShortTitle \hfill \MyName
                    \end{minipage}
                   }
                 }
  \end{picture}
  \newpage
 }

\newcommand{\LastEditDate}{August 2000} 

\newcommand{\CourseNumber}{COMP 538}
\newcommand{\CourseName}{Reasoning and Decision under Uncertainty}
\newcommand{\Semester}{Fall 2000}
\newcommand{\FigDir}{Fig}
\newcommand{\bc}{\begin{center}}
\newcommand{\ec}{\end{center}}
\newcommand{\bit}{\begin{itemize}}
\newcommand{\eit}{\end{itemize}}
\newcommand{\ben}{\begin{enumerate}}
\newcommand{\een}{\end{enumerate}}
\newcommand{\beqs}{\begin{eqnarray*}}
\newcommand{\eeqs}{\end{eqnarray*}}
\newcommand{\beq}{\begin{eqnarray}}
\newcommand{\eeq}{\end{eqnarray}}
\newcommand{\bqu}{\begin{quote}}
\newcommand{\equ}{\end{quote}}
\newcommand{\bvb}{\begin{verbatim}}
\newcommand{\evb}{\end{verbatim}}
\newcommand{\mb}[1]{\mbox{#1}}
\newcommand{\mbs}[1]{\mbox{\small #1}}


\newcommand{\sN}{{\cal N}}
\newcommand{\sF}{{\cal F}}

\newtheorem{theo}{Theorem}
\newtheorem{cor}{Corollary}
\newtheorem{pro}{Proposition}
\newtheorem{lem}{Lemma}
\newtheorem{asm}{Assumption}

