more direct use of latex tools: avoid diversion into "isabelle latex -o pdf" and its confusion of ISABELLE_PDFLATEX vs. ISABELLE_LUALATEX;
clarified ISABELLE_MAKEINDEX options;
#!/usr/bin/env bash
set -e
$ISABELLE_LUALATEX root
if [ -f root.bib ]
then
$ISABELLE_BIBTEX root
$ISABELLE_LUALATEX root
fi
$ISABELLE_LUALATEX root
if [ -f root.idx ]
then
"$ISABELLE_HOME/src/Doc/sedindex" root
$ISABELLE_LUALATEX root
fi