These are the modifications to the macros.tex file to make it run with
my epub class.

The majority of the changes are in redefinitions towards the end, some
of these need reviewing for how to make them better reflect what
should be in the eventual output.