Modul:Homokozó/Pepo41/CCitWeb

A Wikipédiából, a szabad enciklopédiából

Homokozó/Pepo41/CCitWeb[mi ez?] • [dokumentáció: mutat, szerkeszt] • [tesztek: létrehozás]

--Version 2014_05_23
local ds =require("Modul:Dátumszűrés")
local hopp =require("Modul:CheckISBN")
local args = {} 
local lang = mw.getContentLanguage() 

	local lans={}  -- azt a célt szolgálja, hogy ne kelljen feleslegesen 
					--lekérdezni a megfelelő sablon egzisztenciáját és jelezzük, ha ismeretlen a nyelvkód a magyar wikin
					--lásd: https://hu.wikipedia.org/wiki/Kateg%C3%B3ria:Nyelvc%C3%ADmk%C3%A9k?debug=true Kategória nyelvcímkék
	lans["an"] = "van"
    lans["ar"] = "van"
    lans["aze"] = "van"
    lans["be"] = "van"
    lans["bg"] = "van"
    lans["bn"] = "van"
    lans["bs"] = "van" 
    lans["ca"] = "van" 
    lans["chm"] = "van"
    lans["cy"] = "van"
    lans["cs"] = "van"
    lans["da"] = "van"
    lans["de"] = "van"
    lans["ee"] = "van"
    lans["el"] = "van"
    lans["en"] = "van"
    lans["eo"] = "van"
    lans["es"] = "van"
    lans["et"] = "van"
    lans["eu"] = "van"
    lans["fa"] = "van"
    lans["fi"] = "van"
    lans["fo"] = "van"
    lans["fr"] = "van"
    lans["fy"] = "van"
    lans["ga"] = "van"
    lans["gd"] = "van"
    lans["gl"] = "van"
    lans["grc"] = "van"
    lans["gu"] = "van"
    lans["he"] = "van"
    lans["hi"] = "van"
    lans["hr"] = "van"
    lans["ht"] = "van"
    lans["hu"] = "van"
    lans["hy"] = "van"
    lans["hz"] = "van"
    lans["id"] = "van"
    lans["is"] = "van"
    lans["it"] = "van"
    lans["ja"] = "van"
    lans["jp"] = "van"
    lans["ka"] = "van"
    lans["kk"] = "van" 
    lans["km"] = "van"
    lans["kn"] = "van"
    lans["ko"] = "van"
    lans["ku"] = "van"
    lans["ky"] = "van"
    lans["lat"] = "van"
    lans["lb"] = "van"
    lans["lo"] = "van"
    lans["lit"] = "van"
    lans["lv"] = "van"
    lans["mk"] = "van"
    lans["mn"] = "van"
    lans["mo"] = "van"
    lans["ms"] = "van"
    lans["mt"] = "van"
    lans["my"] = "van"
    lans["ne"] = "van"
    lans["nl"] = "van"
    lans["nn"] = "van"
    lans["no"] = "van"
    lans["oc"] = "van"
    lans["pa"] = "van"
    lans["pl"] = "van"
    lans["pt"] = "van"
    lans["rm"] = "van"
    lans["ro"] = "van"
    lans["ru"] = "van"
    lans["rue"] = "van"
    lans["sa"] = "van"
    lans["sah"] = "van"
    lans["scn"] = "van"
    lans["se"] = "van"
    lans["sh"] = "van"
    lans["sk"] = "van"
    lans["slo"] = "van"
    lans["sm"] = "van"
    lans["sq"] = "van"
    lans["sr"] = "van"
    lans["sv"] = "van" 
    lans["tam"] = "van"
    lans["te"] = "van"
    lans["tet"] = "van"
    lans["tg"] = "van"
    lans["th"] = "van"
    lans["tk"] = "van"
    lans["tag"] = "van"
    lans["to"] = "van"
    lans["tr"] = "van"
    lans["tat"] = "van"
    lans["ty"] = "van"
    lans["uk"] = "van"
    lans["ur"] = "van"
    lans["uz"] = "van"
    lans["vi"] = "van"
    lans["yi"] = "van"
    lans["zh"] = "van"



hibavan = false   -- hordozza a felbukkanó hiba tényét, hogy a végén a megfelelő hiba-kategóriát 
--						is hozzátoldja a hibajelzéshez a botozás céljait szolgálva	

local ou ='' -- hibakeresésre szolgáló globális változó, mely tartalmazza az an
			--alízishez szolgáló üzeneteket, az alábbi function pop() gyűjtögeti a tartalmát

function pop(...)  -- idézőjeles rész és bővítmények az ou számára
    local list = {...};
    for _, var in pairs(list) do
         ou = ou..var..'\n ' 
    end
end

local function is_set( var ) -- lekérdezi, hogy a változónak adtunk-e értéket. 
                                --Ha a változó értéke nil, vagy üres string, akkor false értéket ad, kben true
                                -- azaz a var sem nil, sem üres
    return not (var == nil or var == '');
end
 
-- First set variable or nil if none : keresi az első olyan változót, amelynek van értéke egy listában 
-- visszaadott értéke a változó értéke, vagy nil, ha egyetlen változó sincs a vararg listában, amelynek értéke lenne
local function first_set(...)
    local list = {...};
    for _, var in pairs(list) do
        if is_set( var ) then
            return var;
        end
    end
end


function error ( about ) -- ő állítja át a hibavant true-ra és kiadja a kimenetén
 						-- a megfelelően megjelenítendő hibaüzenetet
    -- Enclose errorMsg with <span>
    -- Precondition:
    --     about  -- string
    hibavan = true  
    local r = about
    if type( about ) == "string" then
        if #about == 0 then
            r = "Error in Lua"
        end
    else
        r = tostring( about )
    end
    return "<span class=\'error\'>" .. r .. "</span>, "
end -- error()

function trim(str)  -- a str bevezető és záró szóközeinek levágását célozza
    if str.args then
        str = str.args[1]  
    end
    if str == nil then
        return nil
    else
        return (str:gsub("^%s*(.-)%s*$", "%1")) -- extra brackets are necessary because gsub returns multiple values
    end
end

function tabledump(tbl, recursive)
    if type(tbl) ~= 'table' then
        return '<not a table!>'
    end
    local s = '{ '
    for k,v in pairs(tbl) do
        if type(k) ~= 'number' then 
            k = '"'..k..'"' 
        end
        if type(v) == 'table' then
            if recursive then
                v = table.dump(v, true)
            else
                v = 'table'
            end
        elseif type(v) == 'boolean' then -- no boolean -> string autoconversion in Lua
            if v then
                v = 'true'
            else
                v = 'false'
            end
        end
        s = s .. '['..k..'] = ' .. v .. ','
    end
    return s .. '} '
end


