Jump to content

Module:Coxeter–Dynkin diagram

Permanently protected module
From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Nullzero (talk | contribs) at 18:49, 10 December 2013 (rm excessive space). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

-- module to turn a parameter list into a list of [[Coxeter–Dynkin diagram ‎]] images.
-- See the template documentation or any example for how it is used and works.
local p = {}
function p.CDD(frame)
    local args = {}
    local pframe = frame:getParent()
    local body ='<span style="display:inline-block;">'             -- create and start the output string
    for v, x in pairs(pframe.args) do                              -- process params, ignoring any names
    	if x ~= '' then                                            -- skip if empty
		    body = body .. "[[File:CDel_" .. x .. ".png|link=]]"   -- write file for this parameter
		end
    end

    body = body .. "</span>"                                       -- finish output string
    return body                                                    -- return result

end

return p