Menu
CTAN
Comprehensive TeX Archive Network
Cover Upload Browse

Direc­tory tex-archive/macros/latex/contrib/mailmerge

MAILMERGE: repeat amount of text merging fields

author: Miguel Vinicius Santini Frasson

2009--09--23 version 1.0

The LaTeX package mailmerge provides an interface to produce text from
a template where fields are replaced by actual data, like in a
database.  It is useful to produce several letters from a template,
certificates or other such documents.  It allows to access the entry
number, number of entries and so on.

Generation of sty file and documentation from DTX and INS files
===============================================================

-> generating mailmerge.sty
latex mailmerge.ins

-> generating documentation in pdf form
pdflatex mailmerge.dtx
pdflatex mailmerge.dtx
makeindex -s gind.ist -o mailmerge.ind mailmerge.idx
pdflatex mailmerge.dtx
pdflatex mailmerge.dtx

Suggestion of instalation
=========================

1) Put inside your TEXINPUTS variable points to or

2) Inside TEXMF tree > tex > latex
   create a directory named mailmerge and put mailmerge.sty there.
   
   Inside TEXMF tree > doc > latex
   create a directory named mailmerge and put mailmerge.pdf there.

Example of usage
================

\documentclass{article}
\usepackage{ifthen,mailmerge}

\begin{document}

% \ifequal{A}{B}{what if A=B}{what if A<>B}
\newcommand{\ifequal}[2]{\ifthenelse{\equal{#1}{#2}}}

\mailfields{name,friends,drives}

\mailrepeat{\section*{\field{name}'s profile}
   \field{name} has
   \ifequal{\field{friends}}{}
     {no friends}
     {\field{friends} as friends}.
   \ifequal{\field{drives}}{yes}{Drives.}{Doesn't drive.}
   \par (entry \entrynumber\ of \numberofentries)
   % \newpage optional
}

\mailentry{John,{Bart and Robert},yes}
\mailentry{Sara,{Jean, Phillip and Maria},no}
\mailentry{Edward,,yes}

\end{document}


Licence
=======

Copyright (C) 2009 Miguel V. S. Frasson (mvsfrasson@gmail.com)

Licence: LPPL

This package may be distributed under the terms of the LaTeX
Project Public License, as described in lppl.txt in the base
LaTeX distribution, either version 1.2 or (at your option)
any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Files

Name Size Date Notes
README 2233 2009-09-25 03:25
mailmerge.dtx 11290 2009-09-25 03:15
mailmerge.ins 655 2009-09-25 01:16
mailmerge.pdf 103251 2009-09-25 03:02

Down­load the con­tents of this pack­age in one zip archive (94.9k).

mailmerge – Re­peat­ing text field sub­sti­tu­tion

The pack­age mailmerge pro­vides an in­ter­face to pro­duce text from a tem­plate, where fields are re­placed by ac­tual data, as in a database. The pack­age may be used to pro­duce sev­eral let­ters from a tem­plate, cer­tifi­cates or other such doc­u­ments. It al­lows ac­cess to the en­try num­ber, num­ber of en­tries and so on.

Pack­age De­tailsmailmerge
Ver­sion1.0
Li­censeThe LaTeX Project Public Li­cense 1.2
Copy­right2009 Miguel V. S. Fras­son
Main­tainerMiguel VinĂ­­cius San­tini Fras­son
Con­tained inTeXlive as mailmerge
MikTeX as mailmerge
Topics mail merge, etc
See also merge
postcards
mailing
Guest Book Sitemap Contact