emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Achim Gratz <Stromeko@NexGo.DE>
To: emacs-orgmode@gnu.org
Subject: Re: [PATCH] ob-R.el, ox-latex.el: support for tikz graphics
Date: Tue, 26 Feb 2013 10:50:17 +0000 (UTC)	[thread overview]
Message-ID: <loom.20130226T103317-743@post.gmane.org> (raw)
In-Reply-To: 87621gfmkb.fsf@gmail.com

Nicolas Goaziou <n.goaziou <at> gmail.com> writes:
> Aaron Ecay <aaronecay <at> 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.

  reply	other threads:[~2013-02-26 10:50 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-24 18:51 [PATCH] ob-R.el, ox-latex.el: support for tikz graphics Aaron Ecay
2013-02-25 15:19 ` Nicolas Goaziou
2013-02-26 10:50   ` Achim Gratz [this message]
2013-02-26 12:25     ` Myles English
2013-02-26 13:21     ` Nicolas Goaziou
2013-02-26 14:33       ` Achim Gratz
2013-02-26 19:21       ` Aaron Ecay
2013-02-26 19:22         ` [PATCH] ox-latex: provide width and height options for images Aaron Ecay
2013-02-26 23:04           ` Rasmus
2013-02-27  2:02             ` Aaron Ecay
2013-02-27 18:40             ` Achim Gratz
2013-02-27  8:23           ` Nicolas Goaziou
2013-03-06  4:02             ` aaronecay
2013-03-06  4:04               ` [PATCH] ox-latex: Support tikz images, :width, and :height Aaron Ecay
2013-03-06  8:35               ` [PATCH] ox-latex: provide width and height options for images Nicolas Goaziou
2013-02-26 18:25 ` [PATCH] ob-R.el, ox-latex.el: support for tikz graphics Achim Gratz
2013-02-26 19:49   ` Aaron Ecay

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=loom.20130226T103317-743@post.gmane.org \
    --to=stromeko@nexgo.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).