Module:Citation/CS1/COinS: Difference between revisions

    m>Trappist the monk
    (Synch from sandbox;)
    m>Trappist the monk
    (synch from sandbox;)
    Line 213: Line 213:
    });
    });
    if in_array (class, {'arxiv', 'journal', 'news'}) or (in_array (class, {'conference', 'interview', 'map', 'press release', 'web'}) and is_set(data.Periodical)) or  
    if in_array (class, {'arxiv', 'biorxiv', 'citeseerx', 'journal', 'news'}) or (in_array (class, {'conference', 'interview', 'map', 'press release', 'web'}) and is_set(data.Periodical)) or  
    ('citation' == class and is_set(data.Periodical) and not is_set (data.Encyclopedia)) then
    ('citation' == class and is_set(data.Periodical) and not is_set (data.Encyclopedia)) then
    OCinSoutput.rft_val_fmt = "info:ofi/fmt:kev:mtx:journal"; -- journal metadata identifier
    OCinSoutput.rft_val_fmt = "info:ofi/fmt:kev:mtx:journal"; -- journal metadata identifier
    if 'arxiv' == class then -- set genre according to the type of citation template we are rendering
    if in_array (class, {'arxiv', 'biorxiv', 'citeseerx'}) then -- set genre according to the type of citation template we are rendering
    OCinSoutput["rft.genre"] = "preprint"; -- cite arxiv
    OCinSoutput["rft.genre"] = "preprint"; -- cite arxiv, cite biorxiv, cite citeseerx
    elseif 'conference' == class then
    elseif 'conference' == class then
    OCinSoutput["rft.genre"] = "conference"; -- cite conference (when Periodical set)
    OCinSoutput["rft.genre"] = "conference"; -- cite conference (when Periodical set)