sub_sup_idl.pro
1.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
;
;+
; NAME:
; SUB_SUP_IDL
; PURPOSE:
; Return the proper IDL font positioning command for TeX
; sub/superscripts.
; CATEGORY:
; CALLING SEQUENCE:
; fnt = sub_sup_idl( strn )
; INPUTS:
; 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 .
; OUTPUTS:
; fnt -- Either '!U' or !E' for superscripts, out
; or '!D' or '!I' for subscripts.
; COMMON BLOCKS:
; SIDE EFFECTS:
; NOTES:
; EXAMPLE:
; LIBRARY FUNCTIONS CALLED:
;
; MODIFICATION HISTORY:
; $Id: sub_sup_idl.pro,v 1.1 1996/01/31 18:47:37 mcraig Exp $
; $Log: sub_sup_idl.pro,v $
; Revision 1.1 1996/01/31 18:47:37 mcraig
; Initial revision
;
; RELEASE:
; $Name: Rel_2_1 $
;-
FUNCTION Sub_sup_idl, token, FORCE_UD = force_ud
IF keyword_set(force_ud) THEN BEGIN
IF (token EQ '^') THEN return, '!U'
IF (token EQ '_') THEN return, '!D'
return, ''
ENDIF ELSE BEGIN
IF (token EQ '^') THEN return, '!E'
IF (token EQ '_') THEN return, '!I'
return, ''
ENDELSE
END