emacs-orgmode
[Top][All Lists]
Advanced

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

Re: problem with unwanted strikeout in src blocks


From: Jeremie Juste
Subject: Re: problem with unwanted strikeout in src blocks
Date: Mon, 23 May 2022 23:08:12 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)

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



reply via email to

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