 
Summary: Including Mathematica graphics in LATEX documents: how the
TMG (text in graphics) package works
Michael P. Barnett
November 5, 2010
Introduction
The TMG (text in graphics) package [1] supports the construction of diagrams by MATHEMATICA
Release 7, for
inclusion in LATEX documents. The successive sections that follow discuss:
1. the linear measure, in LATEX documents, of diagrams that were produced by MATHEMATICA graphics and incor
porated by \includegraphics commands,
2. how to include only parts of these diagrams, by clipping (cropping),
3. the TMG function export that wraps the MATHEMATICA Export command to write graphics output,
4. the TMG functions that support the use different fonts, and obtain information about the shapes of the characters,
5. the TMG functions that I use to determine the widths of characters,
6. the detailed structure of the line segments drawn by MATHEMATICA Line commands,
7. the TMG functions that determine the character offsets needed to align the strings in multiple Text commands,
8. the TMG functions to encode character strings that represent formated text in multiple fonts (I use these to
annotate diagrams produced by MATHEMATICA graphics).
1 The linear measure of graphics objects
The PDF file that represents the rhombus in Fig. 1 was produced by the MATHEMATICA statement
