emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Eric Schulte <schulte.eric@gmail.com>
To: Andreas Leha <andreas.leha@med.uni-goettingen.de>
Cc: emacs-orgmode@gnu.org
Subject: Re: patch for latex->tikz
Date: Wed, 17 Jul 2013 15:51:05 -0600	[thread overview]
Message-ID: <87r4ewj1o6.fsf@gmail.com> (raw)
In-Reply-To: <87zjtkeul6.fsf@med.uni-goettingen.de> (Andreas Leha's message of "Wed, 17 Jul 2013 23:37:41 +0200")

Andreas Leha <andreas.leha@med.uni-goettingen.de> 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

  reply	other threads:[~2013-07-17 21:53 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-17 21:37 patch for latex->tikz Andreas Leha
2013-07-17 21:51 ` Eric Schulte [this message]
2013-07-17 22:31   ` Andreas Leha
2013-07-18  8:49 ` Eric S Fraga

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87r4ewj1o6.fsf@gmail.com \
    --to=schulte.eric@gmail.com \
    --cc=andreas.leha@med.uni-goettingen.de \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).