World Library  
Flag as Inappropriate
Email this Article

Demographics of New York

Article Id: WHEBN0009430314
Reproduction Date:

Title: Demographics of New York  
Author: World Heritage Encyclopedia
Language: English
Subject: New York, Demographics of New York, Crime in New York, Executive Chamber of Andrew Cuomo, Bibliography of New York
Collection:
Publisher: World Heritage Encyclopedia
Publication
Date:
 

Demographics of New York

New York population distribution
Historical population of NY

According to the U.S. Census Bureau, as of 2010, New York was the third largest state in population after California and Texas, with a population of 19,378,102, an increase of over 400,000 people, or 2.1%, since the year 2000.[1] The population change between 2000-2006 includes a natural increase of 601,779 people (1,576,125 births minus 974,346 deaths) and a decrease due to net migration of 422,481 people out of the state. Immigration from outside the United States resulted in a net increase of 820,388 people, and migration within the country produced a net loss of about 800,213. This means a very small population change for the state.

The distribution of change in population growth is uneven in New York State; the New York City metropolitan area is growing considerably, along with Saratoga County, while most of Western New York is nearly stagnant. According to immigration statistics, the state is a leading recipient of migrants from around the globe. Between 2005 and 2005, immigration failed to surpass emigration, a trend that was reversed since 2006. New York State lost two house seats in the 2011 congressional reapportionment, secondary to relatively slow growth when compared to the rest of the United States.

The center of population of New York is located in Orange County, in the town of Deerpark. Roughly 64% of the state's population lives in the New York City metropolitan area and 53% in New York City alone.[2]

The Manhattan Chinatown (紐約華埠). Chinese people constitute the fastest-growing demographic nationality in New York State.[3][4][5]

Population


New York State has a primarily urban population. The largest city in the state is New York City, which is also one of the world's most ethnically diverse and cosmopolitan cities. Additional major urban centers include Albany, Buffalo, Rochester and Syracuse. The state has 62 counties; the most populated one is Kings County (Brooklyn).

As of the 2010 census, New York State has a population of 19,378,102, including 12,740,974 (65.7%) white, 3,073,800 (15.9%) black, 1,420,244 (7.3%) Asian, 8,766 (0.0%) Pacific Islander, and 1,441,563 (7.4%) of other races. 585,849 (3.0%) has two or more races. Hispanics and Latinos of all races make up 3,416,922 (17.6%) of the state's population; non-Hispanic whites make up 58.3% of the state's population.

According to 2004 estimates, 20.4% of the population was foreign-born. Among cities in New York State, 36% of New York City's population is foreign-born; this figure of approximately 3 million is a higher total number of foreign-born residents than any other U.S. city. The top ancestry groups in New York State are Italian American (15.8%), African American (14.4%), Hispanic (14.2%), Irish (12.9%), German (11.1%), English (6%), and Polish (5.27%). 1.5% of the state population is multiracial.

New York contains the largest Puerto Rican population in the country, concentrated in parts of New York City such as the Bronx, Brooklyn, and Manhattan. New York also has the largest Dominican population in the country, concentrated in New York City's Upper Manhattan and the Bronx. New York City is home to many blacks, the majority with roots in the United States but a group which includes those with roots in Caribbean Islands like Jamaica and Haiti, as well as recent immigrants from Sub-Saharan African countries. The Bronx has a large population of blacks of Latin American origin, but so does northern Manhattan (Harlem) and Brooklyn which had American-born black majorities since the 1920s, as well the largest African American population of any state. New York City has 1 million of New York State's 1.4 million Asian Americans. At 520,000 of New York State's over 600,000 Chinese Americans, New York City has a higher total number of Chinese Americans than Los Angeles County. New York also has the highest and growing proportion of Pakistani Americans and Bangladeshi Americans in the country, and a very high Indian American community, mainly concentrated in New York City. Unlike New York City, smaller cities in Upstate New York, especially Western New York, are not as diverse. Cities such as Buffalo and Rochester are predominantly made of African Americans, Puerto Ricans, and ethnic European whites.

