3 # this utility is called from Makefile:
5 # to prepare the file for PDF conversion, byt replaceing all <span class="function"></span>
6 # with <font color="#DD0000"></font> in the syntax statements and replacing → (one line
7 # arrow with ⇒ (double line arrow)
9 # USAGE: preparepdf newlisp_manual.html newlisp_manual_preparepdf.html
11 (set 'text (read-file (main-args 2))) ; input file
13 (replace {(<h2><span class="function">)(.*?)(</span></h2>)} text
14 (append {<h2><font color="#DD0000">} $2 {</font></h2>}) 0)
16 (println $0 " replacements made for syntax color")
18 (replace {→} text {⇒} 0)
20 (println $0 " replacements made for arrow code")
22 (write-file (main-args 3) text) ; output file