Files
DeepTutor/web/lib
lytanjie ab51601b89 fix(web): keep statistics notation as inline math (#2878)
* fix(web): keep statistics notation as inline math

plausibleMathBody judged inline math by Latin words, so $Var(N)$, $Cov(X,Y)
and $Corr(X,Y)$ fell through escapeStrayDollars and displayed as source.
Add the common statistics functions to MATH_WORDS.

Also recover control characters left by JSON tool-argument decoding
(U+0008/U+000C/U+000D followed by a letter) back into \b, \f and \r, so
formulas already stored in notes render again.

Tests: latex-normalize.test.ts.

Co-Authored-By: Claude Code <noreply@anthropic.com>

* fix(web): only restore a decoded escape that spells a KaTeX command

A form feed or carriage return in front of a word is not always a mangled
\frac or \right: text extracted from a PDF keeps a form feed between pages.
Rewriting every one of them showed a stray "\f" in front of the next word.
Restore the backslash only when the letters after it name a KaTeX command.

---------

Co-authored-by: Claude Code <noreply@anthropic.com>
Co-authored-by: zszz3 <91608029+zszz3@users.noreply.github.com>
2026-11-29 15:29:03 +08:00
..
2026-09-24 09:59:56 +08:00
2026-09-02 04:09:11 +08:00
2026-09-03 01:38:54 +08:00
2026-09-03 01:38:54 +08:00
2026-09-03 01:38:54 +08:00
2026-09-21 02:30:40 +08:00
2026-09-02 04:09:11 +08:00
2026-08-02 13:23:45 +08:00
2026-08-02 13:23:45 +08:00
2026-08-02 13:23:45 +08:00
2026-09-21 02:30:40 +08:00
2026-09-03 01:38:54 +08:00
2026-09-03 01:38:54 +08:00
2026-08-17 11:22:26 +08:00
2026-09-03 01:38:54 +08:00
2026-08-17 11:22:26 +08:00
2026-09-21 02:30:40 +08:00
2026-09-02 04:09:11 +08:00
2026-08-02 13:23:45 +08:00
2026-07-31 00:25:48 +08:00
2026-09-06 13:46:29 +08:00
2026-09-02 04:09:11 +08:00
2026-09-06 13:46:29 +08:00
2026-09-21 02:30:40 +08:00
2026-09-21 02:30:40 +08:00
2026-09-24 09:59:56 +08:00
2026-09-22 21:36:27 +08:00
2026-09-06 13:46:29 +08:00
2026-09-03 01:38:54 +08:00
2026-09-24 09:59:56 +08:00
2026-08-20 14:15:53 +08:00
2026-09-06 13:46:29 +08:00
2026-09-24 09:59:56 +08:00
2026-09-21 02:30:40 +08:00
2026-09-06 13:46:29 +08:00
2026-09-03 01:38:54 +08:00
2026-09-03 01:38:54 +08:00
2026-09-03 01:38:54 +08:00
2026-09-06 13:46:29 +08:00
2026-09-06 13:46:29 +08:00
fix
2026-08-09 22:18:22 +08:00
2026-09-21 02:30:40 +08:00
2026-09-02 04:09:11 +08:00
2026-09-21 02:30:40 +08:00
2026-09-06 13:46:29 +08:00
2026-07-31 00:25:48 +08:00
2026-09-06 13:46:29 +08:00
2026-07-24 18:16:04 +08:00
2026-09-02 04:09:11 +08:00
2026-09-06 13:46:29 +08:00
2026-10-04 21:35:00 +08:00
2026-08-20 14:15:53 +08:00
2026-09-03 01:38:54 +08:00