19

I'm increasingly fed up with the arbitrary restrictions that the standard LaTeX letter class has. Today I discovered that the table environment is not defined in the standard letter class, which means one can't use labels or captions.

CTAN has a list of letter related packages. Can anyone suggest a good LaTeX letter class to work with for general use? I'd like something as flexible and with as few restrictions as possible, well maintained, not excessively complicated to use, and not buggy. I was earlier recommended newlfm (on comp.text.tex). That post was about the fact that the letter class does not allow the addition of a subject.

A similar question has been asked already, "A clean letter class for office use, including serial letters", where scrlttr2 is recommended.

3
  • I've run into this issue trying to use figures in a letter - I get the error "environment figure undefined" Commented Jan 22, 2012 at 19:44
  • @David: What alternatives are you considering? Commented Jan 22, 2012 at 20:17
  • I was considering article, report until I found this answer, in the future I will give scrlttr2 a try. Commented Jan 23, 2012 at 3:33

2 Answers 2

19

I recommend using the scrlttr2 class.

  • It is extremely flexible
  • It is actively maintained
  • It is stable since many years; if there would occur any bug I'm sure the author would deal with it quickly
  • There are templates (German example)
  • The class includes concepts which distinguish it from other classes, such as variables, pseudo lengths
  • You can use option files to store macros or to extend functionality
  • You could even use \section, \subsection, \subsubsection, \paragraph and \minisec: the KOMA-Script author provides the option file sections.lco for it, with an example
  • It benefits from features of the KOMA-Script bundle
  • You can use scrpage2 with it for header and footer
  • You can use tables and figures with captions, for example if you load the float and the caption package
  • Here's a German presentation about separation of content and presentation using scrlttr2: briefdemo.pdf (source code)

Originally, the KOMA-Script manual, including the sclttr2 documentation, has been written in German, also published as a book. There's an english translation, which could be a bit behind the most current features (currently 2011-05-30).

As a general remark: I expect a letter class to provide letter functionality, a book class to offer book features etc. - not a class to do all. There are many classes for different purposes and even if one uses two classes, the results can be merged.

12
  • Thanks for the recommendation. I see scrlttr2 allows use of a subject. Do you know whether you can use the table environment, or is this something I'll have to find out for myself? Commented Aug 6, 2011 at 23:43
  • It doesn't look like the table environment is defined here either. What a drag. Does anyone know why it isn't? Commented Aug 7, 2011 at 8:12
  • @Faheem: Floats are not defined by the letter classes are these are unlikely to be appropriate. You can use a tabular just fine, but it will not float (or have a caption).
    – Joseph Wright
    Commented Aug 7, 2011 at 11:39
  • 1
    @Faheem: even in a scientific correspondence, separating letter and document would be a good idea. For example, the document could be fowarded without the letter or it could be worked on, such as revised and sent back.
    – Stefan Kottwitz
    Commented Aug 7, 2011 at 13:17
  • 2
    Please note, that the author of KOMA-Script no longer supports section.lco and instead recommends the use of the scrletter package together with a documentclass such as scrartcl. Commented Jun 18, 2019 at 20:32
7

I've never quite seen the advantage of a letter class. I just use article class (plus a letterhead package that I wrote for my university.) Using the article class obviously solves the problems with respect to undefined environments in (some of) the letter classes.

For mail merge type documents I use the datatool package, which allows me to store the addresses in a .csv file and allows an unlimited number of fields as needed. The documentation has examples of using it for mail merge. Here's an example of how I use it: Example of mailmerge package with an Excel spreadsheet. But my needs are quite minimal, so this may not be the best solution for everyone.

4
  • 1
    I don't understand why a reply basically saying that a letter class is not useful is voted up so much. Is this really something that many of you believe? Commented Aug 7, 2011 at 12:58
  • 2
    I think this discussion shouldn't take place in the comments, so I've replied in chat. What's "useful" is a pretty subjective (and your question borders on that, too.) The main functionality that I have for letters is (i) my university letterhead and (ii) mail merge capability. (i) can't be solved by a generic letter class, and (ii) can be solved very well with datatool. So for me, (and others, I suspect) there's no need for a specific letter class.
    – Alan Munn
    Commented Aug 7, 2011 at 13:18
  • Is your package for the letterhead publicly available? If so, you could answer tex.stackexchange.com/q/296443/5645 Commented Feb 29, 2016 at 7:19
  • @MartinThoma no my package is only distributed internally. But it doesn't provide the functionality you seek anyway.
    – Alan Munn
    Commented Feb 29, 2016 at 13:48

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .