Institut für Astronomie und AstrophysikAbteilung AstronomieSand 1, D-72076 Tübingen, Germany |
The file translate_sub_super.pro contains two functions, translate_sub_super, and sub_sup_idl. The former is the generic routine for processing TeX sub/superscripts, the latter is used only by translate_sub_super and has no general utility. Hence it lives here. You will see documentation for translate_sub_super second if you use DOC_LIBRARY.
SUB_SUP_IDL
Return the proper IDL font positioning command for TeX sub/superscripts.
TeXtoIDL
fnt = sub_sup_idl( strn )
strn -- Either '^' or '_', the TeX super/subscript in characters
/FORCE_UD -- Set this to use !U/!D instead of !E/!I for sub/superscripts . /HELP -- Set to print useful message and exit.
fnt -- Either '!U' or !E' for superscripts, out or '!D' or '!I' for subscripts.
Used only by translate_sub_super. Should be kept in same file.
$Id: translate_sub_super.pro,v 1.5 2000/06/14 19:09:22 mcraig Exp $ $Log: translate_sub_super.pro,v $ Revision 1.5 2000/06/14 19:09:22 mcraig Changed name of strtok str_token to avoid conflict in IDL 5.3. Revision 1.4 1996/06/14 20:00:27 mcraig Updated Copyright info. Revision 1.3 1996/05/09 00:22:17 mcraig Changed some function calls to reflect changes in those functions, moved some code out of the main loop that didn't need to be there, added documentation. Revision 1.1 1996/01/31 18:47:37 mcraig Initial revision
$Name: Rel_2_1_2 $
Copyright (C) 1996 The Regents of the University of California, All Rights Reserved. Written by Matthew W. Craig. See the file COPYRIGHT for restrictions on distrubting this code. This code comes with absolutely NO warranty; see DISCLAIMER for details.
TRANSLATE_SUB_SUPER
Translate TeX sub/superscripts to IDL sub/superscripts.
text/strings
new = translate_sub_super( old )
old -- string to be translated from TeX to IDL. in
/RECURSED -- set if this function is being called recursively. /HELP -- Set to print useful message and exit.
new -- string old converted from TeX to IDL out
- For best results, when both a sub and superscript are used, place the shorter of the two first (e.g. 'N^{a}_{bbbb}' is better than 'N_{bbbb}^{a}'). - Single character sub/super scripts do not need to be protected by braces. - Sub/superscripts may be nested (e.g. 'N^{N_1^N}').
out = translate_sub_super( 'N^2_{big}' ) Then out='N!U2!N!Dbig!N' which looks like it should on the display.
str_token -- Text/string (mcraig) sub_sup_idl -- contained in this file
$Id: translate_sub_super.pro,v 1.5 2000/06/14 19:09:22 mcraig Exp $ $Log: translate_sub_super.pro,v $ Revision 1.5 2000/06/14 19:09:22 mcraig Changed name of strtok str_token to avoid conflict in IDL 5.3. Revision 1.4 1996/06/14 20:00:27 mcraig Updated Copyright info. Revision 1.3 1996/05/09 00:22:17 mcraig Changed some function calls to reflect changes in those functions, moved some code out of the main loop that didn't need to be there, added documentation. Revision 1.2 1996/02/08 18:54:20 mcraig Changed default sub/superscript size to be !D/!U rather than !I/!E to improve readability of plat annotations. Revision 1.1 1996/01/31 18:47:37 mcraig Initial revision
$Name: Rel_2_1_2 $
Copyright (C) 1996 The Regents of the University of California, All Rights Reserved. Written by Matthew W. Craig. See the file COPYRIGHT for restrictions on distrubting this code. This code comes with absolutely NO warranty; see DISCLAIMER for details.
[Home Page] [Software, Documentation] [IDL Documentation] [Quick Reference] [Feedback]