emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [Orgmode] Problems with source code listings in PDF


From: Eric S Fraga
Subject: Re: [Orgmode] Problems with source code listings in PDF
Date: Tue, 08 Feb 2011 15:17:00 +0000
User-agent: Gnus/5.110011 (No Gnus v0.11) Emacs/24.0.50 (gnu/linux)

Avdi Grimm <address@hidden> writes:

> I'm working on creating a PDF eBook with Org-Mode, and I'm running
> into some difficulty getting them to come out looking decent.
>
> I've followed the directions I found in the list archives for
> outputting colorized source code listings. I set
> org-export-latex-listings to t, and customized
> org-export-latex-packages-alist according to the directions in the
> org-export-latex-listings docs.
>
> I'm seeing a few problems with the output:

> 1. There is no color; only bolded keywords.

I must admit that colour has never been something I've considered...
it is, however, an option for the listings package.

> 2. Listings are formatted in a not-very-well-rendered font with serifs
> that just doesn't look good at all.

I've had no problems with typeface etc for listings in the past.

> 3. In begin_example sections, spaces are replaced with odd little
> curved underscores.

The use of curved underscores for spaces is deliberate and whether this
is done will depend on your source language.  You can customise this in
any case (see below).

In summary, you may need to add a line customising the listings
package.  Check out the user manual at

: ftp://ftp.tex.ac.uk/tex-archive/macros/latex/contrib/listings/listings.pdf

and then have something like this in your org file near the top:

#+latex_header: \lstset{showspaces=false, ...}

(replacing ... with the other options you may wish).

HTH.

-- 
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.0.50.1
: using Org-mode version 7.4 (release_7.4.319.g88b7.dirty)



reply via email to

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