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: Mon, 30 Dec 2024 22:25:25 +0100

Max Nikulin <manikulin@gmail.com> writes:

> E.g. pandoc uses another approach:
>
> printf '%s\n' '| \(|x|\) | \(|x|\) |' | pandoc -f org -t latex
> \begin{longtable}[]{@{}ll@{}}
> \toprule
> \endhead
> \(|x|\) & \(|x|\) \\
> \bottomrule
> \end{longtable}
>
> Likely you would be unhappy if some of you document were exported in a 
> different way due to change of parsing rules. On the other hand, I do 
> not have a collection of pitfalls for pandoc.

That Pandoc output looks correct to me.  Is there a gotcha I do not see?
If not, then that is exactly what I would expect from the Org parser.

> An extensive test suite is necessary to consider alternatives for 
> parsing rules.

Yes, that much is given.  Without an extensive test suite, working on a
parser would be nothing but a waste of time, and the end result would
be, at least for us humans, an infinite stream of bugs.

> Current logic may be roughly describes as the following. When Org 
> recognizes start of some element, it tries to find its end, mostly 
> neglecting opening markers. A fragment is parsed for nested elements 
> *after* boundaries of the parent element are determined.

Honestly?  That sounds like a wrong approach to parsing.  (And if that
is the case, then that could explain why I keep fighting the Org parser
on a daily basis, compared to practically never in every other language
I use.)

Rudy
-- 
"We shall not cease from exploration
 And the end of all our exploring
 Will be to arrive where we started
 And know the place for the first time"
--- T. S. Eliot, Little Gidding, Four Quarters, 1943

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



reply via email to

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