%%
%% This is the original source file advi-annot.sty
%%
%% Package `advi-annot' to use with LaTeX 2e
%%
%% Copyright Roberto Di Cosmo, Jun Furuse, Didier Remy, and Pierre Weis
%% All rights reserved.

%% $Id: advi-annot.sty,v 1.19 2003/12/03 07:52:44 remy Exp $

\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{advi-annot}
         [2003/02/05 v1.40 Active-DVI Annot Package for advi Previewer]

%%% Advi Annotations
%% Identification
%% Preliminary declarations

%% Options

\DeclareOption {ps}{\PassOptionsToPackage{ps}{bubble}}
\ProcessOptions

\RequirePackage {advi}
\RequirePackage {bubble}

%% More declarations

%%% advi -> bubbles

\def \advi@@anchor {\advi@anchor{\the\advi@c@annot}}
\def \advi@@bubble #1{%
  \advi@ifadvi {\advi@record{\the\advi@c@annot}{#1}}{}}
\newcount \advi@c@annot

\newcommand {\advi@annot@text}[2][]{%
  \global \advance \advi@c@annot by 1%
  \leavevmode
  \bbb@[#1,from=bbb@from\the\advi@c@annot,to=bbb@to\the\advi@c@annot,%
        anchor=\advi@@anchor,bubble=\advi@@bubble]%
       {\advi@anchor{advi@annot\the\advi@c@annot}{#2}}}

%%% advi ignore -> footnotes


\def \advi@skipparen #1(#2){#1}
\newcommand{\advi@slashslash}[1][]{}
\newcommand {\advi@annot@footi}[2][]{\footnote {\let \\\advi@slashslash#2}}

\newcommand {\advi@annot@foot}[2][]%
    {{#2}\@ifnextchar({\advi@skipparen{\advi@annot@footi}}%
      {\advi@annot@footi}}

%% So...

\def \advi@annot {\advi@ifadvi {\advi@annot@text}{\advi@annot@foot}}

%% exports

\advi@export \adviannot \advi@annot 

