Skip to content

Commit

Permalink
feat(math): Support TeX-math limits
Browse files Browse the repository at this point in the history
  • Loading branch information
Omikhleia authored and Didier Willis committed Oct 17, 2024
1 parent 3a0ef46 commit 3a6d1f2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/math/texlike.lua
Original file line number Diff line number Diff line change
Expand Up @@ -479,6 +479,10 @@ compileToMathML(
\def{sqrt}{\msqrt{#1}}
\def{bi}{\mi[mathvariant=bold-italic]{#1}}
\def{dsi}{\mi[mathvariant=double-struck]{#1}}
\def{lim}{\mo{lim}}
\def{limsup}{\mo{lim sup}}% using U+202F NARROW NO-BREAK SPACE
\def{liminf}{\mo{lim inf}}% using U+202F NARROW NO-BREAK SPACE
\def{to}{\mo[atom=bin]{→}}
% Standard spaces gleaned from plain TeX
\def{thinspace}{\mspace[width=thin]}
Expand Down
3 changes: 3 additions & 0 deletions packages/math/unicode-symbols.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2649,6 +2649,9 @@ symbolDefaults["]"] = { atom = atomType.closeSymbol, stretchy = true }
symbolDefaults["{"] = { atom = atomType.openingSymbol, stretchy = true }
symbolDefaults["}"] = { atom = atomType.closeSymbol, stretchy = true }
symbolDefaults["mod"] = { atom = atomType.binaryOperator }
symbolDefaults["lim"] = { atom = atomType.bigOperator }
symbolDefaults["lim sup"] = { atom = atomType.bigOperator } -- using U+202F NARROW NO-BREAK SPACE
symbolDefaults["lim inf"] = { atom = atomType.bigOperator } -- using U+202F NARROW NO-BREAK SPACE
symbolDefaults["%"] = { atom = atomType.binaryOperator }

return {
Expand Down

0 comments on commit 3a6d1f2

Please sign in to comment.