Modul:la-adj/table

Üdvözlöm, Ön a Modul:la-adj/table szó jelentését keresi. A DICTIOUS-ban nem csak a Modul:la-adj/table szó összes szótári jelentését megtalálod, hanem megismerheted az etimológiáját, a jellemzőit és azt is, hogyan kell a Modul:la-adj/table szót egyes és többes számban mondani. Minden, amit a Modul:la-adj/table szóról tudni kell, itt található. A Modul:la-adj/table szó meghatározása segít abban, hogy pontosabban és helyesebben fogalmazz, amikor beszélsz vagy írsz. AModul:la-adj/table és más szavak definíciójának ismerete gazdagítja a szókincsedet, és több és jobb nyelvi forráshoz juttat.

A modult a Modul:la-adj/table/doc lapon tudod dokumentálni

local export = {}

local ut = require("Module:utils")

local function convert(data, conv)
	local col = {}
	local row = {}
	local colors = {}
	local marked = {}
	local slots = {}
	local function add(i,j)
		local col = col
		local row = row
		local color = colors
		if col==0 or row==0 then
			return ""
		end
		local entry = data.finish_show_form(data, slots)
		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,#conv do
		col = {}
		row = {}
		colors = {}
		marked = {}
		slots = {}
		for j=1,#conv do
			col = 1
			row = 1
			colors = "F8F8FF"
			marked = false
			slots = {conv}
		end
	end

	-- Return true if the contents of the two slots are equal in every
	-- way. This means the forms are the same, the footnote text is the
	-- same, and the accelerator lemmas are the same. We need to compare
	-- the accelerator lemmas because in some cases different slots have
	-- different lemmas (e.g. when noneut=1 is set, the masculine slots
	-- will have the masculine lemma but the feminine slots will have the
	-- feminine lemma).
	local function slots_equal(slot1, slot2)
		return ut.equals(data.forms, data.forms) and
			ut.equals(data.notetext, data.notetext) and
			(data.accel and data.accel.lemma or nil) ==
			(data.accel and data.accel.lemma or nil)
	end

	--merge rows
	for i=1,#conv do for j=1,#conv do
		if col ~= 0 then
			for k=j+1,#conv do
				local slotij = conv
				local slotik = conv
				if not slots_equal(slotij, slotik) then
					break
				end
				col = col + 1
				col = 0
				row = 0
				for _, slot in ipairs(slots) do
					table.insert(slots, slot)
				end
				slots = nil
			end
		end
	end end
	
	--merge columns
	for i=1,#conv do
		for j=1,#conv do
			if row ~= 0 then
				for k=i+1,#conv do
					local slotij = conv
					local slotkj = conv
					if not slots_equal(slotij, slotkj) or col ~= col then
						break
					end
					row = row + 1
					row = 0
					for _, slot in ipairs(slots) do
						table.insert(slots, slot)
					end
					slots = nil
				end
			end
		end
	end
	
	--final
	for i=1,#conv do
		for j=1,#conv do
			conv = add(i,j)
		end
		conv = table.concat(conv)
	end
	return conv
end

local function make_table_mfn_pl(data, noneut)
	local conv = {
		{"nom_pl_m"},
		{"gen_pl_m"},
		{"dat_pl_m"},
		{"acc_pl_m"},
		{"abl_pl_m"},
		{"voc_pl_m"},
	}
	conv = convert(data, conv)
	
	local output = data.title
	output = output .. '\n{| class="prettytable inflection-table inflection-table-la"'
	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;"| ' .. (noneut and 'Masc./Fem.' or 'Masc./Fem./Neut.')
	output = output .. '\n|-'
	output = output .. '\n!style="background:#40E0D0; font-style:italic;"| ]'
	output = output .. conv
	output = output .. '\n|-'
	output = output .. '\n!style="background:#40E0D0; font-style:italic;"| ]'
	output = output .. conv
	output = output .. '\n|-'
	output = output .. '\n!style="background:#40E0D0; font-style:italic;"| ]'
	output = output .. conv
	output = output .. '\n|-'
	output = output .. '\n!style="background:#40E0D0; font-style:italic;"| ]'
	output = output .. conv
	output = output .. '\n|-'
	output = output .. '\n!style="background:#40E0D0; font-style:italic;"| ]'
	output = output .. conv
	output = output .. '\n|-'
	if data.voc then
		output = output .. '\n!style="background:#40E0D0; font-style:italic;"| ]'
		output = output .. conv
	end
	output = output .. '\n|}'

	return output
