[AIT logo]

Institut für Astronomie und Astrophysik

Abteilung Astronomie

Sand 1, D-72076 Tübingen, Germany
[Uni logo]


translate_sub_super.pro SUB_SUP_IDL TRANSLATE_SUB_SUPER Source code in translate_sub_super.pro

translate_sub_super.pro

Special Note
       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

Name
       SUB_SUP_IDL
Purpose
       Return the proper IDL font positioning command for TeX
       sub/superscripts.
Category
       TeXtoIDL
Calling Sequence
       fnt = sub_sup_idl( strn )
Input Parameters
       strn      -- Either '^' or '_', the TeX super/subscript       in
                    characters
Keyword Parameters
       /FORCE_UD -- Set this to use !U/!D instead of !E/!I for
                    sub/superscripts .
       /HELP     -- Set to print useful message and exit.
Output Parameters
       fnt       -- Either '!U' or !E' for superscripts,             out
                    or '!D' or '!I' for subscripts.
Common Blocks

Side Effects

Note
       Used only by translate_sub_super.  Should be kept in same
       file.
Example

Revision History
       $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
Release
       $Name: Rel_2_1_2 $
Copyright
  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

Name
       TRANSLATE_SUB_SUPER
Purpose
       Translate TeX sub/superscripts to IDL sub/superscripts.
Category
       text/strings
Calling Sequence
       new = translate_sub_super( old )
Input Parameters
       old       -- string to be translated from TeX to IDL.   in
Keyword Parameters
       /RECURSED -- set if this function is being called
                    recursively.
       /HELP     -- Set to print useful message and exit.
Output Parameters
       new       -- string old converted from TeX to IDL       out
Common Blocks

Side Effects

Note
       - 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}').
Example
       out = translate_sub_super( 'N^2_{big}' )
       Then out='N!U2!N!Dbig!N' which looks like it should on the
       display.
Library Functions Called
       str_token      -- Text/string (mcraig)
       sub_sup_idl -- contained in this file
Revision History
       $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
Release
       $Name: Rel_2_1_2 $
Copyright
  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.

Last modified by pro2html on 2004 June 29 at 21:24 UTC

[Home Page] [Software, Documentation] [IDL Documentation] [Quick Reference] [Feedback]

Jörn Wilms (wilms@astro.uni-tuebingen.de)
Updated automatically