Module:MOS tunings: Difference between revisions
Rename according to changes to ji ratios module; multiple ratios have nonbreaking spaces in between |
ArrowHead294 (talk | contribs) mNo edit summary |
||
| Line 160: | Line 160: | ||
-- Table caption | -- Table caption | ||
result = result .. "|+ style=\"font-size: 105%; white-space: nowrap;\" | " .. string.format("%s of %s | result = result .. "|+ style=\"font-size: 105%; white-space: nowrap;\" | " .. string.format("%s of %s", step_ratio_range, scale_sig) .. "\n|-" | ||
-- First row of headers | -- First row of headers | ||
-- First two headers span two rows | -- First two headers span two rows | ||
result = result .. "! rowspan=\"2\" class=\"unsortable\" | Scale degree | result = result .. "! rowspan=\"2\" class=\"unsortable\" | Scale degree !! rowspan=\"2\" class=\"unsortable\" | Abbrev." | ||
-- Headers for tunings; these span two cols | -- Headers for tunings; these span two cols | ||
| Line 178: | Line 177: | ||
local et_as_string = et.as_string(mos.mos_to_et(input_mos, step_ratios[i])) | local et_as_string = et.as_string(mos.mos_to_et(input_mos, step_ratios[i])) | ||
local header_text = string.format("%s<br />[[%s]]", step_ratio_as_text, et_as_string) | local header_text = string.format("%s<br />[[%s]]", step_ratio_as_text, et_as_string) | ||
result = result .. string.format("! colspan=\"2\" | %s | result = result .. string.format(" !! colspan=\"2\" | %s", header_text) | ||
end | end | ||
-- Headers for JI ratios; this spans two rows | -- Headers for JI ratios; this spans two rows | ||
if #ji_ratios ~= 0 then | if #ji_ratios ~= 0 then | ||
result = result .. "! rowspan=\"2\" class=\"unsortable\" | Approx. ratios*\n" | result = result .. " !! rowspan=\"2\" class=\"unsortable\" | Approx. ratios*\n" | ||
end | end | ||
result = result .. "|-\n" | result = result .. "|-\n!" | ||
-- Second row of headers | -- Second row of headers | ||
for i = 1, #step_ratios do | for i = 1, #step_ratios do | ||
result = result .. " | result = result .. " style=\"border-right: none;\" class=\"unsortable\" | Steps !! style=\"border-left: none; text-align: center;\" | ¢ !!" | ||
end | end | ||
result = result:sub(1, -4) | |||
-- Add a row for each scale degree | -- Add a row for each scale degree | ||
| Line 231: | Line 231: | ||
if #ji_ratios ~= 0 then | if #ji_ratios ~= 0 then | ||
result = result .. | result = result | ||
.. "<span style=\"font-size: 0.75em;\">* – " | |||
.. string.format("%s", footnotes) | |||
.. "</span>" | |||
end | end | ||