Currently, the target()
function doesn’t exist if you don’t enable HTML feature flag, but some default show rules (like for heading) do check for the HTML target. Is there a way to check for it without enabling the flag?
1 Like
Yes, thanks to @SillyFreak for the answer:
#let target = dictionary(std).at("target", default: () => "paged")
You would then use it like normal:
#context target()
A side effect is that it’s available outside context when HTML feature flag is not enabled.
I think more accurately, when HTML export is not available. If the feature is enabled (or you’re coming from the future where it’s enabled by default), context is required even when exporting to PDF, so I wouldn’t depend on that.