From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rick Frankel Subject: Bug formatting source code in new latex exporter Date: Tue, 19 Mar 2013 17:11:25 -0400 Message-ID: <20130319211125.GA54083@BigDog.local> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from eggs.gnu.org ([208.118.235.92]:44924) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UI3og-00034w-Bt for emacs-orgmode@gnu.org; Tue, 19 Mar 2013 17:11:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UI3od-00063z-7y for emacs-orgmode@gnu.org; Tue, 19 Mar 2013 17:11:30 -0400 Received: from [204.62.15.78] (port=38503 helo=mail.rickster.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UI3od-00063k-4C for emacs-orgmode@gnu.org; Tue, 19 Mar 2013 17:11:27 -0400 Received: from BigDog.local (pool-72-89-40-63.nycmny.fios.verizon.net [72.89.40.63]) by mail.rickster.com (Postfix) with ESMTPS id 466AC25008 for ; Tue, 19 Mar 2013 17:11:27 -0400 (EDT) Content-Disposition: inline List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Sorry, previous mail seems to have gotten munged, lets' try again. There is a bug with ox-latex and long listings. If the listing has a label (name) or caption, it is wrapped in a '\begin{listing}[H]' block. This causes listings longer than one page to be truncated if they have labels, which means you can't have callable code longer than one page (~40 lines for US Letter paper) and print it with minted. The problem is on line 2178 of ox-latex: (when (or label caption) should probably be: (when caption An example document is below. rick --- #+TITLE: Test #+OPTIONS: H:3 num:nil toc:nil \n:nil @:t ::t |:t ^:{} -:t f:t *:t <:t * Setup and short examples :PROPERTIES: :EXPORTS: code :END: *NOTE:* Run this section to generate the long examples before generating the latex/pdf output. ** latex listing options #+BEGIN_SRC elisp :results silent (setq org-latex-listings 'minted org-latex-minted-options '(("linenos" "true") ("stepnumber" "5") ("numbersep" "0.25em") ("frame" "leftline") ("framerule" "1pt") ("rulecolor" "\\color{framecolor}"))) #+END_SRC ** source w/ no label #+BEGIN_SRC perl :eval never foreach my $i qw(with without) { print join( "\n", sprintf("* Long listing %s label", $i), ($i eq 'with' ? '#+name: long-listing' : ''), "#+BEGIN_SRC perl :exports code", (map { "print '$_'" } 1..60), "#+END_SRC\n", ); } #+END_SRC ** src w/ with label #+name: generate-listing #+BEGIN_SRC perl :results raw foreach my $i qw(with without) { print join( "\n", sprintf("* Long listing %s label", $i), ($i eq 'with' ? '#+name: long-listing' : ''), "#+BEGIN_SRC perl :exports code", (map { "print '$_'" } 1..60), "#+END_SRC\n", ); } #+END_SRC