From 73d745a07cdab424599a4d3381f9d372a2fcd93a Mon Sep 17 00:00:00 2001 From: Omikhleia Date: Sat, 16 Nov 2024 18:48:43 +0100 Subject: [PATCH] fix(math): A period must be allowed in TeX-like math syntax for numbers --- packages/math/tools/unicode-xml-to-sile.xsl | 5 +++-- packages/math/unicode-symbols-generated.lua | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/packages/math/tools/unicode-xml-to-sile.xsl b/packages/math/tools/unicode-xml-to-sile.xsl index 2a11f7457..7b0ebd626 100644 --- a/packages/math/tools/unicode-xml-to-sile.xsl +++ b/packages/math/tools/unicode-xml-to-sile.xsl @@ -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)") diff --git a/packages/math/unicode-symbols-generated.lua b/packages/math/unicode-symbols-generated.lua index c2ed8d463..cdea8dfc5 100644 --- a/packages/math/unicode-symbols-generated.lua +++ b/packages/math/unicode-symbols-generated.lua @@ -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)")