[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[O] Finer control over LaTeX export
From: |
Uwe Ziegenhagen |
Subject: |
[O] Finer control over LaTeX export |
Date: |
Tue, 31 Dec 2013 15:02:06 +0000 (UTC) |
User-agent: |
Loom/3.14 (http://gmane.org/) |
Hi everyone,
I have short parts of Python code in my org file:
#+begin_src python :results value
def foo(x):
if x>0:
return x+1
else:
return x-1
return foo(590)
#+end_src
#+RESULTS:
: 591
#+begin_src python :results value
return 1+1
#+end_src
#+RESULTS:
: 2
#+begin_src python :results output
print(1+2)
#+end_src
#+RESULTS:
: 3
These get exported to
\#+begin$_{\text{src}}$ python :results output
print(1+2+3+4+5+6+7+8+9+11)
\#+end$_{\text{src}}$ python
\begin{verbatim}
56
\end{verbatim}
\section{{\bfseries\sffamily TODO} Emacs Artikel zur Code-Evaluation}
\label{sec-18}
\begin{verbatim}
def foo(x):
if x>0:
return x+1
else:
return x-1
return foo(590)
\end{verbatim}
\begin{verbatim}
return 1+1
\end{verbatim}
\begin{verbatim}
print(1+2)
\end{verbatim}
How can I define how Org Mode is exporting these snippets?
The whole verbatim stuff is "okay", I'd like to replace that with the
listings package, but the
\#+begin$_{\text{src}}$ python :results output
print(1+2+3+4+5+6+7+8+9+11)
\#+end$_{\text{src}}$ python
requires amsmath just for the \text command, so this is also something I
want to change. Can anyone point me to the correct way of changing it.
Uwe
- [O] Finer control over LaTeX export,
Uwe Ziegenhagen <=