From mboxrd@z Thu Jan 1 00:00:00 1970 From: Achim Gratz Subject: Re: [PATCH] ob-R.el, ox-latex.el: support for tikz graphics Date: Tue, 26 Feb 2013 10:50:17 +0000 (UTC) Message-ID: References: <1361731894-2738-1-git-send-email-aaronecay@gmail.com> <87621gfmkb.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([208.118.235.92]:59235) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UAI7O-0000nQ-TK for emacs-orgmode@gnu.org; Tue, 26 Feb 2013 05:50:55 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UAI7K-0006Zp-4P for emacs-orgmode@gnu.org; Tue, 26 Feb 2013 05:50:42 -0500 Received: from plane.gmane.org ([80.91.229.3]:55545) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UAI7J-0006Zf-S5 for emacs-orgmode@gnu.org; Tue, 26 Feb 2013 05:50:37 -0500 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1UAI7b-0007vv-OZ for emacs-orgmode@gnu.org; Tue, 26 Feb 2013 11:50:55 +0100 Received: from 217.10.52.10 ([217.10.52.10]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 26 Feb 2013 11:50:55 +0100 Received: from Stromeko by 217.10.52.10 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 26 Feb 2013 11:50:55 +0100 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: emacs-orgmode@gnu.org Nicolas Goaziou gmail.com> writes: > Aaron Ecay gmail.com> writes: > > Tikz graphics should be exported to LaTeX by \include, not as a link. > > This commit changes the file extension used for tikz graphics from .tex > > to .tikz. > > I'm wondering if it's really meant to be inserted as an inline image. > Does it support wrapfigure environment or width optional attribute? A .tikz file usually contains a tikzpicture environment that wraps around the actual tikz code. It produces a box just like includegraphics does, only that it is normal LaTeX code, and so you need \include to read it. > If it doesn't, it may be better to implement a dedicated (or a more > general "input" function) formatting function that would be called from > `org-latex-link'. I don't understand. What I currently need to do for TikZ is this: #+LaTeX: \begin{figure}[t]\centering #+LaTeX: \input{oldModel.tikz} #+LaTeX: \caption{Relative modelling error} #+LaTeX: \label{fig:oldModel} #+LaTeX: \end{figure} With the patch that becomes much easier (especially if you want to bounce it to HTML eventually, even though the HTML exporter would need to grok that the tikz picture should first be converted to SVG or PNG or some other image format): #+CAPTION: Relative modelling error #+LABEL: fig:oldModel #+ATTR_LaTeX: :placement [t] [[file:oldModel.tikz]] Now, what I'd really like to do is to combine this with the production of the tikz file by Gnuplot like so: #+HEADERS: :term "tikz size 15cm,5cm" :exports none :results yes #+BEGIN_SRC gnuplot :file oldModel.tikz :cache yes... #+RESULTS[4d90e02adddfd56f8fbf6bc99963b9bffe1f201e]: #+CAPTION: Relative modelling error for DP 0.7 model #+LABEL: fig:oldModel #+ATTR_LaTeX: :placement [t] [[file:oldModel.tikz]] That works, but I'll always have to remove some extra gunk between the new result generated and the old one. Regards, Achim.