emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] Bug formatting source code in new latex exporter


From: Nicolas Goaziou
Subject: Re: [O] Bug formatting source code in new latex exporter
Date: Thu, 21 Mar 2013 20:26:34 +0100

Hello,

Rick Frankel <address@hidden> 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 via email to

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