How to conditionally execute code chunks in Quarto
Ever had a Quarto document where some code works perfectly in HTML but looks awful in Word (or vice versa)? I just ran into this problem with tables -{gt} tables look great in HTML but not so hot in Word, while {flextable} works beautifully in Word format.
In this quick video, I show you a neat trick for conditionally executing code in Quarto. This is super handy when you're creating documents that need to be exported to multiple formats. No more manually commenting out code or creating separate documents!
Sign up for the newsletter
Get blog posts like this delivered straight to your inbox.
You need to be signed-in to comment on this post. Login.