function isISSN( str)
	local v,chsum
	str = string.gsub  (str, '–' , '-') -- nagykötőjelből kicsi lesz
	str = string.gsub  (str, '—' , '-') -- hetvenkvirtesből kicsi lesz
	i,j = string.find  (str, '-')
	if i==j and i==5 then -- rendben, az ötödik helyen van a kötőjel
		v = string.sub (str,1,4)..string.sub (str,6,8)
		chd =  string.sub (str,-1,-1); 
		else return false
	end
	if chd == 'X' or p.isArabic(chd) then
			if chd == 'X' then chnum = 10 else chnum = string.byte(chd,1) - string.byte('0',1) end 
		else
		return false
	end 
	if p.isArabic(v) then 
		    chsum = 0
			for j = 8,2,-1 do   
			    local elsbyte = string.byte(v,(9 - j))
				chsum = chsum + (elsbyte - string.byte('0',1)) * j
				end -- j ciklus
			else return false -- nem számjegyek
	end -- if
	local chnumdo = 11 - (chsum % 11)    
	if chnumdo == chnum then return true
	                 else return false 
	end
end -- isISSN


 
--CitWeb
--[[
    {{citweb |url= |szerző= |szerző2= |szerző3= |cím= |alcím=  |közreműködők= 
    {{citweb |url= |aut=    |aut2=    |aut3=    |tit= |subtit= |ass=   --Alternatív paraméterekkel 
    |weblap= |nyelvkód= |hely= |kiadó= |dátum= vagy év= |oldal= |elér= 
    |work=   |lan=      |loc=  |red=   |date= vagy ann= |pag=   |accd= 	
    |formátum= |méret= |archívurl= |archívdátum= |doi= |egyéb= |idézet= }}
	|form=     |siz=        |aurl=      |archd=       |doi= |misc=  |quote= }}  
--]]    	

-- a sablon paramétereit, vagy annak alternatíváját hozza be és adja át egy változónak
-- A "form=" alakú paramétereket nem üresként, hanem nilként adja át, 
			--így úgy veszi, mintha a sablonban nem is szerepelne a paraméter (ez így egységes)
			-- assign segítségével megadhatjuk a default értéket

function getArg(arg,alternativarg, assign ) -- itt eredetileg a frame nem paraméter
    -- Retrieve template argument
    -- Precondition:
    --     arg     -- string or number; argument identifier
    --     assign  -- any, optional; default value
    -- Uses:
    --     mw.getCurrentFrame()
    
        --local r = mw.getCurrentFrame().args[ arg ]  állt itt eredetileg
       -- a kurrens frame argumentumai közül az arg kulccsal megadott
    
    local r,r1,r2 = nil
    -- a frame nil értéket ad, ha nem szerepel a paraméter, ''-et ad, ha szerepel, de nincs benne karakter
    if args[ arg ] ~=nil and  args[ arg ] ~='' then r1 = args[ arg ]  end
    -- r1 nil marad, ha a paramétert nem adták meg, vagy üresen adták meg
    if args[ alternativarg ]~= nil and  args[ alternativarg ] ~=''  then  r2 = args[ alternativarg ] end
    -- r2 nil marad, ha az alternatív paramétert  nem adták meg, vagy üresen adták meg
    
    if r1  then r =  r1  else 
    					if r2 then r = r2 end
    end					
        if type( r ) ~= "string" then
        if type( assign ) == nil then
            r = "{{{<" .. arg .. ">}}}"  --ha r nem string tipus, azaz és assign nil érték
        else
            r = assign -- ha r nem string tipus, és assign nem nil
        end
    end
    return r  -- ha r string tipus, vagy nil
end

local url,szerzo, szerzo2, szerzo3, szerzo4, szerzo5, szerzo6, szerzo7, szerzo8, szerzo9 =nil
local cim, alcim,datum , outdatum, nyelv, lan, english= nil
local ass,weblap,red,loc, ev, ho,nap, oldal,form,size,formsiz,aurl,archd,doi,accd,misc,quote=nil 
local szerzo_csaladneve, szerzo2_csaladneve, szerzo3_csaladneve, szerzo4_csaladneve= nil
local  szerzo5_csaladneve, szerzo6_csaladneve, szerzo7_csaladneve, szerzo8_csaladneve, szerzo9_csaladneve= nil 
local szerzo_keresztneve, szerzo2_keresztneve, szerzo3_keresztneve, szerzo4_keresztneve= nil
local  szerzo5_keresztneve, szerzo6_keresztneve, szerzo7_keresztneve, szerzo8_keresztneve, szerzo9_keresztneve= nil 
local szerzolink,szerzolink2,szerzolink3,szerzolink4,szerzolink5,szerzolink6,szerzolink7,szerzolink8,szerzolink9= nil 
local month, year, origyear

