fix footnote numbering so only used footnotes are presented in epub output