#!/usr/bin/newlisp # # this utility is called from Makefile: # make preparepdf # to prepare the file for PDF conversion, byt replaceing all # with in the syntax statements and replacing → (one line # arrow with ⇒ (double line arrow) # # USAGE: preparepdf newlisp_manual.html newlisp_manual_preparepdf.html # (set 'text (read-file (main-args 2))) ; input file (replace {(

)(.*?)(

)} text (append {

} $2 {

}) 0) (println $0 " replacements made for syntax color") (replace {→} text {⇒} 0) (println $0 " replacements made for arrow code") (write-file (main-args 3) text) ; output file (exit)