emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Berry, Charles" via "General discussions about Org-mode." <emacs-orgmode@gnu.org>
To: Richard Lawrence <wyley.r@gmail.com>
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 16:42:39 +0000	[thread overview]
Message-ID: <529341D1-CD76-4A17-9D92-DCB07D746ECB@health.ucsd.edu> (raw)
In-Reply-To: <87zh59agku.fsf@aquinas>

See below.

> On Sep 28, 2020, at 11:42 AM, Richard Lawrence <wyley.r@gmail.com> wrote:
> 
> Hi Gutin,
> 
> gutin <jkabrg@gmail.com> writes:
> 
>> What I meant is that if you type
>> 
>>  $*$-algebra
>> 
>> and hit C-c C-x C-l, then the "$*$" doesn't get replaced with a
>> mathematical image. A similar problem happens when you export to Latex:
>> The dollar signs get escaped.
> 
> I believe this is intentional. There are too many other uses of dollar
> signs that people might want to use in Org documents that might be
> broken if Org treated them as math mode delimiters; so the regexp that
> matches math mode delimiters is deliberately limited in scope.

[rest deleted]

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.

But the $...$ and $$...$$ seem fragile. I recall advice to avoid them in favor of \(...\) and \[...\].

FWIW, my sanity has been aided by using yf/org-electric-dollar[1], which inserts `\(\)` when I type `$` and leaves point where you need it to enter math mode LaTex. A dash after the closing parenthesis is no problem.

HTH,

Chuck


[1] https://orgmode.org/list/87vc913oh5.fsf@yahoo.fr/
;; from Nicolas Richard <theonewiththeevillook@yahoo.fr>
;; Date: Fri, 8 Mar 2013 16:23:02 +0100
;; Message-ID: <87vc913oh5.fsf@yahoo.fr>






  reply	other threads:[~2020-09-29 16:44 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. [this message]
2020-09-29 18:53         ` Richard Lawrence
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=529341D1-CD76-4A17-9D92-DCB07D746ECB@health.ucsd.edu \
    --to=emacs-orgmode@gnu.org \
    --cc=ccberry@health.ucsd.edu \
    --cc=jkabrg@gmail.com \
    --cc=wyley.r@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).