From: Nicolas Goaziou <mail@nicolasgoaziou.fr>
To: Matt Huszagh <huszaghmatt@gmail.com>
Cc: "emacs-orgmode@gnu.org" <emacs-orgmode@gnu.org>,
"Fraga, Eric" <e.fraga@ucl.ac.uk>
Subject: Re: Issues with nested begin..end blocks in inline math environments
Date: Sun, 15 Dec 2019 09:58:57 +0100 [thread overview]
Message-ID: <87blsaarse.fsf@nicolasgoaziou.fr> (raw)
In-Reply-To: <87sglmw820.fsf@gmail.com> (Matt Huszagh's message of "Sat, 14 Dec 2019 20:01:59 -0800")
Hello,
Matt Huszagh <huszaghmatt@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 <huszaghmatt@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
next prev parent reply other threads:[~2019-12-15 8:59 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-06 19:42 Issues with nested begin..end blocks in inline math environments Matt Huszagh
2019-12-07 11:30 ` Fraga, Eric
2019-12-07 19:28 ` Matt Huszagh
2019-12-08 7:04 ` Matt Huszagh
2019-12-15 4:01 ` Matt Huszagh
2019-12-15 8:58 ` Nicolas Goaziou [this message]
2019-12-16 8:25 ` Matt Huszagh
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87blsaarse.fsf@nicolasgoaziou.fr \
--to=mail@nicolasgoaziou.fr \
--cc=e.fraga@ucl.ac.uk \
--cc=emacs-orgmode@gnu.org \
--cc=huszaghmatt@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).