Skip to content

Bot API 10.1 rich messages: \boxed{} and \ce{} not rendered in LaTeX blocks #861

Description

@GuyueHermit

Description

Telegram Bot API 10.1's sendRichMessage supports LaTeX rendering via $$...$$ blocks, but some common LaTeX commands are not recognized:

  • \boxed{...} — renders as raw text
  • \ce{...} (mhchem chemical equations) — renders as raw text

What works

\frac, \int, \sum, \sqrt, \nabla, \partial, \hbar, \infty, matrices (\begin{pmatrix}), etc. — all render correctly.

Test case

$$
\boxed{E_n = \hbar\omega \left( n + \frac{1}{2} \right)}
$$

Expected: boxed equation
Actual: \boxed{...} appears as literal text; inner content renders fine.

Context

Reported downstream at NousResearch/hermes-agent#47779. Hermes passes raw LaTeX unchanged to the Bot API — the gap is in Telegram's renderer, not the client.

Request

Either add \boxed and \ce to the supported LaTeX subset, or document which LaTeX packages/commands are supported vs. not in the Bot API docs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions