Browse Source

Rmd template now renders without showtext

Fixes #65
tags/v0.4.1
Garrick Aden-Buie 4 years ago
parent
commit
f44ce08889
No known key found for this signature in database
2 changed files with 10 additions and 5 deletions
  1. +3
    -0
      NEWS.md
  2. +7
    -5
      inst/rmarkdown/templates/xaringanthemer/skeleton/skeleton.Rmd

+ 3
- 0
NEWS.md View File

@@ -11,6 +11,9 @@
argument. Color names should be valid CSS classes that can also be used as CSS
variable names, but the `style_` function only stops with an error if the
color name contains spaces. (@jdlom #69)
* Fixed an issue that caused problems rendering the xaringanthemer R Markdown
template if the showtext package isn't installed (thanks @beatrizmilz, #65).

# xaringanthemer 0.4.0


+ 7
- 5
inst/rmarkdown/templates/xaringanthemer/skeleton/skeleton.Rmd View File

@@ -304,17 +304,19 @@ library(ggplot2)

---

```{r plot-example-themed, eval=requireNamespace("ggplot2", quietly=TRUE)}
```{r plot-example-themed, eval=requireNamespace("showtext", quietly=TRUE) && requireNamespace("ggplot2", quietly=TRUE)}
g + xaringanthemer::theme_xaringan(text_font_size = 16, title_font_size = 18) +
ggtitle("A Plot About Cars")
```

.footnote[Requires `{showtext}`]

---
layout: false

## Square image

<center><img src="https://octodex.github.com/images/labtocat.png" height="400px" /></center>
<center><img src="https://octodex.github.com/images/labtocat.png" alt="GithHub Octocat" height="400px" /></center>

.footnote[GitHub Octocat]

@@ -322,7 +324,7 @@ layout: false

### Wide image

![](https://guides.github.com/activities/hello-world/branching.png)
![A wide image with a diagram of branching in git.](https://docs.github.com/assets/images/help/repository/branching.png)

.footnote[Wide images scale to 100% slide width]

@@ -331,11 +333,11 @@ layout: false
## Two images

.pull-left[
![](https://octodex.github.com/images/motherhubbertocat.png)
![A GitHub Octocat, style "mother hubber"](https://octodex.github.com/images/motherhubbertocat.png)
]

.pull-right[
![](https://octodex.github.com/images/dinotocat.png)
![A GitHub Octocat, style "dinotcat"](https://octodex.github.com/images/dinotocat.png)
]

---

Loading…
Cancel
Save