summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/mailing
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2006-01-12 23:58:28 +0000
committerKarl Berry <karl@freefriends.org>2006-01-12 23:58:28 +0000
commit5786702d53be57116dcc1b56cce180d80845ab9f (patch)
tree5d1781037a85cbdcbf80ae78845732c5636f7631 /Master/texmf-dist/tex/latex/mailing
parent93d6df0e08e20675e3d1e40d309067384b537cf4 (diff)
mailing
git-svn-id: svn://tug.org/texlive/trunk@1060 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/mailing')
-rw-r--r--Master/texmf-dist/tex/latex/mailing/mailing.sty133
1 files changed, 133 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/mailing/mailing.sty b/Master/texmf-dist/tex/latex/mailing/mailing.sty
new file mode 100644
index 00000000000..a1b445dafce
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/mailing/mailing.sty
@@ -0,0 +1,133 @@
+%%
+%% This is file `mailing.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% mailing.dtx (with options: `package')
+%%
+%% Copyright (C) 1999-2004 Johannes Braams. All rights reserved.
+%%
+%% This file was generated from file(s) of the mailing package.
+%% ------------------------------------------------------------
+%%
+%% It may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3
+%% 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.3 or later is part of all distributions of LaTeX
+%% version 2003/12/01 or later.
+%%
+%% This work has the LPPL maintenance status "maintained".
+%%
+%% The Current Maintainer of this work is Johannes Braams.
+%%
+%% This file may only be distributed together with a copy of the
+%% mailing package. You may however distribute the mailing package
+%% without such generated files.
+%%
+%% The list of all files belonging to the mailing package is
+%% given in the file `manifest.txt.
+%%
+%% The list of derived (unpacked) files belonging to the distribution
+%% and covered by LPPL is defined by the unpacking scripts (with
+%% extension .ins) which are part of the distribution.
+%% Copyright (C) 1999-2004 Johannes L. Braams texniek at braams.cistron.nl
+%%
+%%
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{mailing}
+ [2004/02/20 v1.0b Send letters to multiple addresses]
+\newcommand{\addressfile}[1]{%
+ \def\M@filename{#1}}
+\long\def\mailingtext#1{\global\mailing@text={#1}}
+\def\makemailing{%
+ \M@openadrfile
+ \loop
+ \read@info
+ \if@notready
+ \begin{letter}{\M@toname\\\M@toaddress}%
+ \opening{\M@opening}%
+ \vskip\baselineskip
+ \the\mailing@text
+ \end{letter}
+ \fi
+ \if@notready
+ \repeat}
+\newread\M@adrfile
+\newtoks\mailing@text
+\newif\if@notready
+\newif\if@notemptyoreof
+\def\M@openadrfile{%
+ \openin\M@adrfile\M@filename\relax
+ \ifeof\M@adrfile
+ \loop
+ %\PackageWarning{mailing}{I can't find the file \M@filename}
+ \typeout{I can't find the file \M@filename!}
+ \closein\M@adrfile
+ \typein[\M@filename]{Enter a new name}
+ \openin\M@adrfile\M@filename
+ \ifeof\M@adrfile
+ \repeat
+ \fi}
+\def\read@info{%
+ \skip@empty@lines
+ \if@notready
+ \let\M@toname\M@line
+ \read\M@adrfile to\M@toaddress
+ \read\M@adrfile to\M@opening
+ \test@eof
+ \if@notready\read@defs\fi
+ \fi
+ }
+\def\read@defs{%
+ \def\M@defns{}%
+ {\loop
+ \endlinechar=-1
+ \read\M@adrfile to\M@line
+ \endlinechar=`\^^M
+ \expandafter\toks@\expandafter\expandafter
+ \expandafter{\expandafter\M@defns\M@line}%
+ \xdef\M@defns{\the\toks@}%
+ \test@emptyoreof
+ \if@notemptyoreof
+ \repeat}%
+ \M@defns
+ }
+\def\test@eof{%
+ \ifeof\M@adrfile
+ \@notreadyfalse
+ \else
+ \@notreadytrue
+ \fi}
+\def\test@emptyoreof{%
+ \@notemptyoreoftrue
+ \ifx\M@line\@empty
+ \global\@notemptyoreoffalse
+ \fi
+ \ifeof\M@adrfile
+ \global\@notemptyoreoffalse
+ \global\@notreadyfalse
+ \fi}
+\def\skip@empty@lines{%
+ {\loop
+ \endlinechar=-1
+ \ifeof\M@adrfile
+ \global\@notreadyfalse
+ \@tempswafalse
+ \else
+ \global\@notreadytrue
+ \global\read\M@adrfile to\M@line
+ \ifx\M@line\@empty
+ \@tempswatrue
+ \else
+ \@tempswafalse
+ \fi
+ \fi
+ \if@tempswa
+ \repeat}%
+ }
+\endinput
+%%
+%% End of file `mailing.sty'.