end

local function make_table_mfn_sg(data, noneut)
	local conv = {
		{"nom_sg_m"},
		{"gen_sg_m"},
		{"dat_sg_m"},
		{"acc_sg_m"},
		{"abl_sg_m"},
		{"voc_sg_m"},
	}
	conv = convert(data, conv)
	
	local output = data.title
	output = output .. '\n{| class="prettytable inflection-table inflection-table-la"'
	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;"| ' .. (noneut and 'Masc./Fem.' or 'Masc./Fem./Neut.')
	output = output .. '\n|-'
	output = output .. '\n!style="background:#40E0D0; font-style:italic;"| ]'
	output = output .. conv
	output = output .. '\n|-'
	output = output .. '\n!style="background:#40E0D0; font-style:italic;"| ]'
	output = output .. conv
	output = output .. '\n|-'
	output = output .. '\n!style="background:#40E0D0; font-style:italic;"| ]'
	output = output .. conv
	output = output .. '\n|-'
	output = output .. '\n!style="background:#40E0D0; font-style:italic;"| ]'
	output = output .. conv
	output = output .. '\n|-'
	output = output .. '\n!style="background:#40E0D0; font-style:italic;"| ]'
	output = output .. conv
	output = output .. '\n|-'
	if data.voc then
		output = output .. '\n!style="background:#40E0D0; font-style:italic;"| ]'
		output = output .. conv
	end
	output = output .. '\n|}'

	return output
end

local function make_table_mf_and_n_pl(data)
	local conv = {
		{"nom_pl_m", "nom_pl_n"},
		{"gen_pl_m", "gen_pl_n"},
		{"dat_pl_m", "dat_pl_n"},
		{"acc_pl_m", "acc_pl_n"},
		{"abl_pl_m", "abl_pl_n"},
		{"voc_pl_m", "voc_pl_n"},
	}
	conv = convert(data, conv)
	
	local output = data.title
	output = output .. '\n{| class="prettytable inflection-table inflection-table-la"'
	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;"| ]'
	output = output .. conv
	output = output .. '\n|-'
	output = output .. '\n!style="background:#40E0D0; font-style:italic;"| ]'
	output = output .. conv
	output = output .. '\n|-'
	output = output .. '\n!style="background:#40E0D0; font-style:italic;"| ]'
	output = output .. conv
	output = output .. '\n|-'
	output = output .. '\n!style="background:#40E0D0; font-style:italic;"| ]'
	output = output .. conv
	output = output .. '\n|-'
	output = output .. '\n!style="background:#40E0D0; font-style:italic;"| ]'
	output = output .. conv
	output = output .. '\n|-'
	if data.voc then
		output = output .. '\n!style="background:#40E0D0; font-style:italic;"| ]'
		output = output .. conv
	end
	output = output .. '\n|}'

	return output
end

local function make_table_mf_and_n_sg(data)
	local conv = {
		{"nom_sg_m", "nom_sg_n"},
		{"gen_sg_m", "gen_sg_n"},
		{"dat_sg_m", "dat_sg_n"},
		{"acc_sg_m", "acc_sg_n"},
		{"abl_sg_m", "abl_sg_n"},
		{"voc_sg_m", "voc_sg_n"},
	}
	conv = convert(data, conv)
	
	local output = data.title
	output = output .. '\n{| class="prettytable inflection-table inflection-table-la"'
	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;"| ]'
	output = output .. conv
	output = output .. '\n|-'
	output = output .. '\n!style="background:#40E0D0; font-style:italic;"| ]'
	output = output .. conv
	output = output .. '\n|-'
	output = output .. '\n!style="background:#40E0D0; font-style:italic;"| ]'
	output = output .. conv
	output = output .. '\n|-'
	output = output .. '\n!style="background:#40E0D0; font-style:italic;"| ]'
	output = output .. conv
	output = output .. '\n|-'
	output = output .. '\n!style="background:#40E0D0; font-style:italic;"| ]'
	output = output .. conv
	output = output .. '\n|-'
	if data.voc then
		output = output .. '\n!style="background:#40E0D0; font-style:italic;"| ]'
		output = output .. conv
	end
	output = output .. '\n|}'

	return output
