Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make asis_output works for Quarto the same as results: asis #2332

Closed
cderv opened this issue Mar 25, 2024 · 0 comments · Fixed by #2365
Closed

Make asis_output works for Quarto the same as results: asis #2332

cderv opened this issue Mar 25, 2024 · 0 comments · Fixed by #2365
Assignees
Labels
quarto Related to quarto specific usage

Comments

@cderv
Copy link
Collaborator

cderv commented Mar 25, 2024

Related to

Example

---
title: "Test"
format: 
  typst:
    keep-typ: true
    keep-md: true
---

```{r}
#| results: asis
knitr::asis_output("`#set page(flipped: true)`{=typst}")
```

Using asis_output() will not apply raw output here, because options$results = 'asis' us onlyfor LaTeX output

knitr/R/output.R

Lines 514 to 518 in 031e08c

x = wrap_asis(x, options)
if (!out_format('latex') || inline) return(x)
# latex output need the \end{kframe} trick
options$results = 'asis'
knit_hooks$get('output')(x, options)

I think we need it for Quarto as the wrapping used will check for this value
https://github.com/quarto-dev/quarto-cli/blob/f43107222f70ca3579a520d496597b75b5bd0097/src/resources/rmd/patch.R#L116-L117

@cderv cderv added the quarto Related to quarto specific usage label Mar 25, 2024
@cderv cderv self-assigned this Mar 25, 2024
@cderv cderv moved this to Next / Ready for Dev in R Markdown Team Projects Mar 25, 2024
yihui added a commit that referenced this issue Sep 19, 2024
…`output` hook should check if the chunk option `results == 'asis'`
@yihui yihui linked a pull request Sep 19, 2024 that will close this issue
yihui added a commit that referenced this issue Sep 20, 2024
then every `output` hook should check if the chunk option `results == 'asis'`
@github-project-automation github-project-automation bot moved this from Next / Ready for Dev to Done in R Markdown Team Projects Sep 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
quarto Related to quarto specific usage
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants