emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] org file: export matlab to latex, then to html


From: Uwe Brauer
Subject: Re: [O] org file: export matlab to latex, then to html
Date: Sat, 26 May 2018 10:28:57 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

>>> "John" == John Kitchin <address@hidden> writes:

   > what if you use :wrap latex in the header? That should wrap the
   > output in a latex block, which seems to export to html for me.

Hi

I presume you mean:

#+begin_src matlab :results output latex :exports results :wrap latex
X=[1,2,3,4,5,6,7];
p=[1/7 1/7 1/7 1/7 1/7 1/7 1/7];
E=X*p';
x2=X.*X;
E2=x2*p';
V=E2-E^2;
disp('\begin{align}')
fprintf('E[X]&=%g\\\\ \n', E)
fprintf('E^2[X]&=%g\\\\\n', E2)
fprintf('V[X]&=%g\n', V)
disp('\end{align}')
#+end_src


That works nicely thanks!

Attachment: smime.p7s
Description: S/MIME cryptographic signature


reply via email to

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