-
-
Notifications
You must be signed in to change notification settings - Fork 873
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixes #752: now we treat the closing mark (e.g. @ or ```) as part of …
…the code chunk, instead of the beginning of a text chunk if you use version control tools, you will see a couple of blank lines removed this is actually a problem from day one once asked by @dmbates: https://groups.google.com/d/msg/knitr/Pf8yx7My01s/upl3QiqE2xcJ
- Loading branch information
Showing
3 changed files
with
23 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2b52194
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This does indeed prevent the whitespace from occuring, but it does not prevent the paragraph from breaking. It would be nice to have an option to do that, otherwise one still needs to do
\noindent
.2b52194
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess you can do
knit_hooks$set(text = function(x) paste('\\noindent', x))
.2b52194
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes I can (thanks!), but it's kind of hackish ;) As I said, it would be nice to have a general solution to this problem that seems rather common to me. Also note that your solution does not work in all cases, consider e.g. situations where there's a
parskip
between paragraphs. See, e.g., this question on SO.2b52194
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh I love LaTeX and typesetting... :) I'm afraid I will have to count on you to find a general solution, since I'm unlikely to have the bandwidth to deal with this issue in the near future.
2b52194
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The endless wonders of Latex... ;) Right now I also don't have the time, but maybe in a month or so I'll have some spare energy. If yes, I'll give it a try! In the meantime, thank you for your wonderful tool and the quick responses! :-)