#!/bin/sh
#
# Create HTML and PDF output with toc
# Two arguments: First is PREVIOUS chapter number
#                Second is Markdown source with no extension
# H. Conrad Cunningham
# Revised: 2017-02-02
#
pandoc --latexmathml --self-contained --number-sections --number-offset=$1 --toc --toc-depth=4      -o $2.html $2.md
pandoc --self-contained --number-sections  -H nonumber.latex --number-offset=$1 --toc --toc-depth=4 -o $2.tex  $2.md 
pdflatex $2.tex
pdflatex $2.tex
rm $2.aux $2.log $2.out $2.toc
