Document Classesletter | Serial Letters

Information and discussion about specific document classes and how to create your own document classes.
Post Reply
bobbylou
Posts: 18
Joined: Tue Apr 21, 2009 6:54 pm

letter | Serial Letters

Post by bobbylou »

Hi,

I am writing a letter in LaTeX that I want to send to a number of different recipients. The catch is that I want to send a slightly different version of the letter depending on the recipient: for example, in the letter to be sent to Ms. XX I'd like the body of the letter to say Ms. XX and in the letter to be sent to Mr. YY I'd like the body of the letter to say Mr. YY. I have searched google and can't seem to find a way to do this. Here's an example of some code:

Code: Select all

Code, edit and compile here:
\documentclass{letter}
\signature{Me}
\address{Me \\ My address}
\begin{document}
\def \body {I'd like it to say "Ms. XX" or "Mr. YY" depending on the letter, as below.}
\begin{letter}
{Ms. XX \\ Ms. XX's address}
\opening{Dear Ms. XX:}
\body
\closing{Sincerely,}
\end{letter}
\begin{letter}
{Mr. YY \\ Mr. YY's address}
\opening{Dear Mr. YY:}
\body
\closing{Sincerely,}
\end{letter}
\end{document}
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

letter | Serial Letters

Post by localghost »

The »scrlttr2« class from KOMA-Script supports serial letters. The manual has the details.


Thorsten
Post Reply