[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Issues with nested begin..end blocks in inline math environments
From: |
Nicolas Goaziou |
Subject: |
Re: Issues with nested begin..end blocks in inline math environments |
Date: |
Sun, 15 Dec 2019 09:58:57 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) |
Hello,
Matt Huszagh <address@hidden> 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 <address@hidden>
> 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