end

local function make_table_m_and_f_pl(data)
	local conv = {
		{"nom_pl_m", "nom_pl_f"},
		{"gen_pl_m", "gen_pl_f"},
		{"dat_pl_m", "dat_pl_f"},
		{"acc_pl_m", "acc_pl_f"},
		{"abl_pl_m", "abl_pl_f"},
		{"voc_pl_m", "voc_pl_f"},
	}
	conv = convert(data, conv)
	
	local output = data.title
	output = output .. '\n{| class="prettytable inflection-table inflection-table-la"'
	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;"| Masculine'
	output = output .. '\n!style="background:#40E0D0;"| Feminine'
	output = output .. '\n|-'
	output = output .. '\n!style="background:#40E0D0; font-style:italic;"| ]'
	output = output .. conv
	output = output .. '\n|-'
	output = output .. '\n!style="background:#40E0D0; font-style:italic;"| ]'
	output = output .. conv
	output = output .. '\n|-'
	output = output .. '\n!style="background:#40E0D0; font-style:italic;"| ]'
	output = output .. conv
	output = output .. '\n|-'
	output = output .. '\n!style="background:#40E0D0; font-style:italic;"| ]'
	output = output .. conv
	output = output .. '\n|-'
	output = output .. '\n!style="background:#40E0D0; font-style:italic;"| ]'
	output = output .. conv
	output = output .. '\n|-'
	if data.voc then
		output = output .. '\n!style="background:#40E0D0; font-style:italic;"| ]'
		output = output .. conv
	end
	output = output .. '\n|}'

	return output
end

local function make_table_m_and_f_sg(data)
	local conv = {
		{"nom_sg_m", "nom_sg_f"},
		{"gen_sg_m", "gen_sg_f"},
		{"dat_sg_m", "dat_sg_f"},
		{"acc_sg_m", "acc_sg_f"},
		{"abl_sg_m", "abl_sg_f"},
		{"voc_sg_m", "voc_sg_f"},
	}
	conv = convert(data, conv)
	
	local output = data.title
	output = output .. '\n{| class="prettytable inflection-table inflection-table-la"'
	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;"| Masculine'
	output = output .. '\n!style="background:#40E0D0;"| Feminine'
	output = output .. '\n|-'
	output = output .. '\n!style="background:#40E0D0; font-style:italic;"| ]'
	output = output .. conv
	output = output .. '\n|-'
	output = output .. '\n!style="background:#40E0D0; font-style:italic;"| ]'
	output = output .. conv
	output = output .. '\n|-'
	output = output .. '\n!style="background:#40E0D0; font-style:italic;"| ]'
	output = output .. conv
	output = output .. '\n|-'
	output = output .. '\n!style="background:#40E0D0; font-style:italic;"| ]'
	output = output .. conv
	output = output .. '\n|-'
	output = output .. '\n!style="background:#40E0D0; font-style:italic;"| ]'
	output = output .. conv
	output = output .. '\n|-'
	if data.voc then
		output = output .. '\n!style="background:#40E0D0; font-style:italic;"| ]'
		output = output .. conv
	end
	output = output .. '\n|}'

	return output
end

