Quarto Conditional Blocks Custom Node API

Published

May 1, 2024

In Quarto 1.3, conditional blocks are represented as a custom AST node. You can create conditional block AST nodes in Lua filters with the quarto.ConditionalBlock constructor. The constructor takes a single parameter, a table with entries node, behavior, and condition, as described below. In Lua filters, conditional blocks are represented as a table with the following fields: