Changeset 47


Ignore:
Timestamp:
05/09/06 11:13:01 (18 years ago)
Author:
pinsard
Message:

upgrade of TEXT2IDL/TEXtoIDL according to cerbere.lodyc.jussieu.fr: /usr/home/smasson/SAXO_RD/ : files

Location:
trunk
Files:
5 added
1 deleted
6 copied

Legend:

Unmodified
Added
Removed
  • trunk/ToBeReviewed/TEXtoIDL/matchdelim.pro

    r44 r47  
    4747; 
    4848; RELEASE: 
    49 ;       $Name: Rel_1_2 $ 
     49;       $Name: Rel_2_1_2 $ 
    5050; 
    5151; COPYRIGHT: 
  • trunk/ToBeReviewed/TEXtoIDL/nexttok.pro

    r44 r47  
    2929;       $Id$ 
    3030;       $Log: nexttok.pro,v $ 
     31;       Revision 1.4  2004/06/15 17:25:54  mcraig 
     32;       Fixed bug in regular expression, changed array notation to square brackets 
     33; 
    3134;       Revision 1.3  1996/06/14 20:00:27  mcraig 
    3235;       Updated Copyright info. 
     
    4043; 
    4144; RELEASE: 
    42 ;       $Name: Rel_1_2 $ 
     45;       $Name: Rel_2_1_2 $ 
    4346; 
    4447; COPYRIGHT: 
     
    101104    ENDIF  
    102105 
    103     MatchIdx = MatchIdx(1:*) 
    104     Matches = Matches(1:*) 
     106    MatchIdx = MatchIdx[1:*] 
     107    Matches = Matches[1:*] 
    105108 
    106109    SortInd = sort(Matches) 
    107110 
    108     Position = Matches(SortInd(0)) 
     111    Position = Matches[SortInd[0]] 
    109112 
    110     Tok = string(TmpTok(MatchIdx(SortInd(0)))) 
     113    Tok = string(TmpTok[MatchIdx[SortInd[0]]]) 
    111114     
    112115    return, Tok 
  • trunk/ToBeReviewed/TEXtoIDL/showtex.pro

    r44 r47  
    2626;       $Id$ 
    2727;       $Log: showtex.pro,v $ 
     28;       Revision 1.4  2004/06/15 17:25:54  mcraig 
     29;       Fixed bug in regular expression, changed array notation to square brackets 
     30; 
    2831;       Revision 1.3  1996/06/14 20:00:27  mcraig 
    2932;       Updated Copyright info. 
     
    3639; 
    3740; RELEASE: 
    38 ;       $Name: Rel_1_2 $ 
     41;       $Name: Rel_2_1_2 $ 
    3942; 
    4043; COPYRIGHT: 
     
    107110        x = .1 
    108111        FOR j = 1, 5 DO BEGIN 
    109             IF (count LT nseq ) THEN xyouts, x, y, DisplayString(count), align = .5, /norm 
     112            IF (count LT nseq ) THEN xyouts, x, y, DisplayString[count], align = .5, /norm 
    110113            count = count+1 
    111114            x = x + dx 
  • trunk/ToBeReviewed/TEXtoIDL/textable.pro

    r44 r47  
    3030;       $Id$ 
    3131;       $Log: textable.pro,v $ 
     32;       Revision 1.8  2004/06/15 17:25:54  mcraig 
     33;       Fixed bug in regular expression, changed array notation to square brackets 
     34; 
    3235;       Revision 1.7  1996/07/22 23:56:08  mcraig 
    3336;       Added \vartheta. 
     
    5457; 
    5558; RELEASE: 
    56 ;       $Name: Rel_1_2 $ 
     59;       $Name: Rel_2_1_2 $ 
    5760; 
    5861; COPYRIGHT: 
     
    9497;  Set IDL font sequence needed to switch to Greek letters. 
    9598    GreekFont = strarr(3) 
    96     GreekFont(VECFONT) = '!7' 
    97     GreekFont(PSFONT) = '!M' 
     99    GreekFont[VECFONT] = '!7' 
     100    GreekFont[PSFONT] = '!M' 
    98101 
    99102;  Set IDL font sequence needed to switch to special symbol font. 
    100103    SymbolFont = strarr(3) 
    101     SymbolFont(VECFONT) = '!M' 
    102     SymbolFont(PSFONT) = '!M' 
     104    SymbolFont[VECFONT] = '!M' 
     105    SymbolFont[PSFONT] = '!M' 
    103106 
    104107;  Set IDL font sequence needed to switch back to initial font. 
    105108    PreviousFont = strarr(3) 
    106     PreviousFont(VECFONT) = '!X' 
    107     PreviousFont(PSFONT) = '!X' 
     109    PreviousFont[VECFONT] = '!X' 
     110    PreviousFont[PSFONT] = '!X' 
    108111 
    109112;lowercase Greek --  
     
    205208        [ '\circ',              "%"   ,  string(byte(176))  ]$ 
    206209                          ] 
    207     LowercaseGreek(1,*) = $ 
    208       GreekFont(FontSelection) $ 
    209       + LowercaseGreek(FontSelection,*) $ 
    210       + PreviousFont(FontSelection) 
    211     UppercaseGreek(1,*) = $ 
    212       GreekFont(FontSelection) +$ 
    213       UppercaseGreek(FontSelection,*) $ 
    214       + PreviousFont(FontSelection) 
    215     Symbols(1,*) = $ 
    216       SymbolFont(FontSelection) $ 
    217       + Symbols(FontSelection,*) $ 
    218       + PreviousFont(FontSelection) 
     210    LowercaseGreek[1,*] = $ 
     211      GreekFont[FontSelection] $ 
     212      + LowercaseGreek[FontSelection,*] $ 
     213      + PreviousFont[FontSelection] 
     214    UppercaseGreek[1,*] = $ 
     215      GreekFont[FontSelection] +$ 
     216      UppercaseGreek[FontSelection,*] $ 
     217      + PreviousFont[FontSelection] 
     218    Symbols[1,*] = $ 
     219      SymbolFont[FontSelection] $ 
     220      + Symbols[FontSelection,*] $ 
     221      + PreviousFont[FontSelection] 
    219222 
    220223    TranslationTable = [[LowercaseGreek],[UppercaseGreek],[Symbols]] 
    221     return,TranslationTable(0:1,*) 
     224    return,TranslationTable[0:1,*] 
    222225 
    223226END  
  • trunk/ToBeReviewed/TEXtoIDL/textoidl.pro

    r44 r47  
    4141;       $Id$ 
    4242;       $Log: textoidl.pro,v $ 
     43;       Revision 1.7  2004/06/15 17:25:54  mcraig 
     44;       Fixed bug in regular expression, changed array notation to square brackets 
     45; 
     46;       Revision 1.6  2004/01/11 01:49:00  mcraig 
     47;       Changed format of one array to newer [] style to avoidf conflict with function name in astro library. 
     48; 
     49;       Revision 1.5  2001/11/23 21:10:55  mcraig 
     50;       Added backslash '\' to tex sequences in translation table to protect them during regexp search in strsplit. 
     51; 
    4352;       Revision 1.4  1996/06/14 20:00:27  mcraig 
    4453;       Updated Copyright info. 
     
    5463; 
    5564; RELEASE: 
    56 ;       $Name: Rel_1_2 $ 
     65;       $Name: Rel_2_1_2 $ 
    5766; 
    5867; COPYRIGHT: 
     
    91100    IF keyword_set (tex_seq) THEN BEGIN 
    92101        table=textable() 
    93         return,table(0,*) 
     102        return,table[0,*] 
    94103    ENDIF  
    95104 
     
    123132;   around them if they are unbraced.  This will have the result the 
    124133;   it will be difficult to use \ as a sub/superscript.  Get over it. 
    125     strn =  strtrans(strn, '^'+table(0, *), '^{'+table(0, *)+'}') 
    126     strn =  strtrans(strn, '_'+table(0, *), '_{'+table(0, *)+'}') 
     134 
     135;   V2.11 Must include the '\' in from of translation table TeX 
     136;   sequences to ensure that strsplit properly treats the '\' in the 
     137;   TeX sequence. Since strsplit is doing a regexp replace, and '\' is 
     138;   special in regexps, need to escape it. 
     139    strn =  strtrans(strn, '\^'+'\'+table[0, *], '^{'+table[0, *]+'}') 
     140    strn =  strtrans(strn, '\_'+'\'+table[0, *], '_{'+table[0, *]+'}') 
    127141 
    128142;  First we translate Greek letters and the like.  This makes guessing 
    129143;  alignment of sub/superscripts easier, as all special characters will then 
    130144;  be one character long. 
    131     strn = strtrans(strn, table(0, *), table(1, *)) 
    132145 
    133     FOR i = 0L, n_elements(strn)-1 DO $ 
    134       strn(i) = translate_sub_super(strn(i)) ; Take care of sub/superscripts 
     146;   V2.11 Must include the '\' in from of translation table TeX 
     147;   sequences to ensure that strsplit properly treats the '\' in the 
     148;   TeX sequence. Since strsplit is doing a regexp replace, and '\' is 
     149;   special in regexps, need to escape it. 
     150    strn = strtrans(strn, '\'+table[0, *], table[1, *]) 
     151 
     152 
     153    FOR i = 0L, n_elements(strn)-1 DO BEGIN  
     154        strn[i] = translate_sub_super(strn[i]) ; Take care of sub/superscripts 
     155    ENDFOR  
    135156 
    136157    return,strn 
  • trunk/ToBeReviewed/TEXtoIDL/translate_sub_super.pro

    r44 r47  
    4747;       $Id$ 
    4848;       $Log: translate_sub_super.pro,v $ 
     49;       Revision 1.5  2000/06/14 19:09:22  mcraig 
     50;       Changed name of strtok str_token to avoid conflict in IDL 5.3. 
     51; 
    4952;       Revision 1.4  1996/06/14 20:00:27  mcraig 
    5053;       Updated Copyright info. 
     
    5962; 
    6063; RELEASE: 
    61 ;       $Name: Rel_1_2 $ 
     64;       $Name: Rel_2_1_2 $ 
    6265; COPYRIGHT: 
    6366;  Copyright (C) 1996 The Regents of the University of California, All 
     
    131134;       display.  
    132135; LIBRARY FUNCTIONS CALLED: 
    133 ;       strtok      -- Text/string (mcraig) 
     136;       str_token      -- Text/string (mcraig) 
    134137;       sub_sup_idl -- contained in this file 
    135138; MODIFICATION HISTORY: 
    136139;       $Id$ 
    137140;       $Log: translate_sub_super.pro,v $ 
     141;       Revision 1.5  2000/06/14 19:09:22  mcraig 
     142;       Changed name of strtok str_token to avoid conflict in IDL 5.3. 
     143; 
    138144;       Revision 1.4  1996/06/14 20:00:27  mcraig 
    139145;       Updated Copyright info. 
     
    152158; 
    153159; RELEASE: 
    154 ;       $Name: Rel_1_2 $ 
     160;       $Name: Rel_2_1_2 $ 
    155161; 
    156162; COPYRIGHT: 
     
    219225; Our approach will be to grab the input string up to the next '^' or 
    220226; '_', then process the script we've found. 
    221     NewString=strtok(strn,Token) 
     227    NewString=str_token(strn,Token) 
    222228 
    223229    WHILE  strlen(strn) GT  0 DO  BEGIN 
     
    284290        IF ( pos NE -1 ) THEN BEGIN     ; more left to process      
    285291            NewString = NewString $ 
    286               + strtok(strn, Token)    
     292              + str_token(strn, Token)    
    287293        ENDIF ELSE BEGIN                ; we are done 
    288294            NewString = NewString + strn 
Note: See TracChangeset for help on using the changeset viewer.