Spaces:
Running
Running
Commit History
-
Format on-screen OCR text into paragraphs, lists, and inline LaTeX
ClaudeRaw Tesseract output rendered as a single string lost all structure. The new text_format module splits OCR text into blocks and emits proper HTML: - blank-line-separated blocks become <p> - bullet/ordered prefixes become <ul>/<ol> - lines that look like equations (short, contain =, Greek, math symbols, sub/superscripts, few alphabetic words) are normalized to LaTeX and wrapped in MathJax \(...\) MathJax is auto-loaded when any segment's OCR has detected math, so no template changes are needed beyond the new format_ocr Jinja filter. Equation detection is intentionally conservative — misfires render as plain paragraphs and reviewers can fix in the editor.2f21b14