From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: Add caption to babel-generated images Date: Tue, 30 Aug 2016 13:55:01 +0200 Message-ID: <8760qiii96.fsf@saiph.selenimh> References: <20160830110410.GA19154@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:38632) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1behdG-0005fK-KI for emacs-orgmode@gnu.org; Tue, 30 Aug 2016 07:55:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1behdC-0001lM-Hl for emacs-orgmode@gnu.org; Tue, 30 Aug 2016 07:55:09 -0400 Received: from relay4-d.mail.gandi.net ([217.70.183.196]:41647) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1behdC-0001ku-Aj for emacs-orgmode@gnu.org; Tue, 30 Aug 2016 07:55:06 -0400 Received: from saiph.selenimh (unknown [IPv6:2a03:a0a0:0:4301::b3c]) (Authenticated sender: mail@nicolasgoaziou.fr) by relay4-d.mail.gandi.net (Postfix) with ESMTPSA id 1331B17209A for ; Tue, 30 Aug 2016 13:55:02 +0200 (CEST) In-Reply-To: <20160830110410.GA19154@gmail.com> (Georgiy Tugai's message of "Tue, 30 Aug 2016 20:34:10 +0930") 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" To: emacs-orgmode@gnu.org Hello, Georgiy Tugai 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