pause.sty — TeX document, 3 kB (3.096 bytes)


%% pause.sty                                      12 Jun 2000
%% History:
%% The initial version was created                11 Jun 1999
%% Updated to allow options                       10 Mar 2000
%% Restructured after tests                       03 Apr 2000
%% Added procesing for random builds              07 May 2000
%% Supply test for new enough pdftex              09 May 2000
%% No need for pdftex 14 any more                 31 May 2000
%% Added commands for highligthing etc.           12 Jun 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.
%% We still need an option to make us ineffective even with pdflatex.

%% must define all optional variants to support creating a file
%% without pdf elements
\def\pause{\@ifnextchar [{\pppp@pause}{\pppp@pause[]}}

%% define dummies, if not creating pdf
%% now we need a section where % can be written to pdf files.
%% thus make ! a comment character
 \gdef\pauselevel#1{\pdfliteral{%pauselevel #1}}!
       \color{pp4red}\vrule width 2truemm height 5truemm\hss ! the marker
       \pdfliteral{%esuap #1}}!
  \vbox to 0pt{\vss\hsize0pt\noindent\hbox to 0pt{\pppp@marker{#1}}}\else!hmode or mmode
  \null\hbox to 0pt{\pppp@marker{#1}}\null
   \pdfliteral{%pausecolor \csname\string\color@#1\endcsname\space \csname\string\color@#2\endcsname\space \csname\string\color@#3\endcsname}}!
   \pdfliteral{%pausecolor reset}}!
   \pdfliteral{%pausecolor appear}}!
   \pdfliteral{%pausecolor highlight}}!