简体   繁体   中英

RMarkdown suppress automatic figure numbering to html

Is there a way to suppress automatic figure numbering made by rmarkdown? The first plot rendered by R is the second figure, it added a Figure 1: prefix which is not what I need. I see a solution for PDF output but not html output.

Best,

Shixiang

It's difficult to know what you are looking for without a minimal reproducible example . But maybe you are looking for bookdown::html_document2 output.

Try the following:

---
title: "Example Document"
author: "Your name here"
output:
  bookdown::html_document2
---


```{r cars, fig.cap = "plot"}   # Figure with caption
plot(cars)
```


```{r cars3, fig.cap = ""} # Figure without caption
plot(cars)
```

This is the output of the above:

在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM