emacs-orgmode
[Top][All Lists]
Advanced

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

Re: Bug: org-mime-htmlize generates unwanted equations numbers in mail [


From: John Kitchin
Subject: Re: Bug: org-mime-htmlize generates unwanted equations numbers in mail [9.2.5 (release_9.2.5-521-gdea0c7 @ /home/oub/emacs/site-lisp/packages/org/)]
Date: Fri, 01 Nov 2019 14:33:00 -0400
User-agent: mu4e 1.3.4; emacs 26.1

Odd indeed. I have restarted Emacs and saw the same thing. But now I
have a more clear picture. I think what is happening is in
org-html--wrap-latex-environment, there is a caption provided which are
the numbers. This only affects latex environments, and does not affect
$$ (//), etc.

If you have org-html-with-latex set to t or mathjax, you get this behavior:


#+BEGIN_SRC emacs-lisp
(org-export-string-as "\\begin{displaymath}
  \\int   f dx =0
\\end{displaymath}"
                      'html t)
#+END_SRC

#+RESULTS:
: \begin{displaymath}
:   \int   f dx =0
: \end{displaymath}

but, in org-mime this is overridden by setting that to dvipng. That
isn't what causes the numbers to appear though, at least not directly.
Somehow, this triggers a call to org-html--wrap-latex-environment where
the new caption gets inserted.

#+BEGIN_SRC emacs-lisp
(org-export-string-as "\\begin{displaymath}
  \\int   f dx =0
\\end{displaymath}"
                      'html t '(:with-latex dvipng))
#+END_SRC

#+RESULTS:
:
: <div class="equation-container">
: <span class="equation">
: <img src="ltximg/latexS2DUgE_8e5abfd22f18b9fd072a0f1273f49cd3a35040d3.png" 
alt="latexS2DUgE_8e5abfd22f18b9fd072a0f1273f49cd3a35040d3.png" />
: </span>
: <span class="equation-label">
: 1
: </span>
: </div>





Uwe Brauer <address@hidden> writes:

>>>> "JK" == John Kitchin <address@hidden> writes:
>
>    > I think this is happening here:
>    > #+BEGIN_SRC emacs-lisp
>    > (org-export-string-as "\\begin{displaymath}
>    >   \\int   f dx =0
>    > \\end{displaymath}"
>    >      'html t )
>    > #+END_SRC
>
> Well now this is very odd, I obtain
>
>
> #+BEGIN_SRC emacs-lisp
> (org-export-string-as "\\begin{displaymath}
>   \\int   f dx =0
> \\end{displaymath}"
>      'html t )
> #+END_SRC
>
> #+RESULTS:
> : \begin{displaymath}
> :   \int   f dx =0
> : \end{displaymath}
>
> But org-mime-htmlsize still inserts
>
> <span class="equation-label">
>   1
>   </span>
>
>
> I am now very confused and will try to debug it again.


--
Professor John Kitchin
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803
@johnkitchin
http://kitchingroup.cheme.cmu.edu



reply via email to

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