[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
- [O] Bug formatting source code in new latex exporter, Rick Frankel, 2013/03/19
- [O] Bug formatting source code in new latex exporter, Rick Frankel, 2013/03/19
- Re: [O] Bug formatting source code in new latex exporter,
Nicolas Goaziou <=
- Re: [O] Bug formatting source code in new latex exporter, Rick Frankel, 2013/03/21
- Re: [O] Bug formatting source code in new latex exporter, Nicolas Goaziou, 2013/03/23
- Re: [O] Bug formatting source code in new latex exporter, Rick Frankel, 2013/03/24
- Re: [O] Bug formatting source code in new latex exporter, Nicolas Goaziou, 2013/03/25
- Re: [O] Bug formatting source code in new latex exporter, Rick Frankel, 2013/03/26
- Re: [O] Bug formatting source code in new latex exporter, Nicolas Goaziou, 2013/03/27
- Re: [O] Bug formatting source code in new latex exporter, Rick Frankel, 2013/03/27
- Re: [O] Bug formatting source code in new latex exporter, Nicolas Goaziou, 2013/03/27