Take the 2-minute tour ×
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.

I am using TeXLive in Linux and want to learn and experiment. How can I list available document classes in my installation?

share|improve this question
1  
Welcome to TeX.SX! Usually, we don't put a greeting or a “thank you” in our posts. While this might seem strange at first, it is not a sign of lack of politeness, but rather part of our trying to keep everything very concise. Accepting and upvoting answers is the preferred way here to say “thank you” to users who helped you. –  Holene May 19 '13 at 7:26
    
OK, good to know! –  Cinco Sauces May 19 '13 at 7:32
1  
You can do this by a simple script which finds all files in the installation path with the extension .cls –  Marco Daniel May 19 '13 at 7:33
    
OK, so there is no built-in command for this? –  Cinco Sauces May 19 '13 at 7:41
1  
add comment

2 Answers

up vote 5 down vote accepted

TeX Live maintains some text files where all packages/classes etc. are listed. The files are called ls-R and there's one for each main tree. In order to find all installed document classes in your main path you can do the following command:

grep "\.cls" `kpsewhich --var-value TEXMFDIST`/ls-R > $HOME/allcls.txt

After this process you have a file allcls.txt in you home directory with all existent document classes.

share|improve this answer
    
The location may not be correct. For example, on my Mac kpsewhich --var-value TEXMFMAIN gives /usr/local/texlive/2012/texmf, but you want /usr/local/texlive/2012/texmf-dist. –  Joseph Wright May 19 '13 at 8:10
    
Fine, I got it. Thanks. –  Cinco Sauces May 19 '13 at 8:13
add comment
find `kpsewhich --var-value TEXMFDIST` -name *.cls

and if you have also a local tree:

find `kpsewhich --var-value TEXMFLOCAL` -name *.cls
share|improve this answer
    
This is slow ;-) –  Marco Daniel May 19 '13 at 8:14
add comment

Your Answer

 
discard

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.