You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using KaTeX as HTML math method, the Tippy.js tooltip popups on cross references do not work if the preview snippet contains math.
Note: The problem only appears with references to items of the same document. In a multi-file book project, the references to items in other chapters do render correctly.
Steps to reproduce
---title: "Reproducible Quarto Document"format: htmlhtml-math-method: katex---
:::{#thm-with-math}
### Theorem with math
Text with math $\mathcal P (\mathbb N) ≠ \varnothing$.
:::
:::{#thm-without-math}
### Theorem without math
Just text!
:::
Reference to @thm-with-math. (Popup does not render correctly)
Reference to @thm-without-math. (Popup does render.)
Preview (or render) HTML.
Hover over the reference to Theorem 1.
Actual behavior
An empty popup opens.
and the browser console reports:
katex.min.js:1 Uncaught TypeError: KaTeX can only parse string typed expression
at Gn (katex.min.js:1:274914)
at Xn (katex.min.js:1:275946)
at Object.Un [as render] (katex.min.js:1:275385)
at Object.typesetMath ((index):67:22)
at processXRef ((index):310:23)
at Object.cellAttr [as onTrigger] ((index):335:26)
at ae (tippy.umd.min.js:1:9810)
at Le (tippy.umd.min.js:1:14548)
at HTMLAnchorElement.ye (tippy.umd.min.js:1:12326)
Expected behavior
A popup displaying Theorem 1 is shown.
Your environment
Debian 12/Testing
Chome 133.0.6943.141 (Official Build) (64-bit)
Quarto check output
Quarto 1.7.15
[✓] Checking environment information...
Quarto cache location: /home/ben/.cache/quarto
[✓] Checking versions of quarto binary dependencies...
Pandoc version 3.4.0: OK
Dart Sass version 1.70.0: OK
Deno version 1.46.3: OK
Typst version 0.11.0: OK
[✓] Checking versions of quarto dependencies......OK
[✓] Checking Quarto installation......OK
Version: 1.7.15
Path: /opt/quarto/bin
As described in quarto-dev#12259, Tippy.js popups on crossrefs failed if the
previewed entity contained KaTeX math elements. This seems to be
due to double rendering where the `data` attribute is unset on
the second pass. Just skipping the invocation of the KaTeX renderer
in these instances solves the issue.
Bug description
When using KaTeX as HTML math method, the Tippy.js tooltip popups on cross references do not work if the preview snippet contains math.
Note: The problem only appears with references to items of the same document. In a multi-file book project, the references to items in other chapters do render correctly.
Steps to reproduce
Actual behavior
An empty popup opens.
and the browser console reports:
Expected behavior
A popup displaying Theorem 1 is shown.
Your environment
Quarto check output
Quarto 1.7.15
[✓] Checking environment information...
Quarto cache location: /home/ben/.cache/quarto
[✓] Checking versions of quarto binary dependencies...
Pandoc version 3.4.0: OK
Dart Sass version 1.70.0: OK
Deno version 1.46.3: OK
Typst version 0.11.0: OK
[✓] Checking versions of quarto dependencies......OK
[✓] Checking Quarto installation......OK
Version: 1.7.15
Path: /opt/quarto/bin
[✓] Checking tools....................OK
Chromium: 869685
TinyTeX: (not installed)
[✓] Checking LaTeX....................OK
Using: Installation From Path
Path: /usr/bin
Version: 2024
[✓] Checking Chrome Headless....................OK
Using: Chrome found on system
Path: /usr/bin/google-chrome
Source: PATH
[✓] Checking basic markdown render....OK
[✓] Checking Python 3 installation....OK
Version: 3.13.2
Path: /usr/bin/python3
Jupyter: (None)
[✓] Checking R installation...........(None)
The text was updated successfully, but these errors were encountered: