-
Is there a convenient means for pausing or fragmenting the output of a code block for a presentation? I am envisioning something like ```{julia}
#| echo: true
#| fragment: default
rand(10,10)
``` This would echo the code but only show the result after a pause. All current options I see available require the user to replicate the code-block which can become cumbersome. Things I've tried w/ revealjs:
|
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 3 replies
-
I agree that this should be a feature! (and we'll make it one soon). In the meantime here is a workaround based on this Lua filter ( function Div(el)
if el.attr.attributes['fragment'] == 'true' then
return pandoc.walk_block(el, {
Div = function(el)
el.attr.classes:insert("fragment")
return el
end
})
end
end Use the Lua filter by adding it to the ---
title: "Fragment Demo"
format:
revealjs:
filters: [fragment.lua]
---
## Use Fragment
```{julia}
#| echo: true
#| fragment: true
rand(10,10)
``` |
Beta Was this translation helpful? Give feedback.
-
We've now implemented this as feature so the filter is no longer required: https://quarto.org/docs/presentations/revealjs/#executable-code. Revised code would look like this: ```{julia}
#| echo: true
#| output-location: fragment
rand(10,10)
``` |
Beta Was this translation helpful? Give feedback.
-
Hi there @agerlach, posting back here because I'm giving a talk on Quarto at JuliaCon next month and was hoping to find some good examples of using Julia w/ Quarto. If you are able to share any of your own (or are aware of others) please LMK over on this discussion thread: #1261. Thanks! |
Beta Was this translation helpful? Give feedback.
We've now implemented this as feature so the filter is no longer required: https://quarto.org/docs/presentations/revealjs/#executable-code. Revised code would look like this: