source: trunk/SRC/Documentation/idldoc_assistant_output/Textoidl/translate_sub_super.html @ 338

Last change on this file since 338 was 338, checked in by smasson, 16 years ago

update documentation

File size: 8.5 KB
Line 
1
2
3<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4  <head>
5    <title>translate_sub_super.pro (SAXO Documentation Assistant)</title>
6  </head>
7
8  <body text="#000000" bgcolor="#FFFFFF">
9
10   
11<!-- Navbar template takes a structure with the following fields:
12       overview_href :
13       overview_selected :
14       dir_overview_href :
15       dir_overview_selected :
16       categories_href :
17       categories_selected :
18       index_href :
19       index_selected :
20       search_href :
21       search_selected :
22       file_selected :
23       source_href :
24       source_selected :
25       help_href :
26       help_selected :
27       etc_selected :
28
29       prev_file_href :
30       next_file_href :
31
32       view_single_page_href :
33       view_frames_href :
34
35       summary_fields_href :
36       summary_routine_href :
37       details_routine_href :
38
39       title :
40       subtitle :
41       user :
42-->
43
44
45<table border="0" cellpadding="0" cellspacing="0" width="98%" bgcolor="#F0F0FF" valign="bottom">
46  <tr>
47    <td width="10%">
48<a href="textoidl.html"><img src="./../prev.gif" border="0" alt="Previous"></a></td>
49    <td width="80%" align="center" valign="center">
50<font size=-1><i>SAXO Documentation Assistant</i>: <a href="./../home.html">Overview</a></font></td>
51    <td width="10%" align="right">
52<a href=""><img src="./../next.gif" border="0" alt="Next"></a></td>
53  </tr>
54</table>
55
56
57    <h1><font size="-2">Textoidl/</font></h1>
58    <h2>translate_sub_super.pro</h2>
59
60    <dl>
61    </dl>
62
63   
64 Return the proper IDL font positioning command for TeX
65 sub/superscripts.
66
67
68   
69    <h2>Routine summary</h2>
70
71    <dl>
72     
73      <dt><a href="#_sub_sup_idl"><i>result = </i>sub_sup_idl(<i>token</i>, FORCE_UD=<i>FORCE_UD</i>)</a><dt>
74      <dd><font size="-1"> </font></dd>
75     
76      <dt><a href="#_translate_sub_super"><i>result = </i>translate_sub_super(<i>InputString</i>, RECURSED=<i>RECURSED</i>, HELP=<i>HELP</i>)</a><dt>
77      <dd><font size="-1">  NAME:        TRANSLATE_SUB_SUPER  PURPOSE:        Translate TeX sub/superscripts to IDL sub/superscripts.</font></dd>
78     
79    </dl>
80
81    <p>&nbsp;</p>
82   
83
84     
85      <a name="#_sub_sup_idl"></a>
86
87      <h2>sub_sup_idl  <font size="-1" color="#006633">
88 Text, String
89</font></h2>
90
91      <p><font face="Courier"><i>result = </i>sub_sup_idl(<i><a href="#_sub_sup_idl_keyword_token">token</a></i>, <a href="#_sub_sup_idl_keyword_FORCE_UD">FORCE_UD</a>=<i>FORCE_UD</i>)</font></p>
92
93   
94
95
96    <h3>Return value</h3>
97 Either '!U' or !E' for superscripts, or '!D' or '!I' for subscripts.
98
99
100   
101    <h3>Parameters</h3>
102   
103
104    <a name="#_sub_sup_idl_keyword_token"></a>
105    <h4>token&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
106     
107     
108     
109     
110     
111     
112     
113     
114    </h4>
115
116   
117 Either '^' or '_', the TeX super/subscript characters
118
119   
120   
121
122   
123    <h3>Keywords</h3>
124
125   
126    <a name="#_sub_sup_idl_keyword_FORCE_UD"></a>
127    <h4>FORCE_UD&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
128     
129     
130     
131     
132     
133     
134     
135     
136    </h4>
137
138   
139 Set this to use !U/!D instead of !E/!I for sub/superscripts.
140
141   
142   
143
144    <h3>Examples</h3><pre>
145
146
147    </pre><h3>Version history</h3>
148   
149    <h4>Version</h4>
150 $Id: translate_sub_super.pro 327 2007-12-13 16:22:35Z pinsard $
151
152    <h4>History</h4>
153       $Log: translate_sub_super.pro,v $
154       Revision 1.5  2000/06/14 19:09:22  mcraig
155       Changed name of strtok str_token to avoid conflict in IDL 5.3.
156
157       Revision 1.4  1996/06/14 20:00:27  mcraig
158       Updated Copyright info.
159
160       Revision 1.3  1996/05/09 00:22:17  mcraig
161       Changed some function calls to reflect changes in those functions, moved
162       some code out of the main loop that didn't need to be there, added
163       documentation.
164
165       Revision 1.1  1996/01/31 18:47:37  mcraig
166       Initial revision
167
168  Copyright (C) 1996 The Regents of the University of California, All
169  Rights Reserved.  Written by Matthew W. Craig.
170  See the file COPYRIGHT for restrictions on distrubting this code.
171  This code comes with absolutely NO warranty; see DISCLAIMER for details.
172
173   
174
175    <h3>Known issues</h3>
176   
177   
178   
179    <h4>Restrictions</h4>
180 Make sure sub_sup_idl stays before translate_sub_super.  At least
181 for now, when IDL encounters a function and automatically compiles
182 it, it only compiles the functions in the file up to the named
183 function.  So even if sub_sup_idl was declared with
184 FORWARD_FUNCTION in translate_sub_super, it would not properly
185 compile.
186
187 The file translate_sub_super.pro contains two functions,
188 translate_sub_super, and sub_sup_idl.  The former is the
189 generic routine for processing TeX sub/superscripts, the
190 latter is used only by translate_sub_super and has no general
191 utility.  Hence it lives here.  You will see documentation for
192 translate_sub_super second if you use DOC_LIBRARY.
193
194 Used only by translate_sub_super.  Should be kept in same
195 file.
196
197
198    <h3>Other attributes</h3>
199   
200   
201    <h4>Uses routines</h4>
202
203
204   
205   
206   
207
208    <font size="-3"><p>&nbsp;</p></font>
209    <hr size="1" color="#CCCCCC"/>
210     
211      <a name="#_translate_sub_super"></a>
212
213      <h2>translate_sub_super  </h2>
214
215      <p><font face="Courier"><i>result = </i>translate_sub_super(<i><a href="#_translate_sub_super_keyword_InputString">InputString</a></i>, <a href="#_translate_sub_super_keyword_RECURSED">RECURSED</a>=<i>RECURSED</i>, <a href="#_translate_sub_super_keyword_HELP">HELP</a>=<i>HELP</i>)</font></p>
216
217   
218 NAME:
219       TRANSLATE_SUB_SUPER
220 PURPOSE:
221       Translate TeX sub/superscripts to IDL sub/superscripts.
222 CATEGORY:
223       text/strings
224 CALLING SEQUENCE:
225       new = translate_sub_super( old )
226 INPUTS:
227       old       -- string to be translated from TeX to IDL.   in
228 KEYWORD PARAMETERS:
229       /RECURSED -- set if this function is being called
230                    recursively.
231       /HELP     -- Set to print useful message and exit.
232 OUTPUTS:
233       new       -- string old converted from TeX to IDL       out
234 COMMON BLOCKS:
235 SIDE EFFECTS:
236 NOTES:
237       - For best results, when both a sub and superscript are used,
238         place the shorter of the two first (e.g. 'N^{a}_{bbbb}' is
239         better than 'N_{bbbb}^{a}').
240       - Single character sub/super scripts do not need to be
241         protected by braces.
242       - Sub/superscripts may be nested (e.g. 'N^{N_1^N}').
243 EXAMPLE:
244       out = translate_sub_super( 'N^2_{big}' )
245       Then out='N!U2!N!Dbig!N' which looks like it should on the
246       display.
247 LIBRARY FUNCTIONS CALLED:
248       str_token      -- Text/string (mcraig)
249       sub_sup_idl -- contained in this file
250 MODIFICATION HISTORY:
251       $Id: translate_sub_super.pro 327 2007-12-13 16:22:35Z pinsard $
252       $Log: translate_sub_super.pro,v $
253       Revision 1.5  2000/06/14 19:09:22  mcraig
254       Changed name of strtok str_token to avoid conflict in IDL 5.3.
255
256       Revision 1.4  1996/06/14 20:00:27  mcraig
257       Updated Copyright info.
258
259       Revision 1.3  1996/05/09 00:22:17  mcraig
260       Changed some function calls to reflect changes in those functions, moved
261       some code out of the main loop that didn't need to be there, added
262       documentation.
263
264       Revision 1.2  1996/02/08 18:54:20  mcraig
265       Changed default sub/superscript size to be !D/!U rather than !I/!E to
266       improve readability of plat annotations.
267
268       Revision 1.1  1996/01/31 18:47:37  mcraig
269       Initial revision
270
271 RELEASE:
272       $Name: Rel_2_1_2 $
273
274 COPYRIGHT:
275  Copyright (C) 1996 The Regents of the University of California, All
276  Rights Reserved.  Written by Matthew W. Craig.
277  See the file COPYRIGHT for restrictions on distrubting this code.
278  This code comes with absolutely NO warranty; see DISCLAIMER for details.
279
280   
281
282   
283    <h3>Parameters</h3>
284   
285
286    <a name="#_translate_sub_super_keyword_InputString"></a>
287    <h4>InputString&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
288     
289     
290     
291     
292     
293     
294     
295     
296    </h4>
297
298   
299   
300   
301
302   
303    <h3>Keywords</h3>
304
305   
306    <a name="#_translate_sub_super_keyword_RECURSED"></a>
307    <h4>RECURSED&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
308     
309     
310     
311     
312     
313     
314     
315     
316    </h4>
317
318   
319   
320    <a name="#_translate_sub_super_keyword_HELP"></a>
321    <h4>HELP&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
322     
323     
324     
325     
326     
327     
328     
329     
330    </h4>
331
332   
333   
334   
335
336   
337   
338   
339   
340   
341   
342
343   
344   
345   
346   
347   
348
349   
350   
351   
352   
353   
354   
355   
356
357    <font size="-3"><p>&nbsp;</p></font>
358    <hr size="1" color="#CCCCCC"/>
359     
360
361   
362
363    <p><font color="gray" size="-3">&nbsp;&nbsp;Produced by IDLdoc 2.0.</font></p>
364
365  </body>
366</html>
Note: See TracBrowser for help on using the repository browser.