function angol_parameterek()
	--[[ KÖZÖSEK
url= getArg("url") --K
cim= getArg("title") --K 
year = getArg('year') --K -- de beleolvad az évbe
datum= getArg("date") --K
accd=  getArg('accessdate') --K 
aurl=getArg('archiveurl') --K
archd=getArg('archivedate')--K
weblap = getArg("website","work") --K
red = getArg('publisher')  --K
datum = getArg('date') --K
ass = getArg('others') --K
lan = getArg('language') --K
cim = getArg('title') --K
loc = getArg('place','location') --K
red = getArg('publisher') --K
oldal = getArg('page','pages') --K
quote= getArg('quote') --K
doi= getArg('doi')   --K
--]] 	    

	
	cim= getArg("title") 
	datum= getArg("date") 
	accd=  getArg('accessdate') 
	aurl=getArg('archiveurl')
	if aurl then 
	    aurl = string.gsub(aurl, '%s','%%20')
		aurl = string.gsub(aurl, '\"','%%22')
		aurl = string.gsub(aurl, "\'",'%%27')
		aurl = string.gsub(aurl, "<",'%%3c')
		aurl = string.gsub(aurl, ">",'%%3e')
		aurl = string.gsub(aurl, "%[",'%%5b')
		aurl = string.gsub(aurl, "%]",'%%5d')
		aurl = string.gsub(aurl, "{",'%%7b')
		aurl = string.gsub(aurl, "|",'%%7c')
		aurl = string.gsub(aurl, "}",'%%7d')
	end

	archd=getArg('archivedate')
	weblap = getArg("website","work")
	red = getArg('publisher')
	szerzo_csaladneve= getArg("last","author")
	if not  szerzo_csaladneve   then szerzo_csaladneve  = getArg("last1","author1") end
	if not  szerzo_csaladneve   then szerzo_csaladneve  = getArg("authors") end
	szerzo2_csaladneve= getArg("last2","author2")
	szerzo3_csaladneve= getArg("last3","author3")
	szerzo4_csaladneve= getArg("last4","author4")
	szerzo5_csaladneve= getArg("last5","author5")
	szerzo6_csaladneve= getArg("last6","author6")
	szerzo7_csaladneve= getArg("last7","author7")
	szerzo8_csaladneve= getArg("last8","author8")
	szerzo9_csaladneve= getArg("last9","author9")

    szerzo_keresztneve= getArg("first")
    if not szerzo_keresztneve then szerzo_keresztneve= getArg("first1") end
	szerzo2_keresztneve= getArg("first2")
	szerzo3_keresztneve= getArg("first3")
	szerzo4_keresztneve= getArg("first4")
	szerzo5_keresztneve= getArg("first5")
	szerzo6_keresztneve= getArg("first6")
	szerzo7_keresztneve= getArg("first7")
	szerzo8_keresztneve= getArg("first8")
	szerzo9_keresztneve= getArg("first9")
	
	
	         local c=''
    if szerzo_csaladneve then c=c..  szerzo_csaladneve 
                if szerzo_keresztneve then c=c..', '.. szerzo_keresztneve end
        szerzo=c;
        end
        c=''   
        if szerzo2_csaladneve then c=c..  szerzo2_csaladneve 
                if szerzo2_keresztneve then c=c..', '.. szerzo2_keresztneve end
            szerzo2=c;
        end
		c=''   
        if szerzo3_csaladneve then c=c..  szerzo3_csaladneve 
                if szerzo3_keresztneve then c=c..', '.. szerzo3_keresztneve end
            szerzo3=c;
        end
		c=''   
        if szerzo4_csaladneve then c=c..  szerzo4_csaladneve 
                if szerzo4_keresztneve then c=c..', '.. szerzo4_keresztneve end
            szerzo4=c;
        end
		c=''   
        if szerzo5_csaladneve then c=c..  szerzo5_csaladneve 
                if szerzo5_keresztneve then c=c..', '.. szerzo5_keresztneve end
            szerzo5=c;
        end
		c=''   
        if szerzo6_csaladneve then c=c..  szerzo6_csaladneve 
                if szerzo6_keresztneve then c=c..', '.. szerzo6_keresztneve end
            szerzo6=c;
        end
		c=''   
        if szerzo7_csaladneve then c=c..  szerzo7_csaladneve 
                if szerzo7_keresztneve then c=c..', '.. szerzo7_keresztneve end
           szerzo7=c; 
        end
		c=''   
        if szerzo8_csaladneve then c=c..  szerzo8_csaladneve 
                if szerzo8_keresztneve then c=c..', '.. szerzo8_keresztneve end
        szerzo8=c    
        end
		c=''   
        if szerzo9_csaladneve then c=c..  szerzo9_csaladneve 
                if szerzo9_keresztneve then c=c..', '.. szerzo9_keresztneve end
            szerzo9= c  
        end


	
	szerzolink= getArg("authorlink")
	if not szerzolink then  szerzolink= getArg("authorlink1") end
	if not szerzolink then  szerzolink= getArg("author-link1") end
	if not szerzolink  then  szerzolink= getArg("author1-link") end
	if not szerzolink  then  szerzolink= getArg("author1link") end
	
	if szerzolink then szerzo = '[['..szerzolink..']]' end
	szerzolink2= getArg("authorlink2") 
	if not szerzolink2  then  szerzolink2= getArg("author2-link") end
	if szerzolink2 then szerzo2 = '[['..szerzolink2..']]' end	
	szerzolink3= getArg("authorlink3") 
	if not szerzolink3  then  szerzolink3= getArg("author3-link") end
	if szerzolink3 then szerzo3 = '[['..szerzolink3..']]' end	
	szerzolink4= getArg("authorlink4") 
	if not szerzolink4  then  szerzolink4= getArg("author4-link") end
	if szerzolink4 then szerzo4 = '[['..szerzolink4..']]' end	
	szerzolink5= getArg("authorlink5") 
	if not szerzolink5  then  szerzolink5= getArg("author5-link") end
	if szerzolink5 then szerzo5 = '[['..szerzolink5..']]' end	
	szerzolink6= getArg("authorlink6") 
	if not szerzolink6  then  szerzolink6= getArg("author6-link") end
	if szerzolink6 then szerzo6 = '[['..szerzolink6..']]' end		 
	szerzolink7= getArg("authorlink7") 
	if not szerzolink7  then  szerzolink7= getArg("author7-link") end
	if szerzolink7 then szerzo7 = '[['..szerzolink7..']]' end	
	szerzolink8= getArg("authorlink8") 
	if not szerzolink8  then  szerzolink8= getArg("author8-link") end
	if szerzolink8 then szerzo8 = '[['..szerzolink8..']]' end		 
	szerzolink9= getArg("authorlink9") 
	if not szerzolink9  then  szerzolink9= getArg("author9-link") end
	if szerzolink9 then szerzo9 = '[['..szerzolink9..']]' end		 
	 datum = getArg('date')
	 year = getArg('year')
	 local c=''
	 if not datum then 
		 if year then c = c..year end --  2012
		 datum = c -- ez lesz a dátum
	 end	 
     origyear = getArg('origyear')
	 
	--editor-last can suffix with a numeral to add additional editors; alias of 'editor1-last', 'editor', and 'editors'
	--editor-first  can suffix with a numeral to add additional editors; alias of 'editor1-first'
	--editor-link  editor1-link can suffix with a numeral to add additional editors
	ass = getArg('others')
	lan = getArg('language')
	cim = getArg('title')
	forditas_cime = getArg('trans_title')
	loc = getArg('place','location')
	red = getArg('publisher')
	publication_date= getArg('publication-date')
	if publication_date then 
		if select(2,ds.datumszuro(publication_date))== select(2,ds.datumszuro(datum)) then publication_date = nil 
		else datum = publication_date
		end
	end -- csak akkor tekintjük létezőnek, ha különbözik a dátumtól		
	publication_place = getArg('publication-place')
	--[[
	publisher: Name of publisher; may be wikilinked if relevant. Not normally included for periodicals.  Displays after title.
    place: Geographical place of publication; generally not wikilinked; omit when the name of the work includes the location; examples: The Boston Globe, The Times of India. 
           Displays after the title; if work is defined, then location is enclosed in parentheses. Alias: location
    publication-place: If any one of publication-place, place or location are defined, then the location shows after the title; if publication-place and place or location are defined, then place or location are shown before the title prefixed with "written at" and publication-place is shown after the title.
                       ha vagy publication-place, vagy place vagy location létezik, akkor a location a cím után áll
 					   ha publication-place & place , vagy 
 					      publication-place & location are defined, akkor
 					      "written at"  place or location __title ___publication-place  a sorrend. 
    publication-date: Date of publication when different from the date the work was written. Displays only if year or date are defined and only if different, else publication-date is used and displayed as date. Use the same format as other dates in the article; do not wikilink. Follows publisher; if work is not defined, then publication-date is preceded by "published" and enclosed in parenthesis.
    --]]
    --[[
    Editors

    editor-last: Surname of editor. Do not wikilink—use editor-link instead. Where the surname is usually written first—as in Chinese—or for corporate authors, simply use editor-last to include the same format as the source. Aliases: editor1-last, editor, editors.
        editor-first: Given or first names of editor, including title(s); example: Firstname Middlename or Firstname M. or Dr. Firstname M., Sr. Do not wikilink—use editor-link instead. Aliases: editor1-first.
        OR: for multiple editors, use editor1-last, editor1-first through editor4-last, editor4-first for up to four editors.

        editor-link: Title of existing Wikipedia article about the editor—not the editor's website; do not wikilink. Aliases: editor1-link.
        OR: for multiple editors, use editor1-link through editor4-link.

    Display:

        If authors: Authors are first, followed by the editors and the included work, then the main work.
        If no authors: Editors appear before the included work; a single editor is followed by "ed."; multiple editors are followed by "eds."; more than three editors will be followed by "et al., eds."
--]]
		szerkeszto_csaladneve = getArg('editor-last','editor1-last')	
		if  not szerkeszto_csaladneve then szerkeszto_csaladneve = getArg ('editor', 'editors') end
		szerkeszto_keresztneve = getArg('editor-first', 'editor1-first')
		szerkeszto2_csaladneve = getArg('editor2-last')
		szerkeszto2_keresztneve = getArg('editor2-first')
		szerkeszto3_csaladneve = getArg('editor3-last')
		szerkeszto3_keresztneve = getArg('editor3-first')
		szerkeszto4_csaladneve = getArg('editor4-last')
		szerkeszto4_keresztneve = getArg('editor4-first')

 	    local c=''
    	if szerkeszto_csaladneve then c=c..  szerkeszto_csaladneve 
                if szerkeszto_keresztneve then c=c..', '.. szerkeszto_keresztneve end
        szerkeszto=c;
        end
        c=''   
        if szerkeszto2_csaladneve then c=c..  szerkeszto2_csaladneve 
                if szerkeszto2_keresztneve then c=c..', '.. szerkeszto2_keresztneve end
            szerkeszto2=c;
        end
		c=''   
        if szerkeszto3_csaladneve then c=c..  szerkeszto3_csaladneve 
                if szerkeszto3_keresztneve then c=c..', '.. szerkeszto3_keresztneve end
            szerkeszto3=c;
        end
		c=''   
        if szerkeszto4_csaladneve then c=c..  szerkeszto4_csaladneve 
                if szerkeszto4_keresztneve then c=c..', '.. szerkeszto4_keresztneve end
            szerkeszto4=c;
        end
    local c=''
  	if szerkeszto then c = szerkeszto end
  	if szerkeszto2 then 
  					if c == '' then c = szerkeszto2 else c = c..' &#150; '..szerkeszto2 end
  	           end
    if szerkeszto3 then 
  					if c == '' then c = szerkeszto3 else c = c..' &#150; '..szerkeszto3 end
  	           end
    if szerkeszto4 then 
  					if c == '' then c = szerkeszto4 else c = c..' &#150; '..szerkeszto4 end
  	           end
    if c == '' then szerkeszto = nil else szerkeszto ="szerk.: ".. c end 	
	
	oldal = getArg('page','pages')
	nopp = getArg('nopp') -- if nopp=='y' then <nem írjuk ki, hogy o.> -- pl. page=borító... end
    at = getArg('at')
    if oldal then at= nil end -- ha page, vagy pages definiált, akkor ő legyen nil
    deadurl= getArg(' deadurl') --if deadurl=='no'  <az url a címre húzva, az aurl önállóan a végén áll> end
    template_doc_demo= getArg('template doc demo') -- if true then <hibakateróriázás kikapcsolva>
    if template_doc_demo ~= nil and template_doc_demo == "true" then template_doc_demo=true else template_doc_demo=false end
    _format= getArg('format')
    if _format then _format= '( '.._format..') ' end
    isbn= getArg('isbn')   -- International Standard Book Number; for example')   
	     -- 978-0-8126-9593-9. (See')  Wikipedia')  ISBN and ISBN). Dashes in the ISBN are optional, but preferred. 
	     --Use the 13-digit ISBN wherever possible; this can normally be found beneath the barcode as a number 
	     --beginning with 978 or 979 (barcodes --beginning with any other numbers are not ISBNs). For sources with 
	     --the older 9 digit SBN system, prefix the number with a zero; thus, SBN 902888-45-5 should be 
	     --entered as |isbn=0-902888-45-5. It is checked for length, invalid characters and the proper check digit.
	issn= getArg('issn')   -- International Standard Serial Number; eight characters may be split into two groups of four using a hyphen, but not an en dash or a space.
