Institut für Astronomie und AstrophysikAbteilung AstronomieSand 1, D-72076 Tübingen, Germany |
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> print, str STR STRING = '!7q!X!U2!N + 2!7C!X!Dij!N' IDL> xyouts,.5,.5,str,CHARSIZE=2.,/NORMthen 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 TeX syntax for Greek letters is simple. If you want, for example, the Greek letter rho, just type \rho and you will get it. The IDL string for rho is !7q!X (for vector fonts) or !Mr!X (for PostScript fonts). In any event, the IDL strings are not easy to remember, and depend on the font type. If you type SHOWTEX at the IDL command line, a table will be made on the current graphics device showing which Greek letters and special symbols are available, and what they look like on your graphics device.
The syntax for sub/superscripts is also simple. An example will make
it clear. If I write N_{sub}, I will get an N with the
subscript sub. The underscore begins the subscript, and
everything enclosed in the braces is in the subscript. Superscripts are
similar; N^{sup} is an N with a superscript sup.
Since it is frequent to have one character sub- or superscripts, braces are
not needed for a one character script. So N^2 makes an N
with a 2 in the exponent. You can combine sub and superscripts,
for example N^2_{sub}, and you can even put subscripts on the
things in your superscripts, e.g. N^{N_j}, though this probably
won't look very good.
MATCHDELIM | Match open/close delimiters in a string. |
NEXTTOK | Find the next occurance of any of a set of characters in a string and return the character which occurs next. |
SHOWTEX | Display TeX sequence translation table on current graphics device. |
STR_TOKEN | Retrieve portion of string up to token. |
STRCNT | Count number of occurrences of a substring in a string. |
STRTRANS | Translate all occurences of one substring to another. |
SUB_SUP_IDL | Return the proper IDL font positioning command for TeX sub/superscripts. |
TEXTABLE | Returns a translation table from TeX to IDL. |
TEXTOIDL | Convert a valid TeX string to a valid IDL string for plot labels. |
TRANSLATE_SUB_SUPER | Translate TeX sub/superscripts to IDL sub/superscripts. |
[Home Page] [Software, Documentation] [IDL Documentation] [Quick Reference] [Feedback]