Skip to content

Problem with figures

7 messages · Duncan Murdoch, Shige Song, Yihui Xie

#
On 12-12-02 5:42 PM, Shige Song wrote:
I don't use knitr so I can't really help, but you didn't tell us how you 
passed this file to knitr, so maybe nobody can.  However, if you were 
using Sweave, you would need to mention that the code chunk produces a 
figure (using "fig=TRUE" in the <<>>= header).

Duncan Murdoch
#
fig=TRUE is irrelevant here, and knitr does not need fig=TRUE at all
(plots are automatically recorded).

The real problem is the [preview] option; remove it and you are all set.

Next time if you have problems with tikzDevice, you can take a look at
the LaTeX log to know what exactly is wrong, e.g. in this case you
will see

    ! LaTeX Error: Option clash for package preview.

The log file is at figure/fig1.log by default in your case.

Regards,
Yihui
--
Yihui Xie <xieyihui at gmail.com>
Phone: 515-294-2465 Web: http://yihui.name
Department of Statistics, Iowa State University
2215 Snedecor Hall, Ames, IA
On Sun, Dec 2, 2012 at 5:36 PM, Shige Song <shigesong at gmail.com> wrote:
#
I'm using the latest version of TeXLive under Ubuntu
(http://packages.ubuntu.com/quantal/tex/texlive) so I did not realize
the version of standalone can be a problem. My version is also 1.1a,
but I do not have any problems if I remove the preview option from
your example. Sounds like there is a subtle difference somewhere
between your Debian TeXLive and my Ubuntu TeXLive...

Regards,
Yihui
--
Yihui Xie <xieyihui at gmail.com>
Phone: 515-294-2465 Web: http://yihui.name
Department of Statistics, Iowa State University
2215 Snedecor Hall, Ames, IA
On Mon, Dec 3, 2012 at 9:29 AM, Shige Song <shigesong at gmail.com> wrote: