* Captions for src and example blocks
@ 2012-01-14 5:31 Christian Wittern
2012-01-14 8:43 ` Nicolas Goaziou
2012-01-14 16:38 ` Jambunathan K
0 siblings, 2 replies; 7+ messages in thread
From: Christian Wittern @ 2012-01-14 5:31 UTC (permalink / raw)
To: Org Mode Mailing List
Dear Orgmoders,
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.
Greetings, Chris
--
Christian Wittern, Kyoto
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Captions for src and example blocks
2012-01-14 5:31 Captions for src and example blocks Christian Wittern
@ 2012-01-14 8:43 ` Nicolas Goaziou
2012-01-16 1:00 ` Christian Wittern
2012-01-14 16:38 ` Jambunathan K
1 sibling, 1 reply; 7+ messages in thread
From: Nicolas Goaziou @ 2012-01-14 8:43 UTC (permalink / raw)
To: Christian Wittern; +Cc: Org Mode Mailing List
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
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Captions for src and example blocks
2012-01-14 5:31 Captions for src and example blocks Christian Wittern
2012-01-14 8:43 ` Nicolas Goaziou
@ 2012-01-14 16:38 ` Jambunathan K
2012-01-16 1:11 ` Christian Wittern
1 sibling, 1 reply; 7+ messages in thread
From: Jambunathan K @ 2012-01-14 16:38 UTC (permalink / raw)
To: Christian Wittern; +Cc: Org Mode Mailing List
Hello Chris
> Dear Orgmoders,
>
> 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.
As Nicolas notes, all essential infrastructure is in place. Only thing
that needs to happen is to switch over the existing ODT backend to the
new export engine.
If you have any specific opinions on how the example blocks need to be
formatted by default - for eg, put the src blocks in a text frame, in
this font and in that size, label and caption the listings this and that
way, create an index entry for src listings, - and are willing to "show
and tell" with a sample ODT document I am all ears.
Jambunathan K.
--
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Captions for src and example blocks
2012-01-14 8:43 ` Nicolas Goaziou
@ 2012-01-16 1:00 ` Christian Wittern
2012-01-16 18:24 ` Nicolas Goaziou
0 siblings, 1 reply; 7+ messages in thread
From: Christian Wittern @ 2012-01-16 1:00 UTC (permalink / raw)
To: Nicolas Goaziou; +Cc: Org Mode Mailing List
Hi Nicolas,
Thanks for your answer.
On 2012-01-14 17:43, Nicolas Goaziou wrote:
> 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:
It seems that the current LaTeX and ODT backends do not support this out of
the box, also there is no word of this in the manual, so I assume it is
still experimental?
> [..]
>
>
> 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.
Excuse my ignorance, but what is e-latex? Is that different from the
standard Latex export called with C-c C-e l?
Christian
--
Christian Wittern, Kyoto
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Captions for src and example blocks
2012-01-14 16:38 ` Jambunathan K
@ 2012-01-16 1:11 ` Christian Wittern
2012-01-16 4:40 ` Jambunathan K
0 siblings, 1 reply; 7+ messages in thread
From: Christian Wittern @ 2012-01-16 1:11 UTC (permalink / raw)
To: Jambunathan K; +Cc: Org Mode Mailing List
Hi Jambunathan,
First of all, thanks for all your work with ODT, it makes org-mode so much
more useful!
On 2012-01-15 01:38, Jambunathan K wrote:
> As Nicolas notes, all essential infrastructure is in place. Only thing
> that needs to happen is to switch over the existing ODT backend to the new
> export engine.
OK, that is good to know.
> If you have any specific opinions on how the example blocks need to be
> formatted by default - for eg, put the src blocks in a text frame, in this
> font and in that size, label and caption the listings this and that way,
> create an index entry for src listings, - and are willing to "show and
> tell" with a sample ODT document I am all ears. Jambunathan K.
I don't really have so strict requirements. I think It would be nice to be
able to treat example blocks like figures, in that they can get automatic
numbering (with #+LABEL?) and a caption.
BTW, is it currently possible to set the size for figures (I mean, included
graphic)? I know it is possible in Latex, but the Latex directive seems to
be ignored by ODT? Anyway, I guess this problem will go away with the new
generic exporter.
ALl the best,
Chris
--
Christian Wittern, Kyoto
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Captions for src and example blocks
2012-01-16 1:11 ` Christian Wittern
@ 2012-01-16 4:40 ` Jambunathan K
0 siblings, 0 replies; 7+ messages in thread
From: Jambunathan K @ 2012-01-16 4:40 UTC (permalink / raw)
To: Christian Wittern; +Cc: Org Mode Mailing List
> BTW, is it currently possible to set the size for figures (I mean,
> included graphic)? I know it is possible in Latex, but the Latex
> directive seems to be ignored by ODT? Anyway, I guess this problem
> will go away with the new generic exporter.
Try
(info "(org) Images in ODT export")
or
M-x org-info RET
g Images in ODT export
or
See section 12.8.6 Images in ODT export in
http://orgmode.org/manual/index.html
The direct link to the above section is:
http://orgmode.org/manual/Images-in-_003cacronym_003eODT_003c_002facronym_003e-export.html#Images-in-_003cacronym_003eODT_003c_002facronym_003e-export
--
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Captions for src and example blocks
2012-01-16 1:00 ` Christian Wittern
@ 2012-01-16 18:24 ` Nicolas Goaziou
0 siblings, 0 replies; 7+ messages in thread
From: Nicolas Goaziou @ 2012-01-16 18:24 UTC (permalink / raw)
To: Christian Wittern; +Cc: Org Mode Mailing List
Hello,
Christian Wittern <cwittern@gmail.com> writes:
> It seems that the current LaTeX and ODT backends do not support this
> out of the box, also there is no word of this in the manual, so
> I assume it is still experimental?
Yes. If you have the development version, you can test it.
> Excuse my ignorance, but what is e-latex? Is that different from the
> standard Latex export called with C-c C-e l?
It's the LaTeX back-end for the new export engine, so, yes, it is
different from the one used with C-c C-e l.
Regards,
--
Nicolas Goaziou
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2012-01-16 18:26 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-14 5:31 Captions for src and example blocks Christian Wittern
2012-01-14 8:43 ` Nicolas Goaziou
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
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).