--Quote	
    quote= getArg('quote')
     doi= getArg('doi')   -- Digital object identifier; for example')   
	                         -- 10.1038/news070508-7. It is checked to ensure it begins with (10.).
	 tipus= getArg('type')  
	 sorozat = getArg('series','version')
	 if not sorozat then  sorozat = getArg('agency') else
	 sorozat = "Sorozat: "..sorozat..' '	
	 	end -- mert ez egy alias
	 
	 
    --Identifiers  A TOVÁBBI PARAMÉTETEKKEL EGYENLŐRE NEM FOGLALKOZOM 

     id= getArg('id')   -- A unique identifier, used where none of the specialized identifiers are applicable; 
                       --wikilink or use a template as applicable.

--These identifiers create links and are designed to accept a single value. 
--Using multiple values or other text will break the link and/or invalidate the identifier.
     if not id then  -- ha nem használja a szerkesztő az egyedi azonosítót
	     arxiv= getArg('arxiv')   -- arXiv identifier; for example')   -- arxiv=hep-th/9205027
	     _asin= getArg('asin')   -- Amazon Standard Identification Number
	     _asin_tld= getArg('asin-tld')   -- ASIN top-level domain for Amazon sites other than the US; valid values')   
	     						-- ca, cn, co.jp, co.uk, de, es, fr, it
	     bibcode= getArg('bibcode')   -- Bibcode; used by a number of astronomical data systems; for example')   
	                                -- 1974AJ.....79..819H
	     doi_brokendate= getArg('doi_brokendate')   -- Date the DOI is broken; use the same format as other dates in the article.
	     jfm= getArg('jfm')   -- Jahrbuch über die Fortschritte der Mathematik
	     jstor= getArg('jstor')   -- JSTOR abstract; for example')   -- "jstor=3793107" will generate JSTOR 3793107.
	     lccn= getArg('lccn')   -- Library of Congress Control Number
	     mr= getArg('mr')   -- Mathematical Reviews
	     oclc= getArg('oclc')   -- OCLC
	     ol= getArg('ol')   -- Open Library
	     osti= getArg('osti')   -- Office of Scientific and Technical Information
	     pmc= getArg('pmc')   -- PubMed Central; use article number for full-text free repository of a journal article.
	     embargo= getArg('embargo')   -- Date that pmc goes live; if this date is in the future, then pmc is not linked until that date.
	     pmid= getArg('pmid')   -- PubMed; use unique identifier.
	     rfc= getArg('rfc')   -- Request for Comments
	     ssrn= getArg('ssrn')   -- Social Science Research Network
	     zbl= getArg('zbl')   -- Zentralblatt MATH
	 end 
	 
	 --Laysummary

     layurl= getArg('layurl')   -- URL link to a non-technical summary or review of the source; the URL title is set to "Lay summary".
         -- Aliases')   -- laysummary.
         laysource= getArg('laysource')   -- Name of the source of the laysummary. Displays in italics and preceded by an endash.
         laydate= getArg('laydate')   -- Date of the summary. Displays in parentheses.