Among New York State's cities, as of 2010, New York City is 44% white, 28% Latino, 25% African American, and 13% percent Asian American. The city of Buffalo, New York state's second-largest city, is 50% white (45% non-Hispanic white), 38% African American, 10% Latino, and 3% Asian American. The state capital of Albany is 57% white (54% non-Hispanic white), 30% African American, 8% Latino, and 5% Asian American.

Demographics from the 2000 census

New York ethnic distribution

In the 2000 Census, Italian Americans make up the largest ancestral group in Staten Island and Long Island, followed by Irish Americans and Polish Americans. Manhattan's leading ancestry group is Dominicans since the 2000 census, followed by Irish Americans, then Italian Americans and more than 200 nationalities are counted, plus comparably large numbers of residents with Dutch, Portuguese, Greek, Russian, and Swedish ancestry. Albany and southeast-central New York are heavily Irish American and Italian American. In Buffalo and western New York, German Americans are the largest group along with Polish Americans and other Slavic nationalities; in the northern tip of the state, French Canadians. New York State has a higher number of Italian-Americans than any other U.S. state. New York City is also said to be home to two million of Italian descent alone. NYC was once called the largest German, Greek, Irish, Italian, Polish and Russian communities outside their representative countries of origin. require('Module:No globals')

local p = {}

-- articles in which traditional Chinese preceeds simplified Chinese local t1st = { ["228 Incident"] = true, ["Chinese calendar"] = true, ["Lippo Centre, Hong Kong"] = true, ["Republic of China"] = true, ["Republic of China at the 1924 Summer Olympics"] = true, ["Taiwan"] = true, ["Taiwan (island)"] = true, ["Taiwan Province"] = true, ["Wei Boyang"] = true, }

-- the labels for each part local labels = { ["c"] = "Chinese", ["s"] = "simplified Chinese", ["t"] = "traditional Chinese", ["p"] = "pinyin", ["tp"] = "Tongyong Pinyin", ["w"] = "Wade–Giles", ["j"] = "Jyutping", ["cy"] = "Cantonese Yale", ["poj"] = "Pe̍h-ōe-jī", ["zhu"] = "Zhuyin Fuhao", ["l"] = "literally", }

-- article titles for wikilinks for each part local wlinks = { ["c"] = "Chinese language", ["s"] = "simplified Chinese characters", ["t"] = "traditional Chinese characters", ["p"] = "pinyin", ["tp"] = "Tongyong Pinyin", ["w"] = "Wade–Giles", ["j"] = "Jyutping", ["cy"] = "Yale romanization of Cantonese", ["poj"] = "Pe̍h-ōe-jī", ["zhu"] = "Bopomofo", }

-- for those parts which are to be treated as languages their ISO code local ISOlang = { ["c"] = "zh", ["t"] = "zh-Hant", ["s"] = "zh-Hans", ["p"] = "zh-Latn-pinyin", ["tp"] = "zh-Latn", ["w"] = "zh-Latn-wadegile", ["j"] = "yue-jyutping", ["cy"] = "yue", ["poj"] = "hak", ["zhu"] = "zh-Bopo", }

local italic = { ["p"] = true, ["tp"] = true, ["w"] = true, ["j"] = true, ["cy"] = true, ["poj"] = true, } -- Categories for different kinds of Chinese text local cats = { ["c"] = "", ["s"] = "", ["t"] = "", }

function p.Zh(frame) -- load arguments module to simplify handling of args local getArgs = require('Module:Arguments').getArgs local args = getArgs(frame) return p._Zh(args) end function p._Zh(args) local uselinks = not (args["links"] == "no") -- whether to add links local uselabels = not (args["labels"] == "no") -- whether to have labels local capfirst = args["scase"] ~= nil

        local t1 = false -- whether traditional Chinese characters go first
        local j1 = false -- whether Cantonese Romanisations go first
        local testChar
        if (args["first"]) then
                 for testChar in mw.ustring.gmatch(args["first"], "%a+") do
          if (testChar == "t") then
           t1 = true
           end
          if (testChar == "j") then
           j1 = true
           end
         end
        end
        if (t1 == false) then
         local title = mw.title.getCurrentTitle()
         t1 = t1st[title.text] == true
        end

