emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: John Kitchin <jkitchin@andrew.cmu.edu>
To: CHARPENTIER Emmanuel <emmanuel.charpentier@aphp.fr>
Cc: "emacs-orgmode@gnu.org" <emacs-orgmode@gnu.org>
Subject: Re: LaTeX-producing code : how to export results to HTML/ODT
Date: Wed, 7 Jul 2021 16:04:07 -0400	[thread overview]
Message-ID: <CAJ51EToqwy78t6Li5Vs+hK5PeoUDN7nNqt-NVKwc4PtYM_svFw@mail.gmail.com> (raw)
In-Reply-To: <0d64a69067cc40aae8b8767e11882e1b29152b00.camel@aphp.fr>

[-- Attachment #1: Type: text/plain, Size: 1596 bytes --]

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
>
>

[-- Attachment #2: Type: text/html, Size: 2593 bytes --]

  reply	other threads:[~2021-07-07 20:05 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-07 13:57 LaTeX-producing code : how to export results to HTML/ODT CHARPENTIER Emmanuel via General discussions about Org-mode.
2021-07-07 20:04 ` John Kitchin [this message]
  -- strict thread matches above, loose matches on Subject: below --
2021-07-05 17:01 autofrettage
2021-07-06 14:24 ` John Kitchin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAJ51EToqwy78t6Li5Vs+hK5PeoUDN7nNqt-NVKwc4PtYM_svFw@mail.gmail.com \
    --to=jkitchin@andrew.cmu.edu \
    --cc=emacs-orgmode@gnu.org \
    --cc=emmanuel.charpentier@aphp.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).