--Display options

     author_mask= getArg('author-mask')   -- Replaces the name of the first author with em dashes or text. Set author-mask to a numeric 
	     ---value n to set the dash n em spaces wide; set --author-mask to a text value to display the text without a trailing 
	     --author separator; for example, "with". You must still include the values for all authors for metadata --purposes. 
	     --Primarily intended for use with bibliography styles where multiple works by a single author are listed sequentially. Do not use in a list generated by {{reflist}}, --<references /> or --similar as there is no control of the order in which references are displayed.
	 author_name_separator= getArg('author-name-separator')   -- Controls the separator between last and first names; defaults to a comma and 
	     --space (, ); if the parameter is present, but blank, --separator punctuation is set to the default; a space must be
	     --encoded as &#32;.
     author_separator= getArg('author-separator')   -- Controls the separator between authors; defaults to a semicolon and space (; ); 
     		--if the parameter is present, but blank, separator --punctuation is set --to the default; a space must be encoded as &#32;.
     display_authors= getArg('display-authors')   -- Controls the number of author names that are displayed when a citation is published. 
     		--To change the displayed number of authors, set --display   authors to the desired number. For example, 
     		--|display-authors=2 will display only the first two authors in a citation. 
			--By default, all authors are displayed except when there --are nine authors, then the author list in the 
			--citation is truncated to eight authors, followed by "et al." This --exception mimics the older version of 
			--the template for --compatibility. If a citation contains nine author names and one wishes all nine author 
			--names to display, "et al." --may be suppressed by setting |display-authors=9. Aliases')   -- displayauthors.
    display_editors = getArg('display-editors')   -- Controls the number of editor names that are displayed when a citation
     	--is published. To change the displayed number of editors, set --display-editors --to the desired number.
     	--For example, |display-editors=2 will display only the first two editors in a citation. By default, all
     	--editors are displayed except --when there are four --editors, then the editor list in the citation is 
     	--truncated to three editors, followed by "et al." This exception mimics the older version of the template --for compatibility. If a --citation contains four editor names and one wishes all four editor names to display, "et al." may be suppressed by setting |display-editors=4. --Aliases')   -- displayeditors.
     lastauthoramp= getArg('lastauthoramp')   -- Switches the separator between the last two names of the author list 
     	--to space ampersand space ( & ) when set to any value. Example')  --lastauthoramp=yes
     postscript= getArg('postscript')   -- Controls the closing punctuation for a citation; defaults to a period (.); 
     	--for no terminating punctuation, specify |postscript=none – leaving --postscript= --empty has the same 
     	--effect but is ambiguous. Ignored if quote is defined.
     separator= getArg('separator')   -- Controls the punctuation used to separate lists of authors, editors, etc. 
     	--Defaults to a period (.); if the parameter is present, but blank, separator --punctuation is set to the default; a space must be encoded as &#32;.
      --  ÁTVESZEM EZEKET A PARAMÉTEREKET, DE NEM ADOM OUTPUTRA ŐKET


--[[	In-source locations
    
    page: The number of a single page in the source that supports the content. Use either |page= or |pages=, but not both. Displays preceded by p. unless |nopp=y.
    OR: pages: A range of pages in the source that supports the content. Use either |page= or |pages=, but not both. Separate using an en dash (–); separate non-sequential pages with a comma (,); do not use to indicate the total number of pages in the source. Displays preceded by pp. unless |nopp=y. Hyphens are automatically converted to en dashes; if hyphens are appropriate, for example: pp. 3-1–3-15, use |at=.
        nopp: Set to y to suppress the p. or pp. notations where this is inappropriate; for example, where |page=Front cover.
    OR: at: For sources where a page number is inappropriate or insufficient. Overridden by |page= or |pages=. Use only one of |page=, |pages=, or |at=.

    Examples: page (p.) or pages (pp.); section (sec.), column (col.), paragraph (para.); track; hours, minutes and seconds; act, scene, canto, book, part, folio, stanza, back cover, liner notes, indicia, colophon, dust jacket, verse.
        format: Format of the work referred to by url; for example: PDF, DOC, or XLS; displayed in parentheses after title. HTML is implied and should not be specified. Does not change the external link icon. Note: External link icons do not include alt text; thus, they do not add format information for the visually impaired.

    URLs must begin with a supported URI scheme. http:// and https:// will be supported by all browsers; however, ftp://, gopher://, irc://, ircs://, mailto: and news: will require a plug-in or an external application and should normally be avoided. IPv6 host-names are currently not supported.
    If URLs in citation template parameters contain certain characters, then they will not display and link correctly. 
    Those characters need to be percent-encoded. For example, a space must be replaced by %20. 
    To encode the URL, replace the following characters with:

 sp 		" 		' 		< 		> 		[ 		] 		| 		}
 %20 	  %22   	 %27 	 %3c 	 %3e 	 %5b 	 %5d 	 %7c 	 %7d
    --]]



end
--levizsgáljuk, hogy cite web másolattal van-e dolgunk

