Module:la-adj/table

Definition from Wiktionary, the free dictionary
Jump to navigation Jump to search
Text-x-generic with pencil.svg This module needs documentation.
Please document this module by describing its purpose and usage on the documentation page.

local export = {}


local function convert(data)
	local col = {}
	local row = {}
	local colors = {}
	local marked = {}
	local function add(i,j)
		local entry = data[i][j]
		local col = col[i][j]
		local row = row[i][j]
		local color = colors[i][j]
		if col==0 or row==0 then
			return ""
		end
		if col==1 then
			if row==1 then
				return '\n|style="background:#' .. color .. ';" align=center | ' .. entry
			else
				return '\n|style="background:#' .. color .. ';" align=center rowspan=' .. row .. ' | ' .. entry
			end
		else
			if row==1 then
				return '\n|style="background:#' .. color .. ';" align=center colspan=' .. col .. ' | ' .. entry
			else
				return '\n|style="background:#' .. color .. ';" align=center colspan=' .. col .. ' rowspan=' .. row .. ' | ' .. entry
			end
		end
	end
	
	for i=1,#data do
		col[i] = {}
		row[i] = {}
		colors[i] = {}
		marked[i] = {}
		for j=1,#data[i] do
			col[i][j] = 1
			row[i][j] = 1
			colors[i][j] = "F8F8FF"
			marked[i][j] = false
		end
	end
	
	--merge rows
	for i=1,#data do for j=1,#data[i] do
		if col[i][j] ~= 0 then
			for k=j+1,#data[i] do
				if data[i][j] ~= data[i][k] then
					break
				end
				col[i][j] = col[i][j] + 1
				col[i][k] = 0
				row[i][k] = 0
			end
		end
	end end
	
	--merge columns
	for i=1,#data do
		for j=1,#data[i] do
			if row[i][j] ~= 0 then
				for k=i+1,#data do
					if data[i][j] ~= data[k][j] or col[i][j] ~= col[k][j] then
						break
					end
					row[i][j] = row[i][j] + 1
					row[k][j] = 0
				end
			end
		end
	end
	
	--final
	for i=1,#data do
		for j=1,#data[i] do
			data[i][j] = add(i,j)
		end
		data[i] = table.concat(data[i])
	end
	return data
end

local function make_table_mfn_pl(data)
	local conv = {
		{data.forms.nom_pl_m},
		{data.forms.gen_pl_m},
		{data.forms.dat_pl_m},
		{data.forms.acc_pl_m},
		{data.forms.abl_pl_m},
		{data.forms.voc_pl_m},
	}
	conv = convert(conv)
	
	local output = data.title
	output = output .. '\n{| class="prettytable inflection-table"'
	output = output .. '\n!style="background:#549EA0; font-style:italic;"| Number'
	output = output .. '\n!style="background:#549EA0; font-style:italic;"| Plural'
	output = output .. '\n|-'
	output = output .. '\n!style="background:#40E0D0; font-style:italic;"| Case / Gender'
	output = output .. '\n!style="background:#40E0D0;"| Masc./Fem./Neuter'
	output = output .. '\n|-'
	output = output .. '\n!style="background:#40E0D0; font-style:italic;"| [[nominative case|nominative]]'
	output = output .. conv[1]
	output = output .. '\n|-'
	output = output .. '\n!style="background:#40E0D0; font-style:italic;"| [[genitive case|genitive]]'
	output = output .. conv[2]
	output = output .. '\n|-'
	output = output .. '\n!style="background:#40E0D0; font-style:italic;"| [[dative case|dative]]'
	output = output .. conv[3]
	output = output .. '\n|-'
	output = output .. '\n!style="background:#40E0D0; font-style:italic;"| [[accusative case|accusative]]'
	output = output .. conv[4]
	output = output .. '\n|-'
	output = output .. '\n!style="background:#40E0D0; font-style:italic;"| [[ablative case|ablative]]'
	output = output .. conv[5]
	output = output .. '\n|-'
	if data.voc then
		output = output .. '\n!style="background:#40E0D0; font-style:italic;"| [[vocative case|vocative]]'
		output = output .. conv[6]
	end
	output = output .. '\n|}'
	output = output .. '\n' .. data.footnote
	
	return output
end

