Skip to content
Discussion options

You must be logged in to vote

There are no default to change. code-fold is HTML details/summary. This does not exist outside HTML-based formats thus why it's "ignored".

Soo you have to use any approaches mentioned before.

---
format: pdf
---

```{r}
#| label: content
#| code-fold: true
#| code-summary: "See the code"
#| echo: !expr "knitr::is_html_output()"
print("Hello, world!")
```

or

---
format: pdf
filters:                                                                                                                                                                                                 
  - path: code-fold-latex.lua
    at: pre-quarto
---

Replies: 1 comment 6 replies

Comment options

You must be logged in to vote
6 replies
@mcanouil
Comment options

@mcanouil
Comment options

@elenlefoll
Comment options

@mcanouil
Comment options

Answer selected by elenlefoll
@elenlefoll
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
lua Issues related to the lua codebase, filter chain, etc code-blocks
2 participants