summaryrefslogtreecommitdiff
path: root/texmf-dist/source
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2018-06-11 12:23:22 +0900
committerNorbert Preining <norbert@preining.info>2018-06-11 12:23:22 +0900
commit69aed6c627813afde6fb1983e8b673ed5b8ec0d5 (patch)
tree15ee93d167337a2629594c56e34cbf92d072d279 /texmf-dist/source
parent17e285e7733468f00b6e8d096fdd7ffe818f09c8 (diff)
add aebenvelope
Diffstat (limited to 'texmf-dist/source')
-rw-r--r--texmf-dist/source/latex/aebenvelope/aeb_envelope.dtx291
-rw-r--r--texmf-dist/source/latex/aebenvelope/aeb_envelope.ins60
-rw-r--r--texmf-dist/source/latex/aebenvelope/envelope.cfg2
3 files changed, 353 insertions, 0 deletions
diff --git a/texmf-dist/source/latex/aebenvelope/aeb_envelope.dtx b/texmf-dist/source/latex/aebenvelope/aeb_envelope.dtx
new file mode 100644
index 00000000..66fa194d
--- /dev/null
+++ b/texmf-dist/source/latex/aebenvelope/aeb_envelope.dtx
@@ -0,0 +1,291 @@
+% \iffalse
+%<*copyright>
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% aeb_envelope.sty package, 2007-05-14 %%
+%% Copyright (C) 2006 D. P. Story %%
+%% dpstory@acrotex.net %%
+%% storyd@owc.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. %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%</copyright>
+%<package>\NeedsTeXFormat{LaTeX2e}
+%<package>\ProvidesPackage{aeb_envelope}
+%<package> [2007/05/14 v1.0 AeB Pro eEnvelope (dps)]
+%<*driver>
+\documentclass{ltxdoc}
+\usepackage[dviwindo,colorlinks,hyperindex]{hyperref}
+\pdfstringdefDisableCommands{\let\\\textbackslash}%
+\EnableCrossrefs \CodelineIndex
+\OnlyDescription % comment out for implementation details
+\begin{document}
+ \GetFileInfo{aeb_envelope.sty}
+ \title{The \textsf{AeB Pro eEnvelope} Package\texorpdfstring{\\}{: }
+ A member of the AeB Pro family}
+ \author{D. P. Story\\
+ Email: \texttt{storyd@owc.edu}}
+ \date{processed \today}
+ \maketitle
+ \tableofcontents
+ \let\Email\texttt
+ \DocInput{aeb_envelope.dtx}
+ \PrintIndex
+\end{document}
+%</driver>
+% \fi
+% \section{Introduction}
+% The \textsf{AeB Pro eEnvelope} package (a.k.a. \texttt{aeb\_envelope}) is a package for creating
+% electronic envelopes (some designs provided, courtesy Adobe and AcroTeX.Net), and some instructions
+% for creating your own are provided in the documentation. The AeB Pro package is essential for attach
+% your documents to the envelope. After attachment, a mail dialog opens and you are asked to sent
+ % the eEnvelope out to your recipients.
+% \begin{macrocode}
+%<*package>
+\RequirePackage{xkeyval}
+% \end{macrocode}
+% \begin{macro}{donotmail}
+% Do not mail this eEnvelope immediately. The default is to mail immediately.
+% \begin{macrocode}
+\DeclareOptionX{donotmail}{\def\mailitNow{false}}
+\def\mailitNow{true}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{path2folder}
+% The path to the folder that contains the eEnvelope templates. Not needed if you use
+% the set the envelope.cfg file to the path to the envelopes folder.
+% \begin{macrocode}
+\DeclareOptionX{path2folder}{\def\aebEnvPath{#1}}
+\def\aebEnvPath{/C}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{envelope}
+% The \texttt{envelope} option is used to select any of the four supplied envelopes: \texttt{aeb1},
+% \texttt{aeb2}, \texttt{adobe1} and \texttt{adobe2}. the default is \texttt{aeb1}.
+% \begin{macrocode}
+\define@choicekey+{aeb_envelope.sty}{envelope}[\val\nr]{aeb1,aeb2,adobe1,adobe2}
+{%
+ \ifcase\nr\relax
+ \def\pathtoEnv{\aebEnvPath/aebenvelope1.pdf}
+ \def\addressEnv{\addressEnvAebi}
+ \def\aebenvDimensions{\margins{0pt}{0pt}{0pt}{0pt}%
+ \screensize{50mm}{112mm}}
+ \or
+ \def\pathtoEnv{\aebEnvPath/aebenvelope2.pdf}
+ \def\addressEnv{\addressEnvAebii}
+ \def\aebenvDimensions{\margins{0pt}{0pt}{0pt}{0pt}%
+ \screensize{50mm}{112mm}}
+ \or
+ \def\pathtoEnv{\aebEnvPath/template1.pdf}
+ \def\addressEnv{\addressEnvAdobei}
+ \def\aebenvDimensions{\margins{0pt}{0pt}{0pt}{0pt}%
+ \screensize{135.5mm}{212.7mm}}
+ \or
+ \def\pathtoEnv{\aebEnvPath/template2.pdf}
+ \def\addressEnv{\addressEnvAdobeii}
+ \def\aebenvDimensions{\margins{0pt}{0pt}{0pt}{0pt}%
+ \screensize{120mm}{250mm}}
+ \fi
+}{\PackageWarning{aeb_envelope}{%
+ Bad choice for the envelope, permissible values\MessageBreak
+ are aeb1,aeb2,adobe1 and adobe2.\MessageBreak
+ Assuming a custom envelope, \val.\MessageBreak
+ Be sure to set the values of \string\addressEnv\MessageBreak
+ and \string\aebenvDimensions}%
+ \def\pathtoEnv{\aebEnvPath/\val}%
+}
+% \end{macrocode}
+% \end{macro}
+% Set the defaults for the \texttt{envelope} option. If the user specifies \texttt{path2folder},
+% this choice overrides the configuration file.
+% \begin{macrocode}
+\def\pathtoEnv{\aebEnvPath/aebenvelope1.pdf}
+% \end{macrocode}
+% \begin{macro}{\setAddressEnv}
+% \begin{macro}{\setEnvDimensions}
+% These are two convenience commands to be used by anyone who want to create
+% and use their own eEnvelope. Use \cs{setAddressEnv} to place the elements
+% of the envelope; and \cs{setEnvDimensions} to set the dimensions of the papersize
+% to match the dimensions of the eEnvelope.
+%
+% The argument of \cs{setAddressEnv} should be \cs{put} commands, similar to the
+% definitions of \cs{addressEnvAebi}, \cs{addressEnvAebii}, \cs{addressEnvAdobei}
+% or \cs{addressEnvAdobeii}.
+% \begin{macrocode}
+\newcommand{\setAddressEnv}[1]{\def\addressEnv{\noindent#1}}
+\def\addressEnv{\addressEnvAebi}
+\newcommand{\setEnvDimensions}[2]% #1 = width, #2 = height
+ {\def\aebenvDimensions{\margins{0pt}{0pt}{0pt}{0pt}%
+ \screensize{#2}{#1}}}
+\setEnvDimensions{112mm}{50mm}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% Get the configuration file, if it exists. The
+% \begin{macrocode}
+\InputIfFileExists{envelope.cfg}{}{}
+\ProcessOptionsX
+\RequirePackage{graphicx}
+\RequirePackage{aeb_pro}
+% \end{macrocode}
+% \section{Main Macro Code}
+% eEnvelope!
+% \begin{macro}{\mailTo}
+% The main data structure for setting the parameters of the eEnvelope,
+% \begin{macrocode}
+\define@boolkey{mailto}[mailto]{UI}[true]{}
+\define@key{mailto}{ToName}{\def\mailtoName{#1}}
+\define@key{mailto}{From}{\def\mailtoFrom{#1}}
+\define@key{mailto}{To}{\def\mailtoEmail{#1}}
+\define@key{mailto}{path}{\def\pathtoEnv{#1}}
+\define@key{mailto}{CC}{\def\mailtoCC{#1}}
+\define@key{mailto}{BCC}{\def\mailtoBCC{#1}}
+\define@key{mailto}{Subject}{\def\mailtoSubject{#1}}
+\define@key{mailto}{MessageEnvelope}{\def\mailtoMessageEnvelope{#1}}
+\define@key{mailto}{MessageBody}{\def\mailtoMessageBody{#1}}
+\mailtoUItrue
+\def\mailtoUI{\ifmailtoUI true\else false\fi}
+\let\mailtoName\@empty
+\let\mailtoEmail\@empty
+\let\mailtoCC\@empty
+\let\mailtoBCC\@empty
+\let\mailtoSubject\@empty
+\let\mailtoMessageEnvelope\@empty
+\let\mailtoMessageBody\@empty
+% \end{macrocode}
+% With the preliminaries of defining the parameters, here is the defiinition
+% of \cs{mailTo}.
+% \begin{macrocode}
+\newcommand\mailTo[1]{\setkeys{mailto}{#1}}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\toggleAttachmentsPanel}
+% A convenience command that toggles the attachments panel. The first parameter
+% is the color of the text, the second parameter is the text. Sample usage
+% \verb!\toggleAttachmentsPanel{red}{Click to view attachments}!
+% If user does not have eforms loaded, then this command just typesets the text
+% rather than creating a link with action.
+% \begin{macrocode}
+\@ifpackageloaded{eforms}
+{
+ \providecommand{\toggleAttachmentsPanel}[2]{%
+ \setLinkText[\Border{0 0 0}\A{/N/ShowHideFileAttachment/S/Named}]
+ {\textcolor{#1}{#2}}}%
+}{%
+ \providecommand{\toggleAttachmentsPanel}[2]{\textcolor{#1}{#2}}%
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macrocode}
+\def\displayAddr#1{\makebox[0pt][r]{\makebox[.6in][r]{#1:}\enspace}\ignorespaces}
+% \end{macrocode}
+% \begin{macro}{\addressEnvAebi}
+% \begin{macro}{\addressEnvAebii}
+% \begin{macro}{\addressEnvAdobei}
+% \begin{macro}{\addressEnvAdobeii}
+% The commands to put address info on the envelope, each correspond to
+% the four envelope option: \texttt{aeb1}, \texttt{aeb2}, \texttt{adobe1}
+% and \texttt{adobe2}, in that order.
+% \begin{macrocode}
+\newcommand{\addressEnvAebi}
+{%
+ \noindent\put(125,60){%
+ \begin{minipage}[t]{2in}\parindent0pt\raggedright\small
+ \displayAddr{To}\mailtoName\\
+ \displayAddr{From}\mailtoFrom\\
+ \displayAddr{Message}\mailtoMessageEnvelope
+ \end{minipage}}%
+}
+\newcommand{\addressEnvAebii}
+{%
+ \small
+ \noindent
+ \put(12,120){\mailtoFrom}%
+ \put(100,60){\makebox[0pt][r]{To:\enspace}\mailtoName}%
+ \put(100,45){\makebox[0pt][r]
+ {Message:\enspace}\parbox[t]{120pt}
+ {\raggedright\mailtoMessageEnvelope}}%
+}
+\newcommand{\addressEnvAdobei}
+{%
+ \large
+ \noindent\put(32,160){\today}%
+ \put(32,120){\parbox[t]{540pt}{\mailtoMessageEnvelope}}%
+ \put(189,160){\mailtoName}%
+ \put(390,160){\mailtoFrom}%
+}
+
+\newcommand{\addressEnvAdobeii}
+{%
+ \Large
+ \noindent\put(334.5,90){\parbox[t]{250pt}{\mailtoMessageEnvelope}}%
+ \put(364,119){\mailtoName}%
+ \put(90,305){\mailtoFrom}%
+}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \begin{macro}{\assembleEnvelope}
+% The end of the eEnvelope file must have this command, it replaces the
+% \verb!\begin{document}! and \verb!\end{document}! environment.
+%
+% \texttt{envexecjs.def} inputs the doc assembly commands for inserting the background
+% of the eEnvelope.
+% \begin{macrocode}
+\def\inputEnvExecJS{\InputIfFileExists{envexecjs.def}{}}
+\newcommand{\assembleEnvelope}
+{%
+ \par\aebenvDimensions
+ \setlength{\unitlength}{1pt}%
+ \AddToTemplate{addressEnv}
+ \inputEnvExecJS
+ \par\begin{document}\parskip0pt\strut\end{document}
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macrocode}
+%</package>
+%<*envexecjs>
+% \end{macrocode}
+% These are the after distill document assembly commands. We insert the
+% eEnvelope file as background, we define the \texttt{mailItNow()} function to mail
+% the package if the mail dialog is dismissed or if the document author
+% used the \texttt{donotmail} option. Mail data is saved as a global variable
+% \texttt{globa.oEmailArgs} that should be remembered by Acrobat until it is closed.
+% \begin{macrocode}
+\begin{execJS}{envexecjs}
+global.oEmailArgs = {
+ bUI:\mailtoUI,
+ cTo: "\mailtoEmail",
+ cCc: "\mailtoCC",
+ cBcc: "\mailtoBCC",
+ cSubject: "\mailtoSubject",
+ cMsg: "\mailtoMessageBody"
+};
+\addWatermarkFromFile({
+ bOnTop:false,
+ cDIPath:"\pathtoEnv"
+});
+function mailItNow()
+{
+ try { this.mailDoc(global.oEmailArgs) } catch(e) {}
+}
+console.println("mailItNow();");
+\executeSave();
+if ( \mailitNow\space)
+ aebTrustedFunctions(this, aebMailDoc, global.oEmailArgs);
+\end{execJS}
+% \end{macrocode}
+% \begin{macrocode}
+%</envexecjs>
+%<*package>
+\thispagestyle{empty}
+%</package>
+% \end{macrocode}
+% \Finale
+\endinput
diff --git a/texmf-dist/source/latex/aebenvelope/aeb_envelope.ins b/texmf-dist/source/latex/aebenvelope/aeb_envelope.ins
new file mode 100644
index 00000000..201f482a
--- /dev/null
+++ b/texmf-dist/source/latex/aebenvelope/aeb_envelope.ins
@@ -0,0 +1,60 @@
+%%
+%% This file will generate fast loadable files and documentation
+%% driver files from the doc files in this package when run through
+%% LaTeX or TeX.
+%%
+%% Copyright 1999-2006 D. P. Story
+%%
+%% This file is part of the `AcroTeX eDucation Bundle'.
+%% -------------------------------------------
+%%
+%% It may be distributed under the conditions of the LaTeX Project Public
+%% License, either version 1.2 of this license or (at your option) any
+%% later version. The latest version of this license is in
+%% http://www.latex-project.org/lppl.txt
+%% and version 1.2 or later is part of all distributions of LaTeX
+%% version 1999/12/01 or later.
+%%
+%% --------------- start of docstrip commands ------------------
+%%
+\def\filedate{2007/05/14}
+\def\batchfile{aeb_envelope.ins}
+%
+\input docstrip
+\ifx\generate\undefined
+ \Msg{**********************************************}
+ \Msg{*}
+ \Msg{* This installation requires docstrip}
+ \Msg{* version 2.4 or later.}
+ \Msg{*}
+ \Msg{* An older version of docstrip has been input}
+ \Msg{*}
+ \Msg{**********************************************}
+ \errhelp{Move or rename old docstrip.tex and get a newer one.}
+ \errmessage{Old docstrip in input path}
+ \batchmode
+ \csname @@end\endcsname\end
+\fi
+
+\keepsilent
+\askforoverwritefalse
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\preamble
+\endpreamble
+\generate
+{%
+ \file{aeb_envelope.sty}{\from{aeb_envelope.dtx}{copyright,package}}
+ \file{envexecjs.def}{\from{aeb_envelope.dtx}{copyright,envexecjs}}
+}
+
+\Msg{***************************************************************}
+\Msg{*}
+\Msg{* \space To finish the installation you have to copy the files }
+\Msg{*}
+\Msg{* \space *.sty, *.cfg and *.def into a directory searched by TeX}
+\Msg{*}
+\Msg{***************************************************************}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\endinput
diff --git a/texmf-dist/source/latex/aebenvelope/envelope.cfg b/texmf-dist/source/latex/aebenvelope/envelope.cfg
new file mode 100644
index 00000000..1873146f
--- /dev/null
+++ b/texmf-dist/source/latex/aebenvelope/envelope.cfg
@@ -0,0 +1,2 @@
+\ExecuteOptionsX{path2folder={/C/AcroTeX/acrotex/aebpro/aebEnvelope/envelopes}}
+