does a footnote come before or after punctuation
Footnote references should be placed outside punctuation, but inside the closing parenthesis when referring to matter within parentheses. A lot depends on what style manual you follow.