I'm writing an .rmd
file in RStudio, and using the Knit button to create a slide deck. I have two options, it appears, ioslides and slidy. I don't really like the default look-and-feel of either. (I think ioslides uses screen real estate inefficiently, and slidy feels like a graphic designer wasn't involved.)
I did a web search for alternative templates/styles/themes, and came upon pages like this gallery, but the tools there seem to be for use outside RStudio, as completely independent projects. In other words, they're not just themes for what I've got, but entirely other solutions that would change my workflow.
Is there a simple way to tell RStudio to use a different template/theme with either ioslides or slidy? For example, can I download a CSS file from somewhere, and point RStudio to it with the css:
option in the yaml
header of my .rmd
file? If so, is there a gallery of such CSS templates?
To create a new R Presentation you execute the New File -> R Presentation command: After specifying the location to save the presentation, a new presentation will be created and a preview will show within the Presentation tab in the upper right corner of the IDE.
To open a new file, click File > New File > R Markdown in the RStudio menu bar. A window will pop up that helps you build the YAML frontmatter for the . Rmd file. Use the radio buttons to select the specific type of output that you wish to build.
Here's what I ended up doing. It's not as smooth as I'd like it to be, but it's decent. I'm glad to entertain better answers.
http:
so that knitr knows not to look on your filesystem for the additional resources (fonts), but on the Web.|
) in that URL, because knitr can't handle them (as far as I can tell). (Remove everything after the pipe, too.)url('../fonts/***.eot');
to now instead be of the form url('https://netdna.boostrapcdn.com/bootswatch/3.0.0/fonts/***.eot');
.css:
attribute in the YAML header.Have you tried using the built in Bootswatch themes? They're fairly limited, but in doing so you can quickly customise many elements.
e.g
title: "Test"
author: "John"
date: "5 June 2017"
output:
slidy_presentation:
fig_width: 12.5
font_adjustment: -1
theme: readable
Other themes may be found here Bootswatch.
edit: removed a typo
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With