Start of work to adapt indexgen for HTMLBook