Module:Q-odd-limit intervals: Difference between revisions

Undo visible visual downgrade
Tag: Undo
Refactoring
Line 174: Line 174:
end
end
local output_0 = "{| class=\"wikitable center-all mw-collapsible mw-collapsed sortable\"\n"
local t_head_0 = "{| class=\"wikitable center-all mw-collapsible mw-collapsed sortable\"\n"
local output_1 = "|+ style=\"white-space: nowrap;\" | "
.. "|+ style=\"white-space: nowrap;\" | "
local output_2 = "|-\n" ..
local t_head_1 = "|-\n"
"! class=\"unsortable\" | Interval and complement !! Error (abs, [[Cent|¢]]) !! Error (rel, [[Relative cent|%]])\n"
.. "! class=\"unsortable\" | Interval and complement !! Error (abs, [[Cent|¢]]) !! Error (rel, [[Relative cent|%]])\n"
local output_3 = "\n|}"
local t_foot = "\n|}"
local out_str_direct = output_0 .. output_1 .. t_title
local out_str_val = output_0 .. output_1 .. t_title
if tag ~= "none" then
if tag ~= "none" then
out_str_direct = out_str_direct .. " (direct approximation, even if inconsistent)"
tag_direct = " (direct approximation, even if inconsistent)"
out_str_val = out_str_val .. " (patent val mapping)"
tag_val = " (patent val mapping)"
else
tag_direct = ""
tag_val = ""
end
end
out_str_direct = out_str_direct .. "\n" .. output_2 .. table.concat(t_body_direct, "\n") .. output_3
out_str_val = out_str_val .. "\n" .. output_2 .. table.concat(t_body_val, "\n") .. output_3
local out_str_direct = t_head_0 .. t_title .. tag_direct .. "\n" .. t_head_1 .. table.concat(t_body_direct, "\n") .. t_foot
local out_str_val = t_head_0 .. t_title .. tag_val .. "\n" .. t_head_1 .. table.concat(t_body_val, "\n") .. t_foot
if approx_t == "direct" then
if approx_t == "direct" then
return out_str_direct
return out_str_direct