all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [BUG] org-format-latex not respecting org-format-latex-options :matchers
@ 2024-02-03 20:43 Jacob Fong
  2024-02-03 21:56 ` Ihor Radchenko
  0 siblings, 1 reply; 2+ messages in thread
From: Jacob Fong @ 2024-02-03 20:43 UTC (permalink / raw)
  To: emacs-orgmode

Hey everyone,

It appears that the math-matching regexes are hard-coded in
`org-format-latex`, as seen in this line:

```
(let* ((math-regexp "\\$\\|\\\\[([]\\|^[ \t]*\\\\begin{[A-Za-z0-9*]+}")
```

As a result of this, :matchers does not work as documented, for
example with `org-latex-preview`. This is confirmed in some places
(https://emacs.stackexchange.com/questions/78093/removing-certain-latex-preview-matchers-from-org-mode).

Is there any way this can be fixed to accord with the
org-format-latex-options documentation?

Thank you,
Jacob

-- 
jacobcfong@gmail.com


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [BUG] org-format-latex not respecting org-format-latex-options :matchers
  2024-02-03 20:43 [BUG] org-format-latex not respecting org-format-latex-options :matchers Jacob Fong
@ 2024-02-03 21:56 ` Ihor Radchenko
  0 siblings, 0 replies; 2+ messages in thread
From: Ihor Radchenko @ 2024-02-03 21:56 UTC (permalink / raw)
  To: Jacob Fong, Timothy, Karthik Chikmagalur; +Cc: emacs-orgmode

[ CCing Timothy and Karthic ]

Jacob Fong <jacobcfong@gmail.com> writes:

> It appears that the math-matching regexes are hard-coded in
> `org-format-latex`, as seen in this line:
>
> ```
> (let* ((math-regexp "\\$\\|\\\\[([]\\|^[ \t]*\\\\begin{[A-Za-z0-9*]+}")
> ```
>
> As a result of this, :matchers does not work as documented, for
> example with `org-latex-preview`. This is confirmed in some places
> (https://emacs.stackexchange.com/questions/78093/removing-certain-latex-preview-matchers-from-org-mode).
>
> Is there any way this can be fixed to accord with the
> org-format-latex-options documentation?

Confirmed.
But we are soon to commit major changes to latex preview system.
I believe that this issue will be addressed.
See https://list.orgmode.org/orgmode/87lek2up0w.fsf@tec.tecosaur.net/

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-02-03 21:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-03 20:43 [BUG] org-format-latex not respecting org-format-latex-options :matchers Jacob Fong
2024-02-03 21:56 ` Ihor Radchenko

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.