From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: Captions for src and example blocks Date: Sat, 14 Jan 2012 09:43:38 +0100 Message-ID: <878vlawu6d.fsf@gmail.com> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([140.186.70.92]:42610) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RlzF3-0006Bs-MF for emacs-orgmode@gnu.org; Sat, 14 Jan 2012 03:45:39 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RlzF2-0001KP-Lw for emacs-orgmode@gnu.org; Sat, 14 Jan 2012 03:45:37 -0500 Received: from mail-wi0-f169.google.com ([209.85.212.169]:41575) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RlzF2-0001KG-H5 for emacs-orgmode@gnu.org; Sat, 14 Jan 2012 03:45:36 -0500 Received: by wicr5 with SMTP id r5so1249564wic.0 for ; Sat, 14 Jan 2012 00:45:35 -0800 (PST) In-Reply-To: (Christian Wittern's message of "Sat, 14 Jan 2012 14:31:38 +0900") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Christian Wittern Cc: Org Mode Mailing List Hello, Christian Wittern writes: > There was a thread last April about a way to introduce captions and > labels to src and example blocks (see > http://lists.gnu.org/archive/html/emacs-orgmode/2011-04/msg00877.html). > Now I would like to use captions in a similar way, but not just for > LaTex, but also for the ODT export. So a generic org-mode solution > would be much more helpful. I wonder if somebody has any idea about > how to achieve this. The new export engine has support for captions and labels for almost any element, through the use of affiliated keywords. Thus, the following special block will have ":caption" and ":name" properties attached to it: --8<---------------cut here---------------start------------->8--- #+caption: Here is /something/. #+name: something #+begin_something A special "something" block. #+end_something --8<---------------cut here---------------end--------------->8--- Now, it doesn't mean that it will do anything during export, as back-ends can choose to make use of those properties or ignore them. With regards to the previous special block, the e-latex back-end currently makes use of the :name property, but ignore the :caption one. Though it's not hard to support this by modifying accordingly the `org-e-latex-special-block' function. Regards, -- Nicolas Goaziou