local function make_table_mfn_sg(data)
	local conv = {
		{data.forms.nom_sg_m},
		{data.forms.gen_sg_m},
		{data.forms.dat_sg_m},
		{data.forms.acc_sg_m},
		{data.forms.abl_sg_m},
		{data.forms.voc_sg_m},
	}
	conv = convert(conv)
	
	local output = data.title
	output = output .. '\n{| class="prettytable inflection-table"'
	output = output .. '\n!style="background:#549EA0; font-style:italic;"| Number'
	output = output .. '\n!style="background:#549EA0; font-style:italic;"| Singular'
	output = output .. '\n|-'
	output = output .. '\n!style="background:#40E0D0; font-style:italic;"| Case / Gender'
	output = output .. '\n!style="background:#40E0D0;"| Masc./Fem./Neuter'
	output = output .. '\n|-'
	output = output .. '\n!style="background:#40E0D0; font-style:italic;"| [[nominative case|nominative]]'
	output = output .. conv[1]
	output = output .. '\n|-'
	output = output .. '\n!style="background:#40E0D0; font-style:italic;"| [[genitive case|genitive]]'
	output = output .. conv[2]
	output = output .. '\n|-'
	output = output .. '\n!style="background:#40E0D0; font-style:italic;"| [[dative case|dative]]'
	output = output .. conv[3]
	output = output .. '\n|-'
	output = output .. '\n!style="background:#40E0D0; font-style:italic;"| [[accusative case|accusative]]'
	output = output .. conv[4]
	output = output .. '\n|-'
	output = output .. '\n!style="background:#40E0D0; font-style:italic;"| [[ablative case|ablative]]'
	output = output .. conv[5]
	output = output .. '\n|-'
	if data.voc then
		output = output .. '\n!style="background:#40E0D0; font-style:italic;"| [[vocative case|vocative]]'
		output = output .. conv[6]
	end
	output = output .. '\n|}'
	output = output .. '\n' .. data.footnote
	
	return output
end

local function make_table_mf_pl(data)
	local conv = {
		{data.forms.nom_pl_m, data.forms.nom_pl_n},
		{data.forms.gen_pl_m, data.forms.gen_pl_n},
		{data.forms.dat_pl_m, data.forms.dat_pl_n},
		{data.forms.acc_pl_m, data.forms.acc_pl_n},
		{data.forms.abl_pl_m, data.forms.abl_pl_n},
		{data.forms.voc_pl_m, data.forms.voc_pl_n},
	}
	conv = convert(conv)
	
	local output = data.title
	output = output .. '\n{| class="prettytable inflection-table"'
	output = output .. '\n!style="background:#549EA0; font-style:italic;"| Number'
	output = output .. '\n!style="background:#549EA0; font-style:italic;" colspan="2" | Plural'
	output = output .. '\n|-'
	output = output .. '\n!style="background:#40E0D0; font-style:italic;"| Case / Gender'
	output = output .. '\n!style="background:#40E0D0;"| Masc./Fem.'
	output = output .. '\n!style="background:#40E0D0;"| Neuter'
	output = output .. '\n|-'
	output = output .. '\n!style="background:#40E0D0; font-style:italic;"| [[nominative case|nominative]]'
	output = output .. conv[1]
	output = output .. '\n|-'
	output = output .. '\n!style="background:#40E0D0; font-style:italic;"| [[genitive case|genitive]]'
	output = output .. conv[2]
	output = output .. '\n|-'
	output = output .. '\n!style="background:#40E0D0; font-style:italic;"| [[dative case|dative]]'
	output = output .. conv[3]
	output = output .. '\n|-'
	output = output .. '\n!style="background:#40E0D0; font-style:italic;"| [[accusative case|accusative]]'
	output = output .. conv[4]
	output = output .. '\n|-'
	output = output .. '\n!style="background:#40E0D0; font-style:italic;"| [[ablative case|ablative]]'
	output = output .. conv[5]
	output = output .. '\n|-'
	if data.voc then
		output = output .. '\n!style="background:#40E0D0; font-style:italic;"| [[vocative case|vocative]]'
		output = output .. conv[6]
	end
	output = output .. '\n|}'
	output = output .. '\n' .. data.footnote
	
	return output
end

