From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: Footnotes and org-export, revisited Date: Thu, 1 Jan 2009 10:07:59 +0100 Message-ID: <3051994A-5B12-4497-AB58-BAF9A70020D8@uva.nl> References: Mime-Version: 1.0 (Apple Message framework v929.2) Content-Type: multipart/mixed; boundary="===============0568513977==" Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LIJXB-0005Kk-IE for emacs-orgmode@gnu.org; Thu, 01 Jan 2009 04:08:05 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LIJX9-0005KX-T4 for emacs-orgmode@gnu.org; Thu, 01 Jan 2009 04:08:04 -0500 Received: from [199.232.76.173] (port=33319 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LIJX9-0005KU-Kv for emacs-orgmode@gnu.org; Thu, 01 Jan 2009 04:08:03 -0500 Received: from nf-out-0910.google.com ([64.233.182.190]:50468) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LIJX8-0006cs-VX for emacs-orgmode@gnu.org; Thu, 01 Jan 2009 04:08:03 -0500 Received: by nf-out-0910.google.com with SMTP id c7so872191nfi.26 for ; Thu, 01 Jan 2009 01:08:02 -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 --===============0568513977== Content-Type: multipart/alternative; boundary=Apple-Mail-3--909390770 --Apple-Mail-3--909390770 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Hi, the result of this discussion about footnotes is now in the latest git version, see http://orgmode.org/Changes.html#sec-1.1.1 for more information. - 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 --Apple-Mail-3--909390770 Content-Type: text/html; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Hi,

the = result of this discussion about footnotes is now
in the latest = git version, see


for more = information.

- = 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.gm= ane.org/gmane.emacs.orgmode/8373
[2] http://groups.google.com/group/gnu.emacs.sources/browse_thread/th= read/49c826201105d1e9/7c3ea8323041f91c?lnk=3Dgst&q=3Dfootnote#7c3ea832= 3041f91c
[3] http://groups.google.com/group/gnu.emacs.sources/browse_thread/th= read/e809fa5d396a7aa2/1d001b35388725b4?lnk=3Dgst&q=3Dfootnote#1d001b35= 388725b4
[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/pando= c/


_______________________________________________
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
= --Apple-Mail-3--909390770-- --===============0568513977== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ 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 --===============0568513977==--