When I insert an image in Rmarkdown I see "Figure #:" below the image.
How do you get rid of the "Figure:" text?
for example here is my code
![my caption](C:/mypath/myimage.png)
and the image appear with "Figure 1: my caption" below it. I just want the caption to the "my caption"
I looked here http://yihui.name/knitr/options/#chunk_options and fig.lp seems like it might be a solution but when I include that in the header like:
---
title: "My Title"
output: pdf_document
fig.lp: ('';character)
---
the "Figure :" still shows up.
Thank you.
Hide source code: ```{r, echo=FALSE} 1 + 1 ``` Hide text output (you can also use `results = FALSE`): ```{r, results='hide'} print("You will not see the text output.") ``` Hide messages: ```{r, message=FALSE} message("You will not see the message.") ``` Hide warning messages: ```{r, warning=FALSE} # this will generate ...
You use results="hide" to hide the results/output (but here the code would still be displayed). You use include=FALSE to have the chunk evaluated, but neither the code nor its output displayed.
RMarkdown is an extension to markdown which includes the ability to embed code chunks and several other extensions useful for writing technical reports. The rmarkdown package extends the knitr package to, in one step, allow conversion between an RMarkdown file (.Rmd) into PDF, HTML, word document, amongst others.
If you don't want any code chunks to run you can add eval = FALSE in your setup chunk with knitr::opts_chunk$set() . If you want only some chunks to run you can add eval = FALSE to only the chunk headers of those you don't want to run.
All you have to do is add a backslash to the end of the line:
![my caption](C:/mypath/myimage.png)\
You can use the fig_caption
option in the header, like so:
---
title: "My Title"
output:
pdf_document:
fig_caption: false
---
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With