On 8/16/2012 9:51 PM, Yihui Xie wrote:
That should be the best solution for this particular case, but you are
right this problem needs to be solved at a lower level in knitr or
Sweave, or LyX's math mode. The difficulty on R's side is from parsing
\Sexpr{} using regular expressions. In your case, the R code should be
0.5^{2} but knitr sees 0.5^{2 because } terminates the code.


I see, thanks for clarification. Would it be possible to define a math-specific inset, that formats and acts like the R/S expression inset, but inside a math inset? That way, knitr does not need to change and it would be more in line with the other inset of the knitr (Rnw) module.

Anyone?


Reply via email to