Search first
What Happened?
Inline LaTeX (both $...$ and $$...$$) does not render at all when the math delimiters are wrapped in (or touching) certain Markdown inline formatting spans. Instead, the raw dollar signs and content are displayed as plain text.
Reproduce the Bug
- Create a new blank block.
- Type any of these examples:
- Plain (works):
The x stock is $\uparrow$ trending
→ Renders correctly as: The x stock is ↑ trending
- Failing cases — all show raw
$...$:
The x stock is **$\uparrow$** (bold)
The x stock is *$\uparrow$* (italic)
The x stock is ==$\uparrow$== (highlight)
The x stock is <ins>$\uparrow$</ins> (underline)
==The x stock is $\uparrow$== (highlight wrapping whole phrase)
Expected Behavior
LaTeX should render normally inside inline emphasis/highlight/underline spans, just as it does in plain text. The KaTeX processor should be applied after (or independently of) Markdown inline styling.
Files
No response
Browser, Desktop or Mobile Platform Information
- Logseq Version: 2.0.0 (build 88)
- OS: MacOS
Additional Context
Workarounds (temporary)
- Keep math outside of emphasis spans
- Use plain text + Unicode arrows (↑) without LaTeX when emphasis is needed
- Avoid / == for math-containing text
Are you willing to submit a PR? If you know how to fix the bug.