local function make_table_mf_sg(data)
	local conv = {
		{data.forms.nom_sg_m, data.forms.nom_sg_n},
		{data.forms.gen_sg_m, data.forms.gen_sg_n},
		{data.forms.dat_sg_m, data.forms.dat_sg_n},
		{data.forms.acc_sg_m, data.forms.acc_sg_n},
		{data.forms.abl_sg_m, data.forms.abl_sg_n},
		{data.forms.voc_sg_m, data.forms.voc_sg_n},
	}
	conv = convert(conv)
	
	local output = data.title
	output = output .. '\n{| class="prettytable inflection-table"'
	output = output .. '\n!style="background:#549EA0; font-style:italic;"| Number'
	output = output .. '\n!style="background:#549EA0; font-style:italic;" colspan="2" | Singular'
	output = output .. '\n|-'
	output = output .. '\n!style="background:#40E0D0; font-style:italic;"| Case / Gender'
	output = output .. '\n!style="background:#40E0D0;"| Masc./Fem.'
	output = output .. '\n!style="background:#40E0D0;"| Neuter'
	output = output .. '\n|-'
	output = output .. '\n!style="background:#40E0D0; font-style:italic;"| [[nominative case|nominative]]'
	output = output .. conv[1]
	output = output .. '\n|-'
	output = output .. '\n!style="background:#40E0D0; font-style:italic;"| [[genitive case|genitive]]'
	output = output .. conv[2]
	output = output .. '\n|-'
	output = output .. '\n!style="background:#40E0D0; font-style:italic;"| [[dative case|dative]]'
	output = output .. conv[3]
	output = output .. '\n|-'
	output = output .. '\n!style="background:#40E0D0; font-style:italic;"| [[accusative case|accusative]]'
	output = output .. conv[4]
	output = output .. '\n|-'
	output = output .. '\n!style="background:#40E0D0; font-style:italic;"| [[ablative case|ablative]]'
	output = output .. conv[5]
	output = output .. '\n|-'
	if data.voc then
		output = output .. '\n!style="background:#40E0D0; font-style:italic;"| [[vocative case|vocative]]'
		output = output .. conv[6]
	end
	output = output .. '\n|}'
	output = output .. '\n' .. data.footnote
	
	return output
end

local function make_table_pl(data)
	local conv = {
		{data.forms.nom_pl_m, data.forms.nom_pl_f, data.forms.nom_pl_n},
		{data.forms.gen_pl_m, data.forms.gen_pl_f, data.forms.gen_pl_n},
		{data.forms.dat_pl_m, data.forms.dat_pl_f, data.forms.dat_pl_n},
		{data.forms.acc_pl_m, data.forms.acc_pl_f, data.forms.acc_pl_n},
		{data.forms.abl_pl_m, data.forms.abl_pl_f, data.forms.abl_pl_n},
		{data.forms.voc_pl_m, data.forms.voc_pl_f, data.forms.voc_pl_n},
	}
	conv = convert(conv)
	
	local output = data.title
	output = output .. '\n{| class="prettytable inflection-table"'
	output = output .. '\n!style="background:#549EA0; font-style:italic;"| Number'
	output = output .. '\n!style="background:#549EA0; font-style:italic;" colspan="3" | Plural'
	output = output .. '\n|-'
	output = output .. '\n!style="background:#40E0D0; font-style:italic;"| Case / Gender'
	output = output .. '\n!style="background:#40E0D0;"| Masculine'
	output = output .. '\n!style="background:#40E0D0;"| Feminine'
	output = output .. '\n!style="background:#40E0D0;"| Neuter'
	output = output .. '\n|-'
	output = output .. '\n!style="background:#40E0D0; font-style:italic;"| [[nominative case|nominative]]'
	output = output .. conv[1]
	output = output .. '\n|-'
	output = output .. '\n!style="background:#40E0D0; font-style:italic;"| [[genitive case|genitive]]'
	output = output .. conv[2]
	output = output .. '\n|-'
	output = output .. '\n!style="background:#40E0D0; font-style:italic;"| [[dative case|dative]]'
	output = output .. conv[3]
	output = output .. '\n|-'
	output = output .. '\n!style="background:#40E0D0; font-style:italic;"| [[accusative case|accusative]]'
	output = output .. conv[4]
	output = output .. '\n|-'
	output = output .. '\n!style="background:#40E0D0; font-style:italic;"| [[ablative case|ablative]]'
	output = output .. conv[5]
	output = output .. '\n|-'
	if data.voc then
		output = output .. '\n!style="background:#40E0D0; font-style:italic;"| [[vocative case|vocative]]'
		output = output .. conv[6]
	end
	output = output .. '\n|}'
	output = output .. '\n' .. data.footnote
	
	return output
