>>> "John" == John Kitchin 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!