Subsections

Getting Started: Four Scenarios

MiKTeX on Windows

Installing and/or Updating MiKTeX

The most popular TeX distribution for Windows is MiKTeX. If you already have the most recent version of MiKTeX installed and fully updated, you can skip down to here; otherwise, download the current "basic" MiKTeX installer available here. Download the version appropriate for your system: 32 bit or 64 bit.

When it has been fully downloaded, open the Downloads folder, double-click on the basic-miktex icon, and click on the Run button.

When the Copying Conditions window opens, click on the "I accept the MiKTeX copying conditions" box and then click on the Next button.

You may then be asked if MiKTeX should be installed for all users or just for yourself. When you've made your choice, click on the Next button. If you chose to install MiKTeX just for yourself, you'll have to choose a location; otherwise, a standard system location is suggested.

In the Next window, you'll be asked to choose between A4 and letter-sized paper as the default, and to specify whether you want missing packages installed fully automatically, after asking you, or not at all. Automatic package installation is a nice feature of MiKTeX but it's not foolproof. If A4 is the paper size you mostly use, choose A4, not "A4 (A4size)" as the default; a4 is the Postscript PaperSize recognized by ps2pdf.

You can then start the installation process. It may take 10 to 15 minutes, depending on the bandwidth of your internet connection. When it finishes, click on Next and then Close.

You should now find entries for the MiKTeX Update wizard and for the MiKTeX Package Manager under MikTeX 2.9  $\longrightarrow$ Maintenance in the Start menu; if you have Administrator privileges and have installed MiKTeX system-wide, choose the (Admin) version of Maintenance. Click on Update. The first window can usually be ignored; click on the Next button and then wait for the available updates to be listed. If there are available updates that are not ticked, those will have to be updated after the first round of updates. Click on the Next button and wait till the initial update process terminates. Then repeat the entire update process until there are no more updates available.

You are now ready to install the MusiXTeX-specific packages. Do not attempt to use the musixtex, pmx or m-tx binaries installed by the MiKTeX installer at this point; they are not yet operational.


Adding Packages to MiKTeX

We assume you have MiKTeX installed and fully updated. Find the relevant MiKTeX package manager in the Start menu; click on it. A window listing thousands of MiKTeX package opens. Enter "musixtex" into the Name field and click on Filter. Click on Select All in the Edit menu so that both packages are highlighted and click on the + sign (for "add"). Then repeat this process for "pmx" and "m-tx" (selecting only packages not yet installed).

If you intend to use the autosp preprocessor, you will need to install the package; refer to Adding Non-Distribution Packages.

You're now ready to typeset music.

First Examples in MiKTeX

Download the following example input files: quod.tex and barsant.pmx netsoos.mtx and quod2.aspc, and save in a new folder. Click on the Command Prompt entry in the Accessories menu and move to your new folder. Then do

> musixtex quod
> musixtex barsant
> musixtex netsoos
> musixtex quod2
The folder should now contain PDF files similar to the "outputs" here; you can use any PDF viewer to view them. (There will also be some log files and a midi version of barsant; the midi file can be played on a media player such as the Windows Media Player.) If the Adobe Reader is your default PDF viewer, you may want to read this before you start to edit documents.

TeXLive on a Unix-like System (Linux, Solaris, BSD, etc.)

Installing and/or Updating TeXLive

On Unix-like systems, the most popular TeX distribution is called TeXLive. If your system uses a "package manager", you may want to check whether TeXLive packages can be installed using it. If so, you should be able to install musixtex, pmx and m-tx packages using the package manager.

Packages derived from TeXLive are now officially in recent versions of Fedora Linux and Red Hat Enterprise Linux, but may date back to 2012. Information on TeXLive packages for Debian-based distributions such as Ubuntu is available here. See this page for other distributions.

If you already have the most recent version of TeXLive installed and fully updated, you can skip down to here; otherwise, to install TeXLive yourself, download the installer available here. Unpack the archive:

