From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Eric Schulte" Subject: Re: Captions for source code Date: Thu, 22 Jul 2010 12:20:58 -0700 Message-ID: <87lj93e31h.fsf@gmail.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from [140.186.70.92] (port=43334 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Oc1KS-0006Gs-1k for emacs-orgmode@gnu.org; Thu, 22 Jul 2010 15:21:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Oc1KQ-00008z-5I for emacs-orgmode@gnu.org; Thu, 22 Jul 2010 15:21:11 -0400 Received: from mail-px0-f169.google.com ([209.85.212.169]:61581) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Oc1KQ-00008q-0i for emacs-orgmode@gnu.org; Thu, 22 Jul 2010 15:21:10 -0400 Received: by pxi7 with SMTP id 7so7765874pxi.0 for ; Thu, 22 Jul 2010 12:21:09 -0700 (PDT) In-Reply-To: (Robert Klein's message of "Thu, 22 Jul 2010 14:26:10 +0200") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Robert Klein Cc: Org Mode Hi Robert, Currently captions are only supported for Tables and for Links, not for code blocks. Although the "caption" attribute is used by code blocks it is only used to hold the code block name, not as an actual caption. Adding real captions to code blocks (and moving the code block name to it's own property) certainly seems like a good idea for future development. If anyone is interested the `org-export-attach-captions-and-attributes' function is probably a good place to start. I've added this to my personal stack, but we'll see if that ends up meaning anything. Best -- Eric "Robert Klein" writes: > Hi list, > > I'm trying to get source code exported to HTML with captions, e.g. like: > > > #+caption: Examples of variable declaration. > #+begin_src sql > SELECT 6*9; > #+end_src > > There seems to be code in org-exp.el, see lines 2128 and > following in version 7.01f of org-mode. > > However, I'm unable to find out what I'm doing wrong, atm. > > Do you know how I can get this working? > > Thank you very much! > > Best regards > Robert > > _______________________________________________ > Emacs-orgmode mailing list > Please use `Reply All' to send replies to the list. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode