%% pause.sty                                      10 Mar 2000
%%-----------------------------------------------------------
%% History:
%% The initial version was created                11 Jun 1999
%% Updated to allow options                       10 Mar 2000
%% Restructured after tests                       03 Apr 2000
%%
%%   Because we need a color definition this can be used
%%   primarily with LaTeX. Thus we can also rely on \@ifnextchar
%%
%% insert small colored chunks to mark spots in the pdf file,
%% where a break should be made during display.
%% This method needs postprocessing by another program.
%% But one can preview the formatted text, where stops are indicated
%% as small colored chunks. These will vanish during postprocessing.
%% As this is specific for pdf, we will ignore \pause tags, if we do
%% not create pdf.
%%
%% Take care: because we have to insert pdf comments starting with
%% the letter '%' the catcode of '%' will be changed temporarily.

%% must define all optional variants to support creating a file
%% without pdf elements
\def\pauseDissolve{\pause[trans='Dissolve']}
\def\pauseReplace{\pause[trans='Replace']}
\def\pauseHBlinds{\pause[trans='Blinds,H']}
\def\pauseVBlinds{\pause[trans='Blinds,V']}
\def\pauseHOSplit{\pause[trans='Split,H,O']}
\def\pauseHISplit{\pause[trans='Split,H,I']}
\def\pauseVOSplit{\pause[trans='Split,V,O']}
\def\pauseVISplit{\pause[trans='Split,V,I']}
\def\pauseOBox{\pause[trans='Box,O']}
\def\pauseIBox{\pause[trans='Box,I']}
\def\pauseWipe#1{\pause[trans='Wipe,#1']}
\def\pauseGlitter#1{\pause[trans='Glitter,#1']}
\def\pause{\@ifnextchar [{\pp4@pause}{\pp4@pause[]}}

%% leave, if not creating pdf
\ifx\pdfoutput\undefined
\def\pp4@pause[#1]{\relax}\expandafter\endinput
\fi
\definecolor{pp4red}{rgb}{0.9,0.5,0}
{\catcode`\%=11\catcode`\!=14 !make '!' the comment character for now
 \gdef\pp4@pause[#1]{\vbox to 0pt{\vss\hbox to 0pt{\pdfliteral{%pause}!
       \color{pp4red}\vrule width 2truemm height 5truemm\hss
       \pdfliteral{%esuap #1}}}!
         }!
       }
