InfoboxLua

function table(title) t = th =     ' return string.format(r, image, width) end

function caption_row(text) caption =    %s return string.format(caption, text) end

function row(title, text) return string.format(' %s %s ', title, text) end

function infobox(params) print (table(params.title)) print (img_row(params.image, params.imgwidth)) print (caption_row(params.imgcaption))

--handle the rest of the args (where arg and n are pre-defined vars) for k,v in pairs(params.rows) do   print (row(k,v)) end end