forked from Sharpie/RTikZDevice
-
Notifications
You must be signed in to change notification settings - Fork 27
Open
Description
I am using the console output mode of tikzDevice to include the TikZ-output directly in my tex file. Because I'm using knitr and not Sweave, the example from the manual doesn't work:
\documentclass{article}
\usepackage{tikz}
\begin{document}
\begin{figure}[ht]
\centering<<inline,echo=FALSE,results='tex'>>=
require(tikzDevice)
tikz(console=TRUE,width=5,height=5)
x <- rnorm(100)
plot(x)
dummy <- dev.off()
@ \caption{caption}
\label{fig:inline}
\end{figure}
\end{document}I will get all the output in a verbatim-envirionment.
For the plot to show, I need to change results='tex' to results='asis'
For a ggplot2 graph I also need to use results='asis' and always end the chunk with dummy <- dev.off()
Could you update the documentation for the use with knitr?
Metadata
Metadata
Assignees
Labels
No labels