* Latex export with python source code included.
@ 2010-01-31 10:40 Michael Bernhard Arp Sørensen
2010-01-31 19:55 ` Pierre de Buyl
0 siblings, 1 reply; 2+ messages in thread
From: Michael Bernhard Arp Sørensen @ 2010-01-31 10:40 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1.1: Type: text/plain, Size: 602 bytes --]
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
[-- Attachment #1.2: Type: text/html, Size: 1112 bytes --]
[-- Attachment #2: Type: text/plain, Size: 201 bytes --]
_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Latex export with python source code included.
2010-01-31 10:40 Latex export with python source code included Michael Bernhard Arp Sørensen
@ 2010-01-31 19:55 ` Pierre de Buyl
0 siblings, 0 replies; 2+ messages in thread
From: Pierre de Buyl @ 2010-01-31 19:55 UTC (permalink / raw)
To: michael; +Cc: emacs-orgmode
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.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-01-31 19:55 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-31 10:40 Latex export with python source code included Michael Bernhard Arp Sørensen
2010-01-31 19:55 ` Pierre de Buyl
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.