More languages
More actions
local p = {}
local function is_set (var)
return not (var == nil or var == '');
end
function p.cite( frame )
local pframe = frame:getParent()
local Author = pframe.args.author
local Title = pframe.args.title
local Year = pframe.args.year
if is_set (Author) then
if is_set (Year) then
return Author .. " (" .. Year .. ")" .. ". " .. "''" .. Title .. "''"
else
return Author .. ". " .. "''" .. Title .. "''"
end
end
end
return p