From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: Latex single dollar math delimiter question Date: Mon, 05 Aug 2019 12:35:50 +0200 Message-ID: <874l2v292x.fsf@nicolasgoaziou.fr> References: <871ry1ijj8.fsf@iki.fi> <87lfw9kuba.fsf@ucl.ac.uk> <87wofsgf8x.fsf@iki.fi> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:45711) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1huaLO-0003a4-7c for emacs-orgmode@gnu.org; Mon, 05 Aug 2019 06:35:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1huaLN-0006gN-4I for emacs-orgmode@gnu.org; Mon, 05 Aug 2019 06:35:58 -0400 Received: from relay8-d.mail.gandi.net ([217.70.183.201]:36455) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1huaLM-0006fH-Up for emacs-orgmode@gnu.org; Mon, 05 Aug 2019 06:35:57 -0400 In-Reply-To: <87wofsgf8x.fsf@iki.fi> (Jarmo Hurri's message of "Mon, 05 Aug 2019 11:58:54 +0300") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: Jarmo Hurri Cc: emacs-orgmode@gnu.org Hello, Jarmo Hurri writes: > Based on the manual I would have expected math delimiters. Referring > again to the manual: "single =E2=80=98$=E2=80=99 characters are only reco= gnized as math > delimiters if the enclosed text contains at most two line breaks, is > directly attached to the =E2=80=98$=E2=80=99 characters with no whitespac= e in between, > and if the closing =E2=80=98$=E2=80=99 is followed by whitespace, punctua= tion 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_F= ragments I don't know if there's a way to express it in a non-boring way in the manual. Regards, --=20 Nicolas Goaziou