From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christian Moe Subject: Re: [dev] footnotes improvements Date: Thu, 12 May 2011 09:19:22 +0200 Message-ID: <4DCB89FA.9080500@christianmoe.com> References: <871v05f4ca.fsf@gmail.com> Reply-To: mail@christianmoe.com Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([140.186.70.92]:40161) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QKQ5C-00072q-4J for emacs-orgmode@gnu.org; Thu, 12 May 2011 03:13:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QKQ5B-00026X-07 for emacs-orgmode@gnu.org; Thu, 12 May 2011 03:13:14 -0400 Received: from mars.hitrost.net ([91.185.211.18]:24847) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QKQ5A-00022x-Mf for emacs-orgmode@gnu.org; Thu, 12 May 2011 03:13:12 -0400 Received: from lk.92.63.17.213.dc.cable.static.lj-kabel.net ([92.63.17.213] helo=Celebrian-2.local) by mars.hitrost.net with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.75) (envelope-from ) id 1QKQ4b-0002SN-Jt for emacs-orgmode@gnu.org; Thu, 12 May 2011 09:12:37 +0200 In-Reply-To: <871v05f4ca.fsf@gmail.com> 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-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Org Mode List Hi, Nice! Tested only your snippet. * HTML: works! One question: As is, adjoining footnotes `2' and `3' read as `23'. Could/should the footnote export know to put a comma between them:`2,3'? For HTML purposes, I think not necessarily, the separator could be flexibly added with CSS like: : #+style: * Latex: backtrace: Debugger entered--Lisp error: (void-variable footnote-section-tag-regexp) org-export-latex-preprocess((:for-backend latex :emph-multiline t :add-text nil :comments nil :skip-before-1st-heading nil :LaTeX-fragments nil :timestamps t :footnotes t)) org-export-preprocess-string(#("#+title: Footnotes test\n\nSome text before first headline[fn:1].\n\n" 0 8 (fontified nil font-lock-fontified t) 8 9 (fontified nil) 9 23 (fontified nil font-lock-fontified t) 23 56 (fontified nil) 56 57 (fontified nil) 57 61 (fontified nil help-echo "Footnote reference") 61 62 (fontified nil) 62 65 (fontified nil)) :for-backend latex :emph-multiline t :add-text nil :comments nil :skip-before-1st-heading nil :LaTeX-fragments nil :timestamps t :footnotes t) org-export-latex-first-lines((:latex-image-options "width=10em" :exclude-tags ("noexport") :select-tags ("export") :publishing-directory nil :timestamp nil :expand-quoted-html t :html-table-tag "" :xml-declaration (("html" . "") ("php" . "\"; ?>")) :html-postamble auto :html-preamble t :html-extension "html" :inline-images maybe :convert-org-links t :agenda-style "" :style-extra "" :style "" :style-include-scripts t :style-include-default t :table-auto-headline t :tables t :time-stamp-file t :creator-info t :email-info nil :author-info t :email "CM@Celebrian-2.local" ...) nil nil) org-export-as-latex(nil) call-interactively(org-export-as-latex) org-export(nil) call-interactively(org-export nil nil) Yours, Christian On 5/11/11 9:02 PM, Nicolas Goaziou wrote: > Hello, > > I'd like to submit a branch for testing: > > git://github.com/ngz/org-mode-lists.git footnote-fix > > Here are the changes so far: > > - recognize and export inlined footnotes holding links in their definition, > - recognize and export two or more footnotes in a row, > - don't chock at footnotes or partial footnotes inside comments in Org buffer, > - export calls to already defined footnotes in LaTeX, > - export footnotes before first heading (LaTeX), > - export footnotes when selecting a subtree not holding their > definition (LaTeX), > - fontify more consistently footnotes in the org buffer (only labels > are "fontified" or fn in the case of an anonymous footnote). > > The following snippet demonstrates most of these changes: > > ---------------------------------------------------------------------- > #+title: Footnotes test > > Some text before first headline[fn:1]. > > * First headline > > # [fn::fake footnote > > Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do > eiusmod tempor incididunt ut labore et dolore magna > aliqua[fn::inline1][1]. > > * Second headline > > Duis aute irure dolor in reprehenderit in voluptate velit esse > cillum dolore eu fugiat nulla pariatur[fn:inlabel:an inline > footnote][fn:inlabel2:[[http://www.google.com][google]] this]. > > Call an already defined inline footnote[fn:inlabel]. > > * Footnotes > > [fn:1] first footnote. > > [1] End of first section. > ------------------------------------------------------------------------ > > There are probably mischievous bugs. So, thanks in advance for any > feedback. > > Regards, >