3 template=intermediate.tmpl
4 uuidfile="${1%.intermediate}.uuid"
5 redo-ifchange "$uuidfile"
6 redo-ifchange "$template"
7 mdfile="${1%.intermediate}.md"
8 rstfile="${1%.intermediate}.rst"
9 if [ -f "$rstfile" ]; then
10 redo-ifchange "$rstfile"
11 pandoc -f rst --template="$template" --mathml -t html5 "$rstfile" > "$3"
12 elif [ -f "$mdfile" ]; then
13 redo-ifchange "$mdfile"
14 pandoc -f markdown --template="$template" --mathml -t html5 "$mdfile" > "$3"