Module:Recto-verso
Appearance
This module depends on the following other modules: |
Logic for {{recto-verso}}.
require('strict')
local getArgs = require('Module:Arguments').getArgs
local toArabic = require('Module:Roman').toArabic
local p = {}
-- Template:Recto-verso
function p._recto_verso(args)
local n = tonumber(args[1]) or tonumber(toArabic(args[1])) or 0
if n % 2 == 1 then
return args[2]
else
return args[3]
end
end
function p.recto_verso(frame)
return p._recto_verso(getArgs(frame))
end
return p