I cannot reproduce the problem. It compiles successfully with TeXLive
2011 under Ubuntu. Can anyone else reproduce it?

Does this happen to packageVersion() only?

Regards,
Yihui
--
Yihui Xie <xieyi...@gmail.com>
Phone: 515-294-2465 Web: http://yihui.name
Department of Statistics, Iowa State University
2215 Snedecor Hall, Ames, IA


On Sat, Jun 2, 2012 at 7:27 PM, Scott Kostyshak <skost...@princeton.edu> wrote:
> LyX gives me an error when I have the R command `packageVersion` in a knitr
> chunk. Attached is a mwe .lyx that gives an error for me. I get this error
> on current trunk and on 2.0.3 when exporting or viewing as pdf (pdflatex).
> Exporting to latex (pdflatex) and then running pdflatex manually produces
> the pdf as expected but exits with error code 1 (even though no indication
> of a problem is given in the terminal which I find to be strange).
>
> I'm pasted the relevant part of the error from the log below and attached
> are the .lyx file, the .tex file that is produced when exported to latex
> (pdflatex) and the .log file.
>
> LaTeX Font Info:    Font shape `T1/cmtt/bx/n' in size <10> not available
> (Font)              Font shape `T1/cmtt/m/n' tried instead on input line
> 400.
> ! Undefined control sequence.
> <argument> ^^M## [1] '
>                       0.5'^^M
> l.405 \end{verbatim}
>
> The control sequence at the end of the top line
> of your error message was never \def'ed. If you have
> misspelled it (e.g., `\hobx'), type `I' and the correct
> spelling (e.g., `I\hbox'). Otherwise just continue,
> and I'll forget about whatever was undefined.
>
> ! Undefined control sequence.
> <argument> ^^M## [1] '0.5'
>                           ^^M
> l.405 \end{verbatim}
>
> Any ideas?
>
> Thanks,
>
> Scott

Reply via email to