Hello, Arun Isaac <arunis...@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