From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id KA1WFQ0J5mAaPQAAgWs5BA (envelope-from ) for ; Wed, 07 Jul 2021 22:05:33 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id CAojEQ0J5mAPKQAAB5/wlQ (envelope-from ) for ; Wed, 07 Jul 2021 20:05:33 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id A15E3280CE for ; Wed, 7 Jul 2021 22:05:32 +0200 (CEST) Received: from localhost ([::1]:55040 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m1DnX-0004Xq-4O for larch@yhetil.org; Wed, 07 Jul 2021 16:05:31 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51780) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m1DmT-0004XA-LD for emacs-orgmode@gnu.org; Wed, 07 Jul 2021 16:04:26 -0400 Received: from mail-wr1-x436.google.com ([2a00:1450:4864:20::436]:46639) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m1DmP-0003gs-3a for emacs-orgmode@gnu.org; Wed, 07 Jul 2021 16:04:24 -0400 Received: by mail-wr1-x436.google.com with SMTP id d12so3858156wre.13 for ; Wed, 07 Jul 2021 13:04:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=andrew-cmu-edu.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=qu1OlYrv38FUpMDLf2b9FiNTV2GCfVGvL7Xy6DA/1sA=; b=osazSDaCqHFBr2pr/qsE67LK9O147oEHOz+wxg2Euy2TPsFbBXKiV0R4kRtz01IueT iWatDR8ECu6KmJtiOBwMq314WyymkKpB62TtuFl1sXBLEpcoXDWd/VP1c6e0TLOZ4tPB i5Oo/Y3CYmh5yMXODfXEdwo2LBHpe3cRhX4ZezMDQZe8x+yMj1Os0qtX+dzRqG44z2cE BfoqyIullBzB21VQWcwXWCn1RImZm5jsZLS8KdFYNuSa7pUJIXaGACnSBW0Pe/xbNeZG QR59DiTZQ9AIntijH9T/0zPkElijp9qllKrnGsB72WgTEC+c5hfokNwL0VU8KjTqzFd7 ujzA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=qu1OlYrv38FUpMDLf2b9FiNTV2GCfVGvL7Xy6DA/1sA=; b=YtU2Pn2b8cAgh3foYbTKT95QMEoCAXcNsLgypy8GMGVXIapvAzuFddcZB3aTkUvqFv Ikc6I667Y4PWvrvs2p6JUXEJiSnhv6YUBBo7dpfwlPXZd0nxJ+glpmgodmEY3lXiBaGY wLx9q38iBBFSzXvc4BsiY/OyyfDfBveGmBj1fGUwEZ5drwdsx9Sz1O9SAhgCY9EofkSK zRi8YTLF9WSXumclJLVXJa73VoNMq6BAOSb4BRnNeISB/MPKVoJ0PXr4JEElSzcTHmh2 TBwzchv1l+zM0FKHpSL/PMxWVMllrbGU+Iauho1JYjiw5qGv4ouACkBM3grFVpgPzWR7 AMTA== X-Gm-Message-State: AOAM533Kpbl6uJAAHnX9PLcQOqA0Reha89hRWgvdjAYr+2uKXxgVS4tO yD94LZ9SGKuDjFCcD0l6/R8CWs2aDwaRffzv/P0= X-Google-Smtp-Source: ABdhPJyPcxtdTaJefSBWDKmc1WO/5wejAczUImXs2QJds7foh+B06rl6ZTJxNJ+K5HLDBtXYctMEGpRjn5LU4yBWSDU= X-Received: by 2002:a5d:410b:: with SMTP id l11mr29761625wrp.173.1625688258307; Wed, 07 Jul 2021 13:04:18 -0700 (PDT) MIME-Version: 1.0 References: <0d64a69067cc40aae8b8767e11882e1b29152b00.camel@aphp.fr> In-Reply-To: <0d64a69067cc40aae8b8767e11882e1b29152b00.camel@aphp.fr> From: John Kitchin Date: Wed, 7 Jul 2021 16:04:07 -0400 Message-ID: Subject: Re: LaTeX-producing code : how to export results to HTML/ODT To: CHARPENTIER Emmanuel Content-Type: multipart/alternative; boundary="00000000000026e94f05c68e0be3" Received-SPF: pass client-ip=2a00:1450:4864:20::436; envelope-from=johnrkitchin@gmail.com; helo=mail-wr1-x436.google.com X-Spam_score_int: -13 X-Spam_score: -1.4 X-Spam_bar: - X-Spam_report: (-1.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "emacs-orgmode@gnu.org" Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1625688333; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=qu1OlYrv38FUpMDLf2b9FiNTV2GCfVGvL7Xy6DA/1sA=; b=luteU3x0X/B17X0bSBbWCTF+lVMlROpv3wuXkua8dDmaSV3Ewv0iNSzjD5BemVVQbpOlkx MkLutJ+bGY1BWAyUu20sPtZfCepB2lqROdMR/ceg3J18czDT2ndjpeOSKpB44ST5cpZyS8 aQiXVGxK11pUO+OUW5erSx0H2ceomSxmEFoyzvbrdWQRVdFfPciqelcuF03EEEbPZ5XZj5 7QAre6X4t1TCRyqSpXS7svSmWdbB8nAL6H7OaE8Rr4D2klTznMNMzB/2FNHPRLvMpDi0Hr U0wotDRqFB7J06HrkXcun3Mamd1ZhDsigraRQs3TXi6TMN7EHcLiaVk7NVSlew== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1625688333; a=rsa-sha256; cv=none; b=XIOJqD9JfvJu9lFcdpd/O2+GAaAhUfXEGcY2Ek7J6AefhB14FmE6oiDrucj3ZTlvWFIIKw AHeb7i5/qvKBq83Z4Qzqs0qmQC1hN8JxQvdWKfEgC3VOT+/qkuey5xEhnboOVSd3P27buM MaQzZsZubAQejNul1Gde88yby5jcenlJvYY9ISHpqxfmbhddYIeAj0cgpouovTXZzdHAGB DUlZsEJgVYrEXik27VkZnM+QiyQaORO9K7RNYSR3PCuXo+eX02FCwzdhzbDwkEAHhL9tEv +k2h6E65tyfh7iYPAWUUnrxEi0FIgx06yDmHnjqCCVuME5zzrixuZPETiY5Q2Q== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=andrew-cmu-edu.20150623.gappssmtp.com header.s=20150623 header.b=osazSDaC; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Spam-Score: -2.51 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=andrew-cmu-edu.20150623.gappssmtp.com header.s=20150623 header.b=osazSDaC; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=andrew.cmu.edu (policy=none); spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Queue-Id: A15E3280CE X-Spam-Score: -2.51 X-Migadu-Scanner: scn1.migadu.com X-TUID: hY0idhw2L0VB --00000000000026e94f05c68e0be3 Content-Type: text/plain; charset="UTF-8" I am not sure you have the best math example, isn't the syntax \[\] for unnumbered equations in latex? What would it even ref? In the export, you can see that there is no label in the tex at least. #+BEGIN_SRC emacs-lisp :exports both :results value drawer :post caption(name="eq-integral", caption="This is an equation.", data=*this*) "\\begin{equation} \\int_0^2 e^x dx \\end{equation}" #+END_SRC works better for latex. I guess that is always going to be some kind of limitation. John ----------------------------------- Professor John Kitchin (he/him/his) Doherty Hall A207F Department of Chemical Engineering Carnegie Mellon University Pittsburgh, PA 15213 412-268-7803 @johnkitchin http://kitchingroup.cheme.cmu.edu On Wed, Jul 7, 2021 at 9:58 AM CHARPENTIER Emmanuel < emmanuel.charpentier@aphp.fr> wrote: > > Here is a way way to combine the output with a name/caption. > > > Slight modification : caption in emacs-lisp (to avoid sh blocks) : see the > enclosed archive (necessary to avoid anti-spam blocking by my ISP). > > Mixed results (see enclosed archive): > > - ODT exports : I get a captioned block containing the equation, correctly > referenced. > > - HTML : I get the equation (via MathML/Mathjax), no caption and a > reference to nothing visible. > > - PDF via LaTeX : I get the math and an undefined reference (??). > > - Docx from ODT : mangled math, unrelated caption, reference to nothing. > > There is a nice idea, but it is still perfectible. I'm afraid that > filering by exporter is still necessary... > > Thank you again ! > > -- > Emmanuel Charpentier > > --00000000000026e94f05c68e0be3 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I am not sure you have the best math example, isn't th= e syntax \[\] for unnumbered equations in latex? What would it even ref? In= the export, you can see that there is no label in the tex at least.
#+BEGIN_SRC emacs-lisp :exports both :results value drawer :po= st caption(name=3D"eq-integral", caption=3D"This is an equat= ion.", data=3D*this*)
=C2=A0 "\\begin{equation}
\\int_0^2 e= ^x dx
\\end{equation}"
#+END_SRC

works = better for latex. I guess that is always going to be some kind of limitatio= n.

John

-----------------------------------
Professor John Kitchi= n (he/him/his)
Doherty Hall A207F
Department of Chemical Engineering<= br>Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803
=


On Wed, Jul 7, 2021 at 9:58 AM CHARPENTIER = Emmanuel <emmanuel.charp= entier@aphp.fr> wrote:
> Here is a way way to combine the output with a name/caption. 

Slight modification : caption in emacs-lisp (to avoid sh blocks) : see= the enclosed archive (necessary to avoid anti-spam blocking by my ISP).

Mixed results (see enclosed archive):

- ODT exports : I get a captioned block containing the equation, corre= ctly referenced.

- HTML : I get the equation (via MathML/Mathjax), no caption and a ref= erence to nothing visible.

- PDF via LaTeX : I get the math and an undefined reference (??).

- Docx from ODT : mangled math, unrelated caption, reference to nothin= g.

There is a nice idea, but it is still perfectible. I'm afraid that= filering by exporter is still necessary...

Thank you again !

--
Emmanuel Charpentier

--00000000000026e94f05c68e0be3--