0

I have installed Lyx 2.0.5 and have Miktex 2.9 installed running in Win 7.0 as well as R Ver 2.15

I have installed knitr in R with simple code

    <<>>=
    1+1
    @

and can use View DVI to produce a file in Yak

When I try and use "eyes" on the bar to produce a PDF (pdflatex) I get the following message.

enter image description here

Can anyone give me some idea what the problem might be

Thanks

  • 1. post the complete example please; 2. is there a particular reason that you still need to use DVI? I thought DVI had died and everybody was using PDF... – Yihui Xie Mar 04 '13 at 20:44
  • Thanks, 1) was only trying to get the above chunk to work , so no extra code and 2)only tried DVI to see if it worked -which it did. As a matter of interest it works when I select Sweave module instead of knitr so it seems to be connected to module selection. – Steve Sidney Mar 04 '13 at 22:02
  • I was asking for a complete example because I saw `lyx2lyx -c big5` in your error message, which is unusual if your original document really does not contain "extra code". At least you can export your document to Rnw and paste it here. BTW, does PDF work at all? – Yihui Xie Mar 05 '13 at 00:34
  • Ok here is the code after exporting
    – Steve Sidney Mar 05 '13 at 07:43
  • %% LyX 2.0.5.1 created this file. For more info, see http://www.lyx.org/. %% Do not edit unless you really know what you are doing. \documentclass[english]{article} \usepackage[T1]{fontenc} \usepackage[latin9]{inputenc} \usepackage{babel} \begin{document} <<>>= 1+1 @ \end{document}
    As far as PDf is concerned. Yes I am able to get ps2pdf to give me one without any other changes
    – Steve Sidney Mar 05 '13 at 07:47
  • Final comment. The exported Rnw file compiles perfectly in RStudio using knitr. Seems really puzzling that it doesn't work in Lyx – Steve Sidney Mar 05 '13 at 07:55
  • I have never tested LyX/DVI under Windows. I always generate PDF (either `pdflatex` or `xelatex`) directly. I will see what is wrong there the next time I switch to Windows if I can remember this issue. – Yihui Xie Mar 05 '13 at 20:00
  • My problem is NOT with Lyx/DVI. I only did that to see if knitr works. I was trying to get pdflatex to work with knitr and in my case it does not work and the code I tried is from the Rnw file that yoiu asked me to export. Works fine with Sweave module but not with knitr. Thanks for trying to help – Steve Sidney Mar 06 '13 at 08:23
  • Yihui - success at last. Not sure what was wrong but I uninstalled Lyx and re-installed and it now works fine... Thanks for trying to help. – Steve Sidney Mar 06 '13 at 14:02
  • Hmm... that is interesting. Anyway, glad it works now :) – Yihui Xie Mar 06 '13 at 22:41

0 Answers0