emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nicolas Goaziou <mail@nicolasgoaziou.fr>
To: Arun Isaac <arunisaac@systemreboot.net>
Cc: "emacs-orgmode@gnu.org" <emacs-orgmode@gnu.org>
Subject: Re: Footnotes in image captions
Date: Sun, 28 Aug 2016 15:07:40 +0200	[thread overview]
Message-ID: <8737lpvy77.fsf@saiph.selenimh> (raw)
In-Reply-To: <cu71t1b8k45.fsf@systemreboot.net> (Arun Isaac's message of "Fri, 26 Aug 2016 23:53:38 +0530")

Hello,

Arun Isaac <arunisaac@systemreboot.net> writes:

> In my use case, I can guarantee that all captions will be exported. So,
> could footnotes in captions be implemented as an optional feature that
> the user can enable by setting some variable?

That's not an option, because this is forbidden at the syntax level,
i.e., "thou shall not use footnotes in keywords", and I don't want Org
_format_ to be customizable.

> Or will that be too much trouble?

The "keywords" location in the restriction above is rather large as it
contains both regular keywords (e.g., TITLE) and captions.

Adding footnotes in regular keywords is really too much trouble at this
point. During export, what keywords are parsed changes according to the
export back-end used. Besides some keywords can also be defined as
properties, which means you need to allow footnote references in node
properties.

Adding footnotes to captions only /may/ be painful too. Some back-ends
ignore captions, or ignore captions associated to a certain type of
element (e.g., a paragraph). In these cases, footnotes export is mostly
broken, because it cannot properly number them.

Another difficult situation I can think of is tables. If you use
a caption in both a table and its caption, the reference order depends
on some other variable, e.g., `org-html-table-caption-above', so, again,
the footnotes handling is going to be broken in a non-trivial way in
some cases.

There are also special cases, even when Org does not handle footnotes
itself. Under `latex' back-end, using "listings" package, caption is
defined as a parameter of the "\lstset" command, e.g.,

  \lstset{language=Lisp,label= ,caption={Foo}, ...}

I don't know if additional footnotes commands are supported in such
a parameter.

In a nutshell, I'm sure that it will work in your use case, and I can
even perceive the interest in having footnotes within captions. However,
handling all the implied corner cases is going to be some tedious work,
if doable at all. We might try, nonetheless, to introduce footnotes in
captions as an experimental feature, but not before 9.0 release, and not
without some developer support to handle the issues that would arise (as
a reminder I'm an expert neither in LaTeX nor in HTML).

WDYT?


Regards,

-- 
Nicolas Goaziou

  reply	other threads:[~2016-08-28 13:07 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-25 15:08 Footnotes in image captions Arun Isaac
2016-08-26 14:37 ` Nicolas Goaziou
2016-08-26 18:23   ` Arun Isaac
2016-08-28 13:07     ` Nicolas Goaziou [this message]
2016-08-28 15:42       ` Arun Isaac

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

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8737lpvy77.fsf@saiph.selenimh \
    --to=mail@nicolasgoaziou.fr \
    --cc=arunisaac@systemreboot.net \
    --cc=emacs-orgmode@gnu.org \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).