-
-
Notifications
You must be signed in to change notification settings - Fork 134
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
Column break trick #89
Comments
This is a great idea! I will probably implement it as a css clas to be added to whatever header or r code chunk a user wants. Something like: .mybreak {
break-before: column;
} Then the user just needs to add the class within the .rmd like so: # First Column
Some text.
# Second Column {.mybreak}
Some more text.
```{r, class.source="mybreak"}
plot(iris$Sepal.Length,
iris$Sepal.Width,
col=iris$Species,pch=19)
``` |
That would be brilliant, thanks. |
So far I have it working but am not sure how to get the class added to the |
These asterisks/dashes are transformed to hr {
margin: 0;
border: none;
break-before: column;
}
AFAIK, this is not possible. I have two ideas to add a class to the images. 1. Use
2. This kind of plot hook to add a support for the
|
So I tried it and the hook does work and ads the Thanks again for helping out so much @RLesur ! |
You're welcome! knitr::knit_hooks$set(plot = knitr::hook_plot_html) and .rimage {
break-before: column;
} |
Tested and works 🚀 ! Thanks so much @RLesur ! I will be implementing this soon to the master branch. It will make poster manipulation much easier! 😄 And thank you @remlapmot for starting this conversation! |
After playing around with this more I have realized that the automatic figure numbering is broken when this hook is used as well as inline references, ie For now I will suggest that those who wish to have the break occur at begining of a code chunk which also prints out the code on the poster ( |
This isn't an issue but I thought I would post in case this is helpful for anyone else.
When using betterport I found that I needed a column break.
I got one by assigning a level 4 header to have a column break before it in my html template by adding the following CSS within the
<style>
tag:Then in my Rmd file I put a level 4 header
####
where I want the column break.Usually, in RMarkdown three or more asterisks or dashes indicate a horizontal rule or page break, so maybe it would have been better to assign the column break to that; but I didn't know how to do that and this seems to work.
PS. I have put my poster here:
https://github.com/remlapmot/mr2019-tom-palmer-poster
The text was updated successfully, but these errors were encountered: