From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: Footnotes in image captions Date: Sun, 28 Aug 2016 15:07:40 +0200 Message-ID: <8737lpvy77.fsf@saiph.selenimh> References: <874m67zjdr.fsf@saiph.selenimh> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:60660) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bdzoQ-0001ws-G5 for emacs-orgmode@gnu.org; Sun, 28 Aug 2016 09:07:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bdzoM-00011R-5N for emacs-orgmode@gnu.org; Sun, 28 Aug 2016 09:07:45 -0400 Received: from relay3-d.mail.gandi.net ([217.70.183.195]:55459) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bdzoL-00011N-UI for emacs-orgmode@gnu.org; Sun, 28 Aug 2016 09:07:42 -0400 In-Reply-To: (Arun Isaac's message of "Fri, 26 Aug 2016 23:53:38 +0530") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: Arun Isaac Cc: "emacs-orgmode@gnu.org" Hello, Arun Isaac 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