우선, Quarto는 기본적으로 모든 코드 블록 출력을 tag. To get the output asis you need to use the chunk option results: asis.
Secondly, sprintf (or even print) returns output enclosed within quotes. So after using results: asis, you would get the html tags but would also get the quotes. So you need to wrap the sprintf with cat to get intended results.
---
format: html
---
```{r}
#| echo: false
imageLink %s", iUrl, iText))
}
```
```{r}
#| echo: false
#| results: asis
imageLink("https://www.united.com/8cd8323f017505df6908afc0b72b4925.svg", "united logo")
```
and now, here's what it's supposed to look like:
united logo
주의해야 할 두 가지 사항이 있습니다:
우선, Quarto는 기본적으로 모든 코드 블록 출력을
tag. To get the output asis you need to use the chunk option
results: asis
.Secondly,
sprintf
(or evenprint
) returns output enclosed within quotes. So after usingresults: asis
, you would get the html tags but would also get the quotes. So you need to wrap thesprintf
withcat
to get intended results.