General ⇒ automatic cover letter generation
-
- Posts: 34
- Joined: Sat Aug 08, 2009 1:05 pm
automatic cover letter generation
I want to know how to automatically generate cover letters (or certificates) with a list. My idea is having two files, one of them with a list, and the other one when compiled will go the the list_file and grab the necessary information and automatically generate as much pages as information contained in the list_files.
Does anyone knows how to do this? If the list_file could be something of CSV files, this would be even better.
Does anyone knows how to do this? If the list_file could be something of CSV files, this would be even better.
NEW: TikZ book now 40% off at Amazon.com for a short time.

-
- Posts: 34
- Joined: Sat Aug 08, 2009 1:05 pm
automatic cover letter generation
It seems that the package mailmerge will do the job
The package mailmerge provides an interface to produce text from a template, where fields are replaced by actual data, as in a database. The package may be used to produce several letters from a template, certificates or other such documents. It allows access to the entry number, number of entries and so on.
-
- Site Moderator
- Posts: 814
- Joined: Tue Jul 01, 2008 2:19 pm
Re: automatic cover letter generation
Both can do the job, but datatool is much more flexible. You can just maintain a CSV file with the changing data, and then use the foreach construction to loop over the data.
-
- Posts: 34
- Joined: Sat Aug 08, 2009 1:05 pm
Re: automatic cover letter generation
thanks for point me out datatool, I'm sure I will be using it quite a lot 

-
- Posts: 34
- Joined: Sat Aug 08, 2009 1:05 pm
automatic cover letter generation
I also found formlett, which is quite simple and straightforward, you just put some variables across the text, and them you put
moreletter 1st_variable; 2nd_variable! and it will generate all the letters. See working example
the problem is that I cannot use \usepackage, since it gives an error. Does anyone knows why?
moreletter 1st_variable; 2nd_variable! and it will generate all the letters. See working example
Code: Select all
\documentstyle[formlett,12pt,a4]{article}
%\usepackage[portuguese]{babel}
%\usepackage[utf8]{inputenc}
%\usepackage[pdftex]{graphicx}
\begin{document}
\beginletter
\NOPAGENUMBERS\parindent=0pt
\vspace*{3cm}
Hereby I confirm that
\begin{flushleft}
\hspace*{1cm} \textsf{\paras[2]}
\end{flushleft}
participated in BLABLABLA and delivered the contributed talk
\begin{flushleft}
\hspace*{1cm} \textsf{\paras[1]}.
\end{flushleft}
\vfill
\hspace{7cm} Lisbon, \today
\vspace{2cm}
\hspace{7cm} Chairman of the Organizing Committee
\hspace*{7cm} Professor John Doe
\vfill\eject
\endletter
\moreletter
How to do things; Jane Doe!
\moreletter
numbers in $\textrm{\textbf{R}}^n$; ze ninguem!
\end{document}
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
automatic cover letter generation
I wonder why you are working in LaTeX2.09 mode.
Omit any driver option for the graphicx package.
Best regards
Thorsten
Code: Select all
\documentclass[12pt,a4paper,portuguese]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel}
\usepackage{graphicx}
\usepackage{formlett}
...
Best regards
Thorsten
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
-
- Posts: 34
- Joined: Sat Aug 08, 2009 1:05 pm
automatic cover letter generation
thanks localghost, now it's working.
You asked why I was working in LaTeX2.09 mode, but I simply copy the information from the user manual found in http://www.ctan.org/tex-archive/help/Ca ... mlett.html, and since I'm not a LaTeX guru as you, I was wondering why the use of and not
You asked why I was working in LaTeX2.09 mode, but I simply copy the information from the user manual found in http://www.ctan.org/tex-archive/help/Ca ... mlett.html, and since I'm not a LaTeX guru as you, I was wondering why the use of
Code: Select all
\documentstyle
Code: Select all
\documentclass
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
automatic cover letter generation
Half a page later (in the left column) you can find the according code for the LaTeX2e mode.melekzedek wrote:[...] You asked why I was working in LaTeX2.09 mode, but I simply copy the information from the user manual found in http://www.ctan.org/tex-archive/help/Ca ... mlett.html [...]
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10