r-markdown - 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。
解决方案
推荐阅读
- string - 想要删除此字符串末尾的数字并存储到颤振中的新变量
- sql - 如何使用 Oracle SQL 填充两个值范围之间的数字
- algorithm - 如何迭代地解决递归问题?
- linux-device-driver - 警告:“__aeabi_uldivmod”opendla.ko 中未定义的符号
- javascript - 如何删除引导行内的额外空间
- linux - 在多个远程服务器上通过 SSH 运行命令的 shell 脚本
- javascript - 交换变量 JS
- python - 使用不记名令牌和刷新令牌从 api 请求数据
- javascript - 是否有任何函数可用于使用 React Js Hook 查看新更新的数组状态?
- reactjs - 无法在不破坏父反应应用程序样式的情况下导入使用 Material UI 实现的 React 组件