[Tikzdevice-bugs] tikzDevice and pgfSweave

Cameron Bracken cameron.bracken at gmail.com
Fri Dec 4 08:57:14 CET 2009


On Fri, Dec 4, 2009 at 12:28 AM, Rasmus Pank Roulund
<rasmus.pank at gmail.com> wrote:
>
> Hi,
>
>
>> I was not able to reproduce this since I don't have have the data.
>> Could you possibly send the data or a more reproducible example. From
>> the image it indeed seems like the string placement is slightly off
>> and so warrants investigation.
>
> Sure. I was probably a bit sloppy. I figured you could use any regression, since the relevant part(s) of the plots would be identical. Anyhow, I have attached an example, which produce the spacing error. It might also produce similar errors with less exotic packages.

Ok, so I was able to reproduce this.  It does seem like a possible
bug, I will investigate further when I get a chance. Thanks for the
report.

>
>
>> I was not aware that latexmk was able to run as a daemon.
>
> sure. here is an example-script we use when doing pure LaTeX:
>        latexmk main.tex  --pdf --pvc
>
> At the moment I use the following script though:
>        cd sections
>        for file in *.Rnw ; do  pgfsweave --pgfsweave-only $file; done
>        cd ..
>        echo done
>        latexmk -pdf main.tex
>        # rm sections/*.tex
>        rm */*.sh
>        rm */*.map
>        rm */*.log

I use a very similar script

#!/bin/bash

R CMD pgfsweave --graphics-only "$1"
latexmk -pdf "${1%.*}"


>
> As you can tell from the attached test this is slow with lots of diagnostic plots. cacheSweave makes it better, though.

I consider cacheSweave a must when using pgfSweave and tikz. tikz
externalization (the external option in pgfSweave) helps even more
with lots of plots.  I have documents that take minutes to generate
graphics but with externalization they take only seconds.

>
> An alternative approach would be to implement Sweave in one's editor and have latexmk watch for changes.

This seems possible with TeXShop and TeXWorks at least since they can
use custom scripts.  I dont have much experience with other editors.

>
> IMO LaTeXDaemon for Win is better than latexmk. It also features synctex out of the box. latexmk has to 'hacked'.
>
>        http://william.famille-blum.org/software/latexdaemon/index.html
>

Shame it is only for windows.

>> My
>> experience in the past with continuous compilers is that they take too
>> many computer resources, but that is just me.
>
> It uses 2 pct of my 1.6-1.8Ghz C2D (I think that is the specs; it doesn't really interest me). I don't remember how
>
>> As for an R daemon,
>> there is a texmate bundle that does something similar though the goal
>> is different.
>
> I saw it, but I figured it was a daemon in the way that it included R into textmate (like ESS for Emacs). I did not investigate it probably since I could not find any proper README or info on it.
>
>> Charlie and I are actually investigating the idea of a latex daemon
>> for use with tikzDevice. Currently most of the time in string
>> calculations are composed of the time it takes to startup latex (which
>> is currently done for each string width calculation).  We are planning
>> on implementing this in a future release which will result in a
>> drastic speed improvement.
>
> Cool. As said a daemon functionality would be cool.
>
>> Thanks, I am really glad to hear you are making use of these tools.  I
>> also have found them incredibly useful for my own work.
>
> Sure thing.
>
> --Rasmus

-Cameron


More information about the Tikzdevice-bugs mailing list