Module:Stype cat

local schlink = require('Module:Schlafli link') local p = {}

function p.stypecat(frame) local pframe = frame:getParent local args = pframe.args return p._stypecat(args) end

function p._stypecat(args) local symb_length = 1 for v, k in ipairs(args) do   if (v > symb_length) then symb_length = v   end end local rank = symb_length + 1

local result = "Polytopes of Schläfli type " .. schlink._SchLink(args) .. "."

if (rank == 2) then result = result .. "\n" elseif (rank == 3) then result = result .. "\n" result = result .. "\n" result = result .. "\n" elseif (rank == 4) then result = result .. "\n" else result = result .. "\n" end

return result end

function p.sortname(frame) local pframe = frame:getParent local args = pframe.args return p._sortname(args) end

function p._sortname(args) local result = "" for v, k in ipairs(args) do   result = result .. schlink.checkinfinite(k) .. "," end return result .. " Schläfli type" end

return p