rstudio / rmarkdown

Dynamic Documents for R
https://rmarkdown.rstudio.com
GNU General Public License v3.0
2.83k stars 971 forks source link

including RMarkdown or Markdown with images in Shiny #945

Closed dracodoc closed 6 years ago

dracodoc commented 7 years ago

I have a RMarkdown document that need to be embedded in Shiny as documentation. There are several options:

The image in rendered md is like this

![](workflow1_files/figure-html/unnamed-chunk-1-7.png)<!-- -->

The <!-- --> doesn't show in RStudio preview but does show in Shiny app.

I tried to remove it and add some random caption inside ![], the problem solved. But I have to do this manually. There is an knitr option for rmd "add caption for image" looks like should solve this, but it didn't take any effect.

To solve this, either rendered markdown should take a different format, or includeMarkdown need be able to process this.

If you cannot reproduce this I can attach some sample file for test.

yihui commented 6 years ago

This looks like a question instead of a bug report or feature request, so please do us a favor to ask it on StackOverflow instead and let us know the link.

If you don't have time, that is fine this time. The short answer is:

dracodoc commented 6 years ago

Thanks, I really should ask it in SO instead of creating a issue here.

github-actions[bot] commented 3 years ago

This old thread has been automatically locked. If you think you have found something related to this, please open a new issue by following the issue guide (https://yihui.org/issue/), and link to this old issue if necessary.