emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Rainer M Krug <r.m.krug@gmail.com>
To: Lawrence Mitchell <wence@gmx.li>, emacs-orgmode@gnu.org
Subject: Re: Re: [PATCH] org-latex: Don't append newline to end of footnote
Date: Wed, 30 Mar 2011 09:49:19 +0200	[thread overview]
Message-ID: <4D92E07F.3030107@gmail.com> (raw)
In-Reply-To: <87d3l9kesc.fsf@gmail.com>

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 29/03/11 19:38, Nicolas wrote:
> Hello,
> 
> Lawrence Mitchell <wence@gmx.li> 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-----

  reply	other threads:[~2011-03-30  7:49 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-29 13:09 [BUG] LaTeX export inserts "ORG-LIST-END-MARKER" Rainer M Krug
2011-03-29 14:20 ` [PATCH] org-latex: Don't append newline to end of footnote Lawrence Mitchell
2011-03-29 17:38   ` Nicolas
2011-03-30  7:49     ` Rainer M Krug [this message]
2011-03-30  9:14     ` Lawrence Mitchell
2011-03-30 14:46       ` Rainer M Krug
2011-03-30 22:06         ` Nicolas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4D92E07F.3030107@gmail.com \
    --to=r.m.krug@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=wence@gmx.li \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).