From: Rick Frankel <rick@rickster.com>
To: Nicolas Goaziou <n.goaziou@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: Bug formatting source code in new latex exporter
Date: Thu, 21 Mar 2013 20:50:57 -0400 [thread overview]
Message-ID: <m2y5dgz28e.wl%rick@rickster.com> (raw)
In-Reply-To: <87wqt0sget.fsf@gmail.com>
At Thu, 21 Mar 2013 20:26:34 +0100,
Nicolas Goaziou wrote:
>
> Hello,
>
> Rick Frankel <rick@rickster.com> 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
next prev parent reply other threads:[~2013-03-22 0:51 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
2013-03-22 0:50 ` Rick Frankel [this message]
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=m2y5dgz28e.wl%rick@rickster.com \
--to=rick@rickster.com \
--cc=emacs-orgmode@gnu.org \
--cc=n.goaziou@gmail.com \
/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).