# TeX Helpers

This page lists software which, while not primarily or solely designed for use with TeX, complements it. Some of the software, such as asymptote, includes a TeX interface or package of some kind; some of it, such as gnuplot, is used by TeX packages; and some of it, such as pdfcrop, offers functionality which may be essential to a TeX-centric workflow.

## Fonts

This section includes software which may be helpful to those who wish to install or use different fonts for use with TeX, or in resolving font issues of various kinds.

### FontForge

by George Williams

Open source ("essentially" revised BSD)

From the project homepage:

An outline font editor that lets you create your own postscript, truetype, opentype, cid-keyed, multi-master, cff, svg and bitmap (bdf, FON, NFNT) fonts, or edit existing ones. Also lets you convert one format to another. FontForge has support for many macintosh font formats.

FontForge may be compiled from source or installed using one of the packages available for OS X. Alternatively, it can be installed using i-Installer and may be available from MacPorts or Fink.

Note: FontForge uses the freetype library and some of its functionality depends on a build of freetype compiled with the byte code interpreter enabled. The byte code interpreter is disabled by default as it infringes on patents owned by Apple. If you own a licence or if you live somewhere where the patents do not apply, you may wish to compile freetype with the byte code interpreter enabled and to build FontForge against this library in order to enable those features of FontForge which depend on this. MacPorts provides a "variant" called "with_freetype_bytecode". If you do not enable the byte code interpreter, FontForge will still work but some features will be disabled.

### fondu

by George Williams

Open source (BSD)

A set of utilities for dealing with fonts in Mac-specific formats. The utilities perform various conversions between Mac-specific and other font formats.

Fondu font utilities
Utility
Input formats
Output formats
fondu macbinary (.bin)
binhex (.hqx)
bare resource fork
data fork resource (.dfont)
postscript (.pfb)
truetype (.ttf)
opentype (.otf)
bitmap (.bdf)
afm (.afm)
ufond bitmap (.bdf)
truetype (.ttf)
opentype (.otf)
postscript (.pfb)
macbinary (.bin)
bare resource fork
data fork resource (.dfont)
binhex (.hqx)??
dfont2res data fork resource (.dfont) (bare?) resource fork
lumper bitmap (.bdf)
truetype (.ttf)
opentype (.otf)
family info. (FOND)
data fork resource (.dfont)
showfond bitmap (.bdf)
truetype (.ttf)
opentype (.otf)
family info. (FOND)
information dump

• tobin produces a macbinary (.bin) file from a series of files;
• frombin unwraps a macbinary (.bin) file.

fondu may be compiled from source or installed from the Mac OS X package provided. Alternatively, fondu may be installed using i-Installer and may be available from MacPorts or Fink.

Given that Mac OS X can now make direct use of fonts in many of the unix formats, these utilities may be of most use to those interested in using fonts in Mac-specific formats with TeX, such as the fonts supplied with Mac OS X. The exception concerns fonts in unix postscript format (.pfb etc.) which still require wrapping for use with OS X applications.

### pkfix

by Heiko Oberdiek

Open source (LPPL)

A very useful terminal script to fix old ps files which were produced by the old dvips and use bitmap (pk) fonts. These files look good in gv (ghostview) but look really ugly when converted by ps2pdf, pstopdf or Apple Preview. Because such converted files do not include a text layer, they cannot be searched. This script substitutes postscript (type 1) fonts for the bitmap (pk) fonts and then conversion to pdf works well.

pkfix may be missing from some (older) TeX distributions.

## Graphics

This section includes software which can be useful in the production of various sorts of graphics for use with TeX, including images, diagrams, graphs etc.

### asymptote

Open source (LGPL)

Terminal command %asy and %xasy for built-in drawing tool. Asymptote 1.44 brought major new feature (creation of pdf with embedded prc 3d models).

See this thumbnail:
.

Requires Adobe Reader to see the model. Current version 1.66; enabled OpenGL renderer with antialiasing to MacOS (10.4 and 10.5) (Victor Ivrii 19:05, 25 December 2008 (UTC))

Now part of TeXLive and is updated regularly Victor Ivrii 11:39, 16 November 2009 (UTC)

### gnuplot

Other/Proprietary licence

Plotting routine that can generate numerous high quality graphics format. (eps, pdf, metapost, etc.)

If \write18 enabled http://sourceforge.net/projects/pgf/ pgf with tikz] (very powerful graphics package for TeX and LaTeX) can use gnuplot for providing some data)

Example:

\usepackage{tikz}% in preamble

\begin{tikzpicture}

\draw[domain=0:2.5,scale=0.4, smooth]
plot[parametric,id=parametric-example] function{-0.8*t*t*t+2.6,t*t+0.2*t*t*t*t} node[right]{$\mathcal Q$};

\end{tikzpicture}

To use as a standalone application in Aqua (standard Mac OS) environment you may need Aquaterm

