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: Rick Frankel
Subject: Re: [O] Bug formatting source code in new latex exporter
Date: Thu, 21 Mar 2013 20:50:57 -0400
User-agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.7 (Harue) FLIM/1.14.9 (Gojō) APEL/10.8 Emacs/24.3.50 (i386-apple-darwin12.3.0) MULE/6.0 (HANACHIRUSATO)

At Thu, 21 Mar 2013 20:26:34 +0100,
Nicolas Goaziou wrote:
> 
> Hello,
> 
> Rick Frankel <address@hidden> writes:
> 
> > The problem is on line 2178 of ox-latex:
> >  
> >   (when (or label caption)
> >
> > should probably be:
> >        
> >   (when caption
> >
> 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.

Personally, I generate a lot of long listings (e.g., complex sql
statements, where i use babel and org to build up a large query) and
not a lot of cross references.

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

That sounds like the most sophisticated approach. Still, as cheesy as
it seems, I think dropping lines of source code is a bigger
problem. The cross reference approach seems clever, but maybe a
simpler approach would simply be to add an ATTR_LaTeX(:longlisting)
and leave it up to the user. Currently, I've hacked my copy of
ox-latex as show above (ignore `label' as a float wrapping specifier).


rick



reply via email to

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