Module:Infobox interval: Difference between revisions

Address move of module. -middle dot between "n" and "d"
Request explanation. Set straight the logic around superparticular marks
Line 49: Line 49:
cents = rat.cents(ratio)
cents = rat.cents(ratio)
ket = rat.as_ket(ratio, frame)
ket = rat.as_ket(ratio, frame)
-- display Ratio unless it is page name, in which case it is probably a fallback
-- display Ratio unless it is page name, in which case it is probably a fallback -- what does this mean?
if frame.args["Ratio"] ~= page_name then
if frame.args["Ratio"] ~= page_name then
ratio_string = frame.args["Ratio"] or ""
ratio_string = frame.args["Ratio"] or ""
Line 68: Line 68:
ket = frame.args["Ket"]
ket = frame.args["Ket"]
end
end
-- Ratio is LaTeX unless it is page name, in which case it is probably a fallback
-- Ratio is LaTeX unless it is page name, in which case it is probably a fallback -- what does this mean?
if frame.args["Ratio"] ~= page_name then
if frame.args["Ratio"] ~= page_name then
ratio_string = frame.args["Ratio"] or ""
ratio_string = frame.args["Ratio"] or ""
Line 97: Line 97:


local special_properties = {}
local special_properties = {}
if rational and small then
if rational then
if rat.is_superparticular(ratio) then
if small and rat.is_superparticular(ratio) then
if rat.is_square_superparticular(ratio) then
if rat.is_square_superparticular(ratio) then
table.insert(special_properties, "[[Square superparticular|square superparticular]]")
table.insert(special_properties, "[[Square superparticular|square superparticular]]")
Line 106: Line 106:
cats = cats .. "[[Category:Superparticular ratios]]"
cats = cats .. "[[Category:Superparticular ratios]]"
end
end
end
if rational then
if rat.is_reduced(ratio, 2, not small) then
if rat.is_reduced(ratio, 2, not small) then
table.insert(special_properties, "[[Octave reduction|reduced]]")
table.insert(special_properties, "[[Octave reduction|reduced]]")