### ImageMagick

Open source (BSD)

A suite of image manipulation and conversion utilities with X11 and command line interfaces.

The MacTeX distribution installs the convert command line utility from ImageMagick in /usr/local/bin. To benefit from the full range of utilities provided by ImageMagick or to install the GUI (X11) interface, you need to use another installation method. If you install ImageMagick before MacTeX, you may wish to preserve your existing convert command by customising the MacTeX installation.

Note that ImageMagick may be installed using i-Installer which will include the GUI tools if X11 is available as well as the command line utilities.

MacPorts and Fink offer alternative installation methods, and precompiled binaries are available on macupdate and other Mac sites.

### Ipe

by Otfried Cheong (version: 7.0.14, link: http://tclab.kaist.ac.kr/ipe/, licence: GPL with exception allowing distribution of binaries linked against CGAL, manual: http://ipe7.sourceforge.net/manual/manual.pdf)

An extensible drawing editor with embedded LaTeX support which can also be used to create complete presentations. Text and mathematics can be input as LaTeX source so that LaTeX markup can be easily included in drawings. Output is postscript or PDF.

Ipe is a serious replacement of the loved 'xfig' tool. If the core of your figure is produced, for example, by gnuplot into a PDF format to be incorporated in your LaTeX document, you can use the Ipe tool pdftoipe and edit this core figure with IPE in order to incorporate mathematics in texboxes anywhere. Ipe will display your figure as well as the formatted LaTeX mathematics (you can compile your local LaTeX texboxes from Ipe). Texboxes can then be moved, rotated, colored etc.

• An advantage over xfig is that instead of using the burden of 'special', 'export to both' with xfig, you can more precisely and rapidly adjust your maths to the figure.
• But instead of having a single LaTeX compilation which allows cross-references, you are using an independent on line compilation of the mathematics included in your figure.

Installation: Ipe 7.0.14 depends on cairo, fontconfig, freetype2, lua and some other more common libraries supplied by OS/X. You can compile the source yourself if you use fink for the less common libraries or use a MacPort port which already exists for the program as well as for the Ipe tools.

### jfig

by Norman Hendrich

Dual licence (shareware for non-commercial use only)

The homepage describes jfig as a multi-platform

2D graphics and diagram editor based on the FIG file format.

written in Java with LaTeX support and a GUI based on xfig. A number of complementary programs are available on the download page.

### Xfig

by Supoj Sutanthavibul, Brian V. Smith, Paul King et al.

Open source (details)

Xfig is an interactive drawing tool which runs under X Windows. In xfig, figures may be drawn using objects such as circles, boxes, lines, spline curves, text, etc.

## Mathematics

This section includes software which may be useful to those typesetting mathematics in TeX.

## JavaScript TeX parsers

JavaScript suites allowing to direct input of TeX into web pages. While these suites do not use TeX installation and are not designed to load packages or to process large TeX documents (albeit under certain restrictions could be used for this task as well) they are specifically designed to process TeX snippets (equation-type environments) embedded into web pages (including those which are parts of wikis, blogs, forums and CMS (context management systems)). In contrast to equation->(dvi->eps)->png approach do not create png images of equations and thus are much more portable.

While not mac-specific they have mac aspects as designed to work with multiple browsers

### jsMath

by Davide P. Cervone

Open source (Apache Licence v2.0)

The first widely used suite of this type. Development is frozen.

### MathJax

by Davide P. Cervone and others

Open source (Apache Licence v2.0)

Successor of jsMath. Allows MathMl snippets and TeX<->MathMl conversion. Works with variety of browsers including those for mobile devices.

Very nice demo MathJax + Geogebra http://ams.org/samplings/feature-column/fcarc-geo-dft#2

MathJax internals are MathML. MathJax is not TeX despite using TeX inputs. It does not use any TeX distribution and has completely different goals and scope.

### MacQTeX

Restricted freeware (academic institutional use only)

Quiz management software.

Commercial

Equation editor.

### MATLAB/GNU Octave

#### MATLAB

by The MathWorks, Inc.

Commercial

From the homepage:

MATLAB® is a high-level language and interactive environment that enables you to perform computationally intensive tasks faster than with traditional programming languages such as C, C++, and Fortran.

#### GNU Octave

by John W. Eaton et al.

Open source (GPL)

From the homepage:

GNU Octave is a high-level language, primarily intended for numerical computations. It provides a convenient command line interface for solving linear and nonlinear problems numerically, and for performing other numerical experiments using a language that is mostly compatible with Matlab. It may also be used as a batch-oriented language.

#### Sage

Open source (GPL)

Sage is a free open-source mathematics software system licensed under the GPL. It combines the power of many existing open-source packages into a common Python-based interface. Mission: Creating a viable free open source alternative to Magma, Maple, Mathematica and Matlab.

#### latexcmd

by Peder Axensten

Licence?

#### poly2tex.m

by Joseph C. Slater

Licence?

Converts polynomials into LaTeX source strings.

#### matrix2tex.m

by Joseph C. Slater

Licence?

Converts matrices into LaTeX source strings.

## Postscript/PDF

### epspdf and epspdftk

by Siep Kroonenberg

Open source (GPL v2)

A multiplatform GUI- and command-line converter for [e]ps and pdf. It can be used for cropping, grayscaling and much more of (e)ps and pdf-files (both graphics and documents). It is available for several platforms. On Mac OS X, there is a graphical user interface.

Included in TeX Live.

### ghostscript

Open source (GPL but varies with version)

Interpreter for PostScript and PDF.

Can convert ps/pdf files to many raster formats for printing on printers without postscript capability.

Can convert ps to pdf, and pdf to ps files (with some limitations).

Included in MacTeX 2008.

### pdfcrop

by Heiko Oberdiek

Open source (LPPL)

terminal script which crops pdf files (according to specified parameters; usually it is enough to type %pdfcrop foo.pdf which crops according to bounding box. Very useful if external pdf graphics is used in TeX or LaTeX documents).

For example, one can use LaTeX package pgf with tikz to make pdf pictures (with \pagestyle{empty}), then use pdfcrop to crop them, then use as external graphics file.

### pdftk

by Sid Steward

Open source (GPL)

pdftk is a command-line utility to post-process PDF-files. Among other things, it can add decryption, password-protection, Watermarks. You can deny the reader to copy from the pdf or to print it. You can modify the metadata (Author, Title, description, keywords, creator, ...) and so on.

From the homepage:

If PDF is electronic paper, then pdftk is an electronic staple-remover, hole-punch, binder, secret-decoder-ring, and X-Ray-glasses. Pdftk is a command-line tool for doing everyday things with PDF documents. Keep one in the top drawer of your desktop and use it to:
• Merge PDF Documents
• Split PDF Pages into a New Document
• Decrypt Input as Necessary (Password Required)
• Encrypt Output as Desired
• Fill PDF Forms with FDF Data and/or Flatten Forms
• Apply a Background Watermark
• Report on PDF Metrics such as Metadata, Bookmarks, and Page Labels
• Attach Files to PDF Pages or the PDF Document
• Unpack PDF Attachments
• Burst a PDF Document into Single Pages
• Uncompress and Re-Compress Page Streams
• Repair Corrupted PDF (Where Possible)

The latest version is 1.4.4 (hosted on http://www.pdflabs.com/). There is a bug requiring full-path call

%  /opt/pdflabs/pdftk/bin/pdftk


It may be incompatible with some features of pdf-1.6 (aka Acrobat/Adobe Reader 1.7). Now it comes with MacOSX installer and is tested under MacOSX 10.6 but may work under older systems. Installer does not work under older systems. Victor Ivrii 00:10, 3 November 2010 (UTC) </noinclude>

## Spelling

### CocoAspell

Freeware (interface)

Open source (Aspell)

CocoAspell is Mac OS X implementation of Aspell -- A more intelligent Ispell -- that is being developed by Kevin Atkinson. Here is a brief snippet of how Kevin describes Aspell on his web site: Aspell is an Open Source spell checker designed to eventually replace Ispell. Its main feature is that it does a much better job of coming up with possible suggestions than Ispell does. In fact recent tests shows that it even does better than Microsoft Word 97's spell checker or just about any other spell checker I have seen. It also has support for checking (La)TeX and HTML files, and run time support for other non English languages.

CocoAspell is included in MacTeXtras.

### Excalibur

by Rick Zaccone
Open source (GPL)
Excalibur is a very nice spell checker for any Macintosh text file or the clipboard, but it is specifically designed for use with LaTeX files. Features include:

• Excalibur will offer suggestions for how to correct a word.
• Excalibur can spell check the clipboard. This makes it a good spelling checker for any text based application such as Alpha or SimpleText.
• Excalibur also works with Eudora Pro, BBEdit, MT NewsWatcher, Communicate, Nisus Writer, AppleWorks (formerly ClarisWorks), WordPerfect, and any other program that supports Word Services.
• You can teach it about new LaTeX commands and environments that you define.
• You can create your own dictionaries.
• Works on any plain TEXT file. (type TEXT)
• Works on formatted files via Word Services.
• You will need Mac OS 8.6 or higher to run Excalibur 4.0.
• Version 3.0.2 of Excalibur will run on System 7.1 or higher, but it requires the Classic environment on Mac OS X. It is still available from the Excalibur ftp server.
• Version 2.6 of Excalibur is still available too. It will run on System 6.0.5 or greater, and it will run on any Macintosh since the Mac Plus.
• The "Standard Dictionary" (American English) distributed with Excalibur has over 162,000 words.

Excalibur is included in both MacTeX and MacTeXtras.