intelligent positioning of footnotes