From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rasmus Subject: Re: Best way of including tikz into latex (pdf and beamer) export with preview? Date: Tue, 17 May 2016 12:30:14 +0200 Message-ID: <87k2it564p.fsf@gmx.us> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:52628) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b2cGp-0007L0-J1 for emacs-orgmode@gnu.org; Tue, 17 May 2016 06:30:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b2cGl-0003p1-8U for emacs-orgmode@gnu.org; Tue, 17 May 2016 06:30:34 -0400 Received: from plane.gmane.org ([80.91.229.3]:35390) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b2cGl-0003om-1z for emacs-orgmode@gnu.org; Tue, 17 May 2016 06:30:31 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1b2cGf-00029Y-LC for emacs-orgmode@gnu.org; Tue, 17 May 2016 12:30:25 +0200 Received: from ip-178-203-233-67.hsi10.unitymediagroup.de ([178.203.233.67]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 17 May 2016 12:30:25 +0200 Received: from rasmus by ip-178-203-233-67.hsi10.unitymediagroup.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 17 May 2016 12:30:25 +0200 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 Rainer M Krug writes: > What is the best way of including tikz into org for latex export (beamer > and pdf), I typically create tikz images with R tikzDevice or matplotlib. In this case, it’s useful to refer to the generated file: file:link/to/pix.tikz > and to have preview as well? I believe you’d have to include the code directly in the Org file to make the preview of latex fragments work. If this is essential, you could do something like this: #+latex_header: \usepackage{tikz} #+Caption: A special block that’s a figure with a tikz picture. #+begin_figure \begin{tikzpicture} \input{t.tikz} % raw tikz-content w/o \begin{}/end{} \end{tikzpicture} #+end_figure See also the tikz section on ob-latex in worg: http://orgmode.org/worg/org-contrib/babel/languages/ob-doc-LaTeX.html#sec-4-3 Rasmus -- Hooray!