TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

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 considering a dive into TeX, but first want to determine if it makes sense for my particular project. I've inherited responsibility for a roster book with names, addresses, etc. for a club with several hundred members. Every year we print hard copies of this book. Currently, the book is a hand-edited Word document. I have three requirements:

  1. Auto-generate the TeX that constitutes the book, pulling current member data from a database/spreadsheet.
  2. Calculate page breaks dynamically so that member entries are not split across pages.
  3. Have it look really nice.

I figure I'm in the right place for #3, but, being a complete TeX n00b, I'd like opinions on whether this is something I should even attempt, and if so, the best way to approach it. My programming skills are fairly decent, so that won't be an issue. Thanks much.

share|improve this question
Even with Word, this could be automated using the Mail Merge capabilities. The downside of using LaTeX for this is that when you leave, so does any understanding of how to modify what you've done. But yes, you can do this (see my answer.) – Alan Munn Jan 24 '11 at 18:53
I thought Mail Merge was for creating multiple documents based on spreadsheet info? That's not what I want. I want to loop through a spreadsheet and put all entries into a single document. A Word solution would probably be best. I was assuming it wasn't possible. – user3125 Jan 24 '11 at 20:23
@Alan: But that is the same problem with advance word hacking, who can take over and continue work with a word doc with a lot of macro magic in it....? – Johan Jan 24 '11 at 20:23
@Mark I think you can use the "Catalog" or "Directory" mail merge document type to create this kind of thing. I don't use Word much any more, so I can't give you more details, but the following link support.microsoft.com/kb/294693 might help. – Alan Munn Jan 24 '11 at 20:57
For autogenerating content, you should of course use iTeX. – Harald Hanche-Olsen Jan 24 '11 at 22:45

The datatool package, which can read csv files, is easily capable of doing (1). For (2), pagebreaking can easily be controlled using the minipage environment. (I.e. construct a member environment that wraps the member information into a minipage.) (There are other ways, too.) (3) is obviously possible. If you need nice fonts (like any fonts available on your system) you should use XeLaTeX.

Be prepared to spend a bit of time learning about LaTeX though.

See this link for an up-to-date free intro. Also the answers here.

share|improve this answer
(+1) Latex and friends looks awesome! – chl Jan 24 '11 at 19:02

Your Answer


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