resolves #676 substitute anchor and xref macros in footnotes