Closed ColinFay closed 3 years ago
This actually has been a mystery to me, because I don't know why the lines were automagically wrapped in my books and I didn't use listings or knitr hooks, e.g.,
I'll take a closer look, but can't spend too much time on it for now, so I can't promise I'll figure it out. You can proceed with writing your book, and I'm sure this problem is fixable.
Should be fixed with ad8521c, but I still don't understand why the lines could be automatically wrapped...
Hey,
First of all, thanks for this template, it saved us a lot of time :)
I'm facing a little issue I can't figure out (and thanks @cderv from trying to solve it with me 💪):
When printing the book to pdf, some of the code outputs overflow the width of the pdf.
This happens with the default template from here, and can be reproduced as such:
Here is the output of page 9:
What I've tried:
Following https://bookdown.org/yihui/rmarkdown-cookbook/text-width.html:
options(width = 30)
definie a knitr kook as in https://github.com/yihui/knitr-examples/blob/master/077-wrap-output.Rmd
Change of the font size as defined in https://yihui.org/en/2018/08/bookdown-crc/
None of these seemed to solve the issue completely: changing the font size works to a certain extent, but for very long line the code still overflow.
Are there any solution to correct this?
Thanks for your help, Colin