%%
%% This is file `linkto.def',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% aeb_pro.dtx  (with options: `copyright,unicode')
%% 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% aeb_pro.sty package,                                 %%
%% Copyright (C) 2006--2021  D. P. Story                %%
%%   dpstory@acrotex.net                                %%
%%                                                      %%
%% This program can redistributed and/or modified under %%
%% the terms of the LaTeX Project Public License        %%
%% Distributed from CTAN archives in directory          %%
%% macros/latex/base/lppl.txt; either version 1.2 of    %%
%% the License, or (at your option) any later version.  %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\define@key{ahref}{page}[0]{\def\ahref@page{#1}}
\def\ahref@page{0}
\def\ap@fslash{/}
\def\@isfirstslash#1#2\@nil{\def\arg@i{#1}\ifx\ap@fslash\arg@i
    \else\edef\ahref@view@keyvalue{/\ahref@view@keyvalue}\fi}
\define@key{ahref}{view}[/Fit]{\edef\ahref@view@keyvalue{#1}%
    \expandafter\@isfirstslash\ahref@view@keyvalue\@nil
}
\def\ahref@view@keyvalue{/Fit}
\define@key{ahref}{dest}[]{\def\ahref@dest{#1}}
\let\ahref@dest\@empty
\define@choicekey{ahref}{open}[\val\nr]{userpref,new,existing}
{%
  \ifcase\nr\relax
    \let\ahref@open@keyvalue\@empty\or
    \def\ahref@open@keyvalue{/NewWindow true }\or
    \def\ahref@open@keyvalue{/NewWindow false }\fi
}{}
\let\ahref@open@keyvalue\@empty
\define@choicekey{ahref}{border}[\val\nr]{visible,invisible}
{%
  \ifcase\nr\relax
    \def\ahref@border{0 0 1}%
    \def\ahef@invisible@border{1}\or
    \def\ahref@border{0 0 0}% W = 0 also?
    \let\ahef@invisible@border\@empty\fi
}{}
\define@choicekey{ahref}{highlight}[\val\nr]{none,invert,outline,insert}
{%
  \ifcase\nr\relax
    \let\ahref@highlight\@empty\or
    \def\ahref@highlight{/H/I}\or
    \def\ahref@highlight{/H/O}\or
    \def\ahref@highlight{/H/P}\fi
}{}
\define@key{ahref}{bordercolor}[]{\def\ap@argi{#1}\ifx\ap@argi\@empty
  \let\ahref@bordercolor\@empty\else
  \HyColor@IfXcolor{\HyColor@XZeroOneThreeFour{#1}
    {\ahref@bordercolor}{}{}}
    {\edef\ahref@bordercolor{#1}}\fi
} % PDF color
\let\ahref@bordercolor\@empty
\define@choicekey{ahref}{linestyle}[\val\nr]{solid,dashed,underlined}
{%
  \ifcase\nr\relax
    \def\ahref@linestyle@keyvalue{/S/S}\or
    \def\ahref@linestyle@keyvalue{/S/D}\or % Dashed [0 0 1[3.0]]
    \def\ahref@linestyle@keyvalue{/S/U}\fi
}
\def\ahref@dashedlinetyle{/S/D}
\define@choicekey{ahref}{linewidth}[\val\nr]{thin,medium,thick}
{%
  \ifcase\nr\relax
    \def\ahref@linewidth{1}\or
    \def\ahref@linewidth{2}\or
    \def\ahref@linewidth{3}\fi
}
\define@choicekey{ahref}{goto}[\val\nr]{p2c,c2p,c2c}
{%
  \ifcase\nr\relax
    \global\let\targetDictionary\targetDictionary@pc\or
    \global\let\targetDictionary\targetDictionary@cp\or
    \global\let\targetDictionary\targetDictionary@cc\fi
}{}
\define@choicekey{ahref}{launch}[\val\nr]{save,view,viewnosave}
    {\edef\ahref@launch@type{\nr}}{}
\def\ahref@launch@type{0}%
\define@key{ahref}{preset}[]{\def\ahref@preset{#1}}
\let\ahref@preset\@mpty
\def\ahypertxtcolor#1{\def\ahrefcolor{#1}}
\def\ahrefcolor{red}
\define@key{ahref}{textcolor}[]{\def\ahrefcolor{#1}}
\def\targetDictionary@pc#1{/T<</N<\expandafter
  \stringiiUnicode#1\relax>/R/C>>}
\def\targetDictionary@cp#1{/T<</R/P>>}
\def\targetDictionary@cc#1{%
/T<</R/P/T<</N<\expandafter\stringiiUnicode#1\relax>/R/C>>>>}
\def\factory@ahyperref@defaults{goto=p2c,page,dest,open=userpref,view,%
    border=invisible,highlight=invert,linestyle=solid,linewidth=thin,%
    bordercolor,textcolor=red,preset}
\newcommand{\setahyperDefaults}[1]{\def\aeb@setahyperrefDefaults{#1}}
\let\aeb@setahyperrefDefaults\@empty
\newcommand{\resetahyperDefaults}{%
    \let\aeb@setahyperrefDefaults\@empty}
\def\aeb@initahref#1{%
  \edef\expand@setkeys{%
  \noexpand\setkeys{ahref}{\factory@ahyperref@defaults}}%
  \expand@setkeys
  \ifx\aeb@setahyperrefDefaults\@empty\else
      \edef\expand@setkeys{\noexpand\setkeys{ahref}%
          [dest,goto,page,preset]{\aeb@setahyperrefDefaults}}%
      \expand@setkeys
  \fi
  \setkeys{ahref}{#1}%
  \ifx\ahref@preset\@empty\else
  \edef\expand@setkeys{\noexpand
    \setkeys{ahref}{\ahref@preset}}\expand@setkeys\fi
  \let\ahref@dasharray\@empty
  \ifx\ahref@linestyle@keyvalue\ahref@dashedlinetyle
    \def\aeb@border@parameters{0 0 \ahref@linewidth[3.0]}%
    \def\ahref@dasharray{/D[3.0]}%
  \else
    \edef\aeb@border@parameters{\ahref@border}%
  \fi
  \ifx\ahef@invisible@border\@empty\def\ahref@linewidth{0}\fi
  \def\ahref@BS@Dict{/BS<<%
    \ahref@dasharray\ahref@linestyle@keyvalue/W \ahref@linewidth>>
  \ifx\ahref@bordercolor\@empty\else
    /C[\ahref@bordercolor]\fi\ahref@highlight}%
}
\newcommand{\ahyperref}[3][]{\begingroup
  \dl@preProcDefns
  \def\u{\string\\u}%
  \aeb@initahref{#1}%
  \ifx\ahref@dest\@empty
    \def\ahref@dest@keyvalue{%
      /D[\ahref@page\space\ahref@view@keyvalue]}%
  \else
    \edef\ahref@dest@keyvalue{/D(\labelRef{\ahref@dest})}%
  \fi
  \aeb@ahref@setlink{#2}{#3}%
}
\newcommand{\ahyperlink}[3][]{\begingroup
  \dl@preProcDefns
  \def\u{\string\\u}%
  \aeb@initahref{#1}%
  \ifx\ahref@dest\@empty
    \def\ahref@dest@keyvalue{%
      /D[\ahref@page\space\ahref@view@keyvalue]}%
  \else
    \def\ahref@dest@keyvalue{/D(\ahref@dest)}%
  \fi
  \aeb@ahref@setlink{#2}{#3}%
}
\def\aeb@ahref@setlink#1#2{%
  \ifx\ahrefcolor\@empty
    \@eqlinktxtcolor{}\let\ahypercolor\@empty\else
    \def\ahypercolor{\textcolor{\ahrefcolor}}\fi
  \setLink[\Border{\aeb@border@parameters}%
  \rawPDF{\ahref@BS@Dict}%
  \A{\ahref@dest@keyvalue/S/GoToE%
  \ahref@open@keyvalue\targetDictionary{#1}}]{\ahypercolor{#2}}%
  \endgroup
}
\newcommand{\ahyperextract}[3][]{\begingroup\dl@preProcDefns
  \def\u{\string\\u}%
  \aeb@initahref{#1}%
  \ifx\ahrefcolor\@empty
    \@eqlinktxtcolor{}\let\ahypercolor\@empty\else
    \def\ahypercolor{\textcolor{\ahrefcolor}}\fi
  \setLink[\Border{\aeb@border@parameters}%
  \rawPDF{\ahref@BS@Dict}%
  \A{\JS{this.exportDataObject({cName: "#2",%
nLaunch: \ahref@launch@type})}}]{\ahypercolor{#3}}%
  \endgroup
}
\begingroup\catcode`\"=\active \gdef\DQ{\string\"}%
    \gdef\@handledblquotes{\catcode`\"=\active\def"{\DQ}}%
    \toks0=\expandafter{\DLspecialDefs\@handledblquotes}%
    \xdef\DLspecialDefs{\the\toks0}%
\endgroup
\newif\ifHandleDblQuotes \HandleDblQuotesfalse
\def\sanitize@attach{\ifHandleDblQuotes\@handledblquotes\fi%
\@makeother\#\@makeother\$\@makeother\%\@makeother~}
{\obeyspaces\gdef\getdscrptCont#1{\gdef\aebp@description{#1}%
\aeb@labelName}%
\gdef\getdscrptStrCont#1{\gdef\aebp@description{#1}%
\aeb@labelNamestar}}%
\let\aeb@isFromAutoLabelNum\aebp@Zero
\def\attachmentNamesEnv{attachmentNames}
\def\labelName{\ifx\attachNamesEnv\attachmentNamesEnv
  \def\ap@next{\labelName@Env}\else\def\ap@next{\defUniStr}\fi\ap@next}
\def\labelName@Env#1{\bgroup\let\aeb@isFromAutoLabelNum\aebp@Zero %dps23
    \@for\x:=ABCDEFabcdef\do{\@makeother\x}%
    \def\aebp@labelname{#1}\@ifnextchar\bgroup{\labelName@i}{}}
\def\labelName@a#1{\bgroup\let\aeb@isFromAutoLabelNum\aebp@One
    \def\aebp@labelname{#1}\@ifnextchar\bgroup{\labelName@i}{}}
\def\labelName@i{\obeyspaces\sanitize@attach\getdscrptCont}%
\def\labelName@star#1{\bgroup\@for\x:=ABCDEFabcdef\do{\@makeother\x}%
    \def\aebp@labelname{#1}\@ifnextchar\bgroup{\labelName@star@i}{}}%
\def\labelName@star@i{\obeyspaces\sanitize@attach\getdscrptStrCont}%
\newcommand{\autolabelNum}{%
    \@ifstar{\aeb@autoLabelNumstar}{\aeb@autoLabelNum}}
\newcommand\aeb@autoLabelNum[2][]{\def\alnargi{#1}%
    \def\@thisattachnum{#2}%
    \ifx\alnargi\@empty
         \def\aeb@next{%
            \labelName@a{attach#2}{AeB\space Attachment\space #2}}%
    \else
        \def\aeb@next{%
            \labelName@a{#1}{AeB\space Attachment\space #2}}%
    \fi
    \aeb@next%
}
\newcommand{\aeb@autoLabelNumstar}[2][]{%
    \def\alnargi{#1}\gdef\@thisattachnum{#2}%
    \ifx\alnargi\@empty\def\aeb@next{\labelName@star{attach#2}}\else
    \def\aeb@next{\labelName@star{#1}}\fi
    \aeb@next%
}
\def\aeb@labelName{%
    \if\aeb@isFromAutoLabelNum\aebp@One
        \global\csarg\let
            {aeb@aDescript@attach\@thisattachnum}\aebp@description
        \global\csarg\let
            {aeb@aName@attach\@thisattachnum}\aebp@labelname
    \else
        \global\csarg\let
            {aeb@aDescript@\aebp@labelname}\aebp@description
        \global\csarg\let
            {aeb@aName@\aebp@labelname}\aebp@labelname\fi\egroup}
\def\aeb@labelNamestar{%
    \global\csarg\let
        {aeb@aDescript@attach\@thisattachnum}\aebp@description
    \global\csarg\let{aeb@aName@attach\@thisattachnum}\aebp@labelname
    \global\csarg\let{aeb@aDescript@\aebp@labelname}\aebp@description
    \global\csarg\let{aeb@aName@\aebp@labelname}\aebp@labelname\egroup}
\@ifpackageloaded{exerquiz}{}
{%
    \def\verbatimwrite{\@bsphack
        \let\do\@makeother\dospecials
        \catcode`\^^M\active\catcode`\^^I=12%
        \def\verbatim@processline{%
            \immediate\write\verbatim@out
            {\the\verbatim@line}}%
        \verbatim@start}
    \def\endverbatimwrite{\@esphack}
}
\let\attachNamesEnv\@empty
\newenvironment{attachmentNames}{%
  \newwrite \aeb@attachments@xref
  \immediate\openout \aeb@attachments@xref \jobname_xref.cut
  \let\verbatim@out\aeb@attachments@xref
  \immediate\write\verbatim@out{\string\begingroup
    \string\HandleDblQuotestrue^^J%
    \string\def\string\attachNamesEnv{attachmentNames}}%
  \verbatimwrite}{%
  \endverbatimwrite
  \immediate\write\verbatim@out{\string\endgroup}%
  \immediate\closeout \aeb@attachments@xref
  \aftergroup\aeb@Input@xref}
\def\aeb@Input@xref{\InputIfFileExists{\jobname_xref.cut}{}{}}
\endinput
%%
%% End of file `linkto.def'.
