[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [matlab src is always exported to latex!!]
From: |
Uwe Brauer |
Subject: |
Re: [matlab src is always exported to latex!!] |
Date: |
Tue, 13 Oct 2020 13:34:00 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
>>> "AB" == Arne Babenhauserheide <arne_bab@web.de> writes:
> Uwe Brauer <oub@mat.ucm.es> writes:
>> That did not work: I tried
>> #+begin_src matlab :results output
>>
>> But when I exported the org file to latex, the matlab code was also
>> exported. Strange
> Do you use :exports results?
> :results output switches to show what is printed to stdout
See my answer to Eric
It does not do want I want
#+begin_src matlab :exports results
close all
N = 3; % number of chebyshev nodes
n = 1; % polytropic index
iters = 1; % iterations
j=[0 1 2 3];
z=cos((pi*j)/3);
y=1-(0.5*(z+1)).^2;
a=n*(8);
a2=eye(3+1)*a;
disp('\begin{align*}')
disp('A_{1,k-1}&=')
disp('\begin{pmatrix}')
fprintf('%g &%g &%g &%g\\\\\n',a2')
disp('\end{pmatrix}=OK\\')
disp('\end{align*}')
#+end_src
Leads to
\begin{verbatim}
\begin{align*}
A_{1,k-1}&=
\begin{pmatrix}
8 &0 &0 &0\\
0 &8 &0 &0\\
0 &0 &8 &0\\
0 &0 &0 &8\\
\end{pmatrix}=OK\\
\end{align*}
\end{verbatim}
So at the moment the only solution I can think of is to use the code I
posted
(defun my-latex-filter-src-blocks (text backend info)
"Remove source blocks from latex export."
(when (org-export-derived-backend-p backend 'latex)
"%% [removed source block]\n"))
(add-to-list 'org-export-filter-src-block-functions
'my-latex-filter-src-blocks)
smime.p7s
Description: S/MIME cryptographic signature
- org mode with babel source: execute all source blocks, don't export them to latex, Uwe Brauer, 2020/10/13
- Re: org mode with babel source: execute all source blocks, don't export them to latex, Diego Zamboni, 2020/10/13
- [matlab src is always exported to latex!!] (was: org mode with babel source: execute all source blocks, don't export them to latex), Uwe Brauer, 2020/10/13
- Re: [matlab src is always exported to latex!!] (was: org mode with babel source: execute all source blocks, don't export them to latex), Dr. Arne Babenhauserheide, 2020/10/13
- Re: [matlab src is always exported to latex!!],
Uwe Brauer <=
- Re: [matlab src is always exported to latex!!], Diego Zamboni, 2020/10/13
- Re: [matlab src is always exported to latex!!], Uwe Brauer, 2020/10/13
- Re: [matlab src is always exported to latex!!], Eric S Fraga, 2020/10/13
- Re: [matlab src is always exported to latex!!], Uwe Brauer, 2020/10/13