feat(latex, symbols): add missing LaTeX2e/amsmath/amssymb commands and \mathscr font#522
Merged
Merged
Conversation
The symbol table covers unicode-math names but lacks some common commands that unicode-math spells differently or omits: \ldots, \iff, \implies, \impliedby, \land, \lor, \emptyset, the amsmath \dots* family, several amssymb symbols, and spacing commands (\quad, \qquad, \enspace, \thinspace, \thickspace) mapped to their unicode space characters. Also adds the \mathscr font, identical to \mathcal since unicode has a single script alphabet, and enables it in the font config, docs and test file. Glyph values cross-checked against Julia's REPL latex-to-unicode table (stdlib/REPL/src/latex_symbols.jl, MIT), itself derived from W3C's unicode.xml. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
0c578b8 to
2f66013
Compare
Owner
|
Thanks for the PR! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
A number of very common LaTeX commands don't render because they have no entry in
symbols.entries: the table covers unicode-math names, but not commands that unicode-math spells differently or omits entirely. Related: #178, #176.Examples that currently render as raw text:
\ldots,\iff,\implies,\land,\lor,\emptyset,\mathscr{F}.Changes
symbols.entries: 29 new entries, kept deliberately to the clearly-standard set (LaTeX2e core, amsmath, amssymb):\ldotsand the amsmath dots family (\dotsb,\dotsc,\dotsi,\dotsm,\dotso)\iff,\implies,\impliedby,\land,\lor,\emptyset,\hbar,\bigcirc\circledS,\circlearrowleft,\circlearrowright,\gvertneqq,\lvertneqq,\nleqslant,\nsubseteqq,\nsupseteqq,\varsubsetneqq,\varsupsetneq\quad,\qquad,\enspace,\thinspace,\thickspacemapped to the corresponding unicode space characters (U+2003 etc.)symbols.fonts: newmathscrtable, identical tomathcalsince Unicode has a single script alphabet (both map to the U+1D49C block plus the Letterlike Symbols exceptions). The existing#lua-match? "^\\math"query already captures it, so only the symbol table, config default, docs andtest/latex.mdneeded touching.Notes
stdlib/REPL/src/latex_symbols.jl, MIT), which is itself derived from W3C'sunicode.xml. No code was taken from it, only the factual command-to-codepoint mapping.\qquadas raw text. Happy to drop them from the PR if you'd rather keep spacing commands unhandled.\hat,\vec,\ddot, ...) were deliberately left out; concealing them to combining characters without reordering would render incorrectly.🤖 Generated with Claude Code