From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rainer M Krug Subject: Re: Re: [PATCH] org-latex: Don't append newline to end of footnote Date: Wed, 30 Mar 2011 09:49:19 +0200 Message-ID: <4D92E07F.3030107@gmail.com> References: <4D91DA12.1070707@gmail.com> <87d3l9kesc.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Return-path: Received: from [140.186.70.92] (port=36104 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q4q9e-00039W-P5 for emacs-orgmode@gnu.org; Wed, 30 Mar 2011 03:49:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q4q9d-0004sK-2d for emacs-orgmode@gnu.org; Wed, 30 Mar 2011 03:49:26 -0400 Received: from mail-ww0-f49.google.com ([74.125.82.49]:50460) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q4q9c-0004sD-Tf for emacs-orgmode@gnu.org; Wed, 30 Mar 2011 03:49:25 -0400 Received: by wwb39 with SMTP id 39so1006325wwb.30 for ; Wed, 30 Mar 2011 00:49:23 -0700 (PDT) In-Reply-To: <87d3l9kesc.fsf@gmail.com> 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: Lawrence Mitchell , emacs-orgmode@gnu.org -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 29/03/11 19:38, Nicolas wrote: > Hello, > > Lawrence Mitchell writes: > >> * lisp/org-latex.el (org-export-latex-preprocess): Don't add a newline >> character to a processed footnote. >> >> The extra newline before the closing } character in a footnote >> confuses the list parsing code. The } appears at the beginning of a >> line, so it looks like the end of the list. LaTeX gobbles the space >> anyway, so don't add it. >> --- >>> Hi >> >>> if I export the fiollowing snippet >> >>> * Project Participants >>> - Rainer M Krug :: [fn::My email] >>> My address >> >> The list is closed incorrectly. This appears to be a problem in >> the interaction between the list parsing and footnote processing >> code. When exporting footnotes, we add a newline at the end, so >> in the above example the intermediate file seen by the list >> processing code is: >> >> | * Project Participants >> | - Rainer M Krug :: \footnote{My email >> | } >> | ORG-LIST-END-MARKER >> | My address >> >> The } at the beginning of the line below the list entry is >> considered to end the list, so we get: >> >> | * Project Participants >> | \begin{description} >> | \item[Rainer M Krug] \footnote{My email >> | \end{description} >> | } >> | ORG-LIST-END-MARKER >> | My address >> >> Note how the description list is ended /inside/ the footnote >> command. >> >> Since LaTeX gobbles the trailing space in the footnote anyway, it >> makes sense not to insert it in the first place, which this patch >> does. Your test case now exports correctly. > > The analysis is good, but unfortunately the patch has a flaw. > > In fact, your patch work in that particular situation, but not if > a footnote definition ends with a list, nor if it ends with a link. To > solve the latter, you need to insert a white-space before the closing > bracket. To solve the former, I thought adding a newline instead of the > white-space was enough, but it now appears it was a bad idea. > > Thus, the solution lies elsewhere. May I just add to my initial report, that it worked on the 22 February this year? So the problem has creeped in in an update in between. Rainer > > Regards, > - -- Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Natural Sciences Building Office Suite 2039 Stellenbosch University Main Campus, Merriman Avenue Stellenbosch South Africa Tel: +33 - (0)9 53 10 27 44 Cell: +27 - (0)8 39 47 90 42 Fax (SA): +27 - (0)8 65 16 27 82 Fax (D) : +49 - (0)3 21 21 25 22 44 Fax (FR): +33 - (0)9 58 10 27 44 email: Rainer@krugs.de Skype: RMkrug -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk2S4H8ACgkQoYgNqgF2egoE+ACdF/oUaZxPhTnuB3eBEM4dHSwH y9MAn3h6xNQ886Olc33QKgkMkBntxKW1 =Nu2m -----END PGP SIGNATURE-----