#!/bin/sh # make_book - create a PDF book of the prover9 manual. # by David A. Wheeler. # Must place in, and run, in the directory with the prover9 HTML files. # Depends on having htmldoc # and perl installed, and the associated file "setup_book.pl" must # also be installed in the same directory. # Generates "finalbook.pdf". # Create subdirectory, so we can change the HTML we generate, and go there. rm -fr tempdir mkdir tempdir cp -p *.html *.gif setup_book.pl tempdir cd tempdir # First, clean up HTML errors in the HTML manual. # General - character quoting errors. perl -p -i -e 's/&([^#A-Za-z0-9&])/&\1/g;' *.html perl -p -i -e 's/&&/&&/g;' *.html perl -p -i -e 's/<->/<->/g;' *.html perl -p -i -e 's/<-/<-/g;' *.html perl -p -i -e 's/([^-])->/\1->/g;' *.html perl -p -i -e 's/([^-])->/\1->/g;' *.html perl -p -i -e 's/"<"/"<"/g;' *.html perl -p -i -e 's/"<="/"<="/g;' *.html perl -p -i -e 's/">"/">"/g;' *.html perl -p -i -e 's/">="/">="/g;' *.html perl -p -i -e 's/ < / < /g;' *.html perl -p -i -e 's/ > / > /g;' *.html perl -p -i -e 's/<=/<=/g;' *.html # Don't do: perl -p -i -e 's/>=/>=/g;' *.html # In others.html, fix