Closed dracodoc closed 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:
For the last method you tried, use the option fig_caption: false
for your output format to avoid <!-- -->
.
Or if you want to use includeHTML()
, make sure the output format is html_fragment
instead of html_document
.
Thanks, I really should ask it in SO instead of creating a issue here.
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.
I have a RMarkdown document that need to be embedded in Shiny as documentation. There are several options:
includeHtml()
. This also broke the ShinyDashboard styles, i.e. the default page have a large empty box under the dashboard.includeMarkdown
. This is the simplest method that doesn't break ShinyDashboard. However there is a small problem.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.