local function isEnglish()
    cim= getArg("title") ; pop('cim',cim)  
    year = getArg('year') ;-- pop('year',year)  -- de beleolvad az évbe
    --datum= getArg("date") ;-- pop('datum',datum) 
    accd=  getArg('accessdate') ;-- pop('accd',accd)  
    aurl=getArg('archiveurl') ; --pop('aurl',aurl) 
    archd=getArg('archivedate'); --pop('archd',archd) 
    weblap = getArg("website") ; --pop('weblap',weblap) 
    red = getArg('publisher')  ; --pop('red',red) 
    datum = getArg('date') ; --pop('datum',datum) 
    ass = getArg('others') ; --pop('ass',ass) 
    lan = getArg('language') ; --pop('lan',lan) 
    cim = getArg('title') ; --pop('cim',cim) 
    loc = getArg('place','location') ; --pop('loc',loc) 
    red = getArg('publisher') ; --pop('red',red) 
    oldal = getArg('page','pages') ; --pop('oldal',oldal) 
    --quote= getArg('quote') ; pop('quote',quote) 
    --doi= getArg('doi')   ; pop('doi',doi) 
    szerzo_csaladneve= getArg("last","author")
    if not  szerzo_csaladneve   then szerzo_csaladneve  = getArg("last1","author1") end
            if not  szerzo_csaladneve   then szerzo_csaladneve  = getArg("authors") end
    szerzolink= getArg("authorlink")
            if not szerzolink then  szerzolink= getArg("authorlink1") end
            if not szerzolink then  szerzolink= getArg("author-link1") end
            if not szerzolink  then  szerzolink= getArg("author1-link") end
    --datum = getArg('date'); pop('datum',datum) 
    year = getArg('year')
    origyear = getArg('origyear')
    ass = getArg('others')
    forditas_cime = getArg('trans_title')
    loc = getArg('place','location'); --pop('loc',loc) 
    publication_date= getArg('publication-date')
    szerkeszto_csaladneve = getArg('editor-last','editor1-last')    
                    if  not szerkeszto_csaladneve then szerkeszto_csaladneve = getArg ('editor', 'editors') end
    oldal = getArg('page','pages'); --pop('oldal',oldal) 
            nopp = getArg('nopp')
    at = getArg('at')
            if oldal then at= nil end -- ha page, vagy pages definiált, akkor ő legyen nil
    deadurl= getArg(' deadurl') 
    template_doc_demo= getArg('template doc demo') 
    _format= getArg('format')
    isbn= getArg('isbn')
    issn= getArg('issn')
    --quote= getArg('quote'); pop('quote',quote) 
    tipus= getArg('type')  
    sorozat = getArg('series','version')
    if not sorozat then  sorozat = getArg('agency') end
    x= cim or year  or accd or  aurl or archd or weblap  or  red  or  ass  or lan  or loc  or  red  or  oldal  or szerzo_csaladneve or szerzolink or year  or  origyear  or  ass or  forditas_cime or  red  or  publication_date or szerkeszto_csaladneve  or oldal  or nopp or  
    at  or  deadurl or  template_doc_demo or _format or isbn or  issn or  tipus or sorozat 
    local talalat =''
    if x == nil then  talalat='nem' else talalat= 'igen' end 
    pop("talált angol paramétert?", talalat)
    if x == nil then return false else return true end
end -- isEnglish

	

local function _nilez()
szerzo,szerzo2 ,szerzo3,szerzo4,szerzo5 = nil
szerzo6,szerzo7,szerzo8,szerzo9, cim,alcim  = nil
ass, weblap,lan  ,loc,red , ev ,datum  , accd ,form,size,aurl,archd ,misc  = nil
end


local function magyar_e()
	url= getArg("url"); 
	szerzo= getArg("szerző","aut"); pop("nekifog a magyar paraméterek beolvasásának", szerzo) 
	szerzo2= getArg("szerző2","aut2") 
	szerzo3= getArg("szerző3","aut3")
	szerzo4= getArg("szerző4","aut4")
	szerzo5= getArg("szerző5","aut5")
	szerzo6= getArg("szerző6","aut6")
	szerzo7= getArg("szerző7","aut7")
	szerzo8= getArg("szerző8","aut8")
	szerzo9= getArg("szerző9","aut9")
	cim= getArg("cím","tit")    
	alcim= getArg("alcím","subtit")
	ass = getArg('ass','közreműködők')
	weblap = getArg("weblap","work")
	lan = getArg('lan','nyelvkód')
	loc = getArg('loc','hely')
	red = getArg('red','kiadó')
	ev= getArg("év","ann") 
	if ev then ev = string.gsub(ev,"[%[%]]",'')end
	datum = getArg("dátum","date")
	if datum then datum = string.gsub(datum,"[%[%]]",'')end
	oldal= getArg("oldal","pag")
	accd=  getArg('elér','accd') 
	if accd then accd = string.gsub(accd,"[%[%]]",'')end
	form=getArg('form','formátum')
	size=getArg('siz','méret')
	aurl=getArg('aurl','archívurl')
	archd=getArg('archd','archívdátum')
	if archd then archd = string.gsub(archd,"[%[%]]",'')end
	doi=getArg('doi') 
	misc=getArg("egyéb","misc")
	quote=getArg('quote',"idézet")
	local x = nil
	x= szerzo or szerzo2  or szerzo3 or szerzo4 or szerzo5 or 
	szerzo6 or szerzo7 or szerzo8 or szerzo9 or  cim or alcim  
	or ass  or lan   or loc or red  or  ev  or  accd  or form or size or aurl or archd  or misc  
	local talalat =''
	if x == nil then  talalat='nem' else talalat= 'igen' end 
	pop("talált magyar?", talalat)
	if x == nil then return false else return true end
end --magyar_e


local function _citweb(frame)

	
  -- Előbb levizsgáljuk, hogy cite web másolattal van-e dolgunk
  _nilez() --
  local igen_magyar,hiba_jelzes = nil
  
  if magyar_e() then igen_magyar = true  else igen_magyar = false end
  if not igen_magyar then  angol_parameterek() end 

   hiba_jelzes=''

