home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 4 / Apprentice-Release4.iso / Utilities / Programming / PowerReplace 4.1 / Documentation / FilterFile Doc < prev    next >
Encoding:
Text File  |  1995-12-18  |  4.3 KB  |  129 lines  |  [ttro/ttxt]

  1.  
  2.  
  3.  
  4.  
  5.                        Filter File Documentation
  6.                                                        for PowerReplace 
  7.                                                                         December 18, 1995
  8.  
  9. _________________________________________________________________________
  10.  
  11. PowerReplace Expression:
  12. A PowerReplace Expression (PRExpression) is a text line containing two strings:  first-string and second-string,
  13. enclosed by quotation marks and separated by space or tabulation. It means that the first-string will be replaced by the second-string everywhere in a text file. For example, the PRExpression
  14.     "print"   "write"
  15. means replace the word "print" by "write".
  16. The first-string, if necessary, may contain one special character * in the middle for any indeterminate string. The  following PRExpression
  17.     "%*\n"    ""
  18. means delete all characters of a line beginning with % (delete Tex comment). 
  19.  
  20. A Filter File is a text file containing many PRExpressions after being made through the menu “PowerReplace/File/Make Filter File”.
  21.  
  22. See also the documentation “FAQ” to understand better how to write PRExpression.
  23.  
  24.  
  25. Create New Filter File:
  26. (1) Create a text file using any text editor. Put your own PRExpressions in this file.
  27.  
  28. (2) Select the menu “File/Make Filter File”. The “Make PowerReplace Filter File” window appears. 
  29.  
  30. (3) Click the button “Choose File”, and select the file that you have created at (1). The name of the text file will appear. 
  31.  
  32. (4) Set option boxes in this window. 
  33.      - If the “Extension Name” is empty, you must set the “Delete original file” option on.
  34.      - If the first-string in all PRExpressions is only one character, you can set the “Char Convert Only” option on. It will accelerate converting speed.       
  35.      - Use Balloons Help system for more information.
  36.  
  37. (5) Click the button “Make” to turn this file into filter file. A progress indicator window appears during a short moment.
  38.      - If you want to create other filter file, repeat (1)-(5).
  39.  
  40. (6) Put the new created filter file into the “Filter” folder.
  41.  
  42. (7) Restart the application. This filter file will appear in the menu “Filter” and you can select it for your conversion.
  43. See also the documentation “for beginners” to learn step by step from a complete example.
  44.  
  45.  
  46. Syntax Summary:
  47. Filter File:
  48.             Filter File-Text after being made through the menu “PowerReplace/File/Make Filter File”
  49. Filter File-Text:  
  50.             line...            (... means repeat many time)
  51. line:
  52.             PRExpression                      or
  53.             comment
  54. comment:
  55.             %string-without-cr\r
  56. PRExpression:
  57.             "first-string" "second-string"\r
  58. first-string:
  59.             string                         or
  60.             string*string
  61. second-string:
  62.             string
  63. string:
  64.             char...
  65. char:
  66.             normal-char                    or
  67.             special-char
  68. char-without-cr:
  69.             normal-char                or
  70.             special-char (excepte \r)
  71. string-without-cr:
  72.             char-without-cr...
  73. normal-char:
  74.           printable character (except the three following " \ *)
  75. special-char:
  76.     \\                representing                \                       or
  77.     \"                representing                "                       or
  78.     \*                representing                *                       or
  79.        \t    representing    TAB                  or
  80.     \n    representing    LF                      or
  81.     \r    representing    CR
  82.  
  83.  
  84. Filter File Examples with this distribution:
  85. DelCComment: 
  86.     Remove comment in C++ source file. There is two styles: /* */ and //
  87.  
  88. DelResource: 
  89.     Remove resource fork of file.
  90.  
  91. Filter->Readme: 
  92.     Create readme for PowerReplace's filter file.
  93.  
  94. min -> MAJ:    
  95.     Change lower character to upper character. For french text file, the lower character with accent is changed to corresponding upper character without accent.
  96.  
  97. MMat->TeX: 
  98.     Change Mathematica Matrix format to Tex format.
  99.  
  100. PCTeX8->MacTeX8: 
  101.     This filter file converts IMB PC TeX 8 bits text format to Mac 8 bits format.
  102.  
  103. TeX->Html: 
  104.     Convert Tex 7 bits file to HTML format.
  105.  
  106. TeX->Text: 
  107.     Remove mathematical formule, comment and command in Tex source file.
  108.  
  109. TeX8->TeX7: 
  110.         Convert Tex 8 bits file to Tex 7 bits file.
  111.  
  112. Text->Html: 
  113.     Convert 8 bits text file to HTML format.
  114.  
  115. Text->TeX: 
  116.     Text file to Tex 7 bits format.
  117.  
  118. Some filters are optimized for french text.
  119.  
  120.  
  121.  
  122. _________________________
  123. Guoniu Han
  124. 30, avenue du Gal de Gaulle
  125. 67000 Strasbourg, France
  126. email: guoniu@math.u-strasbg.fr
  127. http://130.79.4.26/~guoniu/mac/
  128. _________________________
  129.