From: Uwe Brauer <oub@mat.ucm.es>
To: emacs-orgmode@gnu.org
Subject: Re: org file: export matlab to latex, then to html
Date: Sat, 26 May 2018 10:28:57 +0200 [thread overview]
Message-ID: <874liuq0qe.fsf@mat.ucm.es> (raw)
In-Reply-To: CAJ51ETrdhfOQMS5nfiiaxq+xTfmiWg8xUmD2xD87iUwAwXp-vg@mail.gmail.com
[-- Attachment #1: Type: text/plain, Size: 551 bytes --]
>>> "John" == John Kitchin <jkitchin@andrew.cmu.edu> 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 #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5025 bytes --]
prev parent reply other threads:[~2018-05-26 8:29 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-25 13:15 org file: export matlab to latex, then to html Uwe Brauer
2018-05-25 15:20 ` John Kitchin
2018-05-26 8:28 ` Uwe Brauer [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=874liuq0qe.fsf@mat.ucm.es \
--to=oub@mat.ucm.es \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).