emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Richard Lawrence <wyley.r@gmail.com>
To: "Berry\, Charles" <ccberry@health.ucsd.edu>
Cc: gutin <jkabrg@gmail.com>, org-mode mailing list <emacs-orgmode@gnu.org>
Subject: Re: Bug: Math mode doesn't work if followed by a dash [9.4 (nil @ /home/gutin/.emacs.d/.local/straight/build/org-mode/)]
Date: Tue, 29 Sep 2020 20:53:33 +0200	[thread overview]
Message-ID: <87r1qk9zyq.fsf@aquinas> (raw)
In-Reply-To: <529341D1-CD76-4A17-9D92-DCB07D746ECB@health.ucsd.edu>

"Berry, Charles" <ccberry@health.ucsd.edu> writes:

> The case Gutin describes conforms to the documentation, viz. `$x\beta$-` should produce math mode LaTeX as I read the next paragraph. 
>
> From (info "(org) LaTeX fragments"):
>
>    • Text within the usual LaTeX math delimiters.  To avoid conflicts
>      with currency specifications, 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.

Hmm, good point.

It looks to me like the relevant function is
org-element-latex-fragment-parser, and the code for that hasn't changed
much in several years (last change was 2017). (Also, I was wrong,
parsing latex fragments is not done with just a regexp.) I can confirm
that this function parses "$foo" in "$foo$ bar" as a latex fragment, but
not in "$foo$-bar"

Not sure if the problem here is the code or the documentation. Perhaps
the documentation should be updated to reflect the current behavior?

-- 
Best,
Richard


  reply	other threads:[~2020-09-29 18:54 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-27 18:48 Bug: Math mode doesn't work if followed by a dash [9.4 (nil @ /home/gutin/.emacs.d/.local/straight/build/org-mode/)] gutin
2020-09-28 17:59 ` Richard Lawrence
     [not found] ` <875z7xbxns.fsf@aquinas>
     [not found]   ` <e119937a866c6ec4903b122321eec58b561a7175.camel@gmail.com>
2020-09-28 18:42     ` Richard Lawrence
2020-09-29 16:42       ` Berry, Charles via General discussions about Org-mode.
2020-09-29 18:53         ` Richard Lawrence [this message]
2020-09-29 22:06           ` Berry, Charles via General discussions about Org-mode.

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=87r1qk9zyq.fsf@aquinas \
    --to=wyley.r@gmail.com \
    --cc=ccberry@health.ucsd.edu \
    --cc=emacs-orgmode@gnu.org \
    --cc=jkabrg@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).