<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">%%
%% This is the original source file advi.sty
%%
%% Package `advi' to use with LaTeX 2e
%% Copyright Roberto Di Cosmo, Jun Furuse, Didier Remy, and Pierre Weis
%% All rights reserved.

% Which name is ours
\def \ActiveDVI {Active-DVI}

\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{advi}
         [2001/29/08 v0.40 Advi Package for advi Previewer]

%%

%% Identification
%% Preliminary declarations

\RequirePackage {keyval}

%% Options

\newif \ifadvi@ignore \advi@ignorefalse
\DeclareOption {ignore}{\advi@ignoretrue}

\ProcessOptions
% \@ifundefined {AdviOptions}{}{\ExecuteOptions {\AdviOptions}}

%% More declarations

% Auxilliary macros


\def \advi@empty{}
\def \advi@ifempty #1{\def \@test {#1}\ifx \@test \advi@empty 
  \expandafter \@firstoftwo \else \expandafter \@secondoftwo \fi}
\def \advi@error #1{\PackageError {Advi}{#1}{Type &lt;RETURN&gt; to proceed.}}
\def \advi@warning #1{\PackageWarning {Advi}{#1}}
\def \advi@undefinedenv {\advi@error {Environment \@currenvir\space undefined.
Maybe you mean \@currenvir ing}}
\def \advi@special@ {\advi@ifadvi{\special}{\advi@ignore}}
\def \advi@special #1{\advi@special@ {advi: #1}}
\def \advi@export #1#2{\@ifdefinable #1{\let #1#2}}
\def \advi@exportenv #1#2{%
  \@ifundefined {#1}{\expandafter \let \csname #1\expandafter \endcsname
                     \csname end#1\endcsname }\relax  
  \expandafter \@ifdefinable \csname #1\endcsname
  {\expandafter \let \csname #1\expandafter \endcsname \csname #2\endcsname
   \expandafter \let \csname end#1\expandafter \endcsname 
        \csname end#2\endcsname}}

\def \advi@ignore #1{}
\def \advi@id #1{#1}

\def \advi@ifadvi {\ifadvi@ignore
  \expandafter \@secondoftwo \else \expandafter \@firstoftwo \fi}
\advi@export \adviignore \advi@ignoretrue
\advi@export \ifadvi \advi@ifadvi

%%% Record and play

\newif \ifadvi@recording 
\def \advi@ifrecording {\ifadvi@recording
   \expandafter \@firstoftwo \else \expandafter \@secondoftwo \fi}
\def \advi@ifrecordenv {\ifx \@currenvir \advi@recordenv
   \expandafter \@firstoftwo \else \expandafter \@secondoftwo \fi}

\def \advi@start {start}
\def \advi@startplay {start play}
\define@key{advi@record}{play}[]{\let \advi@do \advi@startplay}
\def \advi@recordenv {advirecord}

\newenvironment{advi@recording}[2][]%
  {\begingroup
     \let \advi@do \advi@start \setkeys{advi@record}{#1}%
     \advi@special {proc=#2 record=\advi@do}%
   \endgroup}
  {\advi@special {proc record=end}}
\newcommand {\advi@record}[3][]{\advi@recording[#1]{#2}#3\endadvi@recording}

\newcommand {\advi@play}[2][]%
   {\begingroup
      \advi@ifempty{#1}{}{\color {#1}}{\advi@special {proc=#2 play}}%
    \endgroup}

\advi@exportenv {advirecording}{advi@recording} 
\advi@export \advirecord \advi@record
\let \endadvirecord \advi@undefinedenv
\advi@export \adviplay \advi@play


%%% Embedded applications

\def \advi@embed@name{anonymous}
\def \advi@embed@mode{ephemeral}
\def \advi@embed@width{0pt}
\def \advi@embed@height{0pt}
\define@key {advi@embed}{name}{\def \advi@embed@name {#1}}
\define@key {advi@embed}{width}%
   {\@tempdima#1\relax \edef \advi@embed@width {\the\@tempdima}}
\define@key {advi@embed}{height}%
   {\@tempdima#1\relax \edef \advi@embed@height {\the\@tempdima}}
\def \advi@definemode #1{%
  \define@key {advi@embed}{#1}[anonymous]{%
     \def \advi@embed@mode {#1}\def\advi@embed@name {##1}%
  }}
\advi@definemode{ephemeral}
\advi@definemode{persistent}
\advi@definemode{sticky}

\def \advi@embed@ #1#2#3#4#5{%
  \mbox{\advi@special
          {embed name="#1" mode=#2 width=#3 height=#4 command="#5"}%
          {\vbox to #4{\hbox to #3{}}}}}
\def \advi@length #1{\@tempdima #1\relax \the\@tempdima}
\newcommand{\advi@embed}[2][]{%
  \mbox {\setkeys {advi@embed}{#1}%
         \advi@embed@ {\advi@embed@name}{\advi@embed@mode}
             {\advi@embed@width}{\advi@embed@height}{#2}}}

\newcommand{\advi@killembed}[2][]{\advi@special {kill name="#2" signal="#1"}}

\advi@export \adviembed \advi@embed

\advi@export \advikillembed \advi@killembed 


%%% Background colors and images

\def \do #1{\expandafter \def \csname advi@geom@#1@\endcsname {</pre></body></html>