emacs-orgmode
[Top][All Lists]

Re: [O] Bug: When exporting to PDF an Org file where multiple footnotes

 From: Rasmus Subject: Re: [O] Bug: When exporting to PDF an Org file where multiple footnotes share the same definition, only the first footnote is clickable [8.3.4 (8.3.4-39-ge0acd8-elpaplus @ /home/jorge/.emacs.d/elpa/org-plus-contrib-20160418/)] Date: Mon, 25 Apr 2016 12:53:29 +0200 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux)

Nicolas Goaziou <address@hidden> writes:

> Hello,
>
>
>> Ultimately, I think a decent fix would be to add a prefix to
>> org-latex--label for targets pointing to footnotes.  They should be
>> prefixed with "fn:".  Then, it should be easy to hack together
>> a filter.
>
> OOC, isn't org-export-filter-footnote-reference-functions' enough as
> a filter?

Probably I’m lacking the adequate creativity.

I’ll sketch the problem as I see it.

Consider the filter FUN and the below file.

The transcoded version of the second "[fn:1]", say S2, will be passed to
our filter FUN, if FUN is added to
org-export-filter-footnote-reference-functions.  But S2 will only contain
the estimated number of the footnote﻿¹, e.g. "\footnotemark[1]{}".  In
particular, we haven’t got the potentially transcoded reference to the
footnote definition.  Without the reference, I don’t know how to add a

We could capture the transcoded version of the link "[[f1]]" in FUN, if
we’d only be served a generic reference, e.g. "\ref{org925ce52}".  I don’t
know how we’d then differentiate between a link to a footnote and to some
other type of element, e.g. a source block.  Hence, it becomes hard to
guess when to use e.g. \footref{.} instead of \ref{.}.

Rasmus

:PROPERTIES:
:CUSTOM_ID: h1
:END:
Line1.[fn:1] or [[f1]]

\pagebreak

Line2[fn:1] [[f1]]
* Footnotes
[fn:1] <<f1>> Footnote.

Footnotes:
﻿¹   It’s estimated because it’s not done on the latex side.  E.g. I can
get an incorrect number by adding this to the top of my file:
`