问题
Assume, you have have the following Rmd (see ../Christoph999/Test/blob/master/test.md
---
title: "Untitled"
author: "Myname"
date: "5 April 2019"
output:
html_document:
keep_md: yes
number_sections: yes
toc: yes
toc_depth: 2
pdf_document:
number_sections: yes
toc: yes
toc_depth: '2'
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
text
{width=400px}
text
I pushed everything to github with pictures in /project/pics/
(the .md file is in /project
. But images are not displayed when I view the .md file. When I move the mouse over the caption it says
https://github.com/user/project/blob/project/pics/myimage.png?raw=true
What does the blob/
appear? When running from RStudio, everything looks fine. I'd really appreciate, if that works. (I use Firefox)
Edit The folder structure looks like
/project
/.git
/pics
*myimage.png
* Rmd
and ../project/pics/myimage.png
should point to the correct place?
回答1:
Thank's to @richard Telfor, the solution is
text
{width=400px}
text
Be careful: The code does NOT work with pdf, see here
来源:https://stackoverflow.com/questions/55543700/why-is-my-image-embedded-in-md-not-displayed-on-github