<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">% \iffalse meta-comment
%&lt;*internal&gt;
\iffalse
%&lt;/internal&gt;
%&lt;*internal&gt;
\fi
\def\nameofplainTeX{plain}
\ifx\fmtname\nameofplainTeX\else
  \expandafter\begingroup
\fi
%&lt;/internal&gt;
%&lt;*install&gt;
\input docstrip.tex
\keepsilent
\askforoverwritefalse
\preamble
\endpreamble
\ifx\fmtname\nameofplainTeX
\generate{
  \file{\jobname.sty}{\from{\jobname.dtx}{copyright,package}}
}
\fi
%&lt;/install&gt;
%&lt;install&gt;\endbatchfile
%&lt;*internal&gt;
\ifx\fmtname\nameofplainTeX
  \expandafter\endbatchfile\else
  \expandafter\endgroup\fi
%&lt;/internal&gt;
%&lt;*copyright&gt;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% aebstmpg.sty package,           2012/10/29           %%
%% Copyright (C) 2012  D. P. Story                      %%
%%   dpstory@uakron.edu                                 %%
%%                                                      %%
%% 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 of the  %%
%% License, or (at your option) any later version.      %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%&lt;/copyright&gt;
%&lt;package&gt;\NeedsTeXFormat{LaTeX2e}
%&lt;package&gt;\ProvidesPackage{mkstmp_pro}
%&lt;package&gt; [2012/10/29 v1.0 Support for a stamp matching game]
%&lt;*driver&gt;
\documentclass{ltxdoc}
%\usepackage{\jobname}
%\usepackage[numbered]{hypdoc}
%\EnableCrossrefs
%\CodelineIndex
%\RecordChanges
\begin{document}
  \DocInput{\jobname.dtx}
\end{document}
%&lt;/driver&gt;
% \fi
%
%\GetFileInfo{\jobname.sty}
%
%\title{The  \textsf{mkstmp\_pro} Package}
%\author{D. P. Story}
%\date{Released \today}
%
%\maketitle
%
%\StopEventually{^^A
%  \PrintChanges
%  \PrintIndex
%}
%
%    \begin{macrocode}
%&lt;*package&gt;
%    \end{macrocode}
% \paragraph*{Description.}
% \textsf{mkstmp\_pro} is a package for making a (rubber) stamp file.
% A person using this package requires \textsf{aeb\_pro} and \textsf{Adobe Acrobat}.
% After you create a stamp file, move it to the user stamp folder of your \textsf{Acrobat}
% distribution and the stamps will be available for use.
%
% \paragraph*{Documentation and Code.}\strut\par\medskip\noindent
% We require the \textsf{aeb\_pro} and \textsf{xkeyval} packages.
%    \begin{macrocode}
\RequirePackage{aeb_pro}[2012/11/09]
\RequirePackage{xkeyval}
%    \end{macrocode}
% A command taken from \textsf{eforms} that can be used to define
% \cs{setStampPath}.
%    \begin{macrocode}
\providecommand{\definePath}[1]{\def\ef@ctrlName{#1}%
    \hyper@normalise\ef@definePath}
\def\ef@definePath#1{\expandafter\xdef\ef@ctrlName{#1}}
%    \end{macrocode}
% \DescribeMacro{\setStampPath} is used to define the path to the icon
% file. It is a declaration that uses \cs{definePath} to define the
% macro \cs{stampPath}. If used, then the \texttt{path} key is not used (defined below).
%    \begin{macrocode}
\newcommand{\setStampPath}[1]{\definePath{\msp@stampPath}{#1}}
%    \end{macrocode}
% Key value pairs for the \texttt{makeStamp} family.\par\medskip\noindent
% \DescribeMacro{name} is the name you are giving the stamp.
%    \begin{macrocode}
\define@key{makeStamp}{name}[]{\def\makeStamp@name{\##1}}
\let\msp@stampPath\@empty
%    \end{macrocode}
% \DescribeMacro{path} is the path to the PDF file containing the image
% to be used for a stamp. The default is \cs{msp@stampPath}, defined separately
% using \cs{setStampPath}.
%    \begin{macrocode}
\define@key{makeStamp}{path}[\msp@stampPath]{\edef\makeStamp@path{#1}}
%    \end{macrocode}
% \DescribeMacro{page} is the page in the PDF file that corresponds to the
% image you want to use as a stamp.
%    \begin{macrocode}
\define@key{makeStamp}{page}[0]{\def\aeb@stamp@page{#1}}
%    \end{macrocode}
% \DescribeMacro{\makeStamps} is the only command of this package. Its only
% argument is a list of tokens.
%\begin{verbatim}
%   \setStampPath{C:/Users/Public/Documents/%
%        My TeX Files/tex/latex/aeb/aebpro/aeb_dad/images/juergen.pdf}
%   \makeStamps{%
%        {name=Touches Hat,page=0}
%       {name=Doffs Hat,page=1}
%        {name=Movie Star,page=2}
%       {name=Running Man,page=3}
%   }
%   \begin{docassembly}
%   \insertPreDocAssembly
%   \end{docassembly}
%   \begin{document}
%   ...
%\end{verbatim}
% There are three key-value pairs. name, path, and page. The path key is not really
% needed if the command \cs{setStampPath} is used.
%    \begin{macrocode}
\newcommand{\makeStamps}[1]{%
    \edef\@tforExp{\noexpand\@tfor\noexpand\msp@Args:=#1}%
    \@tforExp\do{\expandafter\ms@makeStamp
        \expandafter{\msp@Args}%
    }%
}
%    \end{macrocode}
% \cs{makeStamp} is a loop that calls \cs{ms@makeStamp}. A typical call
% is
%\begin{verbatim}
%   \ms@makeStamp{name=Touches Hat,page=0}
%\end{verbatim}
%    \begin{macrocode}
\newcommand{\ms@makeStamp}[1]{%
    \setkeys{makeStamp}{name,path,page,#1}%
    \ifx\make@Stamps@name\@empty
        \PackageError{mkstmp_pro}{The `name' key is required}
            {Please give the path of the stamp image.}\fi
    \ifx\makeStamp@path\@empty
        \PackageError{mkstmp_pro}{The `path' key is required}
            {Please give the path of the stamp image, or \MessageBreak
            use \string\setStampPath.}\fi
%    \end{macrocode}
% We work things so that the pages are added in the same order that they
% are listed in the arguments of \cs{makeStamp}.
%
% We create a command \cs{predocassemJS} that is designed for use in the
% \texttt{docassembly} environment of \textsf{aeb\_pro}.
%    \begin{macrocode}
    \xdef\predocassemJS{%
        var retn=\insertPages({{nPage:0, cPath:"\makeStamp@path",%
        nStart:\aeb@stamp@page}});^^J%
        if ( retn==-1 ) console.println("The file
        \string\"\makeStamp@path\string\" could not be opened.");^^J%
        if ( retn==-2 ) console.println("Selected page
        (page=\aeb@stamp@page) for \string\"\makeStamp@path\string\"
        is invalid.");^^J%
        \createTemplate({{cName:"\makeStamp@name",nPage:1}});^^J%
        \predocassemJS%
    }%
}
%    \end{macrocode}
%    \begin{macrocode}
%&lt;/package&gt;
%    \end{macrocode}
%\Finale
</pre></body></html>