Open
Description
Bug description
It seems like macros in hidden divs still get expanded by pandoc. This is problematic as I have defined some macros that only work with mathjax not latex (and vis versa) (for example the mathjax mathtip macro)
::: {.content-visible unless-format="pdf"}
\newcommand{\test}{one}
:::
::: {.content-visible unless-format="html"}
\newcommand{\test}{two}
:::
$\test$
Quarto will complain that the second macro has already been defined irrespective of output. Ideally for macros one should be able to have a sort of preamble for html that gets parsed by pandoc (not just passed through like include-before-body does), thus one could specify which to include in yaml dependent on output wanted