Re: [R] latex \subfloat{} incompatible with sweave/knitr code

2012-08-31 Thread Yihui Xie
OK, then this turns out to be a pure LaTeX problem. Thanks for the experiments and examples, and they worked very well for me. It seems subcaption is on the radar of LyX 2.1 now. Regards, Yihui -- Yihui Xie Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State University

Re: [R] latex \subfloat{} incompatible with sweave/knitr code

2012-08-31 Thread Liviu Andronic
On Thu, Aug 30, 2012 at 12:50 AM, Yihui Xie wrote: > Do you know what environments are allowed inside \subfloat{}? The > No, not really. From what I can tell, \subfloat{} is provided by the `subfig' package. Here's what their docs have to say about compatibility with verbatim and fancyvrb packages

Re: [R] latex \subfloat{} incompatible with sweave/knitr code

2012-08-30 Thread Liviu Andronic
On Thu, Aug 30, 2012 at 12:50 AM, Yihui Xie wrote: > Do you know what environments are allowed inside \subfloat{}? The > graphics example works because it is nothing but a simple > \includegraphics{} command. The table example you gave is much more > complicated than that. > > Regards, > Yihui > -

Re: [R] latex \subfloat{} incompatible with sweave/knitr code

2012-08-29 Thread Duncan Mackay
Hi Yihui For figures in latex my bible is Keith Reckdahl Using Imported Graphics in LATEX and pdfLATEX Version 3.0.1 January 12, 2006 I think there is a 2009 version but I cannot find it Below is an example of a 3 X 1 figure \begin{figure}[h] \centering % Figure A \subfloat[A]{ \label{subfig:

Re: [R] latex \subfloat{} incompatible with sweave/knitr code

2012-08-29 Thread Yihui Xie
Do you know what environments are allowed inside \subfloat{}? The graphics example works because it is nothing but a simple \includegraphics{} command. The table example you gave is much more complicated than that. Regards, Yihui -- Yihui Xie Phone: 515-294-2465 Web: http://yihui.name Department

Re: [R] latex \subfloat{} incompatible with sweave/knitr code

2012-08-29 Thread Liviu Andronic
Hey Yihui On Wed, Aug 29, 2012 at 6:17 PM, Yihui Xie 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

Re: [R] latex \subfloat{} incompatible with sweave/knitr code

2012-08-29 Thread Yihui Xie
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 The LyX and Rnw source files can be checked out with GIT under https://github.c

Re: [R] latex \subfloat{} incompatible with sweave/knitr code

2012-08-29 Thread Liviu Andronic
On Wed, Aug 29, 2012 at 1:34 PM, Steve Lianoglou wrote: > This isn't exactly what you want, but I'm using kintr and building and > saving my figures in the their own "chunks" then just inlining the > path to the generated figure in the \subloat{..}. Things are working > fine, eg. my default settin

Re: [R] latex \subfloat{} incompatible with sweave/knitr code

2012-08-29 Thread Steve Lianoglou
Hi, On Wed, Aug 29, 2012 at 6:56 AM, Liviu Andronic wrote: > Dear all > Are LaTeX \subfloat{} commands incompatible with Sweave code? I cannot > get the following code to compile properly: > \begin{table} > \subfloat[asdfa]{<<>>= > 2+2 > @ > > } > > \caption{asdf} > > \end{table} > > > If I repla

[R] latex \subfloat{} incompatible with sweave/knitr code

2012-08-29 Thread Liviu Andronic
Dear all Are LaTeX \subfloat{} commands incompatible with Sweave code? I cannot get the following code to compile properly: \begin{table} \subfloat[asdfa]{<<>>= 2+2 @ } \caption{asdf} \end{table} If I replace the Sweave chunk with a random string or a table, the compilation works fine. Any ide