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 understand that the suffix .cls stands for classes.

Then, why packages don't have the suffix .pkg, but rather have .sty?

share|improve this question
Because they are used to style things...? – Mariano Suárez-Alvarez Feb 8 '13 at 21:42
@MarianoSuárez-Alvarez Style things? Like lastpage and many other are (not) doing, for example ... :-/ And why not \usestyle then? – yo' Feb 8 '13 at 21:44
up vote 23 down vote accepted

LaTeX 2.09 did not have the distinction; everything was called styles.


When we made LaTeX2e, there were relatively few "main document styles". The standard ones (article/report/book) accounted for the vast majority of documents. As they were part of the core distribution, changing those to be "classes" was not too hard.

The majority of "style files" worked unchanged or with only minor updates with 2e, so forcing a filename change would have been too disruptive, but "style" seemed to be the wrong name, so "package" was introduced.

share|improve this answer

This is an historical artifact.

In LaTeX 2.09 there weren't "document classes", but "document styles", with extension .sty: book.sty, article.sty and so on.

Additional "packages" were loaded as options to \documentstyle and they needed to have the .sty extension as well.

When LaTeX2e introduced document classes (extension .cls), the .sty extension was kept because some of the additional packages could be used out of the box simply with \usepackage. Maintaining two possible extensions is cumbersome (and LaTeX2e had severe limitations on memory usage).

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.