我有一个rmarkdown演示文稿(ioslides)有3张幻灯片,其中流程图在DiagrammeR
的美人鱼中运行。保存为.Rmd的以下文件可以重现该示例(至少在我的机器中,希望也是你的):
---
title: "Untitled"
author: "author"
date: "28 de enero de 2018"
output: ioslides_presentation
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = FALSE)
require(DiagrammeR)
```
## DiagrammeR's mermaid
It's not producing consistent results in slides when using line breaks.
```{r flow}
mermaid("
graph LR
C(CLIENTES <br>Clients) --> D[Doctors]
U(USUARIOS <br>Users <br>Patients <br>Nurses) --> D
D --> S(SALIDAS <br>Medicines <br>Surgery)
style C fill: #f5f5dc
style D fill: #4682b4
style U fill: #ffe4c4
")
```
## Second attempt
```{r flow2}
mermaid("
graph LR
C(CLIENTES <br>Clients) --> D[Doctors]
U(USUARIOS <br>Users <br>Patients <br>Nurses) --> D
D --> S(SALIDAS <br>Medicines <br>Surgery)
")
```
## Third attempt
```{r flow3}
mermaid("
graph LR
C(CLIENTES <br>Clients) --> D[Doctors]
U(USUARIOS <br>Users <br>Patients <br>Nurses) --> D
D --> S(SALIDAS <br>Medicines <br>Surgery)
style C fill: #f5f5dc
style D fill: #4682b4
style U fill: #ffe4c4
")
```
运行时,它会生成两个正常大小的图表和一个小图表。 我注意到的事情:
cache = FALSE
或cache = TRUE
没有什么区别ioslides
更改为slidy
时,它会起作用(这是我的替代方案,但如果有解决方案,我宁愿选择ioslides。)相关部分或R.Version
和Sys.info
:
> Sys.info()
sysname
"Linux"
release
"4.9.0-5-amd64"
version
"#1 SMP Debian 4.9.65-3+deb9u2 (2018-01-04)"
nodename
"pavos"
machine
"x86_64"
## R and packages Versions
> R.Version()
$`svn rev`
[1] "73796"
$version.string
[1] "R version 3.4.3 (2017-11-30)"
$nickname
[1] "Kite-Eating Tree"
> packageVersion("DiagrammeR")
[1] ‘0.9.2’
> packageVersion("rmarkdown")
[1] ‘1.8’
我的期望:在ioslides输出的所有幻灯片中使用完整大小且色彩正确的图表进行一致显示的演示文稿。
由于