UK TeX FAQ -- question label music

### Typesetting music in TeX

In the early days, a simple music package called MuTeX was written by Angelika Schofer and Andrea Steinbach, which demonstrated that music typesetting was possible; the package was very limited, and is hardly ever used nowadays. Daniel Taupin took up the baton, and developed MusicTeX, which allows the typesetting of polyphonic and other multiple-stave music; MusicTeX remains available, but is most definitely no longer recommended.

MusicTeX has been superseded by its successor MusiXTeX, which is a three-pass system (with a processor program that computes values for the element spacing in the music), and achieves finer control than is possible in the unmodified TeX-based mechanism that MusicTeX uses. Daniel Taupin’s is the only version of MusiXTeX currently being developed (the original author, Andreas Egler, had an alternative version, but he is now working on a different package altogether).

Input to MusixTeX is extremely tricky stuff, and Don Simons’ preprocessor pmx is the preferred method of creating input for Taupin’s version. Pmx greatly eases use of MusixTeX, but it doesn’t support the full range of MusixTeX’s facilities directly; however, it does allow in-line MusixTeX code in pmx sources.

Dirk Laurie’s M-Tx allows preparation of music with lyrics; it operates “on top of” pmx

Another simple notation is supported by abc2mtex; this is a package designed to notate tunes stored in an ASCII format (`abc` notation). It was designed primarily for folk and traditional tunes of Western European origin (such as Irish, English and Scottish) which can be written on one stave in standard classical notation, and creates input intended for MusicTeX. However, it should be extendable to many other types of music.

Digital music fans can typeset notation for their efforts by using midi2tex, which translates MIDI data files into MusicTeX source code.

There is a mailing list (TeX-music@icking-music-archive.org) for discussion of typesetting music in TeX; it mostly covers MusixTeX and related systems. To subscribe, use http://icking-music-archive.org/mailman/listinfo/tex-music/

An alternative (free) means of embedding music examples into (La)TeX documents is Lilypond. Lilypond is (at heart) a batch music typesetting system with plain text input that does most of its work without TeX. Lilypond’s input syntax is far less cryptic than is MusixTeX’s, and it handles much more stuff automatically, yielding the same or better quality with less effort. Lilypond can also produce basic MIDI output.

`abc2mtex`
  support/abc2mtex/
`M-Tx`
  support/mtx (or browse the directory)
`midi2tex`
  support/midi2tex (or browse the directory)
`musictex`
  macros/musictex (or browse the directory)
`musixtex (Taupin’s version)`
  macros/musixtex/taupin (or browse the directory)
`musixtex (Egler’s version)`
  macros/musixtex/egler (or browse the directory)
`mutex`
  macros/mtex (or browse the directory)
`pmx`
  support/pmx (or browse the directory)

This question on the Web: http://www.tex.ac.uk/cgi-bin/texfaq2html?label=music