[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

New Lib (TeXtoIDL): Easy Greek letters in IDL



Greetings,

I have written a set of IDL functions to make Greek letters, special
symbols, and sub/superscripts easier to use in IDL.  The routines
translate a string written in the TeX typesetting notation to a string
in IDL format.  The TeX notation is MUCH easier to remember.  An
excerpt from the README is below.  Also in the README, though not
included below, is an introduction to TeX notation for those not
familiar with it.

>From the TeXtoIDL README:

  PURPOSE: 
     The purpose of the TeXtoIDL routines is to make it simple to use Greek
  letters, subscripts and superscripts in making labels for plots in
  IDL.  This is accomplished by allowing the user to use TeX control
  sequences for Greek letters and special symbols and for
  sub/superscripts.  The TeX control sequences are simple and easy to
  remember, especially if you already use TeX for writing papers (for
  those unfamiliar with TeX, an explanation of that notation is below).
  The translation is done for either vector or PostScript fonts.

  EXAMPLE:
     If you type. . .
  IDL> str = TeXtoIDL("\rho^2 + 2\Gamma_{ij}")
  IDL> print, str
  STR             STRING    = '!7q!X!U2!N + 2!7C!X!Dij!N'
  IDL> xyouts,.5,.5,str,CHARSIZE=2.,/NORM

  then on the screen you will see the Greek letter rho with a 2 in the
  exponent, and then a + and then a 2 and then the uppercase Greek
  letter gamma, with an "ij" in the subscript.

The library is available at:

ftp://coma.berkeley.edu/pub/mcraig/idl/TeXtoIDL/

Enjoy,
Matt 

-----------------------------------------------
Matt Craig
Astronomy Dept, U.C. Berkeley
mcraig@astro.berkeley.edu