-- based on setting/preference specify order local orderlist = {"c", "s", "t", "p", "tp", "w", "j", "cy", "poj", "zhu", "l"} if (t1) then orderlist[2] = "t" orderlist[3] = "s" end if (j1) then orderlist[4] = "j" orderlist[5] = "cy" orderlist[6] = "p" orderlist[7] = "tp" orderlist[8] = "w" end -- rename rules. Rules to change parameters and labels based on other parameters if args["hp"] then -- hp an alias for p ([hanyu] pinyin) args["p"] = args["hp"] end if args["tp"] then -- if also Tongyu pinyin use full name for Hanyu pinyin labels["p"] = "Hanyu Pinyin" end if (args["s"] and args["s"] == args["t"]) then -- Treat simplified + traditional as Chinese if they're the same args["c"] = args["s"] args["s"] = nil args["t"] = nil elseif (not (args["s"] and args["t"])) then -- use short label if only one of simplified and traditional labels["s"] = labels["c"] labels["t"] = labels["c"] end local body = "" -- the output string local params -- for creating HTML spans local label -- the label, i.e. the bit preceeding the supplied text local val -- the supplied text -- go through all possible fields in loop, adding them to the output for i, part in ipairs(orderlist) do if (args[part]) then -- build label label = "" if (uselabels) then label = labels[part] if (capfirst) then label = mw.language.getContentLanguage():ucfirst(

Sometimes classified an ethnic group by some demographers and sometimes as a religious identity (Judaism), American Jews of various nationalities and various denominations, but most are American-born, are a major social presence in New York. An estimated 1 to 2 million alone in New York City and another 1 to 1.5 million live in surrounding areas, sometimes New York is referred to as the "world's largest Jewish city" since the mid-19th century. The first wave of Jewish immigrants in New York are of Sephardic origin, a scant 10,000 from the Netherlands, Italy, Spain and Portugal in the 17th and 18th centuries, but in the 19th century more newcomers were first German and finally in the early 20th century millions from Eastern Europe like Poland and Russia, both of Ashkenazi origin. In the late 20th century, a smaller wave of Russian Jews and Ukrainian Jews settled in the Brighton Beach section in Brooklyn, and New York has many Israeli-American residents. require('Module:No globals')

local p = {}

-- articles in which traditional Chinese preceeds simplified Chinese local t1st = { ["228 Incident"] = true, ["Chinese calendar"] = true, ["Lippo Centre, Hong Kong"] = true, ["Republic of China"] = true, ["Republic of China at the 1924 Summer Olympics"] = true, ["Taiwan"] = true, ["Taiwan (island)"] = true, ["Taiwan Province"] = true, ["Wei Boyang"] = true, }

-- the labels for each part local labels = { ["c"] = "Chinese", ["s"] = "simplified Chinese", ["t"] = "traditional Chinese", ["p"] = "pinyin", ["tp"] = "Tongyong Pinyin", ["w"] = "Wade–Giles", ["j"] = "Jyutping", ["cy"] = "Cantonese Yale", ["poj"] = "Pe̍h-ōe-jī", ["zhu"] = "Zhuyin Fuhao", ["l"] = "literally", }

-- article titles for wikilinks for each part local wlinks = { ["c"] = "Chinese language", ["s"] = "simplified Chinese characters", ["t"] = "traditional Chinese characters", ["p"] = "pinyin", ["tp"] = "Tongyong Pinyin", ["w"] = "Wade–Giles", ["j"] = "Jyutping", ["cy"] = "Yale romanization of Cantonese", ["poj"] = "Pe̍h-ōe-jī", ["zhu"] = "Bopomofo", }

-- for those parts which are to be treated as languages their ISO code local ISOlang = { ["c"] = "zh", ["t"] = "zh-Hant", ["s"] = "zh-Hans", ["p"] = "zh-Latn-pinyin", ["tp"] = "zh-Latn", ["w"] = "zh-Latn-wadegile", ["j"] = "yue-jyutping", ["cy"] = "yue", ["poj"] = "hak", ["zhu"] = "zh-Bopo", }

