Модуль:Taxonomy/latin
Внешний вид
Для документации этого модуля может быть создана страница Модуль:Taxonomy/latin/doc
local p = {}
function p.latin(frame)
local latin = frame.args[1]
if string.find(latin, "Candidatus") then
latin = string.gsub(latin, "Candidatus(.+)", "Candidatus<i>%1</i>")
return latin
elseif string.find(latin, "%a+%.") then
latin = string.gsub(latin, "(%a+%-?%a*%s*%a*%-?%a*%s)(%a+%.)(.+)", "<i>%1</i>%2<i>%3</i>")
return latin
else return "<i>" .. latin .. "</i>"
end
end
function p.author(frame)
local author= frame.args[1]
if string.find(author, "%set al%.") then
author = string.gsub(author, "(%set al%.)", "<span style='font-variant:normal;'>%1</span>")
end
if string.find(author, "%sex%s") then
author = string.gsub(author, "(%sex%s)", "<span style='font-variant:normal;'>%1</span>")
end
if string.find(author, "%set%s") then
author = string.gsub(author, "(%set%s)", "<span style='font-variant:normal;'>%1</span>")
end
if string.find(author, "%sin%s") then
author = string.gsub(author, "(%sin%s)", "<span style='font-variant:normal;'>%1</span>")
end
if string.find(author, "%semend%.") then
author = string.gsub(author, "(%semend%.)", "<span style='font-variant:normal;'>%1</span>")
end
if string.find(author, "%sapud%s") then
author = string.gsub(author, "(%sapud%s)", "<span style='font-variant:normal;'>%1</span>")
end
if string.find(author, "%se%. a%.") then
author = string.gsub(author, "(%se%. a%.)", "<span style='font-variant:normal;'>%1</span>")
end
if string.find(author, "%sand%s") then
author = string.gsub(author, "(%sand%s)", "<span style='font-variant:normal;'>%1</span>")
end
return "<span style='font-variant:small-caps;'>" .. author .. "</span>"
end
return p