emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nicolas Goaziou <n.goaziou@gmail.com>
To: Christian Wittern <cwittern@gmail.com>
Cc: Org Mode Mailing List <emacs-orgmode@gnu.org>
Subject: Re: Captions for src and example blocks
Date: Sat, 14 Jan 2012 09:43:38 +0100	[thread overview]
Message-ID: <878vlawu6d.fsf@gmail.com> (raw)
In-Reply-To: <CA+_6MM1pyMBuYDEnUahD2UXn_=Js0k1ztHZGWK3V=VTMEmbgBw@mail.gmail.com> (Christian Wittern's message of "Sat, 14 Jan 2012 14:31:38 +0900")

Hello,

Christian Wittern <cwittern@gmail.com> 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

  reply	other threads:[~2012-01-14  8:45 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-14  5:31 Captions for src and example blocks Christian Wittern
2012-01-14  8:43 ` Nicolas Goaziou [this message]
2012-01-16  1:00   ` Christian Wittern
2012-01-16 18:24     ` Nicolas Goaziou
2012-01-14 16:38 ` Jambunathan K
2012-01-16  1:11   ` Christian Wittern
2012-01-16  4:40     ` Jambunathan K

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=878vlawu6d.fsf@gmail.com \
    --to=n.goaziou@gmail.com \
    --cc=cwittern@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /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).