Debian Codegraph @

texmf-dist/doc/latex/mailmerge/README

raw
1
2 MAILMERGE: repeat amount of text merging fields
3
4 author: Miguel Vinicius Santini Frasson
5
6 2009--09--23 version 1.0
7
8 The LaTeX package mailmerge provides an interface to produce text from
9 a template where fields are replaced by actual data, like in a
10 database. It is useful to produce several letters from a template,
11 certificates or other such documents. It allows to access the entry
12 number, number of entries and so on.
13
14 Generation of sty file and documentation from DTX and INS files
15 ===============================================================
16
17 -> generating mailmerge.sty
18 latex mailmerge.ins
19
20 -> generating documentation in pdf form
21 pdflatex mailmerge.dtx
22 pdflatex mailmerge.dtx
23 makeindex -s gind.ist -o mailmerge.ind mailmerge.idx
24 pdflatex mailmerge.dtx
25 pdflatex mailmerge.dtx
26
27 Suggestion of instalation
28 =========================
29
30 1) Put inside your TEXINPUTS variable points to or
31
32 2) Inside TEXMF tree > tex > latex
33 create a directory named mailmerge and put mailmerge.sty there.
34
35 Inside TEXMF tree > doc > latex
36 create a directory named mailmerge and put mailmerge.pdf there.
37
38 Example of usage
39 ================
40
41 \documentclass{article}
42 \usepackage{ifthen,mailmerge}
43
44 \begin{document}
45
46 % \ifequal{A}{B}{what if A=B}{what if A<>B}
47 \newcommand{\ifequal}[2]{\ifthenelse{\equal{#1}{#2}}}
48
49 \mailfields{name,friends,drives}
50
51 \mailrepeat{\section*{\field{name}'s profile}
52 \field{name} has
53 \ifequal{\field{friends}}{}
54 {no friends}
55 {\field{friends} as friends}.
56 \ifequal{\field{drives}}{yes}{Drives.}{Doesn't drive.}
57 \par (entry \entrynumber\ of \numberofentries)
58 % \newpage optional
59 }
60
61 \mailentry{John,{Bart and Robert},yes}
62 \mailentry{Sara,{Jean, Phillip and Maria},no}
63 \mailentry{Edward,,yes}
64
65 \end{document}
66
67
68 Licence
69 =======
70
71 Copyright (C) 2009 Miguel V. S. Frasson ([email protected])
72
73 Licence: LPPL
74
75 This package may be distributed under the terms of the LaTeX
76 Project Public License, as described in lppl.txt in the base
77 LaTeX distribution, either version 1.2 or (at your option)
78 any later version.
79
80 This program is distributed in the hope that it will be useful,
81 but WITHOUT ANY WARRANTY; without even the implied warranty of
82 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.