TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm using datatool to make a mail merge.

I have my .csv file. I've defined my \DTLloaddb{indirizzi}{/home/kde/Dropbox/edile_150/consulenti_arezzo.csv} and if I use \DTLdisplaydb{indirizzi} I have my table printed on the doc.

But if I try to make that:


\nome=nome, \cognome=cognome,%
\num=num, \via=VIA, \civico=civico, \localita=localita \cap=cap,%
\provincia=provincia, \tel=tel


{\nome\ \cognome\\
\via, \civico\ \num\\
\via \civico \localita \\
\cap \provincia \tel}

when I make a PDF, I receive this error:

undefined control sequence \begin

The line number is the same of \begin{letter} and then other errors

(Missing control sequence \begin)

I can't understand why I receive this error.

share|improve this question

There are some errors in your input.


\nome=nome, \cognome=cognome,%
\num=num, \via=VIA, \civico=civico, \localita=localita, \cap=cap,%
\provincia=provincia, \tel=tel}
  {\nome\ \cognome\\
  \via, \civico\ \num\\
  \via \civico \localita \\
  \cap \provincia \tel}}

A comma was missing after localita; more important, \DTLforeach* requires three arguments: the symbolic name of the database, the assignments and the text that must be acted on. With braces around \begin{letter}{...} the document should be processed correctly.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.