From mboxrd@z Thu Jan 1 00:00:00 1970 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 Message-ID: References: <87tv7o6nki.fsf@mat.ucm.es> <87d0eb7l5b.fsf@mat.ucm.es> <8736f7vaue.fsf@mat.ucm.es> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:52045) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iQbjN-0006Tk-EK for emacs-orgmode@gnu.org; Fri, 01 Nov 2019 14:33:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iQbjM-00007D-5d for emacs-orgmode@gnu.org; Fri, 01 Nov 2019 14:33:05 -0400 Received: from mail-qt1-x835.google.com ([2607:f8b0:4864:20::835]:34789) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iQbjM-000073-0U for emacs-orgmode@gnu.org; Fri, 01 Nov 2019 14:33:04 -0400 Received: by mail-qt1-x835.google.com with SMTP id h2so868851qto.1 for ; Fri, 01 Nov 2019 11:33:03 -0700 (PDT) Received: from Johns-MacBook-Air.local (KITCHIN-TIMEMACHINE.CHEME.CMU.EDU. [128.2.54.215]) by smtp.gmail.com with ESMTPSA id o3sm5766746qta.3.2019.11.01.11.33.01 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 01 Nov 2019 11:33:01 -0700 (PDT) In-reply-to: <8736f7vaue.fsf@mat.ucm.es> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: emacs-orgmode@gnu.org 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: : :
: : latexS2DUgE_8e5abfd22f18b9fd072a0f1273f49cd3a35040d3.png : : : 1 : :
Uwe Brauer writes: >>>> "JK" == John Kitchin 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 > > > 1 > > > > 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