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
{{ message }}
Repository navigation
Nemotron and DOTS exports alter inline LaTeX from model responses #4904
Nemotron Parse 2.0 and DOTS keep inline LaTeX in ordinary text items. Markdown export escapes underscores, and Nemotron's Markdown-to-text path can interpret math asterisks as emphasis. This changes formulas already present in the model response.
Steps to reproduce
Parse a Nemotron Text region containing The value is $x_1 * y_2 * z_3$..
Or parse a DOTS JSON Text element containing **Value** $x_1 * y_2 * z_3$..
Export Markdown.
Actual: math contains x\_1, y\_2, and z\_3. Expected: inline formula items holding the original LaTeX and an export containing $x_1 * y_2 * z_3$.
The fix should share the math-aware Markdown extension and rich HTML mapping. It must preserve code spans, literal/escaped currency, surrounding content, and the native block's single coordinate owner. This is a focused VLM-response conversion issue related to #2352; it does not address formula recognition in the standard PDF pipeline.
Docling version
Current main d01c9c0991920924cf17f6b8366079ac035ffc38 (2.140.0); reproduced locally on Python 3.12.
This issue remains open until #4908 merges. That PR is now rebased onto current main and includes the currency-range review fix. The focused suites pass (124 tests), and the combined tests with #4789 pass (267 passed, 1 skipped). The new CI runs will validate the rebased head.
Activity
refactor: reuse shared VLM math and heading handling
fix: preserve native VLM inline math through exports
refactor: reuse shared VLM math and heading handling
PierreMesure commentedon Oct 22, 2026
This issue remains open until #4908 merges. That PR is now rebased onto current main and includes the currency-range review fix. The focused suites pass (124 tests), and the combined tests with #4789 pass (267 passed, 1 skipped). The new CI runs will validate the rebased head.