Easily download CTAN packages
I use LaTeX for nearly all of my document preparation. Letters, reports, you name it. Because I'm always finding new uses for it, I find myself frequently downloading packages from CTAN (the Comprehensive TeX Archive Network).
I find it a hassle to copy a package's URL from my desktop (where I searched
for it) to my netbook (where I want to download it). To solve this problem, I've
written a little shell function that downloads a package for me. If you want to
use it, just stick it in $HOME/.zshrc
if you use zsh,
$HOME/.bashrc
if you use bash, etc.
ctand() {
wget http://mirror.ctan.org/macros/latex/contrib/$1.zip && unzip $1.zip
}
To download, say, the program
package, you'll want to run
ctand program
Note: You'll need to run source $HOME/.zshrc
or
source $HOME/.bashrc
after editing either to be able to use it. Or
you can open a new terminal and use it there.
Comments: To comment on this post, send me an email following the template below. Your email address will not be posted, unless you choose to include it in the link: field. If your web browser is configured to handle mailto: links, click comment to load the template into your mail client.
To: Ryan Kavanagh <rak@rak.ac> Subject: [blog-comment] /blog/2010-05-16-easily-download-ctan-packages/ post_id: /blog/2010-05-16-easily-download-ctan-packages/ author: [How should you be identified? Usually your name or "Anonymous"] link: [optional link to your website] Your comments here. Markdown syntax accepted.
0 Comments