Error in getMetricsFromLatex when using \includegraphics before \begin{document}

105 views Asked by At

Following Code compiles successfully, but the plot doesn't work (Error in getMetricsFromLatex(TeXMetrics, verbose =verbose): TeX was unable to calculate metrics ...)

\documentclass{beamer}
\usepackage{tikz}

\usefoottemplate{{\includegraphics[scale=0.045]{Rlogo.png}}}%

\begin{document}
<<setup, include=FALSE>>=
library(knitr)
library(tikzDevice)
options(tikzDefaultEngine='xetex')
opts_chunk$set(dev="tikz")
@

\begin{frame}[fragile]
<<fig.width=2, fig.height=2>>=
data <- c(1, 2, 3)
barplot(table(data))
@
\end{frame}
\end{document}

When I delete \includegraphics... in the Code above everything works fine.

0

There are 0 answers