[Top][All Lists]

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

Re: LaTeX-producing code : how to export results to HTML/ODT ?

From: Emmanuel Charpentier
Subject: Re: LaTeX-producing code : how to export results to HTML/ODT ?
Date: Sun, 04 Jul 2021 20:51:10 +0200
User-agent: Evolution 3.38.3-1

I tried this :

#+property: header-args:sage :session
#+options: tex:t toc:nil author:nil
#+begin_src emacs-lisp :exports none
  ;; (customize-set-variable
  ;;  'org-latex-to-mathml-convert-command
  ;;  "latexmlmath \"%i\" --presentationmathml=%o")
      "java -jar %j -unicode -force -df %o %I")

A "normal" function call with org result...

#+name: foo
#+begin_src emacs-lisp :exports both :results org
  "Pseudo-function returning a LaTeX pseudo-result."

#+RESULTS: foo
#+begin_src org

Which exports the LaTeX *source* (uncompiled) in PDF, HTML and ODT.

I'm currently lookin into a =:post= workaround. But an option to export =latex= blocks to selected exporters (ODT, HTML, possibly Morkdown via pandoc).

I'll keep you posted.

Le dimanche 04 juillet 2021 à 14:10 -0400, John Kitchin a écrit :
Can you declare the output as org so they will just be latex snippets?

On Sun, Jul 4, 2021 at 3:46 AM Emmanuel Charpentier <emm.charpentier@free.fr> wrote:
Dear list,

Org-mode offers the ability to create functions returning LaTeX results : such occurrences are frequent with Sagemath, Maxima, Mathematica, R, and even emacs's Calc...

Such functions can be declared has having LaTeX output, and the resulting  =#+begin_export latex ...  #+end_export latex= block is exported as LaTeX and end up in the PDF versin.

But such blocks seem to export *only* to LaTeX/PDF ; more specically, they do not export to HTML nor ODT. In order to insert those results at export, one *has* to print them *raw*. See the attached examples, and compare PDF, HTML and ODT outputs of the enclosed zip archive (necessary to avoid the wrath of the spam filter of my provider ;-)...)..

Unless I am mistaken, this is the *only* way to export LaTeX exports to HTML/ODT ; I am not aware of any option allowing to force such exports. So a couple questions :
  • Am I mistaken ?
  • Are there more steamlined ways to get LaTeX in HTML/ODF/whatever-but-not-LaTeX ?
  • Wouldn't an option to allow these exports be a welcome addition to the export structure (or possibly to the various exporters) ?

Thanks in advance,

reply via email to

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