home *** CD-ROM | disk | FTP | other *** search
/ Media Depot 5 / mediadepotvolume51993.iso / FILES / 13 / FAQ202S.ZIP / faq / htmlprep.sed < prev    next >
Encoding:
Text File  |  1995-10-11  |  1004 b   |  38 lines

  1. s/comment --- Substitute @end xxx directives with @end_xxx macro calls ---/&/
  2.  
  3. s/@end table/@end_table/
  4. s/@end itemize/@end_itemize/
  5. s/@end enumerate/@end_enumerate/
  6. s/@end example/@end_example/
  7. s/@end smallexample/@end_smallexample/
  8. s/@end display/@end_display/
  9. s/@end quotation/@end_quotation/
  10. s/@end menu/@end_menu/
  11.  
  12. s/comment --- Make @node lines call a macro ---/&/
  13.  
  14. s/@node\(.*\)/@node{\1}/
  15.  
  16. s/comment --- Convert menus to macro calls:            ---/&/
  17. s/comment ---    @menu is left alone               ---/&/
  18. s/comment ---    menu items converted to }\n@mitem{... ---/&/
  19. s/comment ---    @end menu converted to @end_menu      ---/&/
  20.  
  21. /^@menu/,/^@end_menu/ {
  22.     s/comment --- The first menu item after @menu needs special    ---/&/
  23.     s/comment --- treatment, because there is no @mitem{ before it ---/&/
  24.     /^@menu/ {
  25.         N
  26.     s/\n/!!!!!/
  27.     }
  28.     s/^\* /@mitem{/
  29.     s/,/\\,/g
  30.     s/::/,/
  31.     s/^[     ]\+/&/
  32.     s/^$//
  33.     s/^\@\(mitem\|end_menu\)/}\
  34. @\1/
  35.     s/^\(@menu\)!!!!!\* /\1\
  36. @mitem{/
  37. }
  38.