Skip to content

Commit

Permalink
fix(math): A period must be allowed in TeX-like math syntax for numbers
Browse files Browse the repository at this point in the history
  • Loading branch information
Omikhleia authored and Didier Willis committed Nov 16, 2024
1 parent 98b9cdf commit 73d745a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions packages/math/tools/unicode-xml-to-sile.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,9 @@ local function addSymbol (str, shortatom, mathlatex, _, ops)
op.forms = {}
for _, v in pairs(ops) do
if v.form then
v.lspace = SILE.types.length(v.lspace and ("%smu"):format(v.lspace) or "0mu")
v.rspace = SILE.types.length(v.rspace and ("%smu"):format(v.rspace) or "0mu")
-- NOTE: At this point the mu unit is not yet defined, so keep it as a string.
v.lspace = v.lspace and ("%smu"):format(v.lspace) or "0mu"
v.rspace = v.rspace and ("%smu"):format(v.rspace) or "0mu"
op.forms[v.form] = v
else
SU.warn("No form for operator " .. str .. " (operator dictionary is probably incomplete)")
Expand Down
5 changes: 3 additions & 2 deletions packages/math/unicode-symbols-generated.lua
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,9 @@ local function addSymbol (str, shortatom, mathlatex, _, ops)
op.forms = {}
for _, v in pairs(ops) do
if v.form then
v.lspace = SILE.types.length(v.lspace and ("%smu"):format(v.lspace) or "0mu")
v.rspace = SILE.types.length(v.rspace and ("%smu"):format(v.rspace) or "0mu")
-- NOTE: At this point the mu unit is not yet defined, so keep it as a string.
v.lspace = v.lspace and ("%smu"):format(v.lspace) or "0mu"
v.rspace = v.rspace and ("%smu"):format(v.rspace) or "0mu"
op.forms[v.form] = v
else
SU.warn("No form for operator " .. str .. " (operator dictionary is probably incomplete)")
Expand Down

0 comments on commit 73d745a

Please sign in to comment.