From: Thomas S. Dye <tsd@tsdye.com>
To: Nicolas Goaziou <mail@nicolasgoaziou.fr>
Cc: emacs-orgmode <emacs-orgmode@gnu.org>
Subject: Re: Footnote attributes
Date: Mon, 18 Jan 2016 17:45:10 -1000 [thread overview]
Message-ID: <m2fuxuqlkp.fsf@tsdye.com> (raw)
In-Reply-To: <87bn8lsjsg.fsf@nicolasgoaziou.fr>
Aloha Nicolas,
Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:
> Hello,
>
> Thomas S. Dye <tsd@tsdye.com> 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.
Thanks. That worked easily.
All the best,
Tom
--
Thomas S. Dye
http://www.tsdye.com
next prev parent reply other threads:[~2016-01-19 3:45 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-15 14:52 Footnote attributes Thomas S. Dye
2016-01-16 14:03 ` Nicolas Goaziou
2016-01-19 3:45 ` Thomas S. Dye [this message]
-- strict thread matches above, loose matches on Subject: below --
2016-01-14 1:20 Thomas S. Dye
2016-01-14 8:42 ` Nicolas Goaziou
2016-01-14 17:09 ` Thomas S. Dye
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m2fuxuqlkp.fsf@tsdye.com \
--to=tsd@tsdye.com \
--cc=emacs-orgmode@gnu.org \
--cc=mail@nicolasgoaziou.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.