With the "* Footnotes" heading as last line in the buffer, footnote
insertion did not position new definitions correctly. This commit
fixes the problem.
Reported by Matt Lundin.
Sorting footnotes used to be almost like normalization, in that all
footnotes would be collected into a single location. Now sorting
respects the setting of `org-footnote-section'. If that is nil,
sorting will actually move each footnote into the outline node of its
first reference.
This commit add a new face for footnote labels, and activates footnote
labels for mouse clicks and for `C-c C-o', to jump to the
corresponding reference or definition.
This patch implements fully automatic creation of unique labels for
footnotes, which is also turned on as the default setting. The
automatic labels look like [fn:1], [fn:2], etc, using the first
available unused number.
The commit introduces a new variable, `org-footnote-auto-label' with a
number of different options ranging from no auto creation (prompting
the user for a label) to fully automatic creation.
Also, the commit introduces new #+STARTUP options that can be used to
select these settings on a per-file basis.
There was a bug with documents with more than one anonymous footnotes,
which would all end up to reference the first one only. The patch
fixes this problem.
Setting org-footnote-section to nil now causes definitions to be
inserted at the end of the current outline node, instead of into a
special node names "Footnotes".