diff options
Diffstat (limited to 'Master/texmf-dist/tex/context/modules/mkiv/x-asciimath.lua')
-rw-r--r-- | Master/texmf-dist/tex/context/modules/mkiv/x-asciimath.lua | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/Master/texmf-dist/tex/context/modules/mkiv/x-asciimath.lua b/Master/texmf-dist/tex/context/modules/mkiv/x-asciimath.lua index e0a4a714b03..677d3519b7c 100644 --- a/Master/texmf-dist/tex/context/modules/mkiv/x-asciimath.lua +++ b/Master/texmf-dist/tex/context/modules/mkiv/x-asciimath.lua @@ -295,8 +295,8 @@ local reserved = { ["sigma"] = { true, "σ" }, ["tau"] = { true, "τ" }, ["upsilon"] = { true, "υ" }, - ["phi"] = { true, "φ" }, - ["varphi"] = { true, "ϕ" }, + ["phi"] = { true, "ϕ" }, + ["varphi"] = { true, "φ" }, ["chi"] = { true, "χ" }, ["psi"] = { true, "ψ" }, ["omega"] = { true, "ω" }, @@ -1274,6 +1274,15 @@ local function collapse_bars(t) i = i + 1 end if l then + -- problem: we can have a proper nesting +local d = false +for i=1,m do + if find(t[i],"\\left") then + d = true + break + end +end +if not d then local tt = { s_lnothing } -- space fools final checker local tm = 1 for i=1,m do @@ -1290,6 +1299,7 @@ local function collapse_bars(t) tt[tm] = s_rnothing -- space fools final checker m = tm t = tt +end elseif m < n then for i=n,m+1,-1 do t[i] = nil @@ -1739,7 +1749,7 @@ collapse = function(t,level) -- steps t = collapse_matrices (t) if trace_detail then show_state(t,level,"matrices") end t = collapse_bars (t) if trace_detail then show_state(t,level,"bars") end -t = collapse_stupids (t) if trace_detail then show_state(t,level,"stupids") end + t = collapse_stupids (t) if trace_detail then show_state(t,level,"stupids") end t = collapse_pairs (t) if trace_detail then show_state(t,level,"pairs") end t = collapse_parentheses(t) if trace_detail then show_state(t,level,"parentheses") end t = collapse_signs (t) if trace_detail then show_state(t,level,"signs") end |