-- a szerzőket előre lépteti, társszerzőből szerzőt csinál stb.

   	local c=''
  	if szerzo then c = szerzo end
  	if szerzo2 then 
  					if c == '' then c = szerzo2 else c = c..' &#150; '..szerzo2 end
  	           end
    if szerzo3 then 
  					if c == '' then c = szerzo3 else c = c..' &#150; '..szerzo3 end
  	           end
    if szerzo4 then 
  					if c == '' then c = szerzo4 else c = c..' &#150; '..szerzo4 end
  	           end
    if szerzo5 then 
  					if c == '' then c = szerzo5 else c = c..' &#150; '..szerzo5 end
  	           end
    if szerzo6 then 
  					if c == '' then c = szerzo6 else c = c..' &#150; '..szerzo6 end
  	           end
    if szerzo7 then 
  					if c == '' then c = szerzo7 else c = c..' &#150; '..szerzo7 end
  	           end
    if szerzo8 then 
  					if c == '' then c = szerzo8 else c = c..' &#150; '..szerzo8 end
  	           end
    if szerzo9 then 
  					if c == '' then c = szerzo9 else c = c..' &#150; '..szerzo9 end
  	           end
    if c == '' then szerzo = nil else szerzo = c..': 'end 

  --cím és alcím
  
  
  local terminator
  if cim  
     then cim = trim(lang:ucfirst(cim)); pop("cim",cim)
     else hiba_jelzes = hiba_jelzes.. error("nincs elsődleges cím")
      end
  if alcim   then 
              	alcim=lang:ucfirst(alcim)  --string.upper(kezdbet)..kezdbetutan
              	if cim   then 
              	         if string.sub(cim,-1,-1) ~= ":" then
               								    cim= cim..": "..alcim 
           				 else cim= cim.." "..alcim
           				 end
           		end		 --	
  end 
  if cim then terminator = string.sub(cim,-1,-1) 
	if (terminator ~= '?' and terminator ~= '!'and terminator ~= ',' and terminator ~= '.' and terminator ~= '\166' ) 
	    then      cim= cim.."."  end   
	pop("kiadott cím=", cim)
	-- SZÜKSÉGES CSERÉK:
	--newline 	[ 	     ] 	     |    Ezek kellenek, mert az URL ráhúzásakor bezavarnak
	--space    &#91; 	&#93; 	&#124;
	if forditas_cime then cim = cim..' ['.. forditas_cime..'] ' end
	cim = string.gsub(cim,'\n',' ')
	cim = string.gsub(cim,'%[','&#91;')  
	cim = string.gsub(cim,'%]','&#93;')
	cim = string.gsub(cim,'%|','&#124;')
  end   
  
    
  -- asszisztencia

  	if ass then ass = lang:ucfirst(ass)..' ' end
  		
  		
  		url= getArg("url"); pop("url", url)
	-- sp 		" 		' 		< 		> 		[ 		] 		| 		}
    --%20 	  %22   	 %27 	 %3c 	 %3e 	 %5b 	 %5d 	 %7c 	 %7d
    -- url encode
    if url then 
	    url = string.gsub(url, '%s','%%20')
		url = string.gsub(url, '\"','%%22')
		url = string.gsub(url, "\'",'%%27')
		url = string.gsub(url, "<",'%%3c')
		url = string.gsub(url, ">",'%%3e')
		url = string.gsub(url, "%[",'%%5b')
		url = string.gsub(url, "%]",'%%5d')
		url = string.gsub(url, "{",'%%7b')
		url = string.gsub(url, "|",'%%7c')
		url = string.gsub(url, "}",'%%7d')
	end

  	
  	-- weblap

  	if weblap then weblap = weblap..' '; --pop("weblap", weblap)
		else --pop("weblap", "nincs eddig")
			if not red then  
					if url then
							local maradek, i, j
							i, j = string.find (url,"//")
							--pop ("A",i,j)
							if j then maradek = string.sub(url,j+1,-1) 
							--pop (maradek) else pop ("nincs //")
							end
							if maradek then       
								i, j = string.find (maradek,"/") 
								
								
								--pop ("B",i,j)
								if j then 
								weblap = string.sub(maradek,1,j-1) ..' ' 
								--pop ("weblap megcsinálva url-ből",weblap)
							else --pop("nincs weboldal")
								weblap = maradek -- elmarad az URL első / jele is
								end
							end -- maradek
					end --if url	
			end --if not red
	end -- if weblap
  
-- nyelvkód

 local LetezoLansablon = false
  if lan then 
  			if  (lan ~= nil ) and  (cim==nil)  --ha nincs cím akkor értelmetlen 
             	then  hiba_jelzes = hiba_jelzes..' '..error("nyelv cím nélkül")..' ' else  
             			if lans[lan] ~= nil then  -- ha fenn van a listánkon, akkor nem jöhet PARANCSFÁJL HIBA
             				     LetezoLansablon = frame:callParserFunction{ name = '#ifexist',args = { 'lan', lan }}
			                     if LetezoLansablon then nyelv =' '..frame:expandTemplate{ title = lan, args = {lan } } ..' 'end
							else -- különben mi magunk kiírjuk , mert így beszédesebb
							      hiba_jelzes = hiba_jelzes..' '..error("ismeretlen nyelvkód")..' '
						end
             			--frame:expandTemplate{ title = 'template', args = { 'arg1', 'arg2', name = 'arg3' } }
			 end	
   end 
 
 	
  
	  -- loc , red 
	
	  c= ''
	  if loc  then c = loc  end
	  if red  then 
	  				if c == '' then c = red  else c = c..':'..red  end
	  end					
	  		  			
	  local kiadas
	  
	  if c == '' then kiadas = nil else kiadas = c..' ' end
	  
	-- form és size
	
	  c=''
	  if form then c =form  end
	  if size then 
	       if string.sub (size,-5,-1) == 'oldal' then size = string.sub (size,1,-6) end  	
	  	 if form then c = c..': '..size.." oldal " else c = size .." oldal "
	  	 	end
	  end  	
  if c ~= '' then formsiz = '('..c..')' end

	if datum then
	    elseif ev then datum = ev -- ha nincs dátum, akkor az év legyen a dátum
	end		

	if datum then -- ha van dátum (mostmár vagy a dátum, vagy ennek hiányában az év)
		local nyom =''
	    local nyom, dou= ds.datumszuro(datum)
	   -- pop("a dátumszűrés nyomait átvette", nyom)
		if dou 
			then outdatum =  '('..ds.honapnevesdate(dou)..') '
			else hiba_jelzes = hiba_jelzes..' '.. error("hibás dátum")
		end    	 	
	end
  
 -- oldal adatok
  	
  	if oldal then 
  	oldal = string.gsub (oldal, '-' , '–') -- kiskötőjelből nagy
  	oldal = string.gsub (oldal, '—' , '–') -- hetvenkvirtesből nagy
  	oldal = string.gsub (oldal, '%.,' , ',') -- pontot követő veszőből vesszőt
  	oldal = string.gsub (oldal, '%.' , '') -- pontból üreset
  	oldal = string.gsub (oldal, ',' , '.,') -- végül vesszőből ponot kovető vesszőt
  	oldal ="&#x20;"..oldal..". o. " 
  	if nopp ~= nil and nopp =='y' then oldal = string.sub (oldal,1, -6)..' ' -- levágjuk a ". o. " farkat az oldal végéről
  		else oldal = oldal end
  end
  
  -- Archiválva:
  
  if aurl then  -- encode aurl
	    aurl = string.gsub(aurl, '%s','%%20')
		aurl = string.gsub(aurl, '\"','%%22')
		aurl = string.gsub(aurl, "\'",'%%27')
		aurl = string.gsub(aurl, "<",'%%3c')
		aurl = string.gsub(aurl, ">",'%%3e')
		aurl = string.gsub(aurl, "%[",'%%5b')
		aurl = string.gsub(aurl, "%]",'%%5d')
		aurl = string.gsub(aurl, "{",'%%7b')
		aurl = string.gsub(aurl, "|",'%%7c')
		aurl = string.gsub(aurl, "}",'%%7d')
	end

  
	if archd then -- ha van dátum 
	    local outarchd, dou 
		dou= select(2, ds.datumszuro(archd))
		if dou 
			then outarchd = ds.honapnevesdate(dou)
				if aurl then 
					archd = "<span title=\""..outarchd.."\">["..aurl.." arch".."]</span>"
	  				else hiba_jelzes  = hiba_jelzes..' '..error("archívdátum van, de archívurl nélkül")
	  			end
			else hiba_jelzes  = hiba_jelzes..' '..error("hibás archívdátum")
		end  -- if dou  	 	
	end	-- if archd
	 