end

local function make_table_sg(data)
	local conv = {
		{data.forms.nom_sg_m, data.forms.nom_sg_f, data.forms.nom_sg_n},
		{data.forms.gen_sg_m, data.forms.gen_sg_f, data.forms.gen_sg_n},
		{data.forms.dat_sg_m, data.forms.dat_sg_f, data.forms.dat_sg_n},
		{data.forms.acc_sg_m, data.forms.acc_sg_f, data.forms.acc_sg_n},
		{data.forms.abl_sg_m, data.forms.abl_sg_f, data.forms.abl_sg_n},
		{data.forms.voc_sg_m, data.forms.voc_sg_f, data.forms.voc_sg_n},
	}
	conv = convert(conv)
	
	local output = data.title
	output = output .. '\n{| class="prettytable inflection-table"'
	output = output .. '\n!style="background:#549EA0; font-style:italic;"| Number'
	output = output .. '\n!style="background:#549EA0; font-style:italic;" colspan="3" | Singular'
	output = output .. '\n|-'
	output = output .. '\n!style="background:#40E0D0; font-style:italic;"| Case / Gender'
	output = output .. '\n!style="background:#40E0D0;"| Masculine'
	output = output .. '\n!style="background:#40E0D0;"| Feminine'
	output = output .. '\n!style="background:#40E0D0;"| Neuter'
	output = output .. '\n|-'
	output = output .. '\n!style="background:#40E0D0; font-style:italic;"| [[nominative case|nominative]]'
	output = output .. conv[1]
	output = output .. '\n|-'
	output = output .. '\n!style="background:#40E0D0; font-style:italic;"| [[genitive case|genitive]]'
	output = output .. conv[2]
	output = output .. '\n|-'
	output = output .. '\n!style="background:#40E0D0; font-style:italic;"| [[dative case|dative]]'
	output = output .. conv[3]
	output = output .. '\n|-'
	output = output .. '\n!style="background:#40E0D0; font-style:italic;"| [[accusative case|accusative]]'
	output = output .. conv[4]
	output = output .. '\n|-'
	output = output .. '\n!style="background:#40E0D0; font-style:italic;"| [[ablative case|ablative]]'
	output = output .. conv[5]
	output = output .. '\n|-'
	if data.voc then
		output = output .. '\n!style="background:#40E0D0; font-style:italic;"| [[vocative case|vocative]]'
		output = output .. conv[6]
	end
	output = output .. '\n|}'
	output = output .. '\n' .. data.footnote
	
	return output
end

local function make_table_mfn(data)
	local conv = {
		{data.forms.nom_sg_m},
		{data.forms.gen_sg_m},
		{data.forms.dat_sg_m},
		{data.forms.acc_sg_m},
		{data.forms.abl_sg_m},
		{data.forms.voc_sg_m},
		{"----"},
		{data.forms.nom_pl_m},
		{data.forms.gen_pl_m},
		{data.forms.dat_pl_m},
		{data.forms.acc_pl_m},
		{data.forms.abl_pl_m},
		{data.forms.voc_pl_m},
	}
	conv = convert(conv)
	
	local output = data.title
	output = output .. '\n{| class="prettytable inflection-table"'
	output = output .. '\n!style="background:#549EA0; font-style:italic;"| Number'
	output = output .. '\n!style="background:#549EA0; font-style:italic;"| Singular'
	output = output .. '\n|rowspan="2"|'
	output = output .. '\n!style="background:#549EA0; font-style:italic;"| Plural'
	output = output .. '\n|-'
	output = output .. '\n!style="background:#40E0D0; font-style:italic;"| Case / Gender'
	output = output .. '\n!style="background:#40E0D0;"| Masc./Fem./Neuter'
	output = output .. '\n!style="background:#40E0D0;"| Masc./Fem./Neuter'
	output = output .. '\n|-'
	output = output .. '\n!style="background:#40E0D0; font-style:italic;"| [[nominative case|nominative]]'
	output = output .. conv[1]
	if data.voc then
		output = output .. '\n|rowspan="6"|'
	else
		output = output .. '\n|rowspan="5"|'
	end
	output = output .. conv[8]
	output = output .. '\n|-'
	output = output .. '\n!style="background:#40E0D0; font-style:italic;"| [[genitive case|genitive]]'
	output = output .. conv[2]
	output = output .. conv[9]
	output = output .. '\n|-'
	output = output .. '\n!style="background:#40E0D0; font-style:italic;"| [[dative case|dative]]'
	output = output .. conv[3]
	output = output .. conv[10]
	output = output .. '\n|-'
	output = output .. '\n!style="background:#40E0D0; font-style:italic;"| [[accusative case|accusative]]'
	output = output .. conv[4]
	output = output .. conv[11]
	output = output .. '\n|-'
	output = output .. '\n!style="background:#40E0D0; font-style:italic;"| [[ablative case|ablative]]'
	output = output .. conv[5]
	output = output .. conv[12]
	output = output .. '\n|-'
	if data.voc then
		output = output .. '\n!style="background:#40E0D0; font-style:italic;"| [[vocative case|vocative]]'
		output = output .. conv[6]
		output = output .. conv[13]
	end
	output = output .. '\n|}'
	output = output .. '\n' .. data.footnote
	
	return output
