我想将当前的块标签放入块中.这可能吗?
```{r my_chunk}
gettextf("This chunk is called %s", some_function_to_get_chunk_label())
```
Run Code Online (Sandbox Code Playgroud)
你可以使用opts_current$get例如......
opts_current$get(name = 'label')
例如
cat(knit(text ="
```{r 'hello'}
render_markdown(strict=TRUE)
opts_current$get(name = 'label')
```
"))
Run Code Online (Sandbox Code Playgroud)
这使
render_markdown(strict = TRUE)
opts_current$get(name = "label")
## [1] "hello"
Run Code Online (Sandbox Code Playgroud)