emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] Problems with LaTeX source block


From: Andreas Leha
Subject: Re: [O] Problems with LaTeX source block
Date: Tue, 16 Jul 2013 10:03:06 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

Hi Julien,

Julien Cubizolles <address@hidden> writes:

> Hi Andreas, I forgot to send the following remarks in my previous
> post.
>
> I encounter a problem with pgfplots. The following works, and produces a
> png with a white background
> #+NAME: python-tikz
> #+header: :results raw :file py2tikz_sin.png
> #+header: :imagemagick yes :fit yes :headers '("\\usepackage{tikz,pgfplots}")
> #+BEGIN_SRC latex :exports results
>     \begin{tikzpicture}
>       \begin{axis}
>         \draw [green,->] (0,0) -- (2,2) -- (3,1);
>       \end{axis}
>     \end{tikzpicture}
> #+END_SRC
>
> However, the following produces a png with only the axis displayed (but
> the boundaries are wrong), the data points don't appear. Strangely, the
> png produced is transparent: the background is the one of the Emacs buffer.
>
> #+NAME: python-tikz
> #+header: :results raw :file py2tikz_sin.png
> #+header: :imagemagick yes :fit yes :headers '("\\usepackage{tikz,pgfplots}")
> #+BEGIN_SRC latex :exports results
>     \begin{tikzpicture}
>       \begin{axis}
>         \addplot [red,only lines] table {sin_py2csv.csv};
>       \end{axis}
>     \end{tikzpicture}
> #+END_SRC
>
> The temp latex file seems ok (pdflatex produces a correct picture). I
> couldn't find the command line for imagemagick conversion to png to test
> it though.

The problem is in your external data file, I guess.

What happens, is that org creates a temporary tex file in a temporary
directory (it is in /tmp/babel-sth under Linux) and compiles this tex
file there.  At that directory your sin_py2csv.csv is not present.

So, one quick remedy should be to use an absolute path to the csv.

Regards,
Andreas




reply via email to

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