UK TeX FAQ -- question label inlgrphapp

### In-line source for graphics applications

Some of the free-standing graphics applications may also be used (effectively) in-line in LaTeX documents; examples are

asymptote
  The package asymptote (provided in the asymptote distribution) defines an environment `asy` which arranges that its contents are available for processing, and will therefore be typeset (after “enough” runs, in the ‘usual’ LaTeX way).

  Basically, you write

  > `\``begin{asy}`
  > \latexhtml{\hspace*{1em}}{ }`<asymptote code>`
  > `\``end{asy}`

  and then execute

  >     latex document
  >     asy document-*.asy
  >     latex document

egplot
  Allows you to incorporate GNUplot instructions in your document, for processing outside of LaTeX. The package provides commands that enable the user to do calculation in GNUplot, feeding the results into the diagram to be drawn.
gmp
  Allows you to include the source of MetaPost diagrams, with parameters of the diagram passed from the environment call.
emp
  An earlier package providing facilities similar to those of gmp (gmp’s author hopes that his package will support the facilities emp, which he believes is in need of update.)
mpgraphics
  Again, allows you to program parameters of MetaPost diagrams from your LaTeX document, including the preamble details of the LaTeX code in any recursive call from MetaPost.

In all cases (other than asymptote), these packages require that you can run external programs from within your document.

`asymptote.sty`
  graphics/asymptote (or browse the directory); catalogue entry
`egplot.sty`
  macros/latex/contrib/egplot (or browse the directory); catalogue entry
`emp.sty`
  macros/latex/contrib/emp (or browse the directory); catalogue entry
`gmp.sty`
  macros/latex/contrib/gmp (or browse the directory); catalogue entry
`mpgraphics.sty`
  macros/latex/contrib/mpgraphics (or browse the directory); catalogue entry

This answer was added: 2011-03-16

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