local function make_table_m_and_f_and_n_pl(data)
	local conv = {
		{"nom_pl_m", "nom_pl_f", "nom_pl_n"},
		{"gen_pl_m", "gen_pl_f", "gen_pl_n"},
		{"dat_pl_m", "dat_pl_f", "dat_pl_n"},
		{"acc_pl_m", "acc_pl_f", "acc_pl_n"},
		{"abl_pl_m", "abl_pl_f", "abl_pl_n"},
		{"voc_pl_m", "voc_pl_f", "voc_pl_n"},
	}
	conv = convert(data, conv)
	
	local output = data.title
	output = output .. '\n{| class="prettytable inflection-table inflection-table-la"'
	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;"| ]'
	output = output .. conv
	output = output .. '\n|-'
	output = output .. '\n!style="background:#40E0D0; font-style:italic;"| ]'
	output = output .. conv
	output = output .. '\n|-'
	output = output .. '\n!style="background:#40E0D0; font-style:italic;"| ]'
	output = output .. conv
	output = output .. '\n|-'
	output = output .. '\n!style="background:#40E0D0; font-style:italic;"| ]'
	output = output .. conv
	output = output .. '\n|-'
	output = output .. '\n!style="background:#40E0D0; font-style:italic;"| ]'
	output = output .. conv
	output = output .. '\n|-'
	if data.voc then
		output = output .. '\n!style="background:#40E0D0; font-style:italic;"| ]'
		output = output .. conv
	end
	output = output .. '\n|}'

	return output
end

local function make_table_m_and_f_and_n_sg(data)
	local conv = {
		{"nom_sg_m", "nom_sg_f", "nom_sg_n"},
		{"gen_sg_m", "gen_sg_f", "gen_sg_n"},
		{"dat_sg_m", "dat_sg_f", "dat_sg_n"},
		{"acc_sg_m", "acc_sg_f", "acc_sg_n"},
		{"abl_sg_m", "abl_sg_f", "abl_sg_n"},
		{"voc_sg_m", "voc_sg_f", "voc_sg_n"},
	}
	conv = convert(data, conv)
	
	local output = data.title
	output = output .. '\n{| class="prettytable inflection-table inflection-table-la"'
	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;"| ]'
	output = output .. conv
	output = output .. '\n|-'
	output = output .. '\n!style="background:#40E0D0; font-style:italic;"| ]'
	output = output .. conv
	output = output .. '\n|-'
	output = output .. '\n!style="background:#40E0D0; font-style:italic;"| ]'
	output = output .. conv
	output = output .. '\n|-'
	output = output .. '\n!style="background:#40E0D0; font-style:italic;"| ]'
	output = output .. conv
	output = output .. '\n|-'
	output = output .. '\n!style="background:#40E0D0; font-style:italic;"| ]'
	output = output .. conv
	output = output .. '\n|-'
	if data.voc then
		output = output .. '\n!style="background:#40E0D0; font-style:italic;"| ]'
		output = output .. conv
	end
	output = output .. '\n|}'

	return output
end

local function make_table_mfn(data, noneut)
	local conv = {
		{"nom_sg_m"},
		{"gen_sg_m"},
		{"dat_sg_m"},
		{"acc_sg_m"},
		{"abl_sg_m"},
		{"voc_sg_m"},
		{"----"},
		{"nom_pl_m"},
		{"gen_pl_m"},
		{"dat_pl_m"},
		{"acc_pl_m"},
		{"abl_pl_m"},
		{"voc_pl_m"},
	}
	conv = convert(data, conv)
	
	local output = data.title
	output = output .. '\n{| class="prettytable inflection-table inflection-table-la"'
	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;"| ' .. (noneut and 'Masc./Fem.' or 'Masc./Fem./Neut.')
	output = output .. '\n!style="background:#40E0D0;"| ' .. (noneut and 'Masc./Fem.' or 'Masc./Fem./Neut.')
	output = output .. '\n|-'
	output = output .. '\n!style="background:#40E0D0; font-style:italic;"| ]'
	output = output .. conv
	if data.voc then
		output = output .. '\n|rowspan="6"|'
	else
		output = output .. '\n|rowspan="5"|'
	end
	output = output .. conv
	output = output .. '\n|-'
	output = output .. '\n!style="background:#40E0D0; font-style:italic;"| ]'
	output = output .. conv
	output = output .. conv
	output = output .. '\n|-'
	output = output .. '\n!style="background:#40E0D0; font-style:italic;"| ]'
	output = output .. conv
	output = output .. conv
	output = output .. '\n|-'
	output = output .. '\n!style="background:#40E0D0; font-style:italic;"| ]'
	output = output .. conv
	output = output .. conv
	output = output .. '\n|-'
	output = output .. '\n!style="background:#40E0D0; font-style:italic;"| ]'
	output = output .. conv
	output = output .. conv
	output = output .. '\n|-'
	if data.voc then
		output = output .. '\n!style="background:#40E0D0; font-style:italic;"| ]'
		output = output .. conv
		output = output .. conv
	end
	output = output .. '\n|}'

	return output
