[OS X TeX] envelopes and mutlple letters

Alexandru Scorpan ascorpan at math.ufl.edu
Sun Dec 5 10:38:36 EST 2004


> Before I set about doing this by hand, or worse, with Word, I figured
> I would check here.
>
> I need to send out about 30 copies of a letter
>
> I could write a short PHP to take the initial tex file, add the
> appropriate info to each, and then save a new .tex file, one per
> letter.  This seems rather inefficient however, and could be down
> right unwieldy if I had, for example, 300 or 3000 letters to process.
> It seems that a single document containing all the letters would be
> better, yes?  Before I roll-my-own, is there something already out
> there?

Simplest suggestion:  define a macro
	\newcommand\Letter[3]
		{\begin{letter}
		...
		\end{letter}%
		}
that takes the info as arguments, then go
	\Letter{Me}{Home}{Lazy}
	\Letter{Mom}{Old Country}{Missing me}
	...
Not that great for 300 or 3000, though.  (Nonetheless, there are 
procedures to have TeX read external files, etc;  TeX is, after all, a 
programming language.)

For labels, put a
	\makelabels
before \begin{document}, and the addresses used in the letters will be 
gathered and printed nicely at the end.

All this assumes the standard letter class.

-- Alex

--------------------- Info ---------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
           & FAQ: http://latex.yauh.de/faq/
TeX FAQ: http://www.tex.ac.uk/faq
List Post: <mailto:MacOSX-TeX at email.esm.psu.edu>





More information about the MacOSX-TeX mailing list