Skip to content

feat(latex, symbols): add missing LaTeX2e/amsmath/amssymb commands and \mathscr font#522

Merged
OXY2DEV merged 1 commit into
OXY2DEV:mainfrom
ctbaum:feat/latex-symbol-aliases
Jul 13, 2026
Merged

feat(latex, symbols): add missing LaTeX2e/amsmath/amssymb commands and \mathscr font#522
OXY2DEV merged 1 commit into
OXY2DEV:mainfrom
ctbaum:feat/latex-symbol-aliases

Conversation

@ctbaum

@ctbaum ctbaum commented Jul 12, 2026

Copy link
Copy Markdown
Contributor

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):

  • \ldots and the amsmath dots family (\dotsb, \dotsc, \dotsi, \dotsm, \dotso)
  • \iff, \implies, \impliedby, \land, \lor, \emptyset, \hbar, \bigcirc
  • amssymb: \circledS, \circlearrowleft, \circlearrowright, \gvertneqq, \lvertneqq, \nleqslant, \nsubseteqq, \nsupseteqq, \varsubsetneqq, \varsupsetneq
  • spacing: \quad, \qquad, \enspace, \thinspace, \thickspace mapped to the corresponding unicode space characters (U+2003 etc.)

symbols.fonts: new mathscr table, identical to mathcal since 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 and test/latex.md needed touching.

Notes

  • Glyph values were cross-checked against Julia's REPL latex-to-unicode table (stdlib/REPL/src/latex_symbols.jl, MIT), which is itself derived from W3C's unicode.xml. No code was taken from it, only the factual command-to-codepoint mapping.
  • The spacing commands are the one opinionated part: they conceal to literal spaces, which felt more useful than leaving \qquad as raw text. Happy to drop them from the PR if you'd rather keep spacing commands unhandled.
  • Argument-taking accents (\hat, \vec, \ddot, ...) were deliberately left out; concealing them to combining characters without reordering would render incorrectly.

🤖 Generated with Claude Code

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>
@OXY2DEV OXY2DEV force-pushed the feat/latex-symbol-aliases branch from 0c578b8 to 2f66013 Compare July 13, 2026 09:51
@OXY2DEV OXY2DEV merged commit 56cba4d into OXY2DEV:main Jul 13, 2026
1 check passed
@OXY2DEV

OXY2DEV commented Jul 13, 2026

Copy link
Copy Markdown
Owner

Thanks for the PR!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants