Module:Ups and downs sharpness: Difference between revisions

Tristanbay (talk | contribs)
seeing if this fixes it not going into the right case
Tristanbay (talk | contribs)
replaced taking directly from frame.args with variable
Line 8: Line 8:


function p.ud_sharpness(frame) -- generate table
function p.ud_sharpness(frame) -- generate table
local sharp = sharp_n(frame.args["edo"])
local edo = frame.args["edo"]
local sharp = sharp_n(edo)
local spanf = "| <div style=\"width: %sem; margin-bottom: -45px; transform:translate(0, %spx); white-space: nowrap;\">%s</div>\n"
local spanf = "| <div style=\"width: %sem; margin-bottom: -45px; transform:translate(0, %spx); white-space: nowrap;\">%s</div>\n"
local cell_width -- forced cell width in ems
local cell_width -- forced cell width in ems
Line 58: Line 59:
tab = "{{sharpness-sharp1}}"
tab = "{{sharpness-sharp1}}"
else
else
if frame.args["edo"] % 12 == 0 and frame.args["edo"] <= 300 then -- does it temper out 531441/524288?
if edo % 12 == 0 and edo <= 300 then -- does it temper out 531441/524288?
tab = "<div style=\"overflow-x:auto\">\n{| class=\"wikitable center-all\"\n"
tab = "<div style=\"overflow-x:auto\">\n{| class=\"wikitable center-all\"\n"
.. "|-\n"
.. "|-\n"