diff options
author | Norbert Preining <norbert@preining.info> | 2019-09-02 13:46:59 +0900 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2019-09-02 13:46:59 +0900 |
commit | e0c6872cf40896c7be36b11dcc744620f10adf1d (patch) | |
tree | 60335e10d2f4354b0674ec22d7b53f0f8abee672 /macros/latex/contrib/postcards |
Initial commit
Diffstat (limited to 'macros/latex/contrib/postcards')
-rw-r--r-- | macros/latex/contrib/postcards/README | 26 | ||||
-rw-r--r-- | macros/latex/contrib/postcards/datasmp.txt | 8 | ||||
-rw-r--r-- | macros/latex/contrib/postcards/pcardsmp.tex | 47 | ||||
-rw-r--r-- | macros/latex/contrib/postcards/postcards.cls | 97 |
4 files changed, 178 insertions, 0 deletions
diff --git a/macros/latex/contrib/postcards/README b/macros/latex/contrib/postcards/README new file mode 100644 index 0000000000..aa607b9ebd --- /dev/null +++ b/macros/latex/contrib/postcards/README @@ -0,0 +1,26 @@ +README for `postcards.cls' + + author: bil kleb <w.l.kleb@larc.nasa.gov> + date: 14 aug 1999 +version: 0.1 +license: lppl + +DESCRIPTION: + + a letter-based class used to print multiple, pre-stamped 5.5 x 3.5'' + postcards via the `envlab' and `mailing' packages. + +MOTIVATION: + + you have a message that you would like to send to numerous individuals + but you're too cheap to use letters and envelopes. + +MANIFEST: + + postcards.cls - the class + pcardsmp.tex - a demonstration + datasmp.txt - sample address database (used by pcardsmp) + +SUPPORT: + + not much. diff --git a/macros/latex/contrib/postcards/datasmp.txt b/macros/latex/contrib/postcards/datasmp.txt new file mode 100644 index 0000000000..3448df761c --- /dev/null +++ b/macros/latex/contrib/postcards/datasmp.txt @@ -0,0 +1,8 @@ +Margie B Wells
+1114 Juniper Ct.\\Grove, MD 21012
+Hello,
+
+Franklin Marstin
+1114 Poplar Lane\\Canopy, WA 90830-3930
+Howdy partner,
+
diff --git a/macros/latex/contrib/postcards/pcardsmp.tex b/macros/latex/contrib/postcards/pcardsmp.tex new file mode 100644 index 0000000000..54c872ab92 --- /dev/null +++ b/macros/latex/contrib/postcards/pcardsmp.tex @@ -0,0 +1,47 @@ +% `pcardsmp.tex' - demonstration of postcard class
+
+% author: bil kleb <w.l.kleb@larc.nasa.gov>
+% date: 14 aug 1999
+% version: 0.1
+% license: lppl
+
+% ymmv, but here's what worked for me:
+
+% to compile:
+% latex pcardsmp
+
+% convert to postscript (50 addresses):
+% dvips -t landscape '-l=1' -c 50 -o message.ps pcardsmp
+% dvips -t landscape '-p=51' -o addresses.ps pcardsmp
+
+% to preview (dvi preview typically not correct due to rotations):
+% ghostview pcardsmp.ps
+
+% to print: (insert 3.5'' towards infeed roller)
+% lpr message.ps (stamp down and nearest the infeed)
+% lpr addresses.ps (stamp up, furthest from infeed)
+
+\documentclass[11pt]{postcards}
+
+% database containing addresses of the form:
+%
+% name
+% street\\town, etc.
+% opening
+% [blank line]
+
+\addressfile{datasmp.txt}
+
+% main body of text:
+\mailingtext{% note: opening is one of the address datafields
+The main message text goes here.
+\closing{Respectfully,}}
+
+% from-address and signature line:
+\address{Tree Killers, Inc.\\
+ 5 Bulldozer Lane\\
+ Slash and Burn, RT 99930}
+\signature{Marvin the Robot}
+
+\begin{document}
+\end{document}
diff --git a/macros/latex/contrib/postcards/postcards.cls b/macros/latex/contrib/postcards/postcards.cls new file mode 100644 index 0000000000..a61b55c19c --- /dev/null +++ b/macros/latex/contrib/postcards/postcards.cls @@ -0,0 +1,97 @@ +% `postcards.cls' - a letter-based class used to print multiple +% 5.5 x 3.5'' postcards via the `envlab' and `mailing' packages. + +% author: bil kleb <w.l.kleb@larc.nasa.gov> +% date: 14 aug 1999 +% version: 0.1 +% license: lppl + + +% begin the beginning: + +\NeedsTeXFormat{LaTeX2e} +\ProvidesClass{postcards}[1999/08/14 v0.1 multiple postcards class] + + +% load the standard latex letter class: + +\DeclareOption*{\PassOptionsToClass{\CurrentOption}{letter}} +\ProcessOptions\relax +\LoadClass[landscape]{letter} + +% strip the return address, date, and to-address from the +% standard letter class opening: +\renewcommand*{\opening}[1]{\thispagestyle{firstpage}#1\par\nobreak} + +% reduced vertical space allowed for signature in closing: +\renewcommand{\closing}[1]{\par\nobreak\vspace{\parskip}% + \stopbreaks + \noindent + \ifx\@empty\fromaddress\else + \hspace*{\longindentation}\fi + \parbox{\indentedwidth}{\raggedright + \ignorespaces #1\\[3\medskipamount]% [wlk: was 6] + \ifx\@empty\fromsig + \fromname + \else \fromsig \fi\strut}% + \par} + + +% use `geometry' package to specify new page size and layout: + +\RequirePackage[papersize={3.5in,5.5in},% postcard size + margin=0.375in,% margins + landscape,% % landscape page orientation + voffset=5in,% % moves ``page'' to upper left corner + noheadfoot% % no header or footers + ]{geometry}[1998/04/08] + + +% use `envlab' package to print address ``labels'' on the postcards: + +\RequirePackage[norotateenvelopes,% landscape mode from above + % already rotates the + % ``envelopes'' + alwaysbarcodes% necessary since we're using the + % mailing package (see envlab + % guide) + ]{envlab}[1997/07/16] + +% set postcard size: +\SetEnvelope{5.5in}{3.5in} + +% change a margin: +\setlength{\ToAddressTopMargin}{0.25in}% [default is 0.5in] + +% set to-address flush right instead of centered: +\renewcommand{\PrintEnvelope}[2]{% + \begin{minipage}[t][\EnvelopeHeight]{\EnvelopeWidth}% + \baselineskip=0pt% + \lineskip=0pt% + \parindent=0pt% + \PrintReturnAddress{#1}\\% + \begin{flushright}% + \PrintAddress{#2}% + \end{flushright}% + \end{minipage}} +\makelabels + + +% load `mailing' package to handle multiple addresses: + +\RequirePackage{mailing}[1999/03/03] + +% this package requires a database file containing addresses of the form: +% +% name +% street\\town +% opening +% [blank line] +% +% via the \addressfile{databasefilename} command in the preamble + + +% automatically put the \makemailing command +% at the beginning of the document: + +\AtBeginDocument{\makemailing} |