[GH-ISSUE #15335] Bug report: Cannot show LaTeX correctly #35570

Closed
opened 2026-04-22 20:09:22 -05:00 by GiteaMirror · 0 comments
Owner

Originally created by @ModulePillow on GitHub (Apr 5, 2026).
Original GitHub issue: https://github.com/ollama/ollama/issues/15335

What is the issue?

Hello, I noticed that when a reply contains some LaTeX formula, Ollama cannot always display them correctly. See the pic below:

Image

\mathbf{q} = (w, x, y, z) should be a valid LaTeX formula, but it's displayed as plain text.

This bug won't be triggered every time the reply contains LaTeX.

If possible, I will create a PR to fix it.

P.S.: My model is Gemma 4 E4B, Ollama is v0.20.2

Relevant log output

Please see the snapshot. You can call a model to print some math formulas to verify this bug.

OS

Win11

GPU

No response

CPU

No response

Ollama version

v0.20.2

Originally created by @ModulePillow on GitHub (Apr 5, 2026). Original GitHub issue: https://github.com/ollama/ollama/issues/15335 ### What is the issue? Hello, I noticed that when a reply contains some LaTeX formula, Ollama cannot always display them correctly. See the pic below: <img width="737" height="240" alt="Image" src="https://github.com/user-attachments/assets/98538e08-b880-4ea0-9e89-6a2adc24a0f4" /> $\mathbf{q} = (w, x, y, z)$ should be a valid LaTeX formula, but it's displayed as plain text. This bug won't be triggered every time the reply contains LaTeX. **If possible, I will create a PR to fix it.** P.S.: My model is Gemma 4 E4B, Ollama is v0.20.2 ### Relevant log output ```shell Please see the snapshot. You can call a model to print some math formulas to verify this bug. ``` ### OS Win11 ### GPU _No response_ ### CPU _No response_ ### Ollama version v0.20.2
GiteaMirror added the bug label 2026-04-22 20:09:22 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#35570