https://en.wikipedia.org/w/index.php?action=history&feed=atom&title=Module%3ACite_IUCN%2Fsandbox Module:Cite IUCN/sandbox - Revision history 2025-05-30T09:59:59Z Revision history for this page on the wiki MediaWiki 1.45.0-wmf.3 https://en.wikipedia.org/w/index.php?title=Module:Cite_IUCN/sandbox&diff=1167162715&oldid=prev Elli: Elli moved page Module:Cite iucn/sandbox to Module:Cite IUCN/sandbox without leaving a redirect: per RM 2023-07-26T02:28:50Z <p>Elli moved page <a href="/w/index.php?title=Module:Cite_iucn/sandbox&amp;action=edit&amp;redlink=1" class="new" title="Module:Cite iucn/sandbox (page does not exist)">Module:Cite iucn/sandbox</a> to <a href="/wiki/Module:Cite_IUCN/sandbox" title="Module:Cite IUCN/sandbox">Module:Cite IUCN/sandbox</a> without leaving a redirect: per <a href="/wiki/Special:PermanentLink/1167162175#Requested_move_16_July_2023" title="Special:PermanentLink/1167162175">RM</a></p> <table style="background-color: #fff; color: #202122;" data-mw="interface"> <tr class="diff-title" lang="en"> <td colspan="1" style="background-color: #fff; color: #202122; text-align: center;">← Previous revision</td> <td colspan="1" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 02:28, 26 July 2023</td> </tr><tr><td colspan="2" class="diff-notice" lang="en"><div class="mw-diff-empty">(No difference)</div> </td></tr></table> Elli https://en.wikipedia.org/w/index.php?title=Module:Cite_IUCN/sandbox&diff=1117367233&oldid=prev WOSlinker: use require('strict') instead of require('Module:No globals') 2022-10-21T09:59:52Z <p>use require(&#039;strict&#039;) instead of require(&#039;Module:No globals&#039;)</p> <table style="background-color: #fff; color: #202122;" data-mw="interface"> <col class="diff-marker" /> <col class="diff-content" /> <col class="diff-marker" /> <col class="diff-content" /> <tr class="diff-title" lang="en"> <td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Previous revision</td> <td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 09:59, 21 October 2022</td> </tr><tr> <td colspan="2" class="diff-lineno">Line 1:</td> <td colspan="2" class="diff-lineno">Line 1:</td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>require('<del style="font-weight: bold; text-decoration: none;">Module:No globals</del>');</div></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>require('<ins style="font-weight: bold; text-decoration: none;">strict</ins>');</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>local getArgs = require ('Module:Arguments').getArgs;</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>local getArgs = require ('Module:Arguments').getArgs;</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td> </tr> </table> WOSlinker https://en.wikipedia.org/w/index.php?title=Module:Cite_IUCN/sandbox&diff=972526525&oldid=prev Jts1882: create sandbox to test new param for make cite iucn 2020-08-12T14:47:47Z <p>create sandbox to test new param for make cite iucn</p> <p><b>New page</b></p><div>require(&#039;Module:No globals&#039;);<br /> local getArgs = require (&#039;Module:Arguments&#039;).getArgs;<br /> <br /> <br /> --[[--------------------------&lt; I U C N _ I D E N T I F I E R S _ G E T &gt;--------------------------------------<br /> <br /> cs1|2 templates cite single sources; when the identifiers in |doi=, |id=, and |page= are different from each other<br /> then the template is attempting to cite multiple sources. This function evaluates the identifier portions of these<br /> parameters. returns seven values: identifyier parts (or nil when parameter not used) and a message (nil on success,<br /> error message else)<br /> <br /> the identifier portions of the several parameters must be properly formed<br /> <br /> ]]<br /> <br /> local function iucn_identifiers_get (args)<br /> local doi_taxon_ID, doi_assesment_ID<br /> local page_taxon_ID, page_assesment_ID<br /> local id_taxon_ID, id_assesment_ID<br /> local url_taxon_ID, url_assesment_ID<br /> local msg<br /> <br /> if args.doi then<br /> doi_taxon_ID, doi_assesment_ID = args.doi:match (&#039;[Tt](%d+)[Aa](%d+)%.en$&#039;)<br /> if not doi_taxon_ID then<br /> msg = &#039;malformed |doi= identifier&#039;<br /> end<br /> end<br /> if args.page then<br /> page_taxon_ID, page_assesment_ID = args.page:match (&#039;^[eE]%.[Tt](%d+)[Aa](%d+)$&#039;)<br /> if not page_taxon_ID then<br /> msg = &#039;malformed |page= identifier&#039;<br /> end<br /> end<br /> if args.id then<br /> id_taxon_ID, id_assesment_ID = args.id:match (&#039;^(%d+)/(%d+)$&#039;)<br /> if not id_taxon_ID then<br /> msg = &#039;malformed |id= identifier&#039;<br /> end<br /> end<br /> if args.url then<br /> if args.url:match (&#039;https://www.iucnredlist.org/species/&#039;) then -- must be a &#039;new-form&#039; url<br /> url_taxon_ID, url_assesment_ID = args.url:match (&#039;/species/(%d+)/(%d+)&#039;)<br /> if not url_taxon_ID then<br /> msg = &#039;malformed |url= identifier&#039;<br /> end<br /> end<br /> end<br /> <br /> if not msg then<br /> if doi_taxon_ID and page_taxon_ID then<br /> if not (doi_taxon_ID == page_taxon_ID and doi_assesment_ID == page_assesment_ID) then<br /> msg = &#039;|doi= / |page= mismatch&#039;<br /> end<br /> end<br /> if doi_taxon_ID and id_taxon_ID then<br /> if not (doi_taxon_ID == id_taxon_ID and doi_assesment_ID == id_assesment_ID) then<br /> msg = &#039;|doi= / |id= mismatch&#039;<br /> end<br /> end<br /> if doi_taxon_ID and url_taxon_ID then<br /> if not (doi_taxon_ID == url_taxon_ID and doi_assesment_ID == url_assesment_ID) then<br /> msg = &#039;|doi= / |url= mismatch&#039;<br /> end<br /> end<br /> <br /> if page_taxon_ID and id_taxon_ID then<br /> if not (page_taxon_ID == id_taxon_ID and page_assesment_ID == id_assesment_ID) then<br /> msg = &#039;|page= / |id= mismatch&#039;<br /> end<br /> end<br /> if page_taxon_ID and url_taxon_ID then<br /> if not (page_taxon_ID == url_taxon_ID and page_assesment_ID == url_assesment_ID) then<br /> msg = &#039;|page= / |url= mismatch&#039;<br /> end<br /> end<br /> <br /> if id_taxon_ID and url_taxon_ID then<br /> if not (id_taxon_ID == url_taxon_ID and id_assesment_ID == url_assesment_ID) then<br /> msg = &#039;|id= / |url= mismatch&#039;<br /> end<br /> end<br /> end<br /> <br /> if msg then<br /> msg = &#039;&lt;span class=&quot;error&quot; style=&quot;font-size:100%&quot;&gt;{{cite iucn}}: error: &#039; .. msg .. &#039; ([[Template:Cite iucn|help]])&lt;/span&gt;&#039;<br /> end<br /> <br /> return doi_taxon_ID, doi_assesment_ID, page_taxon_ID, page_assesment_ID, id_taxon_ID, id_assesment_ID, msg<br /> end<br /> <br /> <br /> --[[--------------------------&lt; I U C N _ V O L U M E _ C H E C K &gt;--------------------------------------------<br /> <br /> compares volume in |volume= (if present) against year in |date= or |year= (if present) against volume in |doi= (if present)<br /> <br /> returns nil if all that are present are correct; message else<br /> <br /> ]]<br /> <br /> local function iucn_volume_check (args)<br /> local vol = args.volume;<br /> local date = args.date or args.year;<br /> local doi = args.doi and args.doi:match (&#039;[Ii][Uu][Cc][Nn]%.[Uu][Kk]%.(%d%d%d%d)&#039;)<br /> local msg<br /> <br /> if vol and date then<br /> msg = (vol ~= date) and &#039;|volume= / |date= mismatch&#039; or msg<br /> end<br /> if vol and doi then<br /> msg = (vol ~= doi) and &#039;|volume= / |doi= mismatch&#039; or msg<br /> end<br /> if date and doi then<br /> msg = (doi ~= date) and &#039;|date= / |doi= mismatch&#039; or msg<br /> end<br /> <br /> return msg<br /> end<br /> <br /> <br /> --[[--------------------------&lt; C I T E &gt;----------------------------------------------------------------------<br /> <br /> Wraps {{cite journal}}:<br /> takes cite journal parameters but updates old style url using electronic page number<br /> page should be in format e.T13922A45199653<br /> the url uses 13922/45199653<br /> so we need to extract the number between T and A (taxon ID) and the number after A (assessment ID)<br /> the target url is https://www.iucnredlist.org/species/13922/45199653<br /> usage: {{#invoke:iucn|cite}}<br /> template: {{Template:Cite iucn}}<br /> <br /> ]]<br /> <br /> local function cite (frame)<br /> local error_msgs = {}; -- holds error messages for rendering<br /> local maint_msgs = {}; -- holds hidden maint messages for rendering<br /> local namespace = mw.title.getCurrentTitle().namespace; -- used for categorization<br /> local args = getArgs (frame); -- local copy of template arguments<br /> <br /> local missing_title = not args.title -- special case that results from script writing {{cite iucn}} template from bare iucn url<br /> -- don&#039;t duplicate cs1|2 error message; don&#039;t duplicate {{cite iucn}} error cat<br /> -- TODO: remove this when the error category has been cleared of missing title errors<br /> <br /> local doi_taxon_ID, doi_assesment_ID -- all of these contain the same identifying info in slightly<br /> local page_taxon_ID, page_assesment_ID -- different forms. when any combination of these is present,<br /> local id_taxon_ID, id_assesment_ID -- they must all agree<br /> local msg -- this holds error messages; nil on success<br /> <br /> doi_taxon_ID, doi_assesment_ID, page_taxon_ID, page_assesment_ID, id_taxon_ID, id_assesment_ID, msg = iucn_identifiers_get (args);<br /> if msg then<br /> table.insert (error_msgs, msg); -- malformed or mismatched identifiers<br /> end<br /> args.id = nil -- unset; no longer needed if it was set<br /> <br /> local url_taxon_ID = page_taxon_ID or id_taxon_ID or doi_taxon_ID; -- select for use in url that we will create<br /> local url_assesment_ID = page_assesment_ID or id_assesment_ID or doi_assesment_ID<br /> <br /> local url = args.url<br /> if url then<br /> if url:find (&#039;iucnredlist.org/details/&#039;, 1, true) then -- old-form url<br /> if url_taxon_ID then -- when there is an identifier<br /> url = nil -- unset; we&#039;ll create new url below<br /> else -- here when old-form but no identifier that we can use to create new url<br /> args.url = args.url:gsub (&quot;http:&quot;, &quot;https:&quot;) -- sometimes works with redirect on iucn site<br /> end<br /> table.insert (maint_msgs, &#039;old-form url&#039;) -- announce that this template has has an old-form url<br /> elseif url:find (&#039;iucnredlist.org/species/&#039;, 1, true) then -- new-form url<br /> -- table.insert (maint_msgs, &#039;new-form url&#039;) --TODO: restore this line when most new-form urls have been removed from article space -- announce that this template has has an new-form url<br /> else<br /> table.insert (maint_msgs, &#039;unknown url&#039;) -- announce that this template has has some sort of url we don&#039;t recognize<br /> end<br /> end<br /> <br /> if not url then -- when no url or unset old-form url<br /> if url_taxon_ID then<br /> args.url = &quot;https://www.iucnredlist.org/species/&quot; .. url_taxon_ID .. &#039;/&#039; .. url_assesment_ID<br /> else<br /> table.insert (maint_msgs, &#039;no identifier&#039;) -- TODO: raise this to error status?<br /> end<br /> end<br /> <br /> -- add journal if not provided (TODO decide if this should override provided value)<br /> if not args[&#039;journal&#039;] and not args[&#039;work&#039;] then<br /> args[&#039;journal&#039;] = &quot;[[IUCN Red List|IUCN Red List of Threatened Species]]&quot;<br /> end<br /> <br /> msg = iucn_volume_check (args); -- |volume=, |year= (|date=), |doi= must all refer to the same volume<br /> if msg then<br /> table.insert (maint_msgs, msg);<br /> end<br /> <br /> if not args.volume and (args.year or args.date) then<br /> args.volume = args.year or args.date<br /> end<br /> -- add free-to-read icon to mark a correctly formed doi<br /> args[&#039;doi-access&#039;] = args.doi and args.doi:match (&#039;10%.2305/[Ii][Uu][Cc][Nn].+[Tt]%d+[Aa]%d+%.[Ee][Nn]&#039;) and &#039;free&#039; or nil<br /> <br /> return frame:expandTemplate{ title = &#039;cite journal&#039;, args = args } .. -- the template<br /> (((0 == #error_msgs) and missing_title) and (&#039;[[Category:cite iucn errors]]&#039;) or &#039;&#039;) .. -- special case to not duplicate cs1|2 err msg or cite iucn error cat<br /> ((0 &lt; #error_msgs) and table.concat (error_msgs, &#039;, &#039;) or &#039;&#039;) .. -- the error messages<br /> (((0 &lt; #error_msgs) and (0 == namespace)) and (&#039;[[Category:cite iucn errors]]&#039;) or &#039;&#039;) .. -- error category when in mainspace<br /> ((0 &lt; #maint_msgs) and (&#039;&lt;span class=&quot;citation-comment&quot; style=&quot;display: none; color: #33aa33; margin-left: 0.3em;&quot;&gt;&#039; .. table.concat (maint_msgs, &#039;, &#039;) .. &#039;&lt;/span&gt;&#039;) or &#039;&#039;) .. -- the maint messages<br /> (((0 &lt; #maint_msgs) and (0 == namespace)) and (&#039;[[Category:cite iucn maint]]&#039;) or &#039;&#039;) -- maint category when in mainspace<br /> end<br /> <br /> <br /> --[[--------------------------&lt; A U T H O R _ L I S T _ M A K E &gt;----------------------------------------------<br /> <br /> creates a list of individual |authorn= parameters from the list of names provided in the raw iucn citation. names<br /> must have the form: Surname, I. (more than one &#039;I.&#039; pair allowed but no spaces between I. pairs)<br /> <br /> assumes that parenthetical text at the end of the author-name-list is a collaboration<br /> Name, I.I., &amp; Name, I.I. (Colaboration name)<br /> <br /> ]]<br /> <br /> local function author_names_get (raw_iucn_cite)<br /> local list = {}; -- table that holds name list parts<br /> local author_names = raw_iucn_cite:match (&#039;^([^%d]-)%s+%d%d%d%d&#039;); -- extract author name-list from raw iucn citation<br /> local collaboration = author_names:match (&#039;%s*(%b())$&#039;); -- get collaboration name if it exists<br /> <br /> if collaboration then -- when there is a colaboration<br /> collaboration = collaboration:gsub (&#039;[%(%)]&#039;, &#039;&#039;); -- remove bounding parentheses<br /> author_names = author_names:gsub (&#039;%s*(%b())$&#039;, &#039;&#039;); -- and remove collaboration from author-name-list<br /> end<br /> <br /> local names = author_names:gsub (&#039;%.?,?%s+&amp;%s+&#039;, &#039;.|&#039;):gsub (&#039;%.,%s+&#039;, &#039;.|&#039;); -- replace &#039;separators&#039; (&lt;dot&gt;&lt;comma&gt;&lt;space&gt; and &lt;opt. dot&gt;&lt;opt. comma&gt;&lt;space&gt;&lt;ampersand&gt;&lt;space&gt;) with &lt;dot&gt;&lt;pipe&gt;<br /> list = mw.text.split (names, &#039;|&#039;); -- split the string on the pipes into entries in list{}<br /> <br /> if 0 == #list then<br /> return table.concat ({&#039;|author=&#039;, author_names}) -- no &#039;names&#039; of the proper form; return the original as a single |author= parameter<br /> else<br /> for i, name in ipairs (list) do -- spin through the list and <br /> -- list[i] = table.concat ({&#039;|author&#039;, i, &#039;=&#039;, name}); -- add |authorn= parameter names<br /> list[i] = table.concat ({&#039;|author&#039;, (i == 1) and &#039;&#039; or i, &#039;=&#039;, name}); -- add |authorn= parameter names; create |author= instead of |author1=<br /> end<br /> if collaboration then<br /> table.insert (list, table.concat ({&#039;|collaboration&#039;, &#039;=&#039;, collaboration})); -- add |collaboration= parameter<br /> end<br /> return table.concat (list, &#039; &#039;); -- make a big string and return that<br /> end<br /> end<br /> <br /> <br /> --[[--------------------------&lt; T I T L E _ G E T &gt;------------------------------------------------------------<br /> <br /> extract and format citation title; attempts to get the italic right<br /> <br /> &#039;&#039;binomen&#039;&#039; (amended or errata title)<br /> &#039;&#039;binomen&#039;&#039;<br /> &#039;&#039;binomen&#039;&#039; ssp. &#039;&#039;subspecies&#039;&#039;<br /> &#039;&#039;binomen&#039;&#039; subsp. &#039;&#039;subspecies&#039;&#039;<br /> &#039;&#039;binomen&#039;&#039; var. &#039;&#039;variety&#039;&#039;<br /> &#039;&#039;binomen&#039;&#039; subvar. &#039;&#039;subvariety&#039;&#039;<br /> <br /> all of the above may have trailing amended or errata text in parentheses<br /> <br /> TODO: are there others?<br /> <br /> ]]<br /> <br /> local function title_get (raw_iucn_cite)<br /> local title = raw_iucn_cite:match (&#039;%d%d%d%d%.%s+(.-)%s*%. The IUCN Red List of Threatened Species&#039;);<br /> <br /> local patterns = { -- tables of string.match patterns [1] and string.gsub patterns [2]<br /> {&#039;(.-)%sssp%.%s+(.-)%s(%b())$&#039;, &quot;&#039;&#039;%1&#039;&#039; ssp. &#039;&#039;%2&#039;&#039; %3&quot;}, -- binomen ssp. subspecies (zoology) with errata or amended text<br /> {&#039;(.-)%sssp%.%s+(.+)&#039;, &quot;&#039;&#039;%1&#039;&#039; ssp. &#039;&#039;%2&#039;&#039;&quot;}, -- binomen ssp. subspecies (zoology)<br /> {&#039;(.-)%ssubsp%.%s+(.-)%s(%b())$&#039;, &quot;&#039;&#039;%1&#039;&#039; subsp. &#039;&#039;%2&#039;&#039; %3&quot;}, -- binomen subsp. subspecies (botany) with errata or amended text<br /> {&#039;(.-)%ssubsp%.%s+(.+)&#039;, &quot;&#039;&#039;%1&#039;&#039; subsp. &#039;&#039;%2&#039;&#039;&quot;}, -- binomen subsp. subspecies (botany)<br /> {&#039;(.-)%svar%.%s+(.-)%s+(%b())$&#039;, &quot;&#039;&#039;%1&#039;&#039; var. &#039;&#039;%2&#039;&#039; %3&quot;}, -- binomen var. variety (botany) with errata or amended text<br /> {&#039;(.-)%svar%.%s+(.+)&#039;, &quot;&#039;&#039;%1&#039;&#039; var. &#039;&#039;%2&#039;&#039;&quot;}, -- binomen var. variety (botany)<br /> {&#039;(.-)%ssubvar%.%s+(.-)%s(%b())$&#039;, &quot;&#039;&#039;%1&#039;&#039; subvar. &#039;&#039;%2&#039;&#039; %3&quot;}, -- binomen subvar. subvariety (botany) with errata or amended text<br /> {&#039;(.-)%ssubvar%.%s+(.+)&#039;, &quot;&#039;&#039;%1&#039;&#039; subvar. &#039;&#039;%2&#039;&#039;&quot;}, -- binomen subvar. subvariety (botany)<br /> {&#039;(.-)%s*(%b())$&#039;, &quot;&#039;&#039;%1&#039;&#039; %2&quot;}, -- binomen with errata or amended text<br /> {&#039;(.+)&#039;, &quot;&#039;&#039;%1&#039;&#039;&quot;}, -- binomen<br /> }<br /> <br /> for i, v in ipairs (patterns) do -- spin through the patterns<br /> if title:match (v[1]) then -- when a match<br /> title = title:gsub (v[1], v[2]); -- add italics <br /> break; -- and done<br /> end<br /> end<br /> <br /> return table.concat ({&#039; |title=&#039;, title}); -- return the |title= parameter<br /> end<br /> <br /> <br /> --[[--------------------------&lt; M A K E _ C I T E _ I U C N &gt;--------------------------------------------------<br /> <br /> parses apart an iucn-format citation copied from their webpage and reformats that into a {{cite iucn}} template for substing<br /> <br /> automatic substing by User:AnomieBOT/docs/TemplateSubster<br /> <br /> ]]<br /> <br /> local function make_cite_iucn (frame)<br /> local args = getArgs (frame);<br /> local raw_iucn_cite = args[1];<br /> <br /> local template = {&#039;{{cite iucn &#039;}; -- table that holds the {{cite iucn}} template as it is being assembled<br /> local year, volume, page, doi, accessdate;<br /> <br /> year = raw_iucn_cite:match (&#039;^%D+(%d%d%d%d)&#039;);<br /> volume, page = raw_iucn_cite:match (&#039;(%d%d%d%d):%s+(e%.T%d+A+%d+)%.%s&#039;);<br /> doi = raw_iucn_cite:match (&#039;10%.2305/IUCN%.UK%.[%d%-]+%.RLTS%.T%d+A%d+%.en&#039;);<br /> <br /> accessdate = raw_iucn_cite:match (&#039;Downloaded on (.-)%.?$&#039;):gsub (&#039;^0&#039;, &#039;&#039;); -- strips leading 0 in day 01 January 2020 -&gt; 1 January 2020<br /> <br /> table.insert (template, author_names_get (raw_iucn_cite)); -- add string of author name parameters<br /> table.insert (template, table.concat ({&#039; |year=&#039;, year})); -- add formatted year<br /> table.insert (template, title_get (raw_iucn_cite)); -- add formatted title<br /> table.insert (template, table.concat ({&#039; |volume=&#039;, volume})); -- add formatted volume<br /> table.insert (template, table.concat ({&#039; |page=&#039;, page})); -- add formatted page<br /> table.insert (template, table.concat ({&#039; |doi=&#039;, doi})); -- add formatted doi<br /> table.insert (template, table.concat ({&#039; |access-date=&#039;, accessdate})); -- add formatted access-date<br /> table.insert (template, &#039;}}&#039;); -- close the template<br /> <br /> if args[2] then -- if anything in args[2], write a nowiki&#039;d version that editors can copy into &lt;ref&gt; tags<br /> return table.concat ({&#039;&lt;code&gt;&#039;, frame:callParserFunction (&#039;#tag:nowiki&#039;, table.concat (template)), &#039;&lt;/code&gt;&#039;})<br /> end<br /> if args[&#039;ref&#039;] then<br /> return &#039;&lt;ref name=&#039; .. args[&#039;ref&#039;] .. &#039;&gt;&#039; .. table.concat (template) .. &#039;&lt;/ref&gt;&#039;<br /> end<br /> return table.concat (template); -- the subst&#039;d version<br /> end<br /> <br /> <br /> --[[--------------------------&lt; E X P O R T E D F U N C T I O N S &gt;------------------------------------------<br /> ]]<br /> <br /> return {<br /> cite = cite,<br /> make_cite_iucn = make_cite_iucn,<br /> }</div> Jts1882