emacs-orgmode
[Top][All Lists]
Advanced

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

[PATCH] Intra-word markup: \relax


From: Max Nikulin
Subject: [PATCH] Intra-word markup: \relax
Date: Fri, 28 Jan 2022 19:12:51 +0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0

On 02/12/2021 17:50, Denis Maier wrote:

Currently, org syntax doesn't officially seem to support intra-word emphasis. Am I missing something? If the assessment is correct: Is there a reason for this? And, shouldn't that be officially added?

I have an idea how to implement *intra*/word/ markup with minimal change of Org syntax. At first I had a hope that it is enough to introduce \relax entity that expands to empty string, but it does not work for second part of words: *intra*\relax{}/word/ is exported to
    <b>intra</b>/word/.
So it is necessary to support consuming spaces after such entity similar to TeX commands:
    *intra*\relax /word/
In Org "a\_      b" already behaves in the same way.

I do not like zero-width spaces since they are invisible, so they are not really "text" markup. Moreover, it is better to filter them out during export.

Another failed idea was to use export snippet or a macro for such purpose:
    #+macro sep $1
    *intra*{{{sep()}}}/word/, *intra*@@html:@@/word/

Important point that suggested solution works for all export backends. I do not consider explicit export snippets as a workaround since it requires code for all backends in org files.

Attachment: 0001-Intra-word-markup-relax.patch
Description: Text Data


reply via email to

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