Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I have two knitr chunks in LyX that work fine by themselves in their separate floats (this post applies to both figures and tables). But when I try to put them in as subfloats (by selecting both and going to Insert > Float > Table or Insert > Float > Figure), I get errors.

For information on subfloats, see User Guide section 4.6.2.1 Figure Floats.

I'm using LyX 2.0.3 and svn, and knitr version .3

share|improve this question
1  
I suggest you add a tag knitr to the post as well. –  Yihui Mar 8 '12 at 7:25
1  
@Yihui I would like to, but there is no knitr tag and you have to have 300 reputation to create a tag. Once someone creates the tag I will come back and add it. –  scottkosty Mar 8 '12 at 8:00

1 Answer 1

up vote 3 down vote accepted

I guess a LyX example is the best way to answer your question; I have created one here (right click and save as a LyX document). Note you have to install the development version of knitr: https://github.com/yihui/knitr#readme. Below is a screenshot of the output:

use subfloats with knitr in LyX

share|improve this answer
    
Thank you Yihui –  scottkosty Mar 8 '12 at 7:59

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.