[R] latex \subfloat{} incompatible with sweave/knitr code
Liviu Andronic
landronimirc at gmail.com
Wed Aug 29 22:30:25 CEST 2012
Hey Yihui
On Wed, Aug 29, 2012 at 6:17 PM, Yihui Xie <xie at yihui.name> wrote:
> Yes that is one possible solution, but the filename is hard-coded
> somehow. The key to this problem is a missing new line before <<>>=,
> which was addressed in
> https://github.com/downloads/yihui/knitr/knitr-subfloats.pdf
>
Thanks a lot for the example.
> The LyX and Rnw source files can be checked out with GIT under
> https://github.com/yihui/knitr/tree/master/inst/examples If you open
> knitr-subfloats.lyx, you will see an intentional new line in the ERT,
> and that is to break \subfloat[asdfa]{<<>>= into
>
> \subfloat[asdfa]{
> <<>>=
>
This trick doesn't seem to work for table subfloats. I added a nearly
identical example to your document, this time using table floats
(instead of figure floats). [1] The document doesn't compile. Any
ideas?
Regards
Liviu
[1] http://s000.tinyupload.com/index.php?file_id=64085332583398153478
More information about the R-help
mailing list