emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bug: no math-mode detection for align-environment [9.3.7 (9.3.7-13-g


From: Rafael
Subject: Re: Bug: no math-mode detection for align-environment [9.3.7 (9.3.7-13-ge62ca4-elpaplus @ /home/stefi/.emacs.d/elpa/org-plus-contrib-20200713/)]
Date: Wed, 05 Aug 2020 15:19:12 -0500
User-agent: Gnus/5.130014 (Ma Gnus v0.14) Emacs/26 (gnu/linux)

Kyle Meyer <kyle@kyleam.com> writes:

> Stefi writes:
>
>> I recently updated my emacs packages and noticed that \begin{align*}
>> does not trigger math-mode detection any more, so org-cdlatex does not
>> work. However, begin{equation} still does trigger the math-mode
>> detection. I have read the documentation of
>> "org-inside-LaTeX-fragment-p" and found something about matchers, but
>> nothing about equation or align environment and why it might be treated
>> differently for math-mode detection.
>
> The default value for :matches is ("begin" "$1" "$" "$$" "\\(" "\\[").
> It looks like the value hasn't been touched in a long time, and that
> AFAICT the "begin" should cover "align" just as it covers "equation".
> And I'm not spotting any recent changes on Org's end that should affect
> this.
>
>> My test-file.org:
>> ----8<---------8<---------8<---------8<-----
>>
>> * blabla
>>  \begin{equation}
>> \label{eq:1} \frac{}{}
>> test_{cds} \frac{}{}
>> \end{equation}
>>
>> \begin{align}
>> \label{eq:2}
>> test$_d$ fr
>> \end{align}
>>
>> $\frac{}{} fds_{fdsf} \frac{}{}$
>>
>> \begin{align*}
>> fr
>> \end{align*}
>>
>>
>> ----8<---------8<---------8<---------8<-----
>>
>> - detection works for: \begin{equation}, $$, \[\] (not in testfile)
>> - detection does not work for: \begin{align}, begin{align*}; subscript _
>>   does insert extra $_{}$, which it should not in math mode, and fr does
>>   not get expanded to \frac{}{}
>>
>> Emacs  : GNU Emacs 26.3 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.20)
>>  of 2020-05-19
>> Package: Org mode version 9.3.7 (9.3.7-13-ge62ca4-elpaplus @
>> /home/stefi/.emacs.d/elpa/org-plus-contrib-20200713/)
>
> On master, maint, and the commit matching your reported version
> (e62ca4), I tried org-inside-LaTeX-fragment-p within each block of your
> test file, and it returns non-nil, including in the align and align*
> blocks.  So I dunno...
>
> Could some org-cdlatex users out there give the test file a try?

I can confirm that with
Org mode version 9.3.7 (9.3.7-16-g521d7f-elpaplus @
/home/rafael/Documents/new-emacs.d/elpa/org-plus-contrib-20200803/)
and
GNU Emacs 26.3 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.18.9) of
2019-12-23
and using org-cdlatex, fr does not expand inside align but it does
inside equation, just as Stefi says.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]