This compiles with two small validation errors.  There are some
problems with underscores in places where I'm not expecting them.  For
filenames and references, I've replaced them by hyphens.  But maths in
footnotes needs dealing with.  There are also some environments that
I've "commented out" for the time being: tabu, multicols, pdiag.
These need implementing.