From mboxrd@z Thu Jan 1 00:00:00 1970 From: Uwe Brauer Subject: org file: export matlab to latex, then to html Date: Fri, 25 May 2018 15:15:00 +0200 Message-ID: <87po1j3mi3.fsf@mat.ucm.es> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:58267) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fMCYt-0002k7-Vf for emacs-orgmode@gnu.org; Fri, 25 May 2018 09:15:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fMCYo-00036x-RD for emacs-orgmode@gnu.org; Fri, 25 May 2018 09:15:15 -0400 Received: from [195.159.176.226] (port=45434 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fMCYo-00034V-JC for emacs-orgmode@gnu.org; Fri, 25 May 2018 09:15:10 -0400 Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1fMCWc-00082L-Ud for emacs-orgmode@gnu.org; Fri, 25 May 2018 15:12:54 +0200 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: emacs-orgmode@gnu.org Hello Please consider the following example This is a test #+begin_src matlab :results output latex :exports results 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 Executing the src block leads #+RESULTS: #+BEGIN_EXPORT latex \begin{align} E[X]&=4\\ E^2[X]&=20\\ V[X]&=4 \end{align} #+END_EXPORT But if I now want to export the org file to html, the latex constructs are not exported. I have to remove the #+BEGIN_EXPORT latex #+END_EXPORT Manually which is cumbersome. So I need to modify the line #+begin_src matlab :results output latex :exports results But whatever I tried either there was not result exported, or when when it was the result was not converted to HTML. Any help is appreciated Regards Uwe Brauer