-
-
Notifications
You must be signed in to change notification settings - Fork 54.6k
Description
Summary
After enabling experimental feature, Element Desktop can render LaTeX math when typed in the composer, but does not render LaTeX sent by OpenClaw via the Matrix plugin, even when the message contains $$x^2$$.
OpenClaw currently sends formatted_body as normal Markdown HTML (e.g. <p>$$x^2$$</p>), but Element’s math rendering appears to require data-mx-maths markup in formatted_body.
Steps to reproduce
- Enable Element Desktop Labs → Render LaTeX maths in messages.
- In any room with the OpenClaw Matrix bot, ask OpenClaw to send:
$$x^2$$ - Observe: message shows literal
$$x^2$$and does not render.
Expected behavior
Math renders in Element Desktop (KaTeX/Labs), same as if I type $$x^2$$ manually.
Actual behavior
OpenClaw bot messages containing ......... are displayed as literal text (no KaTeX rendering).
OpenClaw version
2026.2.17
Operating system
Ubuntu 24.04.4 LTS
Install method
npm global
Logs, screenshots, and evidence
Element Desktop message does not render (sen from OpenClaw):
{
"type": "m.room.message",
"content": {
"msgtype": "m.text",
"body": "… $$x^2$$ …",
"format": "org.matrix.custom.html",
"formatted_body": "<p>… $$x^2$$ …</p>"
}
}
Element Desktop message that renders (typed manually):
{
"type": "m.room.message",
"content": {
"msgtype": "m.text",
"body": "$$x^2$$",
"format": "org.matrix.custom.html",
"formatted_body": "<div data-mx-maths=\"x^2\"><code>x^2</code></div>"
}
}Impact and severity
-
Affected users/systems/channels
-
Affects users sending/reading math via the Matrix integration in OpenClaw, especially on Element Desktop/Web with LaTeX rendering enabled.
-
Affects all OpenClaw Matrix bot accounts (
@ada,@klara, etc.) because formatting is shared in the Matrix send pipeline. -
Severity
-
Medium (workflow-blocking for math-heavy use).
-
Not a data-loss/security issue, but a strong usability break for study/technical chats where equations must render correctly.
-
Frequency
-
Always reproducible for bot-generated LaTeX messages using
........./.........whenformatted_bodyis generated via current Markdown path withoutdata-mx-maths. -
Consequence
-
Equations are shown as raw text instead of rendered math.
-
Causes misread/low readability in technical conversations.
-
Forces manual workarounds (retyping in Element, screenshots, or custom local patches).
-
Increases friction and slows collaboration in math/engineering support workflows.
Additional information
Environment
- OpenClaw version:
2026.2.17 - Matrix plugin version:
2026.2.17 - Synapse version
1.147.1 - Element Desktop version:
1.12.10 - Encryption off