* export to latex: begin_example gets exported to verbatim (
@ 2022-05-12 7:13 Uwe Brauer
2022-05-12 7:27 ` Uwe Brauer
2022-05-12 7:31 ` Eric S Fraga
0 siblings, 2 replies; 6+ messages in thread
From: Uwe Brauer @ 2022-05-12 7:13 UTC (permalink / raw)
To: emacs-orgmode
Hi
Please consider
* matlab :results output src :exports results: exports code :eval never-export
#+begin_src matlab :results output src :exports results: exports code :eval never-export
clear all
A=[1 1 0; 0 1 0; 0 1 1];
B=[0 1; 1 0; 0 1];
C=[1 1 1];
D=0;
sys=ss(A,B,C,D)
#+end_src
#+RESULTS:
#+begin_example
sys =
A =
x1 x2 x3
x1 1 1 0
x2 0 1 0
x3 0 1 1
#+end_example
When I export this to latex, I obtain
\begin{verbatim}
sys =
A =
x1 x2 x3
x1 1 1 0
x2 0 1 0
x3 0 1 1
\end{verbatim}
But I would prefer
\begin{lstlisting}
sys =
A =
x1 x2 x3
x1 1 1 0
x2 0 1 0
x3 0 1 1
\end{lstlisting}
Any idea how?
Thanks and regards
Uwe Brauer
--
I strongly condemn Putin's war of aggression against the Ukraine.
I support to deliver weapons to Ukraine's military.
I support the ban of Russia from SWIFT.
I support the EU membership of the Ukraine.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: export to latex: begin_example gets exported to verbatim (
2022-05-12 7:13 export to latex: begin_example gets exported to verbatim ( Uwe Brauer
@ 2022-05-12 7:27 ` Uwe Brauer
2022-05-12 7:31 ` Eric S Fraga
1 sibling, 0 replies; 6+ messages in thread
From: Uwe Brauer @ 2022-05-12 7:27 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 865 bytes --]
>>> "UB" == Uwe Brauer <oub@mat.ucm.es> writes:
> Hi
> Please consider
> * matlab :results output src :exports results: exports code :eval never-export
> #+begin_src matlab :results output src :exports results: exports code :eval never-export
> clear all
> A=[1 1 0; 0 1 0; 0 1 1];
> B=[0 1; 1 0; 0 1];
> C=[1 1 1];
> D=0;
> sys=ss(A,B,C,D)
> #+end_src
> #+RESULTS:
> #+begin_example
> sys =
> A =
> x1 x2 x3
> x1 1 1 0
> x2 0 1 0
> x3 0 1 1
> #+end_example
> When I export this to latex, I obtain
> \begin{verbatim}
> sys =
> A =
> x1 x2 x3
> x1 1 1 0
> x2 0 1 0
> x3 0 1 1
> \end{verbatim}
Of course I can always add
#+ATTR_LATEX: :environment lstlisting
After I executed the code, but this is a bit cumbersome
[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5673 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: export to latex: begin_example gets exported to verbatim (
2022-05-12 7:13 export to latex: begin_example gets exported to verbatim ( Uwe Brauer
2022-05-12 7:27 ` Uwe Brauer
@ 2022-05-12 7:31 ` Eric S Fraga
2022-05-12 8:05 ` Uwe Brauer
1 sibling, 1 reply; 6+ messages in thread
From: Eric S Fraga @ 2022-05-12 7:31 UTC (permalink / raw)
To: emacs-orgmode
Hi Uwe,
should this line
> #+begin_src matlab :results output src :exports results: exports code :eval never-export
not be
#+begin_src matlab :results output :exports both :eval never-export
I.e. I think you have the syntax not quite right.
--
: Eric S Fraga, with org release_9.5.3-481-gaea24b in Emacs 29.0.50
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: export to latex: begin_example gets exported to verbatim (
2022-05-12 7:31 ` Eric S Fraga
@ 2022-05-12 8:05 ` Uwe Brauer
2022-05-12 8:52 ` Juan Manuel Macías
0 siblings, 1 reply; 6+ messages in thread
From: Uwe Brauer @ 2022-05-12 8:05 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 528 bytes --]
>>> "ESF" == Eric S Fraga <e.fraga@ucl.ac.uk> writes:
> Hi Uwe,
> should this line
>> #+begin_src matlab :results output src :exports results: exports code :eval never-export
> not be
> #+begin_src matlab :results output :exports both :eval never-export
Hm, when I use this and Execute the code I also obtain
#+RESULTS:
#+begin_example
sys =
A =
x1 x2 x3
x1 1 1 0
x2 0 1 0
x3 0 1 1
#+end_example
Which gets exported to verbatim not lstlisting as I want
[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5673 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: export to latex: begin_example gets exported to verbatim (
2022-05-12 8:05 ` Uwe Brauer
@ 2022-05-12 8:52 ` Juan Manuel Macías
2022-05-12 10:02 ` Uwe Brauer
0 siblings, 1 reply; 6+ messages in thread
From: Juan Manuel Macías @ 2022-05-12 8:52 UTC (permalink / raw)
To: Uwe Brauer; +Cc: orgmode
Hi Uwe,
Uwe Brauer writes:
> Which gets exported to verbatim not lstlisting as I want
Try adding this:
:wrap lstlisting
(I don't use matlab, but I think that should work).
Best regards,
Juan Manuel
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: export to latex: begin_example gets exported to verbatim (
2022-05-12 8:52 ` Juan Manuel Macías
@ 2022-05-12 10:02 ` Uwe Brauer
0 siblings, 0 replies; 6+ messages in thread
From: Uwe Brauer @ 2022-05-12 10:02 UTC (permalink / raw)
To: Juan Manuel Macías; +Cc: Uwe Brauer, orgmode
[-- Attachment #1: Type: text/plain, Size: 229 bytes --]
>>> "JMM" == Juan Manuel Macías <maciaschain@posteo.net> writes:
> Hi Uwe,
> Uwe Brauer writes:
>> Which gets exported to verbatim not lstlisting as I want
> Try adding this:
> :wrap lstlisting
It does! Thanks!
[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5673 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2022-05-12 10:09 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-05-12 7:13 export to latex: begin_example gets exported to verbatim ( Uwe Brauer
2022-05-12 7:27 ` Uwe Brauer
2022-05-12 7:31 ` Eric S Fraga
2022-05-12 8:05 ` Uwe Brauer
2022-05-12 8:52 ` Juan Manuel Macías
2022-05-12 10:02 ` Uwe Brauer
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.