Merge ngz's footnote changes from master.