emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Add caption to babel-generated images


From: Nicolas Goaziou
Subject: Re: [O] Add caption to babel-generated images
Date: Tue, 30 Aug 2016 13:55:01 +0200

Hello,

Georgiy Tugai <address@hidden> writes:

> I don't know if it'll work for Python, but here's an example of what
> works for me with Ditaa:
>
>> #+BEGIN_SRC ditaa :file figs/-mininet-ovsk.png :cache yes
>>    /----+ /----+ /----+ /----+
>>    |host| |host| |host| |host|       Containers
>>    +-+--/ +-+--/ +--+-/ +--+-/
>>      |      |       |      |
>>   ---------------------------------------------
>>      |      |       |      |
>>    +-+------+-------+------+-+
>>    |      Open VSwitch       |      Host kernel
>>    +-----+-------------+---=-+
>>          |             |
>>   +------+-----+ +-----+------+
>>   | controller | | controller |  Host userspace
>>   +------------+ +------------+
>> #+END_SRC
>> 
>> #+ATTR_LATEX: :width "" :options [scale=0.75]
>> #+CAPTION: [[label:fig:mininet-arch]]Mininet with OpenVSwitch architecture
>> #+RESULTS[1d367d39f18523f4eb247cb13aabd6c6f633fbdf]: 
>> [[file:figs/-mininet-ovsk.png]]
>
> First, execute your Babel block in order to generate a #+RESULTS line.
> Then, add CAPTION, ATTR_LATEX etc. lines before the RESULTS line.

Exactly. 

Also, there is no need for #+LABEL, which is an obsolete synonym for
#+NAME.

Regards,

-- 
Nicolas Goaziou



reply via email to

[Prev in Thread] Current Thread [Next in Thread]