end

local function make_table_mf_and_n(data)
	local conv = {
		{"nom_sg_m", "nom_sg_n"},
		{"gen_sg_m", "gen_sg_n"},
		{"dat_sg_m", "dat_sg_n"},
		{"acc_sg_m", "acc_sg_n"},
		{"abl_sg_m", "abl_sg_n"},
		{"voc_sg_m", "voc_sg_n"},
		{"----", "----"},
		{"nom_pl_m", "nom_pl_n"},
		{"gen_pl_m", "gen_pl_n"},
		{"dat_pl_m", "dat_pl_n"},
		{"acc_pl_m", "acc_pl_n"},
		{"abl_pl_m", "abl_pl_n"},
		{"voc_pl_m", "voc_pl_n"},
	}
	conv = convert(data, conv)
	
	local output = data.title
	output = output .. '\n{| class="prettytable inflection-table inflection-table-la"'
	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;"| ]'
	output = output .. conv
	if data.voc then
		output = output .. '\n|rowspan="6"|'
	else
		output = output .. '\n|rowspan="5"|'
	end
	output = output .. conv
	output = output .. '\n|-'
	output = output .. '\n!style="background:#40E0D0; font-style:italic;"| ]'
	output = output .. conv
	output = output .. conv
	output = output .. '\n|-'
	output = output .. '\n!style="background:#40E0D0; font-style:italic;"| ]'
	output = output .. conv
	output = output .. conv
	output = output .. '\n|-'
	output = output .. '\n!style="background:#40E0D0; font-style:italic;"| ]'
	output = output .. conv
	output = output .. conv
	output = output .. '\n|-'
	output = output .. '\n!style="background:#40E0D0; font-style:italic;"| ]'
	output = output .. conv
	output = output .. conv
	output = output .. '\n|-'
	if data.voc then
		output = output .. '\n!style="background:#40E0D0; font-style:italic;"| ]'
		output = output .. conv
		output = output .. conv
	end
	output = output .. '\n|}'

	return output
end

local function make_table_m_and_f(data)
	local conv = {
		{"nom_sg_m", "nom_sg_f"},
		{"gen_sg_m", "gen_sg_f"},
		{"dat_sg_m", "dat_sg_f"},
		{"acc_sg_m", "acc_sg_f"},
		{"abl_sg_m", "abl_sg_f"},
		{"voc_sg_m", "voc_sg_f"},
		{"----", "----"},
		{"nom_pl_m", "nom_pl_f"},
		{"gen_pl_m", "gen_pl_f"},
		{"dat_pl_m", "dat_pl_f"},
		{"acc_pl_m", "acc_pl_f"},
		{"abl_pl_m", "abl_pl_f"},
		{"voc_pl_m", "voc_pl_f"},
	}
	conv = convert(data, conv)
	
	local output = data.title
	output = output .. '\n{| class="prettytable inflection-table inflection-table-la"'
	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;"| Masculine'
	output = output .. '\n!style="background:#40E0D0;"| Feminine'
	output = output .. '\n!style="background:#40E0D0;"| Masculine'
	output = output .. '\n!style="background:#40E0D0;"| Feminine'
	output = output .. '\n|-'
	output = output .. '\n!style="background:#40E0D0; font-style:italic;"| ]'
	output = output .. conv
	if data.voc then
		output = output .. '\n|rowspan="6"|'
	else
		output = output .. '\n|rowspan="5"|'
	end
	output = output .. conv
	output = output .. '\n|-'
	output = output .. '\n!style="background:#40E0D0; font-style:italic;"| ]'
	output = output .. conv
	output = output .. conv
	output = output .. '\n|-'
	output = output .. '\n!style="background:#40E0D0; font-style:italic;"| ]'
	output = output .. conv
	output = output .. conv
	output = output .. '\n|-'
	output = output .. '\n!style="background:#40E0D0; font-style:italic;"| ]'
	output = output .. conv
	output = output .. conv
	output = output .. '\n|-'
	output = output .. '\n!style="background:#40E0D0; font-style:italic;"| ]'
	output = output .. conv
	output = output .. conv
	output = output .. '\n|-'
	if data.voc then
		output = output .. '\n!style="background:#40E0D0; font-style:italic;"| ]'
		output = output .. conv
		output = output .. conv
	end
	output = output .. '\n|}'

	return output
