<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://petitplanet.wiki/index.php?action=history&amp;feed=atom&amp;title=Module%3AHatnote</id>
	<title>Module:Hatnote - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://petitplanet.wiki/index.php?action=history&amp;feed=atom&amp;title=Module%3AHatnote"/>
	<link rel="alternate" type="text/html" href="https://petitplanet.wiki/index.php?title=Module:Hatnote&amp;action=history"/>
	<updated>2026-04-12T07:09:29Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.5</generator>
	<entry>
		<id>https://petitplanet.wiki/index.php?title=Module:Hatnote&amp;diff=26&amp;oldid=prev</id>
		<title>Stevium: Created Module:Hatnote</title>
		<link rel="alternate" type="text/html" href="https://petitplanet.wiki/index.php?title=Module:Hatnote&amp;diff=26&amp;oldid=prev"/>
		<updated>2025-11-09T09:06:33Z</updated>

		<summary type="html">&lt;p&gt;Created Module:Hatnote&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;-- &amp;lt;nowiki&amp;gt;&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
--                              Module:Hatnote                                --&lt;br /&gt;
--                                                                            --&lt;br /&gt;
-- This module produces hatnote links and links to related articles. It       --&lt;br /&gt;
-- implements the {{hatnote}} and {{format link}} meta-templates and includes --&lt;br /&gt;
-- helper functions for other Lua hatnote modules.                            --&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
local libraryUtil = require(&amp;#039;libraryUtil&amp;#039;)&lt;br /&gt;
local checkType = libraryUtil.checkType&lt;br /&gt;
local mArguments = require(&amp;#039;Module:Arguments&amp;#039;)&lt;br /&gt;
local yesno = require(&amp;#039;Module:Yesno&amp;#039;)&lt;br /&gt;
local mTableTools = require(&amp;#039;Module:TableTools&amp;#039;)&lt;br /&gt;
local i18n = require(&amp;#039;Module:I18n&amp;#039;).loadMessages(&amp;#039;Hatnote&amp;#039;)&lt;br /&gt;
local hatnote = {}&lt;br /&gt;
&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
-- Helper functions&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
local function getArgs(frame)&lt;br /&gt;
    -- Fetches the arguments from the parent frame. Whitespace is trimmed and&lt;br /&gt;
    -- blanks are removed.&lt;br /&gt;
    return mArguments.getArgs(frame, {parentOnly = true})&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function removeInitialColon(s)&lt;br /&gt;
    -- Removes the initial colon from a string, if present.&lt;br /&gt;
    return s:match(&amp;#039;^:?(.*)&amp;#039;)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function hatnote.findNamespaceId(link, removeColon)&lt;br /&gt;
    -- Finds the namespace id (namespace number) of a link or a pagename. This&lt;br /&gt;
    -- function will not work if the link is enclosed in double brackets. Colons&lt;br /&gt;
    -- are trimmed from the start of the link by default. To skip colon&lt;br /&gt;
    -- trimming, set the removeColon parameter to false.&lt;br /&gt;
    checkType(&amp;#039;findNamespaceId&amp;#039;, 1, link, &amp;#039;string&amp;#039;)&lt;br /&gt;
    checkType(&amp;#039;findNamespaceId&amp;#039;, 2, removeColon, &amp;#039;boolean&amp;#039;, true)&lt;br /&gt;
    if removeColon ~= false then&lt;br /&gt;
        link = removeInitialColon(link)&lt;br /&gt;
    end&lt;br /&gt;
    local namespace = link:match(&amp;#039;^(.-):&amp;#039;)&lt;br /&gt;
    if namespace then&lt;br /&gt;
        local nsTable = mw.site.namespaces[namespace]&lt;br /&gt;
        if nsTable then&lt;br /&gt;
            return nsTable.id&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
    return 0&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function hatnote.quote(title)&lt;br /&gt;
	--Wraps titles in quotation marks. If the title starts/ends with a quotation&lt;br /&gt;
	--mark, kerns that side as with {{-&amp;#039;}}&lt;br /&gt;
	local quotationMarks = {&lt;br /&gt;
		[&amp;quot;&amp;#039;&amp;quot;]=true, [&amp;#039;&amp;quot;&amp;#039;]=true, [&amp;#039;“&amp;#039;]=true, [&amp;quot;‘&amp;quot;]=true, [&amp;#039;”&amp;#039;]=true, [&amp;quot;’&amp;quot;]=true&lt;br /&gt;
	}&lt;br /&gt;
	local quoteLeft, quoteRight = -- Test if start/end are quotation marks&lt;br /&gt;
		quotationMarks[string.sub(title,  1,  1)],&lt;br /&gt;
		quotationMarks[string.sub(title, -1, -1)]&lt;br /&gt;
	if quoteLeft or quoteRight then&lt;br /&gt;
		title = mw.html.create(&amp;quot;span&amp;quot;):wikitext(title)&lt;br /&gt;
	end&lt;br /&gt;
	if quoteLeft  then title:css(&amp;quot;padding-left&amp;quot;,  &amp;quot;0.15em&amp;quot;) end&lt;br /&gt;
	if quoteRight then title:css(&amp;quot;padding-right&amp;quot;, &amp;quot;0.15em&amp;quot;) end&lt;br /&gt;
	return &amp;#039;&amp;quot;&amp;#039; .. tostring(title) .. &amp;#039;&amp;quot;&amp;#039;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function hatnote.formatPages(...)&lt;br /&gt;
    -- Formats a list of pages using formatLink and returns it as an array. Nil&lt;br /&gt;
    -- values are not allowed.&lt;br /&gt;
    local pages = {...}&lt;br /&gt;
    local ret = {}&lt;br /&gt;
    for i, page in ipairs(pages) do&lt;br /&gt;
        ret[i] = hatnote._formatLink(page)&lt;br /&gt;
    end&lt;br /&gt;
    return ret&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function hatnote.formatPageTables(...)&lt;br /&gt;
    -- Takes a list of page/display tables and returns it as a list of&lt;br /&gt;
    -- formatted links. Nil values are not allowed.&lt;br /&gt;
    local pages = {...}&lt;br /&gt;
    local links = {}&lt;br /&gt;
    for i, t in ipairs(pages) do&lt;br /&gt;
        checkType(&amp;#039;formatPageTables&amp;#039;, i, t, &amp;#039;table&amp;#039;)&lt;br /&gt;
        local link = t[1]&lt;br /&gt;
        local display = t[2]&lt;br /&gt;
        links[i] = hatnote._formatLink(link, display)&lt;br /&gt;
    end&lt;br /&gt;
    return links&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function hatnote.makeWikitextError(msg, helpLink, addTrackingCategory, title)&lt;br /&gt;
    -- Formats an error message to be returned to wikitext. If&lt;br /&gt;
    -- addTrackingCategory is not false after being returned from&lt;br /&gt;
    -- [[Module:Yesno]], and if we are not on a talk page, a tracking category&lt;br /&gt;
    -- is added.&lt;br /&gt;
    checkType(&amp;#039;makeWikitextError&amp;#039;, 1, msg, &amp;#039;string&amp;#039;)&lt;br /&gt;
    checkType(&amp;#039;makeWikitextError&amp;#039;, 2, helpLink, &amp;#039;string&amp;#039;, true)&lt;br /&gt;
    title = title or mw.title.getCurrentTitle()&lt;br /&gt;
    -- Make the help link text.&lt;br /&gt;
    local helpText&lt;br /&gt;
    if helpLink then&lt;br /&gt;
        helpText = &amp;#039; ([[&amp;#039; .. helpLink .. &amp;#039;|&amp;#039; .. i18n:msg(&amp;#039;help&amp;#039;) .. &amp;#039;]])&amp;#039;&lt;br /&gt;
    else&lt;br /&gt;
        helpText = &amp;#039;&amp;#039;&lt;br /&gt;
    end&lt;br /&gt;
    -- Make the category text.&lt;br /&gt;
    local category&lt;br /&gt;
    if not title.isTalkPage and yesno(addTrackingCategory) ~= false then&lt;br /&gt;
        category = i18n:msg(&amp;#039;cat-errors&amp;#039;)&lt;br /&gt;
        category = string.format(&lt;br /&gt;
            &amp;#039;[[%s:%s]]&amp;#039;,&lt;br /&gt;
            mw.site.namespaces[14].name,&lt;br /&gt;
            category&lt;br /&gt;
        )&lt;br /&gt;
    else&lt;br /&gt;
        category = &amp;#039;&amp;#039;&lt;br /&gt;
    end&lt;br /&gt;
    return string.format(&lt;br /&gt;
        i18n:msg(&amp;#039;error&amp;#039;),&lt;br /&gt;
        msg,&lt;br /&gt;
        helpText,&lt;br /&gt;
        category&lt;br /&gt;
    )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function hatnote.disambiguate(page, disambiguator)&lt;br /&gt;
    -- Formats a page title with a disambiguation parenthetical,&lt;br /&gt;
    -- i.e. &amp;quot;Example&amp;quot; → &amp;quot;Example (disambiguation)&amp;quot;.&lt;br /&gt;
    checkType(&amp;#039;disambiguate&amp;#039;, 1, page, &amp;#039;string&amp;#039;)&lt;br /&gt;
    checkType(&amp;#039;disambiguate&amp;#039;, 2, disambiguator, &amp;#039;string&amp;#039;, true)&lt;br /&gt;
    disambiguator = disambiguator or i18n:msg(&amp;#039;disambiguation&amp;#039;)&lt;br /&gt;
    return string.format(i18n:msg(&amp;#039;brackets&amp;#039;), page, disambiguator)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
-- Format link&lt;br /&gt;
--&lt;br /&gt;
-- Makes a wikilink from the given link and display values. Links are escaped&lt;br /&gt;
-- with colons if necessary, and links to sections are detected and displayed&lt;br /&gt;
-- with &amp;quot; § &amp;quot; as a separator rather than the standard MediaWiki &amp;quot;#&amp;quot;. Used in&lt;br /&gt;
-- the {{format link}} template.&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
function hatnote.formatLink(frame)&lt;br /&gt;
    local args = getArgs(frame)&lt;br /&gt;
    local link = args[1]&lt;br /&gt;
    local display = args[2]&lt;br /&gt;
    if not link then&lt;br /&gt;
        return hatnote.makeWikitextError(&lt;br /&gt;
            i18n:msg(&amp;#039;error-link&amp;#039;),&lt;br /&gt;
            &amp;#039;w:c:dev:Template:Format link#Errors&amp;#039;,-- there is no actual docs for this. not even on wikipedia&lt;br /&gt;
            args.category&lt;br /&gt;
        )&lt;br /&gt;
    end&lt;br /&gt;
    return hatnote._formatLink(link, display)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function hatnote._formatLink(link, display)&lt;br /&gt;
    checkType(&amp;#039;_formatLink&amp;#039;, 1, link, &amp;#039;string&amp;#039;)&lt;br /&gt;
    checkType(&amp;#039;_formatLink&amp;#039;, 2, display, &amp;#039;string&amp;#039;, true)&lt;br /&gt;
&lt;br /&gt;
    -- Remove the initial colon for links where it was specified manually.&lt;br /&gt;
    link = removeInitialColon(link)&lt;br /&gt;
&lt;br /&gt;
    -- Find whether a faux display value has been added with the {{!}} magic&lt;br /&gt;
    -- word.&lt;br /&gt;
    if not display then&lt;br /&gt;
        local prePipe, postPipe = link:match(&amp;#039;^(.-)|(.*)$&amp;#039;)&lt;br /&gt;
        link = prePipe or link&lt;br /&gt;
        display = postPipe&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    -- Find the display value.&lt;br /&gt;
    if not display then&lt;br /&gt;
        local page, section = link:match(&amp;#039;^(.-)#(.*)$&amp;#039;)&lt;br /&gt;
        if page then&lt;br /&gt;
            display = page .. &amp;#039; §&amp;amp;nbsp;&amp;#039; .. section&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    -- Assemble the link.&lt;br /&gt;
    if display then&lt;br /&gt;
        return string.format(&lt;br /&gt;
            &amp;#039;[[:%s|%s]]&amp;#039;,&lt;br /&gt;
            string.gsub(link, &amp;#039;|(.*)$&amp;#039;, &amp;#039;&amp;#039;), --display overwrites manual piping&lt;br /&gt;
            display&lt;br /&gt;
        )&lt;br /&gt;
    else&lt;br /&gt;
        return string.format(&amp;#039;[[:%s]]&amp;#039;, link)&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
-- Hatnote&lt;br /&gt;
--&lt;br /&gt;
-- Produces standard hatnote text. Implements the {{hatnote}} template.&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
function hatnote.hatnote(frame)&lt;br /&gt;
    local args = getArgs(frame)&lt;br /&gt;
    local s = args[1]&lt;br /&gt;
    local options = {}&lt;br /&gt;
    if not s then&lt;br /&gt;
        return hatnote.makeWikitextError(&lt;br /&gt;
            i18n:msg(&amp;#039;error-text&amp;#039;),&lt;br /&gt;
            &amp;#039;w:c:dev:Template:Hatnote#Errors&amp;#039;,&lt;br /&gt;
            args.category&lt;br /&gt;
        )&lt;br /&gt;
    end&lt;br /&gt;
    options.extraclasses = args.extraclasses&lt;br /&gt;
    options.selfref = args.selfref&lt;br /&gt;
    return hatnote._hatnote(s, options)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function hatnote._hatnote(s, options)&lt;br /&gt;
    checkType(&amp;#039;_hatnote&amp;#039;, 1, s, &amp;#039;string&amp;#039;)&lt;br /&gt;
    checkType(&amp;#039;_hatnote&amp;#039;, 2, options, &amp;#039;table&amp;#039;, true)&lt;br /&gt;
    options = options or {}&lt;br /&gt;
    local classes = {&amp;#039;notice&amp;#039;, &amp;#039;hatnote&amp;#039;}&lt;br /&gt;
    local extraclasses = options.extraclasses&lt;br /&gt;
    local selfref = options.selfref&lt;br /&gt;
    if type(extraclasses) == &amp;#039;string&amp;#039; then&lt;br /&gt;
        classes[#classes + 1] = extraclasses&lt;br /&gt;
    end&lt;br /&gt;
    if selfref then&lt;br /&gt;
        classes[#classes + 1] = &amp;#039;selfref&amp;#039;&lt;br /&gt;
    end&lt;br /&gt;
    return string.format(&lt;br /&gt;
        &amp;#039;&amp;lt;div role=&amp;quot;note&amp;quot; class=&amp;quot;%s&amp;quot;&amp;gt;%s&amp;lt;/div&amp;gt;&amp;#039;,&lt;br /&gt;
        table.concat(classes, &amp;#039; &amp;#039;),&lt;br /&gt;
        s&lt;br /&gt;
    )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
--                           Module:Hatnote list                              --&lt;br /&gt;
--                                                                            --&lt;br /&gt;
-- This module produces and formats lists for use in hatnotes. In particular, --&lt;br /&gt;
-- it implements the for-see list, i.e. lists of &amp;quot;For X, see Y&amp;quot; statements,   --&lt;br /&gt;
-- as used in {{about}}, and its variants. Also introduced are andList &amp;amp;      --&lt;br /&gt;
-- orList helpers for formatting lists with those conjunctions.               --&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
-- List stringification helper functions&lt;br /&gt;
--&lt;br /&gt;
-- These functions are used for stringifying lists, usually page lists inside&lt;br /&gt;
-- the &amp;quot;Y&amp;quot; portion of &amp;quot;For X, see Y&amp;quot; for-see items.&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
--default options table used across the list stringification functions&lt;br /&gt;
local stringifyListDefaultOptions = {&lt;br /&gt;
    conjunction = i18n:msg(&amp;#039;conjunction&amp;#039;),&lt;br /&gt;
    separator = i18n:msg(&amp;#039;separator&amp;#039;),&lt;br /&gt;
    altSeparator = i18n:msg(&amp;#039;altSeparator&amp;#039;),&lt;br /&gt;
    space = i18n:msg(&amp;#039;space&amp;#039;),&lt;br /&gt;
    formatted = false&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
-- Stringifies a list generically; probably shouldn&amp;#039;t be used directly&lt;br /&gt;
function stringifyList(list, options)&lt;br /&gt;
    -- Type-checks, defaults, and a shortcut&lt;br /&gt;
    checkType(&amp;quot;stringifyList&amp;quot;, 1, list, &amp;quot;table&amp;quot;)&lt;br /&gt;
    if #list == 0 then return nil end&lt;br /&gt;
    checkType(&amp;quot;stringifyList&amp;quot;, 2, options, &amp;quot;table&amp;quot;, true)&lt;br /&gt;
    options = options or {}&lt;br /&gt;
    for k, v in pairs(stringifyListDefaultOptions) do&lt;br /&gt;
        if options[k] == nil then options[k] = v end&lt;br /&gt;
    end&lt;br /&gt;
    local s = options.space&lt;br /&gt;
    -- Format the list if requested&lt;br /&gt;
    if options.formatted then list = hatnote.formatPages(unpack(list)) end&lt;br /&gt;
    -- Set the separator; if any item contains it, use the alternate separator&lt;br /&gt;
    local separator = options.separator&lt;br /&gt;
    --searches display text only&lt;br /&gt;
    function searchDisp(t, f)&lt;br /&gt;
        return string.find(string.sub(t, (string.find(t, &amp;#039;|&amp;#039;) or 0) + 1), f)&lt;br /&gt;
    end&lt;br /&gt;
    for k, v in pairs(list) do&lt;br /&gt;
        if searchDisp(v, separator) then&lt;br /&gt;
            separator = options.altSeparator&lt;br /&gt;
            break&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
    -- Set the conjunction, apply Oxford comma, and force a comma if #1 has &amp;quot;§&amp;quot;&lt;br /&gt;
    local oxfordLangs = {&lt;br /&gt;
        -- list of languages that does respect oxford commas&lt;br /&gt;
        [&amp;#039;en&amp;#039;] = true,&lt;br /&gt;
        [&amp;#039;en-us&amp;#039;] = true,&lt;br /&gt;
        [&amp;#039;en-gb&amp;#039;] = true,&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    local conjunction = s .. options.conjunction .. s&lt;br /&gt;
    if #list == 2 and searchDisp(list[1], &amp;quot;§&amp;quot;) or #list &amp;gt; 2 then&lt;br /&gt;
        conjunction = (oxfordLangs[i18n.defaultLang] and separator or &amp;#039;&amp;#039;) .. conjunction&lt;br /&gt;
    end&lt;br /&gt;
    -- Return the formatted string&lt;br /&gt;
    return mw.text.listToText(list, separator .. s, conjunction)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--DRY function&lt;br /&gt;
function conjList (conj, list, fmt)&lt;br /&gt;
    return stringifyList(list, {conjunction = conj, formatted = fmt})&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- Stringifies lists with &amp;quot;and&amp;quot; or &amp;quot;or&amp;quot;&lt;br /&gt;
function hatnote.andList (...) return conjList(i18n:msg(&amp;#039;conj-and&amp;#039;), ...) end&lt;br /&gt;
function hatnote.orList (...) return conjList(i18n:msg(&amp;#039;conj-or&amp;#039;), ...) end&lt;br /&gt;
&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
-- For see&lt;br /&gt;
--&lt;br /&gt;
-- Makes a &amp;quot;For X, see [[Y]].&amp;quot; list from raw parameters. Intended for the&lt;br /&gt;
-- {{about}} templates and their variants.&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
--default options table used across the forSee family of functions&lt;br /&gt;
local forSeeDefaultOptions = {&lt;br /&gt;
    andKeyword = i18n:msg(&amp;#039;conj-and&amp;#039;),&lt;br /&gt;
    title = mw.title.getCurrentTitle().text,&lt;br /&gt;
    otherText = i18n:msg(&amp;#039;other-uses&amp;#039;),&lt;br /&gt;
    forSeeForm = i18n:msg(&amp;#039;for&amp;#039;)&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
--Collapses duplicate punctuation&lt;br /&gt;
function punctuationCollapse (text)&lt;br /&gt;
    local replacements = {&lt;br /&gt;
        [&amp;quot;%.%.$&amp;quot;] = &amp;quot;.&amp;quot;,&lt;br /&gt;
        [&amp;quot;%?%.$&amp;quot;] = &amp;quot;?&amp;quot;,&lt;br /&gt;
        [&amp;quot;%!%.$&amp;quot;] = &amp;quot;!&amp;quot;,&lt;br /&gt;
        [&amp;quot;%.%]%]%.$&amp;quot;] = &amp;quot;.]]&amp;quot;,&lt;br /&gt;
        [&amp;quot;%?%]%]%.$&amp;quot;] = &amp;quot;?]]&amp;quot;,&lt;br /&gt;
        [&amp;quot;%!%]%]%.$&amp;quot;] = &amp;quot;!]]&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
    for k, v in pairs(replacements) do text = string.gsub(text, k, v) end&lt;br /&gt;
    return text&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- Structures arguments into a table for stringification, &amp;amp; options&lt;br /&gt;
function hatnote.forSeeArgsToTable (args, from, options)&lt;br /&gt;
    -- Type-checks and defaults&lt;br /&gt;
    checkType(&amp;quot;forSeeArgsToTable&amp;quot;, 1, args, &amp;#039;table&amp;#039;)&lt;br /&gt;
    checkType(&amp;quot;forSeeArgsToTable&amp;quot;, 2, from, &amp;#039;number&amp;#039;, true)&lt;br /&gt;
    from = from or 1&lt;br /&gt;
    checkType(&amp;quot;forSeeArgsToTable&amp;quot;, 3, options, &amp;#039;table&amp;#039;, true)&lt;br /&gt;
    options = options or {}&lt;br /&gt;
    for k, v in pairs(forSeeDefaultOptions) do&lt;br /&gt;
        if options[k] == nil then options[k] = v end&lt;br /&gt;
    end&lt;br /&gt;
    -- maxArg&amp;#039;s gotten manually because getArgs() and table.maxn aren&amp;#039;t friends&lt;br /&gt;
    local maxArg = 0&lt;br /&gt;
    for k, v in pairs(args) do&lt;br /&gt;
        if type(k) == &amp;#039;number&amp;#039; and k &amp;gt; maxArg then maxArg = k end&lt;br /&gt;
    end&lt;br /&gt;
    -- Structure the data out from the parameter list:&lt;br /&gt;
    -- * forTable is the wrapper table, with forRow rows&lt;br /&gt;
    -- * Rows are tables of a &amp;quot;use&amp;quot; string &amp;amp; a &amp;quot;pages&amp;quot; table of pagename strings&lt;br /&gt;
    -- * Blanks are left empty for defaulting elsewhere, but can terminate list&lt;br /&gt;
    local forTable = {}&lt;br /&gt;
    local i = from&lt;br /&gt;
    local terminated = false&lt;br /&gt;
    -- Loop to generate rows&lt;br /&gt;
    repeat&lt;br /&gt;
        -- New empty row&lt;br /&gt;
        local forRow = {}&lt;br /&gt;
        -- On blank use, assume list&amp;#039;s ended &amp;amp; break at end of this loop&lt;br /&gt;
        forRow.use = args[i]&lt;br /&gt;
        if not args[i] then terminated = true end&lt;br /&gt;
        -- New empty list of pages&lt;br /&gt;
        forRow.pages = {}&lt;br /&gt;
        -- Insert first pages item if present&lt;br /&gt;
        table.insert(forRow.pages, args[i + 1])&lt;br /&gt;
        -- If the param after next is &amp;quot;and&amp;quot;, do inner loop to collect params&lt;br /&gt;
        -- until the &amp;quot;and&amp;quot;&amp;#039;s stop. Blanks are ignored: &amp;quot;1|and||and|3&amp;quot; → {1, 3}&lt;br /&gt;
        while args[i + 2] == options.andKeyword do&lt;br /&gt;
            if args[i + 3] then&lt;br /&gt;
                table.insert(forRow.pages, args[i + 3])&lt;br /&gt;
            end&lt;br /&gt;
            -- Increment to next &amp;quot;and&amp;quot;&lt;br /&gt;
            i = i + 2&lt;br /&gt;
        end&lt;br /&gt;
        -- Increment to next use&lt;br /&gt;
        i = i + 2&lt;br /&gt;
        -- Append the row&lt;br /&gt;
        table.insert(forTable, forRow)&lt;br /&gt;
    until terminated or i &amp;gt; maxArg&lt;br /&gt;
&lt;br /&gt;
    return forTable&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- Stringifies a table as formatted by forSeeArgsToTable&lt;br /&gt;
function hatnote.forSeeTableToString (forSeeTable, options)&lt;br /&gt;
    -- Type-checks and defaults&lt;br /&gt;
    checkType(&amp;quot;forSeeTableToString&amp;quot;, 1, forSeeTable, &amp;quot;table&amp;quot;)&lt;br /&gt;
    checkType(&amp;quot;forSeeTableToString&amp;quot;, 2, options, &amp;quot;table&amp;quot;, true)&lt;br /&gt;
    options = options or {}&lt;br /&gt;
    for k, v in pairs(forSeeDefaultOptions) do&lt;br /&gt;
        if options[k] == nil then options[k] = v end&lt;br /&gt;
    end&lt;br /&gt;
    -- Stringify each for-see item into a list&lt;br /&gt;
    local strList = {}&lt;br /&gt;
    for k, v in pairs(forSeeTable) do&lt;br /&gt;
        local useStr = v.use or options.otherText&lt;br /&gt;
        local pagesStr = hatnote.andList(v.pages, true) or&lt;br /&gt;
            hatnote._formatLink(hatnote.disambiguate(options.title))&lt;br /&gt;
        local forSeeStr = string.format(options.forSeeForm, useStr, pagesStr)&lt;br /&gt;
        forSeeStr = punctuationCollapse(forSeeStr)&lt;br /&gt;
        table.insert(strList, forSeeStr)&lt;br /&gt;
    end&lt;br /&gt;
    -- Return the concatenated list&lt;br /&gt;
    return table.concat(strList, i18n:msg(&amp;#039;space&amp;#039;))&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- Produces a &amp;quot;For X, see [[Y]]&amp;quot; string from arguments. Expects index gaps&lt;br /&gt;
-- but not blank/whitespace values. Ignores named args and args &amp;lt; &amp;quot;from&amp;quot;.&lt;br /&gt;
function hatnote._forSee (args, from, options)&lt;br /&gt;
    local forSeeTable = hatnote.forSeeArgsToTable(args, from, options)&lt;br /&gt;
    return hatnote.forSeeTableToString(forSeeTable, options)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- As _forSee, but uses the frame.&lt;br /&gt;
function hatnote.forSee (frame, from, options)&lt;br /&gt;
    return hatnote._forSee(mArguments.getArgs(frame), from, options)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
-- Produces a labelled pages-list hatnote.&lt;br /&gt;
-- The main frame (template definition) takes 1 or 2 arguments, for a singular&lt;br /&gt;
-- and (optionally) plural label respectively:&lt;br /&gt;
-- * {{#invoke:Hatnote|labelledList|Singular label|Plural label}}&lt;br /&gt;
-- The resulting template takes pagename &amp;amp; label parameters normally.&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
-- Defaults global to this module&lt;br /&gt;
local LPLHdefaults = {&lt;br /&gt;
    label = i18n:msg(&amp;#039;see-also&amp;#039;), --Final fallback for label argument&lt;br /&gt;
    labelForm = i18n:msg(&amp;#039;colon&amp;#039;),&lt;br /&gt;
    prefixes = {&amp;#039;label&amp;#039;, &amp;#039;label &amp;#039;, &amp;#039;l&amp;#039;},&lt;br /&gt;
    template = &amp;#039;Module:Hatnote&amp;#039;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
-- Helper function that pre-combines display parameters into page arguments.&lt;br /&gt;
-- Also compresses sparse arrays, as a desirable side-effect.&lt;br /&gt;
function hatnote.preprocessDisplays (args, prefixes)&lt;br /&gt;
    -- Prefixes specify which parameters, in order, to check for display options&lt;br /&gt;
    -- They each have numbers auto-appended, e.g. &amp;#039;label1&amp;#039;, &amp;#039;label 1&amp;#039;, &amp;amp; &amp;#039;l1&amp;#039;&lt;br /&gt;
    prefixes = prefixes or LPLHdefaults.prefixes&lt;br /&gt;
    local pages = {}&lt;br /&gt;
    for k, v in pairs(args) do&lt;br /&gt;
        if type(k) == &amp;#039;number&amp;#039; then&lt;br /&gt;
            local display&lt;br /&gt;
            for i = 1, #prefixes do&lt;br /&gt;
                display = args[prefixes[i] .. k]&lt;br /&gt;
                if display then break end&lt;br /&gt;
            end&lt;br /&gt;
            local page = display and&lt;br /&gt;
                string.format(&amp;#039;%s|%s&amp;#039;, string.gsub(v, &amp;#039;|.*$&amp;#039;, &amp;#039;&amp;#039;), display) or v&lt;br /&gt;
            pages[#pages + 1] = page&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
    return pages&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function hatnote.labelledList (frame)&lt;br /&gt;
    local labels = {frame.args[1] or LPLHdefaults.label}&lt;br /&gt;
    labels[2] = frame.args[2] or labels[1]&lt;br /&gt;
    local template = frame:getParent():getTitle()&lt;br /&gt;
    local args = mArguments.getArgs(frame, {parentOnly = true})&lt;br /&gt;
    local pages = hatnote.preprocessDisplays(args)&lt;br /&gt;
    local options = {&lt;br /&gt;
        extraclasses = frame.args.extraclasses,&lt;br /&gt;
        category = args.category,&lt;br /&gt;
        selfref = frame.args.selfref or args.selfref,&lt;br /&gt;
        template = template&lt;br /&gt;
    }&lt;br /&gt;
    return hatnote._labelledList(pages, labels, options)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function hatnote._labelledList (pages, labels, options)&lt;br /&gt;
    labels = labels or {}&lt;br /&gt;
    if #pages == 0 then&lt;br /&gt;
        return hatnote.makeWikitextError(&lt;br /&gt;
            i18n:msg(&amp;#039;error-pagename&amp;#039;, 2),&lt;br /&gt;
            (options.template or LPLHdefaults.template) .. &amp;#039;#Errors&amp;#039;,&lt;br /&gt;
            options.category&lt;br /&gt;
        )&lt;br /&gt;
    end&lt;br /&gt;
    label = (#pages == 1 and labels[1] or labels[2]) or LPLHdefaults.label&lt;br /&gt;
    local text = string.format(&lt;br /&gt;
        options.labelForm or LPLHdefaults.labelForm,&lt;br /&gt;
        label,&lt;br /&gt;
        hatnote.andList(pages, true)&lt;br /&gt;
    )&lt;br /&gt;
    local hnOptions = {&lt;br /&gt;
        extraclasses = options.extraclasses,&lt;br /&gt;
        selfref = options.selfref&lt;br /&gt;
    }&lt;br /&gt;
    return hatnote._hatnote(text, hnOptions)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
-- About&lt;br /&gt;
--&lt;br /&gt;
-- These functions implement the {{about}} hatnote template.&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
function hatnote.about (frame)&lt;br /&gt;
    -- A passthrough that gets args from the frame and all&lt;br /&gt;
    args = mArguments.getArgs(frame)&lt;br /&gt;
    return hatnote._about(args)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
function hatnote._about (args, options)&lt;br /&gt;
    -- Produces &amp;quot;about&amp;quot; hatnote.&lt;br /&gt;
&lt;br /&gt;
    -- Type checks and defaults&lt;br /&gt;
    checkType(&amp;#039;_about&amp;#039;, 1, args, &amp;#039;table&amp;#039;, true)&lt;br /&gt;
    args = args or {}&lt;br /&gt;
    checkType(&amp;#039;_about&amp;#039;, 2, options, &amp;#039;table&amp;#039;, true)&lt;br /&gt;
    options = options or {}&lt;br /&gt;
    local defaultOptions = {&lt;br /&gt;
        aboutForm = i18n:msg(&amp;#039;about&amp;#039;, mw.title.getCurrentTitle().namespace),&lt;br /&gt;
        defaultPageType = i18n:msg(&amp;#039;page&amp;#039;),&lt;br /&gt;
        namespace = mw.title.getCurrentTitle().namespace,&lt;br /&gt;
        otherText = nil, --included for complete list&lt;br /&gt;
        pageTypesByNamespace = {&lt;br /&gt;
            [0] =  i18n:msg(&amp;#039;pagetype-0&amp;#039;),&lt;br /&gt;
            [14] = i18n:msg(&amp;#039;pagetype-14&amp;#039;)&lt;br /&gt;
        },&lt;br /&gt;
        sectionString = i18n:msg(&amp;#039;section&amp;#039;)&lt;br /&gt;
    }&lt;br /&gt;
    for k, v in pairs(defaultOptions) do&lt;br /&gt;
        if options[k] == nil then options[k] = v end&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    -- Set initial &amp;quot;about&amp;quot; string&lt;br /&gt;
    local pageType = (args.section and options.sectionString) or&lt;br /&gt;
        options.pageTypesByNamespace[options.namespace] or&lt;br /&gt;
        options.defaultPageType&lt;br /&gt;
    local about = &amp;#039;&amp;#039;&lt;br /&gt;
    if args[1] then&lt;br /&gt;
        about = string.format(options.aboutForm, pageType, args[1])&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    --Allow passing through certain options&lt;br /&gt;
    local fsOptions = {&lt;br /&gt;
        otherText = options.otherText&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    -- Set for-see list&lt;br /&gt;
    local forSee = i18n:msg(&amp;#039;space&amp;#039;) .. hatnote._forSee(args, 2, fsOptions)&lt;br /&gt;
&lt;br /&gt;
    -- Concatenate and return&lt;br /&gt;
    return hatnote._hatnote(about .. forSee, {extraclasses = &amp;#039;context-link about dablink&amp;#039;})&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
-- Details&lt;br /&gt;
--&lt;br /&gt;
-- These functions implement the {{details}} hatnote template.&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
function hatnote.details (frame)&lt;br /&gt;
    local args = mArguments.getArgs(frame, {parentOnly = true})&lt;br /&gt;
    local topic, category = args.topic, args.category&lt;br /&gt;
    local options = {&lt;br /&gt;
        selfref = args.selfref,&lt;br /&gt;
        extraclasses = &amp;#039;context-link details dablink&amp;#039;&lt;br /&gt;
    }&lt;br /&gt;
    args = mTableTools.compressSparseArray(args)&lt;br /&gt;
    if #args == 0 then&lt;br /&gt;
        return hatnote.makeWikitextError(&lt;br /&gt;
            i18n:msg(&amp;#039;error-pagename&amp;#039;),&lt;br /&gt;
            &amp;#039;w:c:dev:Template:Details#Errors&amp;#039;,-- another undocumented thing&lt;br /&gt;
            category&lt;br /&gt;
        )&lt;br /&gt;
    end&lt;br /&gt;
    return hatnote._details(args, topic, options)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function hatnote._details (list, topic, options)&lt;br /&gt;
    list = hatnote.andList(list, true)&lt;br /&gt;
    topic = topic or i18n:msg(&amp;#039;topic&amp;#039;)&lt;br /&gt;
    local text = string.format(i18n:msg(&amp;#039;details&amp;#039;), topic, list)&lt;br /&gt;
    return hatnote._hatnote(text, options)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
-- For&lt;br /&gt;
--&lt;br /&gt;
-- These functions implement the {{for}} hatnote template.&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
function hatnote.For (frame)&lt;br /&gt;
    return hatnote._For(mArguments.getArgs(frame))&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--Implements {{For}} but takes a manual arguments table&lt;br /&gt;
function hatnote._For (args)&lt;br /&gt;
    local use = args[1]&lt;br /&gt;
    local category = &amp;#039;&amp;#039;&lt;br /&gt;
    if (not use or use == i18n:msg(&amp;#039;other-uses&amp;#039;)) and&lt;br /&gt;
        (not args.category or yesno(args.category)) then&lt;br /&gt;
        category = &amp;#039;[[Category:&amp;#039; .. i18n:msg(&amp;#039;cat-unusual-parameters&amp;#039;) .. &amp;#039;]]&amp;#039;&lt;br /&gt;
    end&lt;br /&gt;
    local pages = {}&lt;br /&gt;
    function two (a, b) return a, b, 1 end --lets us run ipairs from 2&lt;br /&gt;
    for k, v in two(ipairs(args)) do table.insert(pages, v) end&lt;br /&gt;
    return hatnote._hatnote(&lt;br /&gt;
        hatnote.forSeeTableToString({{use = use, pages = pages}}),&lt;br /&gt;
        {selfref = args.selfref}&lt;br /&gt;
    ) .. category&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
-- Further&lt;br /&gt;
--&lt;br /&gt;
-- These functions implement the {{further}} hatnote template.&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
function hatnote.further(frame)&lt;br /&gt;
    local args = mArguments.getArgs(frame, {parentOnly = true})&lt;br /&gt;
    local pages = mTableTools.compressSparseArray(args)&lt;br /&gt;
    if #pages &amp;lt; 1 then&lt;br /&gt;
        return hatnote.makeWikitextError(&lt;br /&gt;
            i18n:msg(&amp;#039;error-pagename&amp;#039;, 2),&lt;br /&gt;
            &amp;#039;w:c:dev:Template:Further#Errors&amp;#039;,-- undocumented thing #3&lt;br /&gt;
            args.category&lt;br /&gt;
        )&lt;br /&gt;
    end&lt;br /&gt;
    local options = {&lt;br /&gt;
        selfref = args.selfref,&lt;br /&gt;
        extraclasses = &amp;#039;context-link further dablink&amp;#039;&lt;br /&gt;
    }&lt;br /&gt;
    return hatnote._further(pages, options)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function hatnote._further(pages, options)&lt;br /&gt;
    local text = i18n:msg(&amp;#039;further2&amp;#039;) .. hatnote.andList(pages, true)&lt;br /&gt;
    return hatnote._hatnote(text, options)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
-- Main&lt;br /&gt;
--&lt;br /&gt;
-- These functions implement the {{main}} hatnote template.&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
function hatnote.main(frame)&lt;br /&gt;
    local args = mArguments.getArgs(frame, {parentOnly = true})&lt;br /&gt;
    local pages = {}&lt;br /&gt;
    for k, v in pairs(args) do&lt;br /&gt;
        if type(k) == &amp;#039;number&amp;#039; then&lt;br /&gt;
            local display = args[&amp;#039;label &amp;#039; .. k] or args[&amp;#039;l&amp;#039; .. k]&lt;br /&gt;
            local page = display and&lt;br /&gt;
                string.format(&amp;#039;%s|%s&amp;#039;, string.gsub(v, &amp;#039;|.*$&amp;#039;, &amp;#039;&amp;#039;), display) or v&lt;br /&gt;
            pages[#pages + 1] = page&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
    if #pages == 0 and mw.title.getCurrentTitle().namespace == 0 then&lt;br /&gt;
        return hatnote.makeWikitextError(&lt;br /&gt;
            i18n:msg(&amp;#039;error-pagename&amp;#039;, 2),&lt;br /&gt;
            &amp;#039;w:c:dev:Template:Main#Errors&amp;#039;,-- undocumented thing #4&lt;br /&gt;
            args.category&lt;br /&gt;
        )&lt;br /&gt;
    end&lt;br /&gt;
    local options = {&lt;br /&gt;
        selfref = args.selfref&lt;br /&gt;
    }&lt;br /&gt;
    return hatnote._main(pages, options)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function hatnote._main(args, options)&lt;br /&gt;
    -- Get the list of pages. If no first page was specified we use the current&lt;br /&gt;
    -- page name.&lt;br /&gt;
    local currentTitle = mw.title.getCurrentTitle()&lt;br /&gt;
    if #args == 0 then args = {currentTitle.text} end&lt;br /&gt;
    local firstPage = string.gsub(args[1], &amp;#039;|.*$&amp;#039;, &amp;#039;&amp;#039;)&lt;br /&gt;
    -- Make the formatted link text&lt;br /&gt;
    list = hatnote.andList(args, true)&lt;br /&gt;
    -- Build the text.&lt;br /&gt;
    local isPlural = #args &amp;gt; 1&lt;br /&gt;
    -- Find the pagetype.&lt;br /&gt;
    local pageType = hatnote.findNamespaceId(firstPage) == 0 and i18n:msg(&amp;#039;article&amp;#039;, isPlural and 2 or 1) or i18n:msg(&amp;#039;page&amp;#039;, isPlural and 2 or 1)&lt;br /&gt;
    local mainForm&lt;br /&gt;
    local curNs = currentTitle.namespace&lt;br /&gt;
    if (curNs == 14) or (curNs == 15) then --category/talk namespaces&lt;br /&gt;
        mainForm = isPlural and i18n:msg(&amp;#039;main-category&amp;#039;, 2)&lt;br /&gt;
         or&lt;br /&gt;
         i18n:msg(&amp;#039;main-category&amp;#039;, 1)&lt;br /&gt;
    else&lt;br /&gt;
        mainForm = isPlural and i18n:msg(&amp;#039;main&amp;#039;, 2) or i18n:msg(&amp;#039;main&amp;#039;, 1)&lt;br /&gt;
    end&lt;br /&gt;
    local text = string.format(mainForm, pageType, list)&lt;br /&gt;
    options = options or {}&lt;br /&gt;
    local hnOptions = {&lt;br /&gt;
        selfref = options.selfref,&lt;br /&gt;
        extraclasses = &amp;#039;context-link main dablink&amp;#039;&lt;br /&gt;
    }&lt;br /&gt;
    return hatnote._hatnote(text, hnOptions)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
-- See also&lt;br /&gt;
--&lt;br /&gt;
-- These functions implement the {{see also}} hatnote template.&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
function hatnote.seeAlso(frame)&lt;br /&gt;
    local args = mArguments.getArgs(frame, {parentOnly = true})&lt;br /&gt;
    local pages = {}&lt;br /&gt;
    for k, v in pairs(args) do&lt;br /&gt;
        if type(k) == &amp;#039;number&amp;#039; then&lt;br /&gt;
            local display = args[&amp;#039;label &amp;#039; .. k] or args[&amp;#039;l&amp;#039; .. k]&lt;br /&gt;
            local page = display and&lt;br /&gt;
                string.format(&amp;#039;%s|%s&amp;#039;, string.gsub(v, &amp;#039;|.*$&amp;#039;, &amp;#039;&amp;#039;), display) or v&lt;br /&gt;
            pages[#pages + 1] = page&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
    if not pages[1] then&lt;br /&gt;
        return hatnote.makeWikitextError(&lt;br /&gt;
            i18n:msg(&amp;#039;error-pagename&amp;#039;, 2),&lt;br /&gt;
            &amp;#039;w:c:dev:Template:See also#Errors&amp;#039;,-- undocumented thing #5&lt;br /&gt;
            args.category&lt;br /&gt;
        )&lt;br /&gt;
    end&lt;br /&gt;
    local options = {&lt;br /&gt;
        selfref = args.selfref&lt;br /&gt;
    }&lt;br /&gt;
    return hatnote._seeAlso(pages, options)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function hatnote._seeAlso(args, options)&lt;br /&gt;
    checkType(&amp;#039;_seeAlso&amp;#039;, 1, args, &amp;#039;table&amp;#039;)&lt;br /&gt;
    checkType(&amp;#039;_seeAlso&amp;#039;, 2, options, &amp;#039;table&amp;#039;, true)&lt;br /&gt;
    options = options or {}&lt;br /&gt;
    local list = hatnote.andList(args, true)&lt;br /&gt;
    local text = string.format(i18n:msg(&amp;#039;see-also2&amp;#039;), list)&lt;br /&gt;
    -- Pass options through.&lt;br /&gt;
    local hnOptions = {&lt;br /&gt;
        selfref = options.selfref,&lt;br /&gt;
        extraclasses = &amp;#039;context-link seealso dablink&amp;#039;&lt;br /&gt;
    }&lt;br /&gt;
    return hatnote._hatnote(text, hnOptions)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
hatnote[&amp;#039;for&amp;#039;] = hatnote.For&lt;br /&gt;
&lt;br /&gt;
return hatnote&lt;/div&gt;</summary>
		<author><name>Stevium</name></author>
	</entry>
</feed>