Hello,

Matt Huszagh <huszaghm...@gmail.com> writes:

> I'm submitting this as a patch. I've used it on hundreds of latex
> fragments over the past week or so and haven't experienced any issues
> (which is expected since the change is small).
>
> From a699b699ed4132839c39f1152868bb13364422c7 Mon Sep 17 00:00:00 2001
> From: Matt Huszagh <huszaghm...@gmail.com>
> Date: Sat, 14 Dec 2019 19:54:41 -0800
> Subject: [PATCH] org-element.el: allow environment blocks in math delimiters
>
> * lisp/org-element.el (org-element--latex-begin-environment): Add a
> non-capturing block for `\(' or `$' so that previously recognized
> latex environments can also appear within an inline math environment.
>
> * lisp/org-element.el (org-element--latex-end-environment): Match the
> begin environment noncapturing block with `$' or `\)'.

I don't think this patch is a good idea, as it mixes elements from
different types: LaTeX fragment (inline), and LaTeX environment (block).
For example, the regexp you modify is used as a paragraph separator,
which doesn't make sense for inline LaTeX.

As a reminder, Org does not claim to support raw LaTeX syntax besides
very simple constructs. If you want to insert elaborate LaTeX code, you
can always use:

    #+begin_export latex
    ...
    #+end_export

Regards,

-- 
Nicolas Goaziou

Reply via email to