Sanford Weisberg, Work supported by National Science Foundation DUE 93-54678.
June 26, 2001, slightly revised July 16, 2004
This document describes how to save graphs created by Arc as LATEX files. These files can be edited, incorporated into other LATEX documents, compiled by LATEX as .dvi files, and the .dvi files can be compiled by dvips as either PostScript or Encapsulated PostScript files.
Alternatively, get the files you need in a zip file here. Put the unzipped files in your local tex directory, possibly C:/Local TeXMF/tex/latex.
If you are using the workstations at the University of Minnesota's School of Statistics, all the needed style sheets are present on the system and you do not need to retrieve them.
Unless you change the setting, the stand-alone file you create can be typeset with any version of LATEX 2e; it has not been tested with version 2.09. For example, OzTeX on the Macintosh can be used, or miktex on Windows. This will produce a dvi file. All the style sheets described above must be in the tex search path for this to work. The final task is to create the Encapsulated PostScript file. Suppose that your file is called graph1.tex, and after running LATEX, you have a file called graph1.dvi.
With Linux/Unix, or from a DOS command window, simply type
dvips -o graph1.eps -E graph1This will produce a file called graph1.eps that can be used as any other such file. The same command is used with miktex on Windows by typing the above command into a DOS window in the same directory as the file graph1.dvi. With OzTex on a Macintosh, Select DVIPS from the Tools menu, select the file graph1.dvi, and in the next dialog type ``-E" in the text area.
The non-stand-alone version differs from the stand alone version only by the omission of a few lines at the beginning and end of the file. The omitted lines at the beginning are:
\documentclass{article} \usepackage{arc} \begin{document} \pagestyle{empty}and at the end of the file, the missing line is
\end{document}These lines actually appear in the file, but they have a comment character ``%" as the first character on each line. Thus, you can convert a non-stand-alone file to stand-alone by deleting a few comment characters.
If graph1.tex is not a stand-alone file, it can be incorporated
into a document using an \input
statement. For example, your main
document might look something like this:
\documentclass{article} \usepackage{arc} \begin{document} This is some text. It refers to Figure~\ref{graph1}, which is the first figure in the paper. \begin{figure} \caption{This is the caption for the figure.} \input{graph1} \end{figure} \end{document}
The figure files created in this way are fairly easy to read and to edit, as the file includes many comments. Most of the statements in the file are discussed in Goossens, Mittenbach and Samarin (1994), The LATEX Companion, Addison-Wesley, particularly Chapter 10. In particular, it is easy to edit labels, change fonts and colors, and not too hard to add additional annotation to the plot.
Some of these LATEX files can be very large (for example, a scatterplot matrix with 5 variables and 200 points is really 20 scatterplots each with 200 points), and your version of LATEX may not have enough memory to process the file. The only option is to increase the size of your LATEX but this is not particularly easy to do, and will in any case require the assistance of a LATEX wizard. Miktex on Windows and OzTeX on Macintosh seem better able to work with large files without any modification than do standard implementations of LATEX on Linux/Unix.