[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Bug: Math mode doesn't work if followed by a dash [9.4 (nil @ /home/
From: |
Berry, Charles |
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 |
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>