emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nicolas Goaziou <mail@nicolasgoaziou.fr>
To: Jarmo Hurri <jarmo.hurri@iki.fi>
Cc: emacs-orgmode@gnu.org
Subject: Re: Latex single dollar math delimiter question
Date: Mon, 05 Aug 2019 12:35:50 +0200	[thread overview]
Message-ID: <874l2v292x.fsf@nicolasgoaziou.fr> (raw)
In-Reply-To: <87wofsgf8x.fsf@iki.fi> (Jarmo Hurri's message of "Mon, 05 Aug 2019 11:58:54 +0300")

Hello,

Jarmo Hurri <jarmo.hurri@iki.fi> 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

  reply	other threads:[~2019-08-05 10:35 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-04  5:31 Latex single dollar math delimiter question Jarmo Hurri
2019-08-04 12:07 ` Fraga, Eric
2019-08-05  8:58   ` Jarmo Hurri
2019-08-05 10:35     ` Nicolas Goaziou [this message]
2019-08-05 11:04     ` Fraga, Eric
  -- strict thread matches above, loose matches on Subject: below --
2019-08-08 17:00 emanuel.charpentier
2019-08-09  8:56 ` Fraga, Eric

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=874l2v292x.fsf@nicolasgoaziou.fr \
    --to=mail@nicolasgoaziou.fr \
    --cc=emacs-orgmode@gnu.org \
    --cc=jarmo.hurri@iki.fi \
    /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).