首页 > 解决方案 > Rmarkdown中美人鱼甘特图的渲染问题

问题描述

我正在尝试使用 DiagrammeR mermaid 在我的 Rmarkdown 中插入甘特图。问题是当我编织到 html 时,我的文本看起来都是灰色/透明的。我注意到当我删除标题的## 时,一切都很好。有人对我有解决方案吗?

这是代码模板:

---
title: "My title"
author: "J. Doe"
output:
  html_document:
    toc: no
bibliography: biblio.bib
--- 

```{r libraries, include=FALSE}
library(DiagrammeR)```


```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)```

<style>
body {
text-align: justify}
</style>

## Table of content
1. [Project objectives](#bullet-1)  
2. [Done and current tasks](#bullet-2)  
3. [Bibliography](#bullet-3)  

## 1. <a class="anchor" id="bullet-1"></a> Project objectives

PROJECT DESCRIPTION

## 2. <a class="anchor" id="bullet-2"></a> Done and *current* tasks

TASKS


```{r, echo=FALSE}
gantt=DiagrammeR::mermaid("
gantt
dateFormat  YYYY-MM-DD
title A Very Nice Gantt Diagram

section Basic Tasks
This is completed             :done,          first_1,    2014-01-06, 2014-01-08
This is active                :active,        first_2,    2014-01-09, 3d
Do this later                 :               first_3,    after first_2, 5d
Do this after that            :               first_4,    after first_3, 5d

section Important Things
Completed, critical task      :crit, done,    import_1,   2014-01-06,24h
Also done, also critical      :crit, done,    import_2,   after import_1, 2d
Doing this important task now :crit, active,  import_3,   after import_2, 3d
Next critical task            :crit,          import_4,   after import_3, 5d

section The Extras
First extras                  :active,        extras_1,   after import_4,  3d
Second helping                :               extras_2,   after extras_1, 20h
More of the extras            :               extras_3,   after extras_1, 48h
")
gantt```

## 3. BIBLIOGRAPHY

非常感谢!

J。

标签: r-markdowndiagrammer

解决方案


推荐阅读