From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Schulte Subject: Re: patch for latex->tikz Date: Wed, 17 Jul 2013 15:51:05 -0600 Message-ID: <87r4ewj1o6.fsf@gmail.com> References: <87zjtkeul6.fsf@med.uni-goettingen.de> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:50821) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UzZep-000101-H2 for emacs-orgmode@gnu.org; Wed, 17 Jul 2013 17:53:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UzZen-0001JP-Ue for emacs-orgmode@gnu.org; Wed, 17 Jul 2013 17:53:11 -0400 Received: from mail-pb0-x22c.google.com ([2607:f8b0:400e:c01::22c]:41910) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UzZen-0001J6-O2 for emacs-orgmode@gnu.org; Wed, 17 Jul 2013 17:53:09 -0400 Received: by mail-pb0-f44.google.com with SMTP id uo1so2373054pbc.3 for ; Wed, 17 Jul 2013 14:53:08 -0700 (PDT) In-Reply-To: <87zjtkeul6.fsf@med.uni-goettingen.de> (Andreas Leha's message of "Wed, 17 Jul 2013 23:37:41 +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-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Andreas Leha Cc: emacs-orgmode@gnu.org Andreas Leha writes: > Hi all, > > attached is a small patch that makes it possible to 'evaluate' latex > source blocks to tikz files. Applied, thanks. > > When the :file header argument has a value ending in '.tikz' the > content of the body of the source block will be copied into the > resulting tikz file. This makes handling of tikz figures with > captions easier. > > Here is a use-case: [...] > This example works well besides some weird scaling/placement issue. > The best way I've found to deal with scaling/placement of raw or inline tikz is to use the subcaption and adjustbox packages as in the following example. % latex \begin{figure} \centering \begin{minipage}[b]{0.32\linewidth} \adjustbox{width=1.0\linewidth}{ \begin{tikzpicture} % ... \end{tikzpicture} } \subcaption{\small part 1} \end{minipage} \begin{minipage}[b]{0.32\linewidth} \adjustbox{width=1.0\linewidth}{ \begin{tikzpicture} % ... \end{tikzpicture} } \subcaption{\small part 2} \end{minipage} \begin{minipage}[b]{0.32\linewidth} \adjustbox{width=1.0\linewidth}{ \begin{tikzpicture} % ... \end{tikzpicture} } \subcaption{\small part 3} \end{minipage} \caption{Example with three sub-parts} \label{fig:example} \end{figure} -- Eric Schulte http://cs.unm.edu/~eschulte