I use Lyx (2.1.4) with knitr (1.10.5). I have a lot of trouble having the code chunks respect the width that I tried setting through various ways:
- In the chunk options (
width=50); options("width")=50at the top of my documentopts_chunk$set(width=50)also at the top of my document
The results are always the same:
What am I missing? Any help appreciated.
Edit: I realized that it has to do with the quoted string which won't be broken into several lines. Without long strings, the width setting is respected. (Still, the problem remains unsolved.)

listingsorminted. – Adam Liter Aug 09 '15 at 02:13listingswithknitr, but I'm not super familiar with how this works. – Adam Liter Aug 09 '15 at 02:15breaklinesoption oflistingswithknitr. Does this help? – Adam Liter Aug 09 '15 at 02:31