TeXtoIDL update: Easy Greek letters in IDL [message #39824] |
Tue, 22 June 2004 12:01 |
mcraig
Messages: 3 Registered: July 1996
|
Junior Member |
|
|
Greetings all,
I have posted a new version of TeXtoIDL, a package of routines that
allows one to produce Greek letters, sub/superscripts, and some
special symbols in the syntax used in the TeX formatting language. See
the excerpt from the README below for details.
The new version, 2.1.2, fixes a bug in 2.1.1 that caused special
symbols appearing at the beginning of a string to be treated as
subscripts. In addition, all arrays are now referenced using square
brackets, which should minimize conflicts between this and other
libraries.
The package is at:
http://physweb.mnstate.edu/mcraig/TeXtoIDL/
If you have any questions or comments please let me know! Thanks to
everyone who pointed out the bug and tracked down the fix.
Matt Craig
From the 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.
USE:
Once installed, type (in IDL):
IDL> print,TeXtoIDL(/HELP)
for brief instructions. The command SHOWTeX will display the
available TeX sequences on the current graphics device. In addition,
subscripts and superscripts in the usual TeX notation are available.
For more details on what TeX notation is, see the section
INTRO TO TeX, below.
EXAMPLE:
If you type. . .
IDL> str = TeXtoIDL("\rho^2 + 2\Gamma_{ij}")
IDL> help, 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.
|
|
|