local italic = { ["p"] = true, ["tp"] = true, ["w"] = true, ["j"] = true, ["cy"] = true, ["poj"] = true, } -- Categories for different kinds of Chinese text local cats = { ["c"] = "", ["s"] = "", ["t"] = "", }

function p.Zh(frame) -- load arguments module to simplify handling of args local getArgs = require('Module:Arguments').getArgs local args = getArgs(frame) return p._Zh(args) end function p._Zh(args) local uselinks = not (args["links"] == "no") -- whether to add links local uselabels = not (args["labels"] == "no") -- whether to have labels local capfirst = args["scase"] ~= nil

        local t1 = false -- whether traditional Chinese characters go first
        local j1 = false -- whether Cantonese Romanisations go first
        local testChar
        if (args["first"]) then
                 for testChar in mw.ustring.gmatch(args["first"], "%a+") do
          if (testChar == "t") then
           t1 = true
           end
          if (testChar == "j") then
           j1 = true
           end
         end
        end
        if (t1 == false) then
         local title = mw.title.getCurrentTitle()
         t1 = t1st[title.text] == true
        end

-- based on setting/preference specify order local orderlist = {"c", "s", "t", "p", "tp", "w", "j", "cy", "poj", "zhu", "l"} if (t1) then orderlist[2] = "t" orderlist[3] = "s" end if (j1) then orderlist[4] = "j" orderlist[5] = "cy" orderlist[6] = "p" orderlist[7] = "tp" orderlist[8] = "w" end -- rename rules. Rules to change parameters and labels based on other parameters if args["hp"] then -- hp an alias for p ([hanyu] pinyin) args["p"] = args["hp"] end if args["tp"] then -- if also Tongyu pinyin use full name for Hanyu pinyin labels["p"] = "Hanyu Pinyin" end if (args["s"] and args["s"] == args["t"]) then -- Treat simplified + traditional as Chinese if they're the same args["c"] = args["s"] args["s"] = nil args["t"] = nil elseif (not (args["s"] and args["t"])) then -- use short label if only one of simplified and traditional labels["s"] = labels["c"] labels["t"] = labels["c"] end local body = "" -- the output string local params -- for creating HTML spans local label -- the label, i.e. the bit preceeding the supplied text local val -- the supplied text -- go through all possible fields in loop, adding them to the output for i, part in ipairs(orderlist) do if (args[part]) then -- build label label = "" if (uselabels) then label = labels[part] if (capfirst) then label = mw.language.getContentLanguage():ucfirst(

The intense development, urbanization and suburban sprawl of New York City makes it the most populated region in the U.S., an estimated 20 to 30 million in the eight-state Megalopolis stretching 500 miles from Boston to Washington DC, with New York City in the middle has 15 million residents in a 100-mile radius including Philadelphia (1.5 million in its city limits), northern New Jersey and Connecticut. The bulk of New York's population lives within two hours of New York City. According to the July 1, 2004 Census Bureau Estimate,[6] New York City and its six closest New York State satellite counties (Suffolk, Nassau, Westchester, Rockland, Putnam and Orange) have a combined population of 12,626,200 people, or 65.67% of the state's population.

According to the 2000 U.S. Census, 13.61% of the population aged 5 and older speak Spanish at home, while 2.04% speak Chinese (including Cantonese and Mandarin), 1.65% Italian, and 1.23% Russian [1]. In age demographics: 6.5% of New York's population were under 5 years of age, 24.7% under 18, and 12.9% were 65 or older. Females made up 51.8% of the population. New York state has a fluctuating population growth rate, it has experienced some shrinkage in the 1970s and 1980s, but milder growth in the 1990s and the first decade of the 21st century.

Languages

The most common American English accents spoken, besides General American English, were the New York City area dialect (including New York Latino English and North Jersey English,) Hudson Valley English (including the Western New England accent around Albany,) and Inland Northern American English from the Buffalo and upstate New York area.

