-- Subfunctions for this module that are called from the style moduleslocal ppp =
function ppp.colhead(ttt,width,text) -- For individual column headers local head_string if width
ttt.count = ttt.count+1 table.insert(ttt.tab_text,head_string) return tttend
function ppp.hth(frame,Args,full_table,hth_id_list,hth_local,notes_exist,team_list,team_code_ii,ii_start,ii_end,rand_val) -- For head-to-head notes local hth_string,hth_local_num, hth_id -- Check whether there is a head-to-head note or not, if so get text ready for it the same way as for the notes if hth_local and full_table then -- Set global check for notes to true notes_exist = true if not Args['hth_'..hth_local] then -- Option 1 -- Now define the identifier for this hth_id = '"table_hth_'..team_code_ii..rand_val..'"' -- Add random end for unique ID if more tables are present on article (which might otherwise share an ID) hth_id_list[team_code_ii] = hth_id -- Call refn template hth_string = frame:expandTemplate else -- Option 2 hth_local_num = team_list[hth_local] if hth_id_list[hth_local] or ((hth_local_num >= ii_start) and (hth_local_num <= ii_end)) then -- Option 2a hth_id = '"table_hth_'..hth_local..rand_val..'"' hth_string = frame:extensionTag else -- Option 2b hth_id = '"table_hth_'..hth_local..rand_val..'"' -- Add random end for unique ID hth_id_list[hth_local] = hth_id -- Call refn template hth_string = frame:expandTemplate end end else hth_string = ; end return end
return ppp