nomnoml
nomnoml copied to clipboard
no svg figure displayed in xaringan presentation
Great package, I love it.
However, when using the nomnoml knitr engine, the diagram will not be displayed as svg, when I use the option svg = TRUE
Example
---
title: "Example"
author: "For Instance"
date: '`r format(Sys.Date(), format = "%d. %B %Y")`'
output:
xaringan::moon_reader:
lib_dir: lib
seal: true
nature:
ratio: "16:9"
---
```{nomnoml, svg=TRUE}
[Hello]-[World]
```
(I save this as index.Rmd)
When I run xaringan::inf_mr("index.Rmd")
, I see the slide as expected, however, it's not an svg-file, which you can see when I try to save it by right-click → "Save Image As ...". It gets saved as "canvas.png". Why?
Changing to svg=FALSE
seems to have no effect.
Yes, that does seem to be the case.
Try using an R chunk instead, since this seems to work correctly:
```{r}
nomnoml::nomnoml("[Hello]-[World]", svg = TRUE)
```