Claim
Under the include-in-header: macros.qmd recipe that README.md:55 recommends for PDF ("definitions go into the preamble and all macros work"), \v specifically may not work: LaTeX's fontspec/unicode-math encoding setup re-establishes \v as the built-in caron/háček accent at \begin{document} time, after the preamble's \renewcommand{\v}[1]{\vecf{#1}} has run — so \v{x} produces no vector notation at all.
The {{< include >}} shortcode recipe is unaffected, because pandoc's latex_macros extension expands \v{x} to \tilde{x} in the document body before LaTeX ever sees it. d-morrison/rme uses the shortcode recipe (via chapters/shared-config.qmd), so it is not exposed.
Status of this report
Not independently reproduced. This surfaced as a side observation from a review subagent working on #87, which reported reproducing it with real quarto + lualatex. I am filing it rather than dropping it, but the reproduction should be redone before anyone acts on it.
What I did measure directly, and which makes the mechanism plausible: pandoc expands macros only when they are defined in the same document. Appending $\v0$ $\v1$ to a file with no definitions present gives verbatim \v0 \v1 out of quarto pandoc -t latex. include-in-header content is not in the document body, so the expansion pass that protects the shortcode recipe does not run for it — which leaves \v to LaTeX, where the accent-vs-macro conflict is real.
Why it matters beyond \v
\v is unusual in being the only macro in macros.qmd whose name collides with a LaTeX built-in, which is also why it needed \renewcommand rather than \providecommand in the first place. If the mechanism above holds, any such future collision would behave the same way, and the README's "all macros work" would be wrong in a way that is silent — no error, just missing notation.
Suggested next steps
- Reproduce: minimal Quarto doc,
include-in-header: macros.qmd, format: pdf, body containing $\v{x}$, and check the output.
- If confirmed, either qualify the README claim, or make
macros.qmd re-assert \v at \begin{document} (\AtBeginDocument{\renewcommand{\v}[1]{\vecf{#1}}}).
Pre-existing; not introduced by #87, which is a strict improvement on this axis (it removes the \def\v1 that broke \v on both recipes).
Claim
Under the
include-in-header: macros.qmdrecipe thatREADME.md:55recommends for PDF ("definitions go into the preamble and all macros work"),\vspecifically may not work: LaTeX'sfontspec/unicode-mathencoding setup re-establishes\vas the built-in caron/háček accent at\begin{document}time, after the preamble's\renewcommand{\v}[1]{\vecf{#1}}has run — so\v{x}produces no vector notation at all.The
{{< include >}}shortcode recipe is unaffected, because pandoc'slatex_macrosextension expands\v{x}to\tilde{x}in the document body before LaTeX ever sees it.d-morrison/rmeuses the shortcode recipe (viachapters/shared-config.qmd), so it is not exposed.Status of this report
Not independently reproduced. This surfaced as a side observation from a review subagent working on #87, which reported reproducing it with real
quarto+lualatex. I am filing it rather than dropping it, but the reproduction should be redone before anyone acts on it.What I did measure directly, and which makes the mechanism plausible: pandoc expands macros only when they are defined in the same document. Appending
$\v0$ $\v1$to a file with no definitions present gives verbatim\v0 \v1out ofquarto pandoc -t latex.include-in-headercontent is not in the document body, so the expansion pass that protects the shortcode recipe does not run for it — which leaves\vto LaTeX, where the accent-vs-macro conflict is real.Why it matters beyond
\v\vis unusual in being the only macro inmacros.qmdwhose name collides with a LaTeX built-in, which is also why it needed\renewcommandrather than\providecommandin the first place. If the mechanism above holds, any such future collision would behave the same way, and the README's "all macros work" would be wrong in a way that is silent — no error, just missing notation.Suggested next steps
include-in-header: macros.qmd,format: pdf, body containing$\v{x}$, and check the output.macros.qmdre-assert\vat\begin{document}(\AtBeginDocument{\renewcommand{\v}[1]{\vecf{#1}}}).Pre-existing; not introduced by #87, which is a strict improvement on this axis (it removes the
\def\v1that broke\von both recipes).