From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric S Fraga Subject: Re: Problems with source code listings in PDF Date: Tue, 08 Feb 2011 15:17:00 +0000 Message-ID: <87k4haeetv.fsf@ucl.ac.uk> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from [140.186.70.92] (port=54147 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PmpJz-0003s4-5b for emacs-orgmode@gnu.org; Tue, 08 Feb 2011 10:18:02 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PmpJb-0000MJ-PR for emacs-orgmode@gnu.org; Tue, 08 Feb 2011 10:17:20 -0500 Received: from vscane-b.ucl.ac.uk ([144.82.108.141]:34711) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PmpJb-0000KY-LG for emacs-orgmode@gnu.org; Tue, 08 Feb 2011 10:17:15 -0500 In-Reply-To: (Avdi Grimm's message of "Tue, 8 Feb 2011 09:59:55 -0500") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Avdi Grimm Cc: emacs-orgmode@gnu.org Avdi Grimm 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)