From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: Footnotes and org-export, revisited Date: Wed, 17 Dec 2008 14:31:26 +0100 Message-ID: <5171E67B-8472-409A-A0EE-7EA25D18D58B@uva.nl> References: Mime-Version: 1.0 (Apple Message framework v929.2) Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LCwUv-0004Ma-Qb for emacs-orgmode@gnu.org; Wed, 17 Dec 2008 08:31:33 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LCwUt-0004L3-JR for emacs-orgmode@gnu.org; Wed, 17 Dec 2008 08:31:33 -0500 Received: from [199.232.76.173] (port=50988 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LCwUt-0004Kp-1h for emacs-orgmode@gnu.org; Wed, 17 Dec 2008 08:31:31 -0500 Received: from ug-out-1314.google.com ([66.249.92.172]:64804) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LCwUs-0003uy-H0 for emacs-orgmode@gnu.org; Wed, 17 Dec 2008 08:31:30 -0500 Received: by ug-out-1314.google.com with SMTP id 36so419295uga.17 for ; Wed, 17 Dec 2008 05:31:29 -0800 (PST) In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Scot Becker Cc: emacs-orgmode@gnu.org Hi Scot, thanks for your detailed and thoughtful post. On second consideration, I really like the proposal Matt made back then, and I even like more that there is already code to do this conversion. A quick look at Paul's code indicates that (add-hook 'org-export-preprocess-hook 'muse-build-list-of-footnotes) should be enough to get his code and footnote format working in Org-mode. The only inconsistency would currently be caused by trees that are marked archive or comment, because any footnotes defined in such trees would currently still be published as well. But that could be solved by a new hook called after these trees have been removed from the temporary buffer. If Paul agrees, and if he has signed the papers with the FSF, we can integrate his code into Org-mode. - Carsten On Dec 17, 2008, at 1:52 PM, Scot Becker wrote: > Dear all, > > I'm a new org user who recently ran across the video of Carsten's > Google talk. I have been looking for something like org for years, but > learning Emacs had always seemed too high a price, so I never really > considered Emacs-based options. However time is a teacher, and I see > now that there are plenty of other higher prices than learning Emacs, > which has anyway proved easier than I thought. Org-mode is really an > amazing piece of work, a highly original piece of software, and > possibly just what this vim user needs. When I think how much time I > spent other solutions, including vim's two (basically unmaintained and > functionally feeble) outline modes, I can only resign myself to the > mild shame. > > The following is in response to a brief thread posted to this list in > October by Matthew Lundin. He described the limitations of > footnotes.el, and suggested two possibilities for extending footnotes > support in org-mode. [1]. > > The problem with Steve L. Baur's (otherwise useful) footnotes mode is > that it cannot 'read' the contents of a loaded buffer. So in any > given editing session, footnote numbering always starts with 1, even > if you already had 1...10 in your file from a previous editing > session. This is simply a limitation of the mode in its current > state. I expect the package's scope was originally confined to using > footnotes in plain text emails, which are generally finished in one > shot. > > There have been some efforts to overcome this limitation by means of a > patch to footnote.el [2] and a new function, footnote-init.el [3] > which reads the contents of a newly loaded buffer so that the patched > footnote.el 'knows' about previously placed footnotes. These > particular patches may not have all the kinks worked out, however,[4] > and are not part of the current CVS of Emacs 23. > > But someone working in Muse did write an interesting extension to > Muse's footnote support. (The extension is explained here [5], and the > revised version of the code is here [6]). It is basically a hook > function which converts footnotes with reference names[fn:named_note] > to plain, numbered footnotes, like Muse and org-mode support. It > operates on a temporary buffer just before export to LaTeX or HTML, > so is transparent to the user. > > I too would like to make use of org-mode to do more extensive > footnoting than the current footnote.el easily allows. I'm not sure > of the best solution. Here are the alternatives I can think of: > > 1. Help Baur's footnotes.el get to the point where it has no trouble > with multiple editing sessions and managing the numbering of any > arbitrary quantity of footnotes. This is possible in theory. But I > suspect that footnotes associated with body text by simple Arabic > numerals are pretty easy to mangle in a simple text system that lets > you do arbitrary things with the text. Comments? > > 2. Adapt the Muse code mentioned above for use with org-mode. This > would keep org-mode's current footnote support unchanged, but allow > named footnotes while writing. Carsten suggested something like this > in his response to Matthew. > > 3. Add named footnote support to org-mode according to Matthew's > second suggestion (similar to footnote functionality in Pandoc, > Multi-Markdown or ReST). This could optionally include a function for > the auto-generation of short (?) unique-ish IDs to use instead of > names (in a long document, giving named references to dozens of > similar footnotes could itself be a source of confusion). > > 4. Forget org-mode for anything with any quantity of footnotes. This > is Carsten's other suggestion in response to Matthew. It's possible > that the practicalities of footnote handling would prove too costly to > get right. He knows this much better than I. (though I'm not sure > that they impair org's plan-text readability as Carsten suggests. > > 5. A final solution (which might also gain other advantages) could be > to begin to facilitate an org-export mode to Pandoc's native > plain-text syntax (an extension of Markdown).[7] Pandoc is a robust > Haskell engine to convert between plain text formats. This would add > a step to org-mode export, but that one step could potentially allow > conversion into the wide range of formats that Pandoc supports > (markdown, reStructuredText, HTML, LaTeX, ConTeXt, RTF, DocBook XML, > OpenDocument XML, ODT, GNU Texinfo, MediaWiki markup, groff man pages, > and S5 HTML slide shows). Pandoc's syntax model already has a lot in > common with org's. (Both allow LaTeX pass-through, for example). I > don't know if such an export would meet the effort vs. value trade > off, but I suggest it might. > > Comments? (by anyone who summoned the patience to read all of that... > sorry for the length. I couldn't manage less). > > Scot B. > > Footnotes: > [1] http://thread.gmane.org/gmane.emacs.orgmode/8373 > [2] http://groups.google.com/group/gnu.emacs.sources/browse_thread/thread/49c826201105d1e9/7c3ea8323041f91c?lnk=gst&q=footnote#7c3ea8323041f91c > [3] http://groups.google.com/group/gnu.emacs.sources/browse_thread/thread/e809fa5d396a7aa2/1d001b35388725b4?lnk=gst&q=footnote#1d001b35388725b4 > [4] http://osdir.com/ml/emacs.muse.general/2007-11/msg00012.html > [5] https://mail.gna.org/public/muse-el-discuss/2007-11/msg00027.html > [6] https://mail.gna.org/public/muse-el-discuss/2007-11/msg00033.html > [namednote] Like this. > [7] http://johnmacfarlane.net/pandoc/ > > > _______________________________________________ > Emacs-orgmode mailing list > Remember: use `Reply All' to send replies to the list. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode