Module:Aligned table: Difference between revisions
no edit summary
No edit summary |
No edit summary |
||
Line 48: | Line 48: | ||
if type( k ) == 'number' then | if type( k ) == 'number' then | ||
i = math.fmod(k-1,cols) + 1 | i = math.fmod(k-1,cols) + 1 | ||
local j = (k - i) / cols | local j = (k - i - 1) / cols + 1 | ||
if args['class' .. tostring(j) .. '.' .. tostring(i)] then | if args['class' .. tostring(j) .. '.' .. tostring(i)] then | ||
entries[ k ] = '<td class="' .. args['class' .. tostring(j) .. '.' .. tostring(i)] .. '" style="' .. colstyle[i] .. '">' .. v .. '</td>' | entries[ k ] = '<td class="' .. args['class' .. tostring(j) .. '.' .. tostring(i)] .. '" style="' .. colstyle[i] .. '">' .. v .. '</td>' |