Module:Infobox MOS: Difference between revisions
Jump to navigation
Jump to search
Created page with "local p = {} local i = require('Module:Interval') local u = require('Module:Utils') local rat = require('Module:Rational') local l = require('Module:Limits') local MOS = requi..." |
No edit summary |
||
| Line 13: | Line 13: | ||
local tuning = frame.args['tuning'] | local tuning = frame.args['tuning'] | ||
local | local mos = MOS.parse(tuning) or MOS.parse('5L 2s') | ||
-- category of the main article | -- category of the main article | ||
Revision as of 18:54, 29 March 2023
- This module should not be invoked directly; use its corresponding template instead: Template:Infobox MOS.
This module generates an infobox providing information about a given moment of symmetry (MOS) scale.
| Introspection summary for Module:Infobox MOS | ||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
| |||||||||||||||||||||||||||
No function descriptions were provided. The Lua code may have further information.
local p = {}
local i = require('Module:Interval')
local u = require('Module:Utils')
local rat = require('Module:Rational')
local l = require('Module:Limits')
local MOS = require('Module:MOS')
local infobox = require('Module:Infobox')
function p.infobox_mos(frame)
-- debug mode
local debug_mode = frame.args['debug'] ~= nil
local categories = ''
local tuning = frame.args['tuning']
local mos = MOS.parse(tuning) or MOS.parse('5L 2s')
-- category of the main article
categories = categories .. '[[Category:' .. tuning .. '| ]]'
result = infobox.build(
'[[' .. mos.suffix .. '|' .. tuning .. ']]',
infobox_data,
prev_one,
next_one
)
if not debug_mode then
result = result .. categories
end
return result
end
return p