New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Chunk that does not produce any output generates two empty lines in LaTeX output #231
Comments
There's a workaround that consists of defining a command that gobbles all following empty lines: http://tex.stackexchange.com/questions/55914/command-that-gobbles-all-following-empty-lines |
I do not know if this is a bug, and unfortunately this is not configurable. Why do you want to remove the two empty lines? Because it makes |
Exactly. If I want to back up a written sentence in a report with an R assertion, I want to keep both next to each other. |
Fair enough. Can you move the chunk before a or after b? Since you do not want to output anything from the chunk, moving it might not hurt. |
Yes, I could, but I prefer keeping code and text as close as possible to each other. For now, I use a TeX macro that gobbles all following empty lines to achieve what I want, see the link in one of my former comments. |
The main reason that I do not want to change this is due to the concordance feature. It requires a little bit more careful thinking; I will think about it later. |
I decided not to change this. Sorry. |
No problem, I'm fine with the workaround. You might want to list this behavior (and a hint how to work around it) in your documentation somewhere. Please feel free to use the code in the TeX.SX answer. |
Thanks! |
This old thread has been automatically locked. If you think you have found something related to this, please open a new issue by following the issue guide (https://yihui.org/issue/), and link to this old issue if necessary. |
The following minimal.Rnw input file
generates on output (using
R --no-save <<<"library(knitr); knit('minimal.Rnw')"
in a bash shell)That's two empty lines too much for my understanding. Sweave used to leave out these empty lines.
Is this a bug or a (hopefully configurable) feature?
The text was updated successfully, but these errors were encountered: