下面的幻灯片在编织后可以预览,但是将幻灯片移动到其他地方后,图像就无法再显示了。
---
title: "Journal club"
author: "Timing Liu"
date: "`r Sys.Date()`"
output:
xaringan::moon_reader:
lib_dir: libs
css:
- default
- default-fonts
self_contained: true
nature:
highlightStyle: github
highlightLines: true
countIncrementalSlides: false
---
<img src = 2021-01-19-23-07-58.png />
?moon_reader
的文档显示以下内容:
should not contain the string "/>" when it is written with the syntax <img src="PATH" />
我相信我的路径应该已经符合标准,因此我不确定为什么 html 图像没有渲染。使用 ![](2021-01-19-23-07-58.png)
等 Markdown 语法加载的图像可以加载到独立幻灯片中的其他位置。
尝试在 Windows 上使用 Firefox 和 Chrome 以及最新的 Xaringan。
谢谢!
最佳答案
由于我无权访问您的图像,因此这是一个有效的示例:
---
title: "Journal club"
author: "Timing Liu"
date: "`r Sys.Date()`"
output:
xaringan::moon_reader:
lib_dir: libs
css:
- default
- default-fonts
self_contained: true
nature:
highlightStyle: github
highlightLines: true
countIncrementalSlides: false
---
<img src = "https://blog.hostonnet.com/wp-content/uploads/2014/07/galaxy.jpg" />
关于r-markdown - 如何在 xaringan 独立幻灯片中嵌入 html 图像,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/66190634/