emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nicolas Goaziou <n.goaziou@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: Bug formatting source code in new latex exporter
Date: Thu, 21 Mar 2013 20:26:34 +0100	[thread overview]
Message-ID: <87wqt0sget.fsf@gmail.com> (raw)
In-Reply-To: <20130319211125.GA54083@BigDog.local> (Rick Frankel's message of "Tue, 19 Mar 2013 17:11:25 -0400")

Hello,

Rick Frankel <rick@rickster.com> writes:

> 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.

This is a limitation from floats. But wrapping code within a listings
environment is, IMO, the right thing to do, otherwise, cross-references
will not work.

A hack around this would be to drop the environment when source code
exceeds 30 lines, but that's cheesy for sure.

Or, maybe, drop the environment when there's only the label, but only
when there is no cross-reference pointing to the src-block within the
whole parse-tree.


Regards,

-- 
Nicolas Goaziou

  reply	other threads:[~2013-03-21 19:26 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-19 21:11 Bug formatting source code in new latex exporter Rick Frankel
2013-03-21 19:26 ` Nicolas Goaziou [this message]
2013-03-22  0:50   ` Rick Frankel
2013-03-23 21:51     ` Nicolas Goaziou
2013-03-24 23:29       ` Rick Frankel
2013-03-25 21:09         ` Nicolas Goaziou
2013-03-26 12:28           ` Rick Frankel
2013-03-27 14:17             ` Nicolas Goaziou
2013-03-27 22:10               ` Rick Frankel
2013-03-27 22:29                 ` Nicolas Goaziou
  -- strict thread matches above, loose matches on Subject: below --
2013-03-19 20:59 Rick Frankel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87wqt0sget.fsf@gmail.com \
    --to=n.goaziou@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).