As of 2010, 70.72% (12,788,233) of New York residents age 5 and older spoke English at home as a primary language, while 14.44% (2,611,903) spoke Spanish, 2.61% (472,955) Chinese (which includes Cantonese and Mandarin), 1.20% (216,468) Russian, 1.18% (213,785) Italian, 0.79% (142,169) French Creole, 0.75% (135,789) French, 0.67% (121,917) Yiddish, 0.63% (114,574) Korean, and Polish was spoken as a main language by 0.53% (95,413) of the population over the age of five. In total, 29.28% (5,295,016) of New York's population age 5 and older spoke a mother language other than English.[7]

Top 10 Non-English Languages Spoken in New York
Language Percentage of population
(as of 2010)[7]
Spanish 14.44%
Chinese (including Cantonese and Mandarin) 2.61%
Russian 1.20%
Italian 1.18%
French Creole 0.79%
French 0.75%
Yiddish 0.67%
Korean 50%
Polish 0.53%
Bengali 0.43%

Religions

A 2007 survey found that [8] the religious affiliations of the people of New York were:

1% of the people surveyed refused to answer.

See also

References


-- Module:Hatnote -- -- -- -- This module produces hatnote links and links to related articles. It -- -- implements the and meta-templates and includes -- -- helper functions for other Lua hatnote modules. --


local libraryUtil = require('libraryUtil') local checkType = libraryUtil.checkType local mArguments -- lazily initialise Module:Arguments local yesno -- lazily initialise Module:Yesno

local p = {}


-- Helper functions


local function getArgs(frame) -- Fetches the arguments from the parent frame. Whitespace is trimmed and -- blanks are removed. mArguments = require('Module:Arguments') return mArguments.getArgs(frame, {parentOnly = true}) end

local function removeInitialColon(s) -- Removes the initial colon from a string, if present. return s:match('^:?(.*)') end

function p.findNamespaceId(link, removeColon) -- Finds the namespace id (namespace number) of a link or a pagename. This -- function will not work if the link is enclosed in double brackets. Colons -- are trimmed from the start of the link by default. To skip colon -- trimming, set the removeColon parameter to true. checkType('findNamespaceId', 1, link, 'string') checkType('findNamespaceId', 2, removeColon, 'boolean', true) if removeColon ~= false then link = removeInitialColon(link) end local namespace = link:match('^(.-):') if namespace then local nsTable = mw.site.namespaces[namespace] if nsTable then return nsTable.id end end return 0 end

function p.formatPages(...) -- Formats a list of pages using formatLink and returns it as an array. Nil -- values are not allowed. local pages = {...} local ret = {} for i, page in ipairs(pages) do ret[i] = p._formatLink(page) end return ret end

function p.formatPageTables(...) -- Takes a list of page/display tables and returns it as a list of -- formatted links. Nil values are not allowed. local pages = {...} local links = {} for i, t in ipairs(pages) do checkType('formatPageTables', i, t, 'table') local link = t[1] local display = t[2] links[i] = p._formatLink(link, display) end return links end

function p.makeWikitextError(msg, helpLink, addTrackingCategory) -- Formats an error message to be returned to wikitext. If -- addTrackingCategory is not false after being returned from -- Module:Yesno, and if we are not on a talk page, a tracking category -- is added. checkType('makeWikitextError', 1, msg, 'string') checkType('makeWikitextError', 2, helpLink, 'string', true) yesno = require('Module:Yesno') local title = mw.title.getCurrentTitle() -- Make the help link text. local helpText if helpLink then helpText = ' (help)' else helpText = end -- Make the category text. local category if not title.isTalkPage and yesno(addTrackingCategory) ~= false then category = 'Hatnote templates with errors' category = string.format( '%s:%s', mw.site.namespaces[14].name, category ) else category = end return string.format( '%s', msg, helpText, category ) end


-- Format link -- -- Makes a wikilink from the given link and display values. Links are escaped -- with colons if necessary, and links to sections are detected and displayed -- with " § " as a separator rather than the standard MediaWiki "#". Used in -- the template.


