home *** CD-ROM | disk | FTP | other *** search
/ Meeting Pearls 3 / Meeting_Pearls_III.iso / Pearls / texmf / doc / LaTeX / Hilfe / syntax_find.ced < prev    next >
Text File  |  1995-09-06  |  5KB  |  130 lines

  1. /* CED-Makro                                                                  */
  2. /* Dieses Makro dient zum Einfügen von TeX-Syntax in den laufenden Text.      */
  3. /* Es ist  für den TeX-Frontend "TeXt Plus Professional", kurz: TPP angepaßt. */
  4. /* Für andere Editoren müssen die mit einem Kommentar versehenen Zeilen modi- */
  5. /* fiziert werden.                                                            */
  6. /* Werner Liebscher, September 1994                                           */
  7. /* Modifiziert für CED von Sven Fischer, Oktober 1994                         */
  8.  
  9. ADDRESS "rexx_ced"
  10.  
  11. OPTIONS RESULTS
  12.  
  13. TRACE ERRORS
  14.  
  15. PARSE ARG Index
  16. IF Index=="" THEN DO
  17.   'Status 55'                      /* momentane Zeile von CED holen */
  18.   PARSE var RESULT "\" Index .     /* Wort nach 1. \ nach Index zuweisen */
  19.   noargs = 1
  20.  END
  21.  
  22. IndexLength = LENGTH(Index)
  23. IndexBegin = SUBSTR(Index,1,1)
  24.  
  25. open new                           /* neuer View in CED oeffnen */
  26.  
  27. fehler = 0
  28.  
  29. select
  30.  WHEN IndexBegin = 'a' THEN OPEN "'texhelp:syntax_type_a.liste'"
  31.  WHEN IndexBegin = 'A' THEN OPEN "'texhelp:syntax_type_a.liste'"
  32.  WHEN IndexBegin = 'b' THEN OPEN "'texhelp:syntax_type_b.liste'"
  33.  WHEN IndexBegin = 'B' THEN OPEN "'texhelp:syntax_type_b.liste'"
  34.  WHEN IndexBegin = 'c' THEN OPEN "'texhelp:syntax_type_c.liste'"
  35.  WHEN IndexBegin = 'C' THEN OPEN "'texhelp:syntax_type_c.liste'"
  36.  WHEN IndexBegin = 'd' THEN OPEN "'texhelp:syntax_type_d.liste'"
  37.  WHEN IndexBegin = 'D' THEN OPEN "'texhelp:syntax_type_d.liste'"
  38.  WHEN IndexBegin = 'e' THEN OPEN "'texhelp:syntax_type_e.liste'"
  39.  WHEN IndexBegin = 'E' THEN OPEN "'texhelp:syntax_type_e.liste'"
  40.  WHEN IndexBegin = 'f' THEN OPEN "'texhelp:syntax_type_f.liste'"
  41.  WHEN IndexBegin = 'F' THEN OPEN "'texhelp:syntax_type_f.liste'"
  42.  WHEN IndexBegin = 'g' THEN OPEN "'texhelp:syntax_type_g.liste'"
  43.  WHEN IndexBegin = 'G' THEN OPEN "'texhelp:syntax_type_g.liste'"
  44.  WHEN IndexBegin = 'h' THEN OPEN "'texhelp:syntax_type_h.liste'"
  45.  WHEN IndexBegin = 'H' THEN OPEN "'texhelp:syntax_type_h.liste'"
  46.  WHEN IndexBegin = 'i' THEN OPEN "'texhelp:syntax_type_i.liste'"
  47.  WHEN IndexBegin = 'I' THEN OPEN "'texhelp:syntax_type_i.liste'"
  48.  WHEN IndexBegin = 'j' THEN OPEN "'texhelp:syntax_type_jk.liste'"
  49.  WHEN IndexBegin = 'J' THEN OPEN "'texhelp:syntax_type_jk.liste'"
  50.  WHEN IndexBegin = 'k' THEN OPEN "'texhelp:syntax_type_jk.liste'"
  51.  WHEN IndexBegin = 'K' THEN OPEN "'texhelp:syntax_type_jk.liste'"
  52.  WHEN IndexBegin = 'l' THEN OPEN "'texhelp:syntax_type_l.liste'"
  53.  WHEN IndexBegin = 'L' THEN OPEN "'texhelp:syntax_type_l.liste'"
  54.  WHEN IndexBegin = 'm' THEN OPEN "'texhelp:syntax_type_m.liste'"
  55.  WHEN IndexBegin = 'M' THEN OPEN "'texhelp:syntax_type_m.liste'"
  56.  WHEN IndexBegin = 'n' THEN OPEN "'texhelp:syntax_type_n.liste'"
  57.  WHEN IndexBegin = 'N' THEN OPEN "'texhelp:syntax_type_n.liste'"
  58.  WHEN IndexBegin = 'o' THEN OPEN "'texhelp:syntax_type_o.liste'"
  59.  WHEN IndexBegin = 'O' THEN OPEN "'texhelp:syntax_type_o.liste'"
  60.  WHEN IndexBegin = 'p' THEN OPEN "'texhelp:syntax_type_p.liste'"
  61.  WHEN IndexBegin = 'P' THEN OPEN "'texhelp:syntax_type_p.liste'"
  62.  WHEN IndexBegin = 'q' THEN OPEN "'texhelp:syntax_type_qr.liste'"
  63.  WHEN IndexBegin = 'Q' THEN OPEN "'texhelp:syntax_type_qr.liste'"
  64.  WHEN IndexBegin = 'r' THEN OPEN "'texhelp:syntax_type_qr.liste'"
  65.  WHEN IndexBegin = 'R' THEN OPEN "'texhelp:syntax_type_qr.liste'"
  66.  WHEN IndexBegin = 's' THEN OPEN "'texhelp:syntax_type_s.liste'"
  67.  WHEN IndexBegin = 'S' THEN OPEN "'texhelp:syntax_type_s.liste'"
  68.  WHEN IndexBegin = 't' THEN OPEN "'texhelp:syntax_type_t.liste'"
  69.  WHEN IndexBegin = 'T' THEN OPEN "'texhelp:syntax_type_t.liste'"
  70.  WHEN IndexBegin = 'u' THEN OPEN "'texhelp:syntax_type_u.liste'"
  71.  WHEN IndexBegin = 'U' THEN OPEN "'texhelp:syntax_type_u.liste'"
  72.  WHEN IndexBegin = 'v' THEN OPEN "'texhelp:syntax_type_vwxz.liste'"
  73.  WHEN IndexBegin = 'V' THEN OPEN "'texhelp:syntax_type_vwxz.liste'"
  74.  WHEN IndexBegin = 'w' THEN OPEN "'texhelp:syntax_type_vwxz.liste'"
  75.  WHEN IndexBegin = 'W' THEN OPEN "'texhelp:syntax_type_vwxz.liste'"
  76.  WHEN IndexBegin = 'x' THEN OPEN "'texhelp:syntax_type_vwxz.liste'"
  77.  WHEN IndexBegin = 'X' THEN OPEN "'texhelp:syntax_type_vwxz.liste'"
  78.  WHEN IndexBegin = 'z' THEN OPEN "'texhelp:syntax_type_vwxz.liste'"
  79.  WHEN IndexBegin = 'Z' THEN OPEN "'texhelp:syntax_type_vwxz.liste'"
  80.  
  81.  OTHERWISE fehler = 1
  82.  
  83. END
  84.  
  85. IF fehler = 1 THEN DO
  86.    okay1 "FEHLER: Syntax \command zur Substitution benutzen"
  87.    quit
  88.   END
  89. ELSE DO
  90.  
  91.  
  92.  
  93. 'beg of file'
  94.  
  95. Index2 = "\"||Index
  96. 'Search for' Index2
  97. found = RESULT
  98. IF ~found THEN DO
  99.   'beg of file'
  100.   'Search for' Index
  101.   found = RESULT
  102.  END
  103. ELSE DO
  104.   up
  105. END
  106. IF found THEN DO
  107.   Down
  108.   'mark'
  109.   'Search for' "blockend"
  110.   left
  111.   copy
  112.   quit
  113.  
  114.   IF noargs == 1 THEN DO
  115.     'beg of line'
  116.     left
  117.     'Search for' "\"
  118.     'delete word'
  119.     'delete word'
  120.   END
  121.   'insert block'
  122.  END
  123. ELSE DO
  124.   okay1 "FEHLER: Kommando oder Abkürzung nicht gefunden!"
  125.   quit
  126. END
  127.  
  128.  
  129. END
  130.