Module:Infobox ET: Difference between revisions
Using Module:Infobox to build the infobox |
m Testing another representation of special properties |
||
Line 76: | Line 76: | ||
u._prime_factorization(et.size) .. prime | u._prime_factorization(et.size) .. prime | ||
}) | }) | ||
if ET.is_highly_melodic(et) then | if debug_mode then | ||
table.insert(infobox_data, { | if ET.is_highly_melodic(et) or (is_zeta ~= false and ET.is_zeta(et)) then | ||
local text = '' | |||
if ET.is_highly_melodic(et) then | |||
text = text .. 'highly melodic (' .. ET.why_highly_melodic(et) .. ')' | |||
end | |||
if is_zeta ~= false and ET.is_zeta(et) then | |||
if #text > 0 then | |||
text = text .. ', ' | |||
end | |||
if type(zeta) ~= 'string' or #zeta == 0 then | |||
text = text .. ET.why_zeta(et) | |||
else | |||
text = text .. zeta | |||
end | |||
end | |||
table.insert(infobox_data, { | |||
'Special properties', | |||
text | |||
}) | |||
end | |||
else | |||
if ET.is_highly_melodic(et) then | |||
table.insert(infobox_data, { | |||
'[[Highly melodic equal division|Highly melodic]]', | |||
ET.why_highly_melodic(et) | |||
}) | |||
end | |||
if is_zeta ~= false and ET.is_zeta(et) then | |||
local why = zeta | |||
if type(zeta) ~= 'string' or #zeta == 0 then | |||
why = ET.why_zeta(et) | |||
end | |||
table.insert(infobox_data, { | |||
'[[The Riemann zeta function and tuning|Zeta]]', | |||
why | |||
}) | |||
end | end | ||
end | end | ||
table.insert(infobox_data, { | table.insert(infobox_data, { |