I checked out the conversation between Speravir and Yihui, and also Yihui's site and video for getting knitr to work with TeXworks. However, I am definitely not super tech-savvy and I'm having some issues. I went through all the steps in TeXworks to add knitr, but I'm confused about what my .exe file should be, and also what the basename.rnw file should be. I think what I've entered is incorrect and is the cause of the error I'm getting when I compile in TeXworks: Overfull \hbox... Can you please provide more detail? Thanks!


From what you have said above, I suspect the first error is a case error.

The extension must be Rnw' and notrnw` This is not optional. I presume you have set up as discussed by knitr with TeXworks in Speravir's answer with is consistent with Yihui's instructions. http://yihui.name/knitr/demo/editors/

You need to test the setup with a minimal *.Rnw file. As follows:

Test of Knitr setup for editor


and test for base graphics



Save the above as `testknitr.Rnw' and have in the main window of TexWorks.

In TexWorks, select the knitr option from the tools menu.

Next select pgflatex

And finally select the view pdf option.

You should see: enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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