I just checked and situation is absurd. Here is the minimal example: ,---- | | #+begin_src matlab :results output latex :exports results | X=[1]; | disp('\begin{displaymath}') | fprintf('X&=%g\\\\ \n', X) | disp('\end{displaymath}') | #+end_src | | #+RESULTS: | #+BEGIN_EXPORT latex | \begin{displaymath} | X&=1\\ | \end{displaymath} | #+END_EXPORT `----
When I set org-export-babel-evaluate nil, then the code is *not* evaluated, *but* the code block *and* the result are exported. ,---- | | \begin{document} | | \lstset{style=Matlab-editor,basicstyle=\mlttfamily,escapechar=",mlshowsectionrules=true,mathescape=true,morecomment=[s]{\%\{}{\%\}},language=Matlab,label= ,caption= ,captionpos=b,numbers=none} | \begin{lstlisting} | X=[1]; | disp('\begin{displaymath}') | fprintf('X&=%g\\\\ \n', X) | disp('\end{displaymath}') | \end{lstlisting} | | \begin{displaymath} | X&=1\\ | \end{displaymath} | \end{document} `---- When I set org-export-babel-evaluate to t, export but say no to the question whether or not to evaluate, *only* the result is exported, which is what I want. ,---- | | \begin{document} | | \begin{displaymath} | X&=1\\ | \end{displaymath} | \end{document} `---- Is this a *bug*? I wait a day, then I will file a bug report. Uwe Brauer