%
% sladvi.tex: a set of macros to write simple slide-shows with advi.
%
% Pierre Weis 2002.
%
% $Id$

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Example of a slide-show using sladvi.tex
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%% File show.tex %%%%%%%%%
%% \documentclass[landscape]{slides}
%% 
%% \usepackage{advi-slides}
%% 
%% \begin{document}
%% 
%% % Definition of header and footer of the presentation
%% % Institution logo
%% \def\thelogo{\includegraphics[width=3EM,height=1EM]{inria.ps}}
%% 
%% \def\footer{{\thelogo\hfill \em {Pierre.Weis@inria.fr\hfill 22-05-2002}}}
%% 
%% % The title to be written on each page
%% \def\header{Objective Caml}
%% 
%% % The explicit new page to go on to the next slide
%% \def \newpage {\vfill\Newpage \advifooter{\footer}\adviheader{\header}}
%% \def\newslide#1{\newpage\stitle{#1}}
%%
%% \input{slides}
%% 
%% \end{document}
%%%%%%%%% End of show.tex %%%%%%%%%

%%%%%%% File slides.tex %%%%%%%
%% The minimum slides.tex file could be
%% \newslide{Plan}
%% 
%% \begin{itemize}
%% \item Past
%% \item Present
%% \item Future
%% \end{itemize}
%%
%% \newslide{Conclusion}
%%
%% Even if proofs are still to be written, this framework is
%% incredibly promising.
%%
%% Future work: we plan to implement the system.
%%
%% \lastpage
%%
%% That's all !
%%
%%%%%%% End of slides.tex %%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


% Packages to load
\usepackage[latin1]{inputenc}
\usepackage{color}
\usepackage{graphicx}
\usepackage{advi}
\usepackage{alltt}

\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{advi-slides}
         [2003/04/01 v0.10 Advi Slides Package for the advi Previewer]

% The simple pause command
\def\pause{\adviwait}

% To put a frame around an arbitrary amount of vertical material.
% \begin{frame} ... \end{frame}

\def\frame{%
\setbox0=\vbox\bgroup%
\advance\hsize by -2\fboxsep\advance\hsize by -2\fboxrule}

\def\endframe{%
\egroup\noindent\framebox[\columnwidth]{\box0}}

% An itemize environment with small vertical space between items.
% \begin{citemize} ... \end{citemize}
\newenvironment{citemize}{\begin{list}{$\bullet$}%
{\itemsep 0pt \topsep 5pt}}{\end{list}}

\newenvironment{cenumerate}%
{\begin{list}{-}{\itemsep 0pt \topsep 5pt}}{\end{list}}

% To write the title of a slide if any.
\def\stitle#1{\centerline{{\Huge{\bf #1}}}}

% Footer of the slides
\def\advifooter#1{\vfill{\vbox to 0em{\vbox to \vsize {\vfill%
{{\scriptsize{#1}} \hfill\thepage}}%
\vss}}}

% Headers of the slides
\def\adviheader#1{\vbox to 0em{\vbox to \vsize {\noindent
~\hfill\includegraphics[width=\textwidth,height=2em]{bar.eps}\hfill~%
\vfill
}
\vss
}}

% To preserve the real \newpage macro
\let \Newpage \newpage

\def\emptyfooter{\vbox to 0em{\vbox to \vsize {\vfill~~\vss}}}

% The last page of the presentation: no footer.
\def\lastpage{\Newpage\emptyfooter\header}
