Setting up a Mac for TeX, xfig, emacs, pinlabel and labelpin ============================================================ Emacs comes with the operating system and does not need installing. (A) Install TeXLive Google texlive and follow on-line intructions for a Mac. pinlabel is a TeX/LaTeX package and gets installed with TeXLive. Note the next step (B) can be omitted if you don't want to install gv or xfig (see (D)). (B) Install ghostview (GV) and xfig as follows: 1. Download and install Apple's Xcode, from the Mac App Store. This is their monolithic software-development IDE, which includes stuff we'll need later (as well as a bunch of crap we will not). It's a big download, and it'll take a while. 2. Start Xcode, agree to terms of use, let it install some crap. Once it's done, go to Preferences, select the Downloads tab, and install the Command-Line Tools. 3. http://xquartz.macosforge.org/ Now, you need an X Windows environment, like X11. This is no longer distributed by Apple, so go to its website (above), download and install XQuartz. You will likely need to log out and log back in afterwards. 4. We're finally ready to download and install GV (Ghostview) itself. There are two paths here, one using Homebrew, one using Macports. Both of them are application repositories for Unix/Linux ports, but Macports installs way to much crap (it creates a self-contained parallel tree of dependencies, reinstalling stuff that already comes with Mac OS X, etc; it's a mess). Unfortunately xfig cannot be installed using Homebrew and for this reason we reluctantly recommend using Macports. 5A. Homebrew version (recommended if you don't want xfig) http://mxcl.github.com/homebrew/ To install Homebrew, in a Terminal run this command: ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)" Follow the instructions, enter password when prompted, etc. If you want later to allow Homebrew to install man pages for what it'll install, make the man tree user-writeable, for example with the indelicate sudo chmod -R a+w /usr/local/share/man/de /usr/local/share/man/de/man1 Run brew doctor to make sure everything is alright, then brew install gv to actually install Ghostview. Afterwards, start it with gv 5B. MacPorts version (recommended if you also want xfig but not otherwise) http://www.macports.org/install.php Install MacPorts by downloading it from the above webpage, then run sudo port install gv and allow it quite a big slice of time, as it'll re-install all its dependencies, including Perl. Repeat with xfig sudo port install xfig Then, gv or xfig and off you go. (C) Install labelpin Google "labelpin", or go to http://www.math.uiuc.edu/~nmd/software/ get the script, make sure it's executable (with "chmod +x labelpin"), put it somewhere in your PATH. Usage: labelpin {epsfile} or {pdffile} help: labelpin --help (D) For expert pinlabel users. You can run labelpin directly after installing TeXLive, so if you are happy to do this, and never use gv or xfig, then you can omit (B). Setting up a Windows box to run TeX, xfig, emacs, pinlabel and labelpin ======================================================================= (A) Install cygwin Go to the cygwin website http://www.cygwin.com/ and follow on screen instructions. This is a huge installation and takes hours on a slow line but is completely automatic and can be left running overnight. You can speed things up (a little) by deselecting TeX (you are going to install TeXLive at the next step. (B) Install TeXLive Go the TeXLive website and download and install TeXLive for cygwin. This is again a big download but again fully automatic. (B') If you already have TeXLive installed directly under Windows, then (B) may be omitted. At this point everything you need (except labelpin) is installed and you just need to do a trivial bit of configuring. (C) Configure your new X environment This is the nerdy bit. Cygwin X looks and feels exactly like a bog standard linux X windows and if you know how to set up linux then just follow your nose. If not read on. You need at the very least to make sure that the TeXLive binaries are on path. You need a shell command (.login file) and an initialisation file for the shell. Here's what I (Colin Rourke) use: .login is in my home directory /home/Colin Rourke/ and just comprises the single line tcsh This sets tcshell as the default shell then .cshrc is the initialisation file. Mine reads: mount -f c: /c mount -f d: /d mount -f "c:\Documents and Settings\Colin Rourke\Desktop" /k set prompt="%M:%t %d %~ > " alias em emacs alias lab '~/./labelpin' setenv PATH "/usr/local/texlive/2011/bin/i386-cygwin/:$PATH" setenv MANPATH /usr/local/man/:/usr/share/man/:/usr/man/ The first three commands mount the roots of my two hard drives and also the desktop to make all my files easily accessible and the third sets my favourite command prompt. The alias lab is for labelpin (see below). The PATH command is the really important one or TeX will not run correctly. Note that the actual path to the TexLive bin directory may not be exactly like that -- it depends on the version that you have just installed! Explore the tree using eg Windows Explorer to find the correct pathname. You can use windows wordpad to create these files, so you don't need to have X configured already! Cygwin should have created a useful shortcut to: /cygwin/bin/run.exe It looks like a big X with a C around the centre. If not make your own and use it to start X windows. You can safely delete any other short cuts that cygwin has installed. Starting X windows opens a termimal window (X login) and you run everything from this. Test xfig, emacs, TeX (the report should tell you that TeXLive is running). Eg: Gauss:5:29pm Thu /d/mytex > xfig& should open the familiar xfig window. Gauss:5:42pm Thu ~ > tex This is TeX, Version 3.1415926 (TeX Live 2011) **x (/usr/local/texlive/2011/texmf-dist/tex/latex/tools/x.tex testing TeXLive. Gauss:5:42pm Thu ~ > em short cut to emacs using my alias. (D) Install labelpin Google "labelpin", or go to http://www.math.uiuc.edu/~nmd/software/ get the script, make sure it's executable (with "chmod +x labelpin"), put it somewhere in your PATH. Usage: labelpin {epsfile} or {pdffile} help: labelpin --help Alternatively place it your home directory and call it by ~/./labelpin {file} or just lab {file} if you left my alias in your .cshrc file.