[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [BUG] No space after footnote with org-export-with-footnotes set to

From: Max Nikulin
Subject: Re: [BUG] No space after footnote with org-export-with-footnotes set to nil [9.6.1 ( @ /Users/test/.emacs.d/elpa/28.0/develop/org-9.6.1/)]
Date: Mon, 13 Mar 2023 22:17:56 +0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.7.1

On 11/03/2023 17:38, Ihor Radchenko wrote:

Newlines are tricky. They may or may not be significant.
For example, in CJK paragraphs, newlines are to be stripped.

I think that a reasonable thing to do could be not adding newlines if
the previous object is a plain string ending with a newline.

It is in agreement with my expectation that the fix should not be LaTeX-specific. That is why I raised the issue in this thread.

This is latex-specific.
See the attached tentative fix.

Reported-by: Max Nikulin <manikulin@gmail.com>
Link: https://orgmode.org/list/tufdb6$11h2$1@ciao.gmane.io

and Max Nikulin to emacs-orgmode. Re: Comments break up a paragraph when writing one-setence-per-line. Sun, 3 Oct 2021 18:34:10 +0700. https://list.orgmode.org/sjc4fk$76r$1@ciao.gmane.io

+  (replace-regexp-in-string
+   (rx (1+ (0+ space) "\n")) "\n"
+   contents))

What I do not like with this regexp is that it matches every newline character, not only blank lines:

 (rx (1+ (0+ space) "\n")) "[n]"
 "a   \nb")

If you still believe that a fix should be for LaTeX only then I would consider extra "\n": (rx "\n" (1+ (0+ space) "\n"))

I have realized that the following is a kind of pitfall in Org syntax:

#+macro: comment
{{{comment(Paragraph separator! Do you expect it?)}}}

reply via email to

[Prev in Thread] Current Thread [Next in Thread]