[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Footnote attributes

From: Nicolas Goaziou
Subject: Re: [O] Footnote attributes
Date: Sat, 16 Jan 2016 15:03:59 +0100


Thomas S. Dye <address@hidden> writes:

> I'm trying to hijack Org footnotes to export \sidenotes with an
> optional offset parameter to LaTeX.  I can't figure out how to specify
> and access the offset parameter for a footnote.
> I have an attr_latex line in front of the footnote-definition and
> footnote-reference, but I can't figure out how to retrieve it.  Is this
> possible?  If so, how?
> I have this, but offset is always the empty string:
> (let* ((def (org-export-get-footnote-definition footnote-reference info))
>              (attr (org-export-read-attribute :attr_latex footnote-reference))
>              (offs (plist-get attr :offset))
>              (offset (if offs (format "[%s]" offs) "")))

`org-export-get-footnote-definition' doesn't return a full footnote
definition objects, but only contents.  Attributes are lost.

You need to retrieve the definition within the parse tree, using
`org-element-map', then extract the information you need. See for
example `org-export-get-footnote-definition'.

Note that there is no guarantee that there is a matching definition in
the parse tree: the reference could as well be inline, or referencing an
inline footnote reference.


Nicolas Goaziou

reply via email to

[Prev in Thread] Current Thread [Next in Thread]