end

local function make_table_mf(data)
	local conv = {
		{data.forms.nom_sg_m, data.forms.nom_sg_n},
		{data.forms.gen_sg_m, data.forms.gen_sg_n},
		{data.forms.dat_sg_m, data.forms.dat_sg_n},
		{data.forms.acc_sg_m, data.forms.acc_sg_n},
		{data.forms.abl_sg_m, data.forms.abl_sg_n},
		{data.forms.voc_sg_m, data.forms.voc_sg_n},
		{"----"},
		{data.forms.nom_pl_m, data.forms.nom_pl_n},
		{data.forms.gen_pl_m, data.forms.gen_pl_n},
		{data.forms.dat_pl_m, data.forms.dat_pl_n},
		{data.forms.acc_pl_m, data.forms.acc_pl_n},
		{data.forms.abl_pl_m, data.forms.abl_pl_n},
		{data.forms.voc_pl_m, data.forms.voc_pl_n},
	}
	conv = convert(conv)
	
	local output = data.title
	output = output .. '\n{| class="prettytable inflection-table"'
	output = output .. '\n!style="background:#549EA0; font-style:italic;"| Number'
	output = output .. '\n!style="background:#549EA0; font-style:italic;" colspan="2" | Singular'
	output = output .. '\n|rowspan="2"|'
	output = output .. '\n!style="background:#549EA0; font-style:italic;" colspan="2" | Plural'
	output = output .. '\n|-'
	output = output .. '\n!style="background:#40E0D0; font-style:italic;"| Case / Gender'
	output = output .. '\n!style="background:#40E0D0;"| Masc./Fem.'
	output = output .. '\n!style="background:#40E0D0;"| Neuter'
	output = output .. '\n!style="background:#40E0D0;"| Masc./Fem.'
	output = output .. '\n!style="background:#40E0D0;"| Neuter'
	output = output .. '\n|-'
	output = output .. '\n!style="background:#40E0D0; font-style:italic;"| [[nominative case|nominative]]'
	output = output .. conv[1]
	if data.voc then
		output = output .. '\n|rowspan="6"|'
	else
		output = output .. '\n|rowspan="5"|'
	end
	output = output .. conv[8]
	output = output .. '\n|-'
	output = output .. '\n!style="background:#40E0D0; font-style:italic;"| [[genitive case|genitive]]'
	output = output .. conv[2]
	output = output .. conv[9]
	output = output .. '\n|-'
	output = output .. '\n!style="background:#40E0D0; font-style:italic;"| [[dative case|dative]]'
	output = output .. conv[3]
	output = output .. conv[10]
	output = output .. '\n|-'
	output = output .. '\n!style="background:#40E0D0; font-style:italic;"| [[accusative case|accusative]]'
	output = output .. conv[4]
	output = output .. conv[11]
	output = output .. '\n|-'
	output = output .. '\n!style="background:#40E0D0; font-style:italic;"| [[ablative case|ablative]]'
	output = output .. conv[5]
	output = output .. conv[12]
	output = output .. '\n|-'
	if data.voc then
		output = output .. '\n!style="background:#40E0D0; font-style:italic;"| [[vocative case|vocative]]'
		output = output .. conv[6]
		output = output .. conv[13]
	end
	output = output .. '\n|}'
	output = output .. '\n' .. data.footnote
	
	return output
end

