emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Orgmode] Latex export with python source code included.


From: Pierre de Buyl
Subject: Re: [Orgmode] Latex export with python source code included.
Date: Sun, 31 Jan 2010 20:55:14 +0100

If your scope is latex only, add
#+LaTeX_HEADER: \usepackage{listings}

and in the body of the document use
#+LaTeX: \lstinputlisting{codefile.py}

Pierre
Le 31 janv. 10 à 11:40, Michael Bernhard Arp Sørensen a écrit :

Hi all.

How do I make sure that latex package "listings" is used and how do I use it to show the content of a python-file?

I want to include some python code, but it's all ugly when outputtet to PDF

Is there a better way to show source code in org? At the moment I'm using: #+INCLUDE: "matrix-citizen.07.py" src python. Looks bad in PDF-exports.

I tried using:

#+begin_src python
print "Hello World!"
#+end_src

But then I have to cut and paste ALL my code while I'd rather just include the code.

Med venlig hilsen/Kind regards

Michael B. Arp Sørensen
Programmer / BOFH
_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
address@hidden
http://lists.gnu.org/mailman/listinfo/emacs-orgmode





reply via email to

[Prev in Thread] Current Thread [Next in Thread]