4

I run pgfSweave on a document that includes both diagrams drawn inline using tikz, and inline R-code. The R-code is executed and perfectly rendered but the diagrams don't appear in the final PDF. Instead, message are displayed at the appropriate locations stating that: [[IMAGE DISCARDED DUE TO '/tikz/external/mode-list and make']]. Is there a workaround to this problem?

Thanks!

Jay
  • 41
  • 1

1 Answers1

3

This is a consequence of the use of the TikZ externalization library in the new version of pgfSweave. pgfSweave will add (among other things):

\usetikzlibrary{external}
\tikzexternalize[mode=list and make]

This has the consequence that all of your TikZ pictures (generated by pgfSweave or not) will be externalized. pgfSweave is smart enough to disable externalization for pictures it generates if you have not turned on externalization but it cannot do anything about your own pictures. As a result you need to run the makefile that is generated to get you pictures to show up.

If you are using externalization already then your own TikZ pictures should be externalized along with all your R plots and everything should be fine. See the external library section of the TikZ manual for how to customize the names and output directories.

If you are not using externalization (which I highly suggest you do) then you have two choices:

  1. Externalize your pictures

    make -f <main>.makefile
    
  2. Or if you dont want to use externalization at all then you can disable it for a particular picture

    {\tikzexternaldisable
    \begin{tikzpicture}
    ...
    \end{tikzpicture}
    }
    

The pgfSweave vignette and the TikZ manual have much more information if you are interested.

isomorphismes
  • 8,233
  • 9
  • 59
  • 70
cameron.bracken
  • 1,236
  • 1
  • 9
  • 14