tar zxvf install-tl-unx.tar.gz

then move to the resulting install-tl-... directory and execute the install-tl script, as root if you are installing for all users.

First, verify that that the correct platform has been detected; if not, enter B and select the correct one.

Next, you should select an installation scheme. A full installation requires over 3 GB of disk space. For typesetting music, the "basic" scheme (supplemented by a few additional packages) will be fine. Customize the basic scheme by selecting appropriate language collections (English, French, German, etc.). It is possible to have the Music-typesetting collection installed initially, but this can also be done after installation, as described in detail here.

If you are installing a "private" TeXLive installation for yourself, you will have to specify a writeable TEXDIR directory such as $HOME/texlive/2014; if you have root privileges and are installing for all users, you can accept the default.

Finally, there are some options available, such as A4 or letter-size paper as the default. You may want the installer to install symbolic links in standard directories; in a personal installation you should use $HOME/bin for binaries, and accept the defaults for a system-wide installation.

You can then start the installation itself. When it finishes, add the relevant bin directory to your PATH if symbolic links weren't added to /usr/local/bin. Any improperly set environment variables should be corrected wherever they are set.

The TeXLive installer will install the most recent packages available so it is not necessary to update immediately after installing but the command to update any installed packages is

tlmgr update -self -all

(executed as root for a system-wide installation), or use the graphical interface invoked by tlmgr -gui. Note that tlmgr will not be available if you install texlive packages using a package manager; you will have to use the package manager to update or install packages.


Adding Packages to TeXLive

The packages needed for MusiXTeX, PMX and M-Tx are all in the music-typesetting collection, so the following command will suffice:

tlmgr install collection-music

(executed as root for a system-wide installation), or use the graphical interface invoked by tlmgr -gui.

If you intend to use the autosp preprocessor, you will need to install the package; refer to Adding Non-Distribution Packages.


First Examples in TeXLive

Download the following example input files: quod.tex, barsant.pmx, netsoos.mtx and quod2.aspc, and save in a new directory. Start up a terminal and move to your new directory. Then do
$ musixtex quod
$ musixtex barsant
$ musixtex netsoos
$ musixtex quod2
The folder should now contain PDF files similar to the "outputs" here; you can use any PDF viewer to view them. (There will also be some log files and a midi version of barsant; the midi file can be played on any media player that supports that format, such as Rosegarden or TiMidity++.) If the Adobe Reader is your default PDF viewer, you may want to read this before you start to edit documents.

MacTeX (or BasicTeX and MacTeX-Additions) on a Mac

A version of TeXLive especially suited to Macs (running Mac OS 10.5 or higher -- PPC or Intel) is called MacTeX. If you already have MacTeX installed and fully updated, you can just add the necessary packages in exactly the same ways as TeXLive, as described here; otherwise, either download the full installation package (2.1 G) or, if you want TeX just for music typesetting, download the BasicTeX package (64 M) and the MacTeX-Additions package (257 M), and then install the Music-typesetting collection.

Double-click on the downloaded files to install. When the installation finishes, open a Terminal and update all packages by executing

tlmgr update -self -all

(as root). Now, install MusiXTeX, PMX and M-Tx (and some other music-typesetting packages) as follows:

tlmgr install collection-music

You should now be able to typeset music; follow the same instructions as with TeXLive, except be sure to rename the files to remove any .txt extensions added to the filenames by the downloader.

To configure TeXWorks as an editing and music-typesetting environment, follow the instructions in Configuring TeXWorks.


Adding CTAN Packages to an Existing TeX System

If you already have a TeX system other than the most recent versions of MiKTeX or TeXLive installed and are unwilling or unable to replace it or upgrade it to the current MiKTeX or TeXLive, you can download the following packages from CTAN (the Comprehensive TeX Archive Network) and add them to your system: musixtex, musixtex-fonts, pmx, m-tx, autosp; each package has a detailed installation guide. Before installation you should read the material below on Adding Non-Distribution Packages.

Bob Tennent