function p.formatLink(frame) local args = getArgs(frame) local link = args[1] local display = args[2] if not link then return p.makeWikitextError( 'no link specified', 'Template:Format hatnote link#Errors', args.category ) end return p._formatLink(link, display) end

function p._formatLink(link, display) -- Find whether we need to use the colon trick or not. We need to use the -- colon trick for categories and files, as otherwise category links -- categorise the page and file links display the file. checkType('_formatLink', 1, link, 'string') checkType('_formatLink', 2, display, 'string', true) link = removeInitialColon(link) local namespace = p.findNamespaceId(link, false) local colon if namespace == 6 or namespace == 14 then colon = ':' else colon = end -- Find whether a faux display value has been added with the | magic -- word. if not display then local prePipe, postPipe = link:match('^(.-)|(.*)$') link = prePipe or link display = postPipe end -- Find the display value. if not display then local page, section = link:match('^(.-)#(.*)$') if page then display = page .. ' § ' .. section end end -- Assemble the link. if display then return string.format('%s', colon, link, display) else return string.format('%s%s', colon, link) end end


-- Hatnote -- -- Produces standard hatnote text. Implements the template.


function p.hatnote(frame) local args = getArgs(frame) local s = args[1] local options = {} if not s then return p.makeWikitextError( 'no text specified', 'Template:Hatnote#Errors', args.category ) end options.extraclasses = args.extraclasses options.selfref = args.selfref return p._hatnote(s, options) end

