From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: #+BEGIN_HTML in beamer export Date: Mon, 15 Jul 2013 21:33:00 +0200 Message-ID: <87ip0bfwk3.fsf@gmail.com> References: <87vc4beky2.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:35986) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UyoVt-0003lZ-97 for emacs-orgmode@gnu.org; Mon, 15 Jul 2013 15:32:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UyoVr-0006DR-PR for emacs-orgmode@gnu.org; Mon, 15 Jul 2013 15:32:49 -0400 Received: from mail-wi0-x22b.google.com ([2a00:1450:400c:c05::22b]:46037) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UyoVr-0006DJ-J5 for emacs-orgmode@gnu.org; Mon, 15 Jul 2013 15:32:47 -0400 Received: by mail-wi0-f171.google.com with SMTP id hj3so3294091wib.4 for ; Mon, 15 Jul 2013 12:32:46 -0700 (PDT) In-Reply-To: <87vc4beky2.fsf@gmail.com> (Nick Dokos's message of "Mon, 15 Jul 2013 14:29:09 -0400") 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: Nick Dokos Cc: emacs-orgmode@gnu.org, Eric Schulte Hello, Nick Dokos writes: > I have a dot source block in a presentation that produces SVG. I use the > svg.sty package to get the image processed to pdf and included in the > presentation (I only export to latex and use a Makefile to go the rest > of the way to PDF, because I have some more stuff to do in between): > > * foo > > #+name: foo > #+BEGIN_SRC dot :file images/machines.svg :exports none :results file > digraph foo { > size="4.9,3.1"; > page="4.9,3.0"; > ratio=auto; > /* center=1; */ > nodesep=.3 > ranksep=.3 > /* rankdir=LR */ > node [shape="box"]; > node [fontsize=18]; > g -> h [style=dashed]; > h -> g [style=dashed]; > h -> c; > c -> t; > h -> p [color=lightgray]; > c -> p [style=dotted]; > p -> t [style=dotted]; > t -> r [color=darkgreen]; > } > #+END_SRC > > #+BEGIN_HTML > #+RESULTS: foo > [[file:images/machines.svg]] > #+END_HTML > > #+BEGIN_LaTeX > \includesvg[clean]{machines} > #+END_LaTeX > > But it is convenient to do C-c C-c in the code block and then click the > file link to do a quick check on the image, so I thought I'd put the > result in a BEGIN_HTML block, so it would not contaminate the latex > output (and if I exported to HTML, I'd get the image too). That works > fine iff I don't have a #+RESULTS line (or I comment it out with another > #), otherwise I get literal \#+BEGIN_HTML \#END_HTML in the latex > output. > > Bug or confusion on my part? It's an over-zealous `org-babel-remove-result' function, which removes both newline character before and after the block. Try calling `org-export-execute-babel-code' from your buffer. It will give you #+BEGIN_HTML#+END_HTML instead of #+BEGIN_HTML #+END_HTML Cc'ing Eric for is insight. Regards, -- Nicolas Goaziou