-- elérés
    if not accd then accd = getArg('accessdate') end
	if accd then -- ha van elérés
	    	local outaccd, dou
		dou= select(2, ds.datumszuro(accd))
		if dou 
			then outaccd = ds.honapnevesdate(dou)
			accd = "Hozzáférés: "..outaccd ..' '	
			else hiba_jelzes =hiba_jelzes..' '.. error("hibás elérés")
		end  -- if dou  	 	
	end	-- if accd

	if issn then 
	  	 	 	if isISSN (issn) then issn = "<span title=\""..issn.."\"><font color=blue>ISSN</font></span>"
	  	  	
	        	    	      else hiba_jelzes  = hiba_jelzes..' '..error("hibás ISSN: ")..issn 
	     		end    
	  		else issn = '' -- ha nem létezik, legyen üres
	  end	-- issn 
	 
	  isbn= getArg("isbn"); pop("isbn=",isbn)
   if isbn then isbn = " ISBN "..isbn..' ' end
 

  
    if doi then 
    	local doicontrol
    	doicontrol = string.sub(doi,1,2)
    	if doicontrol ~= "10" then hiba_jelzes = hiba_jelzes..' '..error("doi kötelezően 10-zel kezdődik!") else
    		doi = "<span title=\""..doi.."\">[".."http://dx.doi.org/"..doi.." doi".."]</span>" 
    	end
  	end
-- misc lekezelése

    if misc then misc = misc .. '.' end
    
    
-- URL lekezelése
if url then -- encode url
	    url = string.gsub(url, '%s','%%20')
		url = string.gsub(url, '\"','%%22')
		url = string.gsub(url, "\'",'%%27')
		url = string.gsub(url, "<",'%%3c')
		url = string.gsub(url, ">",'%%3e')
		url = string.gsub(url, "%[",'%%5b')
		url = string.gsub(url, "%]",'%%5d')
		url = string.gsub(url, "{",'%%7b')
		url = string.gsub(url, "|",'%%7c')
		url = string.gsub(url, "}",'%%7d')
	end

   	
   	if url then 
   		if cim then cim = "[" .. url .. " " .. cim .. "]" 
	   		 if deadurl then 
	   		 	if deadurl~='no' then 
	   		 		if aurl then cim = "[" .. aurl .. " " .. cim .. "]" end
	   		 	end  
	   		 end  -- nem nil a deadurl		
	   	end  -- nem nil a cím
	end	 -- nem nil az url

--idézet

  if quote then  quote ="\'".."\'"..' „'..  quote..'\”'.."\'".."\'" end

-- output összeállítása
	s=' '
	if igen_magyar then 
		if szerzo then s = s.. szerzo..'  ';end      
		if cim  then s = s..cim ..'  ';end      
	    if ass  then s = s..ass..'  ';end      
		if weblap  then s = s..weblap..'  ';end   
		if nyelv then s = s..nyelv..'  ';end      
		if kiadas then s = s..kiadas..'  ';end    
		if outdatum  then s = s..outdatum..'  ';end 
		if oldal  then s = s..oldal..'  ';end      
		if accd then s = s..accd..'  ' ;end      
		if formsiz then s = s..formsiz..'  ' ;end 
		if archd then s = s..archd..'  ' ;end     
		if doi then  s = s..doi..'  ' ;end      
		if misc  then s = s..misc..'  ';end     
		if quote then s = s..quote..'  ';end    
		if isbn then s = s..isbn..'  ' ;end     
		--if hopp.argumentumok then s=s..tabledump(hopp.argumentumok, false)..'  ' end
	    --if ou then s = s..ou..'  '  end 
		if hibavan then s = s ..' '..hiba_jelzes..' '.. "[[Kategória:Hibás paraméterezésű CitWeb-et tartalmazó lapok]]" end
		
	else -- magyar kimenet
        if szerzo then s = s.. szerzo..'  '  end
		if cim  then s = s..cim ..'  ' end
		if _format then s = s.._format..'  ' end
	    if nyelv then s = s..nyelv..'  '  end
	    if tipus then s = s..' ('..tipus..') '..'  ' end
	    if ass  then s = s..ass..'  '  end 
		if weblap  then s = s..weblap..'  '  end 
		if kiadas then s = s..kiadas..'  ' end 
		if outdatum  then s = s..outdatum..'  ' end 
		if origyear then s = s..' ('..origyear..') '..'  ' end 
		if oldal  then s = s..oldal..'  ' end 
		if at  then s = s..at..'  '  end 
		if sorozat then s = s..sorozat..'  ' end
		if accd then s = s..accd..'  '  end 
		if formsiz then s = s..formsiz..'  '  end
		if archd then s = s..archd..'  '  end
		if doi then  s = s..doi..'  ' ; end
		if isbn then s = s..isbn..'  '  end
		if issn then s = s..issn..'  '  end
		
		if template_doc_demo then else 
        if hopp.argumentumok then s=s..tabledump(hopp.argumentumok, false)..'  ' end
                --if hopp.kornyezet then s=s..table_to_str(hopp.kornyezet) end
		--if ou then s = s..ou..'  '  end 
		if hibavan then s = s ..' '..hiba_jelzes..' '.."[[Kategória:Hibás paraméterezésű CitWeb-et tartalmazó lapok]]" end 
    	end -- template_doc_demo
    end -- igen_magyar
	return trim(s)
end --citweb

function run(frame)
  	local pframe = frame:getParent()
    args = pframe.args -- azok a paraméterek, amelyek a sablont kisérik a  
                  	--sablon hivása oldalon
    config = frame.args -- az #invoke utasításban átadott paraméterek 
 return _citweb(frame)
end

local q = {
    run = run, -- az egyetlen átadadndó funkció a táblából
}

return q