home *** CD-ROM | disk | FTP | other *** search
/ Piper's Pit BBS/FTP: ibm 0200 - 0209 / ibm0200-0209 / ibm0200.tar / ibm0200 / FOLIO318.ZIP / FOL_ACTI.2F_ / FOL_ACTI.2F
Encoding:
Text File  |  1993-05-19  |  1.8 KB  |  38 lines

  1. :***************************************************
  2. :  FOL_ACTI.FS2
  3. :
  4. :  Creates Popup Links from Footnotes
  5. :
  6. :   Supplemental FSR to FOL_ACTI.FSR
  7. :   Separated to avoid memory errors
  8. :   Apply both FSRs with the batch file FOL_ACTI.BAT
  9. :
  10. :**************************************************
  11. :
  12. :   Add Popup Links to Footnotes
  13. :     Search for a word (including punctuation marks) followed by a number.
  14. :     Store the word in a variable. Search for everything which is not a 
  15. :     form feed (page break--ASCII 12) up to a number preceded by a CRLF
  16. :     OR up to a page break (store all but CRLF+Number or Page break 
  17. :     in a variable). Store the following word or words (up to a CRLF)
  18. :     in a third variable. Replace the first and third variables in the
  19. :     Popup Window Link code. Replace the second variable after the code.
  20. :
  21.     "{ [A-z!-/?]+}[0-9]+{[^ ]+}(\r\n[0-9]+| ){[^\r\n]+}\r\n" "<PW:Popup,3,2>{3}<LT>{1}</PW>{2}\r\n" -c
  22. :
  23. :     Note: This may not be the best way to do footnotes, but it will work.
  24. :     However, because more than one footnote may appear on a page, the argument
  25. :     needs to be repeated as many times as there are footnotes on the page.
  26. :     For this file, the most on a page is 4, which means the argument must
  27. :     be repeated 3 more times.
  28. :
  29.     "{ [A-z!-/?]+}[0-9]+{[^ ]+}(\r\n[0-9]+| ){[^\r\n]+}\r\n" "<PW:Popup,3,2>{3}<LT>{1}</PW>{2}\r\n" -c
  30.     "{ [A-z!-/?]+}[0-9]+{[^ ]+}(\r\n[0-9]+| ){[^\r\n]+}\r\n" "<PW:Popup,3,2>{3}<LT>{1}</PW>{2}\r\n" -c
  31.     "{ [A-z!-/?]+}[0-9]+{[^ ]+}(\r\n[0-9]+| ){[^\r\n]+}\r\n" "<PW:Popup,3,2>{3}<LT>{1}</PW>{2}\r\n" -c
  32. :
  33. :     Remove the Page Break Codes (they are not needed in the infobase)
  34. :     Two Steps:
  35. :      1. Remove PB followed by CRLF
  36. :      2. Remove lone PB
  37.     " \r\n" "" -c
  38.     " " "" -c