emacs-orgmode
[Top][All Lists]
Advanced

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

Re: The less ambiguous math delimiters in tables


From: Rudolf Adamkovič
Subject: Re: The less ambiguous math delimiters in tables
Date: Thu, 26 Dec 2024 14:31:48 +0100

Ihor Radchenko <yantar92@posteo.net> writes:

> Maybe, but it is also much more complex in terms of parser.
> Backtracking will introduce non-linear complexity to the parser,
> degrading the performance significantly.

Is that so?  I thought it is all about simple precedence rules.  In this
case, once the parser finds the opening \(, it interprets everything as
LaTeX, until it finds the closing \).

> It will also make Org syntax much, much harder in more complex cases -
> there will still be ambiguities when you have more than 2
> interpretations: e.g.
>
>  | \(|x|\) | \(|x|\) |
>
> this one has 3 possibilities:
>
> 1. <cell> \(</cell><cell>x...
> 2. <cell> <latex>|x|\) | \(|x|</latex> </cell>
> 3. <cell> <latex>|x|</latex> </cell><cell> <latex>|x|</latex> </cell>

Again, if \(...\) has a higher precedence than the table |, then this is
not a problem.  There is no ambiguity, right?

> We cannot change it at this point without breaking all the historical
> documents + third-party parsers. That's why I am talking about
> providing markup extension to address the issue rather than altering
> the existing parser fundamentals.

It would only break the documents that have one-sided \( or \) in the
cells of the same column, no?  And that is ... virtually never?

Rudy
-- 
"I do not fear death.  I had been dead for billions and billions of years
before I was born, and had not suffered the slightest inconvenience from it."
--- Mark Twain, paraphrased

Rudolf Adamkovič <rudolf@adamkovic.org> [he/him]
http://adamkovic.org



reply via email to

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