Sign up ×
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.

Well, the question is pretty self-explanatory. (I'm writing a short tutorial on LaTeX, and wanted some trivia;)).

share|improve this question
More than there are stars in the sky... –  Stephan Lehmke Sep 19 '12 at 18:42
last year > 3100 packages/classes/... –  Herbert Sep 19 '12 at 18:56

3 Answers 3

up vote 9 down vote accepted

TeX Live

TeX Live 2012 (2012-09-19)

$ egrep -c '\.sty$' ls-R
$ egrep -c '\.cls$' ls-R
$ egrep -c '\.(sty|cls)$' texmf-dist/ls-R

Different method:

$ find texmf-dist/tex/latex \( -name \*.sty -or -name \*.cls \) |wc
$ find texmf-dist/tex/generic \( -name \*.sty -or -name \*.cls \) |wc
$ find texmf-dist/tex \( -name \*.sty -or -name \*.cls \) |wc


  • False positives: .sty/.cls files that are not LaTeX packages or classes.
  • There are packages that divide their work on smaller units (modules in tikz, …) that are formally LaTeX packages.
  • TeX Live only contains a subset of free packages and classes.

TeX Catalogue


$ find catalogue/entries/ -exec grep -l '/macros/latex' {} \; |wc


  • Not all package in CTAN are in the Catalogue.
  • There are packages outside CTAN:macros/latex/ (e.g. pgf) or packages that can be used in different formats.
  • One Catalogue entry might contain several packages and classes.
  • False positives: Driver files and other stuff (e.g. pdftex-def).
share|improve this answer

On a full MiKTeX installation:

$ find . | grep '\.sty' | wc -l
$ find . | grep '\.cls' | wc -l

So about 3500 style files and about 350 class files.

share|improve this answer
That are a lot more style files than i thought, based on the number of packages. –  Juri Robl Sep 19 '12 at 20:45
Why not just find . -name \*.sty | wc -l? (Or even find . -name \*.sty -print0 | xargs -0 -L1 basename | sort | uniq | wc -l, just in case;)?) Anyway, thanks; I didn't do this myself only because I do not have a full TeXlive installation (and I don't want/have time to). –  mbork Sep 19 '12 at 21:10

At least the MiKTeX Package Manager has 2371 packages at the moment.

share|improve this answer
This is probably a good estimate, though obviously some of these either (a) provide more than one package/class or (b) provide no LaTeX packages/classes. –  mbork Sep 19 '12 at 18:48
@mbork Or are obsolete. –  Qrrbrbirlbel Sep 19 '12 at 18:51

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.