Module:Infobox chord: Difference between revisions

Bcmills (talk | contribs)
m Undo revision 152537 by Bcmills (talk)
Tag: Undo
Bcmills (talk | contribs)
include the product of the genus terms if it is reasonably small
Line 150: Line 150:
-- genus
-- genus
local genus_terms = {}
local genus_terms = {}
local genus_product = 1
local primes = {}
local primes = {}
for prime, _ in pairs(genus) do
for prime, _ in pairs(genus) do
Line 193: Line 194:
cats = cats .. "[[Category:Just intonation chords" .. sort_tag .. "]]"
cats = cats .. "[[Category:Just intonation chords" .. sort_tag .. "]]"
end
end
table.insert(infobox_data, {"[[Genus]]", table.concat(genus_terms, " ⋅ ")})
 
local genus_data = table.concat(genus_terms, " ⋅ ")
-- append the actual product if it's (arbitrarily) 9 digits or fewer
if genus_product < 1000000000 then
genus_data = genus_data .. " ([[genus " .. genus_product .. "|" .. genus_product .. "]])"
end
table.insert(infobox_data, {"[[Genus]]", genus_data})


if odd_limit < 32 then
if odd_limit < 32 then