[163] | 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> </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 | <h3>Return value</h3> |
---|
| 96 | Either '!U' or !E' for superscripts, or '!D' or '!I' for subscripts. |
---|
| 97 | |
---|
| 98 | |
---|
| 99 | |
---|
| 100 | <h3>Parameters</h3> |
---|
| 101 | |
---|
| 102 | |
---|
| 103 | <a name="#_sub_sup_idl_keyword_token"></a> |
---|
| 104 | <h4>token |
---|
| 105 | |
---|
| 106 | |
---|
| 107 | |
---|
| 108 | |
---|
| 109 | |
---|
| 110 | |
---|
| 111 | |
---|
| 112 | |
---|
| 113 | </h4> |
---|
| 114 | |
---|
| 115 | |
---|
| 116 | Either '^' or '_', the TeX super/subscript characters |
---|
| 117 | |
---|
| 118 | |
---|
| 119 | |
---|
| 120 | |
---|
| 121 | |
---|
| 122 | <h3>Keywords</h3> |
---|
| 123 | |
---|
| 124 | |
---|
| 125 | <a name="#_sub_sup_idl_keyword_FORCE_UD"></a> |
---|
| 126 | <h4>FORCE_UD |
---|
| 127 | |
---|
| 128 | |
---|
| 129 | |
---|
| 130 | |
---|
| 131 | |
---|
| 132 | |
---|
| 133 | |
---|
| 134 | |
---|
| 135 | </h4> |
---|
| 136 | |
---|
| 137 | |
---|
| 138 | Set this to use !U/!D instead of !E/!I for sub/superscripts. |
---|
| 139 | |
---|
| 140 | |
---|
| 141 | |
---|
| 142 | |
---|
| 143 | <h3>Examples</h3> |
---|
| 144 | |
---|
| 145 | |
---|
| 146 | <h3>Version history</h3> |
---|
| 147 | |
---|
| 148 | <h4>Version</h4> |
---|
[168] | 149 | $Id: translate_sub_super.pro 163 2006-08-29 12:59:46Z navarro $ |
---|
[163] | 150 | <h4>History</h4> |
---|
| 151 | $Log: translate_sub_super.pro,v $ |
---|
| 152 | Revision 1.5 2000/06/14 19:09:22 mcraig |
---|
| 153 | Changed name of strtok str_token to avoid conflict in IDL 5.3. |
---|
| 154 | |
---|
| 155 | Revision 1.4 1996/06/14 20:00:27 mcraig |
---|
| 156 | Updated Copyright info. |
---|
| 157 | |
---|
| 158 | Revision 1.3 1996/05/09 00:22:17 mcraig |
---|
| 159 | Changed some function calls to reflect changes in those functions, moved |
---|
| 160 | some code out of the main loop that didn't need to be there, added |
---|
| 161 | documentation. |
---|
| 162 | |
---|
| 163 | Revision 1.1 1996/01/31 18:47:37 mcraig |
---|
| 164 | Initial revision |
---|
| 165 | |
---|
| 166 | Copyright (C) 1996 The Regents of the University of California, All |
---|
| 167 | Rights Reserved. Written by Matthew W. Craig. |
---|
| 168 | See the file COPYRIGHT for restrictions on distrubting this code. |
---|
| 169 | This code comes with absolutely NO warranty; see DISCLAIMER for details. |
---|
| 170 | |
---|
| 171 | |
---|
| 172 | |
---|
| 173 | <h3>Known issues</h3> |
---|
| 174 | |
---|
| 175 | |
---|
| 176 | |
---|
| 177 | <h4>Restrictions</h4> |
---|
| 178 | Make sure sub_sup_idl stays before translate_sub_super. At least |
---|
| 179 | for now, when IDL encounters a function and automatically compiles |
---|
| 180 | it, it only compiles the functions in the file up to the named |
---|
| 181 | function. So even if sub_sup_idl was declared with |
---|
| 182 | FORWARD_FUNCTION in translate_sub_super, it would not properly |
---|
| 183 | compile. |
---|
| 184 | |
---|
| 185 | The file translate_sub_super.pro contains two functions, |
---|
| 186 | translate_sub_super, and sub_sup_idl. The former is the |
---|
| 187 | generic routine for processing TeX sub/superscripts, the |
---|
| 188 | latter is used only by translate_sub_super and has no general |
---|
| 189 | utility. Hence it lives here. You will see documentation for |
---|
| 190 | translate_sub_super second if you use DOC_LIBRARY. |
---|
| 191 | |
---|
| 192 | Used only by translate_sub_super. Should be kept in same |
---|
| 193 | file. |
---|
| 194 | |
---|
| 195 | |
---|
| 196 | <h3>Other attributes</h3> |
---|
| 197 | |
---|
| 198 | |
---|
| 199 | <h4>Uses routines</h4> |
---|
| 200 | |
---|
| 201 | |
---|
| 202 | |
---|
| 203 | |
---|
| 204 | |
---|
| 205 | |
---|
| 206 | <font size="-3"><p> </p></font> |
---|
| 207 | <hr size="1" color="#CCCCCC"/> |
---|
| 208 | |
---|
| 209 | <a name="#_translate_sub_super"></a> |
---|
| 210 | |
---|
| 211 | <h2>translate_sub_super </h2> |
---|
| 212 | |
---|
| 213 | <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> |
---|
| 214 | |
---|
| 215 | |
---|
| 216 | NAME: |
---|
| 217 | TRANSLATE_SUB_SUPER |
---|
| 218 | PURPOSE: |
---|
| 219 | Translate TeX sub/superscripts to IDL sub/superscripts. |
---|
| 220 | CATEGORY: |
---|
| 221 | text/strings |
---|
| 222 | CALLING SEQUENCE: |
---|
| 223 | new = translate_sub_super( old ) |
---|
| 224 | INPUTS: |
---|
| 225 | old -- string to be translated from TeX to IDL. in |
---|
| 226 | KEYWORD PARAMETERS: |
---|
| 227 | /RECURSED -- set if this function is being called |
---|
| 228 | recursively. |
---|
| 229 | /HELP -- Set to print useful message and exit. |
---|
| 230 | OUTPUTS: |
---|
| 231 | new -- string old converted from TeX to IDL out |
---|
| 232 | COMMON BLOCKS: |
---|
| 233 | SIDE EFFECTS: |
---|
| 234 | NOTES: |
---|
| 235 | - For best results, when both a sub and superscript are used, |
---|
| 236 | place the shorter of the two first (e.g. 'N^{a}_{bbbb}' is |
---|
| 237 | better than 'N_{bbbb}^{a}'). |
---|
| 238 | - Single character sub/super scripts do not need to be |
---|
| 239 | protected by braces. |
---|
| 240 | - Sub/superscripts may be nested (e.g. 'N^{N_1^N}'). |
---|
| 241 | EXAMPLE: |
---|
| 242 | out = translate_sub_super( 'N^2_{big}' ) |
---|
| 243 | Then out='N!U2!N!Dbig!N' which looks like it should on the |
---|
| 244 | display. |
---|
| 245 | LIBRARY FUNCTIONS CALLED: |
---|
| 246 | str_token -- Text/string (mcraig) |
---|
| 247 | sub_sup_idl -- contained in this file |
---|
| 248 | MODIFICATION HISTORY: |
---|
[168] | 249 | $Id: translate_sub_super.pro 163 2006-08-29 12:59:46Z navarro $ |
---|
[163] | 250 | $Log: translate_sub_super.pro,v $ |
---|
| 251 | Revision 1.5 2000/06/14 19:09:22 mcraig |
---|
| 252 | Changed name of strtok str_token to avoid conflict in IDL 5.3. |
---|
| 253 | |
---|
| 254 | Revision 1.4 1996/06/14 20:00:27 mcraig |
---|
| 255 | Updated Copyright info. |
---|
| 256 | |
---|
| 257 | Revision 1.3 1996/05/09 00:22:17 mcraig |
---|
| 258 | Changed some function calls to reflect changes in those functions, moved |
---|
| 259 | some code out of the main loop that didn't need to be there, added |
---|
| 260 | documentation. |
---|
| 261 | |
---|
| 262 | Revision 1.2 1996/02/08 18:54:20 mcraig |
---|
| 263 | Changed default sub/superscript size to be !D/!U rather than !I/!E to |
---|
| 264 | improve readability of plat annotations. |
---|
| 265 | |
---|
| 266 | Revision 1.1 1996/01/31 18:47:37 mcraig |
---|
| 267 | Initial revision |
---|
| 268 | |
---|
| 269 | RELEASE: |
---|
| 270 | $Name: Rel_2_1_2 $ |
---|
| 271 | |
---|
| 272 | COPYRIGHT: |
---|
| 273 | Copyright (C) 1996 The Regents of the University of California, All |
---|
| 274 | Rights Reserved. Written by Matthew W. Craig. |
---|
| 275 | See the file COPYRIGHT for restrictions on distrubting this code. |
---|
| 276 | This code comes with absolutely NO warranty; see DISCLAIMER for details. |
---|
| 277 | |
---|
| 278 | |
---|
| 279 | |
---|
| 280 | |
---|
| 281 | <h3>Parameters</h3> |
---|
| 282 | |
---|
| 283 | |
---|
| 284 | <a name="#_translate_sub_super_keyword_InputString"></a> |
---|
| 285 | <h4>InputString |
---|
| 286 | |
---|
| 287 | |
---|
| 288 | |
---|
| 289 | |
---|
| 290 | |
---|
| 291 | |
---|
| 292 | |
---|
| 293 | |
---|
| 294 | </h4> |
---|
| 295 | |
---|
| 296 | |
---|
| 297 | |
---|
| 298 | |
---|
| 299 | |
---|
| 300 | |
---|
| 301 | <h3>Keywords</h3> |
---|
| 302 | |
---|
| 303 | |
---|
| 304 | <a name="#_translate_sub_super_keyword_RECURSED"></a> |
---|
| 305 | <h4>RECURSED |
---|
| 306 | |
---|
| 307 | |
---|
| 308 | |
---|
| 309 | |
---|
| 310 | |
---|
| 311 | |
---|
| 312 | |
---|
| 313 | |
---|
| 314 | </h4> |
---|
| 315 | |
---|
| 316 | |
---|
| 317 | |
---|
| 318 | <a name="#_translate_sub_super_keyword_HELP"></a> |
---|
| 319 | <h4>HELP |
---|
| 320 | |
---|
| 321 | |
---|
| 322 | |
---|
| 323 | |
---|
| 324 | |
---|
| 325 | |
---|
| 326 | |
---|
| 327 | |
---|
| 328 | </h4> |
---|
| 329 | |
---|
| 330 | |
---|
| 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 | <font size="-3"><p> </p></font> |
---|
| 356 | <hr size="1" color="#CCCCCC"/> |
---|
| 357 | |
---|
| 358 | |
---|
| 359 | |
---|
| 360 | |
---|
[177] | 361 | <p><font color="gray" size="-3"> Produced by IDLdoc 2.0 on Wed Sep 13 16:32:32 2006.</font></p> |
---|
[163] | 362 | |
---|
| 363 | </body> |
---|
| 364 | </html> |
---|