function p._hatnote(s, options) checkType('_hatnote', 1, s, 'string') checkType('_hatnote', 2, options, 'table', true) local classes = {'hatnote'} local extraclasses = options.extraclasses local selfref = options.selfref if type(extraclasses) == 'string' then classes[#classes + 1] = extraclasses end if selfref then classes[#classes + 1] = 'selfref' end return string.format( '
%s
', table.concat(classes, ' '), s )

end

return p-------------------------------------------------------------------------------- -- Module:Hatnote -- -- -- -- This module produces hatnote links and links to related articles. It -- -- implements the and meta-templates and includes -- -- helper functions for other Lua hatnote modules. --


local libraryUtil = require('libraryUtil') local checkType = libraryUtil.checkType local mArguments -- lazily initialise Module:Arguments local yesno -- lazily initialise Module:Yesno

local p = {}


-- Helper functions


local function getArgs(frame) -- Fetches the arguments from the parent frame. Whitespace is trimmed and -- blanks are removed. mArguments = require('Module:Arguments') return mArguments.getArgs(frame, {parentOnly = true}) end

local function removeInitialColon(s) -- Removes the initial colon from a string, if present. return s:match('^:?(.*)') end

function p.findNamespaceId(link, removeColon) -- Finds the namespace id (namespace number) of a link or a pagename. This -- function will not work if the link is enclosed in double brackets. Colons -- are trimmed from the start of the link by default. To skip colon -- trimming, set the removeColon parameter to true. checkType('findNamespaceId', 1, link, 'string') checkType('findNamespaceId', 2, removeColon, 'boolean', true) if removeColon ~= false then link = removeInitialColon(link) end local namespace = link:match('^(.-):') if namespace then local nsTable = mw.site.namespaces[namespace] if nsTable then return nsTable.id end end return 0 end

function p.formatPages(...) -- Formats a list of pages using formatLink and returns it as an array. Nil -- values are not allowed. local pages = {...} local ret = {} for i, page in ipairs(pages) do ret[i] = p._formatLink(page) end return ret end

function p.formatPageTables(...) -- Takes a list of page/display tables and returns it as a list of -- formatted links. Nil values are not allowed. local pages = {...} local links = {} for i, t in ipairs(pages) do checkType('formatPageTables', i, t, 'table') local link = t[1] local display = t[2] links[i] = p._formatLink(link, display) end return links end

function p.makeWikitextError(msg, helpLink, addTrackingCategory) -- Formats an error message to be returned to wikitext. If -- addTrackingCategory is not false after being returned from -- Module:Yesno, and if we are not on a talk page, a tracking category -- is added. checkType('makeWikitextError', 1, msg, 'string') checkType('makeWikitextError', 2, helpLink, 'string', true) yesno = require('Module:Yesno') local title = mw.title.getCurrentTitle() -- Make the help link text. local helpText if helpLink then helpText = ' (help)' else helpText = end -- Make the category text. local category if not title.isTalkPage and yesno(addTrackingCategory) ~= false then category = 'Hatnote templates with errors' category = string.format( '%s:%s', mw.site.namespaces[14].name, category ) else category = end return string.format( '%s', msg, helpText, category ) end


-- Format link -- -- Makes a wikilink from the given link and display values. Links are escaped -- with colons if necessary, and links to sections are detected and displayed -- with " § " as a separator rather than the standard MediaWiki "#". Used in -- the template.


function p.formatLink(frame) local args = getArgs(frame) local link = args[1] local display = args[2] if not link then return p.makeWikitextError( 'no link specified', 'Template:Format hatnote link#Errors', args.category ) end return p._formatLink(link, display) end

function p._formatLink(link, display) -- Find whether we need to use the colon trick or not. We need to use the -- colon trick for categories and files, as otherwise category links -- categorise the page and file links display the file. checkType('_formatLink', 1, link, 'string') checkType('_formatLink', 2, display, 'string', true) link = removeInitialColon(link) local namespace = p.findNamespaceId(link, false) local colon if namespace == 6 or namespace == 14 then colon = ':' else colon = end -- Find whether a faux display value has been added with the | magic -- word. if not display then local prePipe, postPipe = link:match('^(.-)|(.*)$') link = prePipe or link display = postPipe end -- Find the display value. if not display then local page, section = link:match('^(.-)#(.*)$') if page then display = page .. ' § ' .. section end end -- Assemble the link. if display then return string.format('%s', colon, link, display) else return string.format('%s%s', colon, link) end end


-- Hatnote -- -- Produces standard hatnote text. Implements the template.


function p.hatnote(frame) local args = getArgs(frame) local s = args[1] local options = {} if not s then return p.makeWikitextError( 'no text specified', 'Template:Hatnote#Errors', args.category ) end options.extraclasses = args.extraclasses options.selfref = args.selfref return p._hatnote(s, options) end

function p._hatnote(s, options) checkType('_hatnote', 1, s, 'string') checkType('_hatnote', 2, options, 'table', true) local classes = {'hatnote'} local extraclasses = options.extraclasses local selfref = options.selfref if type(extraclasses) == 'string' then classes[#classes + 1] = extraclasses end if selfref then classes[#classes + 1] = 'selfref' end return string.format( '
%s
', table.concat(classes, ' '), s )

end

return p
  1. ^
  2. ^
  3. ^
  4. ^
  5. ^
  6. ^
  7. ^ a b
  8. ^
This article was sourced from Creative Commons Attribution-ShareAlike License; additional terms may apply. World Heritage Encyclopedia content is assembled from numerous content providers, Open Access Publishing, and in compliance with The Fair Access to Science and Technology Research Act (FASTR), Wikimedia Foundation, Inc., Public Library of Science, The Encyclopedia of Life, Open Book Publishers (OBP), PubMed, U.S. National Library of Medicine, National Center for Biotechnology Information, U.S. National Library of Medicine, National Institutes of Health (NIH), U.S. Department of Health & Human Services, and USA.gov, which sources content from all federal, state, local, tribal, and territorial government publication portals (.gov, .mil, .edu). Funding for USA.gov and content contributors is made possible from the U.S. Congress, E-Government Act of 2002.
 
Crowd sourced content that is contributed to World Heritage Encyclopedia is peer reviewed and edited by our editorial staff to ensure quality scholarly research articles.
 
By using this site, you agree to the Terms of Use and Privacy Policy. World Heritage Encyclopedia™ is a registered trademark of the World Public Library Association, a non-profit organization.
 


Copyright © World Library Foundation. All rights reserved. eBooks from Project Gutenberg are sponsored by the World Library Foundation,
a 501c(4) Member's Support Non-Profit Organization, and is NOT affiliated with any governmental agency or department.