emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[O] [patch] ox-latex.el: support for pgf files


From: Rasmus
Subject: [O] [patch] ox-latex.el: support for pgf files
Date: Mon, 20 May 2013 12:11:33 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

This patch adds support for pgf files.  pgf is the machine upon which
tikz is build.  For instance matplotlib (of Python) and printpgf (of
Octave) both produces pgf files.  It's just a question of recognizing
the extension.  With this patch the following document exports
correctly:

#+TITLE: PGF test
#+LATEX_HEADER: \usepackage{pgf}
#+BEGIN_SRC emacs-lisp :exports none
  (set (make-local-variable 'org-latex-pdf-process)
       '("xelatex -pdf %f"))
#+END_SRC
#+BEGIN_SRC python :results raw :exports results
  from matplotlib import pylab as plt
  x, y = plt.rand(2)
  plt.scatter(x, y)
  fig = "test.pgf"
  plt.savefig(fig) ## utf8 by default
  return("".join(["[[file:", fig, "]]"]))
#+END_SRC

–Rasmus

-- 
Hooray!

Attachment: 0001-Support-for-pgf-files-in-ox-latex.el.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]