[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] Latex single dollar math delimiter question
From: |
Nicolas Goaziou |
Subject: |
Re: [O] Latex single dollar math delimiter question |
Date: |
Mon, 05 Aug 2019 12:35:50 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux) |
Hello,
Jarmo Hurri <address@hidden> writes:
> Based on the manual I would have expected math delimiters. Referring
> again to the manual: "single ‘$’ characters are only recognized as math
> delimiters if the enclosed text contains at most two line breaks, is
> directly attached to the ‘$’ characters with no whitespace in between,
> and if the closing ‘$’ is followed by whitespace, punctuation or a
> dash."
>
> Since the equation in my example contains no line breaks, is directly
> attached with no whitespace in between the equation and the dollar
> signs, and the closing '$' is followed by whitespace, I would expect
> math delimiter behaviour.
The manual is inaccurate. Here is the current check for $ math
delimiters:
(and (not (memq (char-after (1+ (point)))
'(?\s ?\t ?\n ?, ?. ?\;)))
(search-forward "$" nil t 2)
(not (memq (char-before (match-beginning 0))
'(?\s ?\t ?\n ?, ?.)))
(looking-at-p
"\\(\\s.\\|\\s-\\|\\s(\\|\\s)\\|\\s\"\\|'\\|$\\)"))
See also:
https://orgmode.org/worg/dev/org-syntax.html#Entities_and_LaTeX_Fragments
I don't know if there's a way to express it in a non-boring way in the
manual.
Regards,
--
Nicolas Goaziou