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've needed a few new packages for some macros to draw diagrams that I'm working with.

I've heard that some LaTeX editors can automatically download the correct packages from CTAN when they're not found when attempting to compile a tex file.

I.e. when I put in \usepackage{xiften}, for example, and then (I'm sure this is the wrong way, I've only been using auctex for a couple of days) do M-x compile with command pdflatex file.tex, and it gives the error xifthen.sty not found, it would go to ctan and find xifthen.sty and download it, then after that when ifmtarg.sty (a dependency) was not found, it would fetch that, etc.

Can AUCTeX do anything like this? If not, is there a simple way to install packages via the command line? The equivalent of a package manager, or something?

share|improve this question

1 Answer 1

If you are using a TeX Live based distribution, such as MacTeX, I am aware of no "on-the-fly" installation of packages. This is a feature of the Windows-based MikTeX distribution.

ACUTeX may provide some functionality to remedy this- those emacs users are crafty. However I cannot speak authoritatively on the subject as I don't use emacs.

TeX Live does indeed have a package manager though- the command you want is tlmgr --help for general usage notes and tlmgr install <pkgname> to install a package. You may also want to check out the TeX Live Utility which provides a nice GUI for tlmgr on OS X.

share|improve this answer
1  
Sharpie is right: this is something that MiKTeX can do, and is nothing to do with your editor. –  Joseph Wright Aug 17 '10 at 5:44

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.