function export.make_table(data)
	if not data.forms.nom_sg_n and not data.forms.nom_pl_n then
		if data.num == "pl" then return make_table_mfn_pl(data)
		elseif data.num == "sg" then return make_table_mfn_sg(data)
		else return make_table_mfn(data) end
	elseif not data.forms.nom_sg_f and not data.forms.nom_pl_f then
		if data.num == "pl" then return make_table_mf_pl(data)
		elseif data.num == "sg" then return make_table_mf_sg(data)
		else return make_table_mf(data) end
	else
		if data.num == "pl" then return make_table_pl(data)
		elseif data.num == "sg" then return make_table_sg(data) end
	end
	
	local conv = {
		{data.forms.nom_sg_m, data.forms.nom_sg_f, data.forms.nom_sg_n},
		{data.forms.gen_sg_m, data.forms.gen_sg_f, data.forms.gen_sg_n},
		{data.forms.dat_sg_m, data.forms.dat_sg_f, data.forms.dat_sg_n},
		{data.forms.acc_sg_m, data.forms.acc_sg_f, data.forms.acc_sg_n},
		{data.forms.abl_sg_m, data.forms.abl_sg_f, data.forms.abl_sg_n},
		{data.forms.voc_sg_m, data.forms.voc_sg_f, data.forms.voc_sg_n},
		{"----", "----", "----"},
		{data.forms.nom_pl_m, data.forms.nom_pl_f, data.forms.nom_pl_n},
		{data.forms.gen_pl_m, data.forms.gen_pl_f, data.forms.gen_pl_n},
		{data.forms.dat_pl_m, data.forms.dat_pl_f, data.forms.dat_pl_n},
		{data.forms.acc_pl_m, data.forms.acc_pl_f, data.forms.acc_pl_n},
		{data.forms.abl_pl_m, data.forms.abl_pl_f, data.forms.abl_pl_n},
		{data.forms.voc_pl_m, data.forms.voc_pl_f, data.forms.voc_pl_n},
	}
	conv = convert(conv)
	
	local output = data.title
	output = output .. '\n{| class="prettytable inflection-table"'
	output = output .. '\n!style="background:#549EA0; font-style:italic;"| Number'
	output = output .. '\n!style="background:#549EA0; font-style:italic;" colspan="3" | Singular'
	output = output .. '\n|rowspan="2"|'
	output = output .. '\n!style="background:#549EA0; font-style:italic;" colspan="3" | Plural'
	output = output .. '\n|-'
	output = output .. '\n!style="background:#40E0D0; font-style:italic;"| Case / Gender'
	output = output .. '\n!style="background:#40E0D0;"| Masculine'
	output = output .. '\n!style="background:#40E0D0;"| Feminine'
	output = output .. '\n!style="background:#40E0D0;"| Neuter'
	output = output .. '\n!style="background:#40E0D0;"| Masculine'
	output = output .. '\n!style="background:#40E0D0;"| Feminine'
	output = output .. '\n!style="background:#40E0D0;"| Neuter'
	output = output .. '\n|-'
	output = output .. '\n!style="background:#40E0D0; font-style:italic;"| [[nominative case|nominative]]'
	output = output .. conv[1]
	if data.voc then
		output = output .. '\n|rowspan="6"|'
	else
		output = output .. '\n|rowspan="5"|'
	end
	output = output .. conv[8]
	output = output .. '\n|-'
	output = output .. '\n!style="background:#40E0D0; font-style:italic;"| [[genitive case|genitive]]'
	output = output .. conv[2]
	output = output .. conv[9]
	output = output .. '\n|-'
	output = output .. '\n!style="background:#40E0D0; font-style:italic;"| [[dative case|dative]]'
	output = output .. conv[3]
	output = output .. conv[10]
	output = output .. '\n|-'
	output = output .. '\n!style="background:#40E0D0; font-style:italic;"| [[accusative case|accusative]]'
	output = output .. conv[4]
	output = output .. conv[11]
	output = output .. '\n|-'
	output = output .. '\n!style="background:#40E0D0; font-style:italic;"| [[ablative case|ablative]]'
	output = output .. conv[5]
	output = output .. conv[12]
	if data.voc then
		output = output .. '\n|-'
		output = output .. '\n!style="background:#40E0D0; font-style:italic;"| [[vocative case|vocative]]'
		output = output .. conv[6]
		output = output .. conv[13]
	end
	output = output .. '\n|}'
	output = output .. '\n' .. data.footnote
	
	return output
end

return export