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

2021-07-14 Thread Emmanuel Charpentier
"Raw" LaTeX code export to ODT always worked if =tex= (and possibly =org-latex-to-mathml-convert-command=) were correctly set. The problem is that "raw" output is no longer recognized as the function result. If the function is reran, the result will be output twice : once by the function execution

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

2021-07-13 Thread Timothy
John Kitchin writes: > #+RESULTS: foo > :results: > \[\displaystyle{\sin\left(\frac{a}{b}\right)}\] > :end: > > the key is the drawer I think. FYI as of https://code.orgmode.org/bzg/org-mode/commit/b90b850ae8be46a1ebe7d13b05ad79869e8d1032 a LaTeX environment will "just work". i.e. #+RESULTS:

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

2021-07-07 Thread John Kitchin
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

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

2021-07-06 Thread John Kitchin
Here is a way way to combine the output with a name/caption. I adapted this from the post-processing section in https://orgmode.org/manual/Results-of-Evaluation.html #+NAME: caption #+BEGIN_SRC sh :var data="" :var caption="" name="" :results output echo "#+name: $name" echo "#+caption: $caption"

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

2021-07-05 Thread autofrettage
Hi, I simply cannot ignore this opportunity to expose my utter Org Mode ignorance! Emmanuel > ... and how to use it with captions, labels and cross-references. I have tried using the code-splicing functionality with some success; The result from one source code block "foo", can be inserted into

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

2021-07-04 Thread Emmanuel Charpentier
Yes, this works, indeed. If I could just figure why ... and how to use it with captions, labels and cross-references. But I still don't "get" drawers, I thonk. Thanks a lot ! You gave me somethong to think about. Le dimanche 04 juillet 2021 à 15:04 -0400, John Kitchin a écrit : > This incanta

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

2021-07-04 Thread Emmanuel Charpentier
The following does what I want : export ln a LaTeX block to latex and beamer, export as a raw LaTeX snippet in HTML and ODT, no export otherwise : #+property: header-args:sage :session #+options: tex:t toc:nil author:nil #+begin_src emacs-lisp :exports none ;; (customize-set-variable ;; 'org-lat

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

2021-07-04 Thread John Kitchin
This incantation worked for me: #+name: foo #+begin_src emacs-lisp :exports both :results drawer "Pseudo-function returning a LaTeX pseudo-result." "\\[\\displaystyle{\\sin\\left(\\frac{a}{b}\\right)}\\]" #+end_src #+RESULTS: foo :results: \[\displaystyle{\sin\left(\frac{a}{b}\right)}\] :end:

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

2021-07-04 Thread Emmanuel Charpentier
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") (custom-set-variables '(org-latex-to-mathml-convert

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

2021-07-04 Thread John Kitchin
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 wrote: > Dear list, > > Org-mode offers the ability to create functions returning LaTeX results : > such occurrences are frequent with Sagemath, Maxima, Mathematica, R, and

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

2021-07-04 Thread Emmanuel Charpentier
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 lat