Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Please sign up or log in to edit the wiki.

Citation template for articles in magazines and periodicals.

TemplateData

Citation template for articles in magazines and periodicals

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
Authorauthor

Author of the article

Stringsuggested
Article namearticlename

Title of the article

Stringsuggested
Magazine or journalmagazine

Name of the magazine or journal

Stringsuggested
Issue or volumeissue

Issue, volume, or number information (e.g. vol. 12, no. 3)

Stringsuggested
Publication datedate

Publication date of the article

Datesuggested
Pagespages

Page range of the article

Stringsuggested
Pagepage

Single page reference (used if pages is not set)

Stringoptional

local p = {}

function p.cite(frame)
    local args = require('Module:Arguments').getArgs(frame)
    local parts = {}

    -- Author
    if args.author then
        table.insert(parts, args.author)
    end

    -- Article title (quoted)
    if args.articlename then
        table.insert(parts, '"' .. args.articlename .. '"')
    end

    -- Magazine title (italicized)
    if args.magazine then
        table.insert(parts, "''" .. args.magazine .. "''")
    end

    -- Issue / volume
    if args.issue then
        table.insert(parts, args.issue)
    end

    -- Date
    if args.date then
        table.insert(parts, args.date)
    end

    -- Join core citation parts
    local output = table.concat(parts, ", ")

    -- Page or pages
    if args.pages then
        output = output .. ", pp. " .. args.pages
    elseif args.page then
        output = output .. ", p. " .. args.page
    end

    return output
end

return p