In Quarto users shouldn't specify LaTeX packages as (LaTeX commands in) header-includes. They should put them under the imagify key.
- Metadata syntax: make sure users can use the same keys under imagify as under
format: pdf:
- Metadata coverage: make sure we pick up all documented Quarto keys that are relevant for the filter (provided we can access them when rendering to other formats than PDF)
- Pass to PDF output: pass packages specified under
imagify to LaTeX when targeting LaTeX or PDF. In Pandoc, generate raw header-includes. In Quarto, use quarto.doc.include_text('in-header', text) and quarto.doc.use_latex_package(pkg, opt). See Quarto Lua API.