next up previous contents index
Next: A Sample File Up: Getting Started Previous: Getting Started   Contents   Index


Running ePiX

The sample and tutorial figures carry the preferred file extension, .xp. To convert file.xp to a viewable figure, do ``elaps file.xp'' to produce an eps file, or ``elaps -pdf file.xp'' for PDF. Like LATEX, ePiX is non-interactive, and run from the command line. Each shell script accepts a -help (or -h) option that prints a short summary of available options. Under X, a graphical environment may be simulated by using emacs (with Jay Belanger's ePiX mode) to edit and compile files, and a previewer such as gv to view figures as they are processed. In gv, select ``Watch file'' from the ``State'' menu to have images update automatically.

While elaps produces output files suitable for immediate previewing, epix is far preferable for documents processed with LATEX (rather than PDFLATEX). The output of epix is eepic, an enhancement to the LATEX picture environment that allows lines of arbitrary length, slope, and width. An eepic file is typically a few percent the size of a comparable eps file, and is a text file that can be read (and edited) with only knowledge of LATEX.

An eepic file is included directly into a LATEX document, say sample.tex, that contains the line

\usepackage{epic,eepic,pstcol}
Somewhere in sample.tex is the figure itself:
\begin{figure}[hbt]
  \begin{center}
    \input{example.eepic}
    \caption{A compiled \ePiX\ figure.}
    \label{fig:example}
  \end{center}
\end{figure}
In a text editor, create an ePiX input file for the figure, say file.xp, then issue the command
epix file.xp example.eepic
File extensions may be omitted, as can the name of the output file if you want it to be the same as the name of the input (file.eepic in this example).

The preferred extension for an ePiX file is ``.xp'' (for eXtended Picture), but the source code extensions ``.c'', ``.cc'', ``.C'', and ``.cpp'' are also permitted. If the emacs configuration file is properly set up, emacs can recognize ``.xp'' files, automatically enter ePiX mode, and insert a preamble template. The file POST-INSTALL has detailed instructions.

To process the LATEX file, either run LATEX as usual, or do

laps sample
which runs LATEX on sample.tex, then uses dvips to convert the dvi to the Postscript file sample.ps. laps stands for ``LATEX to Postscript''.

Figures in graphical format (as opposed to eepic) can be useful if you use xdvi to preview (color is available in included files), or if you are tweaking the figures in a large document, and do not want to recompile the entire document to change just one figure. elaps also handles eepic files (i.e., acts as eepic2eps and eepic2pdf), even those not produced with ePiX.


next up previous contents index
Next: A Sample File Up: Getting Started Previous: Getting Started   Contents   Index
Andrew D. Hwang 2004-09-04