#!/bin/sh htmlfile="$1"quickref.html pdffile=quickref.pdf echo Generating the Mathomatic Quick Reference Sheet PDF file... echo "" >"$htmlfile" echo '' >>"$htmlfile" echo '
' >>"$htmlfile" echo '' >>"$htmlfile" ./mathomatic -e "set html all" "help all main equations constants >>$htmlfile" || (rm "$htmlfile"; exit 1) echo >>"$htmlfile" echo 'For more information, visit www.mathomatic.org' >>"$htmlfile" echo '' >>"$htmlfile" echo '' >>"$htmlfile" echo '' >>"$htmlfile" if htmldoc --webpage --format pdf --linkstyle plain --no-links -f "$pdffile" "$htmlfile" then echo "$pdffile" successfully created. rm "$htmlfile" exit 0 else rm "$htmlfile" exit 1 fi