end

local function make_table_m_and_f_and_n(data)	
	local conv = {
		{"nom_sg_m", "nom_sg_f", "nom_sg_n"},
		{"gen_sg_m", "gen_sg_f", "gen_sg_n"},
		{"dat_sg_m", "dat_sg_f", "dat_sg_n"},
		{"acc_sg_m", "acc_sg_f", "acc_sg_n"},
		{"abl_sg_m", "abl_sg_f", "abl_sg_n"},
		{"voc_sg_m", "voc_sg_f", "voc_sg_n"},
		{"----", "----", "----"},
		{"nom_pl_m", "nom_pl_f", "nom_pl_n"},
		{"gen_pl_m", "gen_pl_f", "gen_pl_n"},
		{"dat_pl_m", "dat_pl_f", "dat_pl_n"},
		{"acc_pl_m", "acc_pl_f", "acc_pl_n"},
		{"abl_pl_m", "abl_pl_f", "abl_pl_n"},
		{"voc_pl_m", "voc_pl_f", "voc_pl_n"},
	}
	conv = convert(data, conv)
	
	local output = data.title
	output = output .. '\n{| class="prettytable inflection-table inflection-table-la"'
	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;"| ]'
	output = output .. conv
	if data.voc then
		output = output .. '\n|rowspan="6"|'
	else
		output = output .. '\n|rowspan="5"|'
	end
	output = output .. conv
	output = output .. '\n|-'
	output = output .. '\n!style="background:#40E0D0; font-style:italic;"| ]'
	output = output .. conv
	output = output .. conv
	output = output .. '\n|-'
	output = output .. '\n!style="background:#40E0D0; font-style:italic;"| ]'
	output = output .. conv
	output = output .. conv
	output = output .. '\n|-'
	output = output .. '\n!style="background:#40E0D0; font-style:italic;"| ]'
	output = output .. conv
	output = output .. conv
	output = output .. '\n|-'
	output = output .. '\n!style="background:#40E0D0; font-style:italic;"| ]'
	output = output .. conv
	output = output .. conv
	if data.voc then
		output = output .. '\n|-'
		output = output .. '\n!style="background:#40E0D0; font-style:italic;"| ]'
		output = output .. conv
		output = output .. conv
	end
	output = output .. '\n|}'
	
	return output
end

function export.make_table(data, noneut)
	local output
	if not data.forms.nom_sg_n and not data.forms.nom_pl_n then
		if data.forms.nom_sg_f or data.forms.nom_pl_f then
			if data.num == "pl" then output = make_table_m_and_f_pl(data)
			elseif data.num == "sg" then output = make_table_m_and_f_sg(data)
			else output = make_table_m_and_f(data) end
		else
			if data.num == "pl" then output = make_table_mfn_pl(data, noneut)
			elseif data.num == "sg" then output = make_table_mfn_sg(data, noneut)
			else output = make_table_mfn(data, noneut) end
		end
	elseif not data.forms.nom_sg_f and not data.forms.nom_pl_f then
		if data.num == "pl" then output = make_table_mf_and_n_pl(data)
		elseif data.num == "sg" then output = make_table_mf_and_n_sg(data)
		else output = make_table_mf_and_n(data) end
	else
		if data.num == "pl" then output = make_table_m_and_f_and_n_pl(data)
		elseif data.num == "sg" then output = make_table_m_and_f_and_n_sg(data)
		else output = make_table_m_and_f_and_n(data) end
	end
	if data.footnote ~= "" then
		output = output .. '\n' .. data.footnote
	end
	return output
end

return export

-- For Vim, so we get 4-space tabs
-- vim: set ts=4 sw=4 noet: