 u8d8a7u8db8cu8d986 u8d9beu8d988u8d8afu8d985u8d8a7u8d986 u8d8a8u8d987u8e2808cu8d8afu8d982u8d8aa u8d8a8u8d988u8d985u8db8cu8e2808cu8d8b3u8d8a7u8d8b2u8db8c u8d8b4u8d8afu8d987u8e2808cu8d8a7u8d8b3u8d8aa. u8d987u8d986u8daafu8d8a7u8d985 u8d8a8u8d987u8e2808cu8d8b1u8d988u8d8b2u8d8b1u8d8b3u8d8a7u8d986u8db8c u8d8afu8d982u8d8aa u8daa9u8d986u8db8cu8d8af local getargs require 'module arguments .getargs fu800 args_default bracket_left   bracket_right   bracket_year_left   bracket_year_right   postscript   page   pages   location   page_sep 'u8d8b5.' pages_sep 'u8d8b5u8d8b5.' refu800   p1u800   p2u800   p3u800   p4u800   p5u800   andothers 'u8d988 u8d8afu8db8cu8daafu8d8b1u8d8a7u8d986' ampu800 'u8d988' comma 'u8d88c' function trim stru800 ifu800 stru800 nilu800 then return nilu800 endu800 return mwu800u82eustringu82ematch stru800 ' su800* . su800* ' endu800 local function is_year param return mwu800u82eustringu82ematch param ' du800 du800 du800 du800 lu800 ' oru800 mwu800u82eustringu82ematch param ' nu800 .du800 . lu800 ' oru800 mwu800u82eustringu82ematch param ' ndu800 lu800 ' oru800 mwu800u82eustringu82ematch param ' cu800 . du800 du800 du800 du800 lu800 ' endu800 function core args local result ifu800 argsu82ep5u800   then ifu800 is_year argsu82ep5u800 then result tableu82econcat argsu82ep1u800 ' ' argsu82eandothers ' ' argsu82ebracket_year_left argsu82ep5u800 argsu82ebracket_year_right else argsu82ep5u800   when p5u800 notu800 au800 year donu800'tu800 include inu800 anchor result tableu82econcat argsu82ep1u800 ' ' argsu82eandothers andu800 donu800'tu800 render itu800 endu800 elseif argsu82ep4u800   then ifu800 is_year argsu82ep4u800 then result tableu82econcat argsu82ep1u800 argsu82ecomma ' ' argsu82ep2u800 ' ' argsu82eampu800 ' ' argsu82ep3u800 ' ' argsu82ebracket_year_left argsu82ep4u800 argsu82ebracket_year_right three names andu800 au800 year else result tableu82econcat argsu82ep1u800 ' ' argsu82eandothers four names endu800 elseif argsu82ep3u800   then ifu800 is_year argsu82ep3u800 then result tableu82econcat argsu82ep1u800 ' ' argsu82eampu800 ' ' argsu82ep2u800 ' ' argsu82ebracket_year_left argsu82ep3u800 argsu82ebracket_year_right twou800 names andu800 au800 year else result tableu82econcat argsu82ep1u800 argsu82ecomma ' ' argsu82ep2u800 ' ' argsu82eampu800 ' ' argsu82ep3u800 three names endu800 elseif argsu82ep2u800   then ifu800 is_year argsu82ep2u800 then result tableu82econcat argsu82ep1u800 ' ' argsu82ebracket_year_left argsu82ep2u800 argsu82ebracket_year_right oneu800 name andu800 year else result tableu82econcat argsu82ep1u800 ' ' argsu82eampu800 ' ' argsu82ep2u800 twou800 names endu800 else result argsu82ep1u800 oneu800 name endu800 ifu800 '.' result subu800 1u800 andu800   argsu82epage andu800   argsu82epages andu800   argsu82elocation then argsu82epostscript   prevent double periods when date isu800 'nu800u82edu800.' endu800 ifu800 argsu82erefu800 'none' then ifu800 argsu82erefu800   then result ' #' .. mwu800u82euriu800u82eanchorencode argsu82erefu800 .. ' ' .. result .. ' ' else result ' #citeref' .. mwu800u82euriu800u82eanchorencode argsu82ep1u800 .. argsu82ep2u800 .. argsu82ep3u800 .. argsu82ep4u800 .. argsu82ep5u800 .. ' ' .. result .. ' ' endu800 endu800 ifu800 argsu82epage   then result result .. argsu82ecomma .. ' ' .. argsu82epage_sep .. ' ' .. argsu82epage elseif argsu82epages   then result result .. argsu82ecomma .. ' ' .. argsu82epages_sep .. ' ' .. argsu82epages endu800 ifu800 argsu82elocation   then result result .. argsu82ecomma .. ' ' .. argsu82elocation endu800 result argsu82ebracket_left .. result .. argsu82ebracket_right .. argsu82epostscript return result endu800 function fu800u82eharvard_core frame local args local pargs getargs frame argsu82ebracket_left pargsu82ebracketleft oru800   argsu82ebracket_right pargsu82ebracketright oru800   argsu82ebracket_year_left pargsu82ebracketyearleft oru800   argsu82ebracket_year_right pargsu82ebracketyearright oru800   argsu82epostscript pargsu82epostscript oru800   ifu800 'none' argsu82epostscript then argsu82epostscript   endu800 argsu82epage pargsu82epu800 oru800 pargsu82epage oru800 pargsu82epage oru800 pargs 'u8d8b5' oru800   argsu82epages pargsu82eppu800 oru800 pargsu82epages oru800 pargsu82epages oru800 pargs 'u8d8b5u8d8b5' oru800   argsu82elocation pargsu82elocation oru800 pargsu82elocu800 oru800 pargs 'u8d985u8d8adu8d984' oru800   argsu82epage_sep trim pargsu82epagesep oru800   argsu82epages_sep trim pargsu82epagessep oru800   argsu82erefu800 pargsu82erefu800 oru800 ' refu800 ' argsu82ep1u800 trim pargsu82ep1u800 oru800   argsu82ep2u800 trim pargsu82ep2u800 oru800   argsu82ep3u800 trim pargsu82ep3u800 oru800   argsu82ep4u800 trim pargsu82ep4u800 oru800   argsu82ep5u800 trim pargsu82ep5u800 oru800   argsu82eandothers trim pargsu82eandothers oru800 'u8d988 u8d8afu8db8cu8daafu8d8b1u8d8a7u8d986' argsu82eampu800 trim pargsu82eampu800 oru800 'u8d988' argsu82ecomma trim pargsu82ecomma oru800 'u8d88c' return core args endu800 function fu800u82eharvard_citation frame local args fu800u82eargs_default local pargs getargs frame argsu82ebracket_left ' ' argsu82ebracket_right ' ' argsu82epage pargsu82epu800 oru800 pargsu82epage oru800 pargs 'u8d8b5' oru800   argsu82epages pargsu82eppu800 oru800 pargsu82epages oru800 pargs 'u8d8b5u8d8b5' oru800   argsu82elocation pargsu82elocu800 oru800 pargs 'u8d985u8d8adu8d984' oru800   argsu82erefu800 pargsu82erefu800 oru800 pargsu82erefu800 oru800   argsu82ep1u800 trim pargs 1u800 oru800   argsu82ep2u800 trim pargs 2u800 oru800   argsu82ep3u800 trim pargs 3u800 oru800   argsu82ep4u800 trim pargs 4u800 oru800   argsu82ep5u800 trim pargs 5u800 oru800   argsu82eandothers trim pargsu82eandothers oru800 argsu82eandothers argsu82eampu800 trim pargsu82eampu800 oru800 argsu82eampu800 argsu82ecomma trim pargsu82ecomma oru800 argsu82ecomma argsu82epage_sep trim pargsu82epagesep oru800 argsu82epage_sep argsu82epages_sep trim pargsu82epagessep oru800 argsu82epages_sep return core args endu800 function fu800u82eharvard_citation_no_bracket frame local args fu800u82eargs_default local pargs getargs frame argsu82epage pargsu82epu800 oru800 pargsu82epage oru800 pargs 'u8d8b5' oru800   argsu82epages pargsu82eppu800 oru800 pargsu82epages oru800 pargs 'u8d8b5u8d8b5' oru800   argsu82elocation pargsu82elocu800 oru800 pargs 'u8d985u8d8adu8d984' oru800   argsu82erefu800 pargsu82erefu800 oru800 pargsu82erefu800 oru800   argsu82ep1u800 trim pargs 1u800 oru800   argsu82ep2u800 trim pargs 2u800 oru800   argsu82ep3u800 trim pargs 3u800 oru800   argsu82ep4u800 trim pargs 4u800 oru800   argsu82ep5u800 trim pargs 5u800 oru800   argsu82eandothers trim pargsu82eandothers oru800 argsu82eandothers argsu82eampu800 trim pargsu82eampu800 oru800 argsu82eampu800 argsu82epage_sep trim pargsu82epagesep oru800 argsu82epage_sep argsu82epages_sep trim pargsu82epagessep oru800 argsu82epages_sep argsu82ecomma trim pargsu82ecomma oru800 argsu82ecomma return core args endu800 function fu800u82esfnu800 frame local args fu800u82eargs_default local pargs getargs frame foru800 ku800 vu800 inu800 pairs frameu82eargs dou800 foru800 sfnp override default with values provided inu800 theu800 #invoke args ku800 vu800 endu800 argsu82epostscript pargsu82epostscript oru800 pargsu82epsu800 oru800 '.' ifu800 'none' argsu82epostscript then argsu82epostscript   endu800 argsu82epage pargsu82epu800 oru800 pargsu82epage oru800 pargs 'u8d8b5' oru800   argsu82epages pargsu82eppu800 oru800 pargsu82epages oru800 pargs 'u8d8b5u8d8b5' oru800   argsu82elocation pargsu82elocu800 oru800 pargs 'u8d985u8d8adu8d984' oru800   argsu82erefu800 pargsu82erefu800 oru800 pargsu82erefu800 oru800   argsu82ep1u800 trim pargs 1u800 oru800   argsu82ep2u800 trim pargs 2u800 oru800   argsu82ep3u800 trim pargs 3u800 oru800   argsu82ep4u800 trim pargs 4u800 oru800   argsu82ep5u800 trim pargs 5u800 oru800   argsu82eandothers trim pargsu82eandothers oru800 argsu82eandothers argsu82eampu800 trim pargsu82eampu800 oru800 argsu82eampu800 argsu82ecomma trim pargsu82ecomma oru800 argsu82ecomma argsu82epage_sep trim pargsu82epagesep oru800 argsu82epage_sep argsu82epages_sep trim pargsu82epagessep oru800 argsu82epages_sep local result core args local name 'footnote' .. argsu82ep1u800 .. argsu82ep2u800 .. argsu82ep3u800 .. argsu82ep4u800 .. argsu82ep5u800 .. argsu82epage .. argsu82epages .. argsu82elocation result frame extensiontag name 'refu800' args name name content result return result endu800 theu800 following function isu800 idential tou800 fu800u82esfnu800 with theu800 exception that itu800 guarantees theu800 output tagu800 will have diru800 ltru800 which isu800 useful foru800 references copied from english wikipedia function fu800u82esfnltr frame local args fu800u82eargs_default local pargs getargs frame foru800 ku800 vu800 inu800 pairs frameu82eargs dou800 foru800 sfnp override default with values provided inu800 theu800 #invoke args ku800 vu800 endu800 argsu82epostscript pargsu82epostscript oru800 pargsu82epsu800 oru800 '.' ifu800 'none' argsu82epostscript then argsu82epostscript   endu800 argsu82epage pargsu82epu800 oru800 pargsu82epage oru800 pargs 'u8d8b5' oru800   argsu82epages pargsu82eppu800 oru800 pargsu82epages oru800 pargs 'u8d8b5u8d8b5' oru800   argsu82elocation pargsu82elocu800 oru800 pargs 'u8d985u8d8adu8d984' oru800   argsu82erefu800 pargsu82erefu800 oru800 pargsu82erefu800 oru800   argsu82ep1u800 trim pargs 1u800 oru800   argsu82ep2u800 trim pargs 2u800 oru800   argsu82ep3u800 trim pargs 3u800 oru800   argsu82ep4u800 trim pargs 4u800 oru800   argsu82ep5u800 trim pargs 5u800 oru800   argsu82eandothers trim pargsu82eandothers oru800 argsu82eandothers argsu82eampu800 trim pargsu82eampu800 oru800 argsu82eampu800 argsu82ecomma trim pargsu82ecomma oru800 argsu82ecomma argsu82epage_sep trim pargsu82epagesep oru800 argsu82epage_sep argsu82epages_sep trim pargsu82epagessep oru800 argsu82epages_sep local result core args local name 'footnote' .. argsu82ep1u800 .. argsu82ep2u800 .. argsu82ep3u800 .. argsu82ep4u800 .. argsu82ep5u800 .. argsu82epage .. argsu82epages .. argsu82elocation result frame extensiontag name 'refu800' args name name diru800 "ltru800" content result return result endu800 return fu800 