From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Thomas S. Dye" Subject: Re: Captionshttp://adzes.tsdye2.com Source Code Date: Thu, 9 Dec 2010 05:44:41 -1000 Message-ID: References: <4D00106F.2020500@med.uni-goettingen.de> Mime-Version: 1.0 (Apple Message framework v936) Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Return-path: Received: from [140.186.70.92] (port=50709 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PQifm-0008BR-2E for emacs-orgmode@gnu.org; Thu, 09 Dec 2010 10:44:47 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PQifk-0006V0-MU for emacs-orgmode@gnu.org; Thu, 09 Dec 2010 10:44:45 -0500 Received: from oproxy1-pub.bluehost.com ([66.147.249.253]:58246) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1PQifk-0006UT-9C for emacs-orgmode@gnu.org; Thu, 09 Dec 2010 10:44:44 -0500 In-Reply-To: <4D00106F.2020500@med.uni-goettingen.de> 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: Andreas Leha Cc: emacs-orgmode@gnu.org Aloha Andreas, Here's one way to get captions with source code listings and a list of listings. Use org-special-blocks to export a listing environment, e.g. #+BEGIN_listing #+source: identification-part #+begin_src latex :exports code \NeedsTeXFormat{LaTeX2e} \ProvidesClass{org-article}[2010/11/25 0.3 (TSD)] #+end_src #+LATEX: \caption[The identification part of the class file]{The identification part of the class file.}\label{fig:identification-part} #+END_listing The caption is in LaTeX here (which has the advantage of the optional argument). You'll need to define a listing float type for LaTeX. With the float package it might look like this: \newfloat{listing}{h}{lol} \newcommand\listingscaption{Listing} \floatname{listing}{\listingscaption} \newcommand\listoflistingscaption{List of Listings} \providecommand\listoflistings{\listof{listing}{\listoflistingscaption}} \floatplacement{listing}{htb!} If you're using the KOMA scripts, which complain about the float package, something like this should work: \DeclareNewTOC[type=listing,name=Listing,float,floatpos=htb!]{lol} \newcommand\listoflistings{\listoftoc[List of Listings]{lol}} hth, Tom On Dec 8, 2010, at 1:10 PM, Andreas Leha wrote: > Hi all, > > has the feature of captions for source code blocks made any progress > (see http://thread.gmane.org/gmane.emacs.orgmode/27896/focus=27913)? > > I am very interested in this feature for the latex listings package. > > Regards, > Andreas > > _______________________________________________ > 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