Who invented the footnote? From marginal glosses to Gibbon

How the footnote grew from medieval glosses through Bayle, Gibbon and Ranke, which stories cannot be confirmed, and what notes do in each style now.