Hello Uwe > On Monday, 23 May 2022 at 19:24, Uwe Brauer wrote:
Sorry I don't have matlab and I have never used the solutionorbox environment, but I believe you can generate latex directly. For example with R I can to the following. #+begin_src R :exports results :eval yes :results output latex cat("\\begin{align*}") cat("P(\\text{Covid19}|\\text{ + })&=\\frac{P(\\text{ + }|\\text{Covid19})P(\\text{Covid19})}{P(\\text{ + } | \\text{Covid19})P(\\text{Covid19}) + P(\\\\text{ + }|\\text{No-Covid19})P(\\text{No-Covid19})}") cat("\\end{align*}") #+end_src With the :post keyword so that you can wrap pretty much anything. (info "(org) Results of Evaluation") Consider #+NAME: box #+BEGIN_SRC emacs-lisp :var equation="" (format "\\\\begin{solutionorbox} %s \\\\end{solutionorbox}" equation ) #+end_src #+begin_src R :exports results :eval yes :results output latex :post box(*this*) cat("\\frac{3}{4}") #+end_src #+RESULTS: #+begin_export latex \\begin{solutionorbox} \frac{3}{4} \\end{solutionorbox} #+end_export HTH, Jeremie