yihui/knitr — Issue #116: Variable fig.height not accepted
Author: dmenne
Created: 2012-01-26 09:07:50+00:00
State: open

It's great to have variable parameters in <<>>, so I had to try it using fig.height (knitr_0.1.6). Looks like it work syntactically, but give a warning and is not accepted.

It's great that we have output width/height separately!

```\documentclass{article}
\SweaveOpts{dev=pdf, echo=FALSE,include=TRUE,results=hide, fig.height=4, fig.keep=high}

<<>>=
myheight=4
@

\begin{document}

\begin{figure}
\centering
<>=
plot(rnorm(10))
@
\caption{fixed height works ok}
\label{fig:myfig1}
\end{figure}

\begin{figure}
\centering
<>=
plot(rnorm(10))
@
\caption{Variable height is not accepted, gives warning "not changing height"}
\label{fig:myfig}
\end{figure}

\end{document}
´´´