diff options
author | Hans Hagen <pragma@wxs.nl> | 2017-05-14 19:58:50 +0200 |
---|---|---|
committer | Context Git Mirror Bot <phg42.2a@gmail.com> | 2017-05-14 19:58:50 +0200 |
commit | fd0c4577a4b6e85ca2db664906e1a03807ce133f (patch) | |
tree | fa23fcc04248d03ff82e34634b8ef1bb9cf28acb /tex/context/modules/mkiv/x-asciimath.lua | |
parent | db581096187dc2d3cbdbe4cdc39d247c168b1607 (diff) | |
download | context-fd0c4577a4b6e85ca2db664906e1a03807ce133f.tar.gz |
2017-05-14 19:15:00
Diffstat (limited to 'tex/context/modules/mkiv/x-asciimath.lua')
-rw-r--r-- | tex/context/modules/mkiv/x-asciimath.lua | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/tex/context/modules/mkiv/x-asciimath.lua b/tex/context/modules/mkiv/x-asciimath.lua index e0a4a714b..677d3519b 100644 --- a/tex/context/modules/mkiv/x-asciimath.lua +++ b/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 |