Use MiKTeX to search, install and update LaTeX packages


Updated: April 5, 2010

If you're using LaTeX to write articles and white papers, you have already made a huge step in the right direction of separating style from content, working efficiently and without distractions, maintaining consistency throughout, creating superb-looking documents with unmatched powers of Computer Modern fonts, Math symbols, references, and bibliography, and simply being different and much cooler than everyone else.

Teaser

But sometimes, you may need a few extra features that are missing, like fancy headers or special formatting for Python code. The question is, what do you do now? If you're using powerful LaTeX frontend like LyX or Kile, you will notice that these programs offers tons of useful features to the user, including auto-compilation of LaTeX code and conversion to desired output formats, spell checking, installation of missing packages on the fly, and more. Still, you can take this one step further.

Keyword: MikTeX.

MikTeX is a typesetting system for Microsoft Windows and Linux operating systems and consists of an implementation of TeX and a set of related programs. MiKTeX provides the tools necessary to prepare documents using the TeX/LaTeX markup language.

Significant features of MiKTeX are its ability to update itself by downloading new versions of previously installed components and packages, and an easy installation process. Additionally, it can ask users whether they wish to download any packages that have not yet been installed but are requested by the current document.

Today, I want to show you how you can use MikTeX and enjoy its many strengths, including package downloads and updating, working in an environment with a proxy connection, and more.

Currently, the full-production version of MiKTeX is availably only for Windows; Linux client comes as early betas. Hence, the contents hereof demonstrated on Windows.

Using MikTeX

The simplest way to treat MikTeX is as a package manager for LaTeX. If you consider LaTeX to be a text operating system, then MikTeX is unto LaTeX as Synaptic is unto Ubuntu. Once you get hang of this analogy, it gets very simple.

You work, you need some extra utilities, you power up the package manager, install the missing stuff and continue working. You can find MikTeX in the installation directory, usually Program Files or such.

MikTeX Package Manager

Start the Package Manager. This utility will list all the LaTeX packages available, including those already installed. You can sort the packages by name, category, size, the day they were packaged, the installation date, or title. You can also using name, keyword and filename filtering to find what you need or want.

Package manager

For example, code formatting. This would be done using the listings package.

Filtering

But even if you did not know that, package titles can help you find what you need. In that regard, MiKTeX package manager is more than just a static online repository. It can actually help you improve your familiarity and usage of LaTeX by exposing you to new cool packages.

Updates

You can also update your entire install base of LaTeX packages in one go. You can use online package repositories or even CD/DVD.

Update

Connection settings

If you have problems with proxy, for instance, you can configure one using the Connection Settings menu, available in the Updates wizard. Very nifty if you're behind a proxy and still want to use LaTeX to the fullest.

Proxy

Manual installations

You can also install or remove individual packages, as you see fit. Although you can configure MiKTeX-capable programs (like LyX) to retrieve missing content on the fly, you can or might want to use the package manager to obtain specific items.

Back to our listings example:

Install

The package will be downloaded and installed. You may see a command-line window pop up during the installation; nothing to worry about, it's MiKTeX reconfiguring itself with the new packages.

Message

Downloading

Updating

MikTeX and LyX

Just for reference, I did mention this earlier, LyX uses MikTeX as its typesetting system. You can work with MiKTeX even while LyX is running and install new packages as needed. The only thing you will have to do after obtaining new packages is to reconfigure LyX.

LyX reconfigure

Again, using our package management analogy, this is like running ldconfig after an installation. Simple, eh?

Conclusion

MiKTeX is a powerful beast. It will definitely make your LaTeX experience - for now on Windows only, but Linux coming fast - more productive, more pleasant, more flexible, and more powerful. You will learn about additional features and options of the superb LaTeX language/system, thus making your papers look and behave more smartly. You will learn about new tools and utilities, new syntax, becoming an ever greater expert in working the right way with documents.

Today, I hope you've learned something new. The striking similarity between the MiKTeX package manager and a typical Linux package manager, how to search for content, how to setup network connections, and how to install individual packages is staggering. Now, all that is left for you is to power up LaTeX and start writing cool stuff. Even if the contents are not that great, they will still look brilliant, you'll be crowned a geek and everyone will fear you. It's a win-win situation in every aspect.

Cheers.

RSS Feed icon

del.icio.us del.icio.us stumbleupon stumble digg digg reddit reddit slashdot slashdot



Advertise!

Would you like to advertise your product/site on Dedoimedo?

Read more

Donate to Dedoimedo!

Do you want to
help me take early retirement? How about donating
some dinero to
Dedoimedo?

Read more

Donate