DiagrammeR/mermaid flowchart in Rmarkdown file with output format PDF/LaTex
问题 I would like to include a mermaid diagram in a PDF generated with R markdown. According to this post, mermaid creates an HTML widget as output. Unfortunately, the answer provided there for xaringan slides does not work for PDFs generated in R markdown. A Rmd-MWE is below. Any help is greatly appreciated! --- title: "DiagrammeR: mermaid diagram in Rmd" output: pdf_document --- ```{r setup, include=FALSE} knitr::opts_chunk$set(echo = TRUE) ``` # Simple mermaid diagram ```{r} library(DiagrammeR)