Category Image MiKTeX for Mac OS X


As noted in a previous posting, one of my favorite applications on Windows XP is MiKTeX, a very well-designed LaTeX package manager. With this application, you can easily manage your LaTeX add-on packages (e.g., sty files). Christian Schenk, the developer of MiKTeX, has made available the source code of MiKTeX, suitable for UNIX systems. What you get are command line tools associated with MiKTeX. Let's face it. If you're using using UNIX (e.g., Mac OS X) or Linux, write LaTeX documents, and know about sty files, then you are probably pretty comfortable with the UNIX command line. This morning, I downloaded, built, and installed MiKTeX for UNIX on my Mac OS X system. It works!

Here's my setup: I use TeXShop as my LaTeX editor, previewer, and general interface to LaTeX. (TeXShop is developed by Richard Koch, Dirk Olmes with contributions by Mitsuhiro Shishikura, Seiji Zenitani, Martin Kerz, Isao Sonobe, and others.) I used Gerben Wierda's latest i-Installer to install LaTeX (and supporting packages) according to the instructions at the TeXShop web site. The i-Installer installs an alias /Library/teTeX, which points to /usr/local/teTeX, which is where everything else is installed.

As noted at Gerben Wierda's web site, teTeX looks for files in the following order:


• ~/Library/texmf
• /usr/local/teTeX/share/texmf.local
• /usr/local/teTeX/share/texmf.gwtex
• /usr/local/teTeX/share/texmf.tetex
• /usr/local/teTeX/share/texmf



This is important to know before installing MiKTeX, because it can help you decide where to have MiKTeX install additional packages. By default it will install packages in /usr/local/teTeX/share/texmf.local. In most cases, this is a convenient location, because it will be available to everyone on the system, and if you later reinstall LaTeX with the i-Installer, /usr/local/teTeX/share/texmf.local, will not overwritten so that you shouldn't lose any packages installed with MiKTeX.

Before building MiKTeX from source, you'll need to have the Xcode development tools (GCC) which comes bundled with Mac OS X. These are on the Mac OS X installation DVD, but you can download the latest version from http://developer.apple.com/ (you may need to register, but registration is free.) I had Xcode 2.3 installed on my system when I built MiKTeX.

From this point the installation of MikTeX is quite easy.
• Download the source from http://www.miktex.org/unx/
• Copy the downloaded tarball (e.g., miktex-tools-2.5.2199-beta-4.tar.gz) into a temporary working directory, for example, ~/tmp
• Unpack the tarball with the command tar zxvf miktex-tools-2.5.2199-beta-4.tar.gz
• Change to the newly created miktex-tools-2.5.2199-beta-4 directory with the command cd miktex-tools-2.5.2199-beta-4 (You should read the read the INSTALL and README files before proceeding any further.)
• Configure your build/installation: ./configure
• Build MiKTeX: make
• Install MiKTeX (in /usr/local) with the command sudo make install
• Update the database: sudo mpm --update-db
• Make sure that your LaTeX installation recognizes the newly installed files: sudo texhash
• Use the MiKTeX configuration utility to create the file name database files: initexmf -u



You actually get three utilities with MiKTeX:


mpm. The package manager. With mpm you can install, uninstall, update, list, etc. Issue the command mpm --help for more details.
initexmf. The MiKTeX configuration utility.
mthelp. The help utility used to display package documentation.
 

I found that newly mpm-installed sty files were not recognized until I issued the sudo texhash command.
 

It's important to note that the above steps worked for me. Please keep in mind that I have not tested this thoroughly, I am quite new to MiKTeX, and cannot be held responsible if you apply the above steps and mess up your system. I'm merely sharing my (rather limited) experience with MiKTeX on Mac OS X Tiger. I would guess that the best places to seek support or help with MiKTeX are on the MiKTeX forums and the MiKTeX support pages.
Finally, note the the set of instructions presented here may not work without modification in the future. For example, changes to the LaTeX installation (especially if you install LaTeX with TeX Live or MacTeX) may slight modifications to the instructions presented in this posting.


Posted: Wednesday - June 14, 2006 at 10:24 AM        


©