emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [PATCH] Add support for $…$ latex fragments followed by a dash


From: Max Nikulin
Subject: Re: [PATCH] Add support for $…$ latex fragments followed by a dash
Date: Sun, 30 Jan 2022 22:28:38 +0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0

On 28/01/2022 23:37, Timothy wrote:

There is no point to discuss deprecation of $…$ and ... while usage of
such constructs is not discouraged by the org manual

Isn’t the point of discussing depreciation now that we’d change the manual etc.
to discourage it? 😛

It is funny that nobody have checked what the manual actually states:

Text within the usual LaTeX math delimiters. To avoid conflicts with
currency specifications, single ‘$’ characters are only recognized as
math delimiters if the enclosed text contains at most two line breaks,
is directly attached to the ‘$’ characters with no whitespace in
between, and if the closing ‘$’ is followed by whitespace, punctuation
or a dash. For the other delimiters, there is no such restriction, so
     ^^^^^^
when in doubt, use ‘\(...\)’ as inline math delimiters.

I have no idea whether it ever worked in such way. So either the manual must be updated or a fix must be committed.

False positive with the proposed patch:

> Balance decreased from $10 to negative value ($-2 approximately)

certainly it is more rare than $n$-th valid case.

If we do deprecate support for $…$, it might also be a good idea to
see if we can add a utility function which would make it easier for
people to migrate existing documents to the new/alternative syntax. For
the same reason it is hard to reliably parse $…$ syntax, we probably
can’t automate that transition, but we should be able to reduce the effort
required to update existing documents.

Tim, as mentioned before I’m strongly in favour of a ~half decade transition
including utility functions to shift existing TeX constructs to LaTeX, and
adding warnings, well before dropping support.

That period should be started when manual is updated.

Functions updating old file to the current syntax is an interesting idea, but it assumes a copy of org-element as it was in that old org version.




reply via email to

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