विकिपीडिया
bhwiki
https://bh.wikipedia.org/wiki/%E0%A4%AE%E0%A5%81%E0%A4%96%E0%A5%8D%E0%A4%AF_%E0%A4%AA%E0%A4%A8%E0%A5%8D%E0%A4%A8%E0%A4%BE
MediaWiki 1.47.0-wmf.12
first-letter
मीडिया
विशेष
वार्तालाप
प्रयोगकर्ता
प्रयोगकर्ता वार्ता
विकिपीडिया
विकिपीडिया वार्ता
चित्र
चित्र वार्ता
मीडियाविकि
मीडियाविकि वार्ता
टेम्पलेट
टेम्पलेट वार्ता
मदद
मदद वार्ता
श्रेणी
श्रेणी वार्ता
TimedText
TimedText talk
Module
Module talk
Event
Event talk
विकिपीडिया:चौपाल
4
5455
801713
798952
2026-07-24T12:24:32Z
MediaWiki message delivery
4883
/* Request for comment (the future of Abstract Wikipedia) */ नया खंड
801713
wikitext
text/x-wiki
<!--चौपाल में नया विषय जोड़े की चिप्पी जोड़ी -->__NEWSECTIONLINK__<!-- चर्चा पृष्ठ के आवश्यक शीर्ष टिप्पणी -->
<span class="plainlinks" id="coordinates">[[File:Facebook icon.svg|14px|link=//facebook.com/bhwiki/]] [//facebook.com/bhwiki/ फेसबुक] – [[File:Twitter.svg|16px|link=//twitter.com/bhwikipedia]] [//twitter.com/bhwikipedia ट्विट्टर]</span>
{{/हेडर}}
== Feminism and Folklore 2023 ==
<div style="border:8px maroon ridge;padding:6px;>
[[File:Feminism and Folklore 2023 logo.svg|centre|550px|frameless]]
::<div lang="en" dir="ltr" class="mw-content-ltr">
<center>''{{int:please-translate}}''</center>
Dear Wiki Community,
Christmas Greetings and a Happy New Year 2023,
You are humbly invited to organize the '''[[:m:Feminism and Folklore 2023|Feminism and Folklore 2023]]''' writing competition from February 1, 2023, to March 31, 2023 on your local Wikipedia. This year, Feminism and Folklore will focus on feminism, women's issues, and gender-focused topics for the project, with a [[:c:Commons:Wiki Loves Folklore 2023|Wiki Loves Folklore]] gender gap focus and a folk culture theme on Wikipedia.
You can help Wikipedia's coverage of folklore from your area by writing or improving articles about things like folk festivals, folk dances, folk music, women and queer folklore figures, folk game athletes, women in mythology, women warriors in folklore, witches and witch hunting, fairy tales, and more. Users can help create new articles, expand or translate from a [[:m:Feminism and Folklore 2023/List of Articles|list]] of suggested articles.
Organisers are requested to work on the following action items to sign up their communities for the project:
# Create a page for the contest on the local wiki.
# Set up a fountain tool or dashboard.
# Create the local list and mention the timeline and local and international prizes.
# Request local admins for site notice.
# Link the local page and the fountain/dashboard link on the [[:m:Feminism and Folklore 2023/Project Page|meta project page]].
This year we would be supporting the community's financial aid for Internet and childcare support. This would be provided for the local team including their jury and coordinator team. This support is opt-in and non mandatory. Kindly fill in [https://docs.google.com/forms/d/e/1FAIpQLSea81OO0lVgUBd551iIiENXht7BRCISYZlKyBQlemZu_j2OHQ/viewform this Google form] and mark a mail to [mailto:support@wikilovesfolklore.org support@wikilovesfolklore.org] with the subject line starting as [Stipend] Name or Username/Language. The last date to sign up for internet and childcare aid from our team is 20th of January 2023, We encourage the language coordinators to sign up their community on this link by the 25th of January 2023.
Learn more about the contest and prizes on our [[:m:Feminism and Folklore 2023|project page]]. Feel free to contact us on our [[:m:Talk:Feminism and Folklore 2023/Project Page|meta talk page]] or by email us if you need any assistance.
We look forward to your immense coordination.
Thank you and Best wishes,
[[:m:Feminism and Folklore 2023|Feminism and Folklore 2023 International Team]]
::::Stay connected [[File:B&W Facebook icon.png|link=https://www.facebook.com/feminismandfolklore/|30x30px]] [[File:B&W Twitter icon.png|link=https://twitter.com/wikifolklore|30x30px]]
</div></div>
--[[प्रयोगकर्ता:MediaWiki message delivery|MediaWiki message delivery]] ([[प्रयोगकर्ता वार्ता:MediaWiki message delivery|बात करीं]]) 10:23, 24 दिसंबर 2022 (UTC)
<!-- Message sent by User:Tiven2240@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=Distribution_list/Global_message_delivery/Wikipedia&oldid=23942484 -->
== CIS-A2K Newsletter December 2022 ==
<br /><small>Please feel free to translate it into your language.</small>
[[File:Centre for Internet And Society logo.svg|180px|right|link=]]
Dear Wikimedians,
Hope everything is well. CIS-A2K's monthly Newsletter is here which is for the month of December. A few conducted events are updated in the Newsletter. Through this message, A2K wants your attention towards its December 2022 work. In this newsletter, we have mentioned A2K's conducted and upcoming events/activities.
; Conducted events
* [[:m:CIS-A2K/Events/Launching of GLAM projects in Aurangabad|Launching of GLAM projects in Aurangabad]]
* [[:m:Indic Wiki Improve-a-thon 2022/Online Meetup 10 Dec 2022|Online Meetup 10 Dec 2022 (Indic Wiki Improve-a-thon 2022)]]
* [[:m:Indic Wiki Improve-a-thon 2022|Indic Wiki Improve-a-thon 2022]]
; Upcoming event
* Mid-term Report 2022-2023
Please find the Newsletter link [[:m:CIS-A2K/Reports/Newsletter/December 2022|here]].
<br /><small>If you want to subscribe/unsubscibe this newsletter, click [[:m:CIS-A2K/Reports/Newsletter/Subscribe|here]]. </small>
Thank you [[प्रयोगकर्ता:MediaWiki message delivery|MediaWiki message delivery]] ([[प्रयोगकर्ता वार्ता:MediaWiki message delivery|बात करीं]]) 16:43, 7 जनवरी 2023 (UTC)
<small>On behalf of [[User:Nitesh (CIS-A2K)]]</small>
<!-- Message sent by User:Nitesh (CIS-A2K)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=CIS-A2K/Reports/Newsletter/Subscribe/VP&oldid=23719485 -->
== Upcoming vote on the revised Enforcement Guidelines for the Universal Code of Conduct ==
<section begin="announcement-content" />
:''[[m:Special:MyLanguage/Universal Code of Conduct/Revised enforcement guidelines/Announcement/Voting 1|You can find this message translated into additional languages on Meta-wiki.]]''
:''<div class="plainlinks">[[m:Special:MyLanguage/Universal Code of Conduct/Revised enforcement guidelines/Announcement/Voting 1|{{int:interlanguage-link-mul}}]] • [https://meta.wikimedia.org/w/index.php?title=Special:Translate&group=page-{{urlencode:Universal Code of Conduct/Revised enforcement guidelines/Announcement/Voting 1}}&language=&action=page&filter= {{int:please-translate}}]</div>''
Hello all,
In mid-January 2023, the [[m:Special:MyLanguage/Universal Code of Conduct/Revised enforcement guidelines|Enforcement Guidelines]] for the [[m:Special:MyLanguage/Universal Code of Conduct|Universal Code of Conduct]] will undergo a second community-wide ratification vote. This follows [[m:Special:MyLanguage/Universal Code of Conduct/Enforcement guidelines/Voting/Results|the March 2022 vote]], which resulted in a majority of voters supporting the Enforcement Guidelines. During the vote, participants helped highlight important community concerns. The Board’s [[m:Special:MyLanguage/Wikimedia Foundation Community Affairs Committee|Community Affairs Committee]] requested that these areas of concern be reviewed.
The volunteer-led [[m:Special:MyLanguage/Universal_Code_of_Conduct/Drafting_committee#Revisions_Committee_members|Revisions Committee]] worked hard reviewing community input and making changes. They updated areas of concern, such as training and affirmation requirements, privacy and transparency in the process, and readability and translatability of the document itself.
The revised Enforcement Guidelines can be viewed '''[[m:Special:MyLanguage/Universal Code of Conduct/Revised enforcement guidelines|here]]''', and a comparison of changes can be found '''[[m:Special:MyLanguage/Universal Code of Conduct/Revised enforcement guidelines/Comparison|here]]'''.
'''How to vote?'''
Beginning '''January 17, 2023''', voting will be open. '''[[m:Special:MyLanguage/Universal Code of Conduct/Revised enforcement guidelines/Voter information|This page on Meta-wiki]]''' outlines information on how to vote using SecurePoll.
'''Who can vote?'''
The '''[[m:Special:MyLanguage/Universal_Code_of_Conduct/Revised enforcement_guidelines/Voter_information#Voting_eligibility|eligibility requirements]]''' for this vote are the same as for the Wikimedia Board of Trustees elections. See the voter information page for more details about voter eligibility. If you are an eligible voter, you can use your Wikimedia account to access the voting server.
'''What happens after the vote?'''
Votes will be scrutinized by an independent group of volunteers, and the results will be published on Wikimedia-l, the Movement Strategy Forum, Diff and on Meta-wiki. Voters will again be able to vote and share concerns they have about the guidelines. The Board of Trustees will look at the levels of support and concerns raised as they look at how the Enforcement Guidelines should be ratified or developed further.
On behalf of the UCoC Project Team,<section end="announcement-content" />
[[प्रयोगकर्ता:CSinha (WMF)|CSinha (WMF)]] ([[प्रयोगकर्ता वार्ता:CSinha (WMF)|बात करीं]]) 10:01, 8 जनवरी 2023 (UTC)
== Voting Opens on the Revised Universal Code of Conduct (UCoC) Enforcement Guidelines ==
<section begin="announcement-content" />
:''[[m:Special:MyLanguage/Universal Code of Conduct/Revised enforcement guidelines/Announcement/Voting 2|You can find this message translated into additional languages on Meta-wiki.]]''
:''{{subst:more languages}}''
Hello all,
The [[m:Special:MyLanguage/Universal_Code_of_Conduct/Revised_enforcement_guidelines/Voting|voting period]] for the [[m:Special:MyLanguage/Universal_Code_of_Conduct/Revised_enforcement_guidelines|revised Universal Code of Conduct Enforcement Guidelines]] is now open! Voting will remain open for two weeks and will close at '''23:59 UTC''' on '''January 31, 2023'''. Please visit the [[m:Special:MyLanguage/Universal_Code_of_Conduct/Revised_enforcement_guidelines/Voter_information|'''voter information page''']] for voter eligibility information and details on how to vote.
For more details on the Enforcement Guidelines and the voting process, see our [[m:Special:MyLanguage/Universal_Code_of_Conduct/Revised_enforcement_guidelines/Announcement/Voting_1|previous message]].
On behalf of the UCoC Project Team,
<section end="announcement-content" />
[[प्रयोगकर्ता:CSinha (WMF)|CSinha (WMF)]] ([[प्रयोगकर्ता वार्ता:CSinha (WMF)|बात करीं]]) 11:50, 17 जनवरी 2023 (UTC)
== Global ban for PlanespotterA320/RespectCE ==
Per the [[m:Global bans|Global bans]] policy, I'm informing the project of this request for comment: [[m:Requests for comment/Global ban for PlanespotterA320 (2) ]] about banning a member from your community. Thank you.--[[User:Lemonaka|Lemonaka]] ([[User talk:Lemonaka|talk]]) 21:40, 6 February 2023 (UTC)
<!-- Message sent by User:Zabe@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=User:Lemonaka/Massmessagelist&oldid=24501599 -->
== CIS-A2K Newsletter January 2023 ==
<br /><small>Please feel free to translate it into your language.</small>
[[File:Centre for Internet And Society logo.svg|180px|right|link=]]
Dear Wikimedians,
Hope everything is well. CIS-A2K's monthly Newsletter is here which is for the month of December. A few conducted events are updated in the Newsletter. Through this message, A2K wants your attention towards its January 2023 tasks. In this newsletter, we have mentioned A2K's conducted and upcoming events/activities.
; Conducted events
* [[:m:Indic Wiki Improve-a-thon 2022|Indic Wiki Improve-a-thon 2022]]
* [[:m:Growing Local Language Content on Wikipedia (Project Tiger 2.0)/Writing Contest/Community Training 2022|Project Tiger 2.0 Training]]
* [[:m:Grants:Programs/Wikimedia Community Fund/Annual plan of the Centre for Internet and Society Access to Knowledge/Midpoint Report|Mid-term Report 2022-2023]]
; Upcoming event
* [[:d:Wikidata:WikiProject India/Events/International Mother Language Day 2023 Datathon|International Mother Language Day 2023 Datathon]]
Please find the Newsletter link [[:m:CIS-A2K/Reports/Newsletter/January 2023|here]].
<br /><small>If you want to subscribe/unsubscibe this newsletter, click [[:m:CIS-A2K/Reports/Newsletter/Subscribe|here]]. </small>
Thank you [[प्रयोगकर्ता:MediaWiki message delivery|MediaWiki message delivery]] ([[प्रयोगकर्ता वार्ता:MediaWiki message delivery|बात करीं]]) 18:11, 12 फरवरी 2023 (UTC)
<!-- Message sent by User:Nitesh (CIS-A2K)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=CIS-A2K/Reports/Newsletter/Subscribe/VP&oldid=23719485 -->
== International Mother Language day 2023 Datathon ==
<small>Apologies to write in English.</small>
Dear all,
Hope you are doing well. CIS-A2K is going to organise [[:d:Wikidata:WikiProject India/Events/International Mother Language Day 2023 Datathon|International Mother Language day 2023 Datathon]] on the occasion of and to celebrate International Mother language Day. The datathon will be from 21st February to 28 February 2023. During the week, we will contribute to Wikidata to add labels, descriptions, Aliases, items or properties and references to the statements. You can go through the given page link, add yourself and become a part of the event. During the datathon, we will finalise a day and organise a one or two-hour online session with a Wikidata expert to learn advanced tactics. Regards [[प्रयोगकर्ता:MediaWiki message delivery|MediaWiki message delivery]] ([[प्रयोगकर्ता वार्ता:MediaWiki message delivery|बात करीं]]) 17:49, 16 फरवरी 2023 (UTC)
<!-- Message sent by User:Nitesh (CIS-A2K)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=User:Titodutta/lists/Indic_VPs&oldid=22433435 -->
== Reminder: International Mother Language day 2023 Datathon ==
Dear all,
The International Mother Language Day 2023 Datathon will start tomorrow (after a few hours at 00:01 am) till 28 February. To contribute please add your name [[:d:Wikidata:WikiProject India/Events/International Mother Language Day 2023 Datathon|here]]. We will contribute to Wikidata to add labels, descriptions, Aliases, items or properties and references to the statements.
We have created the outreach dashboard to track the activities. [https://outreachdashboard.wmflabs.org/courses/International_Mother_Language_Day/International_Mother_Language_Day_2023_Datathon Here] is the link.
There will be an online session on Sunday. The session will be for 1:30 hrs. Please block your calendar for 4:00 to 5:30 pm. Jinoy will be there for a training session to introduce basics and the tools like 'TABernacle', 'QS' and 'Mix n Match' that can be used for adding labels and improving the existing WD item for newbies.
Please reach out if you have any questions or concerns at program@cis-india.org. Regards [[प्रयोगकर्ता:MediaWiki message delivery|MediaWiki message delivery]] ([[प्रयोगकर्ता वार्ता:MediaWiki message delivery|बात करीं]]) 16:58, 20 फरवरी 2023 (UTC)
<!-- Message sent by User:Nitesh (CIS-A2K)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=User:Titodutta/lists/Indic_VPs&oldid=22433435 -->
== Community feedback-cycle about updating the Wikimedia Terms of Use starts ==
<section begin="announcement-content" />
: ''[[metawiki:Special:MyLanguage/Wikimedia Foundation Legal department/2023 ToU updates/Office hours/Announcement|You can find this message translated into additional languages on Meta-wiki.]]''
: ''<div class="plainlinks">[[metawiki:Special:MyLanguage/Wikimedia Foundation Legal department/2023 ToU updates/Office hours/Announcement|{{int:interlanguage-link-mul}}]] • [https://meta.wikimedia.org/w/index.php?title=Special:Translate&group=page-{{urlencode:Wikimedia Foundation Legal department/2023 ToU updates/Office hours/Announcement|}}&language=&action=page&filter= {{int:please-translate}}]</div>''
Hello community members,
[[metawiki:Special:MyLanguage/Wikimedia_Foundation_Legal_department|Wikimedia Foundation Legal Department]] is organizing a feedback-cycle with community members to discuss updating the Wikimedia Terms of Use.
[[foundation:Special:MyLanguage/Terms of Use|The Terms of Use (ToU)]] are the legal terms that govern the use of websites hosted by the Wikimedia Foundation. We will be gathering your feedback on a draft proposal from February through April. The draft will be translated into several languages, with written feedback accepted in any language.
This update comes in response to several things:
* Implementing the Universal Code of Conduct.
* Updating project text to the Creative Commons BY-SA 4.0 license.
* Proposal for better addressing undisclosed paid editing.
* Bringing the Terms of Use in line with current and recently passed laws affecting the Wikimedia Foundation, including the European Digital Services Act
As part of the feedback cycle two office hours will be held: the first on 2 March and the second on 4 April.
For further information, please consult:
* The [[metawiki:Special:MyLanguage/Wikimedia Foundation Legal department/2023 ToU updates/Proposed update|proposed update of the ToU by comparison]]
* The page for your [[metawiki:Talk:Terms of use|feedback]]
* Information about [[metawiki:Special:MyLanguage/Wikimedia Foundation Legal department/2023 ToU updates/Office hours|the office hours]]
On behalf of the Wikimedia Foundation Legal Team,<section end="announcement-content" />
[[प्रयोगकर्ता:CSinha (WMF)|CSinha (WMF)]] ([[प्रयोगकर्ता वार्ता:CSinha (WMF)|बात करीं]]) 07:54, 22 फरवरी 2023 (UTC)
== Editing news 2023 #1 ==
<div lang="en" dir="ltr" class="mw-content-ltr">
<section begin="message"/><i>[[m:Special:MyLanguage/VisualEditor/Newsletter/2023/February|Read this in another language]] • [[m:Special:MyLanguage/VisualEditor/Newsletter|Subscription list for this multilingual newsletter]]</i>
This newsletter includes two key updates about the [[mw:Special:MyLanguage/Editing team|Editing]] team's work:
# The Editing team will finish adding new features to the [[mw:Special:MyLanguage/Talk pages project|Talk pages project]] and deploy it.
# They are beginning a new project, [[mw:Special:MyLanguage/Edit check|Edit check]].
<strong>Talk pages project</strong>
[[File:Page Frame Features on desktop.png|alt=Screenshot showing the talk page design changes that are currently available as beta features at all Wikimedia wikis. These features include information about the number of people and comments within each discussion.|thumb|300px|Some of the upcoming changes]]
The Editing team is nearly finished with this first phase of the [[mw:Special:MyLanguage/Talk_pages_project|Talk pages project]]. Nearly all [[mw:Special:MyLanguage/Talk pages project/Usability|new features]] are available now in the [[Special:Preferences#mw-prefsection-betafeatures|Beta Feature for {{int:discussiontools-preference-label}}]].
It will show information about how active a discussion is, such as the date of the most recent comment. There will soon be a new "{{int:skin-action-addsection}}" button. You will be able to turn them off at [[Special:Preferences#mw-prefsection-editing-discussion]]. Please [[mw:Special:MyLanguage/Talk:Talk_pages_project/Usability#c-PPelberg_(WMF)-20230215001000-Feedback:_Proposed_Revisions_to_%22Add_topic%22_button|tell them what you think]].
[[File:Daily edit completion rates mobile talk pages.png|thumb|300px|Daily edit completion rate by test group: DiscussionTools (test group) and MobileFrontend overlay (control group)]]
An A/B test for [[mw:Special:MyLanguage/Talk pages project/Mobile|{{int:discussiontools-preference-label}} on the mobile site]] has finished. Editors were [[mw:Special:MyLanguage/Talk_pages_project/Mobile#Status_Updates|more successful with {{int:discussiontools-preference-label}}]]. The Editing team is enabling these features for all editors on the mobile site.
<strong>New Project: Edit Check</strong>
The Editing team is beginning [[mw:Special:MyLanguage/Edit check|a project to help new editors of Wikipedia]]. It will help people identify some problems before they click "{{int:publishchanges}}". The first tool will encourage people to add references when they add new content. Please [[mw:Special:MyLanguage/Help:Watchlist|watch]] that page for more information. You can [[mw:Special:MyLanguage/Editing_team/Community_Conversations#20230303|join a conference call on 3 March 2023]] to learn more.<section end="message"/>
</div>
–[[User:Whatamidoing (WMF)|Whatamidoing (WMF)]] ([[User talk:Whatamidoing (WMF)|{{int:Talkpagelinktext}}]]) 23:24, 22 फरवरी 2023 (UTC)
<!-- Message sent by User:Quiddity (WMF)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=Global_message_delivery/Targets/VisualEditor/Newsletter/Wikis_with_VE&oldid=24611966 -->
== <span lang="en" dir="ltr" class="mw-content-ltr">Your wiki will be in read only soon</span> ==
<div lang="en" dir="ltr" class="mw-content-ltr">
<section begin="server-switch"/><div class="plainlinks">
[[:m:Special:MyLanguage/Tech/Server switch|Read this message in another language]] • [https://meta.wikimedia.org/w/index.php?title=Special:Translate&group=page-Tech%2FServer+switch&language=&action=page&filter= {{int:please-translate}}]
The [[foundation:|Wikimedia Foundation]] tests the switch between its first and secondary data centers. This will make sure that Wikipedia and the other Wikimedia wikis can stay online even after a disaster. To make sure everything is working, the Wikimedia Technology department needs to do a planned test. This test will show if they can reliably switch from one data centre to the other. It requires many teams to prepare for the test and to be available to fix any unexpected problems.
All traffic will switch on '''{{#time:j xg|2023-03-01|en}}'''. The test will start at '''[https://zonestamp.toolforge.org/{{#time:U|2023-03-01T14:00|en}} {{#time:H:i e|2023-03-01T14:00}}]'''.
Unfortunately, because of some limitations in [[mw:Manual:What is MediaWiki?|MediaWiki]], all editing must stop while the switch is made. We apologize for this disruption, and we are working to minimize it in the future.
'''You will be able to read, but not edit, all wikis for a short period of time.'''
*You will not be able to edit for up to an hour on {{#time:l j xg Y|2023-03-01|en}}.
*If you try to edit or save during these times, you will see an error message. We hope that no edits will be lost during these minutes, but we can't guarantee it. If you see the error message, then please wait until everything is back to normal. Then you should be able to save your edit. But, we recommend that you make a copy of your changes first, just in case.
''Other effects'':
*Background jobs will be slower and some may be dropped. Red links might not be updated as quickly as normal. If you create an article that is already linked somewhere else, the link will stay red longer than usual. Some long-running scripts will have to be stopped.
* We expect the code deployments to happen as any other week. However, some case-by-case code freezes could punctually happen if the operation require them afterwards.
* [[mw:Special:MyLanguage/GitLab|GitLab]] will be unavailable for about 90 minutes.
This project may be postponed if necessary. You can [[wikitech:Switch_Datacenter|read the schedule at wikitech.wikimedia.org]]. Any changes will be announced in the schedule. There will be more notifications about this. A banner will be displayed on all wikis 30 minutes before this operation happens. '''Please share this information with your community.'''</div><section end="server-switch"/>
</div>
<span dir=ltr>[[m:User:Trizek (WMF)|Trizek (WMF)]] ([[m:User talk:Trizek (WMF)|{{int:talk}}]])</span> 21:20, 27 फरवरी 2023 (UTC)
<!-- Message sent by User:Trizek (WMF)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=Distribution_list/Global_message_delivery&oldid=24390465 -->
== Ukraine's Cultural Diplomacy Month 2023: We are back! ==
<div lang="en" dir="ltr" class="mw-content-ltr">
<div lang="en" dir="ltr" class="mw-content-ltr">
[[File:UCDM 2023 promo.png|180px|right]]
{{int:please-translate}}
Hello, dear Wikipedians!<br/>
[[m:Special:MyLanguage/Wikimedia Ukraine|Wikimedia Ukraine]], in cooperation with the [[:en:Ministry of Foreign Affairs of Ukraine|Ministry of Foreign Affairs of Ukraine]] and [[:en:Ukrainian Institute|Ukrainian Institute]], has launched the third edition of writing challenge "'''[[m:Special:MyLanguage/Ukraine's Cultural Diplomacy Month 2023|Ukraine's Cultural Diplomacy Month]]'''", which lasts from 1st until 31st March 2023. The campaign is dedicated to famous Ukrainian artists of cinema, music, literature, architecture, design and cultural phenomena of Ukraine that are now part of world heritage. We accept contribution in every language! The most active contesters will receive [[m:Special:MyLanguage/Ukraine's Cultural Diplomacy Month 2023/Prizes|prizes]].<br/>
We invite you to take part and help us improve the coverage of Ukrainian culture on Wikipedia in your language! Also, we plan to set up a [[m:CentralNotice/Request/UCDM 2023|banner]] to notify users of the possibility to participate in such a challenge!
</div>
[[m:User:ValentynNefedov (WMUA)|ValentynNefedov (WMUA)]] ([[m:User talk:ValentynNefedov (WMUA)|talk]]) 07:58, 1 March 2023 (UTC)
</div>
<!-- Message sent by User:ValentynNefedov (WMUA)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=Distribution_list/Global_message_delivery/Wikipedia&oldid=23942484 -->
== CIS-A2K Newsletter Feburary 2023 ==
<br /><small>Please feel free to translate it into your language.</small>
[[File:Centre for Internet And Society logo.svg|180px|right|link=]]
Dear Wikimedians,
Hope everything is well. CIS-A2K's monthly Newsletter is here which is for the month of February. A few conducted events are updated in the Newsletter. Through this message, A2K wants your attention towards its February 2023 tasks and towards upcoming events. In this newsletter, we have mentioned A2K's conducted and upcoming events/activities.
; Conducted events
* [[:m:CIS-A2K/Events/Digitization & Documentation of Cultural Heritage and Literature in Meghalaya|Digitization & Documentation of Cultural Heritage and Literature in Meghalaya]]
* [[:d:Wikidata:WikiProject India/Events/International Mother Language Day 2023 Datathon|International Mother Language Day 2023 Datathon]]
* Wikidata Online Session
; Upcoming event
* March Month Activity on Wikimedia Commons
* [[:m:CIS-A2K/Events/Hindi Wikisource Community skill-building workshop|Hindi Wikisource Community skill-building workshop]]
Please find the Newsletter link [[:m:CIS-A2K/Reports/Newsletter/February 2023|here]].
<br /><small>If you want to subscribe/unsubscribe to this newsletter, click [[:m:CIS-A2K/Reports/Newsletter/Subscribe|here]]. </small>
Thank you [[User:Nitesh (CIS-A2K)|Nitesh (CIS-A2K)]] ([[User talk:Nitesh (CIS-A2K)|talk]]) 04:50, 8 March 2023 (UTC)
<!-- Message sent by User:Nitesh (CIS-A2K)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=CIS-A2K/Reports/Newsletter/Subscribe/VP&oldid=23719485 -->
== [[टेम्पलेट:Infobox India district]] के इस्तेमाल हटावल ==
नमस्कार सभका के। एह टेम्पलेट के इस्तेमाल वर्तमान समय में 500 से बेसी पन्ना सभ पर हो रहल बाटे। एहिजा सूचित कइल जा रहल बा कि एकरे जगह पर [[टेम्पलेट:Infobox settlement]] के इस्तेमाल कइल जाई। एकरा खातिर [https://bh.wikipedia.org/w/index.php?title=गोरखपुर_जिला&diff=736269&oldid=692754 एह तरीका से बदलाव] कइल जाई।
एह दौरान कुछ पन्ना सभ पर ज्ञानसंदूक सभ में दिहल जानकारी के कुछ हिस्सा अंग्रेजी में देख्लाई पड़ सके ला जेकरा के बाद में बॉट चला के एक्के साथे अनुबादित क दिहल जाई।
कौनों किसिम के सुझाव/सलाह के स्वागत बा। एह काम में मदद करे खातिर आप सभ के स्वागत बाटे। --[[User:SM7|<span style="color:#00A300">SM7</span>]]<sup>[[User talk:SM7|<small style="color:#6F00FF">--बातचीत--</small>]]</sup> 09:30, 11 मार्च 2023 (UTC)
== नीति निर्माण प्रस्ताव 2023 ==
नमस्कार सभका के, एहिजे एह प्रस्ताव द्वारा कुछ नीति सभ के प्रस्ताव समुदाय के सोझा रखल जा रहल बाड़ें जिनहन पर चर्चा आ सहमती के अनुरोध कइल जा रहल बा। संबंधित नीति सभ के बातचीत पन्ना सभ पर सवाल पूछल जा सकत बाने, सुधार सुझावित कइल जा सकत बा आ ओह चर्चा के बाद हेइजा आपन मत स्पष्ट रूप से, कारन सहित ब्यक्त कइल जा सकत बाटे।
नीति सभ जे प्रस्तावित कइल जा रहल बाड़ीं:
# [[विकिपीडिया:उल्लेखनीयता]] <small>([[विकिपीडिया वार्ता:उल्लेखनीयता|वार्ता पन्ना पर चर्चा करीं]])</small>
# [[विकिपीडिया:कठपुतरी नीति]] <small>([[विकिपीडिया वार्ता:कठपुतरी नीति|वार्ता पन्ना पर चर्चा करीं]])</small>
# [[विकिपीडिया:प्रतिबंध नीति]] <small>([[विकिपीडिया वार्ता:प्रतिबंध नीति|वार्ता पन्ना पर चर्चा करीं]])</small>
# [[विकिपीडिया:रोक नीति]] <small>([[विकिपीडिया वार्ता:रोक नीति|वार्ता पन्ना पर चर्चा करीं]])</small>
# [[विकिपीडिया:लिखाई अउरी अंक नीति]] <small>([[विकिपीडिया वार्ता:लिखाई अउरी अंक नीति|वार्ता पन्ना पर चर्चा करीं]])</small>
# [[विकिपीडिया:मशीनी अनुबाद नीति]] <small>([[विकिपीडिया वार्ता:मशीनी अनुबाद नीति|वार्ता पन्ना पर चर्चा करीं]])</small>
# [[विकिपीडिया:आधार|आधार लेख निर्माण नीति]] <small>([[विकिपीडिया वार्ता:आधार|वार्ता पन्ना पर चर्चा करीं]])
# [[विकिपीडिया:भाषा दिसानिर्देस]] ([[विकिपीडिया वार्ता:भाषा दिसानिर्देस|वार्ता पन्ना पर चर्चा करीं]])
</small>
एह चर्चा में समुदाय के सगरी लोग के स्वागत बा आ आम सहमती बनावे में सहजोग के उमेद बा। --[[User:SM7|<span style="color:#00A300">SM7</span>]]<sup>[[User talk:SM7|<small style="color:#6F00FF">--बातचीत--</small>]]</sup> 14:44, 11 मार्च 2023 (UTC)
:एगो अउरी दिसानिर्देस [[विकिपीडिया:भाषा दिसानिर्देस]] ([[विकिपीडिया:भाषा दिसानिर्देस|चर्चा पन्ना]]) जोड़ल जा रहल बाटे। एहू पर, चर्चा पन्ना पर सुझाव आ सुधार आमंत्रित बाटे।--[[User:SM7|<span style="color:#00A300">SM7</span>]]<sup>[[User talk:SM7|<small style="color:#6F00FF">--बातचीत--</small>]]</sup> 16:18, 20 मार्च 2023 (UTC)
== अंग्रेजी विकिपीडिया के नीति अउरी दिसानिर्देस लागू करे के प्रस्ताव ==
<div class="boilerplate discussion-archived mw-archivedtalk" style="background-color: #f5f3ef; overflow:auto; margin: 1em 0 0 0; padding: 0 10px 0 10px; border: 1px solid #aaa">
<div class="boilerplate-header">
:''ई चर्चा पूरा हो चुकल बाटे। <span style="color:red">'''एम्में अब कौनों बदलाव मत करीं।'''</span> आगे के टिप्पणी सभ नया खंड बना के कइल जाये के चाहीं।'' ''चर्चा के संछेप में रिजल्ट रहल''
::'''सफल प्रस्ताव''': लमहर समय ले राय खातिर खुलल रहल चर्चा में बिना कौनों बिरोध होखे आ सक्रिय योगदानकरता लोग के समर्थन के हिसाब से '''एह नीति के लागू घोषित कइल जा रहल बा।'''--[[User:SM7|<span style="color:#00A300">SM7</span>]]<sup>[[User talk:SM7|<small style="color:#6F00FF">--बातचीत--</small>]]</sup> 19:40, 1 जुलाई 2023 (UTC)
---- <!-- from Template:discussion top-->
</div>
एहिजे ई प्रस्तावित कइल जा रहल बा कि कौनों बिसय चाहे मुद्दा पर भोजपुरी विकिपीडिया पर लोकल नीति आ दिसानिर्देस के अभाव में ओह बिसय से संबंधित अंग्रेजी विकिपीडिया के नीति आ दिसानिर्देस के लागू मानल जाय आ, लोकल जरूरत के मोताबिक उनहन के युक्तियुक्त ढंग से पढ़ के, उनहन के हिसाब से कामकाज आ कार्रवाई कइल जाय।
;तार्किकता (रेशनेल): भोजपुरी विकिपीडिया एगो छोट विकिपीडिया हवे आ एहिजे प्रयोगकर्ता लोग के आ बढ़ियाँ से लिखल नीति आ दिसानिर्देस सभ के कमी बा। एकरे बिपरीत अंग्रेजी विकिपीडिया पर भारी प्रयोगकर्ता संख्या के राय के आधार पर आ समस्या के दसा सभ के ब्यापक अनुभव वगैरह के बाद स्थापित नीति बाड़ी स। अइसन जरूरी ना बा कि एगो ज्ञानकोश निर्माण में आवे वाली हर समस्या से भोजपुरी विकिपीडिया के समुदाय परिचित होखे; जबकि अंग्रेजी पर बहुत ब्यापक अनुभव के बाद अइसन समस्या सभ के समाधान खातिर ब्यवस्थित तरीका बनावल गइल बाड़ें।
एकर एकठो अउरी लाभ ई बा कि, हर नीति के लोकल आम सहमती से लागू करवावे के ना पड़ी आ अंग्रेजी विकिपीडिया के संबंधित नीति आ दिसानिर्देस के अनुबाद क के एहिजा लिखल जा सके ला जवना से भोजपुरी प्रयोगकर्ता लोग के उनहन के समझे में सुबिधा होखे। अइसन अनुबाद नीति आ दिसानिर्देस के रूप में ओही तरीका से प्रभावी मानल जइहें काहें से कि ऊ अंग्रेजी के नीति आ दिसनिर्देस सभ के अनुबाद भर होखिहें।
;सीमा: अंग्रेजी विकिपीडिया के हर नीति आ दिसानिर्देस के आँख-मूँद ढंग से एहिजे ना लागू कइल जा सके ला। कारन ई बा कि कई सारा जरूरत एहिजे लोकल हो सके लीं जिनहन खातिर अंग्रेजी विकिपीडिया पर नीति भा दिसानिर्देस न मौजूद होखे। अइसनो हो सके ला कि अंग्रेजी विकिपीडिया के कौनों स्थापित नीति भा दिसानिर्देस के एकदम से ओही तरीका से एहिजे लागू कइल संभव न होखे; काहे से कि एहिजे ओह चीज से संबंधित मूल ब्यवस्थवे न होखे। उदाहरण खातिर अंग्रेजी विकिपीडिया पर चेकयूजर, ओभरसाइट, आर्बिट्रेशन कमेटी वगैरह नियर कई ब्यवस्था बाड़ी स जिनहन के एहिजा अभाव बा आ उनहन से संबंधित काम मेटा विकि से करावल जाला। अइसन लोकल नामौजूद ब्यवस्था संबंधी नीति; चाहे अन्य नीति सभ में इनहन से संबंधित प्रावधान एहिजे यथारूप ना लागू कइल जा सके लें। अइसन दसा में विकिपीडिया के मूल भावना के धियान में रख के, अंग्रेजी विकिपीडिया के नीति आ दिसानिर्देस सभ के युक्तियुक्त ढंग से लागू करे के प्रस्ताव कइल जा रहल बाटे। एकर जिकिर संबंधित नीति में कइल गइल बा।
;लोकल: जरूरत आ सुबिधा के धियान में रख के लोकल रूप से नीति आ दिसानिर्देस बनावे खातिर प्रस्ताव ले आ के आम सहमती से अइसन नीति बनावल जा सके लीं जिनहन में अंग्रेजी के स्थापित नीति से हट के बेवस्था कइल गइल होखे।
* [[विकिपीडिया:अंग्रेजी विकिपीडिया नीति अउरी दिसानिर्देस लागू|प्रस्तावित नीति के कड़ी]]
एह मुद्दा पर आपसभ के राय आ चर्चा के स्वागत बा। नीति में सुधार खातिर चर्चा एकरे [[विकिपीडिया वार्ता:अंग्रेजी विकिपीडिया नीति अउरी दिसानिर्देस लागू|बातचीत पन्ना]] पर कइल जा सके ला। आ एहिजा आपन मत ब्यक्त कइल जा सके ला। सभकर स्वागत बा। --[[User:SM7|<span style="color:#00A300">SM7</span>]]<sup>[[User talk:SM7|<small style="color:#6F00FF">--बातचीत--</small>]]</sup> 14:44, 11 मार्च 2023 (UTC)
=== टिप्पणी अउरी मत ===
*नमस्कार, ये बात तो है नीति ना होने के कारण विवाद होते हैं और कई सदस्य इसका फायदा उठा के अपनी मनमानी करते हैं। ऐसा मैंने अपने अनुभव में हिन्दी विकिपीडिया में देखा है। मेरा सवाल ये है कि ऐसा किसी और विकि पे भी हो रखा है क्या ? और हम ये कैसे तय करेंगे कि कौन सी नीति मानी जाये और कौन सी नहीं ?-- [[प्रयोगकर्ता:हिंदुस्थान वासी|<font color="80 00 80">हिंदुस्थान वासी</font>]]<sup> ''' [[प्रयोगकर्ता वार्ता:हिंदुस्थान वासी|वार्ता]]''' </sup> 13:52, 21 मार्च 2023 (UTC)
**@[[प्रयोगकर्ता:हिंदुस्थान वासी|हिंदुस्थान वासी]] जी, एह तरह के व्यवस्था शुरुआती दौर में कैंटोनीज विकिपीडिया पर लागू कइल गइल रहे, जइसन कि मेटा पर एकर एक ठो हवाला मौजूद बाटे (देखीं [[:meta:Manual_for_small_and_new_Wikipedias#Rules_are_important|मेटा पर एह खंड के आखिरी लाइन]] में), हालाँकि, अब अइसन बाटे कि ना ई नइखे मालुम। बाकी ई एक ठो उदाहरण बाटे कि अइसन कइल गइल बाटे आ कइल जा सके ला।
::जहाँ तक आपके ई सवाल बाटे कि कवन नीति मानल जाय, कवन ना, एकरा बिसय में नीति में प्रस्ताव कइल गइल बाटे। जवना चीज खातिर अलगा से लोकल नीति मौजूद होखी आ आम सहमती से इहाँ स्थापित होखी, ओह चीज खातिर लोकल नीति मानल जाई, बाकी सब खातिर अंग्रेजी नीति के युक्तियुक्त तरीका से पढ़ के इहाँ लागू मानल जाई। --[[User:SM7|<span style="color:#00A300">SM7</span>]]<sup>[[User talk:SM7|<small style="color:#6F00FF">--बातचीत--</small>]]</sup> 17:46, 24 मार्च 2023 (UTC)
*'''समर्थन''' : वैसे तो पहली नज़र में यह नीति अनावश्यक सी लगती है लेकिन प्रस्ताव को पूरा पढ़ने पर प्रतीत हो रहा है कि यह करना उचित रहेगा। जहाँ सदस्यों को इस नीति से समस्या होगी, उसके सापेक्ष स्थानीय नीति प्रस्तावित करके सुधार किया जा सकता है।<span style="color:green;">☆★</span>[[user:संजीव कुमार|<u><span style="color:Magenta;">संजीव कुमार</span></u>]] ([[User talk:संजीव कुमार|<span style="color:blue;">✉✉</span>]]) 05:12, 24 मार्च 2023 (UTC)
*'''समर्थन''' : कवन नियम मानल जाई आ कवन ना ई त समुदाय के ही मिलके ही तय करै के चाही। मुद्दा त ईहो बा कि एकरे बदे समुदाय केतना जागरूक बा। नियम क ज़रूरत तब पड़ैला जब कवनो समस्या होखे। अंग्रेजी क नियम बहुत सोच बिचार कयके बनावल गयल बा आ जदि मौजूदा कवनो नीति में समुदाय के समस्या होई त बिचार कयके संजीव जी के कहला अनुसार स्थानीय नियम प्रस्तावित कयल जा सकत बा। --[[User:अजीत कुमार तिवारी|<span style="text-shadow:gray 3px 3px 2px;color:red">'''अजीत कुमार तिवारी'''</span>]]<sup>[[User talk:अजीत कुमार तिवारी|<span style="color:green"> '''बातचीत'''</span>]]</sup> 17:10, 9 अप्रैल 2023 (UTC)
*'''समर्थन''' : जबतक भोजपुरी विकिपीडिया पर लोकल नीति आउर दिसानिर्देस ना बन पावत ह तब तक अंग्रेजी विकिपीडिया क नीति आउर दिसानिर्देस लागू कयल जा सकत ह। {{ping|SM7}} जी प्रस्ताव भइले ढेर दिन हो गयल बा। हो सके त अब एके लागू करे पर विचार करीं। --[[प्रयोगकर्ता:सौरभ तिवारी 05|सौरभ तिवारी 05]] ([[प्रयोगकर्ता वार्ता:सौरभ तिवारी 05|बात करीं]]) 15:02, 1 जुलाई 2023 (UTC)
चर्चा पूरा भइल आ ई नीति अब लागू मानल जाई। आप सभ के धन्यवाद। --[[User:SM7|<span style="color:#00A300">SM7</span>]]<sup>[[User talk:SM7|<small style="color:#6F00FF">--बातचीत--</small>]]</sup> 19:39, 1 जुलाई 2023 (UTC)
{{abot}}
== नया प्रयोगकर्ता अधिकार स्तर आ सुरक्षा स्तर लागू करे आ कुछ औजारन के प्रयोग सीमित करे के प्रस्ताव ==
{{Discussion top|reason= चर्चा पूरा भइल, प्रस्ताव Phabricator पर ले जाइल जात बा।}}
भोजपुरी विकिपीडिया पर नाया प्रयोगकर्ता अधिकार - '''सुस्थापित प्रयोगकर्ता''' के स्थापना खातिर ई प्रस्ताव रखल जात बा। ई अधिकार अंग्रेजी विकिपीडिया के [[:en:WP:XC|Extended confirmed]] के नियर होखी। मने कि, प्रयोगकर्ता लोग के कुछ संपादन आ समय के बाद ई स्तर के अधिकार मिली।
* कम से कम 30 दिन पुरान खाता आ साथे-साथ कम से कम 500 संपादन के सीमा
* अंग्रेजी विकिपीडिया नियर कुछ दसा में, प्रबंधक द्वारा, ऊपर बतावल सीमा से पहिले दिहल जाए के ब्यवस्था (अगर केहू पहिले से ई अधिकार प्राप्त ब्यक्ति अपना बैध दुसरे खाता खाती ई माँग करे)
एही के साथे-साथ एकर इस्तेमाल खातिर नीचे दिहल चीज प्रस्तावित कइल जा रहल बाटे:
* ई एगो '''सुरक्षा के स्तर''' होखी जेह पर, जरूरत पड़े पर, पन्ना सभ के प्रबंधक द्वारा सुरक्षित कइल जा सकत बा
* '''पन्ना स्थानांतरण''' (मूव) करे, मने कि नाँव बदले, के सुबिधा एह अधिकार आ ऊपर वाला लोग (प्रबंधक) लोग के होखी
* '''कंटेंट ट्रांसलेशन''' आ '''ट्विंकल''' नियर सुबिधा के इस्तेमाल एह अधिकार आ एकरे ऊपर वाला लोगन के होखी।
* अउरी कौनों औजार भा सुबिधा के इस्तेमाल एह अधिकार ले सीमित कइल, जइसन भबिस्य में आम सहमती द्वारा फैसला होखे।
अइसन प्रयोगकर्ता अधिकार स्तर के जरूरत एह कारन बा कि वर्तमान में सुरक्षा के स्तर ऑटोकन्फर्म के बाद सीधा प्रबंधक स्तर बाटे। बीच में एगो सुरक्षा स्तर बनावल उचित रही जेह पर महत्ववाला पन्ना सभ के सुरक्षित कइल जा सके। एकरा से पन्ना स्थानांतरण के उत्पात के रोके आ कंटेंट अनुवाद उपकरण के इस्तेमाल से अंधाधुंध लेख बनावे पर भी नियंत्रण होखी।
आपन राय नीचे दिहल जाय आ अगर कौनों सुझाव होखे तब इहाँ चर्चा कइल जाय। --[[User:SM7|<span style="color:#00A300">SM7</span>]]<sup>[[User talk:SM7|<small style="color:#6F00FF">--बातचीत--</small>]]</sup> 14:47, 11 मार्च 2023 (UTC)
=== टिप्पणी अउरी मत ===
#'''समर्थन''' <span style="color:green;">☆★</span>[[user:संजीव कुमार|<u><span style="color:Magenta;">संजीव कुमार</span></u>]] ([[User talk:संजीव कुमार|<span style="color:blue;">✉✉</span>]]) 05:23, 24 मार्च 2023 (UTC)
#'''समर्थन'''। भोजपुरी विकिपीडिया पर बढिया ढंग से काम करे खातिर आउर लेख क क्वालिटी सुधारे खातिर इ उचित उपाय ह। --[[प्रयोगकर्ता:सौरभ तिवारी 05|सौरभ तिवारी 05]] ([[प्रयोगकर्ता वार्ता:सौरभ तिवारी 05|बात करीं]]) 19:35, 8 अप्रैल 2023 (UTC)
# कंटेंट ट्रांसलेसन वाले मुद्दा प हमरो राय इहे बा कि एकरे बदे सदस्यन क एक स्तर रखल बहुत ज़रूरी बा ना त कचरा बढ़त देर न लगी। बाक़ी मुद्दा पर भी '''समर्थन''' बा। --[[User:अजीत कुमार तिवारी|<span style="text-shadow:gray 3px 3px 2px;color:red">'''अजीत कुमार तिवारी'''</span>]]<sup>[[User talk:अजीत कुमार तिवारी|<span style="color:green"> '''बातचीत'''</span>]]</sup> 17:27, 9 अप्रैल 2023 (UTC)
# '''समर्थन''', यदि प्रबंधक से नीचे कोई अधिकार यहाँ मौजूद नहीं है तो ये ठीक रहेगा । --[[प्रयोगकर्ता:हिंदुस्थान वासी|<font color="80 00 80">हिंदुस्थान वासी</font>]]<sup> ''' [[प्रयोगकर्ता वार्ता:हिंदुस्थान वासी|वार्ता]]''' </sup> 10:52, 9 मई 2023 (UTC)
{{Discussion bottom}}
== Women's Month Datathon on Commons ==
<small>Please help us to translate the message.</small>
Hello Wikimedians,
Hope you are doing well. CIS-A2K and [[:commons:Commons Photographers User Group|CPUG]] have planned an online activity for March. The activity will focus on Wikimedia Commons and it will begin on 21 March and end on 31 March 2023. During this campaign, the participants will work on structure data, categories and descriptions of the existing images. We will provide you with the list of the photographs that were uploaded under those campaigns, conducted for Women’s Month.
You can find the event page link [[:m:CIS-A2K/Events/Women's Month Datathon on Commons|here]]. We are inviting you to participate in this event and make it successful. There will be at least one online session to demonstrate the tasks of the event. We will come back to you with the date and time.
If you have any questions please write to us at the event [[:m:Talk:CIS-A2K/Events/Women's Month Datathon on Commons|talk page]] Regards [[प्रयोगकर्ता:MediaWiki message delivery|MediaWiki message delivery]] ([[प्रयोगकर्ता वार्ता:MediaWiki message delivery|बात करीं]]) 17:49, 12 मार्च 2023 (UTC)
<!-- Message sent by User:Nitesh (CIS-A2K)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=User:Titodutta/lists/Indic_VPs&oldid=22433435 -->
== <span lang="en" dir="ltr" class="mw-content-ltr">Wikimania 2023 Welcoming Program Submissions</span> ==
<div lang="en" dir="ltr" class="mw-content-ltr">
<section begin="wikimania-program-submissions"/>[[File:Wikimania Singapore Logo.svg|right|frameless]]Do you want to host an in-person or virtual session at Wikimania 2023? Maybe a hands-on workshop, a lively discussion, a fun performance, a catchy poster, or a memorable lightning talk? [[wmania:Special:MyLanguage/2023:Program/Submissions|'''Submissions are open until March 28''']]. The event will have dedicated hybrid blocks, so virtual submissions and pre-recorded content are also welcome. If you have any questions, please join us at an upcoming conversation on March 12 or 19, or reach out by email at wikimania@wikimedia.org or on Telegram. More information on-wiki.<section end="wikimania-program-submissions"/>
</div>
<!-- Message sent by User:CKoerner (WMF)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=Distribution_list/Global_message_delivery&oldid=24390465 -->
== Women's Month Datathon on Commons Online Session ==
Dear Wikimedians,
Hope you are doing well. As we mentioned in a previous message, CIS-A2K and [[:commons:Commons Photographers User Group|CPUG]] have been starting an online activity for March from 21 March to 31 March 2023. The activity already started yesterday and will end on 31 March 2023. During this campaign, the participants are working on structure data, categories and descriptions of the existing images. The event page link is [[:m:CIS-A2K/Events/Women's Month Datathon on Commons|here]]. We are inviting you to participate in this event.
There is an online session to demonstrate the tasks of the event that is going to happen tonight after one hour from 8:00 pm to 9:00 pm. You can find the meeting link [[:m:CIS-A2K/Events/Women's Month Datathon on Commons/Online Session|here]]. We will wait for you. Regards [[प्रयोगकर्ता:MediaWiki message delivery|MediaWiki message delivery]] ([[प्रयोगकर्ता वार्ता:MediaWiki message delivery|बात करीं]]) 13:36, 22 मार्च 2023 (UTC)
<!-- Message sent by User:Nitesh (CIS-A2K)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=User:Titodutta/lists/Indic_VPs&oldid=22433435 -->
== CIS-A2K Newsletter March 2023 ==
<br /><small>Please feel free to translate it into your language.</small>
[[File:Centre for Internet And Society logo.svg|180px|right|link=]]
Dear Wikimedians,
There is a CIS-A2K monthly Newsletter that is ready to share which is for the month of March. A few conducted events and ongoing activities are updated in the Newsletter. Through this message, A2K wants your attention towards its March 2023 tasks and towards upcoming events. In this newsletter, we have mentioned A2K's conducted and ongoing events/activities.
; Conducted events
* [[:m:CIS-A2K/Events/Women's Month Datathon on Commons|Women's Month Datathon on Commons]]
* [[:m:CIS-A2K/Events/Women's Month Datathon on Commons/Online Session|Women's Month Datathon on Commons/Online Session]]
* [[:m:CIS-A2K/Events/Hindi Wikisource Community skill-building workshop|Hindi Wikisource Community skill-building workshop]]
* [[:m:Indic Wikisource Community/Online meetup 25 March 2023|Indic Wikisource Community Online meetup 25 March 2023]]
; Ongoing activity
* [[:m:Indic Wikisource proofread-a-thon April 2023|Indic Wikisource proofread-a-thon April 2023]]
Please find the Newsletter link [[:m:CIS-A2K/Reports/Newsletter/March 2023|here]].
<br /><small>If you want to subscribe/unsubscribe to this newsletter, click [[:m:CIS-A2K/Reports/Newsletter/Subscribe|here]]. </small>
Thank you [[प्रयोगकर्ता:MediaWiki message delivery|MediaWiki message delivery]] ([[प्रयोगकर्ता वार्ता:MediaWiki message delivery|बात करीं]]) 10:30, 10 अप्रैल 2023 (UTC)
<!-- Message sent by User:Nitesh (CIS-A2K)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=CIS-A2K/Reports/Newsletter/Subscribe/VP&oldid=23719485 -->
== <span lang="en" dir="ltr" class="mw-content-ltr">Your wiki will be in read-only soon</span> ==
<div lang="en" dir="ltr" class="mw-content-ltr">
<section begin="server-switch"/><div class="plainlinks">
[[:m:Special:MyLanguage/Tech/Server switch|Read this message in another language]] • [https://meta.wikimedia.org/w/index.php?title=Special:Translate&group=page-Tech%2FServer+switch&language=&action=page&filter= {{int:please-translate}}]
The [[foundation:|Wikimedia Foundation]] tests the switch between its first and secondary data centers. This will make sure that Wikipedia and the other Wikimedia wikis can stay online even after a disaster. To make sure everything is working, the Wikimedia Technology department needs to do a planned test. This test will show if they can reliably switch from one data centre to the other. It requires many teams to prepare for the test and to be available to fix any unexpected problems.
All traffic will switch on '''{{#time:j xg|2023-04-26|en}}'''. The test will start at '''[https://zonestamp.toolforge.org/{{#time:U|2023-04-26T14:00|en}} {{#time:H:i e|2023-04-26T14:00}}]'''.
Unfortunately, because of some limitations in [[mw:Manual:What is MediaWiki?|MediaWiki]], all editing must stop while the switch is made. We apologize for this disruption, and we are working to minimize it in the future.
'''You will be able to read, but not edit, all wikis for a short period of time.'''
*You will not be able to edit for up to an hour on {{#time:l j xg Y|2023-04-26|en}}.
*If you try to edit or save during these times, you will see an error message. We hope that no edits will be lost during these minutes, but we can't guarantee it. If you see the error message, then please wait until everything is back to normal. Then you should be able to save your edit. But, we recommend that you make a copy of your changes first, just in case.
''Other effects'':
*Background jobs will be slower and some may be dropped. Red links might not be updated as quickly as normal. If you create an article that is already linked somewhere else, the link will stay red longer than usual. Some long-running scripts will have to be stopped.
* We expect the code deployments to happen as any other week. However, some case-by-case code freezes could punctually happen if the operation require them afterwards.
* [[mw:Special:MyLanguage/GitLab|GitLab]] will be unavailable for about 90 minutes.
This project may be postponed if necessary. You can [[wikitech:Switch_Datacenter|read the schedule at wikitech.wikimedia.org]]. Any changes will be announced in the schedule. There will be more notifications about this. A banner will be displayed on all wikis 30 minutes before this operation happens. '''Please share this information with your community.'''</div><section end="server-switch"/>
</div>
<bdi lang="en" dir="ltr">[[User:MediaWiki message delivery|MediaWiki message delivery]]</bdi> 00:41, 21 अप्रैल 2023 (UTC)
<!-- Message sent by User:UOzurumba (WMF)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=Distribution_list/Non-Technical_Village_Pumps_distribution_list&oldid=24748237 -->
== Wikimedia Foundation’s 2023-2024 Annual Plan and Upcoming Community Conversations ==
Hi Everyone,
The [https://meta.wikimedia.org/wiki/Wikimedia_Foundation_Annual_Plan/2023-2024 draft annual plan] of the Wikimedia Foundation applicable from July 2023 to June 2024 has been published and is '''open for feedback'''.
''While the entire annual plan is available in multiple languages, a [https://meta.wikimedia.org/wiki/Wikimedia_Foundation_Annual_Plan/2023-2024 short summary] is available in close to 30 languages including many from the region.''
'''Two-Way Planning/Conversations'''
Since last year, the Foundation has prioritized [https://meta.wikimedia.org/wiki/Wikimedia_Foundation_Annual_Plan/2022-2023/Two-Way_Planning two-way planning] with communities by asking community members to share their goals for the coming year. We are hosting [https://meta.wikimedia.org/wiki/Wikimedia_Foundation_Annual_Plan/2023-2024/Collaboration a series of calls/discussions] across various time zones to collaborate across the movement, for South Asia-based communities;
# In-person session during [https://meta.wikimedia.org/wiki/WikiConference_India_2023/Program WikiConference India], on the 28th of April with the attendees of the conference. (recording to be uploaded on meta).
# '''Virtual Discussion on the 30th of April, 2023 (0600 UTC)- Join Us!'''
We would like to invite you all to participate in the '''virtual discussion on the 30th of April''' where [https://wikimediafoundation.org/profile/lisa-seitz-gruwell/ Lisa Seitz Gruwell, Chief Advancement Officer, and Deputy to the Chief Executive Officer] would be sharing and discussing the plans with the movement.
'''Call Details'''
'''Virtual Discussion''' (Via Zoom)
'''Date''': 30th April 2023 (Sunday)
'''Time''': 0600 UTC ([https://zonestamp.toolforge.org/1682834411 ZoneStamp])
[https://diff.wikimedia.org/event/30th-april-annual-planning-call/ Diff Calendar Link]
Look forward to seeing you on the call.
Please add the above details to your [https://diff.wikimedia.org/event/30th-april-annual-planning-call/ respective calendars], and do get in touch with me if you have any further questions.
[https://meta.wikimedia.org/wiki/User:RASharma_(WMF) Rachit Sharma (WMF)]
<small>Sent using [[प्रयोगकर्ता:MediaWiki message delivery|MediaWiki message delivery]] ([[प्रयोगकर्ता वार्ता:MediaWiki message delivery|बात करीं]]) 04:29, 25 अप्रैल 2023 (UTC)</small>
<!-- Message sent by User:SGill (WMF)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=User:Nitesh_Gill/lists/Indic_VPs&oldid=24930250 -->
== <span lang="en" dir="ltr" class="mw-content-ltr">Seeking volunteers for the next step in the Universal Code of Conduct process</span> ==
<div lang="en" dir="ltr" class="mw-content-ltr">
<section begin="announcement-content" />
:''<div class="plainlinks">[[m:Special:MyLanguage/Universal Code of Conduct/U4C Building Committee/Nominations/Announcement|{{int:interlanguage-link-mul}}]] • [https://meta.wikimedia.org/w/index.php?title=Special:Translate&group=page-{{urlencode:Universal Code of Conduct/U4C Building Committee/Nominations/Announcement}}&language=&action=page&filter= {{int:please-translate}}]</div>''
Hello,
As follow-up to [https://lists.wikimedia.org/hyperkitty/list/wikimedia-l@lists.wikimedia.org/message/IOMVS7W75ZYMABQGOQ2QH2JAURC3CHGH/ the message about the Universal Code of Conduct Enforcement Guidelines] by Wikimedia Foundation Board of Trustees Vice Chair, Shani Evenstein Sigalov, I am reaching out about the next steps. I want to bring your attention to the next stage of the Universal Code of Conduct process, which is forming a building committee for the Universal Code of Conduct Coordinating Committee (U4C). I invite community members with experience and deep interest in community health and governance to nominate themselves to be part of the U4C building committee, which needs people who are:
* Community members in good standing
* Knowledgeable about movement community processes, such as, but not limited to, policy drafting, participatory decision making, and application of existing rules and policies on Wikimedia projects
* Aware and appreciative of the diversity of the movement, such as, but not limited to, languages spoken, identity, geography, and project type
* Committed to participate for the entire U4C Building Committee period from mid-May - December 2023
* Comfortable with engaging in difficult, but productive conversations
* Confidently able to communicate in English
The Building Committee shall consist of volunteer community members, affiliate board or staff, and Wikimedia Foundation staff.
The Universal Code of Conduct has been a process strengthened by the skills and knowledge of the community and I look forward to what the U4C Building Committee creates. If you are interested in joining the Building Committee, please either [[m:Special:MyLanguage/Universal_Code_of_Conduct/U4C_Building_Committee/Nominations|sign up on the Meta-Wiki page]], or contact ucocproject[[File:At sign.svg|16x16px|link=|(_AT_)]]wikimedia.org by May 12, 2023. '''[[m:Special:MyLanguage/Universal_Code_of_Conduct/U4C_Building_Committee|Read more on Meta-Wiki]]'''.
Best regards,<br /><section end="announcement-content" />
</div>
[[User:Xeno (WMF)|Xeno (WMF)]] 19:00, 26 अप्रैल 2023 (UTC)
<!-- Message sent by User:Xeno (WMF)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=Distribution_list/Global_message_delivery&oldid=24941045 -->
== <span lang="en" dir="ltr" class="mw-content-ltr">Automatic citations based on ISBN are broken</span> ==
<div lang="en" dir="ltr" class="mw-content-ltr">
<section begin="message" />
Apologies if this message does not reach you in your favorite language. [[:m:User:Elitre (WMF)/ISBN|You can help translate it centrally at Meta]]. Thanks for your help.
We have recently become unable to access the WorldCat API which provided the ability to generate citations using ISBN numbers. The Wikimedia Foundation's [[mw:Editing_team|Editing team]] is investigating several options to restore the functionality, but will need to disable ISBN citation generation for now.
This affects citations made with the [[mw:Special:MyLanguage/Help:VisualEditor/User_guide/Citations-Full#Automatic|VisualEditor Automatic tab]], and the use of the citoid API in gadgets and user scripts, such as the autofill button on [[:en:Wikipedia:RefToolbar|refToolbar]]. Please note that all the other automatic ways of generating citations, including via URL or DOI, are still available.
You can keep updated on the situation [[phab:T336298|via Phabricator]], or by reading the next issues of [[m:Tech News]]. If you know of any users or groups who rely heavily on this feature (for instance, someone who has an upcoming editathon), I'd appreciate it if you shared this update with them.
[[User:Elitre (WMF)|Elitre (WMF)]], on behalf of the Editing team.<section end="message" />
</div>
[[प्रयोगकर्ता:MediaWiki message delivery|MediaWiki message delivery]] ([[प्रयोगकर्ता वार्ता:MediaWiki message delivery|बात करीं]]) 19:45, 11 मई 2023 (UTC)
<!-- Message sent by User:Elitre (WMF)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=User:Quiddity_(WMF)/sandbox3&oldid=25009633 -->
== CIS-A2K Newsletter April 2023 ==
<br /><small>Please feel free to translate it into your language.</small>
[[File:Centre for Internet And Society logo.svg|180px|right|link=]]
Dear Wikimedians,
Greetings! CIS-A2K has done a few activities in the month of April and CIS-A2K's monthly Newsletter is ready to share which is for the last month. A few conducted events and ongoing activities are updated in the Newsletter. In this newsletter, we have mentioned A2K's conducted and ongoing events/activities.
; Conducted events
* [[:m:Indic Wikisource proofread-a-thon April 2023|Indic Wikisource proofread-a-thon April 2023]]
* [[:m:CIS-A2K/Events/Wikimedia session on building archive at ACPR, Belagavi|CIS-A2K/Events/Wikimedia session on building archive at ACPR, Belagavi]]
; Ongoing activity
* [[:c:Commons:Mula Mutha Nadi Darshan 2023|Mula Mutha Nadi Darshan 2023]]
Please find the Newsletter link [[:m:CIS-A2K/Reports/Newsletter/April 2023|here]].
<br /><small>If you want to subscribe/unsubscribe to this newsletter, click [[:m:CIS-A2K/Reports/Newsletter/Subscribe|here]]. </small>
Thank you [[प्रयोगकर्ता:MediaWiki message delivery|MediaWiki message delivery]] ([[प्रयोगकर्ता वार्ता:MediaWiki message delivery|बात करीं]]) 07:50, 15 मई 2023 (UTC)
<!-- Message sent by User:Nitesh (CIS-A2K)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=CIS-A2K/Reports/Newsletter/Subscribe/VP&oldid=23719485 -->
== Mula Mutha Nadi Darshan 2023 campaign cum photography contest ==
<br /><small>Please feel free to translate it into your language.</small>
Dear Wikimedians,
Greetings! CIS-A2K has started the Mula Mutha Nadi Darshan 2022 campaign cum photography contest on Wikimedia Commons from 15 May to 30 June. The aim of the contest is to document the Mula & Mutha rivers along with their tributaries in the Pune district on Wikimedia Commons in the form of images and videos. You can see more specific topics in the [[c:Commons:Mula Mutha Nadi Darshan 2023/Rivers & Topics|Rivers and Topics]] section. In this campaign, partner organisations like, Jeevitnadi, Ecological Society, Samuchit Enviro Tech, Nisarg Sevak, National Society for Clean Cities etc. are actively participating.
We are eager to see your contributions in this contest. For sign-up and upload please visit [[:c:Commons:Mula Mutha Nadi Darshan 2023|Mula Mutha Nadi Darshan 2023]].
Regards [[प्रयोगकर्ता:MediaWiki message delivery|MediaWiki message delivery]] ([[प्रयोगकर्ता वार्ता:MediaWiki message delivery|बात करीं]]) 05:19, 17 मई 2023 (UTC)
<!-- Message sent by User:Nitesh (CIS-A2K)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=User:Titodutta/lists/Indic_VPs&oldid=22433435 -->
== The upcoming calls conducted by A2K for or with communities ==
<small>Apologies for writing in English. Please feel free to translate it into your language.</small>
Dear Wikimedians,
We are excited to announce the launch of the [[:m:CIS-A2K/Events/India Community Monthly Engagement Calls|A2K Monthly Engagement Call]], a series of interactive sessions aimed at fostering collaborative learning within the Wikimedia community. The motive behind starting the series of interactive sessions is to bring the community together to discuss and interact about important topics. The first Monthly Engagement call will start with [[:m:Grants:Knowledge Sharing/Connect|Let’s Connect]] which is an initiative to create an open and safe learning space for all Wikimedians to share and learn different skills with other peers and to add value and contribute collectively to the community. The first call in this series, organized and hosted by CIS-A2K, will take place on [[:m:CIS-A2K/Events/India Community Monthly Engagement Calls/June 3, 2023 Call|June 3, 2023]], from 6:00 PM to 7:00 PM (IST).
One more announcement is about, on June 5, 2023, as we celebrate Environment Day, A2K is planning to engage communities and community members in discussions about potential activities for the month of June. These activities will involve capturing images of the environment, uploading them to Wikimedia Commons, and adding existing photos to articles on Wikipedia. We would love to invite Wikimedians to collaborate and join us in planning this activity on Sunday, May 28, 2023, from 11:00 am to 12:00 pm.
Call details are below:
* '''Preparatory Call for June Month Activity'''
* '''Sunday, May 28 · 11:00 am – 12:00 pm'''
* Time zone: Asia/Kolkata
* '''Video call link''': https://meet.google.com/rsy-nhsk-upp
Thank you [[प्रयोगकर्ता:MediaWiki message delivery|MediaWiki message delivery]] ([[प्रयोगकर्ता वार्ता:MediaWiki message delivery|बात करीं]]) 08:25, 25 मई 2023 (UTC)
<!-- Message sent by User:Nitesh (CIS-A2K)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=User:Titodutta/lists/Indic_VPs&oldid=22433435 -->
== <span lang="en" dir="ltr" class="mw-content-ltr">Selection of the U4C Building Committee</span> ==
<div lang="en" dir="ltr" class="mw-content-ltr">
<section begin="announcement-content" />
The next stage in the Universal Code of Conduct process is establishing a Building Committee to create the charter for the Universal Code of Conduct Coordinating Committee (U4C). The Building Committee has been selected. [[m:Special:MyLanguage/Universal_Code_of_Conduct/U4C_Building_Committee|Read about the members and the work ahead on Meta-wiki]].<section end="announcement-content" />
</div>
-- [[m:Special:MyLanguage/Universal_Code_of_Conduct/Project|UCoC Project Team]], 04:20, 27 मई 2023 (UTC)
<!-- Message sent by User:RamzyM (WMF)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=Distribution_list/Global_message_delivery&oldid=25018085 -->
== CIS-A2K Newsletter May 2023 ==
<br /><small>Please feel free to translate it into your language.</small>
[[File:Centre for Internet And Society logo.svg|180px|right|link=]]
Dear Wikimedians,
Greetings! We are pleased to inform you that CIS-A2K has successfully completed several activities during the month of May. As a result, our monthly newsletter, which covers the highlights of the previous month, is now ready to be shared. The newsletter includes updates on the conducted events and ongoing activities, providing a comprehensive overview of A2K's recent endeavours. We have taken care to mention both the conducted and ongoing events/activities in this newsletter, ensuring that all relevant information is captured.
; Conducted events
* Preparatory Call for June Month Activity
* Update on status of A2K's grant proposal
; Ongoing activity
* [[:c:Commons:Mula Mutha Nadi Darshan 2023|Mula Mutha Nadi Darshan 2023]]
; Upcoming Events
* Support to Punjabi Community Proofread-a-thon
Please find the Newsletter link [[:m:CIS-A2K/Reports/Newsletter/May 2023|here]].
<br /><small>If you want to subscribe/unsubscribe to this newsletter, click [[:m:CIS-A2K/Reports/Newsletter/Subscribe|here]]. </small>
Thank you [[प्रयोगकर्ता:MediaWiki message delivery|MediaWiki message delivery]] ([[प्रयोगकर्ता वार्ता:MediaWiki message delivery|बात करीं]])
<!-- Message sent by User:Nitesh (CIS-A2K)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=CIS-A2K/Reports/Newsletter/Subscribe/VP&oldid=23719485 -->
== Invitation to join at WikiConverse India Call - June 24th, 2023 ==
<small>Apologies to write in English please help us to translate the message in your language</small>
Greetings! WikiConverse India is a new initiative that A2K is working on to improve collaboration among communities in India. WikiConverse India aims to initiate and foster dialogue within the Indian language Wikimedia community on various topics that are important for the growth of the Wikimedia movement. Currently, we are conducting regular calls as part of this initiative. For the month of June, this call will be scheduled on June 24th, 2023, from 6:00 PM to 7:30 PM IST. A2K will invite Indian participants from recent international conferences, namely the Wikimedia Hackathon and EduWiki Conference, to share their important takeaways specifically relevant to India.
To join the WikiConverse India Call, You can find the call details below:
* WikiConverse India Call, June 24th, 2023
* Saturday, June 24 · 6:00 – 7:30pm IST
* Video call link: https://meet.google.com/qcm-rrac-qzk
If you have any questions, please write to a2k@cis-india.org. Regards [[प्रयोगकर्ता:MediaWiki message delivery|MediaWiki message delivery]] ([[प्रयोगकर्ता वार्ता:MediaWiki message delivery|बात करीं]]) 18:29, 16 जून 2023 (UTC)
<!-- Message sent by User:Nitesh (CIS-A2K)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=User:Titodutta/lists/Indic_VPs&oldid=22433435 -->
== Reminder: Invitation to Join WikiConverse India Call ==
<small>Apologies for writing in English</small>
Hello all,
As we informed you earlier, CIS-A2K has begun a new initiative to improve collaboration among communities in India. WikiConverse India aims to initiate and foster dialogue within the Indian language Wikimedia community on various topics that are important for the growth of the Wikimedia movement. Currently, we are conducting regular calls as part of this initiative. For the month of June, this call will be scheduled for June 24th, 2023, today at 6:00 PM. The call meta page is already prepared and you can find it [[:m:CIS-A2K/Events/WikiConverse India Calls/Takeaways of Indian Wikimedians from EduWiki Conference & Hackathon|here]].
The call details are here to join us:
* '''Topic''': WikiConverse India Call
* '''Time''': Jun 24, 2023 06:00 PM India
* '''Join Zoom Meeting''': https://us06web.zoom.us/j/88637468034?pwd=MUVBVm1MVXlYNm1OTjZCNGpsM3R2dz09
* '''Meeting ID''': 886 3746 8034
** '''Passcode''': 874408
We hope you can find some time to join us and listen to the amazing stories and learning experiences from the speakers. Regards [[प्रयोगकर्ता:MediaWiki message delivery|MediaWiki message delivery]] ([[प्रयोगकर्ता वार्ता:MediaWiki message delivery|बात करीं]]) 10:01, 24 जून 2023 (UTC)
<!-- Message sent by User:Nitesh (CIS-A2K)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=User:Titodutta/lists/Indic_VPs&oldid=22433435 -->
== <span lang="en" dir="ltr" class="mw-content-ltr"> Announcing the new Elections Committee members</span> ==
<div lang="en" dir="ltr" class="mw-content-ltr">
<section begin="announcement-content" />
:''[[m:Special:MyLanguage/Wikimedia Foundation elections committee/Nominatons/2023/Announcement - new members|You can find this message translated into additional languages on Meta-wiki.]]''
:''<div class="plainlinks">[[m:Special:MyLanguage/Wikimedia Foundation elections committee/Nominatons/2023/Announcement - new members|{{int:interlanguage-link-mul}}]] • [https://meta.wikimedia.org/w/index.php?title=Special:Translate&group=page-{{urlencode:Wikimedia Foundation elections committee/Nominatons/2023/Announcement - new members}}&language=&action=page&filter= {{int:please-translate}}]</div>''
Hello there,
We are glad to announce [[listarchive:list/wikimedia-l@lists.wikimedia.org/message/4TALOUFPAP2VDBR27GKRVOP7IGQYU3DB/|the new members and advisors of the Elections Committee]]. The [[m:Special:MyLanguage/Wikimedia_Foundation_elections_committee|Elections Committee]] assists with the design and implementation of the process to select Community- and Affiliate-Selected trustees for the Wikimedia Foundation Board of Trustees. After an open nomination process, the strongest candidates spoke with the Board and four candidates were asked to join the Elections Committee. Four other candidates were asked to participate as advisors.
Thank you to all the community members who submitted their names for consideration. We look forward to working with the Elections Committee in the near future.
On behalf of the Wikimedia Foundation Board of Trustees,<br /><section end="announcement-content" />
</div>
[[m:User:RamzyM (WMF)|RamzyM (WMF)]] 17:59, 28 जून 2023 (UTC)
<!-- Message sent by User:RamzyM (WMF)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=Distribution_list/Global_message_delivery&oldid=25018085 -->
== MinT Machine Translation added to your Wikipedia ==
<div lang="en" dir="ltr" class="mw-content-ltr">
{{int:Hello}}!
Apologies as this message is not in your language, {{int:Please help translate}} to your language.
The WMF Language team has added another machine translation (MT) system for [https://en.wikipedia.org/wiki/Special:ContentTranslation Content Translation] in your Wikipedia called MinT; you can use [https://www.mediawiki.org/wiki/Content_translation/Machine_Translation/MinT MinT machine translation] when translating Wikipedia articles using the Content and Section Translation tool.
The WMF Language team provides the MinT service. It is hosted in the Wikimedia Foundation Infrastructure with [https://en.wikipedia.org/wiki/Neural_machine_translation neural machine translation] models that other organizations have released with an open-source license. MinT integrates translation based on [https://ai.facebook.com/research/no-language-left-behind/ NLLB-200], [https://opus.nlpl.eu/ OpusMT], [https://ai4bharat.iitm.ac.in/indic-trans2 IndicTrans2] and [https://github.com/Softcatala/nmt-models Softcatalà]. This MT is set as optional in your Wikipedia. Still, you can choose not to use it by selecting "Start with empty paragraph" from the "Initial Translation" dropdown menu.
Since MinT is hosted in the WMF Infrastructure and the models are open source, it adheres to Wikipedia's policies about attribution of rights, your privacy as a user and brand representation. You can find more information about the MinT machine translation and the models on [https://www.mediawiki.org/wiki/Content%20translation/Machine%20Translation/MinT this page].
Please note that the use of the MinT MT is not compulsory. However, we would want your community to:
*use it to improve the quality of the Machine Translation service
*[https://www.mediawiki.org/wiki/Talk:Content_translation provide feedback] about its quality, and '''if you prefer the MinT machine translation as default in your Wikipedia'''.
We trust that introducing this MT is a good support to the Content Translation tool.
Thank you!
</div>
[[User:UOzurumba (WMF)|UOzurumba (WMF)]] ([[User talk:UOzurumba (WMF)|बातचीत]]) 22:01, 4 जुलाई 2023 (UTC) On behalf of the WMF Language team.
<!-- Message sent by User:UOzurumba (WMF)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=User:UOzurumba_(WMF)/sandbox_MinT_announcement_list_2&oldid=25258883 -->
== CIS-A2K Newsletter June 2023 ==
<br /><small>Please feel free to translate it into your language.</small>
[[File:Centre for Internet And Society logo.svg|180px|right|link=]]
Dear Wikimedians,
Greetings! We are pleased to inform you that CIS-A2K has successfully completed several activities during the month of June. As a result, our monthly newsletter, which covers the highlights of the previous month, is now ready to be shared. We have taken care to mention the conducted events/activities in this newsletter, ensuring that all relevant information is captured.
; Conducted events
* Community Engagement Calls and Activities
** India Community Monthly Engagement Calls: 3 June 2023 call
** Takeaways of Indian Wikimedians from EduWiki Conference & Hackathon
** Punjabi Wikisource Proofread-a-thon
* Skill Development Programs
** Wikidata Training Sessions for Santali Community
* Indian Community Need Assessment and Transition Calls
* Partnerships and Trainings
** Academy of Comparative Philosophy and Religion GLAM Project
** Wikimedia Commons sessions with river activists
** Introductory session on Wikibase for Academy of Comparative Philosophy and Religion members
Please find the Newsletter link [[:m:CIS-A2K/Reports/Newsletter/June 2023|here]].
<br /><small>If you want to subscribe/unsubscribe to this newsletter, click [[:m:CIS-A2K/Reports/Newsletter/Subscribe|here]]. </small>
Thank you [[प्रयोगकर्ता:MediaWiki message delivery|MediaWiki message delivery]] ([[प्रयोगकर्ता वार्ता:MediaWiki message delivery|बात करीं]]) 07:27, 17 जुलाई 2023 (UTC)
<!-- Message sent by User:Nitesh (CIS-A2K)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=CIS-A2K/Reports/Newsletter/Subscribe/VP&oldid=23719485 -->
== Deploying the Phonos in-line audio player to your Wiki ==
<div lang="en" dir="ltr" class="mw-content-ltr">
<div lang="en" dir="ltr" class="mw-content-ltr">
{{int:Hello}}!
Apologies if this message is not in your language, {{int:Please help translate}} to your language.
This wiki will soon be able to use the [[mw:Help:Extension:Phonos#Inline_audio_player_mode|inline audio player]] implemented by the [[mw:Extension:Phonos|Phonos]] extension. This is part of fulfilling a wishlist proposal of providing [[m:Community_Wishlist_Survey_2022/Multimedia_and_Commons/Audio_links_that_play_on_click|audio links that play on click]].
With the inline audio player, you can add text-to-speech audio snippets to wiki pages by simply using a tag:
<syntaxhighlight lang="wikitext">
<phonos file="audio file" label="Listen"/>
</syntaxhighlight>
The above tag will show the text next to a speaker icon, and clicking on it will play the audio instantly without taking you to another page. A common example where you can use this feature is in adding pronunciation to words as illustrated on the [[wiktionary:en:English#Pronunciation|English Wiktionary]] below.
<syntaxhighlight lang="wikitext">
{{audio|en|En-uk-English.oga|Audio (UK)}}
</syntaxhighlight>
Could become:
<syntaxhighlight lang="wikitext">
<phonos file="En-uk-English.oga" label="Audio (UK)"/>
</syntaxhighlight>
The inline audio player will be available in your wiki in 2 weeks time; in the meantime, we would like you to [[mw:Special:MyLanguage/Help:Extension:Phonos|read about the features]] and give us feedback or ask questions about it in this [[mw:Help_talk:Extension:Phonos|talk page]].
Thank you!</div>
<bdi lang="en" dir="ltr">[[m:User:UOzurumba (WMF)|UOzurumba (WMF)]], on behalf of the Foundation's Language team</bdi>
</div>
02:26, 27 जुलाई 2023 (UTC)
<!-- Message sent by User:UOzurumba (WMF)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=User:UOzurumba_(WMF)/sandbox_announcement_list_(In-line_audio_player)&oldid=25350821 -->
== Announcement of Train the Trainer 2023 and Call for Scholarship ==
Dear all,
We are excited to announce the reactivation of the [[:m:CIS-A2K/Events/Train the Trainer Program|Train the Trainer (TTT)]] initiative by CIS-A2K in 2023. TTT aims to empower Indian Wikimedians like you with essential skills to support Wikimedia communities effectively. Through this program, we seek to enhance your capacity, encourage knowledge sharing, identify growth opportunities, and enable a positive impact on the communities you serve. The [https://forms.gle/GynAYyGzoNXh4VM26 scholarship application] period is from ‘‘‘1st to 14th August 2023’’’. Unfortunately, we regretfully cannot consider applications from non-Indian Wikimedians due to logistical and compliance-related constraints. The event is scheduled for the end of September or the beginning of October 2023, and final dates and venue details will be announced soon. We encourage your active participation in [[:m:CIS-A2K/Events/Train the Trainer Program/2023|TTT 2023]] and welcome you to apply for scholarships via the provided form.
For inquiries, please contact us at a2K@cis-india.org or nitesh@cis-india.org. We look forward to your enthusiastic involvement in making Train the Trainer 2023 a resounding success!
Regards,
Nitesh (CIS-A2K)
<!-- Message sent by User:Nitesh (CIS-A2K)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=User:Titodutta/lists/Indic_VPs&oldid=22433435 -->
== Reminder for TTT Scholarship and announcement about Event dates ==
Dear all,
We wanted to remind you about the Scholarship form for the [[:m:CIS-A2K/Events/Train the Trainer Program/2023|Train the Trainer 2023 program]] and also provide you with the event dates. We encourage you to apply for scholarships to participate in Train the Trainer 2023, as it offers a valuable opportunity for you to actively contribute to your language communities. The scholarship form is accessible [https://forms.gle/GynAYyGzoNXh4VM26 here], and the submission window will remain open until 14th August 2023. If you are genuinely interested in promoting knowledge sharing and community empowerment, we strongly encourage you to fill out the form. (Please note that we won't be able to consider applications from Wikimedians based outside of India for TTT 2023.)
The Train The Trainer program will take place on 29th, 30th September, and 1st October 2023. This program provides you an opportunity to enhance your leadership and community-building skills. Thank you for your attention.
<!-- Message sent by User:Nitesh (CIS-A2K)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=User:Titodutta/lists/Indic_VPs&oldid=22433435 -->
== CIS-A2K Newsletter July 2023 ==
<br /><small>Please feel free to translate it into your language.</small>
[[File:Centre for Internet And Society logo.svg|180px|right|link=]]
Dear Wikimedians,
Greetings! We are pleased to inform you that CIS-A2K has successfully completed several activities during the month of July. As a result, our monthly newsletter, which covers the highlights of the previous month, is now ready to be shared. We have taken care to mention the conducted events/activities in this newsletter, ensuring that all relevant information is captured.
; Conducted events
* Wikibase session with RIWATCH GLAM
* Wikibase technical session with ACPR GLAM
* Wikidata Training Sessions for Santali Community
* An interactive session with some Wikimedia Foundation staff from India
; Announcement
* Train The Trainer 2023 Program
Please find the Newsletter link [[:m:CIS-A2K/Reports/Newsletter/July 2023|here]].
<br /><small>If you want to subscribe/unsubscribe to this newsletter, click [[:m:CIS-A2K/Reports/Newsletter/Subscribe|here]]. </small>
Thank you [[प्रयोगकर्ता:MediaWiki message delivery|MediaWiki message delivery]] ([[प्रयोगकर्ता वार्ता:MediaWiki message delivery|बात करीं]]) 16:23, 8 अगस्त 2023 (UTC)
<!-- Message sent by User:Nitesh (CIS-A2K)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=CIS-A2K/Reports/Newsletter/Subscribe/VP&oldid=23719485 -->
== <span lang="en" dir="ltr" class="mw-content-ltr">Review the Charter for the Universal Code of Conduct Coordinating Committee</span> ==
<div lang="en" dir="ltr" class="mw-content-ltr">
<section begin="announcement-content" />
:''<div class="plainlinks">[[m:Special:MyLanguage/Universal Code of Conduct/U4C Building Committee/Announcement - Review|{{int:interlanguage-link-mul}}]] • [https://meta.wikimedia.org/w/index.php?title=Special:Translate&group=page-{{urlencode:Universal Code of Conduct/U4C Building Committee/Announcement - Review}}&language=&action=page&filter= {{int:please-translate}}]</div>''
Hello all,
I am pleased to share the next step in the [[foundation:Special:MyLanguage/Policy:Universal Code of Conduct|Universal Code of Conduct]] work. The [[m:Special:MyLanguage/Universal Code of Conduct/Coordinating Committee/Charter|Universal Code of Conduct Coordinating Committee (U4C) draft charter]] is now ready for your review.
The [[foundation:Special:MyLanguage/Policy:Universal Code of Conduct/Enforcement guidelines|Enforcement Guidelines]] require a [[foundation:Special:MyLanguage/Policy:Universal_Code_of_Conduct/Enforcement_guidelines#4.5_U4C_Building_Committee|Building Committee]] form to draft a charter that outlines procedures and details for a global committee to be called the [[foundation:Special:MyLanguage/Policy:Universal_Code_of_Conduct/Enforcement_guidelines#4._UCoC_Coordinating_Committee_(U4C)|Universal Code of Conduct Coordinating Committee (U4C)]]. Over the past few months, the U4C Building Committee worked together as a group to discuss and draft the U4C charter. The U4C Building Committee welcomes feedback about the draft charter now through 22 September 2023. After that date, the U4C Building Committee will revise the charter as needed and a community vote will open shortly afterward.
Join the conversation during the [[m:Special:MyLanguage/Universal Code of Conduct/U4C Building Committee#Conversation hours|conversation hours]] or on [[m:Talk:Universal Code of Conduct/Coordinating Committee/Charter|Meta-wiki]].
Best,<br /><section end="announcement-content" />
</div>
[[m:User:RamzyM (WMF)|RamzyM (WMF)]], on behalf of the U4C Building Committee, 15:35, 28 अगस्त 2023 (UTC)
<!-- Message sent by User:RamzyM (WMF)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=Distribution_list/Global_message_delivery&oldid=25392152 -->
== Invitation to the Indic Community Monthly Engagement Call on September 8, 2023 ==
Dear Wikimedians,
A2K is excited to invite you to the third call of the [[:m:CIS-A2K/Events/Indic Community Monthly Engagement Calls|Indic Community Monthly Engagement Calls]] initiative scheduled for September 8, 2023, where A2K is hosting “Learning Clinic: Collective learning from grantee reports in South Asia” by Let’s Connect. This event is designed to foster collaboration and knowledge-sharing among community members interested in the region's progress, grantees, potential grantees, and Regional Fund Committee members. The dedicated meta page is [[:m:CIS-A2K/Events/Indic Community Monthly Engagement Calls/September 8, 2023 Call|here]]. Here are the details:
* Date: September 8th
* Time: 6:00 PM - 7:30 PM IST
* Language: English
* Facilitation: Jessica Stephenson (WMF - Let’s Connect), Pavan Santhosh (CIS-A2K), Chinmayee Mishra (Let’s Connect working group)
* Duration: 1.5 hours
* Zoom Link: [https://us06web.zoom.us/j/82712474511?pwd=YUF3SE8yeWpWK0I0Z2QzQW9HN2x5dz09 Zoom Link]
You can find detailed information on the given meta page. We look forward to meeting you there tomorrow. :) Regards [[प्रयोगकर्ता:MediaWiki message delivery|MediaWiki message delivery]] ([[प्रयोगकर्ता वार्ता:MediaWiki message delivery|बात करीं]]) 11:01, 7 सितंबर 2023 (UTC)
<!-- Message sent by User:Nitesh (CIS-A2K)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=User:Titodutta/lists/Indic_VPs&oldid=22433435 -->
== <span lang="en" dir="ltr" class="mw-content-ltr">Your wiki will be in read-only soon</span> ==
<div lang="en" dir="ltr" class="mw-content-ltr">
<section begin="server-switch"/><div class="plainlinks">
[[:m:Special:MyLanguage/Tech/Server switch|Read this message in another language]] • [https://meta.wikimedia.org/w/index.php?title=Special:Translate&group=page-Tech%2FServer+switch&language=&action=page&filter= {{int:please-translate}}]
The [[foundation:|Wikimedia Foundation]] will switch the traffic between its data centers. This will make sure that Wikipedia and the other Wikimedia wikis can stay online even after a disaster. To make sure everything is working, the Wikimedia Technology department needs to do a planned test. This test will show if they can reliably switch from one data centre to the other. It requires many teams to prepare for the test and to be available to fix any unexpected problems.
All traffic will switch on '''{{#time:j xg|2023-09-20|en}}'''. The test will start at '''[https://zonestamp.toolforge.org/{{#time:U|2023-09-20T14:00|en}} {{#time:H:i e|2023-09-20T14:00}}]'''.
Unfortunately, because of some limitations in [[mw:Special:MyLanguage/Manual:What is MediaWiki?|MediaWiki]], all editing must stop while the switch is made. We apologize for this disruption, and we are working to minimize it in the future.
'''You will be able to read, but not edit, all wikis for a short period of time.'''
*You will not be able to edit for up to an hour on {{#time:l j xg Y|2023-09-20|en}}.
*If you try to edit or save during these times, you will see an error message. We hope that no edits will be lost during these minutes, but we can't guarantee it. If you see the error message, then please wait until everything is back to normal. Then you should be able to save your edit. But, we recommend that you make a copy of your changes first, just in case.
''Other effects'':
*Background jobs will be slower and some may be dropped. Red links might not be updated as quickly as normal. If you create an article that is already linked somewhere else, the link will stay red longer than usual. Some long-running scripts will have to be stopped.
* We expect the code deployments to happen as any other week. However, some case-by-case code freezes could punctually happen if the operation require them afterwards.
* [[mw:Special:MyLanguage/GitLab|GitLab]] will be unavailable for about 90 minutes.
This project may be postponed if necessary. You can [[wikitech:Switch_Datacenter|read the schedule at wikitech.wikimedia.org]]. Any changes will be announced in the schedule. There will be more notifications about this. A banner will be displayed on all wikis 30 minutes before this operation happens. '''Please share this information with your community.'''</div><section end="server-switch"/>
</div>
[[User:Trizek (WMF)|Trizek_(WMF)]] ([[m:User talk:Trizek (WMF)|talk]]) 09:23, 15 सितंबर 2023 (UTC)
<!-- Message sent by User:Trizek (WMF)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=Distribution_list/Non-Technical_Village_Pumps_distribution_list&oldid=25018086 -->
== Announcing Indic Wikimedia Hackathon 2023 and Invitation to Participate ==
Dear Wikimedians,
The [[:m:Indic_MediaWiki_Developers_User_Group|Indic MediaWiki Developers User Group]] is happy to announce '''Indic Wikimedia Hackathon 2023 on 16-17 December 2023 in Pondicherry, India'''.
The event is for everyone who contributes to Wikimedia’s technical spaces code developers, maintainers, translators, designers, technical writers and other related technical aspects. Along with that, contributors who don't necessarily contribute to technical spaces but have good understanding of issues on wikis and can work with developers in addressing them can join too. You can come with a project in mind, join an existing project, or create something new with others. The goal of this event is to bring together technical contributors from India to resolve pending technical issues, bugs, brainstorm on tooling ideas, and foster connections between contributors.
We have scholarships to support participation of contributors residing in India. The '''scholarship form can be filled at https://docs.google.com/forms/d/e/1FAIpQLSd_Qqctj7I87QfYt5imc6iPcGPWuPfncCOyAd_OMbGiqxzxhQ/viewform?usp=sf_link and will close at 23:59 hrs on 15 October 2023 (Sunday) [IST].'''
Please reach out to contact{{@}}indicmediawikidev.org if you have any questions or need support.
Best, Indic MediaWiki Developers UG, 04:40, 4 अक्टूबर 2023 (UTC)
<!-- Message sent by User:KCVelaga@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=Global_message_delivery/Targets/South_Asia_Village_Pumps&oldid=25696853 -->
== Image Description Month in India: 1 October to 31st October ==
<small>Apologies for writing in English.</small>
Dear everyone,
We're excited to invite you to the [[:m:CIS-A2K/Events/Image Description Month in India|Image Description Month India]] description-a-thon, set to take place from October 1st to October 31st, 2023. During this event, we'll be focusing on improving image-related content across Wikimedia projects, including Wikipedia, Wikidata, and Wikimedia Commons.
To stay updated and get involved, please visit our dedicated event page [[:m:CIS-A2K/Events/Image Description Month in India|event Page]].
Your active participation will be instrumental in enhancing Wikimedia content and making it more accessible to users worldwide. Thank you :) [[प्रयोगकर्ता:MediaWiki message delivery|MediaWiki message delivery]] ([[प्रयोगकर्ता वार्ता:MediaWiki message delivery|बात करीं]]) 14:35, 5 अक्टूबर 2023 (UTC)
<!-- Message sent by User:Nitesh (CIS-A2K)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=User:Titodutta/lists/Indic_VPs&oldid=22433435 -->
== <span lang="en" dir="ltr" class="mw-content-ltr">== Opportunities open for the Affiliations Committee, Ombuds commission, and the Case Review Committee ==</span> ==
<div lang="en" dir="ltr" class="mw-content-ltr">
<section begin="announcement-content" />
<div style="margin:.2em 0 .5em;margin-{{#switch:{{PAGELANGUAGE}}|ar|arc|ary|arz|azb|bcc|bgn|ckb|bqi|dv|fa|fa-af|glk|ha-arab|he|kk-arab|kk-cn|ks|ku-arab|ms-arab|mzn|pnb|prd|ps|sd|ug|ur|ydd|yi=right|left}}:3ex;">
[[m:Special:MyLanguage/Wikimedia Foundation Legal department/Committee appointments/Announcement/Short|''You can find this message translated into additional languages on Meta-wiki.'']]
''<span class="plainlinks">[[m:Special:MyLanguage/Wikimedia Foundation Legal department/Committee appointments/Announcement/Short|{{int:interlanguage-link-mul}}]] • [https://meta.wikimedia.org/w/index.php?title=Special:Translate&group=page-{{urlencode:Wikimedia Foundation Legal department/Committee appointments/Announcement/Short}}&language=&action=page&filter= {{int:please-translate}}]</span>''</div>
Hi everyone! The [[m:Special:MyLanguage/Affiliations Committee|Affiliations Committee]] (AffCom), [[m:Special:MyLanguage/Ombuds_commission|Ombuds commission]] (OC), and the [[m:Special:MyLanguage/Trust_and_Safety/Case_Review_Committee|Case Review Committee]] (CRC) are looking for new members. These volunteer groups provide important structural and oversight support for the community and movement. People are encouraged to nominate themselves or encourage others they feel would contribute to these groups to apply. There is more information about the roles of the groups, the skills needed, and the opportunity to apply on the [[m:Special:MyLanguage/Wikimedia Foundation Legal department/Committee appointments|'''Meta-wiki page''']].
On behalf of the Committee Support team,<br /><section end="announcement-content" />
</div>
<div lang="en" dir="ltr" class="mw-content-ltr">
~ [[m:User:Keegan (WMF)|Keegan (WMF)]] ([[m:User talk:Keegan (WMF)|talk]]) 16:41, 9 अक्टूबर 2023 (UTC) </div>
<!-- Message sent by User:Keegan (WMF)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=Distribution_list/Global_message_delivery&oldid=25570445 -->
== A2K Monthly Newsletter for September 2023 ==
<br /><small>Please feel free to translate it into your language.</small>
[[File:Centre for Internet And Society logo.svg|180px|right|link=]]
Dear Wikimedians,
In September, CIS-A2K successfully completed several initiatives. As a result, A2K has compiled a comprehensive monthly newsletter that highlights the events and activities conducted during the previous month. This newsletter provides a detailed overview of the key information related to our endeavors.
; Conducted events
* Learning Clinic: Collective learning from grantee reports in South Asia
* Relicensing and Digitisation workshop at Govinda Dasa College, Surathkal
* Relicensing and Digitisation workshop at Sayajirao Gaekwad Research Centre, Aurangabad
* Wiki Loves Monuments 2023 Outreach in Telangana
* Mula Mutha Nadi Darshan Photography contest results and exhibition of images
* Train The Trainer 2023
Please find the Newsletter link [[:m:CIS-A2K/Reports/Newsletter/September 2023|here]].
<br /><small>If you want to subscribe/unsubscribe to this newsletter, click [[:m:CIS-A2K/Reports/Newsletter/Subscribe|here]]. </small>
Regards [[प्रयोगकर्ता:MediaWiki message delivery|MediaWiki message delivery]] ([[प्रयोगकर्ता वार्ता:MediaWiki message delivery|बात करीं]]) 15:52, 10 अक्टूबर 2023 (UTC)
<!-- Message sent by User:Nitesh (CIS-A2K)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=CIS-A2K/Reports/Newsletter/Subscribe/VP&oldid=23719485 -->
== <span lang="en" dir="ltr" class="mw-content-ltr">Review and comment on the 2024 Wikimedia Foundation Board of Trustees selection rules package</span> ==
<div lang="en" dir="ltr" class="mw-content-ltr">
<section begin="announcement-content" />
:''[[m:Special:MyLanguage/wiki/Wikimedia Foundation elections/2024/Announcement/Rules package review - short| You can find this message translated into additional languages on Meta-wiki.]]''
:''<div class="plainlinks">[[m:Special:MyLanguage/wiki/Wikimedia Foundation elections/2024/Announcement/Rules package review - short|{{int:interlanguage-link-mul}}]] • [https://meta.wikimedia.org/w/index.php?title=Special:Translate&group=page-{{urlencode:wiki/Wikimedia Foundation elections/2024/Announcement/Rules package review - short}}&language=&action=page&filter= {{int:please-translate}}]</div>''
Dear all,
Please review and comment on the Wikimedia Foundation Board of Trustees selection rules package from now until 29 October 2023. The selection rules package was based on older versions by the Elections Committee and will be used in the 2024 Board of Trustees selection. Providing your comments now will help them provide a smoother, better Board selection process. [[m:Special:MyLanguage/Wikimedia Foundation elections/2024|More on the Meta-wiki page]].
Best,
Katie Chan <br>
Chair of the Elections Committee<br /><section end="announcement-content" />
</div>
01:12, 17 अक्टूबर 2023 (UTC)
<!-- Message sent by User:RamzyM (WMF)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=Distribution_list/Global_message_delivery&oldid=25570445 -->
== A2K Monthly Newsletter for October 2023 ==
<br /><small>Please feel free to translate it into your language.</small>
[[File:Centre for Internet And Society logo.svg|180px|right|link=]]
Dear Wikimedians,
In the month of October, CIS-A2K achieved significant milestones and successfully concluded various initiatives. As a result, we have compiled a comprehensive monthly newsletter to showcase the events and activities conducted during the preceding month. This newsletter offers a detailed overview of the key information pertaining to our various endeavors.
; Conducted events
* Image Description Month in India
* WikiWomen Camp 2023
** WWC 2023 South Asia Orientation Call
** South Asia Engagement
* Wikimedia Commons session for Birdsong members
* Image Description Month in India Training Session
Please find the Newsletter link [[:m:CIS-A2K/Reports/Newsletter/October 2023|here]].
<br /><small>If you want to subscribe/unsubscribe to this newsletter, click [[:m:CIS-A2K/Reports/Newsletter/Subscribe|here]]. </small>
Regards [[प्रयोगकर्ता:MediaWiki message delivery|MediaWiki message delivery]] ([[प्रयोगकर्ता वार्ता:MediaWiki message delivery|बात करीं]]) 05:25, 7 नवंबर 2023 (UTC)
<!-- Message sent by User:Nitesh (CIS-A2K)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=CIS-A2K/Reports/Newsletter/Subscribe/VP&oldid=23719485 -->
== <span lang="en" dir="ltr" class="mw-content-ltr">Coming soon: Reference Previews</span> ==
<div lang="en" dir="ltr" class="mw-content-ltr">
<section begin="ReferencePreviewsDefault"/>
[[File:Example_of_a_Reference_Preview.png|right|300px]]
A new feature is coming to your wiki soon: Reference Previews are popups for references. Such popups have existed on wikis as local gadgets for many years. Now there is a central solution, available on all wikis, and consistent with the [[mw:Special:MyLanguage/Page Previews|PagePreviews feature]].
Reference Previews will be visible to everyone, including readers. If you don’t want to see them, [[m:WMDE Technical Wishes/ReferencePreviews#Opt-out feature|you can opt out]]. If you are [[Special:Preferences#mw-prefsection-gadgets|using the gadgets]] Reference Tooltips or Navigation Popups, you won’t see Reference Previews unless you disable the gadget.
Reference Previews have been a beta feature on many wikis since 2019, and a default feature on some since 2021. Deployment is planned for November 22.
* [[mw:Special:MyLanguage/Help:Reference Previews|Help page]]
* [[m:WMDE Technical Wishes/ReferencePreviews|Project page with more information (in English)]].
* Feedback is welcome [[m:Talk:WMDE Technical Wishes/ReferencePreviews|on this talk page]].
-- For [[m:WMDE Technical Wishes|Wikimedia Deutschland’s Technical Wishes]] team,
<section end="ReferencePreviewsDefault"/>
</div>
[[m:User:Johanna Strodt (WMDE)|Johanna Strodt (WMDE)]], 13:11, 15 नवंबर 2023 (UTC)
<!-- Message sent by User:Johanna Strodt (WMDE)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=WMDE_Technical_Wishes/Technical_Wishes_News_list_all_village_pumps&oldid=25866958 -->
== A2K Community Needs Assessment Form ==
In late November, A2K hosted a significant call as part of [[:m:CIS-A2K/Events/WikiConverse India Calls/2023 A2K Needs Assessment Event|WikiConverse India discussions]], aiming to understand the diverse needs of Indian Communities! We deeply appreciate the active participation of every community member, as your valuable suggestions and opinions will be instrumental in shaping A2K's future initiatives.
To enrich this collaborative effort, we've crafted a [https://docs.google.com/forms/d/e/1FAIpQLSfFfRvf844FKb1La0UC7fXHzofxrZorpr3QjDGJL1a0iOgXyQ/viewform form]. Your responses will provide key components for a broader needs assessment, offering profound insights into the community's suggestions and guiding A2K’s future plans. We invite you to invest just a few precious minutes in sharing your thoughts, ideas, efforts, and impactful initiatives! If you have any doubts or queries, feel free to reach out to nitesh@cis-india.org.
Thank you for being an integral part of our vibrant community! Regards [[प्रयोगकर्ता:MediaWiki message delivery|MediaWiki message delivery]] ([[प्रयोगकर्ता वार्ता:MediaWiki message delivery|बात करीं]]) 08:44, 5 दिसंबर 2023 (UTC)
<!-- Message sent by User:Nitesh (CIS-A2K)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=User:Titodutta/lists/Indic_VPs&oldid=22433435 -->
== Enhancing Your Wikimania 2024 Scholarship Application: Community Call and Volunteer Support ==
Dear Wikimedians,
I hope this message finds you well. A2K is excited to share news about an upcoming A2K initiative to support Indian Wikimedians in the Wikimania 2024 scholarship process.
;Community Call with Experienced Wikimedians:
Join the community call on December 9, 2023, featuring experienced Indian Wikimedians. Gain insights into the Wikimania scholarship process, key application elements, and participate in a Q&A session.
;Volunteer Committee:
A dedicated volunteer committee will assist applicants through Zoom Room Support Sessions, offering one-on-one discussions, personalized feedback, and application enhancement strategies.
For more details and to register:
* Community Call Meta page: [[:m:CIS-A2K/Events/Indic Community Monthly Engagement Calls/December 9, 2023 Call|link]]
* Date: 9 December 2023
* Time: 6:00 PM to 7:30 PM IST
We invite your active participation and look forward to your engagement in this community call. Regards [[प्रयोगकर्ता:MediaWiki message delivery|MediaWiki message delivery]] ([[प्रयोगकर्ता वार्ता:MediaWiki message delivery|बात करीं]]) 06:50, 7 दिसंबर 2023 (UTC)
<!-- Message sent by User:Nitesh (CIS-A2K)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=User:Titodutta/lists/Indic_VPs&oldid=22433435 -->
== A2K Monthly Report for November 2023 ==
<br /><small>Please feel free to translate it into your language.</small>
[[File:Centre for Internet And Society logo.svg|180px|right|link=]]
Dear Wikimedians,
CIS-A2K wrapped up several initiatives in November, and we've compiled a detailed monthly newsletter highlighting the events and activities from the past month. This newsletter provides a comprehensive overview of key information regarding our diverse endeavors.
; Conducted events
* Heritage Walk in 175 year old Pune Nagar Vachan Mandir library
* 2023 A2K Needs Assessment Event
* Train The Trainer Report
Please find the Newsletter link [[:m:CIS-A2K/Reports/Newsletter/November 2023|here]].
<br /><small>If you want to subscribe/unsubscribe to this newsletter, click [[:m:CIS-A2K/Reports/Newsletter/Subscribe|here]]. </small> Regards [[प्रयोगकर्ता:MediaWiki message delivery|MediaWiki message delivery]] ([[प्रयोगकर्ता वार्ता:MediaWiki message delivery|बात करीं]]) 05:54, 11 दिसंबर 2023 (UTC)
<!-- Message sent by User:Nitesh (CIS-A2K)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=CIS-A2K/Reports/Newsletter/Subscribe/VP&oldid=23719485 -->
== <span lang="en" dir="ltr" class="mw-content-ltr">(New) Feature on [[mw:Special:MyLanguage/Help:Extension:Kartographer|Kartographer]]: Adding geopoints via QID</span> ==
<div lang="en" dir="ltr" class="mw-content-ltr">
<section begin="Body"/>Since September 2022, it is possible to create geopoints using a QID. Many wiki contributors have asked for this feature, but it is not being used much. Therefore, we would like to remind you about it. More information can be found on the [[M:WMDE_Technical_Wishes/Geoinformation/Geopoints via QID|project page]]. If you have any comments, please let us know on the [[M:Talk:WMDE Technical Wishes/Geoinformation/Geopoints via QID|talk page]]. – Best regards, the team of Technical Wishes at Wikimedia Deutschland
<section end="Body"/>
</div>
[[M:User:Thereza Mengs (WMDE)|Thereza Mengs (WMDE)]] 12:31, 13 दिसंबर 2023 (UTC)
<!-- Message sent by User:Thereza Mengs (WMDE)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=WMDE_Technical_Wishes/Technical_Wishes_News_list_all_village_pumps&oldid=25955829 -->
== Do you use Wikidata in Wikimedia sibling projects? Tell us about your experiences ==
<div lang="en" dir="ltr" class="mw-content-ltr">
''Note: Apologies for cross-posting and sending in English.''
Hello, the '''[[m:WD4WMP|Wikidata for Wikimedia Projects]]''' team at Wikimedia Deutschland would like to hear about your experiences using Wikidata in the sibling projects. If you are interested in sharing your opinion and insights, please consider signing up for an interview with us in this '''[https://wikimedia.sslsurvey.de/Wikidata-for-Wikimedia-Interviews Registration form]'''.<br>
''Currently, we are only able to conduct interviews in English.''
The front page of the form has more details about what the conversation will be like, including how we would '''compensate''' you for your time.
For more information, visit our ''[[m:WD4WMP/AddIssue|project issue page]]'' where you can also share your experiences in written form, without an interview.<br>We look forward to speaking with you, [[m:User:Danny Benjafield (WMDE)|Danny Benjafield (WMDE)]] ([[m:User talk:Danny Benjafield (WMDE)|talk]]) 08:53, 5 January 2024 (UTC)
</div>
<!-- Message sent by User:Danny Benjafield (WMDE)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=Global_message_delivery/Targets/WD4WMP/ScreenerInvite&oldid=26027495 -->
== Reusing references: Can we look over your shoulder? ==
''Apologies for writing in English.''
The Technical Wishes team at Wikimedia Deutschland is planning to [[m:WMDE Technical Wishes/Reusing references|make reusing references easier]]. For our research, we are looking for wiki contributors willing to show us how they are interacting with references.
* The format will be a 1-hour video call, where you would share your screen. [https://wikimedia.sslsurvey.de/User-research-into-Reusing-References-Sign-up-Form-2024/en/ More information here].
* Interviews can be conducted in English, German or Dutch.
* [[mw:WMDE_Engineering/Participate_in_UX_Activities#Compensation|Compensation is available]].
* Sessions will be held in January and February.
* [https://wikimedia.sslsurvey.de/User-research-into-Reusing-References-Sign-up-Form-2024/en/ Sign up here if you are interested.]
* Please note that we probably won’t be able to have sessions with everyone who is interested. Our UX researcher will try to create a good balance of wiki contributors, e.g. in terms of wiki experience, tech experience, editing preferences, gender, disability and more. If you’re a fit, she will reach out to you to schedule an appointment.
We’re looking forward to seeing you, [[m:User:Thereza Mengs (WMDE)| Thereza Mengs (WMDE)]]
<!-- Message sent by User:Thereza Mengs (WMDE)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=WMDE_Technical_Wishes/Technical_Wishes_News_list_all_village_pumps&oldid=25956752 -->
== A2K Monthly Report for December 2023 ==
<br /><small>Please feel free to translate it into your language.</small>
[[File:Centre for Internet And Society logo.svg|180px|right|link=]]
Dear Wikimedians,
In December, CIS-A2K successfully concluded various initiatives, and we have curated an in-depth monthly newsletter summarizing the events and activities of the past month. This newsletter offers a comprehensive overview of key information, showcasing our diverse endeavors.
; Conducted events
* Digital Governance Roundtable
* Indic Community Monthly Engagement Calls: Wikimania Scholarship Call
* Indic Wikimedia Hackathon 2023
* A2K Meghalaya Visit Highlights: Digitization and Collaboration
* Building Bridges: New Hiring in CIS-A2K
* Upcoming Events
** Upcoming Call: Disinformation and Misinformation in Wikimedia projects
Please find the Newsletter link [[:m:CIS-A2K/Reports/Newsletter/December 2023|here]].
<br /><small>If you want to subscribe/unsubscribe to this newsletter, click [[:m:CIS-A2K/Reports/Newsletter/Subscribe|here]]. </small>
Regards [[प्रयोगकर्ता:MediaWiki message delivery|MediaWiki message delivery]] ([[प्रयोगकर्ता वार्ता:MediaWiki message delivery|बात करीं]]) 06:54, 12 जनवरी 2024 (UTC)
<!-- Message sent by User:Nitesh (CIS-A2K)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=CIS-A2K/Reports/Newsletter/Subscribe/VP&oldid=23719485 -->
== Feminism and Folklore 2024 ==
<div style="border:8px maroon ridge;padding:6px;>
[[File:Feminism and Folklore 2024 logo.svg|centre|550px|frameless]]
::<div lang="en" dir="ltr" class="mw-content-ltr">
<center>''{{int:please-translate}}''</center>
Dear Wiki Community,
You are humbly invited to organize the '''[[:m:Feminism and Folklore 2024|Feminism and Folklore 2024]]''' writing competition from February 1, 2024, to March 31, 2024 on your local Wikipedia. This year, Feminism and Folklore will focus on feminism, women's issues, and gender-focused topics for the project, with a [[:c:Commons:Wiki Loves Folklore 2024|Wiki Loves Folklore]] gender gap focus and a folk culture theme on Wikipedia.
You can help Wikipedia's coverage of folklore from your area by writing or improving articles about things like folk festivals, folk dances, folk music, women and queer folklore figures, folk game athletes, women in mythology, women warriors in folklore, witches and witch hunting, fairy tales, and more. Users can help create new articles, expand or translate from a generated list of suggested articles.
Organisers are requested to work on the following action items to sign up their communities for the project:
# Create a page for the contest on the local wiki.
# Set up a campaign on '''CampWiz''' tool.
# Create the local list and mention the timeline and local and international prizes.
# Request local admins for site notice.
# Link the local page and the CampWiz link on the [[:m:Feminism and Folklore 2024/Project Page|meta project page]].
This year, the Wiki Loves Folklore Tech Team has introduced two new tools to enhance support for the campaign. These tools include the '''Article List Generator by Topic''' and '''CampWiz'''. The Article List Generator by Topic enables users to identify articles on the English Wikipedia that are not present in their native language Wikipedia. Users can customize their selection criteria, and the tool will present a table showcasing the missing articles along with suggested titles. Additionally, users have the option to download the list in both CSV and wikitable formats. Notably, the CampWiz tool will be employed for the project for the first time, empowering users to effectively host the project with a jury. Both tools are now available for use in the campaign. [https://tools.wikilovesfolklore.org/ '''Click here to access these tools''']
Learn more about the contest and prizes on our [[:m:Feminism and Folklore 2024|project page]]. Feel free to contact us on our [[:m:Talk:Feminism and Folklore 2024/Project Page|meta talk page]] or by email us if you need any assistance.
We look forward to your immense coordination.
Thank you and Best wishes,
'''[[:m:Feminism and Folklore 2024|Feminism and Folklore 2024 International Team]]'''
::::Stay connected [[File:B&W Facebook icon.png|link=https://www.facebook.com/feminismandfolklore/|30x30px]] [[File:B&W Twitter icon.png|link=https://twitter.com/wikifolklore|30x30px]]
</div></div>
--[[प्रयोगकर्ता:MediaWiki message delivery|MediaWiki message delivery]] ([[प्रयोगकर्ता वार्ता:MediaWiki message delivery|बात करीं]]) 07:26, 18 जनवरी 2024 (UTC)
== Wiki Loves Folklore is back! ==
<div lang="en" dir="ltr" class="mw-content-ltr">
{{int:please-translate}}
[[File:Wiki Loves Folklore Logo.svg|right|150px|frameless]]
Dear Wiki Community,
You are humbly invited to participate in the '''[[:c:Commons:Wiki Loves Folklore 2024|Wiki Loves Folklore 2024]]''' an international photography contest organized on Wikimedia Commons to document folklore and intangible cultural heritage from different regions, including, folk creative activities and many more. It is held every year from the '''1st till the 31st''' of March.
You can help in enriching the folklore documentation on Commons from your region by taking photos, audios, videos, and [https://commons.wikimedia.org/w/index.php?title=Special:UploadWizard&campaign=wlf_2024 submitting] them in this commons contest.
You can also [[:c:Commons:Wiki Loves Folklore 2024/Organize|organize a local contest]] in your country and support us in translating the [[:c:Commons:Wiki Loves Folklore 2024/Translations|project pages]] to help us spread the word in your native language.
Feel free to contact us on our [[:c:Commons talk:Wiki Loves Folklore 2024|project Talk page]] if you need any assistance.
'''Kind regards,'''
'''Wiki loves Folklore International Team'''
-- [[प्रयोगकर्ता:MediaWiki message delivery|MediaWiki message delivery]] ([[प्रयोगकर्ता वार्ता:MediaWiki message delivery|बात करीं]]) 07:26, 18 जनवरी 2024 (UTC)
</div></div>
<!-- Message sent by User:Tiven2240@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=Distribution_list/Global_message_delivery/Wikipedia&oldid=23942484 -->
== <span lang="en" dir="ltr" class="mw-content-ltr">Vote on the Charter for the Universal Code of Conduct Coordinating Committee</span> ==
<div lang="en" dir="ltr" class="mw-content-ltr">
<section begin="announcement-content" />
:''[[m:Special:MyLanguage/wiki/Universal Code of Conduct/Coordinating Committee/Charter/Announcement - voting opens|You can find this message translated into additional languages on Meta-wiki.]] [https://meta.wikimedia.org/w/index.php?title=Special:Translate&group=page-{{urlencode:wiki/Universal Code of Conduct/Coordinating Committee/Charter/Announcement - voting opens}}&language=&action=page&filter= {{int:please-translate}}]''
Hello all,
I am reaching out to you today to announce that the voting period for the [[m:Special:MyLanguage/Universal Code of Conduct/Coordinating Committee|Universal Code of Conduct Coordinating Committee]] (U4C) Charter is now open. Community members may [[m:Special:MyLanguage/Universal_Code_of_Conduct/Coordinating_Committee/Charter/Voter_information|cast their vote and provide comments about the charter via SecurePoll]] now through '''2 February 2024'''. Those of you who voiced your opinions during the development of the [[foundation:Special:MyLanguage/Policy:Universal_Code_of_Conduct/Enforcement_guidelines|UCoC Enforcement Guidelines]] will find this process familiar.
The [[m:Special:MyLanguage/Universal Code of Conduct/Coordinating Committee/Charter|current version of the U4C Charter]] is on Meta-wiki with translations available.
Read the charter, go vote and share this note with others in your community. I can confidently say the U4C Building Committee looks forward to your participation.
On behalf of the UCoC Project team,<section end="announcement-content" />
</div>
[[m:User:RamzyM (WMF)|RamzyM (WMF)]] 18:08, 19 जनवरी 2024 (UTC)
<!-- Message sent by User:RamzyM (WMF)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=Distribution_list/Global_message_delivery&oldid=25853527 -->
== A new feature for previewing references on your wiki ==
<div lang="en" dir="ltr" class="mw-content-ltr">
[[File:Page Previews and Reference Previews.png|alt=Montage of two screenshots, one showing the Reference Previews feature, and one showing the Page Previews feature|right|350x350px]]
''Apologies for writing in English. If you can translate this message, that would be much appreciated.''
Hi. As announced some weeks ago <sup>[<nowiki/>[[listarchive:list/wikitech-l@lists.wikimedia.org/thread/CNPRQE2IG5ZNAVAOHBMF4AXXRLGJE6UT/|1]]] [<nowiki/>[[m:Special:MyLanguage/Tech/News/2023/46|2]]]</sup>, Wikimedia Deutschland’s [[m:WMDE Technical Wishes|Technical Wishes]] team introduced [[mw:Special:MyLanguage/Help:Reference_Previews|Reference Previews]] to many wikis, including this one. This feature shows popups for references in the article text.
While this new feature is already usable on your wiki, most people here are not seeing it yet because your wiki has set [[m:WMDE Technical Wishes/ReferencePreviews#Relation to gadgets|a gadget as the default]] for previewing references. We plan to remove the default flag from the gadget on your wiki soon. This means:
* The new default for reference popups on your wiki will be Reference Previews.
* However, if you want to keep using the gadget, you can still enable it in [[Special:Preferences#mw-prefsection-gadgets|your personal settings]].
The benefit of having Reference Previews as the default is that the user experience will be consistent across wikis and with the [[mw:Special:MyLanguage/Page_Previews|Page Previews feature]], and that the software will be easier to maintain overall.
This change is planned for February 14. If you have concerns about this change, [[m:Talk:WMDE Technical Wishes/ReferencePreviews#Reference Previews to become the default for previewing references on more wikis.|please let us know on this talk page]] by February 12. – Kind regards, [[m:User:Johanna Strodt (WMDE)|Johanna Strodt (WMDE)]], 09:30, 23 जनवरी 2024 (UTC) </div>
<!-- Message sent by User:Johanna Strodt (WMDE)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=User:Johanna_Strodt_(WMDE)/MassMessageRecipients&oldid=26116190 -->
== <span lang="en" dir="ltr" class="mw-content-ltr">Last days to vote on the Charter for the Universal Code of Conduct Coordinating Committee</span> ==
<div lang="en" dir="ltr" class="mw-content-ltr">
<section begin="announcement-content" />
:''[[m:Special:MyLanguage/wiki/Universal Code of Conduct/Coordinating Committee/Charter/Announcement - voting reminder|You can find this message translated into additional languages on Meta-wiki.]] [https://meta.wikimedia.org/w/index.php?title=Special:Translate&group=page-{{urlencode:wiki/Universal Code of Conduct/Coordinating Committee/Charter/Announcement - voting reminder}}&language=&action=page&filter= {{int:please-translate}}]''
Hello all,
I am reaching out to you today to remind you that the voting period for the [[m:Special:MyLanguage/Universal Code of Conduct/Coordinating Committee|Universal Code of Conduct Coordinating Committee]] (U4C) charter will close on '''2 February 2024'''. Community members may [[m:Special:MyLanguage/Universal_Code_of_Conduct/Coordinating_Committee/Charter/Voter_information|cast their vote and provide comments about the charter via SecurePoll]]. Those of you who voiced your opinions during the development of the [[foundation:Special:MyLanguage/Policy:Universal_Code_of_Conduct/Enforcement_guidelines|UCoC Enforcement Guidelines]] will find this process familiar.
The [[m:Special:MyLanguage/Universal Code of Conduct/Coordinating Committee/Charter|current version of the U4C charter]] is on Meta-wiki with translations available.
Read the charter, go vote and share this note with others in your community. I can confidently say the U4C Building Committee looks forward to your participation.
On behalf of the UCoC Project team,<section end="announcement-content" />
</div>
[[m:User:RamzyM (WMF)|RamzyM (WMF)]] 17:00, 31 जनवरी 2024 (UTC)
<!-- Message sent by User:RamzyM (WMF)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=Distribution_list/Global_message_delivery&oldid=25853527 -->
== A2K Monthly Report for January 2024 ==
<br /><small>Feel free to translate into your language.</small>
[[File:Centre for Internet And Society logo.svg|180px|right|link=]]
Dear Wikimedians,
In January, CIS-A2K successfully concluded several initiatives, and we are pleased to present a comprehensive monthly newsletter summarizing the events and activities of the past month. This newsletter provides an extensive overview of key information, highlighting our diverse range of endeavors.
; Conducted Events
* Roundtable on Digital Cultures
* Discussion on Disinformation and Misinformation in Wikimedia Projects
* Roundtable on Digital Access
You can access the newsletter [[:m:CIS-A2K/Reports/Newsletter/January 2024|here]].
<br /><small>To subscribe or unsubscribe to this newsletter, click [[:m:CIS-A2K/Reports/Newsletter/Subscribe|here]]. </small>
Regards [[प्रयोगकर्ता:MediaWiki message delivery|MediaWiki message delivery]] ([[प्रयोगकर्ता वार्ता:MediaWiki message delivery|बात करीं]]) 19:16, 9 फरवरी 2024 (UTC)
<!-- Message sent by User:Nitesh (CIS-A2K)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=CIS-A2K/Reports/Newsletter/Subscribe/VP&oldid=23719485 -->
== <span lang="en" dir="ltr" class="mw-content-ltr">Announcing the results of the UCoC Coordinating Committee Charter ratification vote</span> ==
<div lang="en" dir="ltr" class="mw-content-ltr">
<section begin="announcement-content" />
:''[[m:Special:MyLanguage/wiki/Universal Code of Conduct/Coordinating Committee/Charter/Announcement - results|You can find this message translated into additional languages on Meta-wiki.]] [https://meta.wikimedia.org/w/index.php?title=Special:Translate&group=page-{{urlencode:wiki/Universal Code of Conduct/Coordinating Committee/Charter/Announcement - results}}&language=&action=page&filter= {{int:please-translate}}]''
Dear all,
Thank you everyone for following the progress of the Universal Code of Conduct. I am writing to you today to announce the outcome of the [[m:Special:MyLanguage/Universal_Code_of_Conduct/Coordinating_Committee/Charter/Voter_information|ratification vote]] on the [[m:Special:MyLanguage/Universal Code of Conduct/Coordinating Committee/Charter|Universal Code of Conduct Coordinating Committee Charter]]. 1746 contributors voted in this ratification vote with 1249 voters supporting the Charter and 420 voters not. The ratification vote process allowed for voters to provide comments about the Charter.
A report of voting statistics and a summary of voter comments will be published on Meta-wiki in the coming weeks.
Please look forward to hearing about the next steps soon.
On behalf of the UCoC Project team,<section end="announcement-content" />
</div>
[[m:User:RamzyM (WMF)|RamzyM (WMF)]] 18:23, 12 फरवरी 2024 (UTC)
<!-- Message sent by User:RamzyM (WMF)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=Distribution_list/Global_message_delivery&oldid=26160150 -->
== Ukraine's Cultural Diplomacy Month 2024: We are back! ==
<div lang="en" dir="ltr" class="mw-content-ltr">
[[File:UCDM 2024 general.jpg|180px|right]]
{{int:please-translate}}
Hello, dear Wikipedians!<br/>
[[:m:Special:MyLanguage/Wikimedia Ukraine|Wikimedia Ukraine]], in cooperation with the [[:en:Ministry of Foreign Affairs of Ukraine|MFA of Ukraine]] and [[:en:Ukrainian Institute|Ukrainian Institute]], has launched the forth edition of writing challenge "'''[[:m:Special:MyLanguage/Ukraine's Cultural Diplomacy Month 2024|Ukraine's Cultural Diplomacy Month]]'''", which lasts from 1st until 31st March 2024. The campaign is dedicated to famous Ukrainian artists of cinema, music, literature, architecture, design and cultural phenomena of Ukraine that are now part of world heritage. We accept contribution in every language! The most active contesters will receive prizes.<br/>
We invite you to take part and help us improve the coverage of Ukrainian culture on Wikipedia in your language! Also, we plan to set up a [[:m:CentralNotice/Request/UCDM 2024|banner]] to notify users of the possibility to participate in such a challenge! [[:m:User:ValentynNefedov (WMUA)|ValentynNefedov (WMUA)]] ([[:m:User talk:ValentynNefedov (WMUA)|talk]])
</div>
<!-- Message sent by User:ValentynNefedov (WMUA)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=Distribution_list/Global_message_delivery/Wikipedia&oldid=26166467 -->
== <span lang="en" dir="ltr" class="mw-content-ltr"> Report of the U4C Charter ratification and U4C Call for Candidates now available</span> ==
<div lang="en" dir="ltr" class="mw-content-ltr">
<section begin="announcement-content" />
:''[[m:Special:MyLanguage/Universal Code of Conduct/Coordinating Committee/Election/2024/Announcement – call for candidates| You can find this message translated into additional languages on Meta-wiki.]] [https://meta.wikimedia.org/w/index.php?title=Special:Translate&group=page-{{urlencode:Universal Code of Conduct/Coordinating Committee/Election/2024/Announcement – call for candidates}}&language=&action=page&filter= {{int:please-translate}}]''
Hello all,
I am writing to you today with two important pieces of information. First, the [[m:Special:MyLanguage/Universal Code of Conduct/Coordinating Committee/Charter/Vote results|report of the comments from the Universal Code of Conduct Coordinating Committee (U4C) Charter ratification]] is now available. Secondly, the call for candidates for the U4C is open now through April 1, 2024.
The [[m:Special:MyLanguage/Universal Code of Conduct/Coordinating Committee|Universal Code of Conduct Coordinating Committee]] (U4C) is a global group dedicated to providing an equitable and consistent implementation of the UCoC. Community members are invited to submit their applications for the U4C. For more information and the responsibilities of the U4C, please [[m:Special:MyLanguage/Universal Code of Conduct/Coordinating Committee/Charter|review the U4C Charter]].
Per the charter, there are 16 seats on the U4C: eight community-at-large seats and eight regional seats to ensure the U4C represents the diversity of the movement.
Read more and submit your application on [[m:Special:MyLanguage/Universal Code of Conduct/Coordinating Committee/Election/2024|Meta-wiki]].
On behalf of the UCoC project team,<section end="announcement-content" />
</div>
[[m:User:RamzyM (WMF)|RamzyM (WMF)]] 16:25, 5 मार्च 2024 (UTC)
<!-- Message sent by User:RamzyM (WMF)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=Distribution_list/Global_message_delivery&oldid=26276337 -->
== <span lang="en" dir="ltr" class="mw-content-ltr"> Wikimedia Foundation Board of Trustees 2024 Selection</span> ==
<div lang="en" dir="ltr" class="mw-content-ltr">
<section begin="announcement-content" />
: ''[[m:Special:MyLanguage/Wikimedia Foundation elections/2024/Announcement/Selection announcement| You can find this message translated into additional languages on Meta-wiki.]]''
: ''<div class="plainlinks">[[m:Special:MyLanguage/Wikimedia Foundation elections/2024/Announcement/Selection announcement|{{int:interlanguage-link-mul}}]] • [https://meta.wikimedia.org/w/index.php?title=Special:Translate&group=page-{{urlencode:Wikimedia Foundation elections/2024/Announcement/Selection announcement}}&language=&action=page&filter= {{int:please-translate}}]</div>''
Dear all,
This year, the term of 4 (four) Community- and Affiliate-selected Trustees on the Wikimedia Foundation Board of Trustees will come to an end [1]. The Board invites the whole movement to participate in this year’s selection process and vote to fill those seats.
The [[m:Special:MyLanguage/Wikimedia Foundation elections committee|Elections Committee]] will oversee this process with support from Foundation staff [2]. The Board Governance Committee created a Board Selection Working Group from Trustees who cannot be candidates in the 2024 community- and affiliate-selected trustee selection process composed of Dariusz Jemielniak, Nataliia Tymkiv, Esra'a Al Shafei, Kathy Collins, and Shani Evenstein Sigalov [3]. The group is tasked with providing Board oversight for the 2024 trustee selection process, and for keeping the Board informed. More details on the roles of the Elections Committee, Board, and staff are here [4].
Here are the key planned dates:
* May 2024: Call for candidates and call for questions
* June 2024: Affiliates vote to shortlist 12 candidates (no shortlisting if 15 or less candidates apply) [5]
* June-August 2024: Campaign period
* End of August / beginning of September 2024: Two-week community voting period
* October–November 2024: Background check of selected candidates
* Board's Meeting in December 2024: New trustees seated
Learn more about the 2024 selection process - including the detailed timeline, the candidacy process, the campaign rules, and the voter eligibility criteria - on [[m:Special:MyLanguage/Wikimedia Foundation elections/2024|this Meta-wiki page]], and make your plan.
'''Election Volunteers'''
Another way to be involved with the 2024 selection process is to be an Election Volunteer. Election Volunteers are a bridge between the Elections Committee and their respective community. They help ensure their community is represented and mobilize them to vote. Learn more about the program and how to join on this [[m:Special:MyLanguage/Wikimedia Foundation elections/2024/Election Volunteers|Meta-wiki page]].
Best regards,
[[m:Special:MyLanguage/User:Pundit|Dariusz Jemielniak]] (Governance Committee Chair, Board Selection Working Group)
[1] https://meta.wikimedia.org/wiki/Special:MyLanguage/Wikimedia_Foundation_elections/2021/Results#Elected
[2] https://foundation.wikimedia.org/wiki/Committee:Elections_Committee_Charter
[3] https://foundation.wikimedia.org/wiki/Minutes:2023-08-15#Governance_Committee
[4] https://meta.wikimedia.org/wiki/Wikimedia_Foundation_elections_committee/Roles
[5] Even though the ideal number is 12 candidates for 4 open seats, the shortlisting process will be triggered if there are more than 15 candidates because the 1-3 candidates that are removed might feel ostracized and it would be a lot of work for affiliates to carry out the shortlisting process to only eliminate 1-3 candidates from the candidate list.<section end="announcement-content" />
</div>
[[User:MPossoupe_(WMF)|MPossoupe_(WMF)]]19:56, 12 मार्च 2024 (UTC)
<!-- Message sent by User:MPossoupe (WMF)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=Distribution_list/Global_message_delivery&oldid=26349432 -->
== <span lang="en" dir="ltr" class="mw-content-ltr">Your wiki will be in read-only soon</span> ==
<div lang="en" dir="ltr" class="mw-content-ltr">
<section begin="server-switch"/><div class="plainlinks">
[[:m:Special:MyLanguage/Tech/Server switch|Read this message in another language]] • [https://meta.wikimedia.org/w/index.php?title=Special:Translate&group=page-Tech%2FServer+switch&language=&action=page&filter= {{int:please-translate}}]
The [[foundation:|Wikimedia Foundation]] will switch the traffic between its data centers. This will make sure that Wikipedia and the other Wikimedia wikis can stay online even after a disaster.
All traffic will switch on '''{{#time:j xg|2024-03-20|en}}'''. The test will start at '''[https://zonestamp.toolforge.org/{{#time:U|2024-03-20T14:00|en}} {{#time:H:i e|2024-03-20T14:00}}]'''.
Unfortunately, because of some limitations in [[mw:Special:MyLanguage/Manual:What is MediaWiki?|MediaWiki]], all editing must stop while the switch is made. We apologize for this disruption, and we are working to minimize it in the future.
'''You will be able to read, but not edit, all wikis for a short period of time.'''
*You will not be able to edit for up to an hour on {{#time:l j xg Y|2024-03-20|en}}.
*If you try to edit or save during these times, you will see an error message. We hope that no edits will be lost during these minutes, but we can't guarantee it. If you see the error message, then please wait until everything is back to normal. Then you should be able to save your edit. But, we recommend that you make a copy of your changes first, just in case.
''Other effects'':
*Background jobs will be slower and some may be dropped. Red links might not be updated as quickly as normal. If you create an article that is already linked somewhere else, the link will stay red longer than usual. Some long-running scripts will have to be stopped.
* We expect the code deployments to happen as any other week. However, some case-by-case code freezes could punctually happen if the operation require them afterwards.
* [[mw:Special:MyLanguage/GitLab|GitLab]] will be unavailable for about 90 minutes.
This project may be postponed if necessary. You can [[wikitech:Switch_Datacenter|read the schedule at wikitech.wikimedia.org]]. Any changes will be announced in the schedule. There will be more notifications about this. A banner will be displayed on all wikis 30 minutes before this operation happens. '''Please share this information with your community.'''</div><section end="server-switch"/>
</div>
[[user:Trizek (WMF)|Trizek (WMF)]], 00:00, 15 मार्च 2024 (UTC)
<!-- Message sent by User:Trizek (WMF)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=Distribution_list/Non-Technical_Village_Pumps_distribution_list&oldid=25636619 -->
== A2K Monthly Report for February 2024 ==
<br /><small>Feel free to translate into your language.</small>
[[File:Centre for Internet And Society logo.svg|180px|right|link=]]
Dear Wikimedians,
In February, CIS-A2K effectively completed numerous initiatives, and we are delighted to share a detailed monthly newsletter encapsulating the events and activities from the previous month. This newsletter offers a thorough glimpse into significant updates, showcasing the breadth of our varied undertakings.
; Collaborative Activities and Engagement
* Telugu Community Conference 2024
* International Mother Language Day 2024 Virtual Meet
* Wiki Loves Vizag 2024
; Reports
* Using the Wikimedia sphere for the revitalization of small and underrepresented languages in India
* Open Movement in India (2013-23): The Idea and Its Expressions Open Movement in India 2013-2023 by Soni
You can access the newsletter [[:m:CIS-A2K/Reports/Newsletter/February 2024|here]].
<br /><small>To subscribe or unsubscribe to this newsletter, click [[:m:CIS-A2K/Reports/Newsletter/Subscribe|here]]. </small>
Regards [[प्रयोगकर्ता:MediaWiki message delivery|MediaWiki message delivery]] ([[प्रयोगकर्ता वार्ता:MediaWiki message delivery|बात करीं]]) 14:12, 18 मार्च 2024 (UTC)
<!-- Message sent by User:Nitesh (CIS-A2K)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=CIS-A2K/Reports/Newsletter/Subscribe/VP&oldid=23719485 -->
== CIS-A2K announcing Community Collaborations program ==
<small>Please feel free to translate this into your preferred language.</small>
Dear Wikimedians,
Exciting news from A2K! We're thrilled to announce that CIS-A2K is now seeking proposals for collaborative projects and activities to advance Indic Wikimedia projects. If you've got some interesting ideas and are keen on co-organizing projects or activities with A2K, we'd love to hear from you.
Check out all the details about requirements, process, timelines, and proposal drafting guidelines right [[m:CIS-A2K/Community Collaboration|here]].
We're looking forward to seeing your proposals and collaborating to boost Indic Wikimedia projects and contribute even more to the open knowledge movement.
Regards [[प्रयोगकर्ता:MediaWiki message delivery|MediaWiki message delivery]] ([[प्रयोगकर्ता वार्ता:MediaWiki message delivery|बात करीं]]) 14:25, 18 मार्च 2024 (UTC)
<!-- Message sent by User:Nitesh (CIS-A2K)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=User:Titodutta/lists/Indic_VPs&oldid=22433435 -->
== A2K Monthly Report for March 2024 ==
[[File:Centre for Internet And Society logo.svg|180px|right|link=]]
Dear Wikimedians,
A2K is pleased to present its monthly newsletter for March, highlighting the impactful initiatives undertaken by CIS-A2K during the month. This newsletter provides a comprehensive overview of the events and activities conducted, giving you insight into our collaborative efforts and engagements.
; Collaborative Activities and Engagement
* [[Commons:Wiki Loves Vizag 2024|Wiki Loves Vizag: Fostering Open Knowledge Through Photography]]
; Monthly Recap
* [[:m:CIS-A2K/Events/She Leads|She Leads Program (Support)]]
* [[:m:CIS-A2K/Events/WikiHour: Amplifying Women's Voices|WikiHour: Amplifying Women's Voices (Virtual)]]
* [[:m:Wikimedia India Summit 2024|Wikimedia India Summit 2024]]
* [[:m:CIS-A2K/Institutional Partners/Department of Language and Culture, Government of Telangana|Department of Language and Culture, Government of Telangana]]
; From the Team- Editorial
; Comic
You can access the newsletter [[:m:CIS-A2K/Reports/Newsletter/March 2024|here]].
<br /><small>To subscribe or unsubscribe to this newsletter, click [[:m:CIS-A2K/Reports/Newsletter/Subscribe|here]]. </small>
Regards [[प्रयोगकर्ता:MediaWiki message delivery|MediaWiki message delivery]] ([[प्रयोगकर्ता वार्ता:MediaWiki message delivery|बात करीं]]) 12:17, 11 अप्रैल 2024 (UTC)
<!-- Message sent by User:Nitesh (CIS-A2K)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=CIS-A2K/Reports/Newsletter/Subscribe/VP&oldid=23719485 -->
== <span lang="en" dir="ltr" class="mw-content-ltr">Vote now to select members of the first U4C</span> ==
<div lang="en" dir="ltr" class="mw-content-ltr">
<section begin="announcement-content" />
:''[[m:Special:MyLanguage/Universal Code of Conduct/Coordinating Committee/Election/2024/Announcement – vote opens|You can find this message translated into additional languages on Meta-wiki.]] [https://meta.wikimedia.org/w/index.php?title=Special:Translate&group=page-{{urlencode:Universal Code of Conduct/Coordinating Committee/Election/2024/Announcement – vote opens}}&language=&action=page&filter= {{int:please-translate}}]''
Dear all,
I am writing to you to let you know the voting period for the Universal Code of Conduct Coordinating Committee (U4C) is open now through May 9, 2024. Read the information on the [[m:Special:MyLanguage/Universal Code of Conduct/Coordinating Committee/Election/2024|voting page on Meta-wiki]] to learn more about voting and voter eligibility.
The Universal Code of Conduct Coordinating Committee (U4C) is a global group dedicated to providing an equitable and consistent implementation of the UCoC. Community members were invited to submit their applications for the U4C. For more information and the responsibilities of the U4C, please [[m:Special:MyLanguage/Universal Code of Conduct/Coordinating Committee/Charter|review the U4C Charter]].
Please share this message with members of your community so they can participate as well.
On behalf of the UCoC project team,<section end="announcement-content" />
</div>
[[m:User:RamzyM (WMF)|RamzyM (WMF)]] 20:20, 25 अप्रैल 2024 (UTC)
<!-- Message sent by User:RamzyM (WMF)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=Distribution_list/Global_message_delivery&oldid=26390244 -->
== A2K Monthly Report for April 2024 ==
[[File:Centre for Internet And Society logo.svg|180px|right|link=]]
Dear Wikimedians,
We are pleased to present our monthly newsletter for April, highlighting the impactful initiatives undertaken by CIS-A2K during the month. This newsletter provides a comprehensive overview of the events and activities conducted, giving you insight into our collaborative efforts and engagements.
* In the Limelight- Chandan Chiring
; Monthly Recap
* [[Commons:Tribal Culture Photography Competition]]
* [[:m:CIS-A2K/Events/Indic Community Monthly Engagement Calls/April 12, 2024 Call]]
* [[:m:CIS-A2K/Events/2024/Wikipedia training to Indian Language educators|Wikipedia Training to Indian Language educators]]
* [[:m:Wiki Explores Bhadrachalam]]
* Wikimedia Summit
; From the Team- Editorial
; Comic
You can access the newsletter [[:m:CIS-A2K/Reports/Newsletter/April 2024|here]].
<br /><small>To subscribe or unsubscribe to this newsletter, click [[:m:CIS-A2K/Reports/Newsletter/Subscribe|here]]. </small>
Regards [[प्रयोगकर्ता:MediaWiki message delivery|MediaWiki message delivery]] ([[प्रयोगकर्ता वार्ता:MediaWiki message delivery|बात करीं]]) 16:22, 14 मई 2024 (UTC)
<!-- Message sent by User:Nitesh (CIS-A2K)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=CIS-A2K/Reports/Newsletter/Subscribe/VP&oldid=23719485 -->
== WMF’s Annual Plan Draft (2024-2025) and Session during the South Asia Open Community Call (SAOCC) ==
Hi Everyone,
This message is regarding the [[:m:Wikimedia Foundation Annual Plan/2024-2025|Wikimedia Foundation’s Draft Annual Plan for 2024-2025]], and in continuation of [https://lists.wikimedia.org/hyperkitty/list/wikimedia-l@lists.wikimedia.org/message/XER6M7X2LPMRVI4N5MPXMZ5G4UUMBIQR/ Maryana’s email]; inviting inputs from members of the movement. The entire annual plan is available in multiple languages and a shorter summary is available in close to 30 languages including many from South Asia; and open for your feedback.
We invite you all to a session on the Annual Plan during 19th May's [:m:South Asia Open Community Call|South Asia Open Community Call (SAOCC)]], in line with the [[:m:Wikimedia Foundation Annual Plan/2024-2025/Collaboration|collaborative approach]] adopted by the foundation for finalizing Annual Plans. The discussion will be hosted by members of the senior leadership of the Wikimedia Foundation.
Call Details (Please add the details to your respective calendars)
* [https://meet.google.com/ffs-izis-bow Google Meeting]
** Date/Time: 19th May 2024 @ 1230-1400 UTC or 1800-1930 IST
You can add any questions/comments on Etherpad [https://etherpad.wikimedia.org/p/South_Asia_Community_Call]; pre-submissions welcomed.
Ps: To know more about the purpose of an Annual Plan, please read our [https://meta.wikimedia.org/wiki/Wikimedia_Foundation_Annual_Plan#Frequently_Asked_Questions_(FAQ) listed FAQs]. Look forward to seeing you on the call.
Best [[प्रयोगकर्ता:MediaWiki message delivery|MediaWiki message delivery]] ([[प्रयोगकर्ता वार्ता:MediaWiki message delivery|बात करीं]]) 16:35, 14 मई 2024 (UTC)
<!-- Message sent by User:Nitesh (CIS-A2K)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=User:Nitesh_Gill/lists/Indic_VPs&oldid=24930250 -->
== <span lang="en" dir="ltr" class="mw-content-ltr">Sign up for the language community meeting on May 31st, 16:00 UTC</span> ==
<div lang="en" dir="ltr" class="mw-content-ltr">
<section begin="message"/>Hello all,
The next language community meeting is scheduled in a few weeks - May 31st at 16:00 UTC. If you're interested, you can [https://www.mediawiki.org/w/index.php?title=Wikimedia_Language_engineering/Community_meetings#31_May_2024 sign up on this wiki page].
This is a participant-driven meeting, where we share language-specific updates related to various projects, collectively discuss technical issues related to language wikis, and work together to find possible solutions. For example, in the last meeting, the topics included the machine translation service (MinT) and the languages and models it currently supports, localization efforts from the Kiwix team, and technical challenges with numerical sorting in files used on Bengali Wikisource.
Do you have any ideas for topics to share technical updates related to your project? Any problems that you would like to bring for discussion during the meeting? Do you need interpretation support from English to another language? Please reach out to me at ssethi(__AT__)wikimedia.org and [[etherpad:p/language-community-meeting-may-2024|add agenda items to the document here]].
We look forward to your participation!
<section end="message"/>
</div>
<bdi lang="en" dir="ltr">[[User:MediaWiki message delivery|MediaWiki message delivery]]</bdi> 21:22, 14 मई 2024 (UTC)
<!-- Message sent by User:SSethi (WMF)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=Distribution_list/Global_message_delivery&oldid=26390244 -->
== <span lang="en" dir="ltr" class="mw-content-ltr"> Feedback invited on Procedure for Sibling Project Lifecycle</span> ==
<div lang="en" dir="ltr" class="mw-content-ltr">
<section begin="announcement-content" />
:''[[m:Special:MyLanguage/Wikimedia Foundation Community Affairs Committee/Procedure for Sibling Project Lifecycle/Invitation for feedback (MM)|You can find this message translated into additional languages on Meta-wiki.]] [https://meta.wikimedia.org/w/index.php?title=Special:Translate&group=page-{{urlencode:Wikimedia Foundation Community Affairs Committee/Procedure for Sibling Project Lifecycle/Invitation for feedback (MM)}}&language=&action=page&filter= {{int:please-translate}}]''
[[File:Sibling Project Lifecycle Conversation 3.png|150px|right|link=:m:Special:MyLanguage/Wikimedia Foundation Community Affairs Committee/Procedure for Sibling Project Lifecycle]]
Dear community members,
The [[:m:Special:MyLanguage/Wikimedia Foundation Community Affairs Committee|Community Affairs Committee]] (CAC) of the [[:m:Special:MyLanguage/Wikimedia Foundation Board of Trustees|Wikimedia Foundation Board of Trustees]] invites you to give feedback on a '''[[:m:Special:MyLanguage/Wikimedia Foundation Community Affairs Committee/Procedure for Sibling Project Lifecycle|draft Procedure for Sibling Project Lifecycle]]'''. This draft Procedure outlines proposed steps and requirements for opening and closing Wikimedia Sibling Projects, and aims to ensure any newly approved projects are set up for success. This is separate from the procedures for opening or closing language versions of projects, which is handled by the [[:m:Special:MyLanguage/Language committee|Language Committee]] or [[m:Special:MyLanguage/Closing_projects_policy|closing projects policy]].
You can find the details on [[:m:Special:MyLanguage/Talk:Wikimedia Foundation Community Affairs Committee/Procedure for Sibling Project Lifecycle#Review|this page]], as well as the ways to give your feedback from today until the end of the day on '''June 23, 2024''', anywhere on Earth.
You can also share information about this with the interested project communities you work with or support, and you can also help us translate the procedure into more languages, so people can join the discussions in their own language.
On behalf of the CAC,<section end="announcement-content" />
</div>
[[m:User:RamzyM (WMF)|RamzyM (WMF)]] 02:25, 22 मई 2024 (UTC)
<!-- Message sent by User:RamzyM (WMF)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=Distribution_list/Global_message_delivery&oldid=26390244 -->
== <span lang="en" dir="ltr" class="mw-content-ltr">Announcing the first Universal Code of Conduct Coordinating Committee</span> ==
<div lang="en" dir="ltr" class="mw-content-ltr">
<section begin="announcement-content" />
:''[[m:Special:MyLanguage/Universal Code of Conduct/Coordinating Committee/Election/2024/Announcement – results|You can find this message translated into additional languages on Meta-wiki.]] [https://meta.wikimedia.org/w/index.php?title=Special:Translate&group=page-{{urlencode:Universal Code of Conduct/Coordinating Committee/Election/2024/Announcement – results}}&language=&action=page&filter= {{int:please-translate}}]''
Hello,
The scrutineers have finished reviewing the vote results. We are following up with the results of the first [[m:Special:MyLanguage/Universal Code of Conduct/Coordinating Committee/Election/2024|Universal Code of Conduct Coordinating Committee (U4C) election]].
We are pleased to announce the following individuals as regional members of the U4C, who will fulfill a two-year term:
* North America (USA and Canada)
** –
* Northern and Western Europe
** [[m:Special:MyLanguage/User:Ghilt|Ghilt]]
* Latin America and Caribbean
** –
* Central and East Europe (CEE)
** —
* Sub-Saharan Africa
** –
* Middle East and North Africa
** [[m:Special:MyLanguage/User:Ibrahim.ID|Ibrahim.ID]]
* East, South East Asia and Pacific (ESEAP)
** [[m:Special:MyLanguage/User:0xDeadbeef|0xDeadbeef]]
* South Asia
** –
The following individuals are elected to be community-at-large members of the U4C, fulfilling a one-year term:
* [[m:Special:MyLanguage/User:Barkeep49|Barkeep49]]
* [[m:Special:MyLanguage/User:Superpes15|Superpes15]]
* [[m:Special:MyLanguage/User:Civvì|Civvì]]
* [[m:Special:MyLanguage/User:Luke081515|Luke081515]]
* –
* –
* –
* –
Thank you again to everyone who participated in this process and much appreciation to the candidates for your leadership and dedication to the Wikimedia movement and community.
Over the next few weeks, the U4C will begin meeting and planning the 2024-25 year in supporting the implementation and review of the UCoC and Enforcement Guidelines. Follow their work on [[m:Special:MyLanguage/Universal Code of Conduct/Coordinating Committee|Meta-wiki]].
On behalf of the UCoC project team,<section end="announcement-content" />
</div>
[[m:User:RamzyM (WMF)|RamzyM (WMF)]] 08:14, 3 जून 2024 (UTC)
<!-- Message sent by User:RamzyM (WMF)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=Distribution_list/Global_message_delivery&oldid=26390244 -->
== <span lang="en" dir="ltr" class="mw-content-ltr">The final text of the Wikimedia Movement Charter is now on Meta</span> ==
<div lang="en" dir="ltr" class="mw-content-ltr">
<section begin="announcement-content" />
:''[[m:Special:MyLanguage/Movement Charter/Drafting Committee/Announcement - Final draft available|You can find this message translated into additional languages on Meta-wiki.]] [https://meta.wikimedia.org/w/index.php?title=Special:Translate&group=page-{{urlencode:Movement Charter/Drafting Committee/Announcement - Final draft available}}&language=&action=page&filter= {{int:please-translate}}]''
Hi everyone,
The final text of the [[m:Special:MyLanguage/Movement Charter|Wikimedia Movement Charter]] is now up on Meta in more than 20 languages for your reading.
'''What is the Wikimedia Movement Charter?'''
The Wikimedia Movement Charter is a proposed document to define roles and responsibilities for all the members and entities of the Wikimedia movement, including the creation of a new body – the Global Council – for movement governance.
'''Join the Wikimedia Movement Charter “Launch Party”'''
Join the [[m:Special:MyLanguage/Event:Movement Charter Launch Party|“Launch Party”]] on '''June 20, 2024''' at '''14.00-15.00 UTC''' ([https://zonestamp.toolforge.org/1718892000 your local time]). During this call, we will celebrate the release of the final Charter and present the content of the Charter. Join and learn about the Charter before casting your vote.
'''Movement Charter ratification vote'''
Voting will commence on SecurePoll on '''June 25, 2024''' at '''00:01 UTC''' and will conclude on '''July 9, 2024''' at '''23:59 UTC.''' You can read more about the [[m:Special:MyLanguage/Movement Charter/Ratification/Voting|voting process, eligibility criteria, and other details]] on Meta.
If you have any questions, please leave a comment on the [[m:Special:MyLanguage/Talk:Movement Charter|Meta talk page]] or email the MCDC at [mailto:mcdc@wikimedia.org mcdc@wikimedia.org].
On behalf of the MCDC,<section end="announcement-content" />
</div>
[[m:User:RamzyM (WMF)|RamzyM (WMF)]] 08:44, 11 जून 2024 (UTC)
<!-- Message sent by User:RamzyM (WMF)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=Distribution_list/Global_message_delivery&oldid=26390244 -->
== Wikimedia Technology Summit (WTS) 2024 - Scholarships ==
''Note: Apologies for cross-posting and sending in English.''
[[metawiki:3rd_Wikimedia_Technology_Summit_(WTS_2024)|Wikimedia Technology Summit (WTS) 2024]] is focused on using technology to enhance inclusivity across Wikipedia and its associated projects. We aim to explore strategies for engaging underrepresented communities and languages while also strengthening the technical foundation. By fostering collaboration between developers, users, and researchers, we can unite our efforts to create, innovate, and advance the technology that drives open knowledge.
We invite community members residing in India who are interested in attending WTS 2024 in person to apply for scholarships by July 10, 2024. The summit will be held at IIIT Hyderabad, India, in October 2024.
To apply, please fill out the application form by clicking [https://docs.google.com/forms/d/e/1FAIpQLSeoO22CuLXrNzL10rJ2guQsxuVtgJAP82EUYuZyBI46nPAHWw/viewform this link]].
On behalf of the WTS 2024 Scholarship Committee :[[प्रयोगकर्ता:Kasyap|Kasyap]] ([[प्रयोगकर्ता वार्ता:Kasyap|बात करीं]]) 09:13, 11 जून 2024 (UTC)
== Plans to enable MinT for Wiki readers in Bhojpuri Wikipedia ==
{{int:Hello}} Bhojpuri Wikipedians!
Apologies as this message is not in your language, {{int:please-translate}}.
The [[mw:Wikimedia_Language_engineering|WMF Language team]] has been working on [[mw:MinT#MinT_for_wiki_readers|MinT for Wiki Readers]]. This feature will allow communities to access more content that is only available in other languages with machine translation in Wikipedia. We will be enabling the initial version of this feature first in Igbo Wikipedia, and your Wikipedia is the next to test and have this feature since it will be beneficial for reading content in other languages. For this, our team would like you to read about the feature and [[:bh:Special:AutomaticTranslation|'''test it''']] so you can:
* Ask us questions
* Tell us how to improve the feature
* Give us your feedback on enabling it in your Wikipedia
'''About the feature'''
The MinT for Wiki Readers is a feature that will allow readers of Bhojpuri Wikipedia to expand their reading options and knowledge beyond the language they are familiar with in Wikipedia. For instance, if someone is interested in a topic or content that only exists in the Japanese language and the person is not familiar with the language. While using the mobile web version of Wikipedia, the reader can access the machine translation version of that content in the Bhojpuri language from the language selector or the article's footer (as shown in the media files below).
{{Gallery
| align = center
| height =450
| width =200
| whitebg = no
| noborder = yes
| File:MinT MVP Language Selector entry point video.webm|Language selector entry point.
| File:MinT_MVP_Article_footer_entry_point.png|Article footer entry point
}}
These machine-generated translations of content are clearly identified as such, and the human-created content is surfaced and recommended if available.
This feature is in its initial development. It is an early and functional version, and many aspects will be improved based on your community member's feedback on what works and what can be improved to better support your needs as readers.
'''How to try the tool'''
Before we enable this feature in your Wikipedia by the 26th June 2024, we invite members of your community to try MinT for Wiki Readers in your Wikipedia at [[:bh:Special:AutomaticTranslation|Special:AutomaticTranslation]] and give us early feedback in this thread or on [[mw:Talk:MinT#Feedback_from_Wikipedians_about_MinT_for_Wiki_Readers|this talk page]]. Our team would like to know your impression on:
* How do you use the feature
* Anything we should consider for our plans to enable it?
* Your ideas for improving it.
We greatly appreciate your time and effort in testing this tool. We eagerly look forward to your valuable feedback and questions, which will be instrumental in the further development of this feature. Thank you.
On behalf of the WMF Language team. [[प्रयोगकर्ता:UOzurumba (WMF)|UOzurumba (WMF)]] ([[प्रयोगकर्ता वार्ता:UOzurumba (WMF)|बात करीं]]) 21:53, 13 जून 2024 (UTC)
== <span lang="en" dir="ltr" class="mw-content-ltr">Voting to ratify the Wikimedia Movement Charter is now open – cast your vote</span> ==
<div lang="en" dir="ltr" class="mw-content-ltr">
<section begin="announcement-content" />
:''[[m:Special:MyLanguage/Movement Charter/Drafting Committee/Announcement - Ratification vote opens|You can find this message translated into additional languages on Meta-wiki.]] [https://meta.wikimedia.org/w/index.php?title=Special:Translate&group=page-{{urlencode:Movement Charter/Drafting Committee/Announcement - Ratification vote opens}}&language=&action=page&filter= {{int:please-translate}}]''
Hello everyone,
The voting to ratify the [[m:Special:MyLanguage/Movement Charter|'''Wikimedia Movement Charter''']] is now open. The Wikimedia Movement Charter is a document to define roles and responsibilities for all the members and entities of the Wikimedia movement, including the creation of a new body – the Global Council – for movement governance.
The final version of the Wikimedia Movement Charter is [[m:Special:MyLanguage/Movement Charter|available on Meta in different languages]] and attached [https://commons.wikimedia.org/wiki/File:Wikimedia_Movement_Charter_(June_2024).pdf here in PDF format] for your reading.
Voting commenced on SecurePoll on '''June 25, 2024''' at '''00:01 UTC''' and will conclude on '''July 9, 2024''' at '''23:59 UTC'''. Please read more on the [[m:Special:MyLanguage/Movement Charter/Ratification/Voting|voter information and eligibility details]].
After reading the Charter, please [[Special:SecurePoll/vote/398|'''vote here''']] and share this note further.
If you have any questions about the ratification vote, please contact the Charter Electoral Commission at [mailto:cec@wikimedia.org '''cec@wikimedia.org'''].
On behalf of the CEC,<section end="announcement-content" />
</div>
[[m:User:RamzyM (WMF)|RamzyM (WMF)]] 10:51, 25 जून 2024 (UTC)
<!-- Message sent by User:RamzyM (WMF)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=Distribution_list/Global_message_delivery&oldid=26989444 -->
== A2K Monthly Report for May 2024 ==
[[File:Centre for Internet And Society logo.svg|180px|right|link=]]
Dear Wikimedians,
We are pleased to present our May newsletter, showcasing the impactful initiatives undertaken by CIS-A2K throughout the month. This edition offers a comprehensive overview of our events and activities, providing insights into our collaborative efforts and community engagements.
; In the Limelight: Openness for Cultural Heritage
; Monthly Recap
* Digitisation Workshop
* [[Commons:Tribal Culture Photography Competition]]
* [[:m:CIS-A2K/Events/Wiki Technical Training 2024|Wiki Technical Training]]
; Dispatches from A2K
; Coming Soon
* Future of Commons Convening
You can access the newsletter [[:m:CIS-A2K/Reports/Newsletter/May 2024|here]].
<br /><small>To subscribe or unsubscribe to this newsletter, click [[:m:CIS-A2K/Reports/Newsletter/Subscribe|here]]. </small>
Regards [[प्रयोगकर्ता:MediaWiki message delivery|MediaWiki message delivery]] ([[प्रयोगकर्ता वार्ता:MediaWiki message delivery|बात करीं]]) 12:36, 27 जून 2024 (UTC)
<!-- Message sent by User:Nitesh (CIS-A2K)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=CIS-A2K/Reports/Newsletter/Subscribe/VP&oldid=23719485 -->
== <span lang="en" dir="ltr" class="mw-content-ltr">Voting to ratify the Wikimedia Movement Charter is ending soon</span> ==
<div lang="en" dir="ltr" class="mw-content-ltr">
<section begin="announcement-content" />
:''[[m:Special:MyLanguage/Movement Charter/Drafting Committee/Announcement - Final reminder|You can find this message translated into additional languages on Meta-wiki.]] [https://meta.wikimedia.org/w/index.php?title=Special:Translate&group=page-{{urlencode:Movement Charter/Drafting Committee/Announcement - Final reminder}}&language=&action=page&filter= {{int:please-translate}}]''
Hello everyone,
This is a kind reminder that the voting period to ratify the [[m:Special:MyLanguage/Movement Charter|Wikimedia Movement Charter]] will be closed on '''July 9, 2024''', at '''23:59 UTC'''.
If you have not voted yet, please vote [[m:Special:SecurePoll/vote/398|on SecurePoll]].
On behalf of the [[m:Special:MyLanguage/Movement_Charter/Ratification/Voting#Electoral_Commission|Charter Electoral Commission]],<section end="announcement-content" />
</div>
[[m:User:RamzyM (WMF)|RamzyM (WMF)]] 03:45, 8 जुलाई 2024 (UTC)
<!-- Message sent by User:RamzyM (WMF)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=Distribution_list/Global_message_delivery&oldid=26989444 -->
== <span lang="en" dir="ltr" class="mw-content-ltr">U4C Special Election - Call for Candidates</span> ==
<div lang="en" dir="ltr" class="mw-content-ltr">
<section begin="announcement-content" />
:''[[m:Special:MyLanguage/Universal Code of Conduct/Coordinating Committee/Election/2024 Special Election/Announcement – call for candidates|You can find this message translated into additional languages on Meta-wiki.]] [https://meta.wikimedia.org/w/index.php?title=Special:Translate&group=page-{{urlencode:Universal Code of Conduct/Coordinating Committee/Election/2024 Special Election/Announcement – call for candidates}}&language=&action=page&filter= {{int:please-translate}}]''
Hello all,
A special election has been called to fill additional vacancies on the U4C. The call for candidates phase is open from now through July 19, 2024.
The [[:m:Special:MyLanguage/Universal Code of Conduct/Coordinating Committee|Universal Code of Conduct Coordinating Committee]] (U4C) is a global group dedicated to providing an equitable and consistent implementation of the [[:foundation:Wikimedia Foundation Universal Code of Conduct|UCoC]]. Community members are invited to submit their applications in the special election for the U4C. For more information and the responsibilities of the U4C, please review the [[m:Special:MyLanguage/Universal Code of Conduct/Coordinating Committee/Charter|U4C Charter]].
In this special election, according to [[Special:MyLanguage/Universal Code of Conduct/Coordinating Committee/Charter#2. Elections and Terms|chapter 2 of the U4C charter]], there are 9 seats available on the U4C: '''four''' community-at-large seats and '''five''' regional seats to ensure the U4C represents the diversity of the movement. [[Special:MyLanguage/Universal Code of Conduct/Coordinating Committee/Charter#5. Glossary|No more than two members of the U4C can be elected from the same home wiki]]. Therefore, candidates must not have English Wikipedia, German Wikipedia, or Italian Wikipedia as their home wiki.
Read more and submit your application on [[m:Special:MyLanguage/Universal Code of Conduct/Coordinating Committee/Election/2024 Special Election|Meta-wiki]].
In cooperation with the U4C,<section end="announcement-content" />
</div>
-- [[m:User:Keegan (WMF)|Keegan (WMF)]] ([[m:User talk:Keegan (WMF)|talk]]) 00:02, 10 जुलाई 2024 (UTC)
<!-- Message sent by User:Keegan (WMF)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=Distribution_list/Global_message_delivery&oldid=26989444 -->
== <span lang="en" dir="ltr" class="mw-content-ltr">Wikimedia Movement Charter ratification voting results</span> ==
<div lang="en" dir="ltr" class="mw-content-ltr">
<section begin="announcement-content" />
:''[[m:Special:MyLanguage/Movement Charter/Drafting Committee/Announcement - Results of the ratification vote|You can find this message translated into additional languages on Meta-wiki.]] [https://meta.wikimedia.org/w/index.php?title=Special:Translate&group=page-{{urlencode:Movement Charter/Drafting Committee/Announcement - Results of the ratification vote}}&language=&action=page&filter= {{int:please-translate}}]''
Hello everyone,
After carefully tallying both individual and affiliate votes, the [[m:Special:MyLanguage/Movement Charter/Ratification/Voting#Electoral Commission|Charter Electoral Commission]] is pleased to announce the final results of the Wikimedia Movement Charter voting.
As [[m:Special:MyLanguage/Talk:Movement Charter#Thank you for your participation in the Movement Charter ratification vote!|communicated]] by the Charter Electoral Commission, we reached the quorum for both Affiliate and individual votes by the time the vote closed on '''July 9, 23:59 UTC'''. We thank all 2,451 individuals and 129 Affiliate representatives who voted in the ratification process. Your votes and comments are invaluable for the future steps in Movement Strategy.
The final results of the [[m:Special:MyLanguage/Movement Charter|Wikimedia Movement Charter]] ratification voting held between 25 June and 9 July 2024 are as follows:
'''Individual vote:'''
Out of 2,451 individuals who voted as of July 9 23:59 (UTC), 2,446 have been accepted as valid votes. Among these, '''1,710''' voted “yes”; '''623''' voted “no”; and '''113''' selected “–” (neutral). Because the neutral votes don’t count towards the total number of votes cast, 73.30% voted to approve the Charter (1710/2333), while 26.70% voted to reject the Charter (623/2333).
'''Affiliates vote:'''
Out of 129 Affiliates designated voters who voted as of July 9 23:59 (UTC), 129 votes are confirmed as valid votes. Among these, '''93''' voted “yes”; '''18''' voted “no”; and '''18''' selected “–” (neutral). Because the neutral votes don’t count towards the total number of votes cast, 83.78% voted to approve the Charter (93/111), while 16.22% voted to reject the Charter (18/111).
'''Board of Trustees of the Wikimedia Foundation:'''
The Wikimedia Foundation Board of Trustees voted '''not to ratify''' the proposed Charter during their special Board meeting on July 8, 2024. The Chair of the Wikimedia Foundation Board of Trustees, Nataliia Tymkiv, [[m:Special:MyLanguage/Wikimedia_Foundation_Board_noticeboard/Board_resolution_and_vote_on_the_proposed_Movement_Charter|shared the result of the vote, the resolution, meeting minutes and proposed next steps]].
With this, the Wikimedia Movement Charter in its current revision is '''not ratified'''.
We thank you for your participation in this important moment in our movement’s governance.
The Charter Electoral Commission,
[[m:User:Abhinav619|Abhinav619]], [[m:User:Borschts|Borschts]], [[m:User:Iwuala Lucy|Iwuala Lucy]], [[m:User:Tochiprecious|Tochiprecious]], [[m:User:Der-Wir-Ing|Der-Wir-Ing]]<section end="announcement-content" />
</div>
[[प्रयोगकर्ता:MediaWiki message delivery|MediaWiki message delivery]] ([[प्रयोगकर्ता वार्ता:MediaWiki message delivery|बात करीं]]) 17:52, 18 जुलाई 2024 (UTC)
<!-- Message sent by User:RamzyM (WMF)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=Distribution_list/Global_message_delivery&oldid=26989444 -->
== A2K Monthly Report for June 2024 ==
[[File:Centre for Internet And Society logo.svg|180px|right|link=]]
Dear Wikimedians,
We are excited to share our June newsletter, highlighting the impactful initiatives undertaken by CIS-A2K over the past month. This edition provides a detailed overview of our events and activities, offering insights into our collaborative efforts and community engagements and a brief regarding upcoming initiatives for next month.
; In the Limelight- Book Review: Geographies of Digital Exclusion
; Monthly Recap
* [[:m:CIS-A2K/Events/Wiki Technical Training 2024|Wiki Technical Training]]
* Strategy discussion (Post-Summit Event)
; Dispatches from A2K
* Future of Commons
;Coming Soon - Upcoming Activities
* Gearing up for Wikimania 2024
* Commons workshop and photo walk in Hyderabad
; Comic
You can access the newsletter [[:m:CIS-A2K/Reports/Newsletter/June 2024|here]].
<br /><small>To subscribe or unsubscribe to this newsletter, click [[:m:CIS-A2K/Reports/Newsletter/Subscribe|here]]. </small>
Regards [[प्रयोगकर्ता:MediaWiki message delivery|MediaWiki message delivery]] ([[प्रयोगकर्ता वार्ता:MediaWiki message delivery|बात करीं]]) 06:23, 26 जुलाई 2024 (UTC)
<!-- Message sent by User:Nitesh (CIS-A2K)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=CIS-A2K/Reports/Newsletter/Subscribe/VP&oldid=23719485 -->
== <span lang="en" dir="ltr" class="mw-content-ltr">Vote now to fill vacancies of the first U4C</span> ==
<div lang="en" dir="ltr" class="mw-content-ltr">
<section begin="announcement-content" />
:''[[m:Special:MyLanguage/Universal Code of Conduct/Coordinating Committee/Election/2024 Special Election/Announcement – voting opens|You can find this message translated into additional languages on Meta-wiki.]] [https://meta.wikimedia.org/w/index.php?title=Special:Translate&group=page-{{urlencode:Universal Code of Conduct/Coordinating Committee/Election/2024 Special Election/Announcement – voting opens}}&language=&action=page&filter= {{int:please-translate}}]''
Dear all,
I am writing to you to let you know the voting period for the Universal Code of Conduct Coordinating Committee (U4C) is open now through '''August 10, 2024'''. Read the information on the [[m:Special:MyLanguage/Universal Code of Conduct/Coordinating Committee/Election/2024 Special Election|voting page on Meta-wiki]] to learn more about voting and voter eligibility.
The Universal Code of Conduct Coordinating Committee (U4C) is a global group dedicated to providing an equitable and consistent implementation of the UCoC. Community members were invited to submit their applications for the U4C. For more information and the responsibilities of the U4C, please [[m:Special:MyLanguage/Universal Code of Conduct/Coordinating Committee/Charter|review the U4C Charter]].
Please share this message with members of your community so they can participate as well.
In cooperation with the U4C,<section end="announcement-content" />
</div>
[[m:User:RamzyM (WMF)|RamzyM (WMF)]] 02:46, 27 जुलाई 2024 (UTC)
<!-- Message sent by User:RamzyM (WMF)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=Distribution_list/Global_message_delivery&oldid=26989444 -->
== Project Announcement: Enhancing Indic Oral Culture on Wikimedia Projects ==
Hello Wikimedians!
We are glad to announce that the Wikimedia funded project '''Enhancing Indic Oral Culture on Wikimedia projects''' is now underway. It is a project focusing on facilitating citizen archivists to document their language and culture. Training, support, compensation for field visits, and regular guidance are some of the facilities that will be provided to volunteer participants. If you or someone you know who is interested in participating, please feel free to get in touch with us and feel free to reach out to us at [https://mail.google.com/mail/u/1/#inbox/QgrcJHsHprJJLpMxkvqcRWzNFKQqhtgbPhl?compose=CllgCJlHDnDbVzDLNdwxSMdTJVChFjvBfWxwPfbZbfgqFvFJVcgVfdjCHMxwbhsphMHtBBMGCnV '''amritsufi2@gmail.com'''] or [https://mail.google.com/mail/u/1/#inbox/QgrcJHsHprJJLpMxkvqcRWzNFKQqhtgbPhl?compose=DmwnWrRqhsNXsDVpjclDlmLsqfVmFtxjlnfXstNvZRTjWccJmwBpXbxdWLvTBznGCHbbFxJzdtzG '''yakshitharp6@gmail.com''']<br>
We have attached a flyer link which contains more information about the project. Here is the registration link to participate: [https://docs.google.com/forms/d/e/1FAIpQLSdpV8QD9QXn7HXlm1OdOAk5Ko0a7hIwMkfQYyeeiXt0JsO4kw/viewform?lsrp=1 '''Here''']<br>
[https://drive.google.com/file/d/1utpEFxARxoxkfB37xKm0aN-Qxi53Y92x/view '''Invitation Link''']<br>
Thank You<br>
[[प्रयोगकर्ता:Yakshitha|Yakshitha]] ([[प्रयोगकर्ता वार्ता:Yakshitha|बात करीं]]) 06:12, 31 जुलाई 2024 (UTC)
== Train-the-Trainer (TTT) 2024: Call for Applications ==
''Apologies for writing in English, please feel free to post this into your language.''
Dear Wikimedians,
We are thrilled to announce the 9ninth iteration of the Train-the-Trainer (TTT) program, co-hosted by CIS-A2K and the Odia Wikimedians User Group. TTT 2024 will be held from October 18-20, 2024, in Odisha.
This event aims to enhance leadership and training skills among active Indian Wikimedians, with a focus on innovative approaches to foster deeper engagement and learning.
; Key Details:
* Event Dates: October 18-20, 2024
* Location: Odisha, India
* Eligibility: Open to active Indian Wikimedians
* Scholarship Application Deadline: Thursday, August 15, 2024
We encourage all interested community members to apply for scholarships. Please review the event details and application guidelines on the [[:m:Meta page|Meta page]] before submitting your application.
Apply Here: [https://docs.google.com/forms/d/e/1FAIpQLSeshY7skcMUfevuuzTr57tKr_wwoefrJ9iehq6Gn_R8jl6FmA/viewform Scholarship Application Form]
For any questions, please post on the [[:m:Talk:CIS-A2K/Events/Train the Trainer Program/2024|Event talk page]] or email nitesh@cis-india.org.
We look forward to your participation and contributions!
Regards [[प्रयोगकर्ता:MediaWiki message delivery|MediaWiki message delivery]] ([[प्रयोगकर्ता वार्ता:MediaWiki message delivery|बात करीं]]) 10:45, 31 जुलाई 2024 (UTC)
<!-- Message sent by User:Nitesh (CIS-A2K)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=User:Titodutta/lists/Indic_VPs&oldid=22433435 -->
== <span lang="en" dir="ltr" class="mw-content-ltr">Reminder! Vote closing soon to fill vacancies of the first U4C</span> ==
<div lang="en" dir="ltr" class="mw-content-ltr">
<section begin="announcement-content" />
:''[[m:Special:MyLanguage/Universal Code of Conduct/Coordinating Committee/Election/2024 Special Election/Announcement – reminder to vote|You can find this message translated into additional languages on Meta-wiki.]] [https://meta.wikimedia.org/w/index.php?title=Special:Translate&group=page-{{urlencode:Universal Code of Conduct/Coordinating Committee/Election/2024 Special Election/Announcement – reminder to vote}}&language=&action=page&filter= {{int:please-translate}}]''
Dear all,
The voting period for the Universal Code of Conduct Coordinating Committee (U4C) is closing soon. It is open through 10 August 2024. Read the information on [[m:Special:MyLanguage/Universal_Code_of_Conduct/Coordinating_Committee/Election/2024_Special_Election#Voting|the voting page on Meta-wiki to learn more about voting and voter eligibility]]. If you are eligible to vote and have not voted in this special election, it is important that you vote now.
'''Why should you vote?''' The U4C is a global group dedicated to providing an equitable and consistent implementation of the UCoC. Community input into the committee membership is critical to the success of the UCoC.
Please share this message with members of your community so they can participate as well.
In cooperation with the U4C,<section end="announcement-content" />
</div>
-- [[m:User:Keegan (WMF)|Keegan (WMF)]] ([[m:User talk:Keegan (WMF)|talk]]) 15:29, 6 अगस्त 2024 (UTC)
<!-- Message sent by User:Keegan (WMF)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=Distribution_list/Global_message_delivery&oldid=27183190 -->
== <span lang="en" dir="ltr">Coming soon: A new sub-referencing feature – try it!</span> ==
<div lang="en" dir="ltr">
<section begin="Sub-referencing"/>
[[File:Sub-referencing reuse visual.png|{{#ifeq:{{#dir}}|ltr|right|left}}|400px]]
Hello. For many years, community members have requested an easy way to re-use references with different details. Now, a MediaWiki solution is coming: The new sub-referencing feature will work for wikitext and Visual Editor and will enhance the existing reference system. You can continue to use different ways of referencing, but you will probably encounter sub-references in articles written by other users. More information on [[m:Special:MyLanguage/WMDE Technical Wishes/Sub-referencing|the project page]].
'''We want your feedback''' to make sure this feature works well for you:
* [[m:Special:MyLanguage/WMDE Technical Wishes/Sub-referencing#Test|Please try]] the current state of development on beta wiki and [[m:Talk:WMDE Technical Wishes/Sub-referencing|let us know what you think]].
* [[m:WMDE Technical Wishes/Sub-referencing/Sign-up|Sign up here]] to get updates and/or invites to participate in user research activities.
[[m:Special:MyLanguage/Wikimedia Deutschland|Wikimedia Deutschland]]’s [[m:Special:MyLanguage/WMDE Technical Wishes|Technical Wishes]] team is planning to bring this feature to Wikimedia wikis later this year. We will reach out to creators/maintainers of tools and templates related to references beforehand.
Please help us spread the message. --[[m:User:Johannes Richter (WMDE)|Johannes Richter (WMDE)]] ([[m:User talk:Johannes Richter (WMDE)|talk]]) 10:36, 19 August 2024 (UTC)
<section end="Sub-referencing"/>
</div>
<!-- Message sent by User:Johannes Richter (WMDE)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=User:Johannes_Richter_(WMDE)/Sub-referencing/massmessage_list&oldid=27309345 -->
== Reminder: Apply for TTT 2024 Scholarships by August 22 ==
Dear Wikimedians,
'''Important Reminder''': The scholarship application deadline has been extended till Thursday, August 22, 2024. We encourage active Wikimedians to submit their applications before the deadline.
Please ensure you review the essential details on [[:m:CIS-A2K/Events/Train the Trainer Program/2024|Meta page]] regarding this event.
Scholarship Application [https://docs.google.com/forms/d/e/1FAIpQLSeshY7skcMUfevuuzTr57tKr_wwoefrJ9iehq6Gn_R8jl6FmA/viewform form]
For any questions, please reach out on the Event talk page or via email at nitesh@cis-india.org or Chinmayee at chinumishra70@gmail.com.
Regards,
TTT 2024 Organising team
[[प्रयोगकर्ता:MediaWiki message delivery|MediaWiki message delivery]] ([[प्रयोगकर्ता वार्ता:MediaWiki message delivery|बात करीं]]) 20:15, 20 अगस्त 2024 (UTC)
<!-- Message sent by User:Nitesh (CIS-A2K)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=User:Titodutta/lists/Indic_VPs&oldid=22433435 -->
== Sign up for the language community meeting on August 30th, 15:00 UTC ==
Hi all,
The next language community meeting is scheduled in a few weeks—on August 30th at 15:00 UTC. If you're interested in joining, you can [https://www.mediawiki.org/wiki/Wikimedia_Language_and_Product_Localization/Community_meetings#30_August_2024 sign up on this wiki page].
This participant-driven meeting will focus on sharing language-specific updates related to various projects, discussing technical issues related to language wikis, and working together to find possible solutions. For example, in the last meeting, topics included the Language Converter, the state of language research, updates on the Incubator conversations, and technical challenges around external links not working with special characters on Bengali sites.
Do you have any ideas for topics to share technical updates or discuss challenges? Please add agenda items to the document [https://etherpad.wikimedia.org/p/language-community-meeting-aug-2024 here] and reach out to ssethi(__AT__)wikimedia.org. We look forward to your participation!
[[प्रयोगकर्ता:MediaWiki message delivery|MediaWiki message delivery]] ([[प्रयोगकर्ता वार्ता:MediaWiki message delivery|बात करीं]]) 23:19, 22 अगस्त 2024 (UTC)
<!-- Message sent by User:SSethi (WMF)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=Distribution_list/Global_message_delivery&oldid=27183190 -->
== A2K Monthly Report for July 2024 ==
[[File:Centre for Internet And Society logo.svg|180px|right|link=]]
Dear Wikimedians,
We are excited to share our July newsletter, highlighting the impactful initiatives undertaken by CIS-A2K over the past month. This edition provides a detailed overview of our events and activities, offering insights into our collaborative efforts and community engagements and a brief regarding upcoming initiatives for next month.
; In the Limelight- NEP Study Report
; Monthly Recap
* [https://cis-india.org/raw/report-on-the-future-of-the-commons Future of Commons]
* West Bengal Travel Report
;Coming Soon - Upcoming Activities
* [[:m:CIS-A2K/Events/Train the Trainer Program/2024|Train the Trainer 2024]]
You can access the newsletter [[:m:CIS-A2K/Reports/Newsletter/July 2024|here]].
<br /><small>To subscribe or unsubscribe to this newsletter, click [[:m:CIS-A2K/Reports/Newsletter/Subscribe|here]]. </small>
Regards [[प्रयोगकर्ता:MediaWiki message delivery|MediaWiki message delivery]] ([[प्रयोगकर्ता वार्ता:MediaWiki message delivery|बात करीं]]) 09:05, 28 अगस्त 2024 (UTC)
<!-- Message sent by User:Nitesh (CIS-A2K)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=CIS-A2K/Reports/Newsletter/Subscribe/VP&oldid=23719485 -->
== <span lang="en" dir="ltr">Announcing the Universal Code of Conduct Coordinating Committee</span> ==
<div lang="en" dir="ltr">
<section begin="announcement-content" />
:''[https://lists.wikimedia.org/hyperkitty/list/board-elections@lists.wikimedia.org/thread/OKCCN2CANIH2K7DXJOL2GPVDFWL27R7C/ Original message at wikimedia-l]. [[m:Special:MyLanguage/Universal Code of Conduct/Coordinating Committee/Election/2024 Special Election/Announcement - results|You can find this message translated into additional languages on Meta-wiki.]] [https://meta.wikimedia.org/w/index.php?title=Special:Translate&group=page-{{urlencode:Universal Code of Conduct/Coordinating Committee/Election/2024 Special Election/Announcement - results}}&language=&action=page&filter= {{int:please-translate}}]''
Hello all,
The scrutineers have finished reviewing the vote and the [[m:Special:MyLanguage/Elections Committee|Elections Committee]] have certified the [[m:Special:MyLanguage/Universal Code of Conduct/Coordinating Committee/Election/2024 Special Election/Results|results]] for the [[m:Special:MyLanguage/Universal Code of Conduct/Coordinating Committee/Election/2024 Special Election|Universal Code of Conduct Coordinating Committee (U4C) special election]].
I am pleased to announce the following individual as regional members of the U4C, who will fulfill a term until 15 June 2026:
* North America (USA and Canada)
** Ajraddatz
The following seats were not filled during this special election:
* Latin America and Caribbean
* Central and East Europe (CEE)
* Sub-Saharan Africa
* South Asia
* The four remaining Community-At-Large seats
Thank you again to everyone who participated in this process and much appreciation to the candidates for your leadership and dedication to the Wikimedia movement and community.
Over the next few weeks, the U4C will begin meeting and planning the 2024-25 year in supporting the implementation and review of the UCoC and Enforcement Guidelines. You can follow their work on [[m:Special:MyLanguage/Universal Code of Conduct/Coordinating Committee|Meta-Wiki]].
On behalf of the U4C and the Elections Committee,<section end="announcement-content" />
</div>
[[m:User:RamzyM (WMF)|RamzyM (WMF)]] 14:05, 2 सितंबर 2024 (UTC)
<!-- Message sent by User:RamzyM (WMF)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=Distribution_list/Global_message_delivery&oldid=27183190 -->
== <span lang="en" dir="ltr">Have your say: Vote for the 2024 Board of Trustees!</span> ==
<div lang="en" dir="ltr">
<section begin="announcement-content" />
Hello all,
The voting period for the [[m:Special:MyLanguage/Wikimedia Foundation elections/2024|2024 Board of Trustees election]] is now open. There are twelve (12) candidates running for four (4) seats on the Board.
Learn more about the candidates by [[m:Special:MyLanguage/Wikimedia Foundation elections/2024/Candidates|reading their statements]] and their [[m:Special:MyLanguage/Wikimedia_Foundation_elections/2024/Questions_for_candidates|answers to community questions]].
When you are ready, go to the [[Special:SecurePoll/vote/400|SecurePoll]] voting page to vote. '''The vote is open from September 3rd at 00:00 UTC to September 17th at 23:59 UTC'''.
To check your voter eligibility, please visit the [[m:Special:MyLanguage/Wikimedia_Foundation_elections/2024/Voter_eligibility_guidelines|voter eligibility page]].
Best regards,
The Elections Committee and Board Selection Working Group<section end="announcement-content" />
</div>
[[प्रयोगकर्ता:MediaWiki message delivery|MediaWiki message delivery]] ([[प्रयोगकर्ता वार्ता:MediaWiki message delivery|बात करीं]]) 12:13, 3 सितंबर 2024 (UTC)
<!-- Message sent by User:RamzyM (WMF)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=Distribution_list/Global_message_delivery&oldid=27183190 -->
== <span lang="en" dir="ltr">Your wiki will be in read-only soon</span> ==
<div lang="en" dir="ltr">
<section begin="server-switch"/><div class="plainlinks">
[[:m:Special:MyLanguage/Tech/Server switch|Read this message in another language]] • [https://meta.wikimedia.org/w/index.php?title=Special:Translate&group=page-Tech%2FServer+switch&language=&action=page&filter= {{int:please-translate}}]
The [[foundation:|Wikimedia Foundation]] will switch the traffic between its data centers. This will make sure that Wikipedia and the other Wikimedia wikis can stay online even after a disaster.
All traffic will switch on '''{{#time:j xg|2024-09-25|en}}'''. The switch will start at '''[https://zonestamp.toolforge.org/{{#time:U|2024-09-25T15:00|en}} {{#time:H:i e|2024-09-25T15:00}}]'''.
Unfortunately, because of some limitations in [[mw:Special:MyLanguage/Manual:What is MediaWiki?|MediaWiki]], all editing must stop while the switch is made. We apologize for this disruption, and we are working to minimize it in the future.
A banner will be displayed on all wikis 30 minutes before this operation happens. This banner will remain visible until the end of the operation.
'''You will be able to read, but not edit, all wikis for a short period of time.'''
*You will not be able to edit for up to an hour on {{#time:l j xg Y|2024-09-25|en}}.
*If you try to edit or save during these times, you will see an error message. We hope that no edits will be lost during these minutes, but we can't guarantee it. If you see the error message, then please wait until everything is back to normal. Then you should be able to save your edit. But, we recommend that you make a copy of your changes first, just in case.
''Other effects'':
*Background jobs will be slower and some may be dropped. Red links might not be updated as quickly as normal. If you create an article that is already linked somewhere else, the link will stay red longer than usual. Some long-running scripts will have to be stopped.
* We expect the code deployments to happen as any other week. However, some case-by-case code freezes could punctually happen if the operation require them afterwards.
* [[mw:Special:MyLanguage/GitLab|GitLab]] will be unavailable for about 90 minutes.
This project may be postponed if necessary. You can [[wikitech:Switch_Datacenter|read the schedule at wikitech.wikimedia.org]]. Any changes will be announced in the schedule.
'''Please share this information with your community.'''</div><section end="server-switch"/>
</div>
[[User:Trizek_(WMF)|Trizek_(WMF)]], 09:36, 20 सितंबर 2024 (UTC)
<!-- Message sent by User:Trizek (WMF)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=Distribution_list/Non-Technical_Village_Pumps_distribution_list&oldid=27248326 -->
== A2K Monthly Report for August 2024 ==
[[File:Centre for Internet And Society logo.svg|180px|right|link=]]
Dear Wikimedians,
We are excited to present our August newsletter, showcasing the impactful initiatives led by CIS-A2K throughout the month. In this edition, you'll find a comprehensive overview of our events and activities, highlighting our collaborative efforts, community engagements, and a sneak peek into the exciting initiatives planned for the coming month.
; In the Limelight- Doing good as a creative person
; Monthly Recap
* Wiki Women Collective - South Asia Call
* Digitizing the Literary Legacy of Sane Guruji
* A2K at Wikimania
* Multilingual Wikisource
;Coming Soon - Upcoming Activities
* Tamil Content Enrichment Meet
* Santali Wiki Conference
* TTT 2024
You can access the newsletter [[:m:CIS-A2K/Reports/Newsletter/August 2024|here]].
<br /><small>To subscribe or unsubscribe to this newsletter, click [[:m:CIS-A2K/Reports/Newsletter/Subscribe|here]]. </small>
Regards [[प्रयोगकर्ता:MediaWiki message delivery|MediaWiki message delivery]] ([[प्रयोगकर्ता वार्ता:MediaWiki message delivery|बात करीं]]) 16:55, 26 सितंबर 2024 (UTC)
<!-- Message sent by User:Nitesh (CIS-A2K)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=CIS-A2K/Reports/Newsletter/Subscribe/VP&oldid=23719485 -->
== 'Wikidata item' link is moving. Find out where... ==
<div lang="en" dir="ltr" class="mw-content-ltr"><i>Apologies for cross-posting in English. Please consider translating this message.</i>{{tracked|T66315}}
Hello everyone, a small change will soon be coming to the user-interface of your Wikimedia project.
The [[d:Q16222597|Wikidata item]] [[w:|sitelink]] currently found under the <span style="color: #54595d;"><u>''General''</u></span> section of the '''Tools''' sidebar menu will move into the <span style="color: #54595d;"><u>''In Other Projects''</u></span> section.
We would like the Wiki communities feedback so please let us know or ask questions on the [[m:Talk:Wikidata_For_Wikimedia_Projects/Projects/Move_Wikidata_item_link|Discussion page]] before we enable the change which can take place October 4 2024, circa 15:00 UTC+2.
More information can be found on [[m:Wikidata_For_Wikimedia_Projects/Projects/Move_Wikidata_item_link|the project page]].<br><br>We welcome your feedback and questions.<br> [[प्रयोगकर्ता:MediaWiki message delivery|MediaWiki message delivery]] ([[प्रयोगकर्ता वार्ता:MediaWiki message delivery|बात करीं]]) 18:57, 27 सितंबर 2024 (UTC)
</div>
<!-- Message sent by User:Danny Benjafield (WMDE)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=User:Danny_Benjafield_(WMDE)/MassMessage_Test_List&oldid=27524260 -->
== Invitation to Participate in Wiki Loves Ramadan Community Engagement Survey ==
Dear all,
Apologies for writing in English. Please help to translate in your language.
We are excited to announce the upcoming [[m:Wiki Loves Ramadan|Wiki Loves Ramadan]] event, a global initiative aimed at celebrating Ramadan by enriching Wikipedia and its sister projects with content related to this significant time of year. As we plan to organize this event globally, your insights and experiences are crucial in shaping the best possible participation experience for the community.
To ensure that Wiki Loves Ramadan is engaging, inclusive, and impactful, we kindly invite you to participate in our community engagement survey. Your feedback will help us understand the needs of the community, set the event's focus, and guide our strategies for organizing this global event.
Survey link: https://forms.gle/f66MuzjcPpwzVymu5
Please take a few minutes to share your thoughts. Your input will make a difference!
Thank you for being a part of our journey to make Wiki Loves Ramadan a success.
Warm regards,
User:ZI Jony 03:19, 6 अक्टूबर 2024 (UTC)
Wiki Loves Ramadan Organizing Team
<!-- Message sent by User:ZI Jony@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=Distribution_list/Non-Technical_Village_Pumps_distribution_list&oldid=27510935 -->
== A2K Monthly Report for September 2024 ==
[[File:Centre for Internet And Society logo.svg|180px|right|link=]]
Dear Wikimedians,
We are thrilled to share our September newsletter, packed with highlights of the key initiatives driven by CIS-A2K over the past month. This edition features a detailed recap of our events, collaborative projects, and community outreach efforts. You'll also get an exclusive look at the exciting plans and initiatives we have in store for the upcoming month. Stay connected with our vibrant community and join us in celebrating the progress we’ve made together!
; In the Limelight- Santali Wiki Regional Conference 2024
; Dispatches from A2K
; Monthly Recap
* Book Lover’s Club in Belagavi
* CIS-A2K’s Multi-Year Grant Proposal
* Supporting the volunteer-led committee on WikiConference India 2025
* Tamil Content Enrichment Meet
* Experience of CIS-A2K's Wikimania Scholarship recipients
;Coming Soon - Upcoming Activities
* Train-the-trainer 2024
* Indic Community Engagement Call
* A2K at Wikimedia Technology Summit 2024
You can access the newsletter [[:m:CIS-A2K/Reports/Newsletter/September 2024|here]].
<br /><small>To subscribe or unsubscribe to this newsletter, click [[:m:CIS-A2K/Reports/Newsletter/Subscribe|here]]. </small>
Regards [[प्रयोगकर्ता:MediaWiki message delivery|MediaWiki message delivery]] ([[प्रयोगकर्ता वार्ता:MediaWiki message delivery|बात करीं]]) 15:13, 10 अक्टूबर 2024 (UTC)
<!-- Message sent by User:Nitesh (CIS-A2K)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=CIS-A2K/Reports/Newsletter/Subscribe/VP&oldid=23719485 -->
== <span lang="en" dir="ltr">Preliminary results of the 2024 Wikimedia Foundation Board of Trustees elections</span> ==
<div lang="en" dir="ltr">
<section begin="announcement-content" />
Hello all,
Thank you to everyone who participated in the [[m:Special:MyLanguage/Wikimedia Foundation elections/2024|2024 Wikimedia Foundation Board of Trustees election]]. Close to 6000 community members from more than 180 wiki projects have voted.
The following four candidates were the most voted:
# [[User:Kritzolina|Christel Steigenberger]]
# [[User:Nadzik|Maciej Artur Nadzikiewicz]]
# [[User:Victoria|Victoria Doronina]]
# [[User:Laurentius|Lorenzo Losa]]
While these candidates have been ranked through the vote, they still need to be appointed to the Board of Trustees. They need to pass a successful background check and meet the qualifications outlined in the Bylaws. New trustees will be appointed at the next Board meeting in December 2024.
[[m:Special:MyLanguage/Wikimedia_Foundation_elections/2024/Results|Learn more about the results on Meta-Wiki.]]
Best regards,
The Elections Committee and Board Selection Working Group
<section end="announcement-content" />
</div>
[[User:MPossoupe_(WMF)|MPossoupe_(WMF)]] 08:25, 14 अक्टूबर 2024 (UTC)
<!-- Message sent by User:MPossoupe (WMF)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=Distribution_list/Global_message_delivery&oldid=27183190 -->
== <span lang="en" dir="ltr">Seeking volunteers to join several of the movement’s committees</span> ==
<div lang="en" dir="ltr">
<section begin="announcement-content" />
Each year, typically from October through December, several of the movement’s committees seek new volunteers.
Read more about the committees on their Meta-wiki pages:
* [[m:Special:MyLanguage/Affiliations_Committee|Affiliations Committee (AffCom)]]
* [[m:Special:MyLanguage/Ombuds_commission|Ombuds commission (OC)]]
* [[m:Special:MyLanguage/Wikimedia Foundation/Legal/Community Resilience and Sustainability/Trust and Safety/Case Review Committee|Case Review Committee (CRC)]]
Applications for the committees open on 16 October 2024. Applications for the Affiliations Committee close on 18 November 2024, and applications for the Ombuds commission and the Case Review Committee close on 2 December 2024. Learn how to apply by [[m:Special:MyLanguage/Wikimedia_Foundation/Legal/Committee_appointments|visiting the appointment page on Meta-wiki]]. Post to the talk page or email [mailto:cst@wikimedia.org cst@wikimedia.org] with any questions you may have.
For the Committee Support team,
<section end="announcement-content" />
</div>
-- [[m:User:Keegan (WMF)|Keegan (WMF)]] ([[m:User talk:Keegan (WMF)|talk]]) 23:07, 16 अक्टूबर 2024 (UTC)
<!-- Message sent by User:Keegan (WMF)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=Distribution_list/Global_message_delivery&oldid=27601062 -->
== Announcing Indic Wikimedia Hackathon Bhubaneswar 2024 & scholarship applications ==
Dear Wikimedians,
We hope you are well.
We are thrilled to announce the upcoming [[:metawiki:Indic Wikimedia Hackathon Bhubaneswar 2024|Indic Wikimedia Hackathon Bhubaneswar 2024]], hosted by the [[:metawiki:Indic MediaWiki Developers User Group|Indic MediaWiki Developers UG]] (aka Indic-TechCom) in collaboration with the [[:metawiki:Odia Wikimedians User Group|Odia Wikimedians UG]]. The event will take place in Bhubaneswar during 20-22 December 2024.
Wikimedia hackathons are spaces for developers, designers, content editors, and other community stakeholders to collaborate on building technical solutions that help improve the experience of contributors and consumers of Wikimedia projects. The event is intended for:
* Technical contributors active in the Wikimedia technical ecosystem, which includes developers, maintainers (admins/interface admins), translators, designers, researchers, documentation writers etc.
* Content contributors having in-depth understanding of technical issues in their home Wikimedia projects like Wikipedia, Wikisource, Wiktionary, etc.
* Contributors to any other FOSS community or have participated in Wikimedia events in the past, and would like to get started with contributing to Wikimedia technical spaces.
We encourage you to follow the essential details & updates on Meta-Wiki regarding this event.
Event Meta-Wiki page: https://meta.wikimedia.org/wiki/Indic_Wikimedia_Hackathon_Bhubaneswar_2024
Scholarship application form: [https://docs.google.com/forms/d/e/1FAIpQLSf07lWyPJc6bxOCKl_i2vuMBdWa9EAzMRUej4x1ii3jFjTIaQ/viewform Click here to apply ]
''(Scholarships are available to assist with your attendance, covering travel, accommodation, food, and related expenses.)''
Please read the application guidance on the Meta-Wiki page before applying.
The scholarship application is open until the end of the day 2 November 2024 (Saturday).
If you have any questions, concerns or need any support with the application, please start a discussion on the event talk page or reach out to us contact@indicmediawikidev.org via email.
Best,
[[प्रयोगकर्ता:MediaWiki message delivery|MediaWiki message delivery]] ([[प्रयोगकर्ता वार्ता:MediaWiki message delivery|बात करीं]]) 09:35, 19 अक्टूबर 2024 (UTC)
<!-- Message sent by User:KCVelaga@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=Global_message_delivery/Targets/South_Asia_Village_Pumps&oldid=25720607 -->
== 'Wikidata item' link is moving, finally. ==
Hello everyone, I previously wrote on the 27th September to advise that the ''Wikidata item'' sitelink will change places in the sidebar menu, moving from the '''General''' section into the '''In Other Projects''' section. The scheduled rollout date of 04.10.2024 was delayed due to a necessary request for Mobile/MinervaNeue skin. I am happy to inform that the global rollout can now proceed and will occur later today, 22.10.2024 at 15:00 UTC-2. [[m:Talk:Wikidata_For_Wikimedia_Projects/Projects/Move_Wikidata_item_link|Please let us know]] if you notice any problems or bugs after this change. There should be no need for null-edits or purging cache for the changes to occur. Kind regards, -[[m:User:Danny Benjafield (WMDE)|Danny Benjafield (WMDE)]] 11:29, 22 अक्टूबर 2024 (UTC)
<!-- Message sent by User:Danny Benjafield (WMDE)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=User:Danny_Benjafield_(WMDE)/MassMessage_Test_List&oldid=27535421 -->
== Final Reminder: Join us in Making Wiki Loves Ramadan Success ==
Dear all,
We’re thrilled to announce the Wiki Loves Ramadan event, a global initiative to celebrate Ramadan by enhancing Wikipedia and its sister projects with valuable content related to this special time of year. As we organize this event globally, we need your valuable input to make it a memorable experience for the community.
Last Call to Participate in Our Survey: To ensure that Wiki Loves Ramadan is inclusive and impactful, we kindly request you to complete our community engagement survey. Your feedback will shape the event’s focus and guide our organizing strategies to better meet community needs.
* Survey Link: [https://docs.google.com/forms/d/e/1FAIpQLSffN4prPtR5DRSq9nH-t1z8hG3jZFBbySrv32YoxV8KbTwxig/viewform?usp=sf_link Complete the Survey]
* Deadline: November 10, 2024
Please take a few minutes to share your thoughts. Your input will truly make a difference!
'''Volunteer Opportunity''': Join the Wiki Loves Ramadan Team! We’re seeking dedicated volunteers for key team roles essential to the success of this initiative. If you’re interested in volunteer roles, we invite you to apply.
* Application Link: [https://docs.google.com/forms/d/e/1FAIpQLSfXiox_eEDH4yJ0gxVBgtL7jPe41TINAWYtpNp1JHSk8zhdgw/viewform?usp=sf_link Apply Here]
* Application Deadline: October 31, 2024
Explore Open Positions: For a detailed list of roles and their responsibilities, please refer to the position descriptions here: [https://docs.google.com/document/d/1oy0_tilC6kow5GGf6cEuFvdFpekcubCqJlaxkxh-jT4/ Position Descriptions]
Thank you for being part of this journey. We look forward to working together to make Wiki Loves Ramadan a success!
Warm regards,<br>
The Wiki Loves Ramadan Organizing Team 05:11, 29 अक्टूबर 2024 (UTC)
<!-- Message sent by User:ZI Jony@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=Distribution_list/Non-Technical_Village_Pumps_distribution_list&oldid=27568454 -->
== A2K Monthly Report for October 2024 ==
[[File:Centre for Internet And Society logo.svg|180px|right|link=]]
Dear Wikimedians,
We’re thrilled to share our October newsletter, featuring the impactful work led or support by CIS-A2K over the past month. In this edition, you’ll discover a detailed summary of our events and initiatives, emphasizing our collaborative projects, community interactions, and a preview of the exciting plans on the horizon for next month.
; In the Limelight: TTT
;Dispatches from A2K
; Monthly Recap
* Wikimedia Technology Summit
; Coming Soon - Upcoming Activities
* TTT follow-ups
You can access the newsletter [[:m:CIS-A2K/Reports/Newsletter/October 2024|here]].
<br /><small>To subscribe or unsubscribe to this newsletter, click [[:m:CIS-A2K/Reports/Newsletter/Subscribe|here]]. </small>
Regards [[प्रयोगकर्ता:MediaWiki message delivery|MediaWiki message delivery]] ([[प्रयोगकर्ता वार्ता:MediaWiki message delivery|बात करीं]]) 12:09, 8 नवंबर 2024 (UTC)
<!-- Message sent by User:Nitesh (CIS-A2K)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=CIS-A2K/Reports/Newsletter/Subscribe/VP&oldid=23719485 -->
== Announcing Wikifile-transfer v2, and second community call ==
Dear Wikimedia Community,
We are excited to announce the release of Wikifile-transfer v2, an enhanced tool to streamline media transfers across Wikimedia projects. Wikifile-transfer supports users in moving non-free images across wiki projects. This tool is helpful for contributors managing media across multiple language wikis.
'''You can learn more about it here:''' https://meta.wikimedia.org/wiki/Indic-TechCom/Tools/Wikifile-transfer/v2
'''You can try the new version here:''' https://wikifile-transfer.toolforge.org/#/
We invite you to join our second community call on '''November 10, 2024, at 18:00 IST (6:00 PM)'''. This meeting is an opportunity to discuss the new features, share feedback, and connect with us.
Please add your name at https://meta.wikimedia.org/wiki/Indic-TechCom/Tools/Wikifile-transfer/v2#Community_call.
Since this is a major new release, some bugs may still exist. We encourage you to report any issues you encounter to help us improve the tool further. We're looking forward to your feedback as we continue refining WikiFile-Transfer to meet the needs of our community.
Regards -[[प्रयोगकर्ता:ParasharSarthak|ParasharSarthak]] ([[प्रयोगकर्ता वार्ता:ParasharSarthak|बात करीं]])
== Sign up for the language community meeting on November 29th, 16:00 UTC ==
Hello everyone,
The next language community meeting is coming up next week, on November 29th, at 16:00 UTC (Zonestamp! For your timezone <https://zonestamp.toolforge.org/1732896000>). If you're interested in joining, you can sign up on this wiki page: <https://www.mediawiki.org/wiki/Wikimedia_Language_and_Product_Localization/Community_meetings#29_November_2024>.
This participant-driven meeting will be organized by the Wikimedia Foundation’s Language Product Localization team and the Language Diversity Hub. There will be presentations on topics like developing language keyboards, the creation of the Moore Wikipedia, and the language support track at Wiki Indaba. We will also have members from the Wayuunaiki community joining us to share their experiences with the Incubator and as a new community within our movement. This meeting will have a Spanish interpretation.
Looking forward to seeing you at the language community meeting! Cheers, [[User:SSethi (WMF)|Srishti]] 19:54, 21 नवंबर 2024 (UTC)
<!-- Message sent by User:SSethi (WMF)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=Distribution_list/Global_message_delivery&oldid=27746256 -->
== Proposal to enable the "Contribute" entry point in Bhojpuri Wikipedia ==
{{Int:Hello}} Bhojpuri Wikipedians,
Apologies as this message is not in your language. {{Int:please-translate}}.
The [[mediawikiwiki:Wikimedia_Language_and_Product_Localization|WMF Language and Product Localization]] team proposes enabling an entry point called "Contribute" to your Wikipedia.
The [[:bn:বিশেষ:Contribute|Contribute]] entry point is based on collaborative work with other product teams in the Wikimedia Foundation on [[mediawikiwiki:Edit_Discovery|Edit discovery]], which validated the entry point as a persistent and constant path that contributors took to discover ways to contribute content in Wikipedia.
Therefore, enabling this entry point in your Wikipedia will help contributors quickly discover available tools and immediately click to start using them. This entry point is designed to be a central point for discovering contribution tools in Bhojpuri Wikipedia.
'''Who can access it'''
Once it is enabled in your Wikipedia, newcomers can access the entry point automatically by just logging into their account, click on the User drop-down menu and choose the "Contribute" icon, which takes you to another menu where you will find a self-guided description of what you can do to contribute content, as shown in the image below. An option to "view contributions" is also available to access the list of your contributions.
[[चित्र:Mobile_Contribute_Page.png|Mobile Contribute Page]] [[चित्र:Mobile_contribute_menu_(detailed).png|Mobile contribute menu (detailed)]]
For experienced contributors, the Contribute icon is not automatically shown in their User drop-down menu. They will still see the "Contributions" option unless they change it to the "Contribute" manually.
This feature is available in four Wikipedia (Albanian, Malayalam, Mongolian, and Tagalog). We have gotten valuable feedback that helped us improve its discoverability. Now, it is ready to be enabled in other Wikis. One major improvement was to [[phab:T369041|make the entry point optional for experienced contributors]] who still want to have the "Contributions" entry point as default.
We plan to enable it '''on mobile''' for Wikis, where the Section translation tool is enabled. In this way, we will provide a main entry point to the mobile translation dashboard, and the exposure can still be limited by targeting only the mobile platform for now. If there are no objections to having the entry point for mobile users from your community, we will enable it by 10th December 2024.
We welcome your feedback and questions in this thread on our proposal to enable it here. Suppose there are no objections, we will deploy the "Contribute" entry point in your Wikipedia.
We look forward to your response soon.
Thank you!
On behalf of the WMF Language and Product Localization team. [[प्रयोगकर्ता:UOzurumba (WMF)|UOzurumba (WMF)]] ([[प्रयोगकर्ता वार्ता:UOzurumba (WMF)|बात करीं]]) 04:45, 28 नवंबर 2024 (UTC)
== [[:m:Expressions of Interest to host Wikimania 2027 in India: Initial conversation|Expressions of Interest to host Wikimania 2027 in India: Initial conversation]] ==
<div lang="en" dir="ltr">
''{{int:please-translate}}''
Dear Wikimedians,
We are excited to '''Initiate the discussions about India’s potential bid to host [[:m:Wikimania 2027|Wikimania 2027]]''', the annual international conference of the Wikimedia movement. This is a call to the community to express interest and share ideas for organizing this flagship event in India.
Having a consortium of a good number of country groups, recognised affiliates, thematic groups or regional leaders primarily from Asia for this purpose will ultimately strengthen our proposal from the region. This is the first step in a collaborative journey. We invite all interested community members to contribute to the discussion, share your thoughts, and help shape the vision for hosting Wikimania 2027 in India.
Your participation will ensure this effort reflects the strength and diversity of the Indian Wikimedia community. Please join the conversation on [[:m:Expressions of Interest to host Wikimania 2027 in India: Initial conversation#Invitation to Join the Conversation|Meta page]] and help make this vision a reality!
Regards,
<br>
[[:m:Wikimedians of Kerala|Wikimedians of Kerala User Group]] and [[:m:Odia Wikimedians User Group|Odia Wikimedians User Group]]
<br>
This message was sent with [[प्रयोगकर्ता:MediaWiki message delivery|MediaWiki message delivery]] ([[प्रयोगकर्ता वार्ता:MediaWiki message delivery|बात करीं]]) by [[m:User:Gnoeee|Gnoeee]] ([[m:User_talk:Gnoeee|talk]]) 15:14, 4 दिसंबर 2024 (UTC)
</div>
<!-- Message sent by User:Gnoeee@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=Global_message_delivery/Targets/Indic_VPs&oldid=27906962 -->
== A2K Monthly Report – November 2024 ==
[[File:Centre for Internet And Society logo.svg|180px|right|link=]]
Dear Wikimedians,
We’re excited to bring you the November edition of the CIS-A2K newsletter, highlighting our impactful initiatives and accomplishments over the past month. This issue offers a comprehensive recap of our events, collaborative projects, and community engagement efforts. It also provides a glimpse into the exciting plans we have lined up for the coming month. Stay connected with our vibrant community as we celebrate the progress we’ve made together!
; In the Limelight: Tulu Wikisource
; Dispatches from A2K
; Monthly Recap
* Learning hours Call
* Dandari-Gussadi Festival Documentation, Commons Education Project: Adilabad
* Executive Directors meeting at Oslo
; Coming Soon - Upcoming Activities
* Indic Wikimedia Hackathon 2024
* Learning Hours
You can access the newsletter [[:m:CIS-A2K/Reports/Newsletter/November 2024|here]].
<br /><small>To subscribe or unsubscribe to this newsletter, click [[:m:CIS-A2K/Reports/Newsletter/Subscribe|here]]. </small>
Warm regards,
CIS-A2K Team [[प्रयोगकर्ता:MediaWiki message delivery|MediaWiki message delivery]] ([[प्रयोगकर्ता वार्ता:MediaWiki message delivery|बात करीं]]) 16:46, 10 दिसंबर 2024 (UTC)
<!-- Message sent by User:Nitesh (CIS-A2K)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=CIS-A2K/Reports/Newsletter/Subscribe/VP&oldid=23719485 -->
== Invitation to Participate in the Wikimedia SAARC Conference Community Engagement Survey ==
Dear Community Members,
I hope this message finds you well. Please excuse the use of English; we encourage translations into your local languages to ensure inclusivity.
We are conducting a Community Engagement Survey to assess the sentiments, needs, and interests of South Asian Wikimedia communities in organizing the inaugural Wikimedia SAARC Regional Conference, proposed to be held in Kathmandu, Nepal.
This initiative aims to bring together participants from eight nations to collaborate towards shared goals. Your insights will play a vital role in shaping the event's focus, identifying priorities, and guiding the strategic planning for this landmark conference.
Survey Link: https://forms.gle/en8qSuCvaSxQVD7K6
We kindly request you to dedicate a few moments to complete the survey. Your feedback will significantly contribute to ensuring this conference addresses the community's needs and aspirations.
Deadline to Submit the Survey: 20 January 2025
Your participation is crucial in shaping the future of the Wikimedia SAARC community and fostering regional collaboration. Thank you for your time and valuable input.
Warm regards,<br>
[[:m:User:Biplab Anand|Biplab Anand]]
<!-- Message sent by User:Biplab Anand@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=User:Biplab_Anand/lists&oldid=28074658 -->
== A2K Monthly Report – December 2024 ==
[[File:Centre for Internet And Society logo.svg|180px|right|link=]]
Dear Wikimedians,
Happy 2025! We are thrilled to share with you the December edition of the CIS-A2K Newsletter, showcasing our initiatives and achievements from the past month. In this issue, we offer a detailed recap of key events, collaborative projects, and community engagement efforts. Additionally, we provide a preview of the exciting plans we have in store for the upcoming month. Stay connected with our dynamic community as we celebrate the progress we’ve made together!
; In the Limelight: Santali Food Festival
; Dispatches from A2K
; Monthly Recap
* Learning hours Call
* Indic Wikimedia Hackathon 2024
* Santali Food Festival
; Coming Soon - Upcoming Activities
* She Leads Bootcamp
You can access the newsletter [[:m:CIS-A2K/Reports/Newsletter/December 2024|here]].
<br /><small>To subscribe or unsubscribe to this newsletter, click [[:m:CIS-A2K/Reports/Newsletter/Subscribe|here]]. </small>
Warm regards,
CIS-A2K Team
[[प्रयोगकर्ता:MediaWiki message delivery|MediaWiki message delivery]] ([[प्रयोगकर्ता वार्ता:MediaWiki message delivery|बात करीं]]) 17:11, 12 जनवरी 2025 (UTC)
<!-- Message sent by User:Nitesh (CIS-A2K)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=CIS-A2K/Reports/Newsletter/Subscribe/VP&oldid=23719485 -->
== Open Community Call - [[:m:Expressions of Interest to host Wikimania 2027 in India: Initial conversation|Expressions of Interest to host Wikimania 2027 in India]] ==
<div lang="en" dir="ltr">
''{{int:please-translate}}''
Dear Wikimedians,
Happy 2025.. 😊
As you must have seen, members from Wikimedians of Kerala and Odia Wikimedia User Groups initiated preliminary discussions around submitting an Expression of Interest (EoI) to have Wikimania 2027 in India. You can find out more on the [[:m:Expressions of Interest to host Wikimania 2027 in India: Initial conversation|Meta Page]].
Our aim is to seek input and assess the overall community sentiment and thoughts from the Indian community before we proceed further with the steps involved in submitting the formal EOI.
As part of the same, we are hosting an '''open community call regarding India's Expression of Interest (EOI) to host Wikimania 2027'''. This is an opportunity to gather your valuable feedback, opinions, and suggestions to shape a strong and inclusive proposal.
* 📅 Date: Wednesday, January 15th 2025
* ⏰ Time: 7pm-8pm IST
* 📍 Platform: https://meet.google.com/sns-qebp-hck
Your participation is key to ensuring the EOI reflects the collective aspirations and potential of the vibrant South Asian community.
Let’s join together to make this a milestone event for the Wikimedia movement in South Asia.
We look forward to your presence!
<br>
Warm regards,
<br>
[[:m:Wikimedians of Kerala|Wikimedians of Kerala]] and [[:m:Odia Wikimedians User Group|Odia Wikimedians]] User Group's
<br>
This message was sent with [[प्रयोगकर्ता:MediaWiki message delivery|MediaWiki message delivery]] ([[प्रयोगकर्ता वार्ता:MediaWiki message delivery|बात करीं]]) by [[m:User:Gnoeee|Gnoeee]] ([[m:User_talk:Gnoeee|talk]]) at 05:55, 14 जनवरी 2025 (UTC)
</div>
<!-- Message sent by User:Gnoeee@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=Global_message_delivery/Targets/Indic_VPs&oldid=28100038 -->
== Launching! Join Us for Wiki Loves Ramadan 2025! ==
Dear All,
We’re happy to announce the launch of [[m:Wiki Loves Ramadan 2025|Wiki Loves Ramadan 2025]], an annual international campaign dedicated to celebrating and preserving Islamic cultures and history through the power of Wikipedia. As an active contributor to the Local Wikipedia, you are specially invited to participate in the launch.
This year’s campaign will be launched for you to join us write, edit, and improve articles that showcase the richness and diversity of Islamic traditions, history, and culture.
* Topic: [[m:Event:Wiki Loves Ramadan 2025 Campaign Launch|Wiki Loves Ramadan 2025 Campaign Launch]]
* When: Jan 19, 2025
* Time: 16:00 Universal Time UTC and runs throughout Ramadan (starting February 25, 2025).
* Join Zoom Meeting: https://us02web.zoom.us/j/88420056597?pwd=NdrpqIhrwAVPeWB8FNb258n7qngqqo.1
* Zoom meeting hosted by [[m:Wikimedia Bangladesh|Wikimedia Bangladesh]]
To get started, visit the [[m:Wiki Loves Ramadan 2025|campaign page]] for details, resources, and guidelines: Wiki Loves Ramadan 2025.
Add [[m:Wiki Loves Ramadan 2025/Participant|your community here]], and organized Wiki Loves Ramadan 2025 in your local language.
Whether you’re a first-time editor or an experienced Wikipedian, your contributions matter. Together, we can ensure Islamic cultures and traditions are well-represented and accessible to all.
Feel free to invite your community and friends too. Kindly reach out if you have any questions or need support as you prepare to participate.
Let’s make Wiki Loves Ramadan 2025 a success!
For the [[m:Wiki Loves Ramadan 2025/Team|International Team]] 12:07, 16 जनवरी 2025 (UTC)
<!-- Message sent by User:ZI Jony@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=Distribution_list/Non-Technical_Village_Pumps_distribution_list&oldid=27568454 -->
== Enabling Dark mode for logged-out users in this Wikipedia ==
<div lang="en" dir="ltr">
{{int:Hello}} Wikipedians,
Apologies, as this message is not written in your native language. {{Int:please-translate}}.
The [[mediawikiwiki:Reading/Web|Wikimedia Foundation Web team]] will be enabling [[mediawikiwiki:Special:MyLanguage/Reading/Web/Accessibility_for_reading|dark mode]] here on your Wikipedia by February 2025 now that pages on your wiki have passed our checks for accessibility and other quality checks. Congratulations!
The plan to enable is made possible by the diligent work of editors and other technical contributors in your community who ensured that templates, gadgets, and other parts of pages can be accessible in dark mode. Thank you all for making dark mode available for everybody!
For context, the Web team has concluded work on dark mode. If, on some wikis, the option is not yet available for logged-out users, this is likely because many pages do not yet display well in dark mode. As communities make progress on this work, we enable this feature on additional wikis once per month.
If you notice any issues after enabling dark mode, please create a page: <code>Reading/Web/Accessibility for reading/Reporting/xx.wikipedia.org</code> in MediaWiki ([[mediawikiwiki:Reading/Web/Accessibility_for_reading/Reporting|like these pages]]), and report the issue in the created page.
Thank you!
On behalf of the [[mediawikiwiki:Reading/Web|Wikimedia Foundation Web team]].
</div>
<bdi lang="en" dir="ltr">[[User:UOzurumba (WMF)|UOzurumba (WMF)]]</bdi> 22:15, 21 जनवरी 2025 (UTC)
<!-- Message sent by User:UOzurumba (WMF)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=User:UOzurumba_(WMF)/sandbox_Dark_mode_deployment_list_(February_2025)&oldid=28153450 -->
== New Wikimedia Campaign Launching Tomorrow: Indic Writing Systems Campaign 2025 ==
Dear Wikimedians,
We are excited to announce the launch of the [[:d:Wikidata:WikiProject Writing Systems/Indic writing systems campaign 2025|Indic writing systems campaign 2025]], which will take place from 23 January 2025 (World Endangered Writing Day) to 21 February 2025 (International Mother Language Day). This initiative is part of the ongoing efforts of [[:d:Wikidata:WikiProject Writing Systems|WikiProject writing Systems]] to raise awareness about the documentation and revitalization of writing systems, many of which are currently underrepresented or endangered.
Representatives from important organizations that work with writing systems, such as Endangered Alphabets and the Script Encoding Initiative, support the campaign. The campaign will feature two primary activities focused on the [[:d:Wikidata:WikiProject Writing Systems/Indic writing systems campaign 2025/Lists|list of target scripts]]:
* '''Wikidata Labelathon''': A focused effort to improve and expand the information related to South Asian scripts on Wikidata.
* '''Wikipedia Translatathon''': A collaborative activity aimed at enhancing the coverage of South Asian writing systems and their cultural significance on Wikipedia.
We are looking for local organizers to engage their respective communities. If you are interested in organizing, kindly sign-up [[:d:Wikidata:WikiProject Writing Systems/Indic writing systems campaign 2025/Local Organizers|here]]. We also encourage all Indic Wikimedians to [[:d:Wikidata:WikiProject Writing Systems/Indic writing systems campaign 2025/Participate|join us]] in this important campaign to help document and celebrate the diverse writing systems of South Asia.
Thank you for your support, and we look forward to your active participation.
Regards [[प्रयोगकर्ता:MediaWiki message delivery|MediaWiki message delivery]] ([[प्रयोगकर्ता वार्ता:MediaWiki message delivery|बात करीं]]) 17:29, 22 जनवरी 2025 (UTC)
Navya sri Kalli
<!-- Message sent by User:Nitesh (CIS-A2K)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=User:Titodutta/lists/Indic_VPs&oldid=22433435 -->
== Universal Code of Conduct annual review: provide your comments on the UCoC and Enforcement Guidelines ==
<div lang="en" dir="ltr" class="mw-content-ltr">
My apologies for writing in English.
{{Int:Please-translate}}.
I am writing to you to let you know the annual review period for the Universal Code of Conduct and Enforcement Guidelines is open now. You can make suggestions for changes through 3 February 2025. This is the first step of several to be taken for the annual review.
[[m:Special:MyLanguage/Universal_Code_of_Conduct/Annual_review|Read more information and find a conversation to join on the UCoC page on Meta]].
The [[m:Special:MyLanguage/Universal_Code_of_Conduct/Coordinating_Committee|Universal Code of Conduct Coordinating Committee]] (U4C) is a global group dedicated to providing an equitable and consistent implementation of the UCoC. This annual review was planned and implemented by the U4C. For more information and the responsibilities of the U4C, [[m:Special:MyLanguage/Universal_Code_of_Conduct/Coordinating_Committee/Charter|you may review the U4C Charter]].
Please share this information with other members in your community wherever else might be appropriate.
-- In cooperation with the U4C, [[m:User:Keegan (WMF)|Keegan (WMF)]] ([[m:User talk:Keegan (WMF)|talk]]) 01:11, 24 जनवरी 2025 (UTC)
</div>
<!-- Message sent by User:Keegan (WMF)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=Distribution_list/Global_message_delivery&oldid=27746256 -->
== Feminism and Folklore 2025 starts soon ==
<div style="border:8px maroon ridge;padding:6px;>
[[File:Feminism and Folklore 2025 logo.svg|centre|550px|frameless]]
::<div lang="en" dir="ltr" class="mw-content-ltr">
<center>''{{int:please-translate}}''</center>
Dear Wiki Community,
You are humbly invited to organize the '''[[:m:Feminism and Folklore 2025|Feminism and Folklore 2025]]''' writing competition from February 1, 2025, to March 31, 2025 on your local Wikipedia. This year, Feminism and Folklore will focus on feminism, women's issues, and gender-focused topics for the project, with a [[:c:Commons:Wiki Loves Folklore 2025|Wiki Loves Folklore]] gender gap focus and a folk culture theme on Wikipedia.
You can help Wikipedia's coverage of folklore from your area by writing or improving articles about things like folk festivals, folk dances, folk music, women and queer folklore figures, folk game athletes, women in mythology, women warriors in folklore, witches and witch hunting, fairy tales, and more. Users can help create new articles, expand or translate from a generated list of suggested articles.
Organisers are requested to work on the following action items to sign up their communities for the project:
# Create a page for the contest on the local wiki.
# Set up a campaign on '''CampWiz''' tool.
# Create the local list and mention the timeline and local and international prizes.
# Request local admins for site notice.
# Link the local page and the CampWiz link on the [[:m:Feminism and Folklore 2025/Project Page|meta project page]].
This year, the Wiki Loves Folklore Tech Team has introduced two new tools to enhance support for the campaign. These tools include the '''Article List Generator by Topic''' and '''CampWiz'''. The Article List Generator by Topic enables users to identify articles on the English Wikipedia that are not present in their native language Wikipedia. Users can customize their selection criteria, and the tool will present a table showcasing the missing articles along with suggested titles. Additionally, users have the option to download the list in both CSV and wikitable formats. Notably, the CampWiz tool will be employed for the project for the first time, empowering users to effectively host the project with a jury. Both tools are now available for use in the campaign. [https://tools.wikilovesfolklore.org/ '''Click here to access these tools''']
Learn more about the contest and prizes on our [[:m:Feminism and Folklore 2025|project page]]. Feel free to contact us on our [[:m:Talk:Feminism and Folklore 2025/Project Page|meta talk page]] or by email us if you need any assistance.
We look forward to your immense coordination.
Thank you and Best wishes,
'''[[:m:Feminism and Folklore 2025|Feminism and Folklore 2025 International Team]]'''
::::Stay connected [[File:B&W Facebook icon.png|link=https://www.facebook.com/feminismandfolklore/|30x30px]] [[File:B&W Twitter icon.png|link=https://twitter.com/wikifolklore|30x30px]]
</div></div>
--[[प्रयोगकर्ता:MediaWiki message delivery|MediaWiki message delivery]] ([[प्रयोगकर्ता वार्ता:MediaWiki message delivery|बात करीं]]) 02:35, 29 जनवरी 2025 (UTC)
== Wiki Loves Folklore is back! ==
<div lang="en" dir="ltr" class="mw-content-ltr">
{{int:please-translate}}
[[File:Wiki Loves Folklore Logo.svg|right|150px|frameless]]
Dear Wiki Community,
You are humbly invited to participate in the '''[[:c:Commons:Wiki Loves Folklore 2025|Wiki Loves Folklore 2025]]''' an international media contest organized on Wikimedia Commons to document folklore and intangible cultural heritage from different regions, including, folk creative activities and many more. It is held every year from the '''1st till the 31st''' of March.
You can help in enriching the folklore documentation on Commons from your region by taking photos, audios, videos, and [https://commons.wikimedia.org/w/index.php?title=Special:UploadWizard&campaign=wlf_2025 submitting] them in this commons contest.
You can also [[:c:Commons:Wiki Loves Folklore 2025/Organize|organize a local contest]] in your country and support us in translating the [[:c:Commons:Wiki Loves Folklore 2025/Translations|project pages]] to help us spread the word in your native language.
Feel free to contact us on our [[:c:Commons talk:Wiki Loves Folklore 2025|project Talk page]] if you need any assistance.
'''Kind regards,'''
'''Wiki loves Folklore International Team'''
--[[प्रयोगकर्ता:MediaWiki message delivery|MediaWiki message delivery]] ([[प्रयोगकर्ता वार्ता:MediaWiki message delivery|बात करीं]]) 02:35, 29 जनवरी 2025 (UTC)
</div>
<!-- Message sent by User:Tiven2240@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=Distribution_list/Global_message_delivery/Wikipedia&oldid=26503019 -->
== Reminder: first part of the annual UCoC review closes soon ==
<div lang="en" dir="ltr" class="mw-content-ltr">
My apologies for writing in English.
{{Int:Please-translate}}.
This is a reminder that the first phase of the annual review period for the Universal Code of Conduct and Enforcement Guidelines will be closing soon. You can make suggestions for changes through [[d:Q614092|the end of day]], 3 February 2025. This is the first step of several to be taken for the annual review.
[[m:Special:MyLanguage/Universal_Code_of_Conduct/Annual_review|Read more information and find a conversation to join on the UCoC page on Meta]]. After review of the feedback, proposals for updated text will be published on Meta in March for another round of community review.
Please share this information with other members in your community wherever else might be appropriate.
-- In cooperation with the U4C, [[m:User:Keegan (WMF)|Keegan (WMF)]] ([[m:User talk:Keegan (WMF)|talk]]) 00:48, 3 फरवरी 2025 (UTC)
</div>
<!-- Message sent by User:Keegan (WMF)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=Distribution_list/Global_message_delivery&oldid=28198931 -->
== A2K Monthly Newsletter – January 2025 ==
Dear Wikimedians,
We are delighted to share the January edition of the CIS-A2K Newsletter, highlighting our initiatives and accomplishments from the past month. This issue features a detailed recap of key events, collaborative projects, and community engagement efforts. Plus, get a sneak peek at the exciting plans we have for the upcoming month. Let’s continue strengthening our community and celebrating our collective progress!
;In the Limelight
* Wikipedia and Wikimedia Commons App Usage in India: Key Insights and Challenges
;Dispatches from A2K
;Monthly Highlights
* Learning Hours Call
* She Leads Bootcamp 2025
* Wikisource Reader App
; Coming Soon – Upcoming Activities
* Participation in Wikisource Conference
* Second Iteration of She Leads
Please read the full newsletter [[:m:CIS-A2K/Reports/Newsletter/January 2025|here]]<br /><small>To subscribe or unsubscribe to this newsletter, click [[:m:CIS-A2K/Reports/Newsletter/Subscribe|here]]. </small>
Looking forward to another impactful year ahead!
Regards,
CIS-A2K Team [[प्रयोगकर्ता:MediaWiki message delivery|MediaWiki message delivery]] ([[प्रयोगकर्ता वार्ता:MediaWiki message delivery|बात करीं]]) 14:34, 12 फरवरी 2025 (UTC)
<!-- Message sent by User:Nitesh (CIS-A2K)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=CIS-A2K/Reports/Newsletter/Subscribe/VP&oldid=28096022 -->
== <span lang="en" dir="ltr"> Upcoming Language Community Meeting (Feb 28th, 14:00 UTC) and Newsletter</span> ==
<div lang="en" dir="ltr">
<section begin="message"/>
Hello everyone!
[[File:WP20Symbols WIKI INCUBATOR.svg|right|frameless|150x150px|alt=An image symbolising multiple languages]]
We’re excited to announce that the next '''Language Community Meeting''' is happening soon, '''February 28th at 14:00 UTC'''! If you’d like to join, simply sign up on the '''[[mw:Wikimedia_Language_and_Product_Localization/Community_meetings#28_February_2025|wiki page]]'''.
This is a participant-driven meeting where we share updates on language-related projects, discuss technical challenges in language wikis, and collaborate on solutions. In our last meeting, we covered topics like developing language keyboards, creating the Moore Wikipedia, and updates from the language support track at Wiki Indaba.
'''Got a topic to share?''' Whether it’s a technical update from your project, a challenge you need help with, or a request for interpretation support, we’d love to hear from you! Feel free to '''reply to this message''' or add agenda items to the document '''[[etherpad:p/language-community-meeting-feb-2025|here]]'''.
Also, we wanted to highlight that the sixth edition of the Language & Internationalization newsletter (January 2025) is available here: [[:mw:Special:MyLanguage/Wikimedia Language and Product Localization/Newsletter/2025/January|Wikimedia Language and Product Localization/Newsletter/2025/January]]. This newsletter provides updates from the October–December 2024 quarter on new feature development, improvements in various language-related technical projects and support efforts, details about community meetings, and ideas for contributing to projects. To stay updated, you can subscribe to the newsletter on its wiki page: [[:mw:Wikimedia Language and Product Localization/Newsletter|Wikimedia Language and Product Localization/Newsletter]].
We look forward to your ideas and participation at the language community meeting, see you there!
<section end="message"/>
</div>
<bdi lang="en" dir="ltr">[[User:MediaWiki message delivery|MediaWiki message delivery]]</bdi> 08:28, 22 फरवरी 2025 (UTC)
<!-- Message sent by User:SSethi (WMF)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=Distribution_list/Global_message_delivery&oldid=28217779 -->
== Universal Code of Conduct annual review: proposed changes are available for comment ==
<div lang="en" dir="ltr" class="mw-content-ltr">
My apologies for writing in English.
{{Int:Please-translate}}.
I am writing to you to let you know that [[m:Special:MyLanguage/Universal_Code_of_Conduct/Annual_review/Proposed_Changes|proposed changes]] to the [[foundation:Special:MyLanguage/Policy:Universal_Code_of_Conduct/Enforcement_guidelines|Universal Code of Conduct (UCoC) Enforcement Guidelines]] and [[m:Special:MyLanguage/Universal_Code_of_Conduct/Coordinating_Committee/Charter|Universal Code of Conduct Coordinating Committee (U4C) Charter]] are open for review. '''[[m:Special:MyLanguage/Universal_Code_of_Conduct/Annual_review/Proposed_Changes|You can provide feedback on suggested changes]]''' through the [[d:Q614092|end of day]] on Tuesday, 18 March 2025. This is the second step in the annual review process, the final step will be community voting on the proposed changes.
[[m:Special:MyLanguage/Universal_Code_of_Conduct/Annual_review|Read more information and find relevant links about the process on the UCoC annual review page on Meta]].
The [[m:Special:MyLanguage/Universal_Code_of_Conduct/Coordinating_Committee|Universal Code of Conduct Coordinating Committee]] (U4C) is a global group dedicated to providing an equitable and consistent implementation of the UCoC. This annual review was planned and implemented by the U4C. For more information and the responsibilities of the U4C, [[m:Special:MyLanguage/Universal_Code_of_Conduct/Coordinating_Committee/Charter|you may review the U4C Charter]].
Please share this information with other members in your community wherever else might be appropriate.
-- In cooperation with the U4C, [[m:User:Keegan (WMF)|Keegan (WMF)]] 18:51, 7 मार्च 2025 (UTC)
</div>
<!-- Message sent by User:Keegan (WMF)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=Distribution_list/Global_message_delivery&oldid=28307738 -->
== An improved dashboard for the Content Translation tool ==
<div lang="en" dir="ltr">
{{Int:hello}} Wikipedians,
Apologies as this message is not in your language, {{Int:please-translate}}.
The [[mediawikiwiki:Special:MyLanguage/Wikimedia_Language_and_Product_Localization|Language and Product Localization team]] has improved the [https://test.wikipedia.org/w/index.php?title=Special:ContentTranslation&filter-type=automatic&filter-id=previous-edits&active-list=suggestions&from=en&to=es Content Translation dashboard] to create a consistent experience for all contributors using mobile and desktop devices. The improved translation dashboard allows all logged-in users of the tool to enjoy a consistent experience regardless of their type of device.
With a harmonized experience, logged-in desktop users now have access to the capabilities shown in the image below.
[[file:Content_Translation_new-dashboard.png|alt=|center|thumb|576x576px|Notice that in this screenshot, the new dashboard allows: Users to adjust suggestions with the "For you" and "...More" buttons to select general topics or community-created collections (like the example of Climate topic). Also, users can use translation to create new articles (as before) and expand existing articles section by section. You can see how suggestions are provided in the new dashboard in two groups ("Create new pages" and "Expand with new sections")-one for each activity.]]
[[File:Content_Translation_dashboard_on_desktop.png|alt=|center|thumb|577x577px|In the current dashboard, you will notice that you can't adjust suggestions to select topics or community-created collections. Also, you can't expand on existing articles by translating new sections.]]
We will implement [[mw:Special:MyLanguage/Content translation#Improved translation experience|this improvement]] on your wiki '''on Monday, March 17th, 2025''' and remove the current dashboard '''by May 2025'''.
Please reach out with any questions concerning the dashboard in this thread.
Thank you!
On behalf of the Language and Product Localization team.
</div>
<bdi lang="en" dir="ltr">[[User:UOzurumba (WMF)|UOzurumba (WMF)]]</bdi> 02:55, 13 मार्च 2025 (UTC)
<!-- Message sent by User:UOzurumba (WMF)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=User:UOzurumba_(WMF)/sandbox_CX_Unified_dashboard_announcement_list_1&oldid=28382282 -->
== <span lang="en" dir="ltr">Your wiki will be in read-only soon</span> ==
<div lang="en" dir="ltr">
<section begin="server-switch"/><div class="plainlinks">
[[:m:Special:MyLanguage/Tech/Server switch|Read this message in another language]] • [https://meta.wikimedia.org/w/index.php?title=Special:Translate&group=page-Tech%2FServer+switch&language=&action=page&filter= {{int:please-translate}}]
The [[foundation:|Wikimedia Foundation]] will switch the traffic between its data centers. This will make sure that Wikipedia and the other Wikimedia wikis can stay online even after a disaster.
All traffic will switch on '''{{#time:j xg|2025-03-19|en}}'''. The switch will start at '''[https://zonestamp.toolforge.org/{{#time:U|2025-03-19T14:00|en}} {{#time:H:i e|2025-03-19T14:00}}]'''.
Unfortunately, because of some limitations in [[mw:Special:MyLanguage/Manual:What is MediaWiki?|MediaWiki]], all editing must stop while the switch is made. We apologize for this disruption, and we are working to minimize it in the future.
A banner will be displayed on all wikis 30 minutes before this operation happens. This banner will remain visible until the end of the operation.
'''You will be able to read, but not edit, all wikis for a short period of time.'''
*You will not be able to edit for up to an hour on {{#time:l j xg Y|2025-03-19|en}}.
*If you try to edit or save during these times, you will see an error message. We hope that no edits will be lost during these minutes, but we can't guarantee it. If you see the error message, then please wait until everything is back to normal. Then you should be able to save your edit. But, we recommend that you make a copy of your changes first, just in case.
''Other effects'':
*Background jobs will be slower and some may be dropped. Red links might not be updated as quickly as normal. If you create an article that is already linked somewhere else, the link will stay red longer than usual. Some long-running scripts will have to be stopped.
* We expect the code deployments to happen as any other week. However, some case-by-case code freezes could punctually happen if the operation require them afterwards.
* [[mw:Special:MyLanguage/GitLab|GitLab]] will be unavailable for about 90 minutes.
This project may be postponed if necessary. You can [[wikitech:Switch_Datacenter|read the schedule at wikitech.wikimedia.org]]. Any changes will be announced in the schedule.
'''Please share this information with your community.'''</div><section end="server-switch"/>
</div>
<bdi lang="en" dir="ltr">[[User:MediaWiki message delivery|MediaWiki message delivery]]</bdi> 23:15, 14 मार्च 2025 (UTC)
<!-- Message sent by User:Quiddity (WMF)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=Distribution_list/Non-Technical_Village_Pumps_distribution_list&oldid=28307742 -->
== Final proposed modifications to the Universal Code of Conduct Enforcement Guidelines and U4C Charter now posted ==
<div lang="en" dir="ltr" class="mw-content-ltr">
The proposed modifications to the [[foundation:Special:MyLanguage/Policy:Universal_Code_of_Conduct/Enforcement_guidelines|Universal Code of Conduct Enforcement Guidelines]] and the U4C Charter [[m:Universal_Code_of_Conduct/Annual_review/2025/Proposed_Changes|are now on Meta-wiki for community notice]] in advance of the voting period. This final draft was developed from the previous two rounds of community review. Community members will be able to vote on these modifications starting on 17 April 2025. The vote will close on 1 May 2025, and results will be announced no later than 12 May 2025. The U4C election period, starting with a call for candidates, will open immediately following the announcement of the review results. More information will be posted on [[m:Special:MyLanguage//Universal_Code_of_Conduct/Coordinating_Committee/Election|the wiki page for the election]] soon.
Please be advised that this process will require more messages to be sent here over the next two months.
The [[m:Special:MyLanguage/Universal_Code_of_Conduct/Coordinating_Committee|Universal Code of Conduct Coordinating Committee (U4C)]] is a global group dedicated to providing an equitable and consistent implementation of the UCoC. This annual review was planned and implemented by the U4C. For more information and the responsibilities of the U4C, you may [[m:Special:MyLanguage/Universal_Code_of_Conduct/Coordinating_Committee/Charter|review the U4C Charter]].
Please share this message with members of your community so they can participate as well.
-- In cooperation with the U4C, [[m:User:Keegan (WMF)|Keegan (WMF)]] ([[m:User_talk:Keegan (WMF)|talk]]) 02:04, 4 अप्रैल 2025 (UTC)
</div>
<!-- Message sent by User:Keegan (WMF)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=Distribution_list/Global_message_delivery&oldid=28469465 -->
== Invitation for the next South Asia Open Community Call (SAOCC) with a focus on WMF's Annual Plans (27th April, 2025) ==
Dear All,
The [[:m:South Asia Open Community Call|South Asia Open Community Call (SAOCC)]] is a monthly call where South Asian communities come together to participate, share community activities, receive important updates and ask questions in the moderated discussions.
The next SAOCC is scheduled for 27th April, 6:00 PM-7:00 PM (1230-1330 UTC) and will have a section with representatives from WMF who will be sharing more about their [[:m:Wikimedia Foundation Annual Plan/2025-2026/Global Trends|Annual Plans]] for the next year, in addition to Open Community Updates.
We request you all to please attend the call and you can find the joining details [https://meta.wikimedia.org/wiki/South_Asia_Open_Community_Call#27_April_2025 here].
Thank you! [[प्रयोगकर्ता:MediaWiki message delivery|MediaWiki message delivery]] ([[प्रयोगकर्ता वार्ता:MediaWiki message delivery|बात करीं]]) 08:25, 14 अप्रैल 2025 (UTC)
<!-- Message sent by User:Nitesh (CIS-A2K)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=User:Nitesh_Gill/lists/Indic_VPs&oldid=28543211 -->
== Ukraine's Cultural Diplomacy Month 2025: Invitation ==
<div lang="en" dir="ltr">
[[File:UCDM 2025 general.png|180px|right]]
{{int:please-translate}}
Hello, dear Wikipedians!<br/>
[[:m:Special:MyLanguage/Wikimedia Ukraine|Wikimedia Ukraine]], in cooperation with the [[:en:Ministry of Foreign Affairs of Ukraine|MFA of Ukraine]] and [[:en:Ukrainian Institute|Ukrainian Institute]], has launched the fifth edition of writing challenge "'''[[:m:Special:MyLanguage/Ukraine's Cultural Diplomacy Month 2025|Ukraine's Cultural Diplomacy Month]]'''", which lasts from '''14th April''' until '''16th May 2025'''. The campaign is dedicated to famous Ukrainian artists of cinema, music, literature, architecture, design, and cultural phenomena of Ukraine that are now part of world heritage. We accept contributions in every language!
The most active contesters will receive prizes.
If you are interested in coordinating long-term community engagement for the campaign and becoming a local ambassador, we would love to hear from you! Please let us know your interest.
<br/>
We invite you to take part and help us improve the coverage of Ukrainian culture on Wikipedia in your language! Also, we plan to set up a [[:m:CentralNotice/Request/Ukraine's Cultural Diplomacy Month 2025|banner]] to notify users of the possibility to participate in such a challenge! [[:m:User:OlesiaLukaniuk (WMUA)|OlesiaLukaniuk (WMUA)]] ([[:m:User talk:OlesiaLukaniuk (WMUA)|talk]])
</div>
16:10, 16 अप्रैल 2025 (UTC)
<!-- Message sent by User:Hide on Rosé@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=User:OlesiaLukaniuk_(WMUA)/list_of_wikis&oldid=28552112 -->
== Vote now on the revised UCoC Enforcement Guidelines and U4C Charter ==
<div lang="en" dir="ltr" class="mw-content-ltr">
The voting period for the revisions to the Universal Code of Conduct Enforcement Guidelines ("UCoC EG") and the UCoC's Coordinating Committee Charter is open now through the end of 1 May (UTC) ([https://zonestamp.toolforge.org/1746162000 find in your time zone]). [[m:Special:MyLanguage/Universal_Code_of_Conduct/Annual_review/2025/Voter_information|Read the information on how to participate and read over the proposal before voting]] on the UCoC page on Meta-wiki.
The [[m:Special:MyLanguage/Universal_Code_of_Conduct/Coordinating_Committee|Universal Code of Conduct Coordinating Committee (U4C)]] is a global group dedicated to providing an equitable and consistent implementation of the UCoC. This annual review of the EG and Charter was planned and implemented by the U4C. Further information will be provided in the coming months about the review of the UCoC itself. For more information and the responsibilities of the U4C, you may [[m:Special:MyLanguage/Universal_Code_of_Conduct/Coordinating_Committee/Charter|review the U4C Charter]].
Please share this message with members of your community so they can participate as well.
In cooperation with the U4C -- [[m:User:Keegan (WMF)|Keegan (WMF)]] ([[m:User_talk:Keegan (WMF)|talk]]) 00:34, 17 अप्रैल 2025 (UTC)
</div>
<!-- Message sent by User:Keegan (WMF)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=Distribution_list/Global_message_delivery&oldid=28469465 -->
== Sub-referencing: User testing ==
<div lang="en" dir="ltr">
[[File:Sub-referencing reuse visual.png|400px|right]]
<small>''Apologies for writing in English, please help us by providing a translation below''</small>
Hi I’m Johannes from [[:m:Wikimedia Deutschland|Wikimedia Deutschland]]'s [[:m:WMDE Technical Wishes|Technical Wishes team]]. We are making great strides with the new [[:m:WMDE Technical Wishes/Sub-referencing|sub-referencing feature]] and we’d love to invite you to take part in two activities to help us move this work further:
#'''Try it out and share your feedback'''
#:[[:m:WMDE Technical Wishes/Sub-referencing# Test the prototype|Please try]] the updated ''wikitext'' feature [https://en.wikipedia.beta.wmflabs.org/wiki/Sub-referencing on the beta wiki] and let us know what you think, either [[:m:Talk:WMDE Technical Wishes/Sub-referencing|on our talk page]] or by [https://greatquestion.co/wikimediadeutschland/talktotechwish booking a call] with our UX researcher.
#'''Get a sneak peak and help shape the ''Visual Editor'' user designs'''
#:Help us test the new design prototypes by participating in user sessions – [https://greatquestion.co/wikimediadeutschland/gxk0taud/apply sign up here to receive an invite]. We're especially hoping to speak with people from underrepresented and diverse groups. If that's you, please consider signing up! No prior or extensive editing experience is required. User sessions will start ''May 14th''.
We plan to bring this feature to Wikimedia wikis later this year. We’ll reach out to wikis for piloting in time for deployments. Creators and maintainers of reference-related tools and templates will be contacted beforehand as well.
Thank you very much for your support and encouragement so far in helping bring this feature to life! </div> <bdi lang="en" dir="ltr">[[User:Johannes Richter (WMDE)|Johannes Richter (WMDE)]] ([[User talk:Johannes Richter (WMDE)|talk]])</bdi> 15:03, 28 अप्रैल 2025 (UTC)
<!-- Message sent by User:Johannes Richter (WMDE)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=User:Johannes_Richter_(WMDE)/Sub-referencing/massmessage_list&oldid=28628657 -->
== <span lang="en" dir="ltr">Vote on proposed modifications to the UCoC Enforcement Guidelines and U4C Charter</span> ==
<div lang="en" dir="ltr">
<section begin="announcement-content" />
The voting period for the revisions to the Universal Code of Conduct Enforcement Guidelines and U4C Charter closes on 1 May 2025 at 23:59 UTC ([https://zonestamp.toolforge.org/1746162000 find in your time zone]). [[m:Special:MyLanguage/Universal Code of Conduct/Annual review/2025/Voter information|Read the information on how to participate and read over the proposal before voting]] on the UCoC page on Meta-wiki.
The [[m:Special:MyLanguage/Universal Code of Conduct/Coordinating Committee|Universal Code of Conduct Coordinating Committee (U4C)]] is a global group dedicated to providing an equitable and consistent implementation of the UCoC. This annual review was planned and implemented by the U4C. For more information and the responsibilities of the U4C, you may [[m:Special:MyLanguage/Universal Code of Conduct/Coordinating Committee/Charter|review the U4C Charter]].
Please share this message with members of your community in your language, as appropriate, so they can participate as well.
In cooperation with the U4C -- <section end="announcement-content" />
</div>
<div lang="en" dir="ltr" class="mw-content-ltr">
[[m:User:Keegan (WMF)|Keegan (WMF)]] ([[m:User talk:Keegan (WMF)|talk]]) 03:40, 29 अप्रैल 2025 (UTC)</div>
<!-- Message sent by User:Keegan (WMF)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=Distribution_list/Global_message_delivery&oldid=28618011 -->
== We will be enabling the new Charts extension on your wiki soon! ==
''(Apologies for posting in English)''
Hi all! We have good news to share regarding the ongoing problem with graphs and charts affecting all wikis that use them.
As you probably know, the [[:mw:Special:MyLanguage/Extension:Graph|old Graph extension]] was disabled in 2023 [[listarchive:list/wikitech-l@lists.wikimedia.org/thread/EWL4AGBEZEDMNNFTM4FRD4MHOU3CVESO/|due to security reasons]]. We’ve worked in these two years to find a solution that could replace the old extension, and provide a safer and better solution to users who wanted to showcase graphs and charts in their articles. We therefore developed the [[:mw:Special:MyLanguage/Extension:Chart|Charts extension]], which will be replacing the old Graph extension and potentially also the [[:mw:Extension:EasyTimeline|EasyTimeline extension]].
After successfully deploying the extension on Italian, Swedish, and Hebrew Wikipedia, as well as on MediaWiki.org, as part of a pilot phase, we are now happy to announce that we are moving forward with the next phase of deployment, which will also include your wiki.
The deployment will happen in batches, and will start from '''May 6'''. Please, consult [[:mw:Special:MyLanguage/Extension:Chart/Project#Deployment Timeline|our page on MediaWiki.org]] to discover when the new Charts extension will be deployed on your wiki. You can also [[:mw:Special:MyLanguage/Extension:Chart|consult the documentation]] about the extension on MediaWiki.org.
If you have questions, need clarifications, or just want to express your opinion about it, please refer to the [[:mw:Special:MyLanguage/Extension_talk:Chart/Project|project’s talk page on Mediawiki.org]], or ping me directly under this thread. If you encounter issues using Charts once it gets enabled on your wiki, please report it on the [[:mw:Extension_talk:Chart/Project|talk page]] or at [[phab:tag/charts|Phabricator]].
Thank you in advance! -- [[User:Sannita (WMF)|User:Sannita (WMF)]] ([[User talk:Sannita (WMF)|talk]]) 15:07, 6 मई 2025 (UTC)
<!-- Message sent by User:Sannita (WMF)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=User:Sannita_(WMF)/Mass_sending_test&oldid=28663781 -->
== <span lang="en" dir="ltr">Call for Candidates for the Universal Code of Conduct Coordinating Committee (U4C)</span> ==
<div lang="en" dir="ltr">
<section begin="announcement-content" />
The results of voting on the Universal Code of Conduct Enforcement Guidelines and Universal Code of Conduct Coordinating Committee (U4C) Charter is [[m:Special:MyLanguage/Universal Code of Conduct/Annual review/2025#Results|available on Meta-wiki]].
You may now [[m:Special:MyLanguage/Universal Code of Conduct/Coordinating Committee/Election/2025/Candidates|submit your candidacy to serve on the U4C]] through 29 May 2025 at 12:00 UTC. Information about [[m:Special:MyLanguage/Universal Code of Conduct/Coordinating Committee/Election/2025|eligibility, process, and the timeline are on Meta-wiki]]. Voting on candidates will open on 1 June 2025 and run for two weeks, closing on 15 June 2025 at 12:00 UTC.
If you have any questions, you can ask on [[m:Talk:Universal Code of Conduct/Coordinating Committee/Election/2025|the discussion page for the election]]. -- in cooperation with the U4C, </div><section end="announcement-content" />
</div>
<bdi lang="en" dir="ltr">[[m:User:Keegan (WMF)|Keegan (WMF)]] ([[m:User_talk:Keegan (WMF)|बातचीत]])</bdi> 22:06, 15 मई 2025 (UTC)
<!-- Message sent by User:Keegan (WMF)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=Distribution_list/Global_message_delivery&oldid=28618011 -->
== RfC ongoing regarding Abstract Wikipedia (and your project) ==
<div lang="en" dir="ltr" class="mw-content-ltr">
''(Apologies for posting in English, if this is not your first language)''
Hello all! We opened a discussion on Meta about a very delicate issue for the development of [[:m:Special:MyLanguage/Abstract Wikipedia|Abstract Wikipedia]]: where to store the abstract content that will be developed through functions from Wikifunctions and data from Wikidata. Since some of the hypothesis involve your project, we wanted to hear your thoughts too.
We want to make the decision process clear: we do not yet know which option we want to use, which is why we are consulting here. We will take the arguments from the Wikimedia communities into account, and we want to consult with the different communities and hear arguments that will help us with the decision. The decision will be made and communicated after the consultation period by the Foundation.
You can read the various hypothesis and have your say at [[:m:Abstract Wikipedia/Location of Abstract Content|Abstract Wikipedia/Location of Abstract Content]]. Thank you in advance! -- [[User:Sannita (WMF)|Sannita (WMF)]] ([[User talk:Sannita (WMF)|<span class="signature-talk">{{int:Talkpagelinktext}}</span>]]) 15:26, 22 मई 2025 (UTC)
</div>
<!-- Message sent by User:Sannita (WMF)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=User:Sannita_(WMF)/Mass_sending_test&oldid=28768453 -->
== <span lang="en" dir="ltr">Wikimedia Foundation Board of Trustees 2025 Selection & Call for Questions</span> ==
<div lang="en" dir="ltr">
<section begin="announcement-content" />
:''[[m:Special:MyLanguage/Wikimedia Foundation elections/2025/Announcement/Selection announcement|{{int:interlanguage-link-mul}}]] • [https://meta.wikimedia.org/w/index.php?title=Special:Translate&group=page-{{urlencode:Wikimedia Foundation elections/2025/Announcement/Selection announcement}}&language=&action=page&filter= {{int:please-translate}}]''
Dear all,
This year, the term of 2 (two) Community- and Affiliate-selected Trustees on the Wikimedia Foundation Board of Trustees will come to an end [1]. The Board invites the whole movement to participate in this year’s selection process and vote to fill those seats.
The Elections Committee will oversee this process with support from Foundation staff [2]. The Governance Committee, composed of trustees who are not candidates in the 2025 community-and-affiliate-selected trustee selection process (Raju Narisetti, Shani Evenstein Sigalov, Lorenzo Losa, Kathy Collins, Victoria Doronina and Esra’a Al Shafei) [3], is tasked with providing Board oversight for the 2025 trustee selection process and for keeping the Board informed. More details on the roles of the Elections Committee, Board, and staff are here [4].
Here are the key planned dates:
* May 22 – June 5: Announcement (this communication) and call for questions period [6]
* June 17 – July 1, 2025: Call for candidates
* July 2025: If needed, affiliates vote to shortlist candidates if more than 10 apply [5]
* August 2025: Campaign period
* August – September 2025: Two-week community voting period
* October – November 2025: Background check of selected candidates
* Board’s Meeting in December 2025: New trustees seated
Learn more about the 2025 selection process - including the detailed timeline, the candidacy process, the campaign rules, and the voter eligibility criteria - on this Meta-wiki page [[m:Special:MyLanguage/Wikimedia_Foundation_elections/2025|[link]]].
'''Call for Questions'''
In each selection process, the community has the opportunity to submit questions for the Board of Trustees candidates to answer. The Election Committee selects questions from the list developed by the community for the candidates to answer. Candidates must answer all the required questions in the application in order to be eligible; otherwise their application will be disqualified. This year, the Election Committee will select 5 questions for the candidates to answer. The selected questions may be a combination of what’s been submitted from the community, if they’re alike or related. [[m:Special:MyLanguage/Wikimedia_Foundation_elections/2025/Questions_for_candidates|[link]]]
'''Election Volunteers'''
Another way to be involved with the 2025 selection process is to be an Election Volunteer. Election Volunteers are a bridge between the Elections Committee and their respective community. They help ensure their community is represented and mobilize them to vote. Learn more about the program and how to join on this Meta-wiki page [[m:Wikimedia_Foundation_elections/2025/Election_volunteers|[link].]]
Thank you!
[1] https://meta.wikimedia.org/wiki/Wikimedia_Foundation_elections/2022/Results
[2] https://foundation.wikimedia.org/wiki/Committee:Elections_Committee_Charter
[3] https://foundation.wikimedia.org/wiki/Resolution:Committee_Membership,_December_2024
[4] https://meta.wikimedia.org/wiki/Wikimedia_Foundation_elections_committee/Roles
[5] https://meta.wikimedia.org/wiki/Wikimedia_Foundation_elections/2025/FAQ
[6] https://meta.wikimedia.org/wiki/Wikimedia_Foundation_elections/2025/Questions_for_candidates
Best regards,
Victoria Doronina
Board Liaison to the Elections Committee
Governance Committee<section end="announcement-content" />
</div>
[[प्रयोगकर्ता:MediaWiki message delivery|MediaWiki message delivery]] ([[प्रयोगकर्ता वार्ता:MediaWiki message delivery|बात करीं]]) 03:07, 28 मई 2025 (UTC)
<!-- Message sent by User:RamzyM (WMF)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=Distribution_list/Global_message_delivery&oldid=28618011 -->
== Update from A2K team: May 2025 ==
Hello everyone,
We’re happy to share that the ''Access to Knowledge'' (A2K) program has now formally become part of the '''Raj Reddy Centre for Technology and Society''' at '''IIIT-Hyderabad'''. Going forward, our work will continue under the name [[:m:IIITH-OKI|Open Knowledge Initiatives]].
The new team includes most members from the former A2K team, along with colleagues from IIIT-H already involved in Wikimedia and Open Knowledge work. Through this integration, our commitment to partnering with Indic Wikimedia communities, the GLAM sector, and broader open knowledge networks remains strong and ongoing. Learn more at our Team’s page on Meta-Wiki.
We’ll also be hosting an open session during the upcoming [[:m:South Asia Open Community Call|South Asia Open Community Call]] on 6 - 7 pm, and we look forward to connecting with you there.
Thanks for your continued support! Thank you
Pavan Santhosh,
On behalf of the Open Knowledge Initiatives Team.
<!-- Message sent by User:Nitesh (CIS-A2K)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=User:Nitesh_Gill/lists/Indic_VPs&oldid=28543211 -->
== <span lang="en" dir="ltr"> Upcoming Deployment of the CampaignEvents Extension</span> ==
<div lang="en" dir="ltr">
<section begin="message"/>
Hello everyone,
''(Apologies for posting in English if English is not your first language. Please help translate to your language.)''
The Campaigns Product Team is planning a global deployment of the '''[[:mw:Help:Extension:CampaignEvents|CampaignEvents extension]]''' to all Wikipedias, including this wiki, during the '''week of June 23rd'''.
This extension is designed to help organizers plan and manage events, WikiProjects, and other on-wiki collaborations - and to make these efforts more discoverable.
The three main features of this extension are:
* '''[[:m:Event_Center/Registration|Event Registration]]''': A simple way to sign up for events on the wiki.
* '''[[:m:CampaignEvents/Collaboration_list|Collaboration List]]''': A global list of events and a local list of WikiProjects, accessible at '''[[:m:Special:AllEvents|Special:AllEvents]]'''.
* '''[[:m:Campaigns/Foundation_Product_Team/Invitation_list|Invitation Lists]]''': A tool to help organizers find editors who might want to join, based on their past contributions.
'''Note''': The extension comes with a new user right called '''"Event Organizer"''', which will be managed by administrators on this wiki. Organizer tools like Event Registration and Invitation Lists will only work if someone is granted this right. The Collaboration List is available to everyone immediately after deployment.
The extension is already live on several wikis, including '''Meta, Wikidata, English Wikipedia''', and more ( [[m:CampaignEvents/Deployment_status#Current_Deployment_Status_for_CampaignEvents_extension| See the full deployment list]])
If you have any questions, concerns, or feedback, please feel free to share them on the [[m:Talk:CampaignEvents| extension talkpage]]. We’d love to hear from you before the rollout.
Thank you! <section end="message"/>
</div>
<bdi lang="en" dir="ltr">[[User:Udehb-WMF|Udehb-WMF]] ([[User talk:Udehb-WMF|बातचीत]]) 16:47, 29 मई 2025 (UTC)</bdi>
<!-- Message sent by User:Udehb-WMF@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=User:Udehb-WMF/sandbox/deployment_audience&oldid=28803829 -->
== 📣 Announcing the South Asia Newsletter – Get Involved! 🌏 ==
<div lang="en" dir="ltr">
''{{int:please-translate}}''
Hello Wikimedians of South Asia! 👋
We’re excited to launch the planning phase for the '''South Asia Newsletter''' – a bi-monthly, community-driven publication that brings news, updates, and original stories from across our vibrant region, to one page!
We’re looking for passionate contributors to join us in shaping this initiative:
* Editors/Reviewers – Craft and curate impactful content
* Technical Contributors – Build and maintain templates, modules, and other magic on meta.
* Community Representatives – Represent your Wikimedia Affiliate or community
If you're excited to contribute and help build a strong regional voice, we’d love to have you on board!
👉 Express your interest though [https://docs.google.com/forms/d/e/1FAIpQLSfhk4NIe3YwbX88SG5hJzcF3GjEeh5B1dMgKE3JGSFZ1vtrZw/viewform this link].
Please share this with your community members.. Let’s build this together! 💬
This message was sent with [[प्रयोगकर्ता:MediaWiki message delivery|MediaWiki message delivery]] ([[प्रयोगकर्ता वार्ता:MediaWiki message delivery|बात करीं]]) by [[m:User:Gnoeee|Gnoeee]] ([[m:User_talk:Gnoeee|talk]]) at 15:42, 6 जून 2025 (UTC)
</div>
<!-- Message sent by User:Gnoeee@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=Global_message_delivery/Targets/South_Asia_Village_Pumps&oldid=25720607 -->
== Vote now in the 2025 U4C Election ==
<div lang="en" dir="ltr" class="mw-content-ltr">
Apologies for writing in English.
{{Int:Please-translate}}
Eligible voters are asked to participate in the 2025 [[m:Special:MyLanguage/Universal_Code_of_Conduct/Coordinating_Committee|Universal Code of Conduct Coordinating Committee]] election. More information–including an eligibility check, voting process information, candidate information, and a link to the vote–are available on Meta at the [[m:Special:MyLanguage/Universal_Code_of_Conduct/Coordinating_Committee/Election/2025|2025 Election information page]]. The vote closes on 17 June 2025 at [https://zonestamp.toolforge.org/1750161600 12:00 UTC].
Please vote if your account is eligible. Results will be available by 1 July 2025. -- In cooperation with the U4C, [[m:User:Keegan (WMF)|Keegan (WMF)]] ([[m:User talk:Keegan (WMF)|talk]]) 23:00, 13 जून 2025 (UTC) </div>
<!-- Message sent by User:Keegan (WMF)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=Distribution_list/Global_message_delivery&oldid=28848819 -->
== <span lang="en" dir="ltr">Wikimedia Foundation Board of Trustees 2025 - Call for Candidates</span> ==
<div lang="en" dir="ltr">
<section begin="announcement-content" />
:''<div class="plainlinks">[[m:Special:MyLanguage/Wikimedia Foundation elections/2025/Announcement/Call for candidates|{{int:interlanguage-link-mul}}]] • [https://meta.wikimedia.org/w/index.php?title=Special:Translate&group=page-{{urlencode:Wikimedia Foundation elections/2025/Announcement/Call for candidates}}&language=&action=page&filter= {{int:please-translate}}]</div>
Hello all,
The [[m:Special:MyLanguage/Wikimedia Foundation elections/2025|call for candidates for the 2025 Wikimedia Foundation Board of Trustees selection is now open]] from June 17, 2025 – July 2, 2025 at 11:59 UTC [1]. The Board of Trustees oversees the Wikimedia Foundation's work, and each Trustee serves a three-year term [2]. This is a volunteer position.
This year, the Wikimedia community will vote in late August through September 2025 to fill two (2) seats on the Foundation Board. Could you – or someone you know – be a good fit to join the Wikimedia Foundation's Board of Trustees? [3]
Learn more about what it takes to stand for these leadership positions and how to submit your candidacy on [[m:Special:MyLanguage/Wikimedia Foundation elections/2025/Candidate application|this Meta-wiki page]] or encourage someone else to run in this year's election.
Best regards,
Abhishek Suryawanshi<br />
Chair of the Elections Committee
On behalf of the Elections Committee and Governance Committee
[1] https://meta.wikimedia.org/wiki/Special:MyLanguage/Wikimedia_Foundation_elections/2025/Call_for_candidates
[2] https://foundation.wikimedia.org/wiki/Legal:Bylaws#(B)_Term.
[3] https://meta.wikimedia.org/wiki/Special:MyLanguage/Wikimedia_Foundation_elections/2025/Resources_for_candidates<section end="announcement-content" />
</div>
[[प्रयोगकर्ता:MediaWiki message delivery|MediaWiki message delivery]] ([[प्रयोगकर्ता वार्ता:MediaWiki message delivery|बात करीं]]) 17:43, 17 जून 2025 (UTC)
<!-- Message sent by User:RamzyM (WMF)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=Distribution_list/Global_message_delivery&oldid=28866958 -->
== <span lang="en" dir="ltr">Sister Projects Task Force reviews Wikispore and Wikinews</span> ==
<div lang="en" dir="ltr">
<section begin="message"/>
Dear Wikimedia Community,
The [[m:Wikimedia Foundation Community Affairs Committee|Community Affairs Committee (CAC)]] of the Wikimedia Foundation Board of Trustees assigned [[m:Wikimedia Foundation Community Affairs Committee/Sister Projects Task Force|the Sister Projects Task Force (SPTF)]] to update and implement a procedure for assessing the lifecycle of Sister Projects – wiki [[m:Wikimedia projects|projects supported by Wikimedia Foundation (WMF)]].
A vision of relevant, accessible, and impactful free knowledge has always guided the Wikimedia Movement. As the ecosystem of Wikimedia projects continues to evolve, it is crucial that we periodically review existing projects to ensure they still align with our goals and community capacity.
Despite their noble intent, some projects may no longer effectively serve their original purpose. '''Reviewing such projects is not about giving up – it's about responsible stewardship of shared resources'''. Volunteer time, staff support, infrastructure, and community attention are finite, and the non-technical costs tend to grow significantly as our ecosystem has entered a different age of the internet than the one we were founded in. Supporting inactive projects or projects that didn't meet our ambitions can unintentionally divert these resources from areas with more potential impact.
Moreover, maintaining projects that no longer reflect the quality and reliability of the Wikimedia name stands for, involves a reputational risk. An abandoned or less reliable project affects trust in the Wikimedia movement.
Lastly, '''failing to sunset or reimagine projects that are no longer working can make it much harder to start new ones'''. When the community feels bound to every past decision – no matter how outdated – we risk stagnation. A healthy ecosystem must allow for evolution, adaptation, and, when necessary, letting go. If we create the expectation that every project must exist indefinitely, we limit our ability to experiment and innovate.
Because of this, SPTF reviewed two requests concerning the lifecycle of the Sister Projects to work through and demonstrate the review process. We chose Wikispore as a case study for a possible new Sister Project opening and Wikinews as a case study for a review of an existing project. Preliminary findings were discussed with the CAC, and a community consultation on both proposals was recommended.
=== Wikispore ===
The [[m:Wikispore|application to consider Wikispore]] was submitted in 2019. SPTF decided to review this request in more depth because rather than being concentrated on a specific topic, as most of the proposals for the new Sister Projects are, Wikispore has the potential to nurture multiple start-up Sister Projects.
After careful consideration, the SPTF has decided '''not to recommend''' Wikispore as a Wikimedia Sister Project. Considering the current activity level, the current arrangement allows '''better flexibility''' and experimentation while WMF provides core infrastructural support.
We acknowledge the initiative's potential and seek community input on what would constitute a sufficient level of activity and engagement to reconsider its status in the future.
As part of the process, we shared the decision with the Wikispore community and invited one of its leaders, Pharos, to an SPTF meeting.
Currently, we especially invite feedback on measurable criteria indicating the project's readiness, such as contributor numbers, content volume, and sustained community support. This would clarify the criteria sufficient for opening a new Sister Project, including possible future Wikispore re-application. However, the numbers will always be a guide because any number can be gamed.
=== Wikinews ===
We chose to review Wikinews among existing Sister Projects because it is the one for which we have observed the highest level of concern in multiple ways.
Since the SPTF was convened in 2023, its members have asked for the community's opinions during conferences and community calls about Sister Projects that did not fulfil their promise in the Wikimedia movement.[https://commons.wikimedia.org/wiki/File:WCNA_2024._Sister_Projects_-_opening%3F_closing%3F_merging%3F_splitting%3F.pdf <nowiki>[1]</nowiki>][https://meta.wikimedia.org/wiki/Wikimedia_Foundation_Community_Affairs_Committee/Sister_Projects_Task_Force#Wikimania_2023_session_%22Sister_Projects:_past,_present_and_the_glorious_future%22 <nowiki>[2]</nowiki>][https://meta.wikimedia.org/wiki/WikiConvention_francophone/2024/Programme/Quelle_proc%C3%A9dure_pour_ouvrir_ou_fermer_un_projet_%3F <nowiki>[3]</nowiki>] Wikinews was the leading candidate for an evaluation because people from multiple language communities proposed it. Additionally, by most measures, it is the least active Sister Project, with the greatest drop in activity over the years.
While the Language Committee routinely opens and closes language versions of the Sister Projects in small languages, there has never been a valid proposal to close Wikipedia in major languages or any project in English. This is not true for Wikinews, where there was a proposal to close English Wikinews, which gained some traction but did not result in any action[https://meta.wikimedia.org/wiki/Proposals_for_closing_projects/Closure_of_English_Wikinews <nowiki>[4]</nowiki>][https://meta.wikimedia.org/wiki/WikiConvention_francophone/2024/Programme/Quelle_proc%C3%A9dure_pour_ouvrir_ou_fermer_un_projet_%3F <nowiki>[5]</nowiki>, see section 5] as well as a draft proposal to close all languages of Wikinews[https://meta.wikimedia.org/wiki/Talk:Proposals_for_closing_projects/Archive_2#Close_Wikinews_completely,_all_languages? <nowiki>[6]</nowiki>].
[[:c:File:Sister Projects Taskforce Wikinews review 2024.pdf|Initial metrics]] compiled by WMF staff also support the community's concerns about Wikinews.
Based on this report, SPTF recommends a community reevaluation of Wikinews. We conclude that its current structure and activity levels are the lowest among the existing sister projects. SPTF also recommends pausing the opening of new language editions while the consultation runs.
SPTF brings this analysis to a discussion and welcomes discussions of alternative outcomes, including potential restructuring efforts or integration with other Wikimedia initiatives.
'''Options''' mentioned so far (which might be applied to just low-activity languages or all languages) include but are not limited to:
*Restructure how Wikinews works and is linked to other current events efforts on the projects,
*Merge the content of Wikinews into the relevant language Wikipedias, possibly in a new namespace,
*Merge content into compatibly licensed external projects,
*Archive Wikinews projects.
Your insights and perspectives are invaluable in shaping the future of these projects. We encourage all interested community members to share their thoughts on the relevant discussion pages or through other designated feedback channels.
=== Feedback and next steps ===
We'd be grateful if you want to take part in a conversation on the future of these projects and the review process. We are setting up two different project pages: [[m:Public consultation about Wikispore|Public consultation about Wikispore]] and [[m:Public consultation about Wikinews|Public consultation about Wikinews]]. Please participate between 27 June 2025 and 27 July 2025, after which we will summarize the discussion to move forward. You can write in your own language.
I will also host a community conversation 16th July Wednesday 11.00 UTC and 17th July Thursday 17.00 UTC (call links to follow shortly) and will be around at Wikimania for more discussions.
<section end="message"/>
</div>
-- [[User:Victoria|Victoria]] on behalf of the Sister Project Task Force, 20:56, 27 जून 2025 (UTC)
<!-- Message sent by User:Johan (WMF)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=User:Johan_(WMF)/Sister_project_MassMassage_on_behalf_of_Victoria/Target_list&oldid=28911188 -->
== Wikidata Item and Property labels soon displayed in Wiki Watchlist/Recent Changes ==
''(Apologies for posting in English, you can help by translating into your language)''
Hello everyone, the [[m:Wikidata_For_Wikimedia_Projects/Clearer_Wikidata_Edit_Summaries/Resolve_Labels|Wikidata For Wikimedia Projects]] team is excited to announce an upcoming change in how Wikidata edit changelogs are displayed in your [[Special:Watchlist|Watchlists]] and [[Special:RecentChanges|Recent Changes]] lists. If an edit is made on Wikidata that affects a page in another Wikimedia Project, the changelog will contain some information about the nature of the edit. This can include a QID (or Q-number), a PID (or P-number) and a value (which can be text, numbers, dates, or also QID or PID’s). Confused by these terms? See the [[d:Special:MyLanguage/Wikidata:Glossary|Wikidata:Glossary]] for further explanations.
The upcoming change is scheduled for '''17.07.2025''', between '''1300 - 1500 UTC'''.
The change will display the label (item name) alongside any QID or PIDs, as seen in the image below:
[[File:Apr10 edit summary on Wikidata.png|An edit sum entry on Wikidata, labels display alongside their P- and Q-no.'s]]
These changes will only be visible if you have Wikidata edits enabled in your User Preferences for Watchlists and Recent Changes, or have the active filter ‘Wikidata edits’ checkbox toggled on, directly on the Watchlist and Recent Changes pages.
Your bot and gadget may be affected! There are thousands of bots, gadgets and user-scripts and whilst we have researched potential effects to many of them, we cannot guarantee there won’t be some that are broken or affected by this change.
Further information and context about this change, including how your bot may be affected can be found on this [[m:Wikidata_For_Wikimedia_Projects/Clearer_Wikidata_Edit_Summaries/Resolve_Labels|project task page]]. We welcome your questions and feedback, please write to us on this dedicated [[m:Talk:Wikidata_For_Wikimedia_Projects/Clearer_Wikidata_Edit_Summaries/Resolve_Labels|Talk page]].
Thank you, - [[m:User:Danny_Benjafield_(WMDE)|Danny Benjafield (WMDE)]] on behalf of the Wikidata For Wikimedia Projects Team. [[प्रयोगकर्ता:MediaWiki message delivery|MediaWiki message delivery]] ([[प्रयोगकर्ता वार्ता:MediaWiki message delivery|बात करीं]]) 12:45, 14 जुलाई 2025 (UTC)
<!-- Message sent by User:Danny Benjafield (WMDE)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=User:Danny_Benjafield_(WMDE)/MassMessage_Test_List&oldid=28981877 -->
== Call for Expression of Interest – Advanced Train the Trainer 2025 (ATTT) ==
''Sorry for writing in English. Please feel free to translate it into your language.''
The [[:m:IIITH-OKI|Open Knowledge Initiatives]] (OKI) team at IIIT-Hyderabad is organising [[:m:IIITH-OKI/Advance Train The Trainer 2025|Advanced Train the Trainer (ATTT) 2025]], tentatively in the second week of October 2025 at IIIT-Hyderabad.
The program is for experienced Wikimedians who have attended TTT earlier and wish to deepen their leadership, thematic expertise, and practical skills. It will run in parallel [[:m:IIITH-OKI/Advance Train The Trainer 2025/Tracks|tracks]]:
* ''' Evaluation, Impact, and Data Storytelling''' – Measure, analyse, and communicate the impact of Wikimedia initiatives.
* '''Project Design Challenge''' – Develop a 3-month project with mentoring and planning tools.
Info about the event:
* Deadline: 20 August 2025
* Apply here: [[:m:IIITH-OKI/Advance Train The Trainer 2025/Expression of Interest|Expression of Interest form]]
If you cannot apply directly on Meta, email your proposal (following the Meta template) with a valid reason to nitesh@research.iiit.ac.in.
— Open Knowledge Initiatives Team, IIIT-Hyderabad
[[प्रयोगकर्ता:MediaWiki message delivery|MediaWiki message delivery]] ([[प्रयोगकर्ता वार्ता:MediaWiki message delivery|बात करीं]]) 18:00, 14 अगस्त 2025 (UTC)
<!-- Message sent by User:Nitesh (OKI)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=User:Nitesh_Gill/lists/Indic_VPs&oldid=29127818 -->
== Expression of Interest Extended: Advanced Train the Trainer 2025 ==
Dear all,
We are pleased to inform you that the deadline to submit your Expression of Interest has been extended until '''26 August'''. The [[:m:IIITH-OKI/Advance Train The Trainer 2025|Advanced Train the Trainer]] (ATTT) 2025 will be held on '''10, 11, and 12 October 2025 at IIIT-Hyderabad'''.
ATTT is designed for experienced Wikimedians who have or have not previously participated in Train the Trainer, but wish to develop further their leadership, thematic expertise, and practical application skills. The training will run in two thematic tracks:
* '''Evaluation, Impact, and Data Storytelling''' – Learn to measure, analyse, and narrate the impact of Wikimedia initiatives through hands-on labs and peer feedback.
* '''Project Design: From Learning to Action''' – Work on a 3-month project with mentoring and planning tools, turning learning into impactful, context-driven initiatives.
** Apply here: [[:m:IIITH-OKI/Advance Train The Trainer 2025/Expression of Interest|Expression of Interest form]]
** Deadline to apply (extended): 26 August 2025
** Event Dates: 10-12 October 2025
We will share further updates with you soon.
''Note: If you are unsure about which track to choose, please still submit your application by answering the questions thoroughly. Our team will review it and assign you to the most suitable track. If you are not comfortable applying directly on Meta, you may send your proposal (using the Meta template and with a valid reason) to nitesh@research.iiit.ac.in. If selected, the OKI team will publish it on Meta on your behalf.''
We look forward to receiving your applications and working together to shape impactful Wikimedia leadership!
Regards,
Open Knowledge Initiatives Team
IIIT-Hyderabad
[[प्रयोगकर्ता:MediaWiki message delivery|MediaWiki message delivery]] ([[प्रयोगकर्ता वार्ता:MediaWiki message delivery|बात करीं]]) 14:42, 20 अगस्त 2025 (UTC)
<!-- Message sent by User:Nitesh (OKI)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=User:Nitesh_Gill/lists/Indic_VPs&oldid=29127818 -->
== Final Call: Apply for Advanced Train the Trainer 2025 by Today ==
Dear all,
This is a kind reminder that today is the '''last day''' to submit your '''Expression of Interest for Advanced Train the Trainer 2025'''. If you are interested, we warmly encourage you to complete your application at the earliest using the link below: [[:m:IIITH-OKI/Advance Train The Trainer 2025/Expression of Interest|Here]]
''Please note that we will not be able to accommodate requests for reopening the form after the deadline. Once submissions close, our team will begin the review process.''
We look forward to your participation and thank you for your continued interest in strengthening leadership within our communities.
Regards, IIITH-OKI
[[प्रयोगकर्ता:MediaWiki message delivery|MediaWiki message delivery]] ([[प्रयोगकर्ता वार्ता:MediaWiki message delivery|बात करीं]]) 08:35, 26 अगस्त 2025 (UTC)
<!-- Message sent by User:Nitesh (OKI)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=User:Nitesh_Gill/lists/Indic_VPs&oldid=29127818 -->
== <span lang="en" dir="ltr">Temporary accounts will be rolled out soon</span> ==
<div lang="en" dir="ltr">
<section begin="body"/>
Hello, we are the Wikimedia Foundation [[mw:Special:MyLanguage/Product Safety and Integrity|Product Safety and Integrity]] team. We would like to announce that '''we plan to enable [[mw:Special:MyLanguage/Trust and Safety Product/Temporary Accounts|temporary accounts]] for this wiki in the week of September 1'''.
Temporary accounts are successfully live on 30 wikis, including many large ones like German, Japanese, and French. The change they bring is especially relevant to logged-out editors, who this feature is designed to protect. But it is also relevant to community members like mentors, patrollers, and admins – anyone who reverts edits, blocks users, or otherwise interacts with logged-out editors as part of keeping the wikis safe and accurate.
'''Why we are building temporary accounts'''
Our wikis should be safer to edit by default for logged-out editors. Temporary accounts allow people to continue editing the wikis without creating an account, while avoiding publicly tying their edits to their IP address. We believe this is in the best interest of our logged-out editors, who make valuable contributions to the wikis and who may later create accounts and grow our community of editors, admins, and other roles. Even though the wikis do warn logged-out editors that their IP address will be associated with their edit, many people may not understand what an IP address is, or that it could be used to connect them to other information about them in ways they might not expect.
Additionally, our moderation software and tools rely too heavily on network origin (IP addresses) to identify users and patterns of activity, especially as IP addresses themselves are becoming less stable as identifiers. Temporary accounts allow for more precise interactions with logged-out editors, including more precise blocks, and can help limit how often we unintentionally end up blocking good-faith users who use the same IP addresses as bad-faith users.
'''How temporary accounts work'''
[[File:Temporary account banner and empty talk page.png|thumb]]
Any time a logged-out user publishes an edit on this wiki, a cookie will be set in this user's browser, and a temporary account tied with this cookie will be automatically created. This account's name will follow the pattern: <code dir=ltr>~2025-12345-67</code> (a tilde, current year, a number). On pages like Recent Changes or page history, this name will be displayed. The cookie will expire 90 days after its creation. As long as it exists, all edits made from this device will be attributed to this temporary account. It will be the same account even if the IP address changes, unless the user clears their cookies or uses a different device or web browser. A record of the IP address used at the time of each edit will be stored for 90 days after the edit. However, only some logged-in users will be able to see it.
'''What does this mean for different groups of users?'''
'''For logged-out editors'''
* This increases privacy: currently, if you do not use a registered account to edit, then everybody can see the IP address for the edits you made, even after 90 days. That will no longer be possible on this wiki.
* If you use a temporary account to edit from different locations in the last 90 days (for example at home and at a coffee shop), the edit history and the IP addresses for all those locations will now be recorded together, for the same temporary account. Users who [[foundation:Special:MyLanguage/Policy:Access_to_temporary_account_IP_addresses|meet the relevant requirements]] will be able to view this data. If this creates any personal security concerns for you, please contact talktohumanrights at wikimedia.org for advice.
'''For community members interacting with logged-out editors'''
* A temporary account is uniquely linked to a device. In comparison, an IP address can be shared with different devices and people (for example, different people at school or at work might have the same IP address).
* Compared to the current situation, it will be safer to assume that a temporary user's talk page belongs to only one person, and messages left there will be read by them. As you can see in the screenshot, temporary account users will receive notifications. It will also be possible to thank them for their edits, ping them in discussions, and invite them to get more involved in the community.
'''For users who use IP address data to moderate and maintain the wiki'''
* '''For patrollers''' who track persistent abusers, investigate violations of policies, etc.: Users who [[foundation:Special:MyLanguage/Policy:Access_to_temporary_account_IP_addresses|meet the requirements]] will be able to reveal temporary users' IP addresses and all contributions made by temporary accounts from a specific IP address or range ([[Special:IPContributions]]). They will also have access to useful information about the IP addresses thanks to the [[mw:Special:MyLanguage/Trust and Safety Product/IP Info|IP Info]] feature. Many other pieces of software have been built or adjusted to work with temporary accounts, including AbuseFilter, global blocks, Global User Contributions, and more. (For information for volunteer developers on how to update the code of your tools – see the last part of the message.)
* '''For admins blocking logged-out editors''':
** It will be possible to block many abusers by just blocking their temporary accounts. A blocked person won't be able to create new temporary accounts quickly if the admin selects the [[mw:Special:MyLanguage/Autoblock|autoblock]] option.
** It will still be possible to block an IP address or IP range.
* Temporary accounts will not be retroactively applied to contributions made before the deployment. On Special:Contributions, you will be able to see existing IP user contributions, but not new contributions made by temporary accounts on that IP address. Instead, you should use Special:IPContributions for this.
'''Our requests for you, and next steps'''
* If you know of any tools, bots, gadgets etc. using data about IP addresses or being available for logged-out users, you may want to test if they work on [[testwiki:Main_Page|testwiki]] or [[test2wiki:Main_Page|test2wiki]]. If you are a volunteer developer, [[mw:Special:MyLanguage/Trust and Safety Product/Temporary Accounts/For developers|read our documentation for developers]], and in particular, the section on [[mw:Special:MyLanguage/Trust and Safety Product/Temporary Accounts/For developers#How should I update my code?|how your code might need to be updated]].
* If you want to test the temporary account experience, for example just to check what it feels like, go to testwiki or test2wiki and edit without logging in.
* Tell us if you know of any difficulties that need to be addressed. We will try to help, and if we are not able, we will consider the available options.
* Look at our [[m:Meta:Babel#Temporary_Accounts:_access_to_IP_addresses_and_next_steps|previous message]] about requirements for users without extended rights who may need access to IP addresses.
To learn more about the project, check out [[mw:Special:MyLanguage/Trust and Safety Product/Temporary Accounts/FAQ|our FAQ]] – you will find many useful answers there. You may also [[mw:Special:MyLanguage/Trust and Safety Product/Temporary Accounts/Updates|look at the updates]] (we have just posted one) and [[mw:Newsletter:Product Safety and Integrity|subscribe to our new newsletter]]. If you'd like to talk to me (Szymon) off-wiki, you will find me on Discord and Telegram. Thank you!<section end="body" />
</div>
<bdi lang="en" dir="ltr">[[m:user:NKohli (WMF)|NKohli (WMF)]], [[m:user:SGrabarczuk (WMF)|SGrabarczuk (WMF)]]</bdi> 21:35, 26 अगस्त 2025 (UTC)
<!-- Message sent by User:Quiddity (WMF)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=User:Quiddity_(WMF)/sandbox6&oldid=29181713 -->
== Global discussion on Welcome messages ==
<div lang{{=}}"en" dir{{=}}"ltr">Sorry that this message is in English. {{int:please-translate}}. There is a request for comment at [[:m:Special:MyLanguage/Requests for comment/Welcoming policy]] on a proposal to forbid sending [[:m:welcome messages|welcome messages]] to users who have not made an edit, which is currently in practice at your wiki. Your comment on this matter would be appreciated.</div>
[[प्रयोगकर्ता:MediaWiki message delivery|MediaWiki message delivery]] ([[प्रयोगकर्ता वार्ता:MediaWiki message delivery|बात करीं]]) 02:38, 13 सितंबर 2025 (UTC)
<!-- Message sent by User:DreamRimmer@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=User:DreamRimmer/MMS_list&oldid=29262336 -->
== <span lang="en" dir="ltr">Server switch - Your wiki will be read-only for a short time soon</span> ==
<div lang="en" dir="ltr">
<section begin="server-switch"/><div class="plainlinks">
[[:m:Special:MyLanguage/Tech/Server switch|Read this message in another language]] • [https://meta.wikimedia.org/w/index.php?title=Special:Translate&group=page-Tech%2FServer+switch&language=&action=page&filter= {{int:please-translate}}]
The [[foundation:|Wikimedia Foundation]] will switch the traffic between its data centers. This will make sure that Wikipedia and the other Wikimedia wikis can stay online even after a disaster.
All traffic will switch on '''{{#time:j xg|2025-09-24|en}}'''. The switch will start at '''[https://zonestamp.toolforge.org/{{#time:U|2025-09-24T15:00|en}} {{#time:H:i e|2025-09-24T15:00}}]'''.
Unfortunately, because of some limitations in [[mw:Special:MyLanguage/Manual:What is MediaWiki?|MediaWiki]], all editing must stop while the switch is made. We apologize for this disruption, and we are working to minimize it in the future.
A banner will be displayed on all wikis 30 minutes before this operation happens. This banner will remain visible until the end of the operation.
You can contribute to the [https://meta.wikimedia.org/w/index.php?title=Special%3ATranslate&group=Centralnotice-tgroup-read_only_banner&task=view&language=&filter=&action=translate translation or proofreading] of this banner text.
'''You will be able to read, but not edit, all wikis for a short period of time.'''
*You will not be able to edit for up to an hour on {{#time:l j xg Y|2025-09-24|en}}.
*If you try to edit or save during these times, you will see an error message. We hope that no edits will be lost during these minutes, but we can't guarantee it. If you see the error message, then please wait until everything is back to normal. Then you should be able to save your edit. But, we recommend that you make a copy of your changes first, just in case.
''Other effects'':
*Background jobs will be slower and some may be dropped. Red links might not be updated as quickly as normal. If you create an article that is already linked somewhere else, the link will stay red longer than usual. Some long-running scripts will have to be stopped.
* We expect the code deployments to happen as any other week. However, some case-by-case code freezes could punctually happen if the operation require them afterwards.
* [[mw:Special:MyLanguage/GitLab|GitLab]] will be unavailable for about 90 minutes.
This project may be postponed if necessary. You can [[wikitech:Switch_Datacenter|read the schedule at wikitech.wikimedia.org]]. Any changes will be announced in the schedule.
'''Please share this information with your community.'''</div><section end="server-switch"/>
</div>
<span dir=ltr>[[m:User:Trizek (WMF)|Trizek (WMF)]] ([[m:User talk:Trizek (WMF)|{{int:talk}}]])</span> 15:42, 18 सितंबर 2025 (UTC)
<!-- Message sent by User:Trizek (WMF)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=Distribution_list/Non-Technical_Village_Pumps_distribution_list&oldid=29170715 -->
== <span lang="en" dir="ltr">Have your say: vote for the 2025 Board of Trustees</span> ==
<div lang="en" dir="ltr">
<section begin="announcement-content" />
Hello all,
The voting period for the [[m:Special:MyLanguage/Wikimedia Foundation elections/2025|2025 Board of Trustees election]] is now open. Candidates are running for two (2) seats on the Board.
To check your voter eligibility, please visit the [[m:Special:MyLanguage/Wikimedia Foundation elections/2025/Voter eligibility guidelines|voter eligibility page]].
Learn more about them by [[m:Special:MyLanguage/Wikimedia Foundation elections/2025/Candidates|reading their application statements and watch their candidacy videos]].
When you are ready, go to the [[m:Special:SecurePoll/vote/405|SecurePoll voting page to vote]].
'''The vote is open from October 8 at 00:00 UTC to October 22 at 23:59 UTC.'''
Best regards,
Abhishek Suryawanshi<br />Chair, Elections Committee<section end="announcement-content" />
</div>
[[प्रयोगकर्ता:MediaWiki message delivery|MediaWiki message delivery]] ([[प्रयोगकर्ता वार्ता:MediaWiki message delivery|बात करीं]]) 04:48, 9 अक्टूबर 2025 (UTC)
<!-- Message sent by User:RamzyM (WMF)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=Distribution_list/Global_message_delivery&oldid=29360896 -->
== <span lang="en" dir="ltr">Help us decide the name of the new Abstract Wikipedia project</span> ==
<div lang="en" dir="ltr">
<section begin="function1"/>
{{int:Hello}}. Please help pick a name for the new Abstract Wikipedia wiki project. This project will be a wiki that will enable users to combine functions from [[:f:|Wikifunctions]] and data from Wikidata in order to generate natural language sentences in any supported languages. These sentences can then be used by any Wikipedia (or elsewhere).
There will be two rounds of voting, each followed by legal review of candidates, with votes beginning on 20 October and 17 November 2025. Our goal is to have a final project name selected on mid-December 2025. If you would like to participate, then '''[[m:Special:MyLanguage/Abstract Wikipedia/Abstract Wikipedia naming contest|please learn more and vote now]]''' at meta-wiki.
{{Int:Feedback-thanks-title}}
<section end="function1"/>
</div>
-- [[User:Sannita (WMF)|User:Sannita (WMF)]] ([[User talk:Sannita (WMF)|talk]]) 11:42, 20 अक्टूबर 2025 (UTC)
<!-- Message sent by User:Sannita (WMF)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=Distribution_list/Global_message_delivery&oldid=29432175 -->
== <span lang="en" dir="ltr">Seeking volunteers to join several of the movement’s committees</span> ==
<div lang="en" dir="ltr">
<section begin="announcement-content" />
Each year, typically from October through December, several of the movement’s committees seek new volunteers.
Read more about the committees on their Meta-wiki pages:
* [[m:Special:MyLanguage/Affiliations Committee|Affiliations Committee (AffCom)]]
* [[m:Special:MyLanguage/Ombuds commission|Ombuds commission (OC)]]
* [[m:Special:MyLanguage/Wikimedia Foundation/Legal/Community Resilience and Sustainability/Trust and Safety/Case Review Committee|Case Review Committee (CRC)]]
Applications for the committees open on October 30, 2025. Applications for the Affiliations Committee, Ombuds commission and the Case Review Committee close on December 11, 2025. Learn how to apply by [[m:Special:MyLanguage/Wikimedia Foundation/Legal/Committee appointments|visiting the appointment page on Meta-wiki]]. Post to the talk page or email cst[[File:At sign.svg|16x16px|link=|(_AT_)]]wikimedia.org with any questions you may have.
For the Committee Support team,
<section end="announcement-content" />
</div>
-[[m:User:MKaur (WMF)| MKaur (WMF)]] 14:12, 30 अक्टूबर 2025 (UTC)
<!-- Message sent by User:MKaur (WMF)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=Distribution_list/Global_message_delivery&oldid=29517125 -->
== <span lang="en" dir="ltr">Reminder: Help us decide the name of the new Abstract Wikipedia project</span> ==
<div lang="en" dir="ltr">
<section begin="function2"/>
{{int:Hello}}. Reminder: Please help to choose name for the new Abstract Wikipedia wiki project. The finalist vote starts today. The finalists for the name are: <span lang="en" dir="ltr" class="mw-content-ltr">Abstract Wikipedia, Multilingual Wikipedia, Wikiabstracts, Wikigenerator, Proto-Wiki</span>. If you would like to participate, then '''[[m:Special:MyLanguage/Abstract Wikipedia/Abstract Wikipedia naming contest|please learn more and vote now]]''' at meta-wiki.
{{Int:Feedback-thanks-title}}
<section end="function2"/>
</div>
-- [[User:Sannita (WMF)|User:Sannita (WMF)]] ([[User talk:Sannita (WMF)|talk]]) 14:22, 20 नवंबर 2025 (UTC)
<!-- Message sent by User:Sannita (WMF)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=Distribution_list/Global_message_delivery&oldid=29583860 -->
== भोजपूरीके लोक साहित्य और विकिपीडिया कार्यशाला भागीदारी सूचना ==
'''[[m:Hindi Wikimedians User Group|हिंदी विकिमीडियन्स यूज़र ग्रुप]]''' एवं ''' भोजपूरी केंद्र, बनारस हिंदू विश्वविद्यालय''' द्वारा विकिमीडिया फाउंडेशन के सौजन्य से 1 दिसंबर, २०२५ को '''[[विकिपीडिया:भोजपूरीके लोक साहित्य और विकिपीडिया|भोजपूरीके लोक साहित्य और विकिपीडिया]]''' विषय पर बनारस हिंदू विश्वविद्यालय के भोजपुरी केंद्र में एगो प्रशिक्षण कार्यशाला के आयोजन करल जात बानी। इ स्थानीय स्तर के एक दिन के प्रशिक्षण कार्यशाला में 50 विद्यार्थियों एवं शोधार्थियों के शामिल होवे के संभावना बाटे।
ई कार्यशाला में बनारस के भोजपूरी औ्र हिंदी विकिपीडिया संपादक के स्वागत बा। भाग लेवे के इच्छुक सदस्य [[विकिपीडिया:भोजपूरीके लोक साहित्य और विकिपीडिया]] के भागीदार अनुभाग में अपन हस्ताक्षर करी आ आयोजक से संपर्क करीं।। -[[प्रयोगकर्ता:अनिरुद्ध कुमार|अनिरुद्ध कुमार]] ([[प्रयोगकर्ता वार्ता:अनिरुद्ध कुमार|बात करीं]]) 06:41, 28 नवंबर 2025 (UTC)
== Thank You for Last Year – Join Wiki Loves Ramadan 2026 ==
Dear Wikimedia communities,
We hope you are doing well, and we wish you a happy New Year.
''Last year, we captured light. This year, we’ll capture legacy.''
In 2025, communities around the world shared the glow of Ramadan nights and the warmth of collective iftars. In 2026, ''Wiki Loves Ramadan'' is expanding, bringing more stories, more cultures, and deeper global connections across Wikimedia projects.
We invite you to explore the ''Wiki Loves Ramadan 2026'' [[m:Special:MyLanguage/Wiki Loves Ramadan 2026|Meta page]] to learn how you can participate and [[m:Special:MyLanguage/Wiki Loves Ramadan 2026/Participating communities|sign up]] your community.
📷 ''Photo campaign on '' [[c:Special:MyLanguage/Commons:Wiki Loves Ramadan 2026|Wikimedia Commons]]
If you have questions about the project, please refer to the FAQs:
* [[m:Special:MyLanguage/Wiki Loves Ramadan/FAQ/|Meta-Wiki]]
* [[c:Special:MyLanguage/Commons:Wiki Loves Ramadan/FAQ|Wikimedia Commons]]
''Early registration for updates is now open via the '''[[m:Special:RegisterForEvent/2710|Event page]]'''''
''Stay connected and receive updates:''
* [https://t.me/WikiLovesRamadan Telegram channel]
* [https://lists.wikimedia.org/postorius/lists/wikilovesramadan.lists.wikimedia.org/ Mailing list]
We look forward to collaborating with you and your community.
'''The Wiki Loves Ramadan 2026 Organizing Team''' 19:45, 16 जनवरी 2026 (UTC)
<!-- Message sent by User:ZI Jony@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=Distribution_list/Non-Technical_Village_Pumps_distribution_list&oldid=29879549 -->
== Feminism and Folklore 2026 starts soon ==
<div style="border:8px maroon ridge;padding:6px;">
[[File:Feminism and Folklore 2026 logo.svg|centre|550px|frameless]]
::<div lang="en" dir="ltr" class="mw-content-ltr">
<div style="text-align: center; width: 100%;">''{{int:please-translate}}''</div>
;Invitation to Organize Feminism and Folklore 2026
Dear Wiki Community,
We are pleased to invite Wikimedia communities, affiliates, and independent contributors to organize the '''[[:m:Feminism and Folklore 2026|Feminism and Folklore 2026]]''' writing competition on your local Wikipedia.
The international campaign will run from '''1 February to 31 March 2026''' and aims to improve coverage of feminism, women’s histories, gender-related topics, and folk culture across Wikipedia projects.
;About the Campaign
'''Feminism and Folklore''' is a global writing initiative that complements the '''[[:c:Commons:Wiki Loves Folklore 2026|Wiki Loves Folklore]]''' photography competition. While Wiki Loves Folklore focuses on visual documentation, this writing campaign addresses the '''gender gap on Wikipedia''' by improving encyclopedic content related to folk culture and marginalized voices.
;What Can Participants Write About?
Communities can contribute by creating, expanding, or translating articles related to:
* Folk festivals, rituals, and celebrations
* Folk dances, music, and traditional performances
* Women and queer figures in folklore
* Women in mythology and oral traditions
* Women warriors, witches, and witch-hunting narratives
* Fairy tales, folk stories, and legends
* Folk games, sports, and cultural practices
Participants may work from curated article lists or generate new article suggestions using campaign tools.
;How to Sign Up as an Organizer
Organizers are requested to complete the following steps to register their community:
# Create a local project page on your wiki [[:m:Feminism and Folklore/Sample|(see sample)]]
# Set up the campaign using the '''CampWiz''' tool
# Prepare a local article list and clearly mention:
#* Campaign timeline
#* Local and international prizes
# Request a site notice from local administrators [[:mr:Template:SN-FNF|(see sample)]]
# Add your local project page and CampWiz link to the '''[[:m:Feminism and Folklore 2026/Project Page|Meta project page]]'''
;Campaign Tools
The Wiki Loves Folklore Tech Team has introduced tools to support organizers and participants:
* '''Article List Generator by Topic''' – Helps identify articles available on English Wikipedia but missing in your local language Wikipedia. The tool allows customized filters and provides downloadable article lists in CSV and wikitable formats.
* '''CampWiz''' – Enables communities to manage writing campaigns effectively, including jury-based evaluation. This will be the third year CampWiz is officially used for Feminism and Folklore.
Both tools are now available for use in the campaign. '''[https://tools.wikilovesfolklore.org/ Click here to access the tools]'''
;Learn More & Get Support
For detailed information about rules, timelines, and prizes, please visit the
'''[[:m:Feminism and Folklore 2026|Feminism and Folklore 2026 project page]]'''.
If you have any questions or need assistance, feel free to reach out via:
* '''[[:m:Talk:Feminism and Folklore 2026/Project Page|Meta talk page]]'''
* Email us using details on the contact page.
;Join Us
We look forward to your collaboration and coordination in making Feminism and Folklore 2026 a meaningful and impactful campaign for closing gender gaps and enriching folk culture content on Wikipedia.
Thank you and best wishes,
'''[[:m:Feminism and Folklore 2026|Feminism and Folklore 2026 International Team]]'''
----
''Stay connected:''
[[File:B&W Facebook icon.png|link=https://www.facebook.com/feminismandfolklore/|30x30px]]
[[File:B&W Twitter icon.png|link=https://twitter.com/wikifolklore|30x30px]]
</div></div>
== Invitation to Host Wiki Loves Folklore 2026 in Your Country ==
<div lang="en" dir="ltr" class="mw-content-ltr">
<div style="text-align: center; width: 100%;">''{{int:please-translate}}''</div>
[[File:Wiki Loves Folklore Logo.svg|right|150px|frameless]]
Hello everyone,
We are delighted to invite Wikimedia affiliates, user groups, and community organizations worldwide to participate in '''Wiki Loves Folklore 2026''', an international initiative dedicated to documenting and celebrating folk culture across the globe.
;About Wiki Loves Folklore
'''Wiki Loves Folklore''' is an annual international photography competition hosted on Wikimedia Commons. The campaign runs from '''1 February to 31 March 2026''' and encourages photographers, cultural enthusiasts, and community members to contribute photographs that highlight:
* Folk traditions and rituals
* Cultural festivals and celebrations
* Traditional attire and crafts
* Performing arts, music, and dance
* Everyday practices rooted in folk heritage
Through this campaign, we aim to preserve and promote diverse folk cultures and make them freely accessible to the world.
[[:c:Commons:Wiki_Loves_Folklore_2026|Project page on Wikimedia Commons]]
; Host a Local Edition
As we celebrate the '''eight edition''' of Wiki Loves Folklore, we warmly invite communities to organize a local edition in their country or region. Hosting a local campaign is a great opportunity to:
* Increase visibility of your region’s folk culture
* Engage new contributors in your community
* Enrich Wikimedia Commons with high-quality cultural content
'''[[:c:Commons:Wiki_Loves_Folklore_2026/Organize|Sign up to organize]]:'''
If your team prefers to organize the competition in ''either February or March only'', please feel free to let us know.
If you are unable to organize, we encourage you to share this opportunity with other interested groups or organizations in your region.
;Get in Touch
If you have any questions, need support, or would like to explore collaboration opportunities, please feel free to contact us via:
* The project Talk pages
* Email: '''support@wikilovesfolklore.org'''
We are also happy to connect via an online meeting if your team would like to discuss planning or coordination in more detail.
Warm regards,
'''The Wiki Loves Folklore International Team'''
</div>
[[प्रयोगकर्ता:MediaWiki message delivery|MediaWiki message delivery]] ([[प्रयोगकर्ता वार्ता:MediaWiki message delivery|बात करीं]]) 13:20, 18 जनवरी 2026 (UTC)
<!-- Message sent by User:Tiven2240@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=Distribution_list/Global_message_delivery/Wikipedia&oldid=29228188 -->
== <span lang="en" dir="ltr">Annual review of the Universal Code of Conduct and Enforcement Guidelines</span> ==
<div lang="en" dir="ltr">
<section begin="announcement-content" />
I am writing to you to let you know the annual review period for the Universal Code of Conduct and Enforcement Guidelines is open now. You can make suggestions for changes through 9 February 2026. This is the first step of several to be taken for the annual review. [[m:Special:MyLanguage/Universal Code of Conduct/Annual review/2026|Read more information and find a conversation to join on the UCoC page on Meta]].
The [[m:Special:MyLanguage/Universal Code of Conduct/Coordinating Committee|Universal Code of Conduct Coordinating Committee]] (U4C) is a global group dedicated to providing an equitable and consistent implementation of the UCoC. This annual review was planned and implemented by the U4C. For more information and the responsibilities of the U4C, [[m:Special:MyLanguage/Universal Code of Conduct/Coordinating Committee/Charter|you may review the U4C Charter]].
Please share this information with other members in your community wherever else might be appropriate.
-- In cooperation with the U4C, [[m:User:Keegan (WMF)|Keegan (WMF)]] ([[m:User talk:Keegan (WMF)|talk]])<section end="announcement-content" />
</div>
21:01, 19 जनवरी 2026 (UTC)
<!-- Message sent by User:Keegan (WMF)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=Distribution_list/Global_message_delivery&oldid=29905753 -->
== <span lang="en" dir="ltr">Migration to Parsoid</span> ==
<div lang="en" dir="ltr">
<section begin="announcement-content" />
<em>[[m:Special:MyLanguage/Wikimedia Foundation/Product and Technology/Parsoid Read Views/Read View Announcement|Read this in another language]]</em>
Hello everyone! I am glad to inform you that as the next step in the [[mw:Special:MyLanguage/Parsoid/Parser Unification|Parser Unification]] project, Parsoid will soon be turned on as the default article renderer on your wiki. We are gradually increasing the number of wikis using Parsoid, with the intention of making it the default wikitext parser for MediaWiki's next long-term support release. This will make our wikis more reliable and consistent for editors, readers, and tools to use, as well as making the development of future wikitext features easier.
If this disrupts your workflow, don’t worry! You can still opt out through a user preference or turn Parsoid off on the current page using the Tools submenu, as described in the [[mw:Special:MyLanguage/Help:Extension:ParserMigration|Extension:ParserMigration]] documentation.
There is [[mw:Special:MyLanguage/Parsoid/Parser Unification/Confidence Framework|more information about our roll-out strategy]] available, including the testing done before we turn on Parsoid for a new wiki.
To report bugs and issues, please look at our [[mw:Special:MyLanguage/Parsoid/Parser Unification/Known Issues|known issues]] documentation and if you found a new bug please create a phab ticket and tag the [[phab:project/view/5846|Content Transform Team in Phabricator]].
<section end="announcement-content" />
</div>
<bdi lang="en" dir="ltr">[[mw:User:ABreault (WMF)|Content Transform Team]]</bdi> 21:59, 23 जनवरी 2026 (UTC)
<!-- Message sent by User:ABreault (WMF)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=Wikimedia_Foundation/Product_and_Technology/Parsoid_Read_Views/2026-01-26_Wikipedias&oldid=29972868 -->
== Join the sixth Ukraine’s Cultural Diplomacy Month on Wikipedia! ==
<div lang="en" dir="ltr">
[[File:Ukraine’s Cultural Diplomacy Month on Wikipedia 2026.png|right|250px|thumb|link=https://meta.wikimedia.org/wiki/Ukraine%27s_Cultural_Diplomacy_Month_2026|Join our campaign!]]
{{int:please-translate}}
Dear Wikipedians!
[[:m:Special:MyLanguage/Wikimedia Ukraine|Wikimedia Ukraine]], in cooperation with the [[:en:Ministry of Foreign Affairs of Ukraine|MFA of Ukraine]] and [[:en:Ukrainian Institute|Ukrainian Institute]], has launched the sixth edition of writing challenge "'''[[:m:Special:MyLanguage/Ukraine's Cultural Diplomacy Month 2026|Ukraine's Cultural Diplomacy Month]]'''", which lasts from '''1st April''' until '''30th April 2026'''.
The initiative aims to promote knowledge about Ukrainian culture abroad by creating and improving Wikipedia articles in multiple languages. This year marks the sixth edition of the campaign, which will focus on contemporary culture, making today’s artistic voices and practices more visible to international audiences.
🧩'''How to participate?'''
Choose an article from the suggested list → Write an article in your language, or improve an existing one according to the rules → Add your contribution to the contest page and calculate your points → Win prizes and receive a certificate of participation → Become a promoter of truthful knowledge about Ukraine.
🧩'''[[m:Special:MyLanguage/Ukraine's Cultural Diplomacy Month 2026|Check our main page for more information]]'''.
'''If you are interested in coordinating long-term community engagement for the campaign and becoming a local ambassador, we would love to hear from you! Please let us know your interest.'''
If not, then we encourage you to translate the [[m:Special:MyLanguage/Ukraine's Cultural Diplomacy Month 2026|landing page of the contest]] and [https://meta.wikimedia.org/wiki/Special:MessageGroupStats?group=Centralnotice-tgroup-UCDM2026banner&messages=&language=en&x=D banner] into your own language.
Also, we set up a [[:m:CentralNotice/Request/Ukraine's Cultural Diplomacy Month 2026|banner]] to notify users of the possibility to participate in this challenge!
[[:m:User:OlesiaLukaniuk (WMUA)|OlesiaLukaniuk (WMUA)]] ([[:m:User talk:OlesiaLukaniuk (WMUA)|talk]]) 04:35, 1 April 2026 (UTC)
</div>
<!-- Message sent by User:OlesiaLukaniuk (WMUA)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=User:OlesiaLukaniuk_(WMUA)/list_of_wikis&oldid=28552112 -->
== Action Required: Update templates/modules for electoral maps (Migrating from P1846 to P14226) ==
Hello everyone,
This is a notice regarding an ongoing data migration on Wikidata that may affect your election-related templates and Lua modules (such as <code>Module:Itemgroup/list</code>).
'''The Change:'''<br />
Currently, many templates pull electoral maps from Wikidata using the property [[:d:Property:P1846|P1846]], combined with the qualifier [[:d:Property:P180|P180]]: [[:d:Q19571328|Q19571328]].
We are migrating this data (across roughly 4,000 items) to a newly created, dedicated property: '''[[:d:Property:P14226|P14226]]'''.
'''What You Need To Do:'''<br />
To ensure your templates and infoboxes do not break or lose their maps, please update your local code to fetch data from [[:d:Property:P14226|P14226]] instead of the old [[:d:Property:P1846|P1846]] + [[:d:Property:P180|P180]] structure. A [[m:Wikidata/Property Migration: P1846 to P14226/List|list of pages]] was generated using Wikimedia Global Search.
'''Deadline:'''<br />
We are temporarily retaining the old data on [[:d:Property:P1846|P1846]] to allow for a smooth transition. However, to complete the data cleanup on Wikidata, the old [[:d:Property:P1846|P1846]] statements will be removed after '''May 1, 2026'''. Please update your modules and templates before this date to prevent any disruption to your wiki's election articles.
Let us know if you have any questions or need assistance with the query logic. Thank you for your help! [[User:ZI Jony|ZI Jony]] using [[प्रयोगकर्ता:MediaWiki message delivery|MediaWiki message delivery]] ([[प्रयोगकर्ता वार्ता:MediaWiki message delivery|बात करीं]]) 17:11, 3 अप्रैल 2026 (UTC)
<!-- Message sent by User:ZI Jony@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=Distribution_list/Non-Technical_Village_Pumps_distribution_list&oldid=29941252 -->
== Invitation to join South Asian Community and the Annual Planning Discussions with WMF ==
"Kindly feel free to translate this text into your own language."
Dear Community member,
We would like to invite you all to the April edition of the South Asia Open Community Call that will focus on a discussion with the leadership of the Wikimedia Foundation on their [[:m:Wikimedia Foundation Annual Plan/2026-2027|Annual Plan (2026-2027)]].
The [[:m:Wikimedia Foundation Annual Plan|Foundation’s Annual Plan]] is a high-level roadmap for what the organisation aims to achieve in the coming year. It includes not only the foundation’s Goals, Progress, and plan but also a summary of Global Trends that impact the present and future of our movement.
This is the right time for the South Asia community to participate and share their thoughts on the Wikimedia Foundation’s annual plan, helping shape it together. Share your hopes, concerns, bold ideas, and specific requests to contribute to the Foundation’s planning.
Hence, the next [[:m:South Asia Open Community Call|South Asia Open Community Call]] will be hosted on the following dates/times. Please mark the same in your calendar and sign up [[:m:Event:South Asia Open Community Call, April 2026|here]].
* Platform: Google Meet
* Date: 17th April, 2026
* Time: 1930-2045 IST (1400-1515 UTC)
* Registration Link: [[:m:Event:South Asia Open Community Call, April 2026|here]]
Note: Only those who have registered will receive the joining link.
Look forward to seeing you on the call,
Best, [[प्रयोगकर्ता:MediaWiki message delivery|MediaWiki message delivery]] ([[प्रयोगकर्ता वार्ता:MediaWiki message delivery|बात करीं]]) 18:41, 5 अप्रैल 2026 (UTC)
<!-- Message sent by User:Nitesh Gill@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=User:Nitesh_Gill/lists/Indic_VPs&oldid=29127818 -->
== Request for comment (global AI policy) ==
<bdi lang="en" dir="ltr" class="mw-content-ltr">
Apologies for writing in English. {{int:Please-translate}}
A [[:m:Requests for comment/Artificial intelligence policy|request for comment]] is currently being held to decide on a global AI policy. {{int:Feedback-thanks-title}}
[[प्रयोगकर्ता:MediaWiki message delivery|MediaWiki message delivery]] ([[प्रयोगकर्ता वार्ता:MediaWiki message delivery|बात करीं]]) 00:57, 26 अप्रैल 2026 (UTC)
</bdi>
<!-- Message sent by User:Codename Noreste@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=Distribution_list/Global_message_delivery&oldid=30424282 -->
== Call for Applications: TTT 2026 (Deadline Extended to 20 May) ==
''<small>Apologies for writing in English. Please feel free to translate this into your language.</small>''
Hello everyone,
We hope you are doing well.
We would like to share that applications for the [[:m:IIITH-OKI/Train the Trainer Program/2026|Train the Trainer (TTT) 2026]] program are currently open. TTT is a capacity-building initiative aimed at supporting Wikimedians in developing training, facilitation, and leadership skills.
We are happy to inform you that the scholarship application deadline has been [[:m:IIITH-OKI/Train the Trainer Program/2026/Scholarship|extended until 20 May 2026]]. We are still receiving applications and encourage interested community members, especially emerging leaders, to [https://docs.google.com/forms/d/17eq6lJNCTVBoKRqz5IdSCiYWv-eHBrYRnx1wXfncwLI/viewform?edit_requested=true&pli=1 apply].
We also request your support in sharing this opportunity within your communities and networks, so that it can reach a wider and more diverse group of participants.
Thank you for your continued support. '''OKI (IIIT-H)''' [[प्रयोगकर्ता:MediaWiki message delivery|MediaWiki message delivery]] ([[प्रयोगकर्ता वार्ता:MediaWiki message delivery|बात करीं]]) 13:02, 17 मई 2026 (UTC)
<!-- Message sent by User:Nitesh (OKI)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=User:Nitesh_Gill/lists/Indic_VPs&oldid=30361720 -->
== <span lang="en" dir="ltr">Vote now in the 2026 U4C election</span> ==
<div lang="en" dir="ltr">
<section begin="announcement-content" />
Eligible voters are asked to participate in the 2026 [[m:Special:MyLanguage/Universal_Code_of_Conduct/Coordinating_Committee|Universal Code of Conduct Coordinating Committee]] election. More information–including an eligibility check, voting process information, candidate information, and a link to the vote–are available on Meta at the [[m:Special:MyLanguage/Universal_Code_of_Conduct/Coordinating_Committee/Election/2026|2026 Election information page]]. The vote closes on 2 June 2026 at [https://zonestamp.toolforge.org/1780358400 00:00 UTC].
Please vote if your account is eligible. Results will be available by 14 June 2026. -- In cooperation with the U4C,<section end="announcement-content" />
</div>
[[m:User:Keegan (WMF)|Keegan (WMF)]] ([[m:User talk:Keegan (WMF)|talk]]) 17:14, 27 मई 2026 (UTC)
<!-- Message sent by User:Keegan (WMF)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=Distribution_list/Global_message_delivery&oldid=30513860 -->
== RFC about AI-generated content in Wikimedia Commons ==
<bdi lang="en" dir="ltr">Apologies for writing in English, please help translate this message to your language. You are invited to participate in a [[c:Commons:Requests for comment/Policy update for AI content|request for comment on Wikimedia Commons about a policy update for AI content]]. This may affect files that are uploaded to Wikimedia Commons for use on this project. Thank you. [[m:User:Codename Noreste|Codename Noreste]] ([[m:User talk:Codename Noreste|बातचीत]])</bdi> 17:11, 23 जून 2026 (UTC)
<!-- Message sent by User:Codename Noreste@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=Distribution_list/Global_message_delivery&oldid=30513860 -->
== <span lang="en" dir="ltr">Deployment of Legal and Safety Contacts Link in the Footer of Your Wiki</span> ==
<div lang="en" dir="ltr">
<section begin="Message"/>
'''Legal & Safety Contacts'''
Hello community, the Wikimedia Foundation has provided a [[wmf:Special:MyLanguage/Legal:Wikimedia Foundation Legal and Safety Contact Information|single legal and safety contact page]], to be linked in the footer of your wiki, to ensure access to accurate legal information. This is a regulatory requirement. We have already rolled out links to English, German, Italian, Spanish and other wikis and we will deploy to your wiki soon. [[m:Special:MyLanguage/Wikimedia_Foundation_Legal_and_Safety_Contacts_FAQ|Please read more on the project page]] and leave any comments in this thread or on the [[m:Special:MyLanguage/Talk:Wikimedia Foundation Legal and Safety Contacts FAQ|talk page]].
<section end="Message"/>
</div>
-- [[User:Sannita (WMF)|User:Sannita (WMF)]] ([[User talk:Sannita (WMF)|talk]]) 13:29, 25 जून 2026 (UTC)
<!-- Message sent by User:Sannita (WMF)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=User:Sannita_(WMF)/Mass_sending_test&oldid=30731267 -->
== WikiConference India 2026: Call for Submissions and Self-funded applications ==
Dear Community Members,
We are pleased to announce that self-funded registration and the Call for Submissions for [1] [[m:WikiConference_India_2026|'''WikiConference India 2026''']] are now open.
WikiConference India 2026 will take place in Kochi, Kerala, from 4th to 6th September 2026. The conference will bring together Wikimedians, community leaders, developers, researchers, and open knowledge enthusiasts from across India and South Asia to connect, collaborate, and share experiences.
The theme for WCI 2026 is '''“Reimagining the Knowledge Commons: Community Leadership in an Evolving Wikimedia Ecosystem.”''' As the Wikimedia movement navigates rapid technological changes, including the rise of AI and new models of knowledge creation, the conference aims to create space for conversations around community leadership, knowledge equity, regional languages, open knowledge, and the future of Wikimedia in India and South Asia.
=== Self-Funded Registration ===
The self-funded registration application is now live on Pretix.
* Details and Eligibility [2] : [[m:WikiConference_India_2026/Registration|'''[Registration Meta Page Link]''']]
* Registration Form [3] : '''https://pretix.eu/wikimedia-events/WCI2026/'''
* Last date for registration : '''July 15th, 2026'''
=== Call for Submissions ===
The Call for Submissions is now live on Eventyay.
We invite proposals for workshops, discussions, panels, interactive sessions, lightning talks, and poster presentations. Whether you are an experienced contributor or a newer community member, your ideas, experiences, and learnings can help shape the conference program and contribute to important conversations across the movement.
* Details and Guidelines [4] : '''[<nowiki/>[[m:WikiConference_India_2026/Programme/Submissions|Link to Meta-Wiki Submission Page]]]'''
* Submission Deadline: '''[July 15th, 2026]'''
For complete information about WikiConference India 2026, including participation details, timelines, conference updates, and submission guidelines, please refer to the official announcement:
* Detailed Announcement [5]: [[diffblog:2026/06/26/shape-the-future-call-for-submissions-open-for-wikiconference-india-2026/|'''[Blog Post Link]''']]
We encourage community members to register, submit proposals, and share this announcement within their networks.
Regards,
WikiConference India 2026 Organizing Team
[1] https://meta.wikimedia.org/wiki/WikiConference_India_2026
[2] https://meta.wikimedia.org/wiki/WikiConference_India_2026/Registration
[3] https://pretix.eu/wikimedia-events/WCI2026/
[4] https://meta.wikimedia.org/wiki/WikiConference_India_2026/Programme/Submissions
[5] https://diff.wikimedia.org/2026/06/26/shape-the-future-call-for-submissions-open-for-wikiconference-india-2026/ [[प्रयोगकर्ता:Amrit Sufi|Amrit Sufi]] ([[प्रयोगकर्ता वार्ता:Amrit Sufi|बात करीं]]) 09:54, 30 जून 2026 (UTC)
== Request for comment (the future of Abstract Wikipedia) ==
<bdi lang="en" dir="ltr" class="mw-content-ltr">
Apologies if this has not yet been translated into your wiki's language. {{int:Please-translate}}
You are invited to voice your opinions in a [[:m:Requests for comment/The future of Abstract Wikipedia|request for comment about the future of Abstract Wikipedia]]. {{Int:Feedback-thanks-title}}
[[:m:User:Kowal2701|Kowal2701]] ([[:m:User talk:Kowal2701|talk]]) 12:24, 24 जुलाई 2026 (UTC)
</bdi>
<!-- Message sent by User:DreamRimmer@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=Distribution_list/Global_message_delivery&oldid=30513860 -->
j1uspd5poeubwrb46pzqe4iiusywutj
रबींद्रनाथ ठाकुर
0
8658
801717
801617
2026-07-24T17:35:54Z
SM7
3953
बिस्तार कइल गइल / अंग्रेजी से अनुबाद क के
801717
wikitext
text/x-wiki
{{Infobox writer
| name = रबींद्रनाथ ठाकुर
| native_name = রবীন্দ্রনাথ ঠাকুর
| image = Tagore3.jpg
| image_size = 225
| alt = Late-middle-aged bearded man in white robes looks to the left with serene composure.
| caption = रबींद्रनाथ ठाकुर (c.1915)
| birth_name = Rabindranath Thakur
| birth_date = {{Birth date|df=yes|1861|05|07}}
| birth_place = [[कलकत्ता]], [[बंगाल प्रेसीडेंसी]], [[ब्रिटिश भारत]]
| death_date = {{Death date and age|df=yes|1941|08|07|1861|05|07}}
| death_place = कलकत्ता
| occupation = कवि, लेखक, चित्रकार, संगीतकार
| language = [[बंगाली भाषा|बंगाली]], अंग्रेजी
| education =
| alma_mater =
| period =
| genre =
| subject =
| notableworks = ''[[गीतांजलि]]'', ''[[गोरा (उपन्यास)|गोरा]]'', ''[[घरे-बाहिरे]]'', ''[[जन गण मन]]'', ''[[रबींद्र संगीत]]'', ''[[आमार सोनार बांग्ला]]''
| influences =
| spouse = {{marriage|मृणालिनी देवी|1883|1902}}
| children = पाँच गो संतान, दू के बचपन में मउत हो गइल
| relatives =
| awards = {{awd|[[साहित्य के नोबल पुरस्कार]]|1913}}<!-- do not add image icons such as nobel peace, see [[:Template:Infobox writer]] -->
| signature = Rabindranath Tagore Signature.svg
| signature_alt = Close-up on a Bengali word handwritten with angular, jaunty letters.
}}
'''रबींद्रनाथ ठाकुर''' ({{Langx|bn|রবীন্দ্রনাথ ঠাকুর}}, ''रोबिंद्रोनाथ ठाकुर''; {{Langx|en|Rabindranath Tagore}}, ''रबींद्रनाथ टैगोर'') (7 मई 1861 — 7 अगस्त 1941) के '''रबींद्रनाथ टैगोर''' आ '''गुरुदेव''' के नाम से भी जानल जाला। रबींद्रनाथ दुनिया क जानल मानल कवि, साहित्यकार, दार्शनिक आ भारतीय साहित्य क एकमात्र [[नोबल पुरस्कार]] बिजेता हउवन। ई [[एशिया]] के पहिला [[नोबेल पुरस्कार]] सम्मानित व्यक्ति रहलें। ई एकलौता कवि बाटें जिनकर दू गो रचना दू गो देशन क राष्ट्रगान बा — [[भारत]] क राष्ट्रगान ''[[जन गण मन]]'' आ [[बाँग्लादेश]] क राष्ट्रीय गान ''[[आमार सोनार बाँग्ला]]'' ठाकुरे क रचना बाड़ीं।
रबींद्रनाथ ठाकुर 19वीं सदी के आखिरी दौर आ 20वीं सदी के सुरुआती दौर में प्रासंगिक आधुनिकतावाद (कॉन्टेक्स्चुअल मॉडर्निज्म) के माध्यम से [[बंगाली साहित्य]], संगीत आ [[भारतीय कला]] के नया रूप दिहलें। ऊ [[गीतांजलि]] में शामिल बेहद "संवेदनशील, ताजगी से भरल आ सुंदर कविता" सभ के रचयिता रहलें। टैगोर के काव्यगीत सभ के आध्यात्मिक आ बदलत एहसास वाला मानल जाला, जबकि उनकर सुघर गद्य आ जादुई कविता पूरा भारतीय उपमहाद्वीप में बहुते लोकप्रिय भइल। ऊ [[रॉयल एशियाटिक सोसाइटी]] के फेलो भी रहलें। "बंगाल के बार्ड" कहल जाए वाला टैगोर गुरुदेव, कबिगुरु आ विश्वकवि जइसन उपनामन से जानल जालें।
[[कलकत्ता]] के एगो बंगाली ब्राह्मण परिवार में जनमल टैगोर के पुश्तैनी जड़ जेसोर आ बर्द्धमान जिला के जमींदार परिवार से जुड़ल रहे। ऊ आठे बरिस के उमिरि से कविता लिखे लगलें। सोलह बरिस के उमिर में ऊ ''भानुसिंह'' (मतलब "सिंह रुपी सुरुज") नाम से आपन पहिली महत्वपूर्ण कविता सभ के संकलन छपवलें, जवना के साहित्य के जानकार लोग शुरू में कवनो बहुत पुरान आ खो गइल क्लासिक रचना बूझ लिहल। 1877 तक ऊ अपना असली नाम से आपन पहिली लघुकथा आ नाटको प्रकाशित करा चुकल रहलें। मानवतावादी, सार्वभौमिक विचार वाला, अंतरराष्ट्रीय नजरिया रखे वाला आ राष्ट्रवाद के प्रबल समालोचक होखे के नाते, ऊ [[ब्रिटिश राज]] के बिरोध कइलें आ ब्रिटेन से आजादी के समर्थन कइलें। [[बंगाल पुनर्जागरण]] के एगो प्रमुख हस्ती के रूप में ऊ चित्रकला, रेखाचित्र, स्केच, सैकड़न लेखन आ करीब दू हजार गीतन के एगो बड़हन साहित्यिक-सांस्कृतिक धरोहर छोड़ गइलें। उनकर विरासत आजो [[विश्व-भारती यूनिवर्सिटी]] के अस्थापना के रूप में जिंदा बा।
टैगोर परंपरागत आ कठोर साहित्यिक नियमन के छाड़ि आ भाषा पर लगावल गइल बंधनन के बिरोध कइ के बंगाली साहित्य आ कला के एगो आधुनिक (मॉडर्न) रूप दिहलें। उनकर उपन्यास, कहानी, गीत, नृत्य-नाटक आ निबंध राजनीतिक आ निजी, दुनो किसिम के बिसयन पर आधारित रहलें। ''[[गीतांजलि]]'' (गीत के अर्पण), ''[[गोरा (उपन्यास)|गोरा]]'' आ ''[[घरे-बाइरे]]'' (घर आ दुनिया) उनकर सबसे प्रसिद्ध रचना सभ में गिनल जालीं। उनकर कविता, लघुकथा (कहानी) आ उपन्यास के एक ओर उनकर गीतात्मक शैली, बोलचाल के भाषा, स्वाभाविकता आ दार्शनिक आत्मचिंतन खातिर बहुत सराहल गइल, त दुसरा ओर एह खासियतन के लेके आलोचनो भइल। उनकर रचल गीत सभ में से दू गो देश अपना राष्ट्रीय गान के रूप में अपनवले बा—भारत के "जन गण मन" आ बांग्लादेश के "आमार सोनार बांग्ला"। इहे ना, [[श्री लंका|श्रीलंको]] के राष्ट्रगान उनुकरे रचना से प्रेरित हवे। उनकर गीत "[[बांग्लार माटी बांग्लार जोल]]" (बंगाल के माटी आ बंगाल के पानी) के भारतीय राज्य [[पच्छिम बंगाल]] के राजकीय गान के रूप में अपनावल गइल बाटे।
== जिनगी ==
=== सुरुआती जिनगी: 1861–1878 ===
13 गो जीवित संतानन में सबसे छोट रवींद्रनाथ टैगोर (घर में जिनका के "रबी" कहल जाय) के जनम 7 मई 1861 के [[कलकत्ता]] के जोड़ासाँको ठाकुरबाड़ी में भइल रहे। ऊ [[देबेंद्रनाथ ठाकुर]] (1817–1905) आ शारदा देवी (1830–1875) के बेटा रहलें।
ठाकुर के लालन-पालन मुख्य रूप से घर के नौकरे-चाकर लोग कइल। जब ऊ छोटे रहलें, तबे उनकर माई के निधन हो गइल रहे, जबकि उनकर बाबूजी अक्सर यात्रे पर रहत रहलें। टैगोर परिवार [[बंगाल पुनर्जागरण]] के अगिला पाँत में रहे। खुद एह परिवारे से एगो साहित्यिक पत्रिका प्रकाशित होखे, आ एहिजा बंगाली आ पच्छिमी शास्त्रीय संगीत के नाटक, संगीत गोष्ठी आ प्रस्तुति नियमित रूप से आयोजित होखल करे। टैगोर के बाबूजी कई गो पेशेवर ध्रुपद गायकन के घरहीं बोला के रखले रहलें, जवना से कि ऊ परिवार के लइकन के [[भारतीय शास्त्रीय संगीत]] सिखा सकस।
टैगोर के सबसे बड़ भाई [[द्विजेंद्रनाथ ठाकुर]] दार्शनिक आ कवि रहलें। दुसरा भाई [[सत्येंद्रनाथ ठाकुर]] भारतीय सिविल सेवा (इंडियन सिविल सर्विस) में नियुक्त होखे वाला पहिला भारतीय रहलें। एगो अउरी भाई ज्योतिरिंद्रनाथ टैगोर संगीतकार, संगीत रचयिता आ नाटककार रहलें। उनकर बहिन स्वर्णकुमारी देवी एगो उपन्यासकार रहली। ज्योतिरिंद्रनाथ के पत्नी कादंबरी देवी, जे टैगोर से कुछे बरिस जेठ रहली, उनकर बहुते करीबी सखी आ जीवन पर गहिर असर डाले वाली व्यक्ति रहली। 1884 में, टैगोर के बियाह होखला के कुछे समय बाद, कादंबरी देवी अचानक आत्महत्या कर लिहली। एह घटना से टैगोर कई बरिस तक गहिर सदमा में रहलें।
{{clear}}
== बाहरी कड़ी ==
* [http://www.nobel.se/literature/laureates/1913/tagore-bio.html रबींद्रनाथ, जीवनी, Nobel Foundation]
* [http://www.nobel.se/literature/laureates/1913/press.html Nobel Prize in Literature Presentation Speech from the official website of Nobel Foundation]
{{Authority control}}
[[श्रेणी:1961 में जनम]]
[[श्रेणी:1941 में निधन]]
[[श्रेणी:नोबेल पुरस्कार विजेता]]
[[श्रेणी:साहित्यकार]]
[[श्रेणी:बांग्ला साहित्यकार]]
[[श्रेणी:नोबेल पुरस्कार सम्मानित भारतीय]]
[[श्रेणी:लेखक]]
[[श्रेणी:भारत के लोग]]
[[श्रेणी:अंग्रेजी-भाषा के भारतीय कवि]]
{{poet-stub}}
lxbk53hckjcye2a9t5tq8zo87qsdlf4
801718
801717
2026-07-24T17:40:13Z
SM7
3953
+विकिकड़ी जोड़ल गइल
801718
wikitext
text/x-wiki
{{Infobox writer
| name = रबींद्रनाथ ठाकुर
| native_name = রবীন্দ্রনাথ ঠাকুর
| image = Tagore3.jpg
| image_size = 225
| alt = Late-middle-aged bearded man in white robes looks to the left with serene composure.
| caption = रबींद्रनाथ ठाकुर (c.1915)
| birth_name = Rabindranath Thakur
| birth_date = {{Birth date|df=yes|1861|05|07}}
| birth_place = [[कलकत्ता]], [[बंगाल प्रेसीडेंसी]], [[ब्रिटिश भारत]]
| death_date = {{Death date and age|df=yes|1941|08|07|1861|05|07}}
| death_place = कलकत्ता
| occupation = कवि, लेखक, चित्रकार, संगीतकार
| language = [[बंगाली भाषा|बंगाली]], अंग्रेजी
| education =
| alma_mater =
| period =
| genre =
| subject =
| notableworks = ''[[गीतांजलि]]'', ''[[गोरा (उपन्यास)|गोरा]]'', ''[[घरे-बाहिरे]]'', ''[[जन गण मन]]'', ''[[रबींद्र संगीत]]'', ''[[आमार सोनार बांग्ला]]''
| influences =
| spouse = {{marriage|मृणालिनी देवी|1883|1902}}
| children = पाँच गो संतान, दू के बचपन में मउत हो गइल
| relatives =
| awards = {{awd|[[साहित्य के नोबल पुरस्कार]]|1913}}<!-- do not add image icons such as nobel peace, see [[:Template:Infobox writer]] -->
| signature = Rabindranath Tagore Signature.svg
| signature_alt = Close-up on a Bengali word handwritten with angular, jaunty letters.
}}
'''रबींद्रनाथ ठाकुर''' ({{Langx|bn|রবীন্দ্রনাথ ঠাকুর}}, ''रोबिंद्रोनाथ ठाकुर''; {{Langx|en|Rabindranath Tagore}}, ''रबींद्रनाथ टैगोर'') (7 मई 1861 — 7 अगस्त 1941) के '''रबींद्रनाथ टैगोर''' आ '''गुरुदेव''' के नाम से भी जानल जाला। रबींद्रनाथ दुनिया क जानल मानल कवि, साहित्यकार, दार्शनिक आ भारतीय साहित्य क एकमात्र [[नोबल पुरस्कार]] बिजेता हउवन। ई [[एशिया]] के पहिला [[नोबेल पुरस्कार]] सम्मानित व्यक्ति रहलें। ई एकलौता कवि बाटें जिनकर दू गो रचना दू गो देशन क राष्ट्रगान बा — [[भारत]] क राष्ट्रगान ''[[जन गण मन]]'' आ [[बाँग्लादेश]] क राष्ट्रीय गान ''[[आमार सोनार बाँग्ला]]'' ठाकुरे क रचना बाड़ीं।
रबींद्रनाथ ठाकुर 19वीं सदी के आखिरी दौर आ 20वीं सदी के सुरुआती दौर में प्रासंगिक आधुनिकतावाद (कॉन्टेक्स्चुअल मॉडर्निज्म) के माध्यम से [[बंगाली साहित्य]], संगीत आ [[भारतीय कला]] के नया रूप दिहलें। ऊ [[गीतांजलि]] में शामिल बेहद "संवेदनशील, ताजगी से भरल आ सुंदर कविता" सभ के रचयिता रहलें। टैगोर के काव्यगीत सभ के आध्यात्मिक आ बदलत एहसास वाला मानल जाला, जबकि उनकर सुघर गद्य आ जादुई कविता पूरा भारतीय उपमहाद्वीप में बहुते लोकप्रिय भइल। ऊ [[रॉयल एशियाटिक सोसाइटी]] के फेलो भी रहलें। "बंगाल के बार्ड" कहल जाए वाला टैगोर गुरुदेव, कबिगुरु आ विश्वकवि जइसन उपनामन से जानल जालें।
[[कलकत्ता]] के एगो बंगाली ब्राह्मण परिवार में जनमल टैगोर के पुश्तैनी जड़ जेसोर आ बर्द्धमान जिला के जमींदार परिवार से जुड़ल रहे। ऊ आठे बरिस के उमिरि से कविता लिखे लगलें। सोलह बरिस के उमिर में ऊ ''भानुसिंह'' (मतलब "सिंह रुपी सुरुज") नाम से आपन पहिली महत्वपूर्ण कविता सभ के संकलन छपवलें, जवना के साहित्य के जानकार लोग शुरू में कवनो बहुत पुरान आ खो गइल क्लासिक रचना बूझ लिहल। 1877 तक ऊ अपना असली नाम से आपन पहिली लघुकथा आ नाटको प्रकाशित करा चुकल रहलें। मानवतावादी, सार्वभौमिक विचार वाला, अंतरराष्ट्रीय नजरिया रखे वाला आ राष्ट्रवाद के प्रबल समालोचक होखे के नाते, ऊ [[ब्रिटिश राज]] के बिरोध कइलें आ ब्रिटेन से आजादी के समर्थन कइलें। [[बंगाल पुनर्जागरण]] के एगो प्रमुख हस्ती के रूप में ऊ चित्रकला, रेखाचित्र, स्केच, सैकड़न लेखन आ करीब दू हजार गीतन के एगो बड़हन साहित्यिक-सांस्कृतिक धरोहर छोड़ गइलें। उनकर विरासत आजो [[विश्व-भारती यूनिवर्सिटी]] के अस्थापना के रूप में जिंदा बा।
टैगोर परंपरागत आ कठोर साहित्यिक नियमन के छाड़ि आ भाषा पर लगावल गइल बंधनन के बिरोध कइ के बंगाली साहित्य आ कला के एगो आधुनिक (मॉडर्न) रूप दिहलें। उनकर उपन्यास, कहानी, गीत, नृत्य-नाटक आ निबंध राजनीतिक आ निजी, दुनो किसिम के बिसयन पर आधारित रहलें। ''[[गीतांजलि]]'' (गीत के अर्पण), ''[[गोरा (उपन्यास)|गोरा]]'' आ ''[[घरे-बाइरे]]'' (घर आ दुनिया) उनकर सबसे प्रसिद्ध रचना सभ में गिनल जालीं। उनकर कविता, लघुकथा (कहानी) आ उपन्यास के एक ओर उनकर गीतात्मक शैली, बोलचाल के भाषा, स्वाभाविकता आ दार्शनिक आत्मचिंतन खातिर बहुत सराहल गइल, त दुसरा ओर एह खासियतन के लेके आलोचनो भइल। उनकर रचल गीत सभ में से दू गो देश अपना राष्ट्रीय गान के रूप में अपनवले बा—भारत के "जन गण मन" आ बांग्लादेश के "आमार सोनार बांग्ला"। इहे ना, [[श्री लंका|श्रीलंको]] के राष्ट्रगान उनुकरे रचना से प्रेरित हवे। उनकर गीत "[[बांग्लार माटी बांग्लार जोल]]" (बंगाल के माटी आ बंगाल के पानी) के भारतीय राज्य [[पच्छिम बंगाल]] के राजकीय गान के रूप में अपनावल गइल बाटे।
== जिनगी ==
=== सुरुआती जिनगी: 1861–1878 ===
13 गो जीवित संतानन में सबसे छोट रवींद्रनाथ टैगोर (घर में जिनका के "रबी" कहल जाय) के जनम 7 मई 1861 के [[कलकत्ता]] के जोड़ासाँको ठाकुरबाड़ी में भइल रहे। ऊ [[देबेंद्रनाथ ठाकुर]] (1817–1905) आ शारदा देवी (1830–1875) के बेटा रहलें।
ठाकुर के लालन-पालन मुख्य रूप से घर के नौकरे-चाकर लोग कइल। जब ऊ छोटे रहलें, तबे उनकर माई के निधन हो गइल रहे, जबकि उनकर बाबूजी अक्सर यात्रे पर रहत रहलें। टैगोर परिवार [[बंगाल पुनर्जागरण]] के अगिला पाँत में रहे। खुद एह परिवारे से एगो साहित्यिक पत्रिका प्रकाशित होखे, आ एहिजा बंगाली आ [[पच्छिमी शास्त्रीय संगीत]] के नाटक, संगीत गोष्ठी आ प्रस्तुति नियमित रूप से आयोजित होखल करे। टैगोर के बाबूजी कई गो पेशेवर [[ध्रुपद गायन|ध्रुपद गायकन]] के घरहीं बोला के रखले रहलें, जवना से कि ऊ परिवार के लइकन के [[भारतीय शास्त्रीय संगीत]] सिखा सकस।
टैगोर के सबसे बड़ भाई [[द्विजेंद्रनाथ ठाकुर]] दार्शनिक आ कवि रहलें। दुसरा भाई [[सत्येंद्रनाथ ठाकुर]] भारतीय सिविल सेवा (इंडियन सिविल सर्विस) में नियुक्त होखे वाला पहिला भारतीय रहलें। एगो अउरी भाई ज्योतिरिंद्रनाथ टैगोर संगीतकार, संगीत रचयिता आ [[नाटककार]] रहलें। उनकर बहिन [[स्वर्णकुमारी देवी]] एगो [[उपन्यासकार]] रहली। ज्योतिरिंद्रनाथ के पत्नी कादंबरी देवी, जे टैगोर से कुछे बरिस जेठ रहली, उनकर बहुते करीबी सखी आ जीवन पर गहिर असर डाले वाली व्यक्ति रहली। 1884 में, टैगोर के बियाह होखला के कुछे समय बाद, कादंबरी देवी अचानक आत्महत्या क लिहली। एह घटना से टैगोर कई बरिस तक गहिर सदमा में रहलें।
{{clear}}
== बाहरी कड़ी ==
* [http://www.nobel.se/literature/laureates/1913/tagore-bio.html रबींद्रनाथ, जीवनी, Nobel Foundation]
* [http://www.nobel.se/literature/laureates/1913/press.html Nobel Prize in Literature Presentation Speech from the official website of Nobel Foundation]
{{Authority control}}
[[श्रेणी:1961 में जनम]]
[[श्रेणी:1941 में निधन]]
[[श्रेणी:नोबेल पुरस्कार विजेता]]
[[श्रेणी:साहित्यकार]]
[[श्रेणी:बांग्ला साहित्यकार]]
[[श्रेणी:नोबेल पुरस्कार सम्मानित भारतीय]]
[[श्रेणी:लेखक]]
[[श्रेणी:भारत के लोग]]
[[श्रेणी:अंग्रेजी-भाषा के भारतीय कवि]]
{{poet-stub}}
hsgj1jyu7r1hzaqgqlxhul3qqn0i4ux
801719
801718
2026-07-24T17:50:02Z
SM7
3953
बिस्तार कइल गइल / अंग्रेजी से अनुबाद क के
801719
wikitext
text/x-wiki
{{Infobox writer
| name = रबींद्रनाथ ठाकुर
| native_name = রবীন্দ্রনাথ ঠাকুর
| image = Tagore3.jpg
| image_size = 225
| alt = Late-middle-aged bearded man in white robes looks to the left with serene composure.
| caption = रबींद्रनाथ ठाकुर (c.1915)
| birth_name = Rabindranath Thakur
| birth_date = {{Birth date|df=yes|1861|05|07}}
| birth_place = [[कलकत्ता]], [[बंगाल प्रेसीडेंसी]], [[ब्रिटिश भारत]]
| death_date = {{Death date and age|df=yes|1941|08|07|1861|05|07}}
| death_place = कलकत्ता
| occupation = कवि, लेखक, चित्रकार, संगीतकार
| language = [[बंगाली भाषा|बंगाली]], अंग्रेजी
| education =
| alma_mater =
| period =
| genre =
| subject =
| notableworks = ''[[गीतांजलि]]'', ''[[गोरा (उपन्यास)|गोरा]]'', ''[[घरे-बाहिरे]]'', ''[[जन गण मन]]'', ''[[रबींद्र संगीत]]'', ''[[आमार सोनार बांग्ला]]''
| influences =
| spouse = {{marriage|मृणालिनी देवी|1883|1902}}
| children = पाँच गो संतान, दू के बचपन में मउत हो गइल
| relatives =
| awards = {{awd|[[साहित्य के नोबल पुरस्कार]]|1913}}<!-- do not add image icons such as nobel peace, see [[:Template:Infobox writer]] -->
| signature = Rabindranath Tagore Signature.svg
| signature_alt = Close-up on a Bengali word handwritten with angular, jaunty letters.
}}
'''रबींद्रनाथ ठाकुर''' ({{Langx|bn|রবীন্দ্রনাথ ঠাকুর}}, ''रोबिंद्रोनाथ ठाकुर''; {{Langx|en|Rabindranath Tagore}}, ''रबींद्रनाथ टैगोर'') (7 मई 1861 — 7 अगस्त 1941) के '''रबींद्रनाथ टैगोर''' आ '''गुरुदेव''' के नाम से भी जानल जाला। रबींद्रनाथ दुनिया क जानल मानल कवि, साहित्यकार, दार्शनिक आ भारतीय साहित्य क एकमात्र [[नोबल पुरस्कार]] बिजेता हउवन। ई [[एशिया]] के पहिला [[नोबेल पुरस्कार]] सम्मानित व्यक्ति रहलें। ई एकलौता कवि बाटें जिनकर दू गो रचना दू गो देशन क राष्ट्रगान बा — [[भारत]] क राष्ट्रगान ''[[जन गण मन]]'' आ [[बाँग्लादेश]] क राष्ट्रीय गान ''[[आमार सोनार बाँग्ला]]'' ठाकुरे क रचना बाड़ीं।
रबींद्रनाथ ठाकुर 19वीं सदी के आखिरी दौर आ 20वीं सदी के सुरुआती दौर में प्रासंगिक आधुनिकतावाद (कॉन्टेक्स्चुअल मॉडर्निज्म) के माध्यम से [[बंगाली साहित्य]], संगीत आ [[भारतीय कला]] के नया रूप दिहलें। ऊ [[गीतांजलि]] में शामिल बेहद "संवेदनशील, ताजगी से भरल आ सुंदर कविता" सभ के रचयिता रहलें। टैगोर के काव्यगीत सभ के आध्यात्मिक आ बदलत एहसास वाला मानल जाला, जबकि उनकर सुघर गद्य आ जादुई कविता पूरा भारतीय उपमहाद्वीप में बहुते लोकप्रिय भइल। ऊ [[रॉयल एशियाटिक सोसाइटी]] के फेलो भी रहलें। "बंगाल के बार्ड" कहल जाए वाला टैगोर गुरुदेव, कबिगुरु आ विश्वकवि जइसन उपनामन से जानल जालें।
[[कलकत्ता]] के एगो बंगाली ब्राह्मण परिवार में जनमल टैगोर के पुश्तैनी जड़ जेसोर आ बर्द्धमान जिला के जमींदार परिवार से जुड़ल रहे। ऊ आठे बरिस के उमिरि से कविता लिखे लगलें। सोलह बरिस के उमिर में ऊ ''भानुसिंह'' (मतलब "सिंह रुपी सुरुज") नाम से आपन पहिली महत्वपूर्ण कविता सभ के संकलन छपवलें, जवना के साहित्य के जानकार लोग शुरू में कवनो बहुत पुरान आ खो गइल क्लासिक रचना बूझ लिहल। 1877 तक ऊ अपना असली नाम से आपन पहिली लघुकथा आ नाटको प्रकाशित करा चुकल रहलें। मानवतावादी, सार्वभौमिक विचार वाला, अंतरराष्ट्रीय नजरिया रखे वाला आ राष्ट्रवाद के प्रबल समालोचक होखे के नाते, ऊ [[ब्रिटिश राज]] के बिरोध कइलें आ ब्रिटेन से आजादी के समर्थन कइलें। [[बंगाल पुनर्जागरण]] के एगो प्रमुख हस्ती के रूप में ऊ चित्रकला, रेखाचित्र, स्केच, सैकड़न लेखन आ करीब दू हजार गीतन के एगो बड़हन साहित्यिक-सांस्कृतिक धरोहर छोड़ गइलें। उनकर विरासत आजो [[विश्व-भारती यूनिवर्सिटी]] के अस्थापना के रूप में जिंदा बा।
टैगोर परंपरागत आ कठोर साहित्यिक नियमन के छाड़ि आ भाषा पर लगावल गइल बंधनन के बिरोध कइ के बंगाली साहित्य आ कला के एगो आधुनिक (मॉडर्न) रूप दिहलें। उनकर उपन्यास, कहानी, गीत, नृत्य-नाटक आ निबंध राजनीतिक आ निजी, दुनो किसिम के बिसयन पर आधारित रहलें। ''[[गीतांजलि]]'' (गीत के अर्पण), ''[[गोरा (उपन्यास)|गोरा]]'' आ ''[[घरे-बाइरे]]'' (घर आ दुनिया) उनकर सबसे प्रसिद्ध रचना सभ में गिनल जालीं। उनकर कविता, लघुकथा (कहानी) आ उपन्यास के एक ओर उनकर गीतात्मक शैली, बोलचाल के भाषा, स्वाभाविकता आ दार्शनिक आत्मचिंतन खातिर बहुत सराहल गइल, त दुसरा ओर एह खासियतन के लेके आलोचनो भइल। उनकर रचल गीत सभ में से दू गो देश अपना राष्ट्रीय गान के रूप में अपनवले बा—भारत के "जन गण मन" आ बांग्लादेश के "आमार सोनार बांग्ला"। इहे ना, [[श्री लंका|श्रीलंको]] के राष्ट्रगान उनुकरे रचना से प्रेरित हवे। उनकर गीत "[[बांग्लार माटी बांग्लार जोल]]" (बंगाल के माटी आ बंगाल के पानी) के भारतीय राज्य [[पच्छिम बंगाल]] के राजकीय गान के रूप में अपनावल गइल बाटे।
== जिनगी ==
=== सुरुआती जिनगी: 1861–1878 ===
13 गो जीवित संतानन में सबसे छोट रवींद्रनाथ टैगोर (घर में जिनका के "रबी" कहल जाय) के जनम 7 मई 1861 के [[कलकत्ता]] के जोड़ासाँको ठाकुरबाड़ी में भइल रहे। ऊ [[देबेंद्रनाथ ठाकुर]] (1817–1905) आ शारदा देवी (1830–1875) के बेटा रहलें।
ठाकुर के लालन-पालन मुख्य रूप से घर के नौकरे-चाकर लोग कइल। जब ऊ छोटे रहलें, तबे उनकर माई के निधन हो गइल रहे, जबकि उनकर बाबूजी अक्सर यात्रे पर रहत रहलें। टैगोर परिवार [[बंगाल पुनर्जागरण]] के अगिला पाँत में रहे। खुद एह परिवारे से एगो साहित्यिक पत्रिका प्रकाशित होखे, आ एहिजा बंगाली आ [[पच्छिमी शास्त्रीय संगीत]] के नाटक, संगीत गोष्ठी आ प्रस्तुति नियमित रूप से आयोजित होखल करे। टैगोर के बाबूजी कई गो पेशेवर [[ध्रुपद गायन|ध्रुपद गायकन]] के घरहीं बोला के रखले रहलें, जवना से कि ऊ परिवार के लइकन के [[भारतीय शास्त्रीय संगीत]] सिखा सकस।
टैगोर के सबसे बड़ भाई [[द्विजेंद्रनाथ ठाकुर]] दार्शनिक आ कवि रहलें। दुसरा भाई [[सत्येंद्रनाथ ठाकुर]] भारतीय सिविल सेवा (इंडियन सिविल सर्विस) में नियुक्त होखे वाला पहिला भारतीय रहलें। एगो अउरी भाई ज्योतिरिंद्रनाथ टैगोर संगीतकार, संगीत रचयिता आ [[नाटककार]] रहलें। उनकर बहिन [[स्वर्णकुमारी देवी]] एगो [[उपन्यासकार]] रहली। ज्योतिरिंद्रनाथ के पत्नी कादंबरी देवी, जे टैगोर से कुछे बरिस जेठ रहली, उनकर बहुते करीबी सखी आ जीवन पर गहिर असर डाले वाली व्यक्ति रहली। 1884 में, टैगोर के बियाह होखला के कुछे समय बाद, कादंबरी देवी अचानक आत्महत्या क लिहली। एह घटना से टैगोर कई बरिस तक गहिर सदमा में रहलें।
टैगोर के इस्कूली पढ़ाई में कौनो बहुत खास रुचि ना रहे। ऊ कलास में जाए के बजाय अपना हवेली में भा लगे के बोलपुर आ पानीहाटी में घूमे-फिरे के बेसी पस'न करत रहलें, जहाँ उनकर परिवार अक्सर जाइल करे। उनकर भाई हेमेंद्रनाथ टैगोर उनकर पढ़ाई-लिखाई के साथे शारीरिक ट्रेनिंग के जिम्मा सँम्हरले रहलें। ऊ ठाकुर के गंगा में पँवरवावें, पहाड़ पर चढ़वावें, जिम्नास्टिक करवावें, आ जूडो आ कुश्ती के अभ्यासो भी करवावें। एह दौरान टैगोर पेंटिंग (चित्रकला), शरीर रचना विज्ञान (एनाटमी), भूगोल, इतिहास, साहित्य, गणित, संस्कृत आ अंग्रेजी पढ़लें। अंग्रेजी उनकर सबसे कम पसंद के विषय रहे। टैगोर औपचारिक शिक्षा से लगभग नफरते करत रहलें। लोकल [[प्रेसिडेंसी कॉलेज]] में उनकर पढ़ाई बस एके दिन चलल। कई बरिस बाद ऊ लिखलें कि सही शिक्षा खाली बात समझावे के नाम ना ह, बल्कि जिज्ञासा जगावे के नाम ह।
इगारह बरिस के उमिर में जनेव (उपनयन संस्कार) होखला के बाद, फरवरी 1873 में टैगोर अपना बाबूजी के साथे कई महीना के भारत-भ्रमण पर निकरलें। एह यात्रा में ऊ पहिलहीं अपना बाबूजी के शांतिनिकेतन स्थित आश्रम गइलें, ओकरा बाद अमृतसर घूमलें आ आखिर में हिमालय के पहाड़ी नगर [[डलहौजी]] पहुँचलें। एह यात्रा के दौरान टैगोर जीवनी पढ़लें, इतिहास, खगोल विज्ञान, आधुनिक विज्ञान आ संस्कृत के अध्ययन कइलें, आ कालिदास के शास्त्रीय कविता सभ के भी गहिराई से पढ़लें। 1873 में [[अमृतसर]] में करीबन एक महिन्ना रहला के दौरान [[स्वर्ण मंदिर]] में गावल जाए वाला गुरबानी आ नानक बानी से ऊ गहिर रूप से प्रभावित भइलें। टैगोर आ उनकर बाबूजी स्वर्ण मंदिर में रेगुलर जाइल करे।
{{clear}}
== बाहरी कड़ी ==
* [http://www.nobel.se/literature/laureates/1913/tagore-bio.html रबींद्रनाथ, जीवनी, Nobel Foundation]
* [http://www.nobel.se/literature/laureates/1913/press.html Nobel Prize in Literature Presentation Speech from the official website of Nobel Foundation]
{{Authority control}}
[[श्रेणी:1961 में जनम]]
[[श्रेणी:1941 में निधन]]
[[श्रेणी:नोबेल पुरस्कार विजेता]]
[[श्रेणी:साहित्यकार]]
[[श्रेणी:बांग्ला साहित्यकार]]
[[श्रेणी:नोबेल पुरस्कार सम्मानित भारतीय]]
[[श्रेणी:लेखक]]
[[श्रेणी:भारत के लोग]]
[[श्रेणी:अंग्रेजी-भाषा के भारतीय कवि]]
{{poet-stub}}
t25u4y0oaz009cp7gjljehbd0elhmnr
होमर
0
18191
801724
576463
2026-07-24T19:51:16Z
SM7
3953
सुधार कइल गइल, सफाई कइल गइल, अनुबाद कइल गइल
801724
wikitext
text/x-wiki
{{Infobox philosopher
| name = होमर
| image = Homer British Museum.jpg
| image_size = 225px
| caption = [[हेलेनिस्टिक सभ्यता|हेलेनिस्टिक काल]] के एगो आदर्शीकृत चित्रण। [[ब्रिटिश म्यूजियम]]।
| birth_name = स्यूडो-हेरोडोटस के अनुसार [[मेलीस नदी|मेलीसिजेनेस]]
| birth_date = लगभग ईसा पूर्व 8वीं सदी, [[हेरोडोटस]] के अनुसार
| birth_place = [[स्मिर्ना]]
| death_place = [[इओस (द्वीप)|इओस]]
| death_cause = नामालुम बेमारी
| residence = [[स्मिर्ना]], [[क्यूमे (एओलिस)]], [[किओस]]
| notable_works = [[इलियड]], [[ओडिसी]], [[होमेरिक स्तुतिगान]], [[महाकाव्य चक्र]], अन्य होमेरिका
| era = [[ज्यामितीय कला|ज्यामितीय काल]]
| region = [[एजियन सागर]] के तट आ दीप
| main_interests = घूम-घूम के मौखिक काव्य के रचना आ प्रस्तुति, [[रैप्सोड]] लोग खातिर [[किओस]] में [[होमेरिदाई]] के एगो इस्कूल चलावल
| influences = [[रैप्सोडिक]] [[मौखिक काव्य]]
| influenced = [[क्लासिकल स्टडीज]] ([[पच्छिमी साहित्यिक परंपरा]])
| nationality = [[यूनानी लोग|यूनानी]]
}}
'''होमर''' ({{lang-grc|Ὅμηρος}} {{IPA-el|hómɛːros|}}, ''Hómēros'') के ''[[इलियाड]]'' आ ''[[ओडिसी]]'' के रचनिहार की रूप में जानल जाला। उनुका के प्राचीन [[यूनान]] में की सभसे महान [[महाकाव्य|महाकाव्य लेखक]]न में मानल जाला आ ऊ यूरोप की पहिला साहित्य के लेखक होखला की कारन बहुत महत्व वाला [[कबी|कवि]] बन जालें आ यूरोपीय लोग उनुका के एही बदे बहुत महत्व देला।
होमर कहाँ पैदा भइलें आ कहाँ निवास रहे आ कब रहलें ई सब बहुत ठिक से मालुम नइखे बाकी [[हेरोडोटस]] के ई अनुमान रहे की होमर उनुका ले 400 बरिस पहिले रहलें ए हिसाब से होमर के समय 850 ईसा पूर्व होखे के चाहीं।<ref>[[हेरोडोटस]] 2.53.</ref>
{{clear}}
==संदर्भ==
{{Reflist}}
{{Authority control}}
[[श्रेणी:प्राचीन यूनान]]
[[श्रेणी:प्राचीन यूनान के लोग]]
[[श्रेणी:कवि]]
{{जीवनी-आधार}}
ho30efsyv9g2q76vfm6sylrw32lti37
801726
801724
2026-07-24T19:59:31Z
SM7
3953
बिस्तार कइल गइल / अंग्रेजी से अनुबाद क के
801726
wikitext
text/x-wiki
{{Infobox philosopher
| name = होमर
| image = Homer British Museum.jpg
| image_size = 225px
| caption = [[हेलेनिस्टिक सभ्यता|हेलेनिस्टिक काल]] के एगो आदर्शीकृत चित्रण। [[ब्रिटिश म्यूजियम]]।
| birth_name = स्यूडो-हेरोडोटस के अनुसार [[मेलीस नदी|मेलीसिजेनेस]]
| birth_date = लगभग ईसा पूर्व 8वीं सदी, [[हेरोडोटस]] के अनुसार
| birth_place = [[स्मिर्ना]]
| death_place = [[इओस (द्वीप)|इओस]]
| death_cause = नामालुम बेमारी
| residence = [[स्मिर्ना]], [[क्यूमे (एओलिस)]], [[किओस]]
| notable_works = [[इलियड]], [[ओडिसी]], [[होमेरिक स्तुतिगान]], [[महाकाव्य चक्र]], अन्य होमेरिका
| era = [[ज्यामितीय कला|ज्यामितीय काल]]
| region = [[एजियन सागर]] के तट आ दीप
| main_interests = घूम-घूम के मौखिक काव्य के रचना आ प्रस्तुति, [[रैप्सोड]] लोग खातिर [[किओस]] में [[होमेरिदाई]] के एगो इस्कूल चलावल
| influences = [[रैप्सोडिक]] [[मौखिक काव्य]]
| influenced = [[क्लासिकल स्टडीज]] ([[पच्छिमी साहित्यिक परंपरा]])
}}
'''होमर''' ({{lang-grc|Ὅμηρος}} {{IPA-el|hómɛːros|}}, ''Hómēros'') के ''[[इलियाड]]'' आ ''[[ओडिसी]]'' के रचनिहार की रूप में जानल जाला। उनुका के प्राचीन [[यूनान]] में की सभसे महान [[महाकाव्य|महाकाव्य लेखक]]न में मानल जाला आ ऊ यूरोप की पहिला साहित्य के लेखक होखला की कारन बहुत महत्व वाला [[कबी|कवि]] बन जालें आ यूरोपीय लोग उनुका के एही बदे बहुत महत्व देला।
होमर कहाँ पैदा भइलें आ कहाँ निवास रहे आ कब रहलें ई सब बहुत ठिक से मालुम नइखे बाकी [[हेरोडोटस]] के ई अनुमान रहे की होमर उनुका ले 400 बरिस पहिले रहलें ए हिसाब से होमर के समय 850 ईसा पूर्व होखे के चाहीं।<ref>[[हेरोडोटस]] 2.53.</ref>
== होमर के मानल जाये वाली रचना सभ ==
आज "होमर" के नाँव मुख्य रूप से खाली [[इलियड]] आ [[ओडिसी]] से जोड़ल जाला। हालाँकि, पुराना समय में कई ठे अउरी रचना सभ के भी होमर के रचल मानल जात रहे। एह में होमेरिक भजन, होमर आ हेसियड के कंपटीशन, कई गो एपिग्राम, लिटिल इलियड, नोस्टोई, थीबाइड, साइप्रिया, एपिगोनी, हास्यप्रधान लघु महाकाव्य बेट्राकोमायोमाखिया ("मेंढ़क आ मूस के जुद्ध"), मार्जाइट्स, कैप्चर ऑफ ओइखालिया आ फोकाइस शामिल रहलें।
आज ई दावा सभ के प्रामाणिक ना मानल जाला, आ प्राचीन यूनानी दुनिया में भी एह पर सभे के सहमति ना रहे। होमर के जीवन से जुड़ल अनेक कथा-कहानी नियर, ई दावा सभ भी मुख्य रूप से एह बात के ओर इशारा करेला कि प्राचीन यूनानी संस्कृति में होमर के स्थान बहुते महत्वपूर्ण रहे।
{{clear}}
==संदर्भ==
{{Reflist}}
{{Authority control}}
[[श्रेणी:प्राचीन यूनान]]
[[श्रेणी:प्राचीन यूनान के लोग]]
[[श्रेणी:कवि]]
{{जीवनी-आधार}}
qjedajtj918mljmvooeemjly9lhoiix
801762
801726
2026-07-24T20:05:16Z
SM7
3953
संदर्भ जोड़ल/सुधारल गइल
801762
wikitext
text/x-wiki
{{Infobox philosopher
| name = होमर
| image = Homer British Museum.jpg
| image_size = 225px
| caption = [[हेलेनिस्टिक सभ्यता|हेलेनिस्टिक काल]] के एगो आदर्शीकृत चित्रण। [[ब्रिटिश म्यूजियम]]।
| birth_name = स्यूडो-हेरोडोटस के अनुसार [[मेलीस नदी|मेलीसिजेनेस]]
| birth_date = लगभग ईसा पूर्व 8वीं सदी, [[हेरोडोटस]] के अनुसार
| birth_place = [[स्मिर्ना]]
| death_place = [[इओस (द्वीप)|इओस]]
| death_cause = नामालुम बेमारी
| residence = [[स्मिर्ना]], [[क्यूमे (एओलिस)]], [[किओस]]
| notable_works = [[इलियड]], [[ओडिसी]], [[होमेरिक स्तुतिगान]], [[महाकाव्य चक्र]], अन्य होमेरिका
| era = [[ज्यामितीय कला|ज्यामितीय काल]]
| region = [[एजियन सागर]] के तट आ दीप
| main_interests = घूम-घूम के मौखिक काव्य के रचना आ प्रस्तुति, [[रैप्सोड]] लोग खातिर [[किओस]] में [[होमेरिदाई]] के एगो इस्कूल चलावल
| influences = [[रैप्सोडिक]] [[मौखिक काव्य]]
| influenced = [[क्लासिकल स्टडीज]] ([[पच्छिमी साहित्यिक परंपरा]])
}}
'''होमर''' ({{lang-grc|Ὅμηρος}} {{IPA-el|hómɛːros|}}, ''Hómēros'') के ''[[इलियाड]]'' आ ''[[ओडिसी]]'' के रचनिहार की रूप में जानल जाला। उनुका के प्राचीन [[यूनान]] में की सभसे महान [[महाकाव्य|महाकाव्य लेखक]]न में मानल जाला आ ऊ यूरोप की पहिला साहित्य के लेखक होखला की कारन बहुत महत्व वाला [[कबी|कवि]] बन जालें आ यूरोपीय लोग उनुका के एही बदे बहुत महत्व देला।
होमर कहाँ पैदा भइलें आ कहाँ निवास रहे आ कब रहलें ई सब बहुत ठिक से मालुम नइखे बाकी [[हेरोडोटस]] के ई अनुमान रहे की होमर उनुका ले 400 बरिस पहिले रहलें ए हिसाब से होमर के समय 850 ईसा पूर्व होखे के चाहीं।<ref>[[हेरोडोटस]] 2.53.</ref>
== होमर के मानल जाये वाली रचना सभ ==
आज "होमर" के नाँव मुख्य रूप से खाली [[इलियड]] आ [[ओडिसी]] से जोड़ल जाला। हालाँकि, पुराना समय में कई ठे अउरी रचना सभ के भी होमर के रचल मानल जात रहे। एह में होमेरिक भजन, होमर आ हेसियड के कंपटीशन, कई गो एपिग्राम, लिटिल इलियड, नोस्टोई, थीबाइड, साइप्रिया, एपिगोनी, हास्यप्रधान लघु महाकाव्य बेट्राकोमायोमाखिया ("मेंढ़क आ मूस के जुद्ध"), मार्जाइट्स, कैप्चर ऑफ ओइखालिया आ फोकाइस शामिल रहलें।
आज ई दावा सभ के प्रामाणिक ना मानल जाला, आ प्राचीन यूनानी दुनिया में भी एह पर सभे के सहमति ना रहे। होमर के जीवन से जुड़ल अनेक कथा-कहानी नियर, ई दावा सभ भी मुख्य रूप से एह बात के ओर इशारा करेला कि प्राचीन यूनानी संस्कृति में होमर के स्थान बहुते महत्वपूर्ण रहे।<ref>{{harvc |last=Kelly |first=Adrian D. |in=Finkelberg |year=2012 |chapter=Homerica}} {{doi|10.1002/9781444350302.wbhe0606}}</ref><ref>{{cite book |last1=Graziosi |first1=Barbara |url=https://books.google.com/books?id=LiDUAwAAQBAJ&pg=PA24 |title=Homer: The Resonance of Epic |last2=Haubold |first2=Johannes |year=2005 |publisher=A & C Black |isbn=978-0-7156-3282-6|pages=24–26}}</ref>{{sfn|Graziosi|2002|pages=165–168}}
{{clear}}
==संदर्भ==
{{Reflist}}
{{Authority control}}
[[श्रेणी:प्राचीन यूनान]]
[[श्रेणी:प्राचीन यूनान के लोग]]
[[श्रेणी:कवि]]
{{जीवनी-आधार}}
2t4dhz19lg7f2yohdf9gn1eiie8j8xd
प्रयोगकर्ता वार्ता:Sekidoki
3
35211
801912
568815
2026-07-25T04:16:29Z
SHB2000
26156
SHB2000 पन्ना [[प्रयोगकर्ता वार्ता:Taiwania Justo]] के [[प्रयोगकर्ता वार्ता:Sekidoki]] पर स्थानांतरण कइलें: प्रयोगकर्ता के नाँव बदलाव के दौरान पन्ना "[[Special:CentralAuth/Taiwania Justo|Taiwania Justo]]" से "[[Special:CentralAuth/Sekidoki|Sekidoki]]" पर ऑटोमेटिक रूप से स्थानांतरित भइल।
568815
wikitext
text/x-wiki
{| id="GeoPort-upper" width="100%" cellpadding="5" cellspacing="6" style="background:#FFFAFF; text-align: justify; border-style:ridge; border-width:1px; border-color:#A9A9A9;"
|-
|<div style="float:right;width:30%"><small>तुरंत भइल बदलाव देखीं</small><br/> [[File:View recent changes.svg|45px|link=विशेष:RecentChanges]]<br/></div>
<h1 style="display:inline-block;margin-top:.1em; text-align:right; margin-bottom:.2em; border-bottom:0; font-weight:bold;">Welcome! स्वागतम्! [[File:Crystal Clear app ksmiletris.png|25px]] </h1>
राउर बहुत-बहुत स्वागत बा '''{{BASEPAGENAME}}''' जी ! {{#if: | {{{1}}} | }}<br/>
<div style="float:right; <!--background:#F5F5DC;--> width:30%">
<!-- दाहिना साइडबार -->
<big>'''ई जरूर पढ़ल जाय:'''</big>
{| border="5" cellspacing="10" cellpadding="5" height="50" align=center border=0 style="background: transparent"
|-
| style="background-color:#FFFFFF; border: solid 2px #FFFFFF; padding:10px 20px;" | [[विकिपीडिया:विकिपीडिया का ना हवे|विकिपीडिया का ना हवे?]]
|-
| style="background-color:#FFFFFF border: solid 2px #FFFFFF; padding:10px 20px;" | [[विकिपीडिया:भोजपुरी में कइसे टाइप करब?|भोजपुरी में टाइपिंग]]
|-
| style="background-color:#FFFFFF; border: solid 1px #FFFFFF; padding:10px 20px;" | [[विकिपीडिया:सत्यापन जोग|प्रमाणित बात लिखीं]]
|-
| style="background-color:#FFFFFF; border: solid 1px #FFFFFF; padding:10px 20px;" | [[मदद:फुटनोट|संदर्भ कइसे जोड़ीं?]]
|-
| style="background-color:#FFFFFF; border: solid 1px #FFFFFF; padding:10px 20px;" | [[विकिपीडिया:नीति नियम अउरी दिशानिर्देश|विकिनीति आ निर्देश]]
|}</div>
<!-- मुख्य पाठ -->
'''{{#if: | {{{1}}} | {{BASEPAGENAME}} }} जी''',
एह समय रउँआ [[विकिमीडिया फाउन्डेशन]] के परियोजना [[भोजपुरी]] [[विकिपीडिया]] पर बाड़ीं। भोजपुरी विकिपीडिया एगो मुक्त डिजिटल [[ज्ञानकोश]] हवे, जेवन अइसन भइया-बहिनी लोग मिल के लिखले बा जे ज्ञान बाँटे में बिस्वास करत बाटे। एह समय ए परियोजना में [[विशेष:ActiveUsers|{{NUMBEROFUSERS}} सदस्य]] लोग शामिल बाटे। ई बहुते खुशी क बाति बा कि रउँओं ए में शामिल हो गइल बाड़ीं।
* पहिले से बनल [[विकिपीडिया:लेख|लेखवन]] में कौनो संपादन खाली टेस्ट करे खातिर मत करीं। कौनों तरह के परीक्षण <small>(प्रयोग या टेस्टिंग)</small> [[विकिपीडिया:टेस्टस्थल|टेस्टपन्ना]] या [[Special:MyPage/प्रयोगपृष्ठ|अपना प्रयोगपन्ना]] पर करीं।
* [[विकिपीडिया:आपन परिचय कइसे देईं?|आपन परिचय]] आप संछेप में [[सदस्य:{{BASEPAGENAME}}|अपना सदस्य पन्ना]] पर दे सकत बानी। बहुत पर्सनल बात इहाँ मत लिखीं, न कौनों परचार वाली बात लिखीं। अपने खुद के बारे में लेख मत बनाईं।
* दुसरा [[विकिपीडिया:चौपाल |सदस्य लोगन से बात]] करत समय, [[मदद:वार्ता पन्ना|बातचीत पन्ना]] पर सनेसा लिखले की बाद आपन [[विकिपीडिया:दसखत|दसखत]] <small>(हस्ताक्षर)</small> जरूर करीं। एकरा खातिर अंत में चार गो टेढ़का डैश (<nowiki>~~~~</nowiki>) लिख देंईं या टूलबार में [[File:Insert-signature2.svg|link=|alt=]] पर क्लिक करीं।
* मदद चाहत होखीं त विकिपीडिया के [[विकिपीडिया:मदद| मदद पन्ना]] पर जाईं।
<!-- फुटर के कड़ी सभ -->
सीखे-समझे खातिर कुछ अउरी कड़ी नीचे दिहल जात बाटे:
{| border="5" cellspacing="1" cellpadding="0" height="50" align=center border=0 style="background: transparent"
| style="background-color:#FFFFFF; border: solid 2px #F2BDCD; padding:1px 10px;" | [[विकिपीडिया:स्वशिक्षा|शुरू से सीखीं]]
|
| style="background-color:#FFFFFF; border: solid 2px #F2BDCD; padding:1px 20px;" | [[मदद:संपादन|संपादन सीखीं]]
|
| style="background-color:#FFFFFF; border: solid 2px #F2BDCD; padding:1px 20px;" | [[विकिपीडिया:नया लेख कइसे सुरू करीं?|नया लेख]]
| style="background-color:#FFFFFF; border: solid 2px #F2BDCD; padding:1px 20px;" | [[विकिपीडिया:अइसन लेख मना बाटे|लेख मनाहीं]]
|
| style="background-color:#FFFFFF; border: solid 2px #F2BDCD; padding:1px 20px;" | [[विकिपीडिया:पंचशील|पंचशील]]
| style="background-color:#FFFFFF; border: solid 2px #F2BDCD; padding:1px 20px;" | [[विकिपीडिया:सदस्य-समाज मुख्यपन्ना|सदस्य समाज पन्ना]]
|}
|}
-- [[प्रयोगकर्ता:नया सदस्य स्वागतकर्ता|नया सदस्य स्वागतकर्ता]] ([[प्रयोगकर्ता वार्ता:नया सदस्य स्वागतकर्ता|बात करीं]]) ०६:००, १३ अगस्त २०१६ (UTC)
e2fbdxzau1kgzcxip8obknmioc0c94z
गौतम अडानी
0
50477
801917
784953
2026-07-25T11:45:56Z
InternetArchiveBot
25596
Rescuing 1 sources and tagging 0 as dead.) #IABot (v2.0.9.5
801917
wikitext
text/x-wiki
{{Infobox person
| name = गौतम अडानी
| image = Gautam Adani.jpg
| alt =
| caption =
| birth_name = गौतम शांतिलाल अडानी
| birth_date = {{Birth date and age|df=yes|1962|06|24}}
| birth_place = [[अहमदाबाद]], गुजरात, भारत
| residence = अहमदाबाद, गुजरात, भारत
| death_date = <!-- {{Death date and age|df=yes|YYYY|MM|DD|YYYY|MM|DD}} or {{Death-date and age|Month DD, YYYY|Month DD, YYYY}} (death date then birth date) -->
| death_place =
| nationality = [[भारत के लोग|भारतीय]]
| other_names =
|networth = $8.81 बिलियन (सितंबर 2017)<ref name="Forbes">{{cite web|title=Gautam Adani & family|url=https://www.forbes.com/profile/gautam-adani/|website=Forbes|accessdate=6 अप्रैल 2017}}</ref>
| known_for = संस्थापक आ चेयरमैन, अडानी ग्रुप
| occupation = बिजनेसमैन
| parents = शांतिलाल अडानी<br/>शांता अडानी
| spouse = प्रीती अडानी
| children = करन<br/>जीत
| relatives = बिनोद अडानी (भाई)
}}
'''गौतम शांतिलाल अडानी''' (जनम 24 जून 1962) एगो भारतीय अरबपति उद्योगपति आ फिलेंथ्रोपिस्ट (परोपकारी, मानवताप्रेमी) बाड़ें।<ref>{{Cite news|title=Gautam Adani, Nita Ambani & KM Birla top philanthropic leaders in India|work=The Economic Times|url=https://economictimes.indiatimes.com/magazines/panache/gautam-adani-nita-ambani-km-birla-top-philanthropic-leaders-in-india/articleshow/85291662.cms|access-date=2022-01-15}}</ref> ऊ भारत में बंदरगाह बिकास आ संचालन से जुड़ल अहमदाबाद के बहुराष्ट्रीय समूह [[अडानी ग्रुप]] के [[अध्यक्ष]] आऊर संस्थापक बाड़ें।<ref name="Bloomberg">{{cite news|title= Gautam Adani Bloomberg Index |newspaper= Bloomberg.com |url= https://www.bloomberg.com/billionaires/profiles/gautam-s-adani/ |access-date=11 February 2022}}</ref> अडानी [[अडानी फाउंडेशन]] के अध्यक्ष भी बाड़े, जवना के नेतृत्व मुख्य रूप से उनुकर पत्नी [[प्रीति अडानी]] करेली।
==सुरुआती जिनगी==
अडानी के जनम 24 जून 1962 के [[गुजरात]] के बनिया परिवार में शांतिलाल आ शांति अडानी के घरे गुजरात के [[अहमदाबाद]] में भइल।<ref>{{cite news|url=http://www.businessworld.in/amp/article/The-Rise-Of-The-Tycoon/05-02-2018-139609/|title=The Rise Of The Tycoon: Gautam Adani|website=[[Businessworld]]|first=Himani|last=Chandna|date=2019-02-26|access-date=2022-06-24|archive-date=2022-03-17|archive-url=https://web.archive.org/web/20220317122500/https://www.businessworld.in/amp/article/The-Rise-Of-The-Tycoon/05-02-2018-139609/|url-status=dead}}</ref> इनके 7 गो भाई-बहिन बाड़ें आ इनके माता-पिता गुजरात के उत्तरी हिस्सा के थराद कस्बा से पलायन कइले रहलें।<ref>{{cite news |title=A look into profile of billionaire Gautam Adani |url=https://www.indiatoday.in/magazine/profile/story/20110829-profile-of-billionaire-gautam-adani-747307-2011-08-20 |access-date=23 May 2022 |work=India Today |date=20 August 2011 |language=en}}</ref> इनके पिता एगो छोट कपड़ा के व्यापारी रहलें।<ref>{{cite news |url=https://www.indiatvnews.com/business/india/top-10-gujarati-billionaires-3732.html?page=4 |title= Top 10 Gujrati Billionaires |website= [[India TV]] |date= 2015-08-01}}</ref> इनके पढ़ाई अहमदाबाद के शेठ चिमनलाल नागींदास विद्यालय में भइल। गुजरात विश्वविद्यालय में वाणिज्य में स्नातक के डिग्री खातिर नामांकन लिहलें, बाकी दुसरा साल के बाद पढ़ाई छोड़ दिहलें।<ref name="gujarati">{{cite news |last1=Joseph |first1=Anto T. |title=Gautam Adani: Another Gujarati who made it big |url=https://economictimes.indiatimes.com/news/company/corporate-trends/gautam-adani-another-gujarati-who-made-it-big/articleshow/2605913.cms |access-date=23 May 2022 |work=The Economic Times |date=8 December 2007}}</ref> अडानी के बिजनेस में इंटरेस्ट रहे, लेकिन बाबूजी के कपड़ा के बिजनेस में ना।<ref>{{cite journal |url= https://www.cambridge.org/core/journals/business-history-review/article/transnational-indian-business-in-the-twentieth-century/6B6236551634D106A0E65880574D7373/core-reader# |title= Transnational Indian Business in the Twentieth Century |author= Cambridge Core |journal= Business History Review |date= 2017-12-12|volume= 91 |issue= 4 |pages= 651–679 |doi= 10.1017/S0007680517001350 |s2cid= 158483062 }}</ref>
==कैरियर==
[[File:Secretary Kerry greets Executive Chairman Adani before meeting with Indian CEOs amid Vibrant Gujarat Summit.jpg|right|thumb|अमेरिका के सेक्रेटरी ऑफ़ स्टेट जॉन कैरी अडानी के स्वागत करत, 2014]]
किशोरावस्था में अडानी महेंद्र ब्रदर्स खातिर हीरा सॉर्टर के काम करे खातिर 1978 में [[मुंबई]] आ गइलें।<ref>{{cite journal|url=https://www.cambridge.org/core/journals/business-history-review/article/transnational-indian-business-in-the-twentieth-century/6B6236551634D106A0E65880574D7373/core-reader#|title= Transnational Indian Business in the Twentieth Century|date=2017-12-12|journal= Business History Review|volume=91|issue=4|pages=651–679|doi=10.1017/S0007680517001350|last1=Tumbe|first1=Chinmay|s2cid=158483062}}
</ref>
1981 में उनुकर बड़ भाई महासुखभाई अडानी अहमदाबाद में एगो प्लास्टिक यूनिट खरीदले अउरी उनुका के संचालन के प्रबंधन करे के नेवता देले। ई उद्यम पॉलीविनाइल क्लोराइड (पीवीसी) आयात के माध्यम से वैश्विक व्यापार के अडानी के प्रवेश द्वार निकलस।<ref name="gujarati"/>
1985 में ऊ छोट पैमाना पर उद्योगन खातिर प्राथमिक बहुलक के आयात शुरू कइलें 1988 में अडानी अडानी समूह के होल्डिंग कंपनी अडानी एक्सपोर्ट्स के स्थापना कइलें, जेकरा के अब अडानी इंटरप्राइजेज के नाँव से जानल जाला। मूल रूप से ई कंपनी कृषि आ बिजली के चीज सभ के कारोबार करत रहे।<ref name="gujarati"/>
1991 में आर्थिक उदारीकरण के नीति सभ उनके कंपनी खातिर अनुकूल निकलल आ ऊ बिजनेस सभ के बिस्तार धातु, कपड़ा आ कृषि उत्पाद सभ के बिजनेस में करे लगलें।<ref name="gujarati"/><ref>{{cite news |last1=Vora |first1=Rutam |title=Gautam Adani: Cementing his portfolio |url=https://www.thehindubusinessline.com/specials/corporate-file/gautam-adani-cementing-his-portfolio/article65439045.ece |access-date=23 May 2022 |work=www.thehindubusinessline.com |date=22 May 2022 |language=en}}</ref>
1994 में गुजरात सरकार मुंद्रा बंदरगाह के प्रबंधकीय आउटसोर्सिंग के घोषणा कइलस आ 1995 में अडानी के ई ठेका मिल गइल।<ref>{{cite news|url=https://timesofindia.indiatimes.com/news/Gautam-Adani-the-baron-to-watch-out-for-if-Narendra-Modi-becomes-king/articleshow/33521536.cms|title=Gautam Adani, the baron to watch out for if Narendra Modi becomes king|date=2014-04-10|work=[[The Times of India]]|first=Harit|last=Mehta|access-date=16 April 2022}}</ref>
1995 में उ पहिला जेटी के स्थापना कइले। मूल रूप से मुंद्रा पोर्ट एंड स्पेशल इकोनॉमिक जोन के ओर से संचालित इ संचालन अडानी पोर्ट्स एंड सेज (एपीएसईजेड) के हस्तांतरित क दिहल गइल। आज इ कंपनी सबसे बड़ निजी बहु बंदरगाह संचालक बा। मुंद्रा बंदरगाह भारत के सभसे बड़ निजी क्षेत्र के बंदरगाह बाटे, एकर क्षमता सालाना लगभग 21 करोड़ टन माल ढुलाई करे के क्षमता बाटे।<ref>{{Cite web|last=Manoj|first=P.|title=APSEZ set to become top container port operator|url=https://www.thehindubusinessline.com/economy/logistics/apsez-set-to-become-top-container-port-operator/article9801005.ece|access-date=2021-03-11|website=@businessline| date=3 August 2017 |language=en}}</ref><ref>{{cite news|title=Adani becomes first Indian port operator to record 200 MT cargo movement|work=The Economic Times|url=https://economictimes.indiatimes.com/industry/transportation/shipping-/-transport/adani-becomes-first-indian-port-operator-to-record-200-mt-cargo-movement/articleshow/68592301.cms?from=mdr|access-date=2021-03-11}}</ref>
1996 में अडानी समूह के पावर बिजनेस शाखा अडानी पावर के स्थापना अडानी कइले रहले। अडानी पावर के लगे 4620 मेगावाट के क्षमता वाला थर्मल पावर प्लांट बाड़ें, ई देश के सभसे बड़ निजी थर्मल पावर उत्पादक कंपनी हवे।<ref>{{cite news|url=https://economictimes.indiatimes.com/industry/energy/power/abb-links-648-mw-solar-project-at-kamuthi-with-national-grid/articleshow/52728908.cms|title=Adani Solar Project|date=2016-06-13|publisher=economictimes.com}}</ref>
2006 में अडानी बिजली उत्पादन के कारोबार में उतरले। साल 2009 से 2012 ले ऊ ऑस्ट्रेलिया के एबट प्वाइंट पोर्ट आ क्वींसलैंड के कारमाइकल कोयला खदान के अधिग्रहण कइलें।<ref>{{cite news|url=https://www.outlookbusiness.com/specials/the-boss/gautam-adani-1237|title=Gautam Adani, chairman Adani group|date=2015-07-10|publisher=outlookbusiness.com|access-date=2022-06-24|archive-date=2021-03-07|archive-url=https://web.archive.org/web/20210307025714/https://outlookbusiness.com/specials/the-boss/gautam-adani-1237|url-status=dead}}</ref>
मई 2020 में अडानी भारत के सौर ऊर्जा निगम (एसईसीआई) के ओर से 6 अरब अमेरिकी डॉलर के दुनिया के सबसे बड़ सौर बोली जीतले रहे। 8000 मेगावाट के फोटोवोल्टिक बिजली संयंत्र परियोजना के अडानी ग्रीन ले लीहें; अडानी सोलर 2000 मेगावाट के अतिरिक्त सोलर सेल आ मॉड्यूल निर्माण क्षमता के स्थापना करी।<ref>{{cite news|last=Reporter|first=S. I.|date=2020-06-09|title=Adani Green hits new high on winning world's largest solar bid worth $7 bn|work=Business Standard India|url=https://www.business-standard.com/article/markets/adani-green-hits-new-high-stock-zooms-127-in-three-months-120060900281_1.html|access-date=2020-06-10}}</ref><ref>{{Cite web|date=2020-06-09|title=Adani wins world's largest solar project; to invest Rs 45,000 crore|url=https://www.financialexpress.com/industry/adani-wins-worlds-largest-solar-project-to-invest-rs-45000-crore/1986420/|access-date=2020-06-10|website=The Financial Express|language=en-US}}</ref>
सितंबर 2020 में अडानी मुंबई अंतर्राष्ट्रीय हवाई अड्डा में 74% हिस्सेदारी हासिल कइलें, ई दिल्ली के बाद भारत के दुसरा सभसे व्यस्त हवाई अड्डा हवे।<ref>{{Cite web|last=Karmali|first=Naazneen|title=India's 10 Richest Billionaires 2021|url=https://www.forbes.com/sites/naazneenkarmali/2021/04/06/indias-10-richest-billionaires-2021/|access-date=2021-07-01|website=Forbes|language=en}}</ref>
फरवरी 2022 में ऊ एशिया के सभसे धनी ब्यक्ति बनलें आ मुकेश अंबानी के पीछे छोड़ दिहलें।<ref name="forbes1">{{cite web |last=Pratap |first=Aayushi |date=3 February 2022 |title=Indian Billionaire Gautam Adani Becomes Asia's Richest Person |url=https://www.forbes.com/sites/aayushipratap/2022/02/03/indian-billionaire-gautam-adani-becomes-asias-richest-person/ |access-date=11 February 2022 |work=Forbes}}</ref>
मई 2022 में अडानी परिवार अम्बुजा सीमेंट्स आ ओकर सहायक कंपनी एसीसी के होल्सिम ग्रुप से 10.5 बिलियन डॉलर में खरीद लिहलस, एगो बिदेसी स्पेशल-पर्पस इकाई के माध्यम से।<ref>{{Cite web|url=https://timesofindia.indiatimes.com/business/india-business/adani-to-acquire-holcim-india-assets-for-10-5-bn/articleshow/91581073.cms|title=holcim: Adani to acquire Holcim India assets for $10.5 bn - Times of India|website=The Times of India}}</ref>
==निजी जिनगी==
गौतम अडानी के बियाह प्रीति से भइल बा, इनहन लोग के दू गो संतान बाड़ें।<ref>{{cite web|url=https://business.mapsofindia.com/business-leaders/gautam-adani.html|title=Gautam Adani |date=2015-06-02|website=mapsofindia.com}}</ref><ref>{{cite news|url=https://ahmedabadmirror.indiatimes.com/columns/the-informer/achtung-baby/articleshow/53066653.cms|title=Priti Adani| date=2016-07-07|website=Ahmedabad mirror}}</ref> ऊ जैन इंटरनेशनल ट्रेड ऑर्गेनाइजेशन (JITO) के सदस्य बाड़ें<ref>{{Cite web | url=https://mumbaimirror.indiatimes.com/mumbai/other/jains-to-organise-trade-fair/articleshow/15652322.cms | title=Jains to organise trade fair|work=Mumbai Mirror|date=10 November 2006|access-date=14 May 2022}}</ref> इनके अपहरण क के 1998 में फिरौती खातिर बंधक बना के रखल गइल, बाकी बिना पइसा लिहले रिहा क दिहल गइल।<ref>{{cite news |title=Throwback: When India's fifth richest man was kidnapped for ransom |url=https://www.timesnownews.com/business-economy/companies/article/throwback-when-indias-fifth-richest-man-survived-a-kidnapping-and-terrorist-attack/606122 |access-date=13 December 2020 |work=Times Now News |date=14 June 2020 |language= en }}</ref><ref>{{cite news |title=Two accused of abducting Gautam Adani 20 years ago acquitted |url=https://indianexpress.com/article/cities/ahmedabad/two-accused-of-abducting-gautam-adani-20-years-ago-acquitted-5473592/ |access-date=13 December 2020 |work=The Indian Express |date=1 December 2018 |location=Ahmedabad |language=en}}</ref> उ 2008 के मुंबई हमला के दौरान ताज होटल में रहले।<ref>{{cite news |last1=Sazonov |first2=Bhuma |last2=Shrivastava |first3=P R |last3=Sanjai |first1=Alexander |title=Billionaire Survivor of Ransom, Terror Attacks Now Rivals Ambani |url=https://www.bloomberg.com/news/articles/2020-12-13/billionaire-survivor-of-ransom-terror-attacks-now-rivals-ambani |access-date=13 December 2020 |work=Bloomberg.com |date=13 December 2020 |language=en}}</ref><ref>{{cite news |last1=Shukla |first1=Nimish |title=Gautam Adani felt safe in Taj toilet |url=https://timesofindia.indiatimes.com/Gautam-Adani-felt-safe-in-Taj-toilet/articleshow/3767246.cms |access-date=13 December 2020 |work=The Times of India |date=28 November 2008 |language=en}}</ref>
== बिबाद ==
=== स्टॉक में हेरफेर अउरी लेखा धोखाधड़ी के आरोप ===
जनवरी 2023 में न्यूयॉर्क शहर के [[हिंडेनबर्ग रिसर्च]] दू साल के जांच के निष्कर्ष प्रकाशित कइलस जेह में दावा कइल गइल कि अडानी बाजार में हेरफेर आ लेखा कदाचार में शामिल रहलें; हिंडेनबर्ग इहो खुलासा कइलस कि ऊ अडानी ग्रुप के कंपनी सभ पर शार्ट पोजीशन रखले बा।<ref>{{cite news |last1=Thomas |first1=Chris |last2=Kalra |first2=Aditya |title=Hindenburg shorts India's Adani citing debt, accounting concerns; shares plunge |url=https://www.reuters.com/markets/asia/hindenburg-says-holds-short-positions-indias-adani-flags-risks-2023-01-25/ |access-date=25 January 2023 |work=[[रायटर्स]] |date=25 January 2023 |language=en}}</ref><ref>{{cite news |last1=Sorkin |first1=Andrew Ross |last2=Mattu |first2=Ravi |last3=Warner |first3=Bernhard |last4=Kessler |first4=Sarah |last5=Merced |first5=Michael J. de la |last6=Hirsch |first6=Lauren |last7=Livni |first7=Ephrat |title=A Short Seller Takes Aim at an Indian Corporate Giant |url=https://www.nytimes.com/2023/01/25/business/dealbook/short-seller-hindenburg-adani.html |access-date=25 January 2023 |work=[[द न्यूयार्क टाइम्स]] |date=25 January 2023}}</ref><ref>{{cite news |last1=Lockett |first1=Hudson |title=Adani shares take $10.8bn hit after Hindenburg bets against group |url=https://www.ft.com/content/4aedaaf9-9ee8-4334-945c-12ac08429d6a |access-date=25 January 2023 |work=[[फ़ाइनान्शियल टाइम्स]] |date=25 January 2023}}</ref>आरोप के बाद अडानी से जुड़ल कंपनी सभ के बांड आ शेयर सभ के कीमत में गिरावट आइल आ क्रेडिट सुइस अडानी ग्रुप के बांड सभ के जमानत के रूप में स्वीकार कइल बंद क दिहलस।<ref>{{cite news |last1=Lee |first1=Jihye |title=Adani shares fall as short seller firm Hindenburg announces short position |url=https://www.cnbc.com/2023/01/25/adani-group-hindenburg-short-position.html |access-date=25 January 2023 |work=[[CNBC]] |date=25 January 2023 |language=en}}</ref><ref>{{cite news |last1=Kay |first1=Chris |last2=Vishnoi |first2=Abhishek |last3=Joshi |first3=Ashutosh |title=Hindenburg Targets Asia’s Richest Man, Triggering Adani Selloff |url=https://www.bloomberg.com/news/articles/2023-01-25/adani-group-stocks-drop-after-hindenburg-takes-short-position |access-date=25 January 2023 |work=[[Bloomberg News]] |date=25 January 2023 |language=en}}</ref><ref>https://www.npr.org/2023/02/02/1153420761/adani-group-hindenburg</ref> अडानी धोखाधड़ी के आरोप सभ के बेबुनियाद आ बुरा इरादा बता के इनकार कइलें आ इनहन के "दुर्भावनापूर्ण" आ "चयनात्मक गलत जानकारी" बतवलें।<ref name="madhok-2023">
{{cite news
| last1 = Madhok | first1 = Diksha
| title = Asia's richest man slams short-seller's fraud claims as 'baseless' and 'malicious'
| date = 25 January 2023
| language = en
| work = CNN Business
| location = Atlanta, Georgia, USA
| url = https://www.cnn.com/2023/01/25/business/india-adani-shares-plunge-hindenburg-report-hnk-intl/index.html
| access-date = 25 January 2023
}}
</ref><ref>{{Cite news |date=2023-01-26 |title=Adani Group: Asia's richest man hits back at 'con' allegations |language=en-GB |work=BBC News |url=https://www.bbc.com/news/business-64408720 |access-date=2023-01-28}}</ref> एकरे बाद रिपोर्ट के तीन दिन बाद अडानी द्वारा नियंत्रित सूचीबद्ध कंपनी सभ के शेयर सभ के बजार कीमत में 48 बिलियन डॉलर के नुकसान भइल।<ref>{{Cite web |title=Gautam Adani: One of the world's richest men loses ground after £39bn stock market slump |url=https://news.sky.com/story/gautam-adani-one-of-the-worlds-richest-men-loses-ground-after-39bn-stock-market-slump-12796545 |access-date=2023-01-28 |website=स्काई न्यूज |language=en}}</ref>
==फिलेंथ्रोपिस्ट के रूप में==
अडानी अडानी फाउंडेशन के अध्यक्ष बाड़े, जवना के फंडिंग अडानी ग्रुप के माध्यम से कईल जाला। एकर स्थापना 1996 में भइल।गुजरात के अलावा ई फाउंडेशन [[महाराष्ट्र]], [[राजस्थान]], हिमाचल प्रदेश, [[मध्य प्रदेश]], छत्तीसगढ़, आ ओडिशा राज्य सभ में काम करे ला।<ref>{{Cite web|title=Adani Foundation {{!}} Youth4work|url=https://www.university.youth4work.com/adani-foundation|access-date=2020-12-07|website=youth4work.com|language=en|archive-date=2022-03-31|archive-url=https://web.archive.org/web/20220331015615/https://www.university.youth4work.com/adani-foundation|url-status=dead}}</ref>
मार्च 2020 में, ऊ अपना समूह के परोपकार शाखा के माध्यम से पीएम केयर्स फंड में ₹100 करोड़ (13 मिलियन अमेरिकी डॉलर) के योगदान दिहलें, कोरोना वायरस के प्रकोप से लड़े खातिर।<ref>{{Cite web|url=https://www.indiatvnews.com/business/news-coronavirus-gautam-adani-donation-rs-1000-crore-pm-fund-602679|title=Gautam Adani gives Rs 100 crore to PM Fund to fight coronavirus|last=Joshi|first=Manas|date=2020-03-29|website=www.indiatvnews.com|language=en|access-date=2020-04-01}}</ref> गुजरात सीएम राहत कोष में ₹5 करोड़ (660,000 अमेरिकी डॉलर) आ महाराष्ट्र सीएम राहत कोष में ₹1 करोड़ (130,000 अमेरिकी डॉलर) के योगदान दिहल गइल।<ref>{{cite news|url=https://economictimes.indiatimes.com/news/company/corporate-trends/billionaire-gautam-adani-commits-to-support-fight-against-coronavirus/articleshow/74983932.cms|title=Billionaire Gautam Adani commits to support fight against coronavirus|date=2020-04-04|work=The Economic Times|access-date=2020-04-10}}</ref>
अडानी के नेतृत्व में विविध समूह अडानी समूह सऊदी अरब के दम्माम से गुजरात के मुंड्रा में 80 मीट्रिक टन तरल मेडिकल ऑक्सीजन से भरल चार आईएसओ क्रायोजेनिक टैंक के आयात कईलस। संगही, इ समूह लिंडे सऊदी अरब से 5000 मेडिकल ग्रेड के ऑक्सीजन सिलेंडर भी हासिल कइले बिया। एगो ट्विटर पोस्ट में अडानी साझा कइले कि, उनुकर समूह गुजरात के कच्छ जिला में जहां-जहां जरूरत बा, उहाँ हरेक दिन उनुकर ग्रुप 1500 सिलेंडर के मेडिकल ऑक्सीजन के सप्लाई करता।<ref>{{Cite web|last=My Nation|title=To improve oxygen availability, Adani group imports cryogenic tanks from Saudi Arabia|url=https://www.mynation.com/india-news/to-improve-oxygen-availability-adani-group-imports-cryogenic-tanks-from-saudi-arabia-qs47sk|url-status=live|access-date=2021-05-11|website=Asianet News Network Pvt Ltd|language=en}}</ref>
== संदर्भ ==
{{Reflist|33em}}
[[श्रेणी:जियत लोग]]
[[श्रेणी:1964 में जनम]]
[[श्रेणी:भारतीय बिजनेसमैन]]
goxbt1sv92u9ke4lvdmj8siqadyvg8o
राशि
0
89089
801914
788995
2026-07-25T10:30:53Z
SM7
3953
सुधार कइल गइल
801914
wikitext
text/x-wiki
[[पच्छिमी ज्योतिष]] में '''राशि सभ''' [[राशि चक्र]] के 30 डिग्री के बारह गो खंड भा सेक्टर सभ के नाँव हईं, जे पृथिवी के चारों ओर सूर्य के भ्रमण (जइसन कि ई पृथिवी से आकास में देखलाई पड़े ला) के रस्ता भा क्रांतिवृत्त (एलिप्टिक) पर 360 डिग्री के कक्षा बनावे लें। राशि सभ के गिनती बसंत के पहिला दिन से होला, जेकरा के [[मेष राशि]] के पहिला बिंदु के नाँव से जानल जाला, जवन वसंत विषुव हवे। राशि मेष, वृषभ राशि, मिथुन राशि, कर्क राशि, सिंह राशि, कन्या राशि, तुला राशि, वृश्चिक राशि, धनु राशि, मकर राशि, कुंभ राशि, आ मीन राशि बाड़ीं।
पच्छिमी राशि आधारित सिस्टम के उत्पत्ती बेबिलोनी ज्योतिष से भइल, आ बाद में हेलेनिस्टिक संस्कृति से प्रभावित भइल। हर राशि के नाँव एगो नक्षत्र के नाँव पर रखल गइल जेकरा से सूरज सालाना आसमान पार करत समय गुजरत रहे। सरलीकृत आ लोकप्रिय सूर्य राशि ज्योतिष में एह अवलोकन पर जोर दिहल गइल। सदियन के समय के दौरान, पृथिवी के अक्षीय प्रीसेसन के कारण, पाश्चात्य ज्योतिष के राशि सभ ओह नक्षत्र सभ के संरेखण से बाहर हो गइल बाड़ें जिनहन के आधार पर इनहन के नाँव रखल गइल रहल<ref>Bobrick (2005), pp. 10, 23.</ref> जबकि [[हिंदू ज्योतिष]] के नापजोख एह बदलाव खातिर सही बा काहें कि भारतीय सिस्टम में अयन चलन खातिर सुधार कइल जाला।<ref>Johnsen (2004).</ref> ज्योतिष (अर्थात आकाशीय रूप पर आधारित ओमिना के सिस्टम) के बिकास चीनी आ तिब्बती संस्कृति सभ में भी भइल बाकी ई राशिचक्र पर आधारित ना होलें बलुक पूरा आकाश से संबंधित बाड़ें।
[[फलित ज्योतिष]] (एस्ट्रोलॉजी) एगो छद्म बिज्ञान ह।<ref>{{Cite encyclopedia|title=Science and Pseudo-Science|url=http://plato.stanford.edu/entries/pseudo-science/|encyclopedia=Stanford Encyclopedia of Philosophy|accessdate=6 July 2012|quote=There is widespread agreement for instance that creationism, astrology, homeopathy, Kirlian photography, dowsing, ufology, ancient astronaut theory, Holocaust denialism, Velikovskian catastrophism, and climate change denialism are pseudosciences.}}</ref> सैद्धांतिक आधार के वैज्ञानिक जांच आ दावा के प्रयोगात्मक सत्यापन <ref name="Carlson">{{Cite journal|last=Carlson|first=Shawn|year=1985|title=A double-blind test of astrology|url=http://muller.lbl.gov/papers/Astrology-Carlson.pdf|journal=Nature|volume=318|issue=6045|pages=419–425|bibcode=1985Natur.318..419C|doi=10.1038/318419a0}}</ref> से पता चलल बा कि एकर कवनो वैज्ञानिक वैधता भा व्याख्यात्मक शक्ति नइखे। व्यक्तित्व के लक्षण आ जन्म के महीना के बीच के प्रतीत होखे वाला सहसंबंध के अउरी व्यावहारिक व्याख्या मौजूद बा, जइसे कि मनुष्य में मौसमी जन्म के प्रभाव।
[[फलित ज्योतिष|ज्योतिष]] के अनुसार, आकाशीय घटना सभ के संबंध " ऊपर के रूप में, एतना नीचे " के सिद्धांत पर मानव गतिविधि से होला, जेवना से चिन्ह सभ के अभिव्यक्ति के बिसेसता वाला तरीका सभ के प्रतिनिधित्व करे वाला मानल जाला। <ref>Mayo (1979), p. 35.</ref> वैज्ञानिक खगोल बिज्ञान में 19वीं सदी ले ग्रहन के रस्ता भा क्रांतिवृत्त (एलिप्टिक) के ओही सेक्टर सभ के इस्तेमाल भइल जे पच्छिमी ज्योतिष में कइल गइल।
== पश्चिमी राशि चक्र सिस्टम ==
=== इतिहास ===
[[चित्र:Sign_cusps.png|right|thumb|264x264px| बारह गो राशि। हर बिंदु कौनों चिन्ह के सुरुआत के निशान हवे आ इनहन के 30° अलग कइल जाला। आकाशीय भूमध्य रेखा आ ग्रहण के चौराहा विषुव बिंदु सभ के परिभाषित करे ला: मेष राशि के पहिला बिंदु ([[चित्र:Aries.svg|11x11px]]) आ तुला राशि के पहिला बिंदु ([[चित्र:Libra.svg|11x11px]]). आकाशीय ध्रुव आ ग्रहण ध्रुव (P आ P') वाला महान घेरा, ग्रहण के 0° कैंसर ([[चित्र:Cancer.svg|11x11px]]) आ 0° मकर राशि ([[चित्र:Capricorn.svg|12x12px]]). एह चित्रण में सूर्य के योजनाबद्ध रूप से कुंभ राशि ([[चित्र:Aquarius.svg|11x11px]])में स्थित देखावल गइल बाटे।]]
पाश्चात्य ज्योतिष हेलेनिस्टिक ज्योतिष के सीधा निरंतरता हवे जे 2वीं सदी में टोलेमी के टेट्राबिब्लोस में दर्ज बा। बदले में हेलेनिस्टिक ज्योतिष कुछ हद तक बेबिलोन के परंपरा के अवधारणा पर आधारित रहल। खास तौर पर, ग्रह सभ के भ्रमण के रस्ता (क्रांति पथ) के बारह गो बराबर क्षेत्र में बिभाजन एगो बेबिलोन के अवधारणागत निर्माण हवे। <ref>Sachs (1948), p. 289. Isolated references to celestial "signs" in Sumerian sources are insufficient to speak of a Sumerian zodiac, see Rochberg (1998), p. ''ix''.</ref> क्रांति पथ के ई बिभाजन बेबिलोन के "आदर्श कैलेंडर" से पैदा भइल जे पुरान संक्षिप्त एमयूएल में पावल जाला। बेबिलोन के [[चंद्रमा आधारित कैलेंडर|चंद्र कैलेंडर]] के साथ एकर संयोजन, एपीआईएन.एमयूएल में "चंद्रमा के रास्ता" के रूप में देखावल गइल। एक तरह से राशि चक्र एगो आदर्श चंद्र कैलेंडर के आदर्शीकरण हवे।
नीचे दिहल सारणी में बारह गो ज्योतिषीय राशि सभ के अनुमानित तिथि के साथे-साथ हर राशि के शास्त्रीय<ref name="Rulerships">{{Cite web|url=http://astrologynow.com/rulerships.htm|title=Rulerships|last=Carol Wills|year=2007|website=astrologynow.com|access-date=2007-11-29|archive-date=2020-10-28|archive-url=https://web.archive.org/web/20201028113657/http://astrologynow.com/rulerships.htm|url-status=dead}}</ref> आ आधुनिक<ref>Hone (1978), p. 21.</ref> शासन भी देखावल गइल बा। परिभाषा के हिसाब से मेष राशि के शुरुआत मेष राशि के पहिला बिंदु से होला जवन मार्च के विषुव पर सूर्य के लोकेशन से परिभाषित होखे ला। विषुव के सटीक तिथि साल दर साल अलग-अलग होला बाकी हमेशा 19 मार्च से 21 मार्च के बीच होला। एकर नतीजा मेष राशि के शुरू होखे के तारीख होखेला अउरी एहीसे बाकी सभ राशि के शुरुआत के तारीख में साल दर साल तनिका बदलाव हो सकता। निम्नलिखित पाश्चात्य ज्योतिष तालिका में आकाशीय देशांतर के बारह गो बिभाजन सभ के लैटिन नाँव सभ के साथ गिनल गइल बा। देशांतर भा रेखांश के अंतराल, के पहिला अंत बिंदु भा पात ( ''a'' ) खातिर बंद आ दूसरा ( ''b'' ) खातिर खुला मानल जाला – उदाहरण खातिर, देशांतर के 30° वृषभ राशि के पहिला बिंदु हवे, मेष राशि के हिस्सा ना हवे। खगोलीय रचना सभ में चिन्ह सभ के जगह कबो-कबो चिन्ह सभ के नंबर 0 से 11 ले दिहल जाला।
{| class="mw-datatable sortable mw-collapsible wikitable" style="text-align:center"
|+
! scope="col" |राशि
! scope="col" |[[:en:Gloss (annotation)|ग्लौस]]
! scope="col" |चीन्हा
! scope="col" |युनिकोड कैरेक्टर
! scope="col" |मोटामोटी सुरुज राशि के तारीख
! scope="col" |क्रांति रेखांश<br />(''a'' ≤ {{math|''λ''}} < ''b'')
! scope="col" |घर (भाव)
! scope="col" |पोलारिटी
! scope="col" |मोडालिटी
! scope="col" |ट्रिप्लिसिटी
! scope="col" |उत्तरी गोलार्ध के [[सीजन]]
! scope="col" |दक्खिनी गोलार्ध के [[सीजन]]
! scope="col" |आधुनिक स्वामी
! scope="col" |परंपरागत स्वामी
|-
! scope="row" |[[मेष राशि|मेष]] (Aries)
|भेड़ा भा बकरा
|[[चित्र:Aries_symbol_(fixed_width).svg|20x20px]]
|♈︎
|[[मार्च]] 21 – अप्रैल 19
|0° to 30°
|1
|Positive
|Cardinal
|Fire
|Spring
|Autumn
| colspan="2" |मंगल
|-
! scope="row" |[[वृषभ राशि|वृषभ]] (Taurus)
|बैल
|[[चित्र:Taurus_symbol_(fixed_width).svg|20x20px]]
|♉︎
|[[अप्रैल]] 20 – मई 20
|30° to 60°
|2
|Negative
|Fixed
|Earth
|Spring
|Autumn
| colspan="2" |शुक्र
|-
! scope="row" |[[मिथुन राशि|मिथुन]] (Gemini)
|जोड़ा
|[[चित्र:Gemini_symbol_(fixed_width).svg|20x20px]]
|♊︎
|[[मई]] 21 – जून 21
|60° to 90°
|3
|Positive
|Mutable
|Air
|Spring
|Autumn
| colspan="2" |बुध
|-
! scope="row" |कर्क (Cancer)
|खेखड़ा
|[[चित्र:Cancer_symbol_(fixed_width).svg|20x20px]]
|♋︎
|[[जून]] 22 – जुलाई 22
|90° to 120°
|4
|Negative
|Cardinal
|Water
|Summer
|Winter
| colspan="2" |चंद्र
|-
! scope="row" |[[सिंह राशि|सिंह]] (Leo)
|[[सिंह]] (बब्बर शेर)
|[[चित्र:Leo_symbol_(fixed_width).svg|20x20px]]
|♌︎
|[[जुलाई]] 23 – अगस्त 22
|120° to 150°
|5
|Positive
|Fixed
|Fire
|Summer
|Winter
| colspan="2" |सूर्य
|-
! scope="row" |[[कन्या राशि|कन्या]] (Virgo)
|कन्या (लड़िकी)
|[[चित्र:Virgo_symbol_(fixed_width).svg|20x20px]]
|♍︎
|[[अगस्त]] 23 – सितंबर 22
|150° to 180°
|6
|Negative
|Mutable
|Earth
|Summer
|Winter
| colspan="2" |बुध
|-
! scope="row" |[[तुला राशि|तुला]] (Libra)
|तरजूई (तराजू)
|[[चित्र:Libra_symbol_(fixed_width).svg|20x20px]]
|♎︎
|[[सितंबर]] 23 – अक्टूबर 22
|180° to 210°
|7
|Positive
|Cardinal
|Air
|Autumn
|Spring
| colspan="2" |शुक्र
|-
! scope="row" |[[वृश्चिक राशि|वृश्चिक]] (Scorpio)
|बिच्छी
|[[चित्र:Scorpius_symbol_(fixed_width).svg|20x20px]]
|♏︎
|[[अक्टूबर]] 23 – नवंबर 22
|210° to 240°
|8
|Negative
|Fixed
|Water
|Autumn
|Spring
|प्लूटो (भा)
|मंगल
|-
! scope="row" |[[धनु राशि|धनु]] (Sagittarius)
|धेनुहीं लिहले सेंटॉर
|[[चित्र:Sagittarius_symbol_(fixed_width).svg|20x20px]]
|♐︎
|[[नवंबर]] 23 – दिसंबर 21
|240° to 270°
|9
|Positive
|Mutable
|Fire
|Autumn
|Spring
| colspan="2" |बृहस्पति
|-
! scope="row" |[[मकर राशि|मकर]] (Capricorn)
|[[बकरी]]
|[[चित्र:Capricornus_symbol_(fixed_width).svg|20x20px]] [[चित्र:Capricornus symbol (European, fixed width).svg|20x20px]]
|♑︎
|[[दिसंबर]] 22 – जनवरी 19
|270° to 300°
|10
|Negative
|Cardinal
|Earth
|Winter
|Summer
| colspan="2" |शनि
|-
! scope="row" |[[कुंभ राशि|कुंभ]] (Aquarius)
|घड़िला भा पानी भरे वाला
|[[चित्र:Aquarius_symbol_(fixed_width).svg|20x20px]]
|♒︎
|[[जनवरी]] 20 – फरवरी 18
|300° to 330°
|11
|Positive
|Fixed
|Air
|Winter
|Summer
|यूरेनस
|शनि
|-
! scope="row" |[[मीन राशि|मीन]] (Pisces)
|[[मछरी]]
|[[चित्र:Pisces_symbol_(fixed_width).svg|20x20px]]
|♓︎
|[[फरवरी]] 19 – मार्च 20
|330° to 360°
|12
|Negative
|Mutable
|Water
|Winter
|Summer
|नेपच्यून
|बृहस्पति
|-
|}
बारह गो चिन्ह सभ के गोलाकार पैटर्न में रखल जाला, जेह से अलग-अलग दार्शनिक रूप से ध्रुवीकृत गुण सभ से संबंधित बिरोध सभ के पैटर्न बने ला। आमतौर पर पच्छिमी ज्योतिष में आग आ हवा के तत्व सभ के बिपरीत 180 डिग्री होला आ साथ ही साथ पृथिवी आ पानी के तत्व सभ के बिपरीत भी। <ref>{{Cite web|url=http://www.dichesegnosei.it/opposizione|title=Opposition|website=dichesegnosei.it|language=it}}</ref> ज्योतिष के सभ सिस्टम सभ में चार गो तत्व ना होलें, खासतौर पर सेफर येत्जिरा में कौनों केंद्रीय ईश्वरीय स्रोत से निकले वाला खाली तीन गो तत्व सभ के वर्णन कइल गइल बा। <ref>{{Cite web|url=http://www.workofthechariot.com/TextFiles/Translations-SeferYetzirah.html|title=WoC :: Sefer Yetzirah|website=www.workofthechariot.com|access-date=2023-01-20}}</ref> बसंत के चिन्ह शरद ऋतु के चिन्ह के विपरीत होला, जाड़ा के चिन्ह गर्मी के चिन्ह के विपरीत होला आ एही तरीका से एक दुसरे के उल्टा इनहन के ब्यवस्था होखे ला। <ref>{{Cite web|url=http://www.dichesegnosei.it/elementi/2994-aria|title=The element of Air|website=dichesegnosei.it|language=it}}</ref><ref>{{Cite web|url=http://www.dichesegnosei.it/elementi/2992-fuoco|title=The element of Fire|website=dichesegnosei.it|language=it}}</ref><ref>{{Cite web|url=http://www.dichesegnosei.it/elementi/2993-acqua|title=The element of Water|website=dichesegnosei.it|language=it}}</ref><ref>{{Cite web|url=http://www.dichesegnosei.it/elementi/2995-terra|title=The element of Earth|website=dichesegnosei.it|language=it}}</ref>
== भारतीय ज्योतिष ==
भारतीय ज्योतिष में पांच तत्व बतावल गइल बाड़ें: आग, पृथिवी (जमीन), हवा, पानी, आ आकाश (व्योम चाहे ईथर)। आग के स्वामी मंगल हवे जबकि बुध जमीन के, शनि हवा के, शुक्र पानी के अउरी बृहस्पति ईथर के स्वामी हवे।
ज्योतिष में बारह गो राशि के मान्यता दिहल जाला,<ref>Sutton (1999) pp. 74–92.</ref> जे पाश्चात्य ज्योतिष में मिले वाला राशि से मेल खाला। तत्वन से संबंध के मामिला में दुनों सिस्टम एके जइसन बाड़ें।
<div style="overflow:auto">
{| class="wikitable"
!अंग्रेजी
! [[संस्कृत]]<ref name="Dalal2010">{{cite book|last=Dalal|first=Roshen|title=Hinduism: An Alphabetical Guide|url=https://books.google.com/books?id=DH0vmD8ghdMC&pg=PA89|year=2010|publisher=Penguin Books India|isbn=978-0-14-341421-6|page=89}}</ref>
! शुरू
! निरूपन
! तत्व
! गुण
! स्वामी
|-
|[[मेष राशि|एरिस]]
|{{lang-sa|मेष|{{IAST|meṣa}}|label=none}}
| 0°
| ram
| [[Agni|fire]]
| movable (chara)
| [[मंगल]]
|-
|[[वृषभ राशि|टारस]]
|{{lang-sa|वृषभ|{{IAST|vṛṣabha}}|label=none}}
| 30°
| bull
| [[Prithivi|earth]]
| fixed (sthira)
| [[Venus]]
|-
|[[मिथुन राशि|जेमिनी]]
|{{lang-sa|मिथुन|{{IAST|mithuna}}|label=none}}
| 60°
| twins
| [[Vayu|air]]
| dual (dvisvabhava)
| [[Mercury (planet)|Mercury]]
|-
|[[कर्क राशि|कैंसर]]
|{{lang-sa|कर्क|{{IAST|karka}}|label=none}}
|90°
| crab
| [[Jala (water)|water]]
| movable
| [[चंद्रमा]]
|-
|[[सिंह राशि|लियो]]
|{{lang-sa|सिंह|{{IAST|siṃha}}|label=none}}
| 120°
| lion
| fire
| fixed
| [[सुरुज]]
|-
|[[कन्या राशि|वर्गों]]
|{{lang-sa|कन्या|{{IAST|kanyā}}|label=none}}
| 150°
| virgin girl
| earth
| dual
| Mercury
|-
|[[तुला राशि|लिब्रा]]
|{{lang-sa|तुला|{{IAST|tulā}}|label=none}}
|180°
| balance
| air
| movable
| शुक्र
|-
|[[वृश्चिक राशि|स्कोर्पियो]]
|{{lang-sa|वृश्चिक|{{IAST|vṛścika}}|label=none}}
| 210°
| scorpion
| water
| fixed
| Mars
|-
|[[धनु राशि|सैजीटारस]]
|{{lang-sa|धनुष|{{IAST|dhanuṣa}}|label=none}}
| 240°
| bow and arrow
| fire
| dual
| [[बृहस्पति]]
|-
|[[मकर राशि|कैप्रिकोर्न]]
|{{lang-sa|मकर|{{IAST|makara}}|label=none}}
| 270°
| crocodile
| earth
| movable
| [[शनि]]
|-
|[[कुंभ राशि|एक्वेरियस]]
|{{lang-sa|कुम्भ|{{IAST|khumba}}|label=none}}
| 300°
| water-bearer
| air
| fixed
| शनि
|-
|[[मीन राशि|पिसीज]]
|{{lang-sa|मीन|{{IAST|mīna}}|label=none}}
| 330°
| fishes
| water
| dual
| बृहस्पति
|}</div>
=== नक्षत्र ===
'''नक्षत्र''' या '''चंद्र मंडल''' के रूपक में आकाश के 27 गो बिभाजन सभ में से एगो हवे जेकर पहिचान प्रमुख तारा (तारक सभ) द्वारा कइल गइल बा।, जइसन कि हिंदू खगोलबिद्या आ ज्योतिष में इस्तेमाल होला।<ref>Sutton (1999), p. 168.</ref> संस्कृत, कन्नड़, तुलू आ तमिल आ प्राकृत में भी "नक्षत्र", एह तरीका से खुद तारा सभ के संदर्भ देला।
== चीनी राशि के चीन्हा ==
[[श्रेणी:ज्योतिष]]
shaypebvp4fmwmg9d57bf8ghaciqplp
अमेरिकी वीजा
0
97812
801911
778072
2026-07-25T03:22:26Z
InternetArchiveBot
25596
Rescuing 1 sources and tagging 0 as dead.) #IABot (v2.0.9.5
801911
wikitext
text/x-wiki
[[File:USA-wiza-anonymous.jpg|link=https://en.wikipedia.org/wiki/File:USA-wiza-anonymous.jpg|thumb|यूएस लिंकन के वीजा के नमूना बा]]
'''अमेरिकी वीजा''' अइसन दस्तावेज ह जे अमेरिका (संयुक्त राज्य अमेरिका) में यात्रा करे, बसे, या काम करे खातिर जरूरी होला। अमेरिकी वीजा एगो सरकारी दस्तावेज हऽ, जवन विदेशी नागरिक के अमेरिका में प्रवेश करे के अनुमति देला। ई वीजा अमेरिका के दूतावास (Embassy) या काउंसलेट (Consulate) से मिलेला।
== किसिम ==
अमेरिकी वीजा मुख्य रूप से दू किसिम के होला:
# इमिग्रेंट वीजा (Immigrant Visa) – ई वीजा ऊ लोग खातिर होला जे अमेरिका में स्थायी रूप से रहे के चाहेला।
# नॉन-इमिग्रेंट वीजा (Non-Immigrant Visa) – ई वीजा ऊ लोग खातिर होला जे अमेरिका में अस्थायी रूप से यात्रा, पढ़ाई, इलाज, या काम खातिर जाला।
=== इमिग्रेंट वीजा ===
इमिग्रेंट वीजा मिलला के बाद व्यक्ति अमेरिका में ग्रीन कार्ड (Green Card) ले सकेला आ स्थायी रूप से रहे सकेला। कुछ प्रमुख इमिग्रेंट वीजा के प्रकार नीचे दिहल गइल बा:
* परिवार आधारित वीजा (Family-Sponsored Visa) – अगर अमेरिका में परिवार के सदस्य (पति-पत्नी, माता-पिता, संतान) पहिले से रहत बा, तऽ ऊ अमेरिका में बुला सकेला।
* रोजगार आधारित वीजा (Employment-Based Visa) – अगर कौनों अमेरिकी कंपनी कौनों विदेशी नागरिक के नौकरी देवे, तऽ ऊ अमेरिका में स्थायी रूप से जा सकेला।
* डायवर्सिटी वीजा (Diversity Visa - DV Lottery) – अमेरिका हर साल कुछ देशन के लोग खातिर वीजा के लॉटरी निकालेला, जेकरा से ऊ लोग अमेरिका में स्थायी रूप से बस सकेला।
=== नॉन-इमिग्रेंट वीजा ===
अगर कौनों व्यक्ति अस्थायी रूप से अमेरिका जाए चाहेला, तऽ ऊ नॉन-इमिग्रेंट वीजा ले सकेला। नीचे कुछ प्रमुख नॉन-इमिग्रेंट वीजा दिहल गइल बा:
* B1/B2 वीजा (Business/Tourist Visa) - व्यापार या पर्यटन खातिर अमेरिका जाए वाला लोग खातिर होला।
* F1 वीजा (Student Visa) - अमेरिका में पढ़ाई करे वाला छात्र लोग खातिर होला।
* H1B वीजा (Work Visa) - अमेरिका में कौनों विशेष काम (जइसे: इंजीनियर, डॉक्टर, सॉफ्टवेयर डेवलपर) करे वाला लोग खातिर होला।
* J1 वीजा (Exchange Visitor Visa) - रिसर्चर, प्रोफेसर, आ सांस्कृतिक आदान-प्रदान प्रोग्राम में हिस्सा लेवे वाला लोग खातिर होला।
== आवेदन प्रक्रिया ==
अमेरिकी वीजा लेवे खातिर निम्नलिखित प्रक्रिया के पालन करे के पड़ेला:
# DS-160 फॉर्म भरल जाव - ई ऑनलाइन आवेदन फॉर्म हऽ, जे अमेरिका के दूतावास के वेबसाइट पर भरल जाला।
# वीजा फीस जमा कइल जाव - आवेदन प्रक्रिया शुरू करे से पहिले निश्चित शुल्क (Fee) जमा करे के पड़ेला।
# अपॉइंटमेंट बुकिंग - अमेरिका के दूतावास या वाणिज्य दूतावास में साक्षात्कार (Interview) खातिर समय लेवे के पड़ेला।
# साक्षात्कार (Interview) देवल जाव - दूतावास में वीजा अधिकारी से मुलाकात होई, जहाँ आवेदक से यात्रा के मकसद, आर्थिक स्थिति, आ ओहिजा से वापसी के योजना के बारे में पूछल जाई।
# वीजा जारी कइल जाव - अगर आवेदन स्वीकृत हो गइल, तऽ पासपोर्ट पर वीजा लगाके वापस दे देहल जाला।
== जरूरी दस्तावेज ==
अमेरिकी वीजा लेवे खातिर कुछ जरूरी दस्तावेज चाहीं:
* पासपोर्ट (Validity कम से कम 6 महीना होखे के चाहीं)
* DS-160 आवेदन फॉर्म के प्रिंटआउट
* वीजा शुल्क के भुगतान रसीद
* पासपोर्ट साइज फोटो
* यात्रा से जुड़ल दस्तावेज (जइसे: होटल बुकिंग, टिकट, निमंत्रण पत्र)
* बैंक स्टेटमेंट (आर्थिक स्थिति के प्रमाण)
* अन्य सहायक दस्तावेज (कोर्स एडमिशन लेटर, नौकरी के पत्र, इत्यादि)
== वीजा रिजेक्ट होखे के कारण ==
कई कारण से अमेरिकी वीजा अस्वीकृत हो सकेला:
* गलत या अधूरा जानकारी
* कमजोर आर्थिक स्थिति
* गलत नीयत (Immigration Intent)
* पूर्व के यात्रा रिकॉर्ड खराब होखल
* अपर्याप्त दस्तावेज
अमेरिकी वीजा पावे के प्रक्रिया लंबा हो सकेला, बाकिर सही जानकारी आ तैयारी से वीजा पावल आसान हो सकेला। अमेरिका में जाए से पहिले सब दस्तावेज ठीक से तैयार करे के चाहीं आ आवेदन प्रक्रिया के सही से पालन करे के चाहीं।
== इहो देखल जाय ==
* [[अमेरिकी नागरिकता]]
* [[अमेरिकी नागरिकता कानून]]
* [[गोल्डन वीजा]]
== बाहरी कड़ी ==
* [https://travel.state.gov U.S. Department of State – Bureau of Consular Affairs, "Visas for the United States." ] {{Webarchive|url=https://web.archive.org/web/20140113144742/https://travel.state.gov/ |date=2014-01-13 }}
* [https://www.uscis.gov United States Citizenship and Immigration Services (USCIS), "Visa Types and Information."]
* [https://in.usembassy.gov U.S. Embassy and Consulates in India, "Visa Information."]
[[श्रेणी:यूनाइटेड स्टेट्स ऑफ अमेरिका]]
{{US-stub}}
l9ieemspv363cikhdzzn0tkkgdwiznp
जेन ज़ी
0
100407
801714
790020
2026-07-24T12:47:15Z
SM7
3953
सुधार कइल गइल
801714
wikitext
text/x-wiki
[[चित्र:Generation timeline simple.svg|240px|thumb|सोशल जेनरेशन के देखलावत चित्र]]
'''जेन ज़ी''' ({{Langx|en|Gen Z}}) भा पूरा नाँव '''जेनरेशन ज़ी''' (Generation Z),{{efn|अमेरिकी अंग्रेजी में अक्षर Z (ज़ेड) के उच्चारण 'ज़ी' {{IPAc-en|'|z|iː|audio=LL-Q1860 (eng)-Flame, not lame-Z.wav}} होखे<ref name="y617">{{cite web | title=Z definition and meaning | website=Collins English Dictionary | date=19 March 2026 | url=https://www.collinsdictionary.com/dictionary/english/z | access-date=25 March 2026}}</ref> के चलते। [[बीबीसी हिंदी]] पर एगो लेख में<ref name="d882">{{cite web | title=नेपाल में 'जेन ज़ी' अपने देश को अब कौन सी राह पर ले जाएंगे?- दुनिया जहान | website=BBC News हिंदी | date=27 October 2025 | url=https://www.bbc.com/hindi/articles/cd7r8ze4q1jo | language=hi | access-date=25 March 2026}}</ref> एकर देवनागरी हिज्जे देखल जा सकत बाटे।}} जेकरा के छोट में आ अनौपचारिक रूप से '''ज़ूमर्स''' (Zoomers) भी कहल जाला, एगो जनसंख्या समूह ([[डेमोग्राफिक कोहार्ट]]) हवे, जवन [[अमेरिका]] में 1990 के दशक के आखिर आ 2000 के शुरुआती सालन में जनम लेवे वाला लोग खातिर इस्तेमाल कइल जाला।<ref name="h518"> [[ब्रिटैनिका एन्साइक्लोपीडिया]] के हिसाब से कुछ स्रोत 1997 से 2012 के बीच के समय के बतावेलन, बाकिर ई साल कब शुरू आ कब खत्म होखे, एह पर कई बेर बहस भी होखेला, काहेकि पीढ़ी आ उनकर समय–भावना (zeitgeist) के साफ-साफ सीमा तय कइल मुश्किल होला।<ref name="h518">{{cite web | last=Eldridge | first=Alison | title=Years, Age Range, Meaning, & Characteristics | website=Encyclopedia Britannica | date=21 March 2026 | url=https://www.britannica.com/topic/Generation-Z | access-date=25 March 2026}}</ref> एकरा पहिले के पीढ़ी के ''मिलेनियल्स'' भा ''जेनरेशन वाई'' कहल जाला आ एकरे बाद आगे आवे वाली पीढ़ी ''जेनरेशन अल्फा'' कहाला। जेन ज़ी के अधिकतर लोग ''जेनेरेशन एक्स'' के संतान हवे, आ ई अनुमान लगावल जाला कि आगे चल के एही पीढ़ी के कई लोग ''जेनेरेशन बीटा'' के माता-पिता बनिहें।
2000 के दशक के बीच आ आखिर में, आ 2010 के दशक में लरिकाईं के दौरान, जेन ज़ी पहिला अइसन सामाजिक पीढ़ी बाटे, जवन वेब2.0 आ डिजिटल टेक्नोलॉजी के साथे शुरू से पलल-बढ़ल। छोटे उमिर से ई लोग [[ऑनलाइन वीडियो]] आ [[वेब सीरीज़]] (अक्सर [[यूट्यूब]] पर) देखत रहल बाटे, आ [[ऑनलाइन गेम]] खेलत रहल बाटे। 2010 आ 2020 के दशक में जब ई लोग किशोर (adolescents) आ जवान भइल, त एह पीढ़ी के “डिजिटल नेटिव्स़” कहल गइल। हालाँकि, एकर हरदमेसा ई मतलब ना बाटे कि ई जेन जी लोग डिजिटल रूप से पूरा तरह निपुण (डिजिटली लिटरेट) बा, आ कई बेर डिजिटल भा वर्चुअल काम के माहौल में एह लोगन के दिक्कत भी हो सकेला।
== नोट ==
{{notelist}}
== संदर्भ ==
{{Reflist|29em}}
[[श्रेणी:समाजशास्त्र]]
[[श्रेणी:अमेरिकी समाज]]
5lcpfor3svnlebvsb27b0ww8evv2113
801715
801714
2026-07-24T13:05:13Z
SM7
3953
+विकिकड़ी जोड़ल गइल
801715
wikitext
text/x-wiki
[[चित्र:Generation timeline simple.svg|240px|thumb|सोशल जेनरेशन के देखलावत चित्र]]
'''जेन ज़ी''' ({{Langx|en|Gen Z}}) भा पूरा नाँव '''जेनरेशन ज़ी''' (Generation Z),{{efn|अमेरिकी अंग्रेजी में अक्षर Z (ज़ेड) के उच्चारण 'ज़ी' {{IPAc-en|'|z|iː|audio=LL-Q1860 (eng)-Flame, not lame-Z.wav}} होखे<ref name="y617">{{cite web | title=Z definition and meaning | website=Collins English Dictionary | date=19 March 2026 | url=https://www.collinsdictionary.com/dictionary/english/z | access-date=25 March 2026}}</ref> के चलते। [[बीबीसी हिंदी]] पर एगो लेख में<ref name="d882">{{cite web | title=नेपाल में 'जेन ज़ी' अपने देश को अब कौन सी राह पर ले जाएंगे?- दुनिया जहान | website=BBC News हिंदी | date=27 October 2025 | url=https://www.bbc.com/hindi/articles/cd7r8ze4q1jo | language=hi | access-date=25 March 2026}}</ref> एकर देवनागरी हिज्जे देखल जा सकत बाटे।}} जेकरा के छोट में आ अनौपचारिक रूप से '''ज़ूमर्स''' (Zoomers) भी कहल जाला, एगो जनसंख्या समूह ([[डेमोग्राफिक कोहार्ट]]) हवे, जवन [[अमेरिका]] में 1990 के दशक के आखिर आ 2000 के शुरुआती सालन में जनम लेवे वाला लोग खातिर इस्तेमाल कइल जाला।<ref name="h518"> [[ब्रिटैनिका एन्साइक्लोपीडिया]] के हिसाब से कुछ स्रोत 1997 से 2012 के बीच के समय के बतावेलन, बाकिर ई साल कब शुरू आ कब खत्म होखे, एह पर कई बेर बहस भी होखेला, काहेकि पीढ़ी आ उनकर समय–भावना (zeitgeist) के साफ-साफ सीमा तय कइल मुश्किल होला।<ref name="h518">{{cite web | last=Eldridge | first=Alison | title=Years, Age Range, Meaning, & Characteristics | website=Encyclopedia Britannica | date=21 March 2026 | url=https://www.britannica.com/topic/Generation-Z | access-date=25 March 2026}}</ref> एकरा पहिले के पीढ़ी के ''मिलेनियल्स'' भा ''जेनरेशन वाई'' कहल जाला आ एकरे बाद आगे आवे वाली पीढ़ी ''[[जेनरेशन अल्फा]]'' कहाला। जेन ज़ी के अधिकतर लोग ''[[जेनेरेशन एक्स]]'' के संतान हवे, आ ई अनुमान लगावल जाला कि आगे चल के एही पीढ़ी के कई लोग ''जेनेरेशन बीटा'' के माता-पिता बनिहें।
2000 के दशक के बीच आ आखिर में, आ 2010 के दशक में लरिकाईं के दौरान, जेन ज़ी पहिला अइसन सामाजिक पीढ़ी बाटे, जवन वेब2.0 आ डिजिटल टेक्नोलॉजी के साथे शुरू से पलल-बढ़ल। छोटे उमिर से ई लोग [[ऑनलाइन वीडियो]] आ [[वेब सीरीज़]] (अक्सर [[यूट्यूब]] पर) देखत रहल बाटे, आ [[ऑनलाइन गेम]] खेलत रहल बाटे। 2010 आ 2020 के दशक में जब ई लोग किशोर (adolescents) आ जवान भइल, त एह पीढ़ी के “डिजिटल नेटिव्स़” कहल गइल। हालाँकि, एकर हरदमेसा ई मतलब ना बाटे कि ई जेन जी लोग डिजिटल रूप से पूरा तरह निपुण (डिजिटली लिटरेट) बा, आ कई बेर डिजिटल भा वर्चुअल काम के माहौल में एह लोगन के दिक्कत भी हो सकेला।
== नोट ==
{{notelist}}
== संदर्भ ==
{{Reflist|29em}}
[[श्रेणी:समाजशास्त्र]]
[[श्रेणी:अमेरिकी समाज]]
7hebpmpvmnfauy01m4kxywuse8kc1vq
विकिपीडिया:आँकड़ा सभ/२०२६/जुलाई
4
101100
801722
801710
2026-07-24T19:21:33Z
NeechalBOT
7874
statistics
801722
wikitext
text/x-wiki
<!--- stats starts--->{{प्रयोगकर्ता:Neechalkaran/statnotice}}{| class="wikitable sortable" style="width:90%"
|-
! Date(Time)
! Pages
! Articles
! Edits
! Users
! Files
! Activeusers
{{User:Neechalkaran/template/daily
|Date =१-७-२०२६
|Pages = 81892
|dPages = 4
|Articles = 9097
|dArticles = 0
|Edits = 795873
|dEdits = 9
|Files = 54
|dFiles = 0
|Users = 40208
|dUsers = 5
|Ausers = 57
|dAusers = -4
}}
{{User:Neechalkaran/template/daily
|Date =२-७-२०२६
|Pages = 81895
|dPages = 3
|Articles = 9097
|dArticles = 0
|Edits = 795882
|dEdits = 9
|Files = 54
|dFiles = 0
|Users = 40218
|dUsers = 10
|Ausers = 57
|dAusers = 0
}}
{{User:Neechalkaran/template/daily
|Date =३-७-२०२६
|Pages = 81895
|dPages = 0
|Articles = 9097
|dArticles = 0
|Edits = 795890
|dEdits = 8
|Files = 54
|dFiles = 0
|Users = 40227
|dUsers = 9
|Ausers = 57
|dAusers = 0
}}
{{User:Neechalkaran/template/daily
|Date =४-७-२०२६
|Pages = 81895
|dPages = 0
|Articles = 9096
|dArticles = -1
|Edits = 795904
|dEdits = 14
|Files = 54
|dFiles = 0
|Users = 40231
|dUsers = 4
|Ausers = 59
|dAusers = 2
}}
{{User:Neechalkaran/template/daily
|Date =५-७-२०२६
|Pages = 81902
|dPages = 7
|Articles = 9098
|dArticles = 2
|Edits = 795944
|dEdits = 40
|Files = 54
|dFiles = 0
|Users = 40236
|dUsers = 5
|Ausers = 59
|dAusers = 0
}}
{{User:Neechalkaran/template/daily
|Date =६-७-२०२६
|Pages = 81907
|dPages = 5
|Articles = 9101
|dArticles = 3
|Edits = 796019
|dEdits = 75
|Files = 54
|dFiles = 0
|Users = 40240
|dUsers = 4
|Ausers = 59
|dAusers = 0
}}
{{User:Neechalkaran/template/daily
|Date =७-७-२०२६
|Pages = 81916
|dPages = 9
|Articles = 9103
|dArticles = 2
|Edits = 796069
|dEdits = 50
|Files = 54
|dFiles = 0
|Users = 40248
|dUsers = 8
|Ausers = 63
|dAusers = 4
}}
{{User:Neechalkaran/template/daily
|Date =८-७-२०२६
|Pages = 81920
|dPages = 4
|Articles = 9104
|dArticles = 1
|Edits = 796087
|dEdits = 18
|Files = 54
|dFiles = 0
|Users = 40255
|dUsers = 7
|Ausers = 63
|dAusers = 0
}}
{{User:Neechalkaran/template/daily
|Date =९-७-२०२६
|Pages = 81925
|dPages = 5
|Articles = 9106
|dArticles = 2
|Edits = 796126
|dEdits = 39
|Files = 54
|dFiles = 0
|Users = 40261
|dUsers = 6
|Ausers = 63
|dAusers = 0
}}
{{User:Neechalkaran/template/daily
|Date =१०-७-२०२६
|Pages = 81928
|dPages = 3
|Articles = 9109
|dArticles = 3
|Edits = 796172
|dEdits = 46
|Files = 54
|dFiles = 0
|Users = 40265
|dUsers = 4
|Ausers = 64
|dAusers = 1
}}
{{User:Neechalkaran/template/daily
|Date =११-७-२०२६
|Pages = 81931
|dPages = 3
|Articles = 9109
|dArticles = 0
|Edits = 796343
|dEdits = 171
|Files = 54
|dFiles = 0
|Users = 40270
|dUsers = 5
|Ausers = 64
|dAusers = 0
}}
{{User:Neechalkaran/template/daily
|Date =१२-७-२०२६
|Pages = 81937
|dPages = 6
|Articles = 9112
|dArticles = 3
|Edits = 796450
|dEdits = 107
|Files = 54
|dFiles = 0
|Users = 40277
|dUsers = 7
|Ausers = 64
|dAusers = 0
}}
{{User:Neechalkaran/template/daily
|Date =१३-७-२०२६
|Pages = 81962
|dPages = 25
|Articles = 9118
|dArticles = 6
|Edits = 796848
|dEdits = 398
|Files = 54
|dFiles = 0
|Users = 40283
|dUsers = 6
|Ausers = 66
|dAusers = 2
}}
{{User:Neechalkaran/template/daily
|Date =१४-७-२०२६
|Pages = 81963
|dPages = 1
|Articles = 9118
|dArticles = 0
|Edits = 796951
|dEdits = 103
|Files = 54
|dFiles = 0
|Users = 40292
|dUsers = 9
|Ausers = 66
|dAusers = 0
}}
{{User:Neechalkaran/template/daily
|Date =१५-७-२०२६
|Pages = 81966
|dPages = 3
|Articles = 9119
|dArticles = 1
|Edits = 796982
|dEdits = 31
|Files = 54
|dFiles = 0
|Users = 40295
|dUsers = 3
|Ausers = 66
|dAusers = 0
}}
{{User:Neechalkaran/template/daily
|Date =१६-७-२०२६
|Pages = 81976
|dPages = 10
|Articles = 9121
|dArticles = 2
|Edits = 797197
|dEdits = 215
|Files = 54
|dFiles = 0
|Users = 40297
|dUsers = 2
|Ausers = 66
|dAusers = 0
}}
{{User:Neechalkaran/template/daily
|Date =१७-७-२०२६
|Pages = 81994
|dPages = 18
|Articles = 9126
|dArticles = 5
|Edits = 797326
|dEdits = 129
|Files = 54
|dFiles = 0
|Users = 40301
|dUsers = 4
|Ausers = 66
|dAusers = 0
}}
{{User:Neechalkaran/template/daily
|Date =१८-७-२०२६
|Pages = 82002
|dPages = 8
|Articles = 9128
|dArticles = 2
|Edits = 797384
|dEdits = 58
|Files = 54
|dFiles = 0
|Users = 40305
|dUsers = 4
|Ausers = 66
|dAusers = 0
}}
{{User:Neechalkaran/template/daily
|Date =१९-७-२०२६
|Pages = 82011
|dPages = 9
|Articles = 9129
|dArticles = 1
|Edits = 797820
|dEdits = 436
|Files = 54
|dFiles = 0
|Users = 40309
|dUsers = 4
|Ausers = 45
|dAusers = -21
}}
{{User:Neechalkaran/template/daily
|Date =२०-७-२०२६
|Pages = 82025
|dPages = 14
|Articles = 9132
|dArticles = 3
|Edits = 798488
|dEdits = 668
|Files = 54
|dFiles = 0
|Users = 40310
|dUsers = 1
|Ausers = 45
|dAusers = 0
}}
{{User:Neechalkaran/template/daily
|Date =२१-७-२०२६
|Pages = 82026
|dPages = 1
|Articles = 9133
|dArticles = 1
|Edits = 798514
|dEdits = 26
|Files = 54
|dFiles = 0
|Users = 40315
|dUsers = 5
|Ausers = 45
|dAusers = 0
}}
{{User:Neechalkaran/template/daily
|Date =२२-७-२०२६
|Pages = 82037
|dPages = 11
|Articles = 9138
|dArticles = 5
|Edits = 798566
|dEdits = 52
|Files = 54
|dFiles = 0
|Users = 40323
|dUsers = 8
|Ausers = 44
|dAusers = -1
}}
{{User:Neechalkaran/template/daily
|Date =२३-७-२०२६
|Pages = 82053
|dPages = 16
|Articles = 9143
|dArticles = 5
|Edits = 798618
|dEdits = 52
|Files = 54
|dFiles = 0
|Users = 40326
|dUsers = 3
|Ausers = 44
|dAusers = 0
}}
{{User:Neechalkaran/template/daily
|Date =२४-७-२०२६
|Pages = 82054
|dPages = 1
|Articles = 9143
|dArticles = 0
|Edits = 798630
|dEdits = 12
|Files = 54
|dFiles = 0
|Users = 40330
|dUsers = 4
|Ausers = 44
|dAusers = 0
}}
<!---Place new stats here--->
|}
<!--- stats ends--->
5hgukjld2mycdos0xha7g57mvs3ucnr
सोनम वांगचुक
0
101181
801720
801600
2026-07-24T18:33:06Z
SM7
3953
एक ठो वाक्य आ संदर्भ जोड़ल गइल
801720
wikitext
text/x-wiki
{{Infobox person
| honorific_prefix =
| name = सोनम वांगचुक
| honorific_suffix =
| image = Sonam Wangchuk, 2017 (cropped).jpg
| image_size = <!-- DISCOURAGED per WP:IMGSIZE. Use image_upright. -->
| alt =
| caption = 2017 में वांगचुक
| native_name =
| native_name_lang =
| pronunciation =
| birth_date = {{birth date and age|df=yes|1966|09|01}}
| birth_place = [[आल्ची]], [[जम्मू अउरी काश्मीर (राज्य)|जम्मू अउरी काश्मीर]], भारत<br /> (अब [[लद्दाख]], भारत)
| other_names =
| education =
| alma_mater = [[नेशनल इंस्टीट्यूट ऑफ टेक्नोलॉजी, श्रीनगर|एनआइटी, श्रीनगर]] ([[बी.टेक.]])<br>CRAterre
| occupation = इंजीनियर, एजुकेटर
| years_active =
| era =
| employer =
| organization = [[स्टूडेंट्स एजुकेशनल एंड कल्चरल मूवमेंट ऑफ लद्दाख]]
| known_for = [[आइस स्तूपा]], [[स्टूडेंट्स एजुकेशनल एंड कल्चरल मूवमेंट ऑफ लद्दाख|SECMOL]], [[लद्दाख#मीडिया|लडाग मेलोंग]], [[ऑपरेशन न्यू होप]]
| notable_works = <!-- produces label "Notable work"; may be overridden by |credits=, which produces label "Notable credit(s)"; or by |works=, which produces label "Works" -->
| style =
| television =
| title =
| movement =
| boards =
| spouse = [[गीतांजलि जे. आंग्मो]]<ref name="BT">{{cite web | title=Innovator, national asset: Anand Mahindra on meeting real life ‘Phunsukh Wangdu’ | website=Business Today | date=7 April 2022 | url=https://www.businesstoday.in/trending/story/innovator-national-asset-anand-mahindra-on-meeting-real-life-phunsukh-wangdu-329073-2022-04-07 | access-date=30 September 2025}}</ref>
| partner = <!-- (unmarried long-term partner) -->
| children =
| parents = <!-- overrides mother and father parameters -->
| father = सोनम वांग्याल<!-- please be careful with this as there may be another person with the same name -->
| mother = सेरिंग वांग्मो
| family =
| awards = [[ग्लोबल अवार्ड फॉर सस्टेनेबल आर्किटेक्चर]] (2017)<ref name="fp1">{{cite news|last1=Rana|first1=Nikita|title=World Environment Day 2017: Sonam Wangchuk's ice stupas ensure there's water in Ladakh|url=http://www.firstpost.com/living/world-environment-day-2017-sonam-wangchuks-ice-stupas-ensure-theres-water-in-ladakh-3504143.html|publisher=[[फर्स्टपोस्ट]]|date=2 June 2017}}</ref><br />फ़्रेड एम, पैकार्ड अवार्ड (2016) <ref>{{Cite web|url=https://www.iucn.org/commissions/world-commission-protected-areas/about/awards/fred-packard-award-outstanding-service/packard-awardees|title=Packard Awardees|date=10 June 2020|website=IUCN|access-date=15 July 2026|archive-date=18 February 2020|archive-url=https://web.archive.org/web/20200218045608/https://www.iucn.org/commissions/world-commission-protected-areas/about/awards/fred-packard-award-outstanding-service/packard-awardees|url-status=dead}}</ref> <br />रोलेक्स अवार्ड फॉर एंटरप्राइज (2016)<ref name="ht1"/><br />रियल हीरोज अवार्ड (2008)<br />अशोका फेलोशिप फॉर एंटरप्रेन्योरशिप (2002)<ref name="Hindu List"/><br />[[रैमोन मैग्सेसे अवार्ड]] (2018)<ref name="ashoka"/>
| website = {{URL|www.secmol.org}}
}}
'''सोनम वांगचुक''' ({{Langx|en|Sonam Wangchuk}}; जनम: 1 सितंबर 1966) भारतीय इंजीनियर,<ref>{{Cite web |title=Rolex Partnerships - The engineer helping Himalayan farmers by creating artificial glaciers |url=https://www.rolex.org/partnerships/el-pais-semanal/sonam-wangchuk |archive-url=https://web.archive.org/web/20251216151011/https://www.rolex.org/partnerships/el-pais-semanal/sonam-wangchuk |archive-date=2025-12-16 |access-date=2026-06-30 |website=rolex.org |language=en |url-status=live }}</ref><ref>{{Cite web |title=Event information |url=https://www.nobelprize.org/events/nobel-week-dialogue/stockholm-2018/panellists/sonam-wangchuk/ |access-date=2026-06-30 |website=NobelPrize.org |language=en-US}}</ref><ref>{{Cite web |title=Extraordinary Indians: Sonam Wangchuk's Mission to Reimagine Schools, Water, and Work in the Himalayas |url=https://www.readersdigest.in/features/story-extraordinary-indians-sonam-wangchuks-mission-to-reimagine-schools-water-and-work-in-the-himalayas-128088 |access-date=2026-06-30 |website=www.readersdigest.in}}</ref> सामाजिक कार्यकर्ता (एक्टिविस्ट), नवप्रवर्तक (इनोवेटर), शिक्षा सुधारक आ पर्यावरणविद् बाड़ें।<ref name="Bio">{{cite web | last=Varghese | first=Shiny | title=The green drive: Indian wins Rolex Award for philanthropic work | website=The Indian Express | date=17 November 2016 | url=https://indianexpress.com/article/india/india-news-india/the-green-drive-4379400/ | access-date=30 September 2025}}</ref> ऊ स्टूडेंट्स एजुकेशनल एंड कल्चरल मूवमेंट ऑफ लद्दाख (SECMOL) के संस्थापक-निदेशक बाड़ें। एह संस्था के स्थापना 1988 में कुछ अइसन छात्रन द्वारा कइल गइल रहे, जे सोनम वांगचुक के अनुसार, लद्दाख पर थोपल गइल शिक्षा व्यवस्था के पीड़ित रहलें। सोनम वांगचुक SECMOL कैंपस के डिजाइन करे खातिर भी प्रसिद्ध बाड़ें। ई पूरा कैंपस खाली भर [[सौर ऊर्जा]] पर चलेला आ एहमें खाना बनावे, रोशनी आ गरमाहट खातिर जीवाश्म ईंधन ([[फॉसिल फ्यूल]]) के तनिको इस्तमाल ना कइल जाला।
सोनम वांगचुक के 1994 में शुरू भइल ''ऑपरेशन न्यू होप'' के शुरुआत में महत्वपूर्ण भूमिका रहल। ई सरकार, गाँव के समुदाय आ नागरिक समाज के साझा पहल रहे, जेकर मकसद सरकारी इस्कूलन के शिक्षा बेवस्था में सुधार कइल रहे। वांगचुक चेवांग नोरफेल द्वारा बनावल गइल कृत्रिम हिमनद (आर्टिफिशियल ग्लेशियर) से प्रेरित भइलें। बाद में ऊ एकर आपन खुद के तरीका बिकसित कइलें, जे ''आइस स्तूपा'' टेकनीक के नाँव से जानल जाला। एह टेकनीक में जाड़ा के पानी के शंकु आकार के बर्फ के ढेर के रूप में जमा कइल जाला, ताकि बाद में, गर्मी के दिनन में जरूरत पड़ला पर ओकर इस्तमाल हो सके।<ref>{{Cite web |date=2024-06-13 |title=The Ice Man of Ladakh building artificial glaciers in the Himalayas |url=https://www.bbc.com/future/article/20240612-the-ice-man-of-ladakh-building-artificial-glaciers-in-the-himalayas |access-date=2026-07-14 |website=www.bbc.com |language=en-GB}}</ref>
सोनम वांगचुक [[लद्दाख]] के शिक्षा क्षेत्र, [[जलवायु]] से जुड़ल चुनौती आ लोकल समस्या सभ के इनोवेटिव समाधान खातिर ब्यापक रूप से सम्मानित भइल बाड़ें। 2025 तक उनकरा के करीबन 15 गो पुरस्कार आ अवार्ड मिल चुकल बाड़ें। एहमें [[रैमन मैग्सेसे अवार्ड]] (2018), आईआईटी मंडी द्वारा दिहल गइल हिमालयी क्षेत्र के विशिष्ट प्रौद्योगिकीविद् (2018) के सम्मान, आ [[ग्लोबल अवॉर्ड फॉर सस्टेनेबल आर्किटेक्चर]] (2017) शामिल बाड़ें।<ref name="Details">{{cite web | last=Masood | first=Bashaarat | title=Innovator to ‘provocateur’, Wangchuk’s equation with Delhi changed over 3 decades | website=The Indian Express | date=27 September 2025 | url=https://indianexpress.com/article/political-pulse/innovator-to-provocateur-wangchuks-equation-with-delhi-changed-over-3-decades-10273868/ | access-date=30 September 2025}}</ref>
सोनम वांगचुक मई 2026 में [[कॉकरोच जनता पार्टी]] के गठन के बाद एह आंदोलन के समर्थन में आगे अइलें। एह पार्टी के गठन भारत के तत्कालीन मुख्य न्यायाधीश सूर्यकांत द्वारा बेरोजगार युवा कार्यकर्ता सभ के "कॉकरोच" से तुलना करे संबंधी टिप्पणी के बाद भइल रहे। वांगचुक अपना के "मानद कॉकरोच" बतावत एह आंदोलन के समर्थन कइलें। वांगचुक [[नई दिल्ली]] के [[जंतर मंतर, दिल्ली|जंतर मंतर]] पर कॉकरोच जनता पार्टी द्वारा आयोजित कइल गइल प्रदर्शन में प्रमुख रूप से शामिल रहलें। एह प्रदर्शन में 2026 के नीट के पेपर लीक होखे आ सीबीएसई के ऑन-स्क्रीन मूल्यांकन में कथित अनियमितता के मुद्दा पर धर्मेंद्र प्रधान से केंद्रीय शिक्षा मंत्री के पद से इस्तीफा देवे के माँग कइल गइल। 28 जून से वांगचुक ऑल इंडिया स्टूडेंट्स एसोसिएशन (AISA) के छह छात्रन के साथे अनिश्चितकालीन भूख हड़ताल शुरू कइलें जे जुलाई में भी जारी बाटे। एह दौरान कई मीडिया सेलिब्रिटी, फ़िल्मी हस्ती आ राजनीतिक नेता लोग उनुके समर्थन में आइल।<ref>{{cite web |title='ये लड़ाई चुनी हुई सरकार की जवाबदेही के लिए है': सोनम वांगचुक के समर्थन में कौन-कौन सेलिब्रिटी आया |url=https://www.bbc.com/hindi/articles/cp9l909pp21o |website=BBC News हिंदी |access-date=15 जुलाई 2026 |language=hi |date=14 जुलाई 2026}}</ref> शनीचर, 18 जुलाई के पुलिस वांगचुक के जबरन ले जा के [[सफ़दरजंग अस्पताल]] में भर्ती करा दिहलस।<ref>{{cite news |title=सोनम वांगचुक: भूख हड़ताल पर बैठे शख़्स को क्या जबरन हटाया जा सकता है? क्या कहते हैं कोर्ट के फ़ैसले |url=https://www.bbc.com/hindi/articles/cn8nyvp7epko |access-date=19 जुलाई 2026 |work=BBC News हिंदी |date=18 जुलाई 2026 |language=hi}}</ref> सरकार के बातचीत आ सस्म्या सुल्झावे के आश्वासन के बाद बियफे, 23 जुलाई के, 26 दिन के बाद ऊ आपन अनशन खतम कइलन।<ref>{{cite news |title=सोनम वांगचुक के उपवास तोड़ने को कैसे देखा जा रहा है, अब आंदोलन का क्या होगा? |url=https://www.bbc.com/hindi/articles/cvgxe29m897o |access-date=24 जुलाई 2026 |work=BBC News हिंदी |date=24 जुलाई 2026 |language=hi}}</ref>
== सुरुआती जिनगी ==
सोनम वांगचुक के जनम 1966 में भारत के तत्कालीन [[जम्मू अउरी काश्मीर]] राज्य (अब [[लद्दाख |लद्दाख केंद्र शासित प्रदेश]]) के अलची गाँव के नगीचे, [[लेह जिला]] में भइल। उनकर पिता सोनम वांग्याल [[भारतीय राष्ट्रीय कांग्रेस]] के राजनेता रहलें, जबकि उनुकर माई के नाम सेरिंग वांगमो रहे। गाँवे में [[इस्कूल]] ना होखे के कारण वांगचुक के 9 बरिस के उमिर तक कौनो इस्कूल में दाखिला ना हो सकल। एह दौरान उनकर माई सेरिंग वांगमो अपना मातृभाषा में उनकर सुरुआती पढ़ाई-लिखाई करवली।
1975 में सोनम वांगचुक के पिता सोनम वांग्याल भारतीय राष्ट्रीय कांग्रेस के जम्मू-कश्मीर सरकार में चुनल गइलें आ मंत्री बनलें। 9 बरिस के उमिर में सोनम वांगचुक के [[श्रीनगर]] ले जाइल गइल आ ओहिजा के एगो इस्कूल में उनकर दाखिला करावल गइल। बाकी लड़िकन से अलग देखाई देवे आ लोकल भाषा ना समझे के कारण लोग उनकरा से अइसन भाषा में करे जे ऊ ना बूझ पावें। एह कारण उनकर चुप्पी के लोग गलती से कम बुद्धिमान होखे के निशानी मान लिहल। वांगचुक एह समय के अपना जीवन के सबसे कठिन दौर माने लें। एह किसिम के बेह्वार से से परेशान होके 1977 में ऊ अकेले दिल्ली भागि अइलें, उहँवा ऊ एगो केंद्रीय विद्यालय के प्रधानाचार्य से मिलके आपन समस्या बतवलें।
{{clear}}
== संदर्भ ==
{{Reflist|29em}}
== बाहरी कड़ी ==
* [https://www.secmol.org/ Official website]
*[https://www.gqindia.com/magazine-story/sonam-wangchuk-saving-world-one-ice-stupa-time/ Sonam Wangchuk is saving the world one ice stupa at a time], at ''GQ (Indian edition)''
*[http://www.newsnation.in/article/154990-watch-live-exclusive-meet-real-life-phunsukh-wangdu-of-3-idiots-sonam-wangchuk.html Sonam Wangchuk's Interview] at ''News Nation''
*[http://www.tedxgateway.com/portfolio/sonam-wangchuk/ Education in India: Are students failing or the system?] {{Webarchive|url=https://web.archive.org/web/20170621041605/http://www.tedxgateway.com/portfolio/sonam-wangchuk/ |date=2017-06-21 }} at ''TED talk''
[[श्रेणी:जियत लोग]]
[[श्रेणी:1966 में जनम]]
[[श्रेणी:लद्दाख]]
{{bio-stub}}
j3f0xi98ghwchc7k0r26k0arj9k0brk
801721
801720
2026-07-24T18:43:42Z
SM7
3953
संदर्भ जोड़ल/सुधारल गइल
801721
wikitext
text/x-wiki
{{Infobox person
| honorific_prefix =
| name = सोनम वांगचुक
| honorific_suffix =
| image = Sonam Wangchuk, 2017 (cropped).jpg
| image_size = <!-- DISCOURAGED per WP:IMGSIZE. Use image_upright. -->
| alt =
| caption = 2017 में वांगचुक
| native_name =
| native_name_lang =
| pronunciation =
| birth_date = {{birth date and age|df=yes|1966|09|01}}
| birth_place = [[आल्ची]], [[जम्मू अउरी काश्मीर (राज्य)|जम्मू अउरी काश्मीर]], भारत<br /> (अब [[लद्दाख]], भारत)
| other_names =
| education =
| alma_mater = [[नेशनल इंस्टीट्यूट ऑफ टेक्नोलॉजी, श्रीनगर|एनआइटी, श्रीनगर]] ([[बी.टेक.]])<br>CRAterre
| occupation = इंजीनियर, एजुकेटर
| years_active =
| era =
| employer =
| organization = [[स्टूडेंट्स एजुकेशनल एंड कल्चरल मूवमेंट ऑफ लद्दाख]]
| known_for = [[आइस स्तूपा]], [[स्टूडेंट्स एजुकेशनल एंड कल्चरल मूवमेंट ऑफ लद्दाख|SECMOL]], [[लद्दाख#मीडिया|लडाग मेलोंग]], [[ऑपरेशन न्यू होप]]
| notable_works = <!-- produces label "Notable work"; may be overridden by |credits=, which produces label "Notable credit(s)"; or by |works=, which produces label "Works" -->
| style =
| television =
| title =
| movement =
| boards =
| spouse = [[गीतांजलि जे. आंग्मो]]<ref name="BT">{{cite web | title=Innovator, national asset: Anand Mahindra on meeting real life ‘Phunsukh Wangdu’ | website=Business Today | date=7 April 2022 | url=https://www.businesstoday.in/trending/story/innovator-national-asset-anand-mahindra-on-meeting-real-life-phunsukh-wangdu-329073-2022-04-07 | access-date=30 September 2025}}</ref>
| partner = <!-- (unmarried long-term partner) -->
| children =
| parents = <!-- overrides mother and father parameters -->
| father = सोनम वांग्याल<!-- please be careful with this as there may be another person with the same name -->
| mother = सेरिंग वांग्मो
| family =
| awards = [[ग्लोबल अवार्ड फॉर सस्टेनेबल आर्किटेक्चर]] (2017)<ref name="fp1">{{cite news|last1=Rana|first1=Nikita|title=World Environment Day 2017: Sonam Wangchuk's ice stupas ensure there's water in Ladakh|url=http://www.firstpost.com/living/world-environment-day-2017-sonam-wangchuks-ice-stupas-ensure-theres-water-in-ladakh-3504143.html|publisher=[[फर्स्टपोस्ट]]|date=2 June 2017}}</ref><br />फ़्रेड एम, पैकार्ड अवार्ड (2016) <ref>{{Cite web|url=https://www.iucn.org/commissions/world-commission-protected-areas/about/awards/fred-packard-award-outstanding-service/packard-awardees|title=Packard Awardees|date=10 June 2020|website=IUCN|access-date=15 July 2026|archive-date=18 February 2020|archive-url=https://web.archive.org/web/20200218045608/https://www.iucn.org/commissions/world-commission-protected-areas/about/awards/fred-packard-award-outstanding-service/packard-awardees|url-status=dead}}</ref> <br />रोलेक्स अवार्ड फॉर एंटरप्राइज (2016)<ref name="ht1"/><br />रियल हीरोज अवार्ड (2008)<br />अशोका फेलोशिप फॉर एंटरप्रेन्योरशिप (2002)<ref name="Hindu List"/><br />[[रैमोन मैग्सेसे अवार्ड]] (2018)<ref name="ashoka"/>
| website = {{URL|www.secmol.org}}
}}
'''सोनम वांगचुक''' ({{Langx|en|Sonam Wangchuk}}; जनम: 1 सितंबर 1966) भारतीय इंजीनियर,<ref>{{Cite web |title=Rolex Partnerships - The engineer helping Himalayan farmers by creating artificial glaciers |url=https://www.rolex.org/partnerships/el-pais-semanal/sonam-wangchuk |archive-url=https://web.archive.org/web/20251216151011/https://www.rolex.org/partnerships/el-pais-semanal/sonam-wangchuk |archive-date=2025-12-16 |access-date=2026-06-30 |website=rolex.org |language=en |url-status=live }}</ref><ref>{{Cite web |title=Event information |url=https://www.nobelprize.org/events/nobel-week-dialogue/stockholm-2018/panellists/sonam-wangchuk/ |access-date=2026-06-30 |website=NobelPrize.org |language=en-US}}</ref><ref>{{Cite web |title=Extraordinary Indians: Sonam Wangchuk's Mission to Reimagine Schools, Water, and Work in the Himalayas |url=https://www.readersdigest.in/features/story-extraordinary-indians-sonam-wangchuks-mission-to-reimagine-schools-water-and-work-in-the-himalayas-128088 |access-date=2026-06-30 |website=www.readersdigest.in}}</ref> सामाजिक कार्यकर्ता (एक्टिविस्ट), नवप्रवर्तक (इनोवेटर), शिक्षा सुधारक आ पर्यावरणविद् बाड़ें।<ref name="Bio">{{cite web | last=Varghese | first=Shiny | title=The green drive: Indian wins Rolex Award for philanthropic work | website=The Indian Express | date=17 November 2016 | url=https://indianexpress.com/article/india/india-news-india/the-green-drive-4379400/ | access-date=30 September 2025}}</ref> ऊ स्टूडेंट्स एजुकेशनल एंड कल्चरल मूवमेंट ऑफ लद्दाख (SECMOL) के संस्थापक-निदेशक बाड़ें। एह संस्था के स्थापना 1988 में कुछ अइसन छात्रन द्वारा कइल गइल रहे, जे सोनम वांगचुक के अनुसार, लद्दाख पर थोपल गइल शिक्षा व्यवस्था के पीड़ित रहलें। सोनम वांगचुक SECMOL कैंपस के डिजाइन करे खातिर भी प्रसिद्ध बाड़ें। ई पूरा कैंपस खाली भर [[सौर ऊर्जा]] पर चलेला आ एहमें खाना बनावे, रोशनी आ गरमाहट खातिर जीवाश्म ईंधन ([[फॉसिल फ्यूल]]) के तनिको इस्तमाल ना कइल जाला।
सोनम वांगचुक के 1994 में शुरू भइल ''ऑपरेशन न्यू होप'' के शुरुआत में महत्वपूर्ण भूमिका रहल। ई सरकार, गाँव के समुदाय आ नागरिक समाज के साझा पहल रहे, जेकर मकसद सरकारी इस्कूलन के शिक्षा बेवस्था में सुधार कइल रहे। वांगचुक चेवांग नोरफेल द्वारा बनावल गइल कृत्रिम हिमनद (आर्टिफिशियल ग्लेशियर) से प्रेरित भइलें। बाद में ऊ एकर आपन खुद के तरीका बिकसित कइलें, जे ''आइस स्तूपा'' टेकनीक के नाँव से जानल जाला। एह टेकनीक में जाड़ा के पानी के शंकु आकार के बर्फ के ढेर के रूप में जमा कइल जाला, ताकि बाद में, गर्मी के दिनन में जरूरत पड़ला पर ओकर इस्तमाल हो सके।<ref>{{Cite web |date=2024-06-13 |title=The Ice Man of Ladakh building artificial glaciers in the Himalayas |url=https://www.bbc.com/future/article/20240612-the-ice-man-of-ladakh-building-artificial-glaciers-in-the-himalayas |access-date=2026-07-14 |website=www.bbc.com |language=en-GB}}</ref>
सोनम वांगचुक [[लद्दाख]] के शिक्षा क्षेत्र, [[जलवायु]] से जुड़ल चुनौती आ लोकल समस्या सभ के इनोवेटिव समाधान खातिर ब्यापक रूप से सम्मानित भइल बाड़ें। 2025 तक उनकरा के करीबन 15 गो पुरस्कार आ अवार्ड मिल चुकल बाड़ें। एहमें [[रैमन मैग्सेसे अवार्ड]] (2018), आईआईटी मंडी द्वारा दिहल गइल हिमालयी क्षेत्र के विशिष्ट प्रौद्योगिकीविद् (2018) के सम्मान, आ [[ग्लोबल अवॉर्ड फॉर सस्टेनेबल आर्किटेक्चर]] (2017) शामिल बाड़ें।<ref name="Details">{{cite web | last=Masood | first=Bashaarat | title=Innovator to ‘provocateur’, Wangchuk’s equation with Delhi changed over 3 decades | website=The Indian Express | date=27 September 2025 | url=https://indianexpress.com/article/political-pulse/innovator-to-provocateur-wangchuks-equation-with-delhi-changed-over-3-decades-10273868/ | access-date=30 September 2025}}</ref>
सोनम वांगचुक मई 2026 में [[कॉकरोच जनता पार्टी]] के गठन के बाद एह आंदोलन के समर्थन में आगे अइलें। एह पार्टी के गठन भारत के तत्कालीन मुख्य न्यायाधीश सूर्यकांत द्वारा बेरोजगार युवा कार्यकर्ता सभ के "कॉकरोच" से तुलना करे संबंधी टिप्पणी के बाद भइल रहे। वांगचुक अपना के "मानद कॉकरोच" बतावत एह आंदोलन के समर्थन कइलें। वांगचुक [[नई दिल्ली]] के [[जंतर मंतर, दिल्ली|जंतर मंतर]] पर कॉकरोच जनता पार्टी द्वारा आयोजित कइल गइल प्रदर्शन में प्रमुख रूप से शामिल रहलें। एह प्रदर्शन में 2026 के नीट के पेपर लीक होखे आ सीबीएसई के ऑन-स्क्रीन मूल्यांकन में कथित अनियमितता के मुद्दा पर धर्मेंद्र प्रधान से केंद्रीय शिक्षा मंत्री के पद से इस्तीफा देवे के माँग कइल गइल। 28 जून से वांगचुक ऑल इंडिया स्टूडेंट्स एसोसिएशन (AISA) के छह छात्रन के साथे अनिश्चितकालीन भूख हड़ताल शुरू कइलें जे जुलाई में भी जारी बाटे। एह दौरान कई मीडिया सेलिब्रिटी, फ़िल्मी हस्ती आ राजनीतिक नेता लोग उनुके समर्थन में आइल।<ref>{{cite web |title='ये लड़ाई चुनी हुई सरकार की जवाबदेही के लिए है': सोनम वांगचुक के समर्थन में कौन-कौन सेलिब्रिटी आया |url=https://www.bbc.com/hindi/articles/cp9l909pp21o |website=BBC News हिंदी |access-date=15 जुलाई 2026 |language=hi |date=14 जुलाई 2026}}</ref> शनीचर, 18 जुलाई के पुलिस वांगचुक के जबरन ले जा के [[सफ़दरजंग अस्पताल]] में भर्ती करा दिहलस।<ref>{{cite news |title=सोनम वांगचुक: भूख हड़ताल पर बैठे शख़्स को क्या जबरन हटाया जा सकता है? क्या कहते हैं कोर्ट के फ़ैसले |url=https://www.bbc.com/hindi/articles/cn8nyvp7epko |access-date=19 जुलाई 2026 |work=BBC News हिंदी |date=18 जुलाई 2026 |language=hi}}</ref> सरकार के बातचीत आ सस्म्या सुल्झावे के आश्वासन के बाद बियफे, 23 जुलाई के, 26 दिन के बाद ऊ आपन अनशन खतम कइलन।<ref>{{cite news |title=सोनम वांगचुक के उपवास तोड़ने को कैसे देखा जा रहा है, अब आंदोलन का क्या होगा? |url=https://www.bbc.com/hindi/articles/cvgxe29m897o |access-date=24 जुलाई 2026 |work=BBC News हिंदी |date=24 जुलाई 2026 |language=hi}}</ref><ref>{{cite news |title=कांग्रेस का वो सांसद, जिसने सोनम वांगचुक का अनशन तुड़वाने में की मोदी सरकार की सबसे बड़ी मदद |url=https://www.jansatta.com/national/congress-mp-vivek-tankha-who-helped-modi-govt-to-end-sonam-wangchuk-hunger-strike/4633027/ |access-date=24 जुलाई 2026 |work=[[जनसत्ता]] |date=24 जुलाई 2026 |language=hi}}</ref>
== सुरुआती जिनगी ==
सोनम वांगचुक के जनम 1966 में भारत के तत्कालीन [[जम्मू अउरी काश्मीर]] राज्य (अब [[लद्दाख |लद्दाख केंद्र शासित प्रदेश]]) के अलची गाँव के नगीचे, [[लेह जिला]] में भइल। उनकर पिता सोनम वांग्याल [[भारतीय राष्ट्रीय कांग्रेस]] के राजनेता रहलें, जबकि उनुकर माई के नाम सेरिंग वांगमो रहे। गाँवे में [[इस्कूल]] ना होखे के कारण वांगचुक के 9 बरिस के उमिर तक कौनो इस्कूल में दाखिला ना हो सकल। एह दौरान उनकर माई सेरिंग वांगमो अपना मातृभाषा में उनकर सुरुआती पढ़ाई-लिखाई करवली।
1975 में सोनम वांगचुक के पिता सोनम वांग्याल भारतीय राष्ट्रीय कांग्रेस के जम्मू-कश्मीर सरकार में चुनल गइलें आ मंत्री बनलें। 9 बरिस के उमिर में सोनम वांगचुक के [[श्रीनगर]] ले जाइल गइल आ ओहिजा के एगो इस्कूल में उनकर दाखिला करावल गइल। बाकी लड़िकन से अलग देखाई देवे आ लोकल भाषा ना समझे के कारण लोग उनकरा से अइसन भाषा में करे जे ऊ ना बूझ पावें। एह कारण उनकर चुप्पी के लोग गलती से कम बुद्धिमान होखे के निशानी मान लिहल। वांगचुक एह समय के अपना जीवन के सबसे कठिन दौर माने लें। एह किसिम के बेह्वार से से परेशान होके 1977 में ऊ अकेले दिल्ली भागि अइलें, उहँवा ऊ एगो केंद्रीय विद्यालय के प्रधानाचार्य से मिलके आपन समस्या बतवलें।
{{clear}}
== संदर्भ ==
{{Reflist|29em}}
== बाहरी कड़ी ==
* [https://www.secmol.org/ Official website]
*[https://www.gqindia.com/magazine-story/sonam-wangchuk-saving-world-one-ice-stupa-time/ Sonam Wangchuk is saving the world one ice stupa at a time], at ''GQ (Indian edition)''
*[http://www.newsnation.in/article/154990-watch-live-exclusive-meet-real-life-phunsukh-wangdu-of-3-idiots-sonam-wangchuk.html Sonam Wangchuk's Interview] at ''News Nation''
*[http://www.tedxgateway.com/portfolio/sonam-wangchuk/ Education in India: Are students failing or the system?] {{Webarchive|url=https://web.archive.org/web/20170621041605/http://www.tedxgateway.com/portfolio/sonam-wangchuk/ |date=2017-06-21 }} at ''TED talk''
[[श्रेणी:जियत लोग]]
[[श्रेणी:1966 में जनम]]
[[श्रेणी:लद्दाख]]
{{bio-stub}}
7w342lqk239ry5q73o5qorj2otp1xp8
प्रयोगकर्ता वार्ता:Uu3uu2us we
3
101273
801716
2026-07-24T14:05:30Z
नया सदस्य स्वागतकर्ता
6624
Adding [[Welcome|welcome message]] to new user's talk page
801716
wikitext
text/x-wiki
{| id="GeoPort-upper" width="100%" cellpadding="5" cellspacing="6" style="background:#FFFAFF; text-align: justify; border-style:ridge; border-width:1px; border-color:#A9A9A9;"
|-
|<div style="display:inline-block;margin-top:.1em; text-align:right; margin-bottom:.2em; border-bottom:0; font-weight:bold;"><big>Welcome! स्वागतम्!</big> [[File:Crystal Clear app ksmiletris.png|25px]] </div>
राउर बहुत-बहुत स्वागत बा '''{{BASEPAGENAME}}''' जी ! {{#if: | {{{1}}} | }}<br/>
<div style="float:right; <!--background:#F5F5DC;--> width:30%">
<!-- दाहिना साइडबार -->
{| border="5" cellspacing="10" cellpadding="5" height="50" align=center border=0 style="background: transparent"
|-
| <big>'''ई जरूर पढ़ल जाय:'''</big>
|-
| style="background-color:#FFFFFF; border: solid 2px #FFFFFF; padding:10px 20px;" | [[विकिपीडिया:विकिपीडिया का ना हवे|विकिपीडिया का ना हवे?]]
|-
| style="background-color:#FFFFFF; border: solid 2px #FFFFFF; padding:10px 20px;" | [[विकिपीडिया:भोजपुरी में कइसे टाइप करब?|भोजपुरी में टाइपिंग]]
|-
| style="background-color:#FFFFFF; border: solid 1px #FFFFFF; padding:10px 20px;" | [[विकिपीडिया:सत्यापन जोग|प्रमाणित बात लिखीं]]
|-
| style="background-color:#FFFFFF; border: solid 1px #FFFFFF; padding:10px 20px;" | [[मदद:फुटनोट|संदर्भ कइसे जोड़ीं?]]
|-
| style="background-color:#FFFFFF; border: solid 1px #FFFFFF; padding:10px 20px;" | [[विकिपीडिया:नीति अउरी दिसानिर्देस|विकिनीति आ निर्देश]]
|}</div>
<!-- मुख्य पाठ -->
'''{{#if: | {{{1}}} | {{BASEPAGENAME}} }} जी''',
एह समय रउँआ [[विकिमीडिया फाउन्डेशन]] के परियोजना [[भोजपुरी]] [[विकिपीडिया]] पर बाड़ीं। भोजपुरी विकिपीडिया एगो मुक्त डिजिटल [[ज्ञानकोश]] हवे, जेवन अइसन भइया-बहिनी लोग मिल के लिखले बा जे ज्ञान बाँटे में बिस्वास करत बाटे। एह समय ए परियोजना में [[विशेष:ActiveUsers|{{NUMBEROFUSERS}} सदस्य]] लोग शामिल बाटे। ई बहुते खुशी क बाति बा कि रउँओं ए में शामिल हो गइल बाड़ीं।
* पहिले से बनल [[विकिपीडिया:लेख|लेखवन]] में कौनो संपादन खाली टेस्ट करे खातिर मत करीं। कौनों तरह के परीक्षण <small>(प्रयोग या टेस्टिंग)</small> [[विकिपीडिया:अभ्यास पन्ना|अभ्यास पन्ना]] या [[Special:MyPage/sandbox|अपना अभ्यास पन्ना]] पर करीं।
* [[विकिपीडिया:आपन परिचय कइसे देईं?|आपन परिचय]] आप संछेप में [[प्रयोगकर्ता:{{BASEPAGENAME}}|अपना सदस्य पन्ना]] पर दे सकत बानी। बहुत पर्सनल बात इहाँ मत लिखीं, न कौनों परचार वाली बात लिखीं। अपने खुद के बारे में लेख मत बनाईं।
* दुसरा [[विकिपीडिया:चौपाल |सदस्य लोगन से बात]] करत समय, [[मदद:वार्ता पन्ना|बातचीत पन्ना]] पर सनेसा लिखले की बाद आपन [[विकिपीडिया:दसखत|दसखत]] <small>(हस्ताक्षर)</small> जरूर करीं। एकरा खातिर अंत में चार गो टेढ़का डैश (<nowiki>~~~~</nowiki>) लिख देंईं या टूलबार में [[File:Insert-signature2.svg|link=|alt=]] पर क्लिक करीं।
* मदद चाहत होखीं त विकिपीडिया के [[विकिपीडिया:मदद|मदद पन्ना]] पर जाईं।
<!-- फुटर के कड़ी सभ -->
सीखे-समझे खातिर कुछ अउरी कड़ी नीचे दिहल जात बाटे:
{| border="5" cellspacing="1" cellpadding="0" height="50" align=center border=0 style="background: transparent"
| style="background-color:#FFFFFF; border: solid 2px #F2BDCD; padding:1px 10px;" | [[विकिपीडिया:स्वशिक्षा|शुरू से सीखीं]]
|
| style="background-color:#FFFFFF; border: solid 2px #F2BDCD; padding:1px 20px;" | [[मदद:संपादन|संपादन सीखीं]]
|
| style="background-color:#FFFFFF; border: solid 2px #F2BDCD; padding:1px 20px;" | [[विकिपीडिया:नया लेख कइसे सुरू करीं?|नया लेख]]
| style="background-color:#FFFFFF; border: solid 2px #F2BDCD; padding:1px 20px;" | [[विकिपीडिया:अइसन लेख मना बाटे|लेख मनाहीं]]
|
| style="background-color:#FFFFFF; border: solid 2px #F2BDCD; padding:1px 20px;" | [[विकिपीडिया:पंचशील|पंचशील]]
| style="background-color:#FFFFFF; border: solid 2px #F2BDCD; padding:1px 20px;" | [[विकिपीडिया:समुदाय पोर्टल|सदस्य समाज पन्ना]]
|}
|}
-- [[प्रयोगकर्ता:नया सदस्य स्वागतकर्ता|नया सदस्य स्वागतकर्ता]] ([[प्रयोगकर्ता वार्ता:नया सदस्य स्वागतकर्ता|बात करीं]]) 14:05, 24 जुलाई 2026 (UTC)
ly4wlx3sw9e96il6jt43dqcrm4q5hep
दि ओडिसी (2026 के फिलिम)
0
101274
801723
2026-07-24T19:45:13Z
SM7
3953
नया आधार लेख / अंग्रेजी विकिपीडिया से अनुबाद कइ के
801723
wikitext
text/x-wiki
'''''दि ओडिसी''''' ({{Langx|en|The Odyssey}}) 2026 के एगो एपिक एक्शन-फैंटेसी फिलिम बाटे, जेकर कहानी लिखे के काम आ डाइरेक्शन [[क्रिस्टोफर नोलन]] कइले बाड़ें। एह फिलिम के ऊ अपना पत्नी एम्मा थॉमस के साथे मिलके प्रोड्यूस कइले बाड़ें। ई फिलिम [[होमर]] के प्राचीन यूनानी महाकाव्य ''[[ओडिसी]]'' पर आधारित बा। एह में [[मैट डेमन]], [[टॉम हॉलैंड]], [[ऐन हैथवे]], [[रॉबर्ट पैटिन्सन]], [[लुपीटा न्योंगो]], [[सामंथा मॉर्टन]], [[ज़ेंडाया]] आ [[शार्लीज़ थेरॉन]] समेत कई गो परसिद्ध कलाकार लोग एक्टिंग कइले बाड़ें। फिलिम में ओडीसियस (मैट डेमन), जे इथाका के यूनानी राजा हउवें, ट्रोजन जुद्ध के बाद अपना घरे वापिस लवटे के लमहर आ खतरनाक जात्रा पर निकलल बाड़ें। एह सफर में उनकर सामना कई गो मिथकीय जिया-जन्तु सभ से होला जब ऊ अपना पत्नी पेनेलोप (ऐन हैथवे) से फेर मिले के कोशिश करत रहेलें।
नोलन मार्च 2024 में एह फिलिम के स्क्रिप्ट लिखे के शुरुआत कइलें, आ अक्टूबर 2024 तक [[यूनिवर्सल पिक्चर्स]] के साथे एह प्रोजेक्ट के अंतिम रूप दे दिहलें। दिसंबर 2024 में फिलिम के आधिकारिक घोषणा भइल। कलाकारन के सेलेक्शन 2024 के आखिरी महीना से 2025 के सुरुआती महीना ले चलल, आ फरवरी 2025 में मैट डेमन के मुख्य भूमिका खातिर चुनल गइल। नोलन ओडिसी के कई गो अनुवाद के अध्ययन कइलें, आ अंत में यूनानी मिथकीय कथा के यथासंभव यथार्थवादी ढंग से पेश करे के फैसला कइलें। एह काम में उनकरा आंद्रेई रुबलेव (1966), रान (1985) आ विशेष प्रभाव कलाकार रे हैरीहाउज़ेन के फिलिमन से प्रेरणा मिलल। एह फिलिम के शूटिंग फरवरी से अगस्त 2025 के बीच मोरक्को, यूनान, इटली, स्कॉटलैंड, आइसलैंड, पच्छिमी सहारा, माल्टा आ लॉस एंजिलिस के यूनिवर्सल स्टूडियोज़ परिसर में भइल। लगभग 25 करोड़ अमेरिकी डॉलर के अनुमानित बजट वाला ई फिलिम नोलन के सबसे महँग फिलिमन में से एगो बा। एहिजे पहिली बेर कवनो फीचर फिलिम के पूरा शूटिंग [[आईमैक्स]] 70 मिमी फिल्म कैमरा से कइल गइल।
''दि ओडिसी'' के वर्ल्ड प्रीमियर 6 जुलाई 2026 के [[लंदन]] के ओडियन लक्स लीसेस्टर स्क्वायर में भइल। एकरा बाद यूनिवर्सल पिक्चर्स 17 जुलाई 2026 के अमेरिका आ ब्रिटेन में एकरा के सिनेमाहाल सभ में रिलीज कइलस। फिलिम [[आईमैक्स]] आ कई गो प्रीमियम बड़हन परदा वाला फारमेट में भी उपलब्ध करावल गइल। रिलीज के बाद फिलिम के समीक्षक लोग से बहुत सराहना मिलल, खास करके नोलन के निर्देशन के। फिलिम अबले 34.6 करोड़ अमेरिकी डॉलर से बेसी कमाई कर चुकल बा आ नोलन के करियर में कई गो नया रिकॉर्ड बनवले बा, जवना में रिलीज से एक बरिस पहिले शुरू भइल प्रीमियम प्रारूप के एडवांस बुकिंग के रिकॉर्ड भी शामिल बा।
{{clear}}
== संदर्भ ==
{{Reflist|29em}}
[[श्रेणी:2026 के फिलिम]]
ocvoh4qrovrkqkmhrx1y3w8l34kjsid
801727
801723
2026-07-24T20:01:30Z
SM7
3953
ज्ञानसंदूक जोड़ल गइल
801727
wikitext
text/x-wiki
{{Infobox film
| image =
| alt =
| caption = सिनेमा रिलीज के पोस्टर
| director = [[क्रिस्टोफर नोलन]]
| screenplay = क्रिस्टोफर नोलन
| based_on = [[होमर]] के ''[[ओडिसी]]''<!--Per poster billing credit. WGA credit: "Based on the Epic Poem by Homer"; Please do not use the "Based on" template here, per MOS:VAR. It is not required and adds an unnecessary line break.-->
| producer = {{Plainlist|
* [[एमा थॉमस]]
* क्रिस्टोफर नोलन
}}
| starring = {{Plainlist|<!--Order per bottom billing block-->
* [[मैट डेमन]]
* [[टॉम हॉलैंड]]
* [[ऐन हैथवे]]
* [[रॉबर्ट पैटिनसन]]
* [[लुपीटा न्योंगो]]
* [[सामंथा मॉर्टन]]
* [[जेंडाया]]
* [[शार्लीज़ थेरॉन]]
}}
| cinematography = [[होयटे वान होयटेमा]]
| editing = [[जेनिफर लेम]]
| music = [[लुडविग गोरान्सन]]
| studio = {{Plainlist|
* [[यूनिवर्सल पिक्चर्स]]<ref name="DiscussingFilmReview" />
* [[सिनकॉपी]]<ref name="DiscussingFilmReview" />
}}
| distributor = यूनिवर्सल पिक्चर्स<ref name="DiscussingFilmReview" />
| released = {{Film date|2026|7|6|[[ओडियन लक्स लीसेस्टर स्क्वायर]]|2026|7|17|संयुक्त राज्य अमेरिका आ यूनाइटेड किंगडम}}
| runtime = 173 मिनट<!--Theatrical runtime: 172:53--><ref name="Runtime" />
| country = {{Plainlist|
* संयुक्त राज्य अमेरिका
* यूनाइटेड किंगडम
}}
| language = अंग्रेजी
| budget = $250 मिलियन<ref name="TeaserLeakTHR" />
| gross = $364 मिलियन<ref name="BOM">{{Cite Box Office Mojo |id=33764258 |title=The Odyssey (2026) |access-date=July 22, 2026}}</ref><ref name="NUM">{{Cite The Numbers |id=Odyssey-The-(2026) |title=The Odyssey |access-date=July 24, 2026}}</ref>
}}
'''''दि ओडिसी''''' ({{Langx|en|The Odyssey}}) 2026 के एगो एपिक एक्शन-फैंटेसी फिलिम बाटे, जेकर कहानी लिखे के काम आ डाइरेक्शन [[क्रिस्टोफर नोलन]] कइले बाड़ें। एह फिलिम के ऊ अपना पत्नी एम्मा थॉमस के साथे मिलके प्रोड्यूस कइले बाड़ें। ई फिलिम [[होमर]] के प्राचीन यूनानी महाकाव्य ''[[ओडिसी]]'' पर आधारित बा। एह में [[मैट डेमन]], [[टॉम हॉलैंड]], [[ऐन हैथवे]], [[रॉबर्ट पैटिन्सन]], [[लुपीटा न्योंगो]], [[सामंथा मॉर्टन]], [[ज़ेंडाया]] आ [[शार्लीज़ थेरॉन]] समेत कई गो परसिद्ध कलाकार लोग एक्टिंग कइले बाड़ें। फिलिम में ओडीसियस (मैट डेमन), जे इथाका के यूनानी राजा हउवें, ट्रोजन जुद्ध के बाद अपना घरे वापिस लवटे के लमहर आ खतरनाक जात्रा पर निकलल बाड़ें। एह सफर में उनकर सामना कई गो मिथकीय जिया-जन्तु सभ से होला जब ऊ अपना पत्नी पेनेलोप (ऐन हैथवे) से फेर मिले के कोशिश करत रहेलें।
नोलन मार्च 2024 में एह फिलिम के स्क्रिप्ट लिखे के शुरुआत कइलें, आ अक्टूबर 2024 तक [[यूनिवर्सल पिक्चर्स]] के साथे एह प्रोजेक्ट के अंतिम रूप दे दिहलें। दिसंबर 2024 में फिलिम के आधिकारिक घोषणा भइल। कलाकारन के सेलेक्शन 2024 के आखिरी महीना से 2025 के सुरुआती महीना ले चलल, आ फरवरी 2025 में मैट डेमन के मुख्य भूमिका खातिर चुनल गइल। नोलन ओडिसी के कई गो अनुवाद के अध्ययन कइलें, आ अंत में यूनानी मिथकीय कथा के यथासंभव यथार्थवादी ढंग से पेश करे के फैसला कइलें। एह काम में उनकरा आंद्रेई रुबलेव (1966), रान (1985) आ विशेष प्रभाव कलाकार रे हैरीहाउज़ेन के फिलिमन से प्रेरणा मिलल। एह फिलिम के शूटिंग फरवरी से अगस्त 2025 के बीच मोरक्को, यूनान, इटली, स्कॉटलैंड, आइसलैंड, पच्छिमी सहारा, माल्टा आ लॉस एंजिलिस के यूनिवर्सल स्टूडियोज़ परिसर में भइल। लगभग 25 करोड़ अमेरिकी डॉलर के अनुमानित बजट वाला ई फिलिम नोलन के सबसे महँग फिलिमन में से एगो बा। एहिजे पहिली बेर कवनो फीचर फिलिम के पूरा शूटिंग [[आईमैक्स]] 70 मिमी फिल्म कैमरा से कइल गइल।
''दि ओडिसी'' के वर्ल्ड प्रीमियर 6 जुलाई 2026 के [[लंदन]] के ओडियन लक्स लीसेस्टर स्क्वायर में भइल। एकरा बाद यूनिवर्सल पिक्चर्स 17 जुलाई 2026 के अमेरिका आ ब्रिटेन में एकरा के सिनेमाहाल सभ में रिलीज कइलस। फिलिम [[आईमैक्स]] आ कई गो प्रीमियम बड़हन परदा वाला फारमेट में भी उपलब्ध करावल गइल। रिलीज के बाद फिलिम के समीक्षक लोग से बहुत सराहना मिलल, खास करके नोलन के निर्देशन के। फिलिम अबले 34.6 करोड़ अमेरिकी डॉलर से बेसी कमाई कर चुकल बा आ नोलन के करियर में कई गो नया रिकॉर्ड बनवले बा, जवना में रिलीज से एक बरिस पहिले शुरू भइल प्रीमियम प्रारूप के एडवांस बुकिंग के रिकॉर्ड भी शामिल बा।
{{clear}}
== संदर्भ ==
{{Reflist|29em}}
[[श्रेणी:2026 के फिलिम]]
lrix02f9huzsv45ceb9y0fp4r4u91z8
श्रेणी:2026 के फिलिम
14
101275
801725
2026-07-24T19:52:34Z
SM7
3953
नई श्रेणी
801725
wikitext
text/x-wiki
{{Commons category|2026 films}}
{{filmyr|202|6}}
pzjpcjfqm8c5o3g5btwkqeo94f4pt9t
टेम्पलेट:Cite Box Office Mojo
10
101276
801728
2020-02-05T23:54:31Z
en>Tenebrae
0
created page - first pass
801728
wikitext
text/x-wiki
<includeonly>[{{{url|{{{1|}}}}}} ''{{{title|{{{2|}}}}}}''] at [[Box Office Mojo]]{{#ifeq:{{{mode}}}|cs2||.}}</includeonly><noinclude>{{documentation}}</noinclude>
ndxg3dp84n0ejk4gqtwr1ia3u2elw30
801729
801728
2020-02-06T23:33:52Z
en>Tenebrae
0
adding publisher field
801729
wikitext
text/x-wiki
<includeonly>[{{{url|{{{1|}}}}}} ''{{{title|{{{2|}}}}}}''] at [[Box Office Mojo]]{{#ifeq:{{{mode}}}|cs2||. {{{publisher|{{{3|}}}}}}}}</includeonly><noinclude>{{documentation}}</noinclude>.
bgb56hltw6wogqxv28eqlwxv356z8hv
801730
801729
2020-02-14T20:29:45Z
en>Favre1fan93
0
moving from sandbox. updating documentation next
801730
wikitext
text/x-wiki
<includeonly>{{#if:{{{id|}}}|<!--Error checking for id parameter
-->{{#if:{{{title|}}}|<!--Error checking for id parameter
-->{{#if:{{{url-status|}}}|{{#ifeq:{{{url-status}}}|live|[https://www.boxofficemojo.com/title/tt{{{id}}} ''{{{title}}}'']|[{{{archive-url|{{{archiveurl|}}}}}} ''{{{title}}}'']}}|[https://www.boxofficemojo.com/title/tt{{{id}}} ''{{{title}}}'']}} at [[Box Office Mojo]]{{#ifeq:{{{mode}}}|cs2|,|.}} [[IMDb]]{{#if:{{{archive-url|}}}{{{archiveurl|}}}|{{#ifeq:{{{mode}}}|cs2|,|.}} {{#if:{{{url-status|}}}|{{#ifeq:{{{url-status}}}|live|[{{{archive-url|{{{archiveurl|}}}}}} {{#ifeq:{{{mode}}}|cs2|a|A}}rchived] from the original|{{#ifeq:{{{mode}}}|cs2|a|A}}rchived from [https://www.boxofficemojo.com/title/tt{{{id}}} the original]}}}} on {{{archive-date|{{{archivedate|}}}}}}}}{{#if:{{{access-date|}}}{{{accessdate|}}}|{{#ifeq:{{{mode}}}|cs2|,|.}} {{#ifeq:{{{mode}}}|cs2|r|R}}etrieved {{{access-date|{{{accessdate|}}}}}}}}{{#ifeq:{{{mode}}}|cs2||.}}|<!--
Error checking notices
-->{{Citation error|no {{para|title}} specified|Cite BOM}}}}|{{Citation error|no {{para|id}} specified|Cite BOM}}}}</includeonly><noinclude>
{{Documentation}}
</noinclude>
1htv8lgyyczsc2llbrwrz3e9fhidbqi
801731
801730
2021-02-15T20:40:09Z
en>Netoholic
0
Netoholic moved page [[Template:Cite BOM]] to [[Template:Cite Box Office Mojo]]: per overwhelming preference toward more descriptive name for similar template [[Template talk:Cite Rotten Tomatoes#Requested move 13 February 2021]]
801730
wikitext
text/x-wiki
<includeonly>{{#if:{{{id|}}}|<!--Error checking for id parameter
-->{{#if:{{{title|}}}|<!--Error checking for id parameter
-->{{#if:{{{url-status|}}}|{{#ifeq:{{{url-status}}}|live|[https://www.boxofficemojo.com/title/tt{{{id}}} ''{{{title}}}'']|[{{{archive-url|{{{archiveurl|}}}}}} ''{{{title}}}'']}}|[https://www.boxofficemojo.com/title/tt{{{id}}} ''{{{title}}}'']}} at [[Box Office Mojo]]{{#ifeq:{{{mode}}}|cs2|,|.}} [[IMDb]]{{#if:{{{archive-url|}}}{{{archiveurl|}}}|{{#ifeq:{{{mode}}}|cs2|,|.}} {{#if:{{{url-status|}}}|{{#ifeq:{{{url-status}}}|live|[{{{archive-url|{{{archiveurl|}}}}}} {{#ifeq:{{{mode}}}|cs2|a|A}}rchived] from the original|{{#ifeq:{{{mode}}}|cs2|a|A}}rchived from [https://www.boxofficemojo.com/title/tt{{{id}}} the original]}}}} on {{{archive-date|{{{archivedate|}}}}}}}}{{#if:{{{access-date|}}}{{{accessdate|}}}|{{#ifeq:{{{mode}}}|cs2|,|.}} {{#ifeq:{{{mode}}}|cs2|r|R}}etrieved {{{access-date|{{{accessdate|}}}}}}}}{{#ifeq:{{{mode}}}|cs2||.}}|<!--
Error checking notices
-->{{Citation error|no {{para|title}} specified|Cite BOM}}}}|{{Citation error|no {{para|id}} specified|Cite BOM}}}}</includeonly><noinclude>
{{Documentation}}
</noinclude>
1htv8lgyyczsc2llbrwrz3e9fhidbqi
801732
801731
2021-02-15T20:59:44Z
en>Favre1fan93
0
as per with Cite Rotten Tomatoes, converting to cite web wrapper
801732
wikitext
text/x-wiki
<includeonly>{{cite web
| url = {{#ifeq: {{{id|}}} | {{{id}}} | https://www.boxofficemojo.com/title/tt{{{id}}} | https://www.boxofficemojo.com }}
| title = ''{{{title}}}''
| script-title = {{{script-title|}}}
| trans-title = {{{trans-title|}}}
| language = {{{language|}}}
| website = [[Box Office Mojo]]
| publisher = {{#if:{{{publisher_hide|}}}| |[[IMDb]]}}
| date = {{{date|}}}
| location = {{{location|}}}
| access-date = {{{access-date|{{{accessdate|}}} }}}
| archive-date = {{{archive-date|{{{archivedate|}}} }}}
| archive-url = {{{archive-url|{{{archiveurl|}}} }}}
| url-status = {{{url-status|{{{dead-url|{{{deadurl|}}}}}}}}}
| ref = {{{ref|}}}
| df = {{{df|}}}
| mode = {{{mode|}}}
}}<!--
== Error checking ==
No id -->{{#if:{{{id|}}}|| <span style="font-size:100%" class="error citation-comment">Missing or empty <kbd>|id=</kbd></span>{{main other|[[Category:Cite Box Office Mojo templates with errors]]}} }}<!--
(Note: error message is provided by CS1 module)
No title --> {{#if:{{{title|}}}|| <span style="font-size:100%" class="error citation-comment">Missing or empty <kbd>|title=</kbd></span>{{main other|[[Category:Cite Box Office Mojo templates with errors]]}} }}<!--
--></includeonly><noinclude>
{{Documentation}}
</noinclude>
cfxo64zi5thh6vwp4eu685jwjwf8qv8
801733
801732
2021-03-03T19:00:19Z
en>Ritchie333
0
Protected "[[Template:Cite Box Office Mojo]]": [[WP:High-risk templates|Highly visible template]] ([Edit=Require template editor access] (indefinite) [Move=Require template editor access] (indefinite))
801732
wikitext
text/x-wiki
<includeonly>{{cite web
| url = {{#ifeq: {{{id|}}} | {{{id}}} | https://www.boxofficemojo.com/title/tt{{{id}}} | https://www.boxofficemojo.com }}
| title = ''{{{title}}}''
| script-title = {{{script-title|}}}
| trans-title = {{{trans-title|}}}
| language = {{{language|}}}
| website = [[Box Office Mojo]]
| publisher = {{#if:{{{publisher_hide|}}}| |[[IMDb]]}}
| date = {{{date|}}}
| location = {{{location|}}}
| access-date = {{{access-date|{{{accessdate|}}} }}}
| archive-date = {{{archive-date|{{{archivedate|}}} }}}
| archive-url = {{{archive-url|{{{archiveurl|}}} }}}
| url-status = {{{url-status|{{{dead-url|{{{deadurl|}}}}}}}}}
| ref = {{{ref|}}}
| df = {{{df|}}}
| mode = {{{mode|}}}
}}<!--
== Error checking ==
No id -->{{#if:{{{id|}}}|| <span style="font-size:100%" class="error citation-comment">Missing or empty <kbd>|id=</kbd></span>{{main other|[[Category:Cite Box Office Mojo templates with errors]]}} }}<!--
(Note: error message is provided by CS1 module)
No title --> {{#if:{{{title|}}}|| <span style="font-size:100%" class="error citation-comment">Missing or empty <kbd>|title=</kbd></span>{{main other|[[Category:Cite Box Office Mojo templates with errors]]}} }}<!--
--></includeonly><noinclude>
{{Documentation}}
</noinclude>
cfxo64zi5thh6vwp4eu685jwjwf8qv8
801734
801733
2022-04-17T03:49:26Z
en>Zyxw
0
If "id" not in template use Wikidata property. If "title" not in template use article name without disambiguation,
801734
wikitext
text/x-wiki
<includeonly>{{cite web
| url = {{#ifeq: {{{id|}}} | {{{id}}}
| https://www.boxofficemojo.com/title/tt{{{id}}}/
| {{#if: {{#property:P345}}
| https://www.boxofficemojo.com/title/{{First word|{{#property:P345}}|sep=,}}/
| https://www.boxofficemojo.com
}}
}}
| title = {{#if: {{{title|}}}
| ''{{{title}}}''
| ''{{PAGENAMEBASE}}''
}}
| script-title = {{{script-title|}}}
| trans-title = {{{trans-title|}}}
| language = {{{language|}}}
| website = [[Box Office Mojo]]
| publisher = {{#if:{{{publisher_hide|}}}| |[[IMDb]]}}
| date = {{{date|}}}
| location = {{{location|}}}
| access-date = {{{access-date|{{{accessdate|}}} }}}
| archive-date = {{{archive-date|{{{archivedate|}}} }}}
| archive-url = {{{archive-url|{{{archiveurl|}}} }}}
| url-status = {{{url-status|{{{dead-url|{{{deadurl|}}}}}}}}}
| ref = {{{ref|}}}
| df = {{{df|}}}
| mode = {{{mode|}}}
}}<!--
== Error checking ==
No id -->{{#if:{{{id|}}}|| <span style="font-size:100%" class="error citation-comment">Missing or empty <kbd>|id=</kbd></span>{{main other|[[Category:Cite Box Office Mojo templates with errors]]}} }}<!--
(Note: error message is provided by CS1 module)
No title --> {{#if:{{{title|}}}|| <span style="font-size:100%" class="error citation-comment">Missing or empty <kbd>|title=</kbd></span>{{main other|[[Category:Cite Box Office Mojo templates with errors]]}} }}<!--
--></includeonly><noinclude>
{{Documentation}}
</noinclude>
bhq1pzxu4g9mbo8y0aqb6674udmpvid
801735
801734
2022-04-17T03:53:40Z
en>Zyxw
0
don't display "id" and "title" errors if using Wikidata
801735
wikitext
text/x-wiki
<includeonly>{{cite web
| url = {{#ifeq: {{{id|}}} | {{{id}}}
| https://www.boxofficemojo.com/title/tt{{{id}}}/
| {{#if: {{#property:P345}}
| https://www.boxofficemojo.com/title/{{First word|{{#property:P345}}|sep=,}}/
| https://www.boxofficemojo.com
}}
}}
| title = {{#if: {{{title|}}}
| ''{{{title}}}''
| ''{{PAGENAMEBASE}}''
}}
| script-title = {{{script-title|}}}
| trans-title = {{{trans-title|}}}
| language = {{{language|}}}
| website = [[Box Office Mojo]]
| publisher = {{#if:{{{publisher_hide|}}}| |[[IMDb]]}}
| date = {{{date|}}}
| location = {{{location|}}}
| access-date = {{{access-date|{{{accessdate|}}} }}}
| archive-date = {{{archive-date|{{{archivedate|}}} }}}
| archive-url = {{{archive-url|{{{archiveurl|}}} }}}
| url-status = {{{url-status|{{{dead-url|{{{deadurl|}}}}}}}}}
| ref = {{{ref|}}}
| df = {{{df|}}}
| mode = {{{mode|}}}
}}<!--
== Error checking ==
No id -->{{#if:{{{id|}}}{{#property:P345}}|| <span style="font-size:100%" class="error citation-comment">Missing or empty <kbd>|id=</kbd></span>{{main other|[[Category:Cite Box Office Mojo templates with errors]]}} }}<!--
(Note: error message is provided by CS1 module)
No title --> {{#if:{{{title|}}}{{#property:P345}}|| <span style="font-size:100%" class="error citation-comment">Missing or empty <kbd>|title=</kbd></span>{{main other|[[Category:Cite Box Office Mojo templates with errors]]}} }}<!--
--></includeonly><noinclude>
{{Documentation}}
</noinclude>
q6l8f7c94ifvet860k9u4j9dz5yvd3z
801736
801735
2022-04-18T15:21:34Z
en>Jonesey95
0
update from sandbox per talk page
801736
wikitext
text/x-wiki
<includeonly>{{cite web
| url = {{#ifeq: {{{id|}}} | {{{id}}}
| https://www.boxofficemojo.com/title/tt{{{id}}}/
| {{#if: {{#property:P345}}
| https://www.boxofficemojo.com/title/{{First word|{{#property:P345}}|sep=,}}/
| https://www.boxofficemojo.com
}}
}}
| title = {{#if: {{{title|}}}
| ''{{{title}}}''
| ''{{PAGENAMEBASE}}''
}}
| script-title = {{{script-title|}}}
| trans-title = {{{trans-title|}}}
| language = {{{language|}}}
| website = [[Box Office Mojo]]
| publisher = {{#if:{{{publisher_hide|}}}| |[[IMDb]]}}
| date = {{{date|}}}
| location = {{{location|}}}
| access-date = {{{access-date|{{{accessdate|}}} }}}
| archive-date = {{{archive-date|{{{archivedate|}}} }}}
| archive-url = {{{archive-url|{{{archiveurl|}}} }}}
| url-status = {{{url-status|{{{dead-url|{{{deadurl|}}}}}}}}}
| ref = {{{ref|}}}
| df = {{{df|}}}
| mode = {{{mode|}}}
}}{{#if: {{{id|}}}
|
| {{EditAtWikidata|pid=P345|{{{1|{{{id|}}}}}}}}
}}<!--
-->{{WikidataCheck|property=P345|value={{{id}}}|category=IMDb ID (Cite Mojo)}}<!--
== Error checking ==
No id -->{{#if:{{{id|}}}{{#property:P345}}|| <span style="font-size:100%" class="error citation-comment">{{sp}}ID is missing in both template and Wikidata; please add to either place.</span>{{main other|[[Category:Cite Box Office Mojo templates with errors]]}} }}<!--
(Note: error message is provided by CS1 module)--></includeonly><noinclude>
{{Documentation}}
</noinclude>
gvuulh5n2flyk0fy5uke98fxr3jqoql
801737
801736
2022-09-04T12:07:12Z
en>Nardog
0
shouldn't be italicized
801737
wikitext
text/x-wiki
<includeonly>{{cite web
| url = {{#ifeq: {{{id|}}} | {{{id}}}
| https://www.boxofficemojo.com/title/tt{{{id}}}/
| {{#if: {{#property:P345}}
| https://www.boxofficemojo.com/title/{{First word|{{#property:P345}}|sep=,}}/
| https://www.boxofficemojo.com
}}
}}
| title = {{#if: {{{title|}}}
| {{{title}}}
| {{PAGENAMEBASE}}
}}
| script-title = {{{script-title|}}}
| trans-title = {{{trans-title|}}}
| language = {{{language|}}}
| website = [[Box Office Mojo]]
| publisher = {{#if:{{{publisher_hide|}}}| |[[IMDb]]}}
| date = {{{date|}}}
| location = {{{location|}}}
| access-date = {{{access-date|{{{accessdate|}}} }}}
| archive-date = {{{archive-date|{{{archivedate|}}} }}}
| archive-url = {{{archive-url|{{{archiveurl|}}} }}}
| url-status = {{{url-status|{{{dead-url|{{{deadurl|}}}}}}}}}
| ref = {{{ref|}}}
| df = {{{df|}}}
| mode = {{{mode|}}}
}}{{#if: {{{id|}}}
|
| {{EditAtWikidata|pid=P345|{{{1|{{{id|}}}}}}}}
}}<!--
-->{{WikidataCheck|property=P345|value={{{id}}}|category=IMDb ID (Cite Mojo)}}<!--
== Error checking ==
No id -->{{#if:{{{id|}}}{{#property:P345}}|| <span style="font-size:100%" class="error citation-comment">{{sp}}ID is missing in both template and Wikidata; please add to either place.</span>{{main other|[[Category:Cite Box Office Mojo templates with errors]]}} }}<!--
(Note: error message is provided by CS1 module)--></includeonly><noinclude>
{{Documentation}}
</noinclude>
lov8gfi8755y3062ct6x6io2gls0xdz
801738
801737
2022-09-05T01:58:48Z
en>Nardog
0
contested
801738
wikitext
text/x-wiki
<includeonly>{{cite web
| url = {{#ifeq: {{{id|}}} | {{{id}}}
| https://www.boxofficemojo.com/title/tt{{{id}}}/
| {{#if: {{#property:P345}}
| https://www.boxofficemojo.com/title/{{First word|{{#property:P345}}|sep=,}}/
| https://www.boxofficemojo.com
}}
}}
| title = {{#if: {{{title|}}}
| ''{{{title}}}''
| ''{{PAGENAMEBASE}}''
}}
| script-title = {{{script-title|}}}
| trans-title = {{{trans-title|}}}
| language = {{{language|}}}
| website = [[Box Office Mojo]]
| publisher = {{#if:{{{publisher_hide|}}}| |[[IMDb]]}}
| date = {{{date|}}}
| location = {{{location|}}}
| access-date = {{{access-date|{{{accessdate|}}} }}}
| archive-date = {{{archive-date|{{{archivedate|}}} }}}
| archive-url = {{{archive-url|{{{archiveurl|}}} }}}
| url-status = {{{url-status|{{{dead-url|{{{deadurl|}}}}}}}}}
| ref = {{{ref|}}}
| df = {{{df|}}}
| mode = {{{mode|}}}
}}{{#if: {{{id|}}}
|
| {{EditAtWikidata|pid=P345|{{{1|{{{id|}}}}}}}}
}}<!--
-->{{WikidataCheck|property=P345|value={{{id}}}|category=IMDb ID (Cite Mojo)}}<!--
== Error checking ==
No id -->{{#if:{{{id|}}}{{#property:P345}}|| <span style="font-size:100%" class="error citation-comment">{{sp}}ID is missing in both template and Wikidata; please add to either place.</span>{{main other|[[Category:Cite Box Office Mojo templates with errors]]}} }}<!--
(Note: error message is provided by CS1 module)--></includeonly><noinclude>
{{Documentation}}
</noinclude>
gvuulh5n2flyk0fy5uke98fxr3jqoql
801739
801738
2026-07-24T20:02:08Z
SM7
3953
11 revisions imported from [[:en:Template:Cite_Box_Office_Mojo]]
801738
wikitext
text/x-wiki
<includeonly>{{cite web
| url = {{#ifeq: {{{id|}}} | {{{id}}}
| https://www.boxofficemojo.com/title/tt{{{id}}}/
| {{#if: {{#property:P345}}
| https://www.boxofficemojo.com/title/{{First word|{{#property:P345}}|sep=,}}/
| https://www.boxofficemojo.com
}}
}}
| title = {{#if: {{{title|}}}
| ''{{{title}}}''
| ''{{PAGENAMEBASE}}''
}}
| script-title = {{{script-title|}}}
| trans-title = {{{trans-title|}}}
| language = {{{language|}}}
| website = [[Box Office Mojo]]
| publisher = {{#if:{{{publisher_hide|}}}| |[[IMDb]]}}
| date = {{{date|}}}
| location = {{{location|}}}
| access-date = {{{access-date|{{{accessdate|}}} }}}
| archive-date = {{{archive-date|{{{archivedate|}}} }}}
| archive-url = {{{archive-url|{{{archiveurl|}}} }}}
| url-status = {{{url-status|{{{dead-url|{{{deadurl|}}}}}}}}}
| ref = {{{ref|}}}
| df = {{{df|}}}
| mode = {{{mode|}}}
}}{{#if: {{{id|}}}
|
| {{EditAtWikidata|pid=P345|{{{1|{{{id|}}}}}}}}
}}<!--
-->{{WikidataCheck|property=P345|value={{{id}}}|category=IMDb ID (Cite Mojo)}}<!--
== Error checking ==
No id -->{{#if:{{{id|}}}{{#property:P345}}|| <span style="font-size:100%" class="error citation-comment">{{sp}}ID is missing in both template and Wikidata; please add to either place.</span>{{main other|[[Category:Cite Box Office Mojo templates with errors]]}} }}<!--
(Note: error message is provided by CS1 module)--></includeonly><noinclude>
{{Documentation}}
</noinclude>
gvuulh5n2flyk0fy5uke98fxr3jqoql
टेम्पलेट:Cite Box Office Mojo/doc
10
101277
801740
2020-02-05T23:57:15Z
en>Tenebrae
0
created page - first pass
801740
wikitext
text/x-wiki
{{Documentation subpage}}
<!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
Used to cite some page on [[Box Office Mojo]].
== Usage ==
This template accepts two positional parameter and three named parameters. The positional parameters, from left to right are:
:<code><nowiki>{{{1}}}</nowiki></code> – the url of the page at BOM
:<code><nowiki>{{{2}}}</nowiki></code> – the title of the page at BOM
The named parameters are
:{{para|url}} – the url of the page at BOM
:{{para|title}} – the title of the page at BOM
:{{para|mode}} – similar to {{para|mode}} used by cs1|2 templates, when set to <code>cs2</code>, this template omits the trailing dot
===Examples===
Unexpected results may occur when positional and named parameters are mixed. {{para|mode}} is always named so may be used with either format.
Using positional parameters:
*<code><nowiki>{{cite BOM|https://www.boxofficemojo.com/title/tt3281548/|Little Women}}</nowiki></code> → {{cite BOM|https://www.boxofficemojo.com/title/tt3281548/|Little Women}}
using named parameters:
*<code><nowiki>{{cite BOM|url=https://www.boxofficemojo.com/title/tt3281548/|title=Little Women}}</nowiki></code> → {{cite BOM|url=https://www.boxofficemojo.com/title/tt3281548/|title=Little Women}}
Using {{para|mode|cs2}}:
*<code><nowiki>{{cite BOM|url=https://www.boxofficemojo.com/title/tt3281548/|title=Little Women |mode=cs2}}</nowiki></code> → {{cite BOM|url=https://www.boxofficemojo.com/title/tt3281548/|title=Little Women |mode=cs2}}
<includeonly>{{sandbox other||
<!-- Categories below this line, please; interwikis at Wikidata -->
}}</includeonly>
dubl0hmqpng4gu41eubnrk5ws1gtv91
801741
801740
2020-02-06T23:36:14Z
en>Tenebrae
0
adding publisher field
801741
wikitext
text/x-wiki
{{Documentation subpage}}
<!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
Used to cite some page on [[Box Office Mojo]].
== Usage ==
This template accepts two positional parameter and three named parameters. The positional parameters, from left to right are:
:<code><nowiki>{{{1}}}</nowiki></code> – the url of the page at BOM
:<code><nowiki>{{{2}}}</nowiki></code> – the title of the page at BOM
:<code><nowiki>{{{3}}}</nowiki></code> – the parent company of BOM at time of citation
The named parameters are
:{{para|url}} – the url of the page at BOM
:{{para|title}} – the title of the page at BOM
:{{para|mode}} – similar to {{para|mode}} used by cs1|2 templates, when set to <code>cs2</code>, this template omits the trailing dot
:{{para|publisher}} – the parent company of BOM at time of citation
===Examples===
Unexpected results may occur when positional and named parameters are mixed. {{para|mode}} is always named so may be used with either format.
Using positional parameters:
*<code><nowiki>{{cite BOM|https://www.boxofficemojo.com/title/tt3281548/|Little Women|IMDb}}</nowiki></code> → {{cite BOM|https://www.boxofficemojo.com/title/tt3281548/|Little Women|IMDb}}
using named parameters:
*<code><nowiki>{{cite BOM|url=https://www.boxofficemojo.com/title/tt3281548/|title=Little Women|publisher=IMDb}}</nowiki></code> → {{cite BOM|url=https://www.boxofficemojo.com/title/tt3281548/|title=Little Women|publisher=IMDb}}
Using {{para|mode|cs2}}:
*<code><nowiki>{{cite BOM|url=https://www.boxofficemojo.com/title/tt3281548/|title=Little Women |mode=cs2}}</nowiki></code> → {{cite BOM|url=https://www.boxofficemojo.com/title/tt3281548/|title=Little Women |mode=cs2}}
<includeonly>{{sandbox other||
<!-- Categories below this line, please; interwikis at Wikidata -->
}}</includeonly>
j2zaeb6o6m7e339hr983zg4ct2ktiy9
801742
801741
2020-02-06T23:36:50Z
en>Tenebrae
0
wikilinks
801742
wikitext
text/x-wiki
{{Documentation subpage}}
<!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
Used to cite some page on [[Box Office Mojo]].
== Usage ==
This template accepts two positional parameter and three named parameters. The positional parameters, from left to right are:
:<code><nowiki>{{{1}}}</nowiki></code> – the url of the page at BOM
:<code><nowiki>{{{2}}}</nowiki></code> – the title of the page at BOM
:<code><nowiki>{{{3}}}</nowiki></code> – the parent company of BOM at time of citation
The named parameters are
:{{para|url}} – the url of the page at BOM
:{{para|title}} – the title of the page at BOM
:{{para|mode}} – similar to {{para|mode}} used by cs1|2 templates, when set to <code>cs2</code>, this template omits the trailing dot
:{{para|publisher}} – the parent company of BOM at time of citation
===Examples===
Unexpected results may occur when positional and named parameters are mixed. {{para|mode}} is always named so may be used with either format.
Using positional parameters:
*<code><nowiki>{{cite BOM|https://www.boxofficemojo.com/title/tt3281548/|Little Women|[[IMDb]]}}</nowiki></code> → {{cite BOM|https://www.boxofficemojo.com/title/tt3281548/|Little Women|[[IMDb]]}}
using named parameters:
*<code><nowiki>{{cite BOM|url=https://www.boxofficemojo.com/title/tt3281548/|title=Little Women|publisher=[[IMDb]]}}</nowiki></code> → {{cite BOM|url=https://www.boxofficemojo.com/title/tt3281548/|title=Little Women|publisher=[[IMDb]]}}
Using {{para|mode|cs2}}:
*<code><nowiki>{{cite BOM|url=https://www.boxofficemojo.com/title/tt3281548/|title=Little Women |mode=cs2}}</nowiki></code> → {{cite BOM|url=https://www.boxofficemojo.com/title/tt3281548/|title=Little Women |mode=cs2}}
<includeonly>{{sandbox other||
<!-- Categories below this line, please; interwikis at Wikidata -->
}}</includeonly>
onvzieby9c3w3pxtpj2rqb8cbl22nt2
801743
801742
2020-02-14T20:38:11Z
en>Favre1fan93
0
801743
wikitext
text/x-wiki
{{Documentation subpage}}
<!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
A template for citing box office data on Box Office Mojo.
== Usage ==
{{csdoc|usage}}
{| class="wikitable" style="width: 100%"
|+ Required parameters only, in horizontal format
|- style="vertical-align:top;"
|
: <code><nowiki>{{cite BOM |id= |title= }}</nowiki></code>
{{end}}
{{csdoc|usage full}}
: <code><nowiki>{{cite BOM |id= |title= |access-date= |archive-url= |archive-date= |url-status= |mode= }}</nowiki></code>
{{end}}
{{A note|1=}} The {{para|id}} parameter is the same as the film's IMDb id.
== Examples ==
'''<code><nowiki>{{Cite BOM |id=0120338 |title=Titanic}}</nowiki></code>'''
: {{Cite BOM |id=0120338 |title=Titanic}}
'''<code><nowiki>{{Cite BOM |id=0120338 |title=Titanic |accessdate=February 14, 2020}}</nowiki></code>'''
: {{Cite BOM |id=0120338 |title=Titanic |accessdate=February 14, 2020}}
'''<code><nowiki>{{Cite BOM |id=0120338 |title=Titanic |accessdate=February 14, 2020 |mode=cs2}}</nowiki></code>'''
: {{Cite BOM |id=0120338 |title=Titanic |accessdate=February 14, 2020 |mode=cs2}}
== Error detection ==
* The parameters {{para|id}}, and {{para|title}} are '''{{red|required}}'''. If omitted or left blank, errors will be reported. For example:
*: '''<code><nowiki>{{Cite BOM|title=I'm an incomplete citation!}}</nowiki></code>'''
*:: {{Cite BOM|title=I'm an incomplete citation!}}
== TemplateData ==
{{TemplateData header}}
<!-- <templatedata>
{
"params": {
"id": {
"label": "id",
"description": "Number of the Box Office Mojo title, taken from the numbers at the end of its Box Office Mojo URL (exclude the leading "tt")",
"type": "string",
"required": true
},
"title": {
"label": "title",
"description": "The name of the film",
"type": "string",
"required": true
},
"access-date": {
"aliases": [
"accessdate"
],
"label": "access date",
"description": "The full date when the site was accessed; do not wikilink"
},
"archive-url": {
"label": "archive URL",
"aliases": [
"archiveurl"
],
"description": "The URL of an archived copy of a web page, if or in case the URL becomes unavailable; requires 'archive-date'",
"type": "string"
},
"archive-date": {
"label": "archive date",
"aliases": [
"archivedate"
],
"description": "Date when the original URL was archived; do not wikilink",
"type": "string"
},
"url-status": {
"label": "URL status",
"description": "If set to 'live', the title displays as the live link; if set to dead, the title displays as the archive link",
"type": "string"
},
"mode": {
"label": "mode",
"description": "Similar to the parameter used by cs1|2 templates, when set to cs2, element separator switches from dot to comma; static text is rendered in lowercase; rendering omits the trailing dot",
"type": "string"
}
},
"description": "A template for citing box office data on Box Office Mojo"
}
</templatedata> -->
== Redirects ==
# {{tlx|Cite box office mojo}}
<includeonly>{{sandbox other||
<!-- Categories below this line, please; interwikis at Wikidata -->
}}</includeonly>
jfituyhaaum6b1bxgki45p9fkp1sv3v
801744
801743
2020-02-14T20:40:28Z
en>Favre1fan93
0
/* TemplateData */
801744
wikitext
text/x-wiki
{{Documentation subpage}}
<!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
A template for citing box office data on Box Office Mojo.
== Usage ==
{{csdoc|usage}}
{| class="wikitable" style="width: 100%"
|+ Required parameters only, in horizontal format
|- style="vertical-align:top;"
|
: <code><nowiki>{{cite BOM |id= |title= }}</nowiki></code>
{{end}}
{{csdoc|usage full}}
: <code><nowiki>{{cite BOM |id= |title= |access-date= |archive-url= |archive-date= |url-status= |mode= }}</nowiki></code>
{{end}}
{{A note|1=}} The {{para|id}} parameter is the same as the film's IMDb id.
== Examples ==
'''<code><nowiki>{{Cite BOM |id=0120338 |title=Titanic}}</nowiki></code>'''
: {{Cite BOM |id=0120338 |title=Titanic}}
'''<code><nowiki>{{Cite BOM |id=0120338 |title=Titanic |accessdate=February 14, 2020}}</nowiki></code>'''
: {{Cite BOM |id=0120338 |title=Titanic |accessdate=February 14, 2020}}
'''<code><nowiki>{{Cite BOM |id=0120338 |title=Titanic |accessdate=February 14, 2020 |mode=cs2}}</nowiki></code>'''
: {{Cite BOM |id=0120338 |title=Titanic |accessdate=February 14, 2020 |mode=cs2}}
== Error detection ==
* The parameters {{para|id}}, and {{para|title}} are '''{{red|required}}'''. If omitted or left blank, errors will be reported. For example:
*: '''<code><nowiki>{{Cite BOM|title=I'm an incomplete citation!}}</nowiki></code>'''
*:: {{Cite BOM|title=I'm an incomplete citation!}}
== TemplateData ==
{{TemplateData header}}
<templatedata>
{
"params": {
"id": {
"label": "id",
"description": "Number of the Box Office Mojo title, taken from the numbers at the end of its Box Office Mojo URL (exclude the leading 'tt')",
"type": "string",
"required": true
},
"title": {
"label": "title",
"description": "The name of the film",
"type": "string",
"required": true
},
"access-date": {
"aliases": [
"accessdate"
],
"label": "access date",
"description": "The full date when the site was accessed; do not wikilink"
},
"archive-url": {
"label": "archive URL",
"aliases": [
"archiveurl"
],
"description": "The URL of an archived copy of a web page, if or in case the URL becomes unavailable; requires 'archive-date'",
"type": "string"
},
"archive-date": {
"label": "archive date",
"aliases": [
"archivedate"
],
"description": "Date when the original URL was archived; do not wikilink",
"type": "string"
},
"url-status": {
"label": "URL status",
"description": "If set to 'live', the title displays as the live link; if set to dead, the title displays as the archive link",
"type": "string"
},
"mode": {
"label": "mode",
"description": "Similar to the parameter used by cs1|2 templates, when set to cs2, element separator switches from dot to comma; static text is rendered in lowercase; rendering omits the trailing dot",
"type": "string"
}
},
"description": "A template for citing box office data on Box Office Mojo"
}
</templatedata>
== Redirects ==
# {{tlx|Cite box office mojo}}
<includeonly>{{sandbox other||
<!-- Categories below this line, please; interwikis at Wikidata -->
}}</includeonly>
k0n37cyooeldpp6djolcnpsjiqpnq7q
801745
801744
2020-12-05T15:27:29Z
en>Chompy Ace
0
801745
wikitext
text/x-wiki
{{Documentation subpage}}
<!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
A template for citing box office data on Box Office Mojo.
== Usage ==
{{Template shortcut|cite box office mojo}}
{{csdoc|usage}}
{| class="wikitable" style="width: 100%"
|+ Required parameters only, in horizontal format
|- style="vertical-align:top;"
|
: <code><nowiki>{{cite BOM |id= |title= }}</nowiki></code>
{{end}}
{{csdoc|usage full}}
: <code><nowiki>{{cite BOM |id= |title= |access-date= |archive-url= |archive-date= |url-status= |mode= }}</nowiki></code>
{{end}}
{{A note|1=}} The {{para|id}} parameter is the same as the film's IMDb id.
== Examples ==
'''<code><nowiki>{{Cite BOM |id=0120338 |title=Titanic}}</nowiki></code>'''
: {{Cite BOM |id=0120338 |title=Titanic}}
'''<code><nowiki>{{Cite BOM |id=0120338 |title=Titanic |accessdate=February 14, 2020}}</nowiki></code>'''
: {{Cite BOM |id=0120338 |title=Titanic |accessdate=February 14, 2020}}
'''<code><nowiki>{{Cite BOM |id=0120338 |title=Titanic |accessdate=February 14, 2020 |mode=cs2}}</nowiki></code>'''
: {{Cite BOM |id=0120338 |title=Titanic |accessdate=February 14, 2020 |mode=cs2}}
== Error detection ==
* The parameters {{para|id}}, and {{para|title}} are '''{{red|required}}'''. If omitted or left blank, errors will be reported. For example:
*: '''<code><nowiki>{{Cite BOM|title=I'm an incomplete citation!}}</nowiki></code>'''
*:: {{Cite BOM|title=I'm an incomplete citation!}}
== TemplateData ==
{{TemplateData header}}
<templatedata>
{
"params": {
"id": {
"label": "id",
"description": "Number of the Box Office Mojo title, taken from the numbers at the end of its Box Office Mojo URL (exclude the leading 'tt')",
"type": "string",
"required": true
},
"title": {
"label": "title",
"description": "The name of the film",
"type": "string",
"required": true
},
"access-date": {
"aliases": [
"accessdate"
],
"label": "access date",
"description": "The full date when the site was accessed; do not wikilink"
},
"archive-url": {
"label": "archive URL",
"aliases": [
"archiveurl"
],
"description": "The URL of an archived copy of a web page, if or in case the URL becomes unavailable; requires 'archive-date'",
"type": "string"
},
"archive-date": {
"label": "archive date",
"aliases": [
"archivedate"
],
"description": "Date when the original URL was archived; do not wikilink",
"type": "string"
},
"url-status": {
"label": "URL status",
"description": "If set to 'live', the title displays as the live link; if set to dead, the title displays as the archive link",
"type": "string"
},
"mode": {
"label": "mode",
"description": "Similar to the parameter used by cs1|2 templates, when set to cs2, element separator switches from dot to comma; static text is rendered in lowercase; rendering omits the trailing dot",
"type": "string"
}
},
"description": "A template for citing box office data on Box Office Mojo"
}
</templatedata>
<includeonly>{{sandbox other||
<!-- Categories below this line, please; interwikis at Wikidata -->
}}</includeonly>
qnibq58i73uoelaa3ds9l1pxj4sypop
801746
801745
2020-12-05T15:32:48Z
en>Chompy Ace
0
801746
wikitext
text/x-wiki
{{Documentation subpage}}
<!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
A template for citing box office data on [[Box Office Mojo]].
== Usage ==
{{Template shortcut|cite box office mojo}}
{{csdoc|usage}}
{| class="wikitable" style="width: 100%"
|+ Required parameters only, in horizontal format
|- style="vertical-align:top;"
|
: <code><nowiki>{{cite BOM |id= |title= }}</nowiki></code>
{{end}}
{{csdoc|usage full}}
: <code><nowiki>{{cite BOM |id= |title= |access-date= |archive-url= |archive-date= |url-status= |mode= }}</nowiki></code>
{{end}}
{{A note|1=}} The {{para|id}} parameter is the same as the film's IMDb id.
== Examples ==
'''<code><nowiki>{{Cite BOM |id=0120338 |title=Titanic}}</nowiki></code>'''
: {{Cite BOM |id=0120338 |title=Titanic}}
'''<code><nowiki>{{Cite BOM |id=0120338 |title=Titanic |accessdate=February 14, 2020}}</nowiki></code>'''
: {{Cite BOM |id=0120338 |title=Titanic |accessdate=February 14, 2020}}
'''<code><nowiki>{{Cite BOM |id=0120338 |title=Titanic |accessdate=February 14, 2020 |mode=cs2}}</nowiki></code>'''
: {{Cite BOM |id=0120338 |title=Titanic |accessdate=February 14, 2020 |mode=cs2}}
== Error detection ==
* The parameters {{para|id}}, and {{para|title}} are '''{{red|required}}'''. If omitted or left blank, errors will be reported. For example:
*: '''<code><nowiki>{{Cite BOM|title=I'm an incomplete citation!}}</nowiki></code>'''
*:: {{Cite BOM|title=I'm an incomplete citation!}}
== TemplateData ==
{{TemplateData header}}
<templatedata>
{
"params": {
"id": {
"label": "id",
"description": "Number of the Box Office Mojo title, taken from the numbers at the end of its Box Office Mojo URL (exclude the leading 'tt')",
"type": "string",
"required": true
},
"title": {
"label": "title",
"description": "The name of the film",
"type": "string",
"required": true
},
"access-date": {
"aliases": [
"accessdate"
],
"label": "access date",
"description": "The full date when the site was accessed; do not wikilink"
},
"archive-url": {
"label": "archive URL",
"aliases": [
"archiveurl"
],
"description": "The URL of an archived copy of a web page, if or in case the URL becomes unavailable; requires 'archive-date'",
"type": "string"
},
"archive-date": {
"label": "archive date",
"aliases": [
"archivedate"
],
"description": "Date when the original URL was archived; do not wikilink",
"type": "string"
},
"url-status": {
"label": "URL status",
"description": "If set to 'live', the title displays as the live link; if set to dead, the title displays as the archive link",
"type": "string"
},
"mode": {
"label": "mode",
"description": "Similar to the parameter used by cs1|2 templates, when set to cs2, element separator switches from dot to comma; static text is rendered in lowercase; rendering omits the trailing dot",
"type": "string"
}
},
"description": "A template for citing box office data on Box Office Mojo"
}
</templatedata>
<includeonly>{{sandbox other||
<!-- Categories below this line, please; interwikis at Wikidata -->
}}</includeonly>
dvk1esk9n2mc49ny6lalu80wi9f5oam
801747
801746
2020-12-10T02:34:03Z
en>Jonesey95
0
Fix [[Special:LintErrors|Linter]] errors
801747
wikitext
text/x-wiki
{{Documentation subpage}}
<!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
A template for citing box office data on [[Box Office Mojo]].
== Usage ==
{{Template shortcut|cite box office mojo}}
{{csdoc|usage}}
{| class="wikitable" style="width: 100%"
|+ Required parameters only, in horizontal format
|- style="vertical-align:top;"
|
: <code><nowiki>{{cite BOM |id= |title= }}</nowiki></code>
{{end}}
{{csdoc|usage full}}
: <code><nowiki>{{cite BOM |id= |title= |access-date= |archive-url= |archive-date= |url-status= |mode= }}</nowiki></code>
{{end}}
{{A note}} The {{para|id}} parameter is the same as the film's IMDb id.
== Examples ==
'''<code><nowiki>{{Cite BOM |id=0120338 |title=Titanic}}</nowiki></code>'''
: {{Cite BOM |id=0120338 |title=Titanic}}
'''<code><nowiki>{{Cite BOM |id=0120338 |title=Titanic |accessdate=February 14, 2020}}</nowiki></code>'''
: {{Cite BOM |id=0120338 |title=Titanic |accessdate=February 14, 2020}}
'''<code><nowiki>{{Cite BOM |id=0120338 |title=Titanic |accessdate=February 14, 2020 |mode=cs2}}</nowiki></code>'''
: {{Cite BOM |id=0120338 |title=Titanic |accessdate=February 14, 2020 |mode=cs2}}
== Error detection ==
* The parameters {{para|id}}, and {{para|title}} are '''{{red|required}}'''. If omitted or left blank, errors will be reported. For example:
*: '''<code><nowiki>{{Cite BOM|title=I'm an incomplete citation!}}</nowiki></code>'''
*:: {{Cite BOM|title=I'm an incomplete citation!}}
== TemplateData ==
{{TemplateData header}}
<templatedata>
{
"params": {
"id": {
"label": "id",
"description": "Number of the Box Office Mojo title, taken from the numbers at the end of its Box Office Mojo URL (exclude the leading 'tt')",
"type": "string",
"required": true
},
"title": {
"label": "title",
"description": "The name of the film",
"type": "string",
"required": true
},
"access-date": {
"aliases": [
"accessdate"
],
"label": "access date",
"description": "The full date when the site was accessed; do not wikilink"
},
"archive-url": {
"label": "archive URL",
"aliases": [
"archiveurl"
],
"description": "The URL of an archived copy of a web page, if or in case the URL becomes unavailable; requires 'archive-date'",
"type": "string"
},
"archive-date": {
"label": "archive date",
"aliases": [
"archivedate"
],
"description": "Date when the original URL was archived; do not wikilink",
"type": "string"
},
"url-status": {
"label": "URL status",
"description": "If set to 'live', the title displays as the live link; if set to dead, the title displays as the archive link",
"type": "string"
},
"mode": {
"label": "mode",
"description": "Similar to the parameter used by cs1|2 templates, when set to cs2, element separator switches from dot to comma; static text is rendered in lowercase; rendering omits the trailing dot",
"type": "string"
}
},
"description": "A template for citing box office data on Box Office Mojo"
}
</templatedata>
<includeonly>{{sandbox other||
<!-- Categories below this line, please; interwikis at Wikidata -->
}}</includeonly>
tcrzkx6pi1vcdq8kfz6oi6tfdbbzn47
801748
801747
2020-12-22T00:18:14Z
en>Funandtrvl
0
add category
801748
wikitext
text/x-wiki
{{Documentation subpage}}
<!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
{{Template shortcut|cite box office mojo}}
A template for citing box office data on [[Box Office Mojo]].
== Usage ==
{{csdoc|usage}}
{| class="wikitable" style="width: 100%"
|+ Required parameters only, in horizontal format
|- style="vertical-align:top;"
|
: <code><nowiki>{{cite BOM |id= |title= }}</nowiki></code>
{{end}}
{{csdoc|usage full}}
: <code><nowiki>{{cite BOM |id= |title= |access-date= |archive-url= |archive-date= |url-status= |mode= }}</nowiki></code>
{{end}}
{{A note}} The {{para|id}} parameter is the same as the film's IMDb id.
== Examples ==
'''<code><nowiki>{{Cite BOM |id=0120338 |title=Titanic}}</nowiki></code>'''
: {{Cite BOM |id=0120338 |title=Titanic}}
'''<code><nowiki>{{Cite BOM |id=0120338 |title=Titanic |accessdate=February 14, 2020}}</nowiki></code>'''
: {{Cite BOM |id=0120338 |title=Titanic |accessdate=February 14, 2020}}
'''<code><nowiki>{{Cite BOM |id=0120338 |title=Titanic |accessdate=February 14, 2020 |mode=cs2}}</nowiki></code>'''
: {{Cite BOM |id=0120338 |title=Titanic |accessdate=February 14, 2020 |mode=cs2}}
== Error detection ==
* The parameters {{para|id}}, and {{para|title}} are '''{{red|required}}'''. If omitted or left blank, errors will be reported. For example:
{{nowiki template demo|code=<nowiki>{{Cite BOM|title=I'm an incomplete citation!}}</nowiki>}}
== TemplateData ==
{{TemplateData header}}
<templatedata>
{
"params": {
"id": {
"label": "id",
"description": "Number of the Box Office Mojo title, taken from the numbers at the end of its Box Office Mojo URL (exclude the leading 'tt')",
"type": "string",
"required": true
},
"title": {
"label": "title",
"description": "The name of the film",
"type": "string",
"required": true
},
"access-date": {
"aliases": [
"accessdate"
],
"label": "access date",
"description": "The full date when the site was accessed; do not wikilink"
},
"archive-url": {
"label": "archive URL",
"aliases": [
"archiveurl"
],
"description": "The URL of an archived copy of a web page, if or in case the URL becomes unavailable; requires 'archive-date'",
"type": "string"
},
"archive-date": {
"label": "archive date",
"aliases": [
"archivedate"
],
"description": "Date when the original URL was archived; do not wikilink",
"type": "string"
},
"url-status": {
"label": "URL status",
"description": "If set to 'live', the title displays as the live link; if set to dead, the title displays as the archive link",
"type": "string"
},
"mode": {
"label": "mode",
"description": "Similar to the parameter used by cs1|2 templates, when set to cs2, element separator switches from dot to comma; static text is rendered in lowercase; rendering omits the trailing dot",
"type": "string"
}
},
"description": "A template for citing box office data on Box Office Mojo"
}
</templatedata>
<includeonly>{{sandbox other||
<!-- Categories below this line, please; interwikis at Wikidata -->
[[Category:Specific-source templates]]
}}</includeonly>
6jafwaw2jh4kierhh5n7q20r2rqvrbk
801749
801748
2020-12-22T00:23:45Z
en>Funandtrvl
0
add demo
801749
wikitext
text/x-wiki
{{Documentation subpage}}
<!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
{{Template shortcut|cite box office mojo}}
A template for citing box office data on [[Box Office Mojo]].
== Usage ==
{{csdoc|usage}}
{| class="wikitable" style="width: 100%"
|+ Required parameters only, in horizontal format
|- style="vertical-align:top;"
|
: <code><nowiki>{{cite BOM |id= |title= }}</nowiki></code>
{{end}}
{{csdoc|usage full}}
: <code><nowiki>{{cite BOM |id= |title= |access-date= |archive-url= |archive-date= |url-status= |mode= }}</nowiki></code>
{{end}}
{{A note}} The {{para|id}} parameter is the same as the film's IMDb id.
== Examples ==
'''<code><nowiki>{{Cite BOM |id=0120338 |title=Titanic}}</nowiki></code>'''
: {{Cite BOM |id=0120338 |title=Titanic}}
'''<code><nowiki>{{Cite BOM |id=0120338 |title=Titanic |accessdate=February 14, 2020}}</nowiki></code>'''
: {{Cite BOM |id=0120338 |title=Titanic |accessdate=February 14, 2020}}
'''<code><nowiki>{{Cite BOM |id=0120338 |title=Titanic |accessdate=February 14, 2020 |mode=cs2}}</nowiki></code>'''
: {{Cite BOM |id=0120338 |title=Titanic |accessdate=February 14, 2020 |mode=cs2}}
== Error detection ==
* The parameters {{para|id}}, and {{para|title}} are '''{{red|required}}'''. If omitted or left blank, errors will be reported. For example:
{{demo
|demo_kill_categories =yes
|<nowiki>{{Cite BOM|title=I'm an incomplete citation!}}</nowiki>
}}
== TemplateData ==
{{TemplateData header}}
<templatedata>
{
"params": {
"id": {
"label": "id",
"description": "Number of the Box Office Mojo title, taken from the numbers at the end of its Box Office Mojo URL (exclude the leading 'tt')",
"type": "string",
"required": true
},
"title": {
"label": "title",
"description": "The name of the film",
"type": "string",
"required": true
},
"access-date": {
"aliases": [
"accessdate"
],
"label": "access date",
"description": "The full date when the site was accessed; do not wikilink"
},
"archive-url": {
"label": "archive URL",
"aliases": [
"archiveurl"
],
"description": "The URL of an archived copy of a web page, if or in case the URL becomes unavailable; requires 'archive-date'",
"type": "string"
},
"archive-date": {
"label": "archive date",
"aliases": [
"archivedate"
],
"description": "Date when the original URL was archived; do not wikilink",
"type": "string"
},
"url-status": {
"label": "URL status",
"description": "If set to 'live', the title displays as the live link; if set to dead, the title displays as the archive link",
"type": "string"
},
"mode": {
"label": "mode",
"description": "Similar to the parameter used by cs1|2 templates, when set to cs2, element separator switches from dot to comma; static text is rendered in lowercase; rendering omits the trailing dot",
"type": "string"
}
},
"description": "A template for citing box office data on Box Office Mojo"
}
</templatedata>
<includeonly>{{sandbox other||
<!-- Categories below this line, please; interwikis at Wikidata -->
[[Category:Specific-source templates]]
}}</includeonly>
ezior76kaxfq2rix1axipxjz442kl0j
801750
801749
2021-02-15T20:40:17Z
en>Netoholic
0
Netoholic moved page [[Template:Cite BOM/doc]] to [[Template:Cite Box Office Mojo/doc]]: following main template
801749
wikitext
text/x-wiki
{{Documentation subpage}}
<!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
{{Template shortcut|cite box office mojo}}
A template for citing box office data on [[Box Office Mojo]].
== Usage ==
{{csdoc|usage}}
{| class="wikitable" style="width: 100%"
|+ Required parameters only, in horizontal format
|- style="vertical-align:top;"
|
: <code><nowiki>{{cite BOM |id= |title= }}</nowiki></code>
{{end}}
{{csdoc|usage full}}
: <code><nowiki>{{cite BOM |id= |title= |access-date= |archive-url= |archive-date= |url-status= |mode= }}</nowiki></code>
{{end}}
{{A note}} The {{para|id}} parameter is the same as the film's IMDb id.
== Examples ==
'''<code><nowiki>{{Cite BOM |id=0120338 |title=Titanic}}</nowiki></code>'''
: {{Cite BOM |id=0120338 |title=Titanic}}
'''<code><nowiki>{{Cite BOM |id=0120338 |title=Titanic |accessdate=February 14, 2020}}</nowiki></code>'''
: {{Cite BOM |id=0120338 |title=Titanic |accessdate=February 14, 2020}}
'''<code><nowiki>{{Cite BOM |id=0120338 |title=Titanic |accessdate=February 14, 2020 |mode=cs2}}</nowiki></code>'''
: {{Cite BOM |id=0120338 |title=Titanic |accessdate=February 14, 2020 |mode=cs2}}
== Error detection ==
* The parameters {{para|id}}, and {{para|title}} are '''{{red|required}}'''. If omitted or left blank, errors will be reported. For example:
{{demo
|demo_kill_categories =yes
|<nowiki>{{Cite BOM|title=I'm an incomplete citation!}}</nowiki>
}}
== TemplateData ==
{{TemplateData header}}
<templatedata>
{
"params": {
"id": {
"label": "id",
"description": "Number of the Box Office Mojo title, taken from the numbers at the end of its Box Office Mojo URL (exclude the leading 'tt')",
"type": "string",
"required": true
},
"title": {
"label": "title",
"description": "The name of the film",
"type": "string",
"required": true
},
"access-date": {
"aliases": [
"accessdate"
],
"label": "access date",
"description": "The full date when the site was accessed; do not wikilink"
},
"archive-url": {
"label": "archive URL",
"aliases": [
"archiveurl"
],
"description": "The URL of an archived copy of a web page, if or in case the URL becomes unavailable; requires 'archive-date'",
"type": "string"
},
"archive-date": {
"label": "archive date",
"aliases": [
"archivedate"
],
"description": "Date when the original URL was archived; do not wikilink",
"type": "string"
},
"url-status": {
"label": "URL status",
"description": "If set to 'live', the title displays as the live link; if set to dead, the title displays as the archive link",
"type": "string"
},
"mode": {
"label": "mode",
"description": "Similar to the parameter used by cs1|2 templates, when set to cs2, element separator switches from dot to comma; static text is rendered in lowercase; rendering omits the trailing dot",
"type": "string"
}
},
"description": "A template for citing box office data on Box Office Mojo"
}
</templatedata>
<includeonly>{{sandbox other||
<!-- Categories below this line, please; interwikis at Wikidata -->
[[Category:Specific-source templates]]
}}</includeonly>
ezior76kaxfq2rix1axipxjz442kl0j
801751
801750
2021-02-15T21:05:48Z
en>Favre1fan93
0
801751
wikitext
text/x-wiki
{{Documentation subpage}}
<!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
{{Template shortcut|Cite BOM}}
{{CS1 wrapper |type= |base=Cite web}}
A template for citing box office data on [[Box Office Mojo]].
== Usage ==
{{csdoc|usage}}
{| class="wikitable" style="width: 100%"
|+ Required parameters only, in horizontal format
|- style="vertical-align:top;"
|
: <code><nowiki>{{Cite Box Office Mojo |id= |title=}}</nowiki></code>
{{end}}
{{csdoc|usage full}}
: <code><nowiki>{{Cite Box Office Mojo |id= |title= |access-date= |archive-url= |archive-date= |url-status= |mode= |publisher_hide= }}</nowiki></code>
{{end}}
{{A note}} The {{para|id}} parameter is the same as the film's IMDb id.
== Examples ==
'''<code><nowiki>{{Cite Box Office Mojo |id=0120338 |title=Titanic}}</nowiki></code>'''
: {{Cite Box Office Mojo |id=0120338 |title=Titanic}}
'''<code><nowiki>{{Cite Box Office Mojo |id=0120338 |title=Titanic |accessdate=February 14, 2020}}</nowiki></code>'''
: {{Cite Box Office Mojo |id=0120338 |title=Titanic |accessdate=February 14, 2020}}
'''<code><nowiki>{{Cite Box Office Mojo |id=0120338 |title=Titanic |accessdate=February 14, 2020 |mode=cs2}}</nowiki></code>'''
: {{Cite Box Office Mojo |id=0120338 |title=Titanic |accessdate=February 14, 2020 |mode=cs2}}
== Error detection ==
* The parameters {{para|id}}, and {{para|title}} are '''{{red|required}}'''. If omitted or left blank, errors will be reported. For example:
{{demo
|demo_kill_categories =yes
|<nowiki>{{Cite Box Office Mojo|title=I'm an incomplete citation!}}</nowiki>
}}
== TemplateData ==
{{TemplateData header}}
<templatedata>
{
"params": {
"id": {
"label": "id",
"description": "Number of the Box Office Mojo title, taken from the numbers at the end of its Box Office Mojo URL (exclude the leading 'tt')",
"type": "string",
"required": true
},
"title": {
"label": "title",
"description": "The name of the film",
"type": "string",
"required": true
},
"publisher_hide": {
"label": "publisher_hide",
"description": "To hide the publisher parameter",
"type": "string",
"required": false
},
"access-date": {
"aliases": [
"accessdate"
],
"label": "access date",
"description": "The full date when the site was accessed; do not wikilink"
},
"archive-url": {
"label": "archive URL",
"aliases": [
"archiveurl"
],
"description": "The URL of an archived copy of a web page, if or in case the URL becomes unavailable; requires 'archive-date'",
"type": "string"
},
"archive-date": {
"label": "archive date",
"aliases": [
"archivedate"
],
"description": "Date when the original URL was archived; do not wikilink",
"type": "string"
},
"url-status": {
"label": "URL status",
"description": "If set to 'live', the title displays as the live link; if set to dead, the title displays as the archive link",
"type": "string"
},
"mode": {
"label": "mode",
"description": "Similar to the parameter used by cs1|2 templates, when set to cs2, element separator switches from dot to comma; static text is rendered in lowercase; rendering omits the trailing dot",
"type": "string"
}
},
"description": "A template for citing box office data on Box Office Mojo"
}
</templatedata>
<includeonly>{{sandbox other||
<!-- Categories below this line, please; interwikis at Wikidata -->
[[Category:Specific-source templates]]
}}</includeonly>
mq0m2osjmk4t3hvqhri6q6qyexmnm4h
801752
801751
2022-04-13T19:43:54Z
en>Indagate
0
Change access-date and archive-date parameters to date format so automatically adjust based on templates like Use DMY Dates etc
801752
wikitext
text/x-wiki
{{Documentation subpage}}
<!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
{{Template shortcut|Cite BOM}}
{{CS1 wrapper |type= |base=Cite web}}
A template for citing box office data on [[Box Office Mojo]].
== Usage ==
{{csdoc|usage}}
{| class="wikitable" style="width: 100%"
|+ Required parameters only, in horizontal format
|- style="vertical-align:top;"
|
: <code><nowiki>{{Cite Box Office Mojo |id= |title=}}</nowiki></code>
{{end}}
{{csdoc|usage full}}
: <code><nowiki>{{Cite Box Office Mojo |id= |title= |access-date= |archive-url= |archive-date= |url-status= |mode= |publisher_hide= }}</nowiki></code>
{{end}}
{{A note}} The {{para|id}} parameter is the same as the film's IMDb id.
== Examples ==
'''<code><nowiki>{{Cite Box Office Mojo |id=0120338 |title=Titanic}}</nowiki></code>'''
: {{Cite Box Office Mojo |id=0120338 |title=Titanic}}
'''<code><nowiki>{{Cite Box Office Mojo |id=0120338 |title=Titanic |accessdate=February 14, 2020}}</nowiki></code>'''
: {{Cite Box Office Mojo |id=0120338 |title=Titanic |accessdate=February 14, 2020}}
'''<code><nowiki>{{Cite Box Office Mojo |id=0120338 |title=Titanic |accessdate=February 14, 2020 |mode=cs2}}</nowiki></code>'''
: {{Cite Box Office Mojo |id=0120338 |title=Titanic |accessdate=February 14, 2020 |mode=cs2}}
== Error detection ==
* The parameters {{para|id}}, and {{para|title}} are '''{{red|required}}'''. If omitted or left blank, errors will be reported. For example:
{{demo
|demo_kill_categories =yes
|<nowiki>{{Cite Box Office Mojo|title=I'm an incomplete citation!}}</nowiki>
}}
== TemplateData ==
{{TemplateData header}}
<templatedata>
{
"params": {
"id": {
"label": "id",
"description": "Number of the Box Office Mojo title, taken from the numbers at the end of its Box Office Mojo URL (exclude the leading 'tt')",
"type": "string",
"required": true
},
"title": {
"label": "title",
"description": "The name of the film",
"type": "string",
"required": true
},
"publisher_hide": {
"label": "publisher_hide",
"description": "To hide the publisher parameter",
"type": "string",
"required": false
},
"access-date": {
"aliases": [
"accessdate"
],
"label": "access date",
"description": "The full date when the site was accessed; do not wikilink",
"type": "date"
},
"archive-url": {
"label": "archive URL",
"aliases": [
"archiveurl"
],
"description": "The URL of an archived copy of a web page, if or in case the URL becomes unavailable; requires 'archive-date'",
"type": "string"
},
"archive-date": {
"label": "archive date",
"aliases": [
"archivedate"
],
"description": "Date when the original URL was archived; do not wikilink",
"type": "date"
},
"url-status": {
"label": "URL status",
"description": "If set to 'live', the title displays as the live link; if set to dead, the title displays as the archive link",
"type": "string"
},
"mode": {
"label": "mode",
"description": "Similar to the parameter used by cs1|2 templates, when set to cs2, element separator switches from dot to comma; static text is rendered in lowercase; rendering omits the trailing dot",
"type": "string"
}
},
"description": "A template for citing box office data on Box Office Mojo"
}
</templatedata>
<includeonly>{{sandbox other||
<!-- Categories below this line, please; interwikis at Wikidata -->
[[Category:Specific-source templates]]
}}</includeonly>
kaifzxv63rbb53odjpac89p1xr7enmw
801753
801752
2022-04-17T04:00:00Z
en>Zyxw
0
add link and categories
801753
wikitext
text/x-wiki
{{Documentation subpage}}
<!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
{{Template shortcut|Cite BOM}}
{{Uses Wikidata|P345}}
{{CS1 wrapper |type= |base=Cite web}}
A template for citing box office data on [[Box Office Mojo]].
== Usage ==
{{csdoc|usage}}
{| class="wikitable" style="width: 100%"
|+ Required parameters only, in horizontal format
|- style="vertical-align:top;"
|
: <code><nowiki>{{Cite Box Office Mojo |id= |title=}}</nowiki></code>
{{end}}
{{csdoc|usage full}}
: <code><nowiki>{{Cite Box Office Mojo |id= |title= |access-date= |archive-url= |archive-date= |url-status= |mode= |publisher_hide= }}</nowiki></code>
{{end}}
{{A note}} The {{para|id}} parameter is the same as the film's IMDb id.
== Examples ==
'''<code><nowiki>{{Cite Box Office Mojo |id=0120338 |title=Titanic}}</nowiki></code>'''
: {{Cite Box Office Mojo |id=0120338 |title=Titanic}}
'''<code><nowiki>{{Cite Box Office Mojo |id=0120338 |title=Titanic |accessdate=February 14, 2020}}</nowiki></code>'''
: {{Cite Box Office Mojo |id=0120338 |title=Titanic |accessdate=February 14, 2020}}
'''<code><nowiki>{{Cite Box Office Mojo |id=0120338 |title=Titanic |accessdate=February 14, 2020 |mode=cs2}}</nowiki></code>'''
: {{Cite Box Office Mojo |id=0120338 |title=Titanic |accessdate=February 14, 2020 |mode=cs2}}
== Error detection ==
* The parameters {{para|id}}, and {{para|title}} are '''{{red|required}}'''. If omitted or left blank, errors will be reported. For example:
{{demo
|demo_kill_categories =yes
|<nowiki>{{Cite Box Office Mojo|title=I'm an incomplete citation!}}</nowiki>
}}
== TemplateData ==
{{TemplateData header}}
<templatedata>
{
"params": {
"id": {
"label": "id",
"description": "Number of the Box Office Mojo title, taken from the numbers at the end of its Box Office Mojo URL (exclude the leading 'tt')",
"type": "string",
"required": true
},
"title": {
"label": "title",
"description": "The name of the film",
"type": "string",
"required": true
},
"publisher_hide": {
"label": "publisher_hide",
"description": "To hide the publisher parameter",
"type": "string",
"required": false
},
"access-date": {
"aliases": [
"accessdate"
],
"label": "access date",
"description": "The full date when the site was accessed; do not wikilink",
"type": "date"
},
"archive-url": {
"label": "archive URL",
"aliases": [
"archiveurl"
],
"description": "The URL of an archived copy of a web page, if or in case the URL becomes unavailable; requires 'archive-date'",
"type": "string"
},
"archive-date": {
"label": "archive date",
"aliases": [
"archivedate"
],
"description": "Date when the original URL was archived; do not wikilink",
"type": "date"
},
"url-status": {
"label": "URL status",
"description": "If set to 'live', the title displays as the live link; if set to dead, the title displays as the archive link",
"type": "string"
},
"mode": {
"label": "mode",
"description": "Similar to the parameter used by cs1|2 templates, when set to cs2, element separator switches from dot to comma; static text is rendered in lowercase; rendering omits the trailing dot",
"type": "string"
}
},
"description": "A template for citing box office data on Box Office Mojo"
}
</templatedata>
<includeonly>{{sandbox other||
<!-- Categories below this line, please; interwikis at Wikidata -->
[[Category:Specific-source templates]]
[[Category:Film external link templates]]
[[Category:External link templates using Wikidata]]
}}</includeonly>
f25vicffmjbcee8peughjbtkg17orcs
801754
801753
2022-04-17T04:12:31Z
en>Zyxw
0
/* Error detection */ update
801754
wikitext
text/x-wiki
{{Documentation subpage}}
<!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
{{Template shortcut|Cite BOM}}
{{Uses Wikidata|P345}}
{{CS1 wrapper |type= |base=Cite web}}
A template for citing box office data on [[Box Office Mojo]].
== Usage ==
{{csdoc|usage}}
{| class="wikitable" style="width: 100%"
|+ Required parameters only, in horizontal format
|- style="vertical-align:top;"
|
: <code><nowiki>{{Cite Box Office Mojo |id= |title=}}</nowiki></code>
{{end}}
{{csdoc|usage full}}
: <code><nowiki>{{Cite Box Office Mojo |id= |title= |access-date= |archive-url= |archive-date= |url-status= |mode= |publisher_hide= }}</nowiki></code>
{{end}}
{{A note}} The {{para|id}} parameter is the same as the film's IMDb id.
== Examples ==
'''<code><nowiki>{{Cite Box Office Mojo |id=0120338 |title=Titanic}}</nowiki></code>'''
: {{Cite Box Office Mojo |id=0120338 |title=Titanic}}
'''<code><nowiki>{{Cite Box Office Mojo |id=0120338 |title=Titanic |accessdate=February 14, 2020}}</nowiki></code>'''
: {{Cite Box Office Mojo |id=0120338 |title=Titanic |accessdate=February 14, 2020}}
'''<code><nowiki>{{Cite Box Office Mojo |id=0120338 |title=Titanic |accessdate=February 14, 2020 |mode=cs2}}</nowiki></code>'''
: {{Cite Box Office Mojo |id=0120338 |title=Titanic |accessdate=February 14, 2020 |mode=cs2}}
== Error detection ==
The parameters {{para|id}} and {{para|title}} are '''{{red|required}}'''. If omitted or left blank, errors will be reported.
Examples:
{{demo
|demo_kill_categories =yes
|<nowiki>{{Cite Box Office Mojo|title=I'm an incomplete citation!}}</nowiki>
}}
{{demo
|demo_kill_categories =yes
|<nowiki>{{Cite Box Office Mojo|id=1}}</nowiki>
}}
{{demo
|demo_kill_categories =yes
|<nowiki>{{Cite Box Office Mojo|id=|title=}}</nowiki>
}}
== TemplateData ==
{{TemplateData header}}
<templatedata>
{
"params": {
"id": {
"label": "id",
"description": "Number of the Box Office Mojo title, taken from the numbers at the end of its Box Office Mojo URL (exclude the leading 'tt')",
"type": "string",
"required": true
},
"title": {
"label": "title",
"description": "The name of the film",
"type": "string",
"required": true
},
"publisher_hide": {
"label": "publisher_hide",
"description": "To hide the publisher parameter",
"type": "string",
"required": false
},
"access-date": {
"aliases": [
"accessdate"
],
"label": "access date",
"description": "The full date when the site was accessed; do not wikilink",
"type": "date"
},
"archive-url": {
"label": "archive URL",
"aliases": [
"archiveurl"
],
"description": "The URL of an archived copy of a web page, if or in case the URL becomes unavailable; requires 'archive-date'",
"type": "string"
},
"archive-date": {
"label": "archive date",
"aliases": [
"archivedate"
],
"description": "Date when the original URL was archived; do not wikilink",
"type": "date"
},
"url-status": {
"label": "URL status",
"description": "If set to 'live', the title displays as the live link; if set to dead, the title displays as the archive link",
"type": "string"
},
"mode": {
"label": "mode",
"description": "Similar to the parameter used by cs1|2 templates, when set to cs2, element separator switches from dot to comma; static text is rendered in lowercase; rendering omits the trailing dot",
"type": "string"
}
},
"description": "A template for citing box office data on Box Office Mojo"
}
</templatedata>
<includeonly>{{sandbox other||
<!-- Categories below this line, please; interwikis at Wikidata -->
[[Category:Specific-source templates]]
[[Category:Film external link templates]]
[[Category:External link templates using Wikidata]]
}}</includeonly>
p6fnbih6q5dq0pfdb2yipumzv23303t
801755
801754
2022-04-17T04:27:21Z
en>Zyxw
0
add link to tracking category
801755
wikitext
text/x-wiki
{{Documentation subpage}}
<!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
{{Template shortcut|Cite BOM}}
{{Uses Wikidata|P345}}
{{CS1 wrapper |type= |base=Cite web}}
A template for citing box office data on [[Box Office Mojo]].
== Usage ==
{{csdoc|usage}}
{| class="wikitable" style="width: 100%"
|+ Required parameters only, in horizontal format
|- style="vertical-align:top;"
|
: <code><nowiki>{{Cite Box Office Mojo |id= |title=}}</nowiki></code>
{{end}}
{{csdoc|usage full}}
: <code><nowiki>{{Cite Box Office Mojo |id= |title= |access-date= |archive-url= |archive-date= |url-status= |mode= |publisher_hide= }}</nowiki></code>
{{end}}
{{A note}} The {{para|id}} parameter is the same as the film's IMDb id.
== Examples ==
'''<code><nowiki>{{Cite Box Office Mojo |id=0120338 |title=Titanic}}</nowiki></code>'''
: {{Cite Box Office Mojo |id=0120338 |title=Titanic}}
'''<code><nowiki>{{Cite Box Office Mojo |id=0120338 |title=Titanic |accessdate=February 14, 2020}}</nowiki></code>'''
: {{Cite Box Office Mojo |id=0120338 |title=Titanic |accessdate=February 14, 2020}}
'''<code><nowiki>{{Cite Box Office Mojo |id=0120338 |title=Titanic |accessdate=February 14, 2020 |mode=cs2}}</nowiki></code>'''
: {{Cite Box Office Mojo |id=0120338 |title=Titanic |accessdate=February 14, 2020 |mode=cs2}}
== Error detection ==
The parameters {{para|id}} and {{para|title}} are '''{{red|required}}'''. If omitted or left blank, errors will be reported.
Examples:
{{demo
|demo_kill_categories =yes
|<nowiki>{{Cite Box Office Mojo|title=I'm an incomplete citation!}}</nowiki>
}}
{{demo
|demo_kill_categories =yes
|<nowiki>{{Cite Box Office Mojo|id=1}}</nowiki>
}}
{{demo
|demo_kill_categories =yes
|<nowiki>{{Cite Box Office Mojo|id=|title=}}</nowiki>
}}
== TemplateData ==
{{TemplateData header}}
<templatedata>
{
"params": {
"id": {
"label": "id",
"description": "Number of the Box Office Mojo title, taken from the numbers at the end of its Box Office Mojo URL (exclude the leading 'tt')",
"type": "string",
"required": true
},
"title": {
"label": "title",
"description": "The name of the film",
"type": "string",
"required": true
},
"publisher_hide": {
"label": "publisher_hide",
"description": "To hide the publisher parameter",
"type": "string",
"required": false
},
"access-date": {
"aliases": [
"accessdate"
],
"label": "access date",
"description": "The full date when the site was accessed; do not wikilink",
"type": "date"
},
"archive-url": {
"label": "archive URL",
"aliases": [
"archiveurl"
],
"description": "The URL of an archived copy of a web page, if or in case the URL becomes unavailable; requires 'archive-date'",
"type": "string"
},
"archive-date": {
"label": "archive date",
"aliases": [
"archivedate"
],
"description": "Date when the original URL was archived; do not wikilink",
"type": "date"
},
"url-status": {
"label": "URL status",
"description": "If set to 'live', the title displays as the live link; if set to dead, the title displays as the archive link",
"type": "string"
},
"mode": {
"label": "mode",
"description": "Similar to the parameter used by cs1|2 templates, when set to cs2, element separator switches from dot to comma; static text is rendered in lowercase; rendering omits the trailing dot",
"type": "string"
}
},
"description": "A template for citing box office data on Box Office Mojo"
}
</templatedata>
== Tracking category ==
* {{clc|Cite Box Office Mojo templates with errors}}
<includeonly>{{sandbox other||
<!-- Categories below this line, please; interwikis at Wikidata -->
[[Category:Specific-source templates]]
[[Category:Film external link templates]]
[[Category:External link templates using Wikidata]]
[[Category:Templates that add a tracking category]]
}}</includeonly>
fgkzmxdzyfzs53qj65uv3udzh6jwzqy
801756
801755
2022-04-18T13:53:22Z
en>Indagate
0
Update
801756
wikitext
text/x-wiki
{{Documentation subpage}}
<!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
{{Template shortcut|Cite BOM}}
{{Uses Wikidata|P345}}
{{CS1 wrapper |type= |base=Cite web}}
{{Lua|Module:EditAtWikidata}}
A template for citing box office data on [[Box Office Mojo]].
== Usage ==
{{csdoc|usage}}
{| class="wikitable" style="width: 100%"
|+ Basic parameters only, in horizontal format
|- style="vertical-align:top;"
|
: <code><nowiki>{{Cite Box Office Mojo |id= |title=}}</nowiki></code>
{{end}}
{{csdoc|usage full}}
: <code><nowiki>{{Cite Box Office Mojo |id= |title= |access-date= |archive-url= |archive-date= |url-status= |mode= |publisher_hide= }}</nowiki></code>
{{end}}
{{A note}} The {{para|id}} parameter is the same as the film's IMDb id.
*The field id can be left blank and will pull from [[Wikidata]] property {{Property|345}} if available, but will have an error message if no entered in template or available at Wikidata
*The field title can be left blank and will pull from the page name with parentheses
== Examples ==
'''<code><nowiki>{{Cite Box Office Mojo |id=0120338 |title=Titanic}}</nowiki></code>'''
: {{Cite Box Office Mojo |id=0120338 |title=Titanic}}
'''<code><nowiki>{{Cite Box Office Mojo |id=0120338 |title=Titanic |accessdate=February 14, 2020}}</nowiki></code>'''
: {{Cite Box Office Mojo |id=0120338 |title=Titanic |accessdate=February 14, 2020}}
'''<code><nowiki>{{Cite Box Office Mojo |id=0120338 |title=Titanic |accessdate=February 14, 2020 |mode=cs2}}</nowiki></code>'''
: {{Cite Box Office Mojo |id=0120338 |title=Titanic |accessdate=February 14, 2020 |mode=cs2}}
== Error detection ==
The parameter {{para|id}} is '''{{red|required}}''' if [[Wikidata]] property {{Property|345}} is not available. If omitted or left blank, error will be reported.
Examples:
{{demo
|demo_kill_categories =yes
|<nowiki>{{Cite Box Office Mojo|title=I'm an incomplete citation!}}</nowiki>
}}
== TemplateData ==
{{TemplateData header}}
<templatedata>
{
"params": {
"id": {
"label": "id",
"description": "Number of the IMDb title, taken from the numbers at the end of its IMDb URL. This parameter is optional if Wikidata property P345 contains an ID starting with tt, but required if not. If entered manually, should not start with tt",
"type": "string",
"required": false,
"default": "Wikidata property P345"
},
"title": {
"label": "title",
"description": "Title of the film. Defaults to the Wikipedia article name, without any disambiguation such as (film).",
"type": "string",
"required": false,
"default": "{{PAGENAMEBASE}}"
},
"publisher_hide": {
"label": "publisher_hide",
"description": "To hide the publisher parameter",
"type": "string",
"required": false
},
"access-date": {
"aliases": [
"accessdate"
],
"label": "access date",
"description": "The full date when the site was accessed; do not wikilink",
"type": "date"
},
"archive-url": {
"label": "archive URL",
"aliases": [
"archiveurl"
],
"description": "The URL of an archived copy of a web page, if or in case the URL becomes unavailable; requires 'archive-date'",
"type": "string"
},
"archive-date": {
"label": "archive date",
"aliases": [
"archivedate"
],
"description": "Date when the original URL was archived; do not wikilink",
"type": "date"
},
"url-status": {
"label": "URL status",
"description": "If set to 'live', the title displays as the live link; if set to dead, the title displays as the archive link",
"type": "string"
},
"mode": {
"label": "mode",
"description": "Similar to the parameter used by cs1|2 templates, when set to cs2, element separator switches from dot to comma; static text is rendered in lowercase; rendering omits the trailing dot",
"type": "string"
}
},
"description": "A template for citing box office data on Box Office Mojo"
}
</templatedata>
== Wikidata ==
The [[Wikidata]] project provides a central collection of information and parameters for articles for the various [[Wikimedia Foundation]] projects. This includes the IMDB title codes for films. For example, the film ''[[Space Milkshake]]'' has a corresponding [[wikidata:Q7572422|Wikidata item (Q7572422)]], which in turn includes an [[wikidata:Property:P345|IMDb identifier]]. If {{tl|IMDb title}} is invoked in an article without the "id" parameter, and if Wikidata has an IMDb identifier specified for that article's corresponding item, the IMDb link with its title code will be included automatically.
For new film articles, the IMDb identifier property (and the film title item itself) may need to be added at Wikidata first, so that the default IMDb link can be available for use on Wikipedia and other Wikimedia projects.
This Wikidata capability was implemented on the English Wikipedia as of April 2013.
Note that the title code (first parameter) can still be specified as before and this will override the Wikidata default e.g. where this template is used to link to a film whose title does not correspond to the subject of the article (for example, in the case of a single article about a film and its sequels).
The title parameter override is available to handle differences between article titles and film titles (e.g. due to [[Wikipedia:Disambiguation|disambiguation]] wording in the title). The id parameter may be left blank to default from Wikidata - for example <nowiki>{{IMDb title||Film title}}</nowiki>.
== Tracking category ==
* {{clc|Cite Box Office Mojo templates with errors}}
* {{clc|IMDb ID (Cite Mojo) same as Wikidata}}
* {{clc|IMDb ID (Cite Mojo) different from Wikidata}}
* {{clc|IMDb ID (Cite Mojo) not in Wikidata}}
==See also==
===Other IMDb templates===
*{{tl|IMDb title}}
*{{tl|IMDb name}}
*{{tl|IMDb person}}
===Similar film citation templates===
*{{tl|Cite The Numbers}}
*{{tl|Cite CinemaScore}}
*{{tl|Cite Rotten Tomatoes}}
*{{tl|Cite Metacritic}}
<includeonly>{{sandbox other||
<!-- Categories below this line, please; interwikis at Wikidata -->
[[Category:Specific-source templates]]
[[Category:External link templates using Wikidata]]
[[Category:Templates that add a tracking category]]
}}</includeonly>
d2s6av19pn880be166gzk9plbekk7pq
801757
801756
2022-06-12T19:09:11Z
en>Indagate
0
+ [[Category:IMDb templates]]
801757
wikitext
text/x-wiki
{{Documentation subpage}}
<!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
{{Template shortcut|Cite BOM}}
{{Uses Wikidata|P345}}
{{CS1 wrapper |type= |base=Cite web}}
{{Lua|Module:EditAtWikidata}}
A template for citing box office data on [[Box Office Mojo]].
== Usage ==
{{csdoc|usage}}
{| class="wikitable" style="width: 100%"
|+ Basic parameters only, in horizontal format
|- style="vertical-align:top;"
|
: <code><nowiki>{{Cite Box Office Mojo |id= |title=}}</nowiki></code>
{{end}}
{{csdoc|usage full}}
: <code><nowiki>{{Cite Box Office Mojo |id= |title= |access-date= |archive-url= |archive-date= |url-status= |mode= |publisher_hide= }}</nowiki></code>
{{end}}
{{A note}} The {{para|id}} parameter is the same as the film's IMDb id.
*The field id can be left blank and will pull from [[Wikidata]] property {{Property|345}} if available, but will have an error message if no entered in template or available at Wikidata
*The field title can be left blank and will pull from the page name with parentheses
== Examples ==
'''<code><nowiki>{{Cite Box Office Mojo |id=0120338 |title=Titanic}}</nowiki></code>'''
: {{Cite Box Office Mojo |id=0120338 |title=Titanic}}
'''<code><nowiki>{{Cite Box Office Mojo |id=0120338 |title=Titanic |accessdate=February 14, 2020}}</nowiki></code>'''
: {{Cite Box Office Mojo |id=0120338 |title=Titanic |accessdate=February 14, 2020}}
'''<code><nowiki>{{Cite Box Office Mojo |id=0120338 |title=Titanic |accessdate=February 14, 2020 |mode=cs2}}</nowiki></code>'''
: {{Cite Box Office Mojo |id=0120338 |title=Titanic |accessdate=February 14, 2020 |mode=cs2}}
== Error detection ==
The parameter {{para|id}} is '''{{red|required}}''' if [[Wikidata]] property {{Property|345}} is not available. If omitted or left blank, error will be reported.
Examples:
{{demo
|demo_kill_categories =yes
|<nowiki>{{Cite Box Office Mojo|title=I'm an incomplete citation!}}</nowiki>
}}
== TemplateData ==
{{TemplateData header}}
<templatedata>
{
"params": {
"id": {
"label": "id",
"description": "Number of the IMDb title, taken from the numbers at the end of its IMDb URL. This parameter is optional if Wikidata property P345 contains an ID starting with tt, but required if not. If entered manually, should not start with tt",
"type": "string",
"required": false,
"default": "Wikidata property P345"
},
"title": {
"label": "title",
"description": "Title of the film. Defaults to the Wikipedia article name, without any disambiguation such as (film).",
"type": "string",
"required": false,
"default": "{{PAGENAMEBASE}}"
},
"publisher_hide": {
"label": "publisher_hide",
"description": "To hide the publisher parameter",
"type": "string",
"required": false
},
"access-date": {
"aliases": [
"accessdate"
],
"label": "access date",
"description": "The full date when the site was accessed; do not wikilink",
"type": "date"
},
"archive-url": {
"label": "archive URL",
"aliases": [
"archiveurl"
],
"description": "The URL of an archived copy of a web page, if or in case the URL becomes unavailable; requires 'archive-date'",
"type": "string"
},
"archive-date": {
"label": "archive date",
"aliases": [
"archivedate"
],
"description": "Date when the original URL was archived; do not wikilink",
"type": "date"
},
"url-status": {
"label": "URL status",
"description": "If set to 'live', the title displays as the live link; if set to dead, the title displays as the archive link",
"type": "string"
},
"mode": {
"label": "mode",
"description": "Similar to the parameter used by cs1|2 templates, when set to cs2, element separator switches from dot to comma; static text is rendered in lowercase; rendering omits the trailing dot",
"type": "string"
}
},
"description": "A template for citing box office data on Box Office Mojo"
}
</templatedata>
== Wikidata ==
The [[Wikidata]] project provides a central collection of information and parameters for articles for the various [[Wikimedia Foundation]] projects. This includes the IMDB title codes for films. For example, the film ''[[Space Milkshake]]'' has a corresponding [[wikidata:Q7572422|Wikidata item (Q7572422)]], which in turn includes an [[wikidata:Property:P345|IMDb identifier]]. If {{tl|IMDb title}} is invoked in an article without the "id" parameter, and if Wikidata has an IMDb identifier specified for that article's corresponding item, the IMDb link with its title code will be included automatically.
For new film articles, the IMDb identifier property (and the film title item itself) may need to be added at Wikidata first, so that the default IMDb link can be available for use on Wikipedia and other Wikimedia projects.
This Wikidata capability was implemented on the English Wikipedia as of April 2013.
Note that the title code (first parameter) can still be specified as before and this will override the Wikidata default e.g. where this template is used to link to a film whose title does not correspond to the subject of the article (for example, in the case of a single article about a film and its sequels).
The title parameter override is available to handle differences between article titles and film titles (e.g. due to [[Wikipedia:Disambiguation|disambiguation]] wording in the title). The id parameter may be left blank to default from Wikidata - for example <nowiki>{{IMDb title||Film title}}</nowiki>.
== Tracking category ==
* {{clc|Cite Box Office Mojo templates with errors}}
* {{clc|IMDb ID (Cite Mojo) same as Wikidata}}
* {{clc|IMDb ID (Cite Mojo) different from Wikidata}}
* {{clc|IMDb ID (Cite Mojo) not in Wikidata}}
==See also==
===Other IMDb templates===
*{{tl|IMDb title}}
*{{tl|IMDb name}}
*{{tl|IMDb person}}
===Similar film citation templates===
*{{tl|Cite The Numbers}}
*{{tl|Cite CinemaScore}}
*{{tl|Cite Rotten Tomatoes}}
*{{tl|Cite Metacritic}}
<includeonly>{{sandbox other||
<!-- Categories below this line, please; interwikis at Wikidata -->
[[Category:Specific-source templates]]
[[Category:External link templates using Wikidata]]
[[Category:Templates that add a tracking category]]
[[Category:IMDb templates]]
}}</includeonly>
lry546v6tb5ha08rpt9tlcib51cx6kw
801758
801757
2022-06-14T17:31:28Z
en>Indagate
0
- deleted [[Template: Cite CinemaScore]]
801758
wikitext
text/x-wiki
{{Documentation subpage}}
<!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
{{Template shortcut|Cite BOM}}
{{Uses Wikidata|P345}}
{{CS1 wrapper |type= |base=Cite web}}
{{Lua|Module:EditAtWikidata}}
A template for citing box office data on [[Box Office Mojo]].
== Usage ==
{{csdoc|usage}}
{| class="wikitable" style="width: 100%"
|+ Basic parameters only, in horizontal format
|- style="vertical-align:top;"
|
: <code><nowiki>{{Cite Box Office Mojo |id= |title=}}</nowiki></code>
{{end}}
{{csdoc|usage full}}
: <code><nowiki>{{Cite Box Office Mojo |id= |title= |access-date= |archive-url= |archive-date= |url-status= |mode= |publisher_hide= }}</nowiki></code>
{{end}}
{{A note}} The {{para|id}} parameter is the same as the film's IMDb id.
*The field id can be left blank and will pull from [[Wikidata]] property {{Property|345}} if available, but will have an error message if no entered in template or available at Wikidata
*The field title can be left blank and will pull from the page name with parentheses
== Examples ==
'''<code><nowiki>{{Cite Box Office Mojo |id=0120338 |title=Titanic}}</nowiki></code>'''
: {{Cite Box Office Mojo |id=0120338 |title=Titanic}}
'''<code><nowiki>{{Cite Box Office Mojo |id=0120338 |title=Titanic |accessdate=February 14, 2020}}</nowiki></code>'''
: {{Cite Box Office Mojo |id=0120338 |title=Titanic |accessdate=February 14, 2020}}
'''<code><nowiki>{{Cite Box Office Mojo |id=0120338 |title=Titanic |accessdate=February 14, 2020 |mode=cs2}}</nowiki></code>'''
: {{Cite Box Office Mojo |id=0120338 |title=Titanic |accessdate=February 14, 2020 |mode=cs2}}
== Error detection ==
The parameter {{para|id}} is '''{{red|required}}''' if [[Wikidata]] property {{Property|345}} is not available. If omitted or left blank, error will be reported.
Examples:
{{demo
|demo_kill_categories =yes
|<nowiki>{{Cite Box Office Mojo|title=I'm an incomplete citation!}}</nowiki>
}}
== TemplateData ==
{{TemplateData header}}
<templatedata>
{
"params": {
"id": {
"label": "id",
"description": "Number of the IMDb title, taken from the numbers at the end of its IMDb URL. This parameter is optional if Wikidata property P345 contains an ID starting with tt, but required if not. If entered manually, should not start with tt",
"type": "string",
"required": false,
"default": "Wikidata property P345"
},
"title": {
"label": "title",
"description": "Title of the film. Defaults to the Wikipedia article name, without any disambiguation such as (film).",
"type": "string",
"required": false,
"default": "{{PAGENAMEBASE}}"
},
"publisher_hide": {
"label": "publisher_hide",
"description": "To hide the publisher parameter",
"type": "string",
"required": false
},
"access-date": {
"aliases": [
"accessdate"
],
"label": "access date",
"description": "The full date when the site was accessed; do not wikilink",
"type": "date"
},
"archive-url": {
"label": "archive URL",
"aliases": [
"archiveurl"
],
"description": "The URL of an archived copy of a web page, if or in case the URL becomes unavailable; requires 'archive-date'",
"type": "string"
},
"archive-date": {
"label": "archive date",
"aliases": [
"archivedate"
],
"description": "Date when the original URL was archived; do not wikilink",
"type": "date"
},
"url-status": {
"label": "URL status",
"description": "If set to 'live', the title displays as the live link; if set to dead, the title displays as the archive link",
"type": "string"
},
"mode": {
"label": "mode",
"description": "Similar to the parameter used by cs1|2 templates, when set to cs2, element separator switches from dot to comma; static text is rendered in lowercase; rendering omits the trailing dot",
"type": "string"
}
},
"description": "A template for citing box office data on Box Office Mojo"
}
</templatedata>
== Wikidata ==
The [[Wikidata]] project provides a central collection of information and parameters for articles for the various [[Wikimedia Foundation]] projects. This includes the IMDB title codes for films. For example, the film ''[[Space Milkshake]]'' has a corresponding [[wikidata:Q7572422|Wikidata item (Q7572422)]], which in turn includes an [[wikidata:Property:P345|IMDb identifier]]. If {{tl|IMDb title}} is invoked in an article without the "id" parameter, and if Wikidata has an IMDb identifier specified for that article's corresponding item, the IMDb link with its title code will be included automatically.
For new film articles, the IMDb identifier property (and the film title item itself) may need to be added at Wikidata first, so that the default IMDb link can be available for use on Wikipedia and other Wikimedia projects.
This Wikidata capability was implemented on the English Wikipedia as of April 2013.
Note that the title code (first parameter) can still be specified as before and this will override the Wikidata default e.g. where this template is used to link to a film whose title does not correspond to the subject of the article (for example, in the case of a single article about a film and its sequels).
The title parameter override is available to handle differences between article titles and film titles (e.g. due to [[Wikipedia:Disambiguation|disambiguation]] wording in the title). The id parameter may be left blank to default from Wikidata - for example <nowiki>{{IMDb title||Film title}}</nowiki>.
== Tracking category ==
* {{clc|Cite Box Office Mojo templates with errors}}
* {{clc|IMDb ID (Cite Mojo) same as Wikidata}}
* {{clc|IMDb ID (Cite Mojo) different from Wikidata}}
* {{clc|IMDb ID (Cite Mojo) not in Wikidata}}
==See also==
===Other IMDb templates===
*{{tl|IMDb title}}
*{{tl|IMDb name}}
*{{tl|IMDb person}}
===Similar film citation templates===
*{{tl|Cite The Numbers}}
*{{tl|Cite Rotten Tomatoes}}
*{{tl|Cite Metacritic}}
<includeonly>{{sandbox other||
<!-- Categories below this line, please; interwikis at Wikidata -->
[[Category:Specific-source templates]]
[[Category:External link templates using Wikidata]]
[[Category:Templates that add a tracking category]]
[[Category:IMDb templates]]
}}</includeonly>
a5ye3g280s3nlef2dd7xxbd9wewmyuz
801759
801758
2023-02-19T11:11:18Z
en>Gonnym
0
unrelated
801759
wikitext
text/x-wiki
{{Documentation subpage}}
<!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
{{Template shortcut|Cite BOM}}
{{Uses Wikidata|P345}}
{{CS1 wrapper |type= |base=Cite web}}
{{Lua|Module:EditAtWikidata}}
A template for citing box office data on [[Box Office Mojo]].
== Usage ==
{{csdoc|usage}}
{| class="wikitable" style="width: 100%"
|+ Basic parameters only, in horizontal format
|- style="vertical-align:top;"
|
: <code><nowiki>{{Cite Box Office Mojo |id= |title=}}</nowiki></code>
{{end}}
{{csdoc|usage full}}
: <code><nowiki>{{Cite Box Office Mojo |id= |title= |access-date= |archive-url= |archive-date= |url-status= |mode= |publisher_hide= }}</nowiki></code>
{{end}}
{{A note}} The {{para|id}} parameter is the same as the film's IMDb id.
*The field id can be left blank and will pull from [[Wikidata]] property {{Property|345}} if available, but will have an error message if no entered in template or available at Wikidata
*The field title can be left blank and will pull from the page name with parentheses
== Examples ==
'''<code><nowiki>{{Cite Box Office Mojo |id=0120338 |title=Titanic}}</nowiki></code>'''
: {{Cite Box Office Mojo |id=0120338 |title=Titanic}}
'''<code><nowiki>{{Cite Box Office Mojo |id=0120338 |title=Titanic |accessdate=February 14, 2020}}</nowiki></code>'''
: {{Cite Box Office Mojo |id=0120338 |title=Titanic |accessdate=February 14, 2020}}
'''<code><nowiki>{{Cite Box Office Mojo |id=0120338 |title=Titanic |accessdate=February 14, 2020 |mode=cs2}}</nowiki></code>'''
: {{Cite Box Office Mojo |id=0120338 |title=Titanic |accessdate=February 14, 2020 |mode=cs2}}
== Error detection ==
The parameter {{para|id}} is '''{{red|required}}''' if [[Wikidata]] property {{Property|345}} is not available. If omitted or left blank, error will be reported.
Examples:
{{demo
|demo_kill_categories =yes
|<nowiki>{{Cite Box Office Mojo|title=I'm an incomplete citation!}}</nowiki>
}}
== TemplateData ==
{{TemplateData header}}
<templatedata>
{
"params": {
"id": {
"label": "id",
"description": "Number of the IMDb title, taken from the numbers at the end of its IMDb URL. This parameter is optional if Wikidata property P345 contains an ID starting with tt, but required if not. If entered manually, should not start with tt",
"type": "string",
"required": false,
"default": "Wikidata property P345"
},
"title": {
"label": "title",
"description": "Title of the film. Defaults to the Wikipedia article name, without any disambiguation such as (film).",
"type": "string",
"required": false,
"default": "{{PAGENAMEBASE}}"
},
"publisher_hide": {
"label": "publisher_hide",
"description": "To hide the publisher parameter",
"type": "string",
"required": false
},
"access-date": {
"aliases": [
"accessdate"
],
"label": "access date",
"description": "The full date when the site was accessed; do not wikilink",
"type": "date"
},
"archive-url": {
"label": "archive URL",
"aliases": [
"archiveurl"
],
"description": "The URL of an archived copy of a web page, if or in case the URL becomes unavailable; requires 'archive-date'",
"type": "string"
},
"archive-date": {
"label": "archive date",
"aliases": [
"archivedate"
],
"description": "Date when the original URL was archived; do not wikilink",
"type": "date"
},
"url-status": {
"label": "URL status",
"description": "If set to 'live', the title displays as the live link; if set to dead, the title displays as the archive link",
"type": "string"
},
"mode": {
"label": "mode",
"description": "Similar to the parameter used by cs1|2 templates, when set to cs2, element separator switches from dot to comma; static text is rendered in lowercase; rendering omits the trailing dot",
"type": "string"
}
},
"description": "A template for citing box office data on Box Office Mojo"
}
</templatedata>
== Wikidata ==
The [[Wikidata]] project provides a central collection of information and parameters for articles for the various [[Wikimedia Foundation]] projects. This includes the IMDB title codes for films. For example, the film ''[[Space Milkshake]]'' has a corresponding [[wikidata:Q7572422|Wikidata item (Q7572422)]], which in turn includes an [[wikidata:Property:P345|IMDb identifier]]. If {{tl|IMDb title}} is invoked in an article without the "id" parameter, and if Wikidata has an IMDb identifier specified for that article's corresponding item, the IMDb link with its title code will be included automatically.
For new film articles, the IMDb identifier property (and the film title item itself) may need to be added at Wikidata first, so that the default IMDb link can be available for use on Wikipedia and other Wikimedia projects.
This Wikidata capability was implemented on the English Wikipedia as of April 2013.
Note that the title code (first parameter) can still be specified as before and this will override the Wikidata default e.g. where this template is used to link to a film whose title does not correspond to the subject of the article (for example, in the case of a single article about a film and its sequels).
The title parameter override is available to handle differences between article titles and film titles (e.g. due to [[Wikipedia:Disambiguation|disambiguation]] wording in the title). The id parameter may be left blank to default from Wikidata - for example <nowiki>{{IMDb title||Film title}}</nowiki>.
== Tracking category ==
* {{clc|Cite Box Office Mojo templates with errors}}
==See also==
===Similar film citation templates===
*{{tl|Cite The Numbers}}
*{{tl|Cite Rotten Tomatoes}}
*{{tl|Cite Metacritic}}
<includeonly>{{sandbox other||
<!-- Categories below this line, please; interwikis at Wikidata -->
[[Category:Specific-source templates]]
[[Category:External link templates using Wikidata]]
[[Category:Templates that add a tracking category]]
}}</includeonly>
6k568ra41uxra0u63gl9rvffwyfj3ub
801760
801759
2026-03-17T14:14:59Z
en>Colonies Chris
0
801760
wikitext
text/x-wiki
{{Documentation subpage}}
<!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
{{Template shortcut|Cite BOM}}
{{Uses Wikidata|P345}}
{{CS1 wrapper |type= |base=Cite web}}
{{Lua|Module:EditAtWikidata}}
A template for citing box office data on [[Box Office Mojo]].
== Usage ==
{{csdoc|usage}}
{| class="wikitable" style="width: 100%"
|+ Basic parameters only, in horizontal format
|- style="vertical-align:top;"
|
: <code><nowiki>{{Cite Box Office Mojo |id= |title=}}</nowiki></code>
{{end}}
{{csdoc|usage full}}
: <code><nowiki>{{Cite Box Office Mojo |id= |title= |access-date= |archive-url= |archive-date= |url-status= |mode= |publisher_hide= }}</nowiki></code>
{{end}}
{{A note}} The {{para|id}} parameter is the same as the film's IMDb id.
*The field id can be left blank and will pull from [[Wikidata]] property {{Wikidata property link|345}} if available, but will have an error message if no entered in template or available at Wikidata
*The field title can be left blank and will pull from the page name with parentheses
== Examples ==
'''<code><nowiki>{{Cite Box Office Mojo |id=0120338 |title=Titanic}}</nowiki></code>'''
: {{Cite Box Office Mojo |id=0120338 |title=Titanic}}
'''<code><nowiki>{{Cite Box Office Mojo |id=0120338 |title=Titanic |accessdate=February 14, 2020}}</nowiki></code>'''
: {{Cite Box Office Mojo |id=0120338 |title=Titanic |accessdate=February 14, 2020}}
'''<code><nowiki>{{Cite Box Office Mojo |id=0120338 |title=Titanic |accessdate=February 14, 2020 |mode=cs2}}</nowiki></code>'''
: {{Cite Box Office Mojo |id=0120338 |title=Titanic |accessdate=February 14, 2020 |mode=cs2}}
== Error detection ==
The parameter {{para|id}} is '''{{red|required}}''' if [[Wikidata]] property {{Wikidata property link|345}} is not available. If omitted or left blank, error will be reported.
Examples:
{{demo
|demo_kill_categories =yes
|<nowiki>{{Cite Box Office Mojo|title=I'm an incomplete citation!}}</nowiki>
}}
== TemplateData ==
{{TemplateData header}}
<templatedata>
{
"params": {
"id": {
"label": "id",
"description": "Number of the IMDb title, taken from the numbers at the end of its IMDb URL. This parameter is optional if Wikidata property P345 contains an ID starting with tt, but required if not. If entered manually, should not start with tt",
"type": "string",
"required": false,
"default": "Wikidata property P345"
},
"title": {
"label": "title",
"description": "Title of the film. Defaults to the Wikipedia article name, without any disambiguation such as (film).",
"type": "string",
"required": false,
"default": "{{PAGENAMEBASE}}"
},
"publisher_hide": {
"label": "publisher_hide",
"description": "To hide the publisher parameter",
"type": "string",
"required": false
},
"access-date": {
"aliases": [
"accessdate"
],
"label": "access date",
"description": "The full date when the site was accessed; do not wikilink",
"type": "date"
},
"archive-url": {
"label": "archive URL",
"aliases": [
"archiveurl"
],
"description": "The URL of an archived copy of a web page, if or in case the URL becomes unavailable; requires 'archive-date'",
"type": "string"
},
"archive-date": {
"label": "archive date",
"aliases": [
"archivedate"
],
"description": "Date when the original URL was archived; do not wikilink",
"type": "date"
},
"url-status": {
"label": "URL status",
"description": "If set to 'live', the title displays as the live link; if set to dead, the title displays as the archive link",
"type": "string"
},
"mode": {
"label": "mode",
"description": "Similar to the parameter used by cs1|2 templates, when set to cs2, element separator switches from dot to comma; static text is rendered in lowercase; rendering omits the trailing dot",
"type": "string"
}
},
"description": "A template for citing box office data on Box Office Mojo"
}
</templatedata>
== Wikidata ==
The [[Wikidata]] project provides a central collection of information and parameters for articles for the various [[Wikimedia Foundation]] projects. This includes the IMDB title codes for films. For example, the film ''[[Space Milkshake]]'' has a corresponding [[wikidata:Q7572422|Wikidata item (Q7572422)]], which in turn includes an [[wikidata:Property:P345|IMDb identifier]]. If {{tl|IMDb title}} is invoked in an article without the "id" parameter, and if Wikidata has an IMDb identifier specified for that article's corresponding item, the IMDb link with its title code will be included automatically.
For new film articles, the IMDb identifier property (and the film title item itself) may need to be added at Wikidata first, so that the default IMDb link can be available for use on Wikipedia and other Wikimedia projects.
This Wikidata capability was implemented on the English Wikipedia as of April 2013.
Note that the title code (first parameter) can still be specified as before and this will override the Wikidata default e.g. where this template is used to link to a film whose title does not correspond to the subject of the article (for example, in the case of a single article about a film and its sequels).
The title parameter override is available to handle differences between article titles and film titles (e.g. due to [[Wikipedia:Disambiguation|disambiguation]] wording in the title). The id parameter may be left blank to default from Wikidata - for example <nowiki>{{IMDb title||Film title}}</nowiki>.
== Tracking category ==
* {{clc|Cite Box Office Mojo templates with errors}}
==See also==
===Similar film citation templates===
*{{tl|Cite The Numbers}}
*{{tl|Cite Rotten Tomatoes}}
*{{tl|Cite Metacritic}}
<includeonly>{{sandbox other||
<!-- Categories below this line, please; interwikis at Wikidata -->
[[Category:Specific-source templates]]
[[Category:External link templates using Wikidata]]
[[Category:Templates that add a tracking category]]
}}</includeonly>
mqb3jmfi6t625juwfs2wuzht2neu4jl
801761
801760
2026-07-24T20:02:18Z
SM7
3953
21 revisions imported from [[:en:Template:Cite_Box_Office_Mojo/doc]]
801760
wikitext
text/x-wiki
{{Documentation subpage}}
<!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
{{Template shortcut|Cite BOM}}
{{Uses Wikidata|P345}}
{{CS1 wrapper |type= |base=Cite web}}
{{Lua|Module:EditAtWikidata}}
A template for citing box office data on [[Box Office Mojo]].
== Usage ==
{{csdoc|usage}}
{| class="wikitable" style="width: 100%"
|+ Basic parameters only, in horizontal format
|- style="vertical-align:top;"
|
: <code><nowiki>{{Cite Box Office Mojo |id= |title=}}</nowiki></code>
{{end}}
{{csdoc|usage full}}
: <code><nowiki>{{Cite Box Office Mojo |id= |title= |access-date= |archive-url= |archive-date= |url-status= |mode= |publisher_hide= }}</nowiki></code>
{{end}}
{{A note}} The {{para|id}} parameter is the same as the film's IMDb id.
*The field id can be left blank and will pull from [[Wikidata]] property {{Wikidata property link|345}} if available, but will have an error message if no entered in template or available at Wikidata
*The field title can be left blank and will pull from the page name with parentheses
== Examples ==
'''<code><nowiki>{{Cite Box Office Mojo |id=0120338 |title=Titanic}}</nowiki></code>'''
: {{Cite Box Office Mojo |id=0120338 |title=Titanic}}
'''<code><nowiki>{{Cite Box Office Mojo |id=0120338 |title=Titanic |accessdate=February 14, 2020}}</nowiki></code>'''
: {{Cite Box Office Mojo |id=0120338 |title=Titanic |accessdate=February 14, 2020}}
'''<code><nowiki>{{Cite Box Office Mojo |id=0120338 |title=Titanic |accessdate=February 14, 2020 |mode=cs2}}</nowiki></code>'''
: {{Cite Box Office Mojo |id=0120338 |title=Titanic |accessdate=February 14, 2020 |mode=cs2}}
== Error detection ==
The parameter {{para|id}} is '''{{red|required}}''' if [[Wikidata]] property {{Wikidata property link|345}} is not available. If omitted or left blank, error will be reported.
Examples:
{{demo
|demo_kill_categories =yes
|<nowiki>{{Cite Box Office Mojo|title=I'm an incomplete citation!}}</nowiki>
}}
== TemplateData ==
{{TemplateData header}}
<templatedata>
{
"params": {
"id": {
"label": "id",
"description": "Number of the IMDb title, taken from the numbers at the end of its IMDb URL. This parameter is optional if Wikidata property P345 contains an ID starting with tt, but required if not. If entered manually, should not start with tt",
"type": "string",
"required": false,
"default": "Wikidata property P345"
},
"title": {
"label": "title",
"description": "Title of the film. Defaults to the Wikipedia article name, without any disambiguation such as (film).",
"type": "string",
"required": false,
"default": "{{PAGENAMEBASE}}"
},
"publisher_hide": {
"label": "publisher_hide",
"description": "To hide the publisher parameter",
"type": "string",
"required": false
},
"access-date": {
"aliases": [
"accessdate"
],
"label": "access date",
"description": "The full date when the site was accessed; do not wikilink",
"type": "date"
},
"archive-url": {
"label": "archive URL",
"aliases": [
"archiveurl"
],
"description": "The URL of an archived copy of a web page, if or in case the URL becomes unavailable; requires 'archive-date'",
"type": "string"
},
"archive-date": {
"label": "archive date",
"aliases": [
"archivedate"
],
"description": "Date when the original URL was archived; do not wikilink",
"type": "date"
},
"url-status": {
"label": "URL status",
"description": "If set to 'live', the title displays as the live link; if set to dead, the title displays as the archive link",
"type": "string"
},
"mode": {
"label": "mode",
"description": "Similar to the parameter used by cs1|2 templates, when set to cs2, element separator switches from dot to comma; static text is rendered in lowercase; rendering omits the trailing dot",
"type": "string"
}
},
"description": "A template for citing box office data on Box Office Mojo"
}
</templatedata>
== Wikidata ==
The [[Wikidata]] project provides a central collection of information and parameters for articles for the various [[Wikimedia Foundation]] projects. This includes the IMDB title codes for films. For example, the film ''[[Space Milkshake]]'' has a corresponding [[wikidata:Q7572422|Wikidata item (Q7572422)]], which in turn includes an [[wikidata:Property:P345|IMDb identifier]]. If {{tl|IMDb title}} is invoked in an article without the "id" parameter, and if Wikidata has an IMDb identifier specified for that article's corresponding item, the IMDb link with its title code will be included automatically.
For new film articles, the IMDb identifier property (and the film title item itself) may need to be added at Wikidata first, so that the default IMDb link can be available for use on Wikipedia and other Wikimedia projects.
This Wikidata capability was implemented on the English Wikipedia as of April 2013.
Note that the title code (first parameter) can still be specified as before and this will override the Wikidata default e.g. where this template is used to link to a film whose title does not correspond to the subject of the article (for example, in the case of a single article about a film and its sequels).
The title parameter override is available to handle differences between article titles and film titles (e.g. due to [[Wikipedia:Disambiguation|disambiguation]] wording in the title). The id parameter may be left blank to default from Wikidata - for example <nowiki>{{IMDb title||Film title}}</nowiki>.
== Tracking category ==
* {{clc|Cite Box Office Mojo templates with errors}}
==See also==
===Similar film citation templates===
*{{tl|Cite The Numbers}}
*{{tl|Cite Rotten Tomatoes}}
*{{tl|Cite Metacritic}}
<includeonly>{{sandbox other||
<!-- Categories below this line, please; interwikis at Wikidata -->
[[Category:Specific-source templates]]
[[Category:External link templates using Wikidata]]
[[Category:Templates that add a tracking category]]
}}</includeonly>
mqb3jmfi6t625juwfs2wuzht2neu4jl
टेम्पलेट:Harvc
10
101278
801763
2014-11-06T00:53:44Z
en>Trappist the monk
0
Create;
801763
wikitext
text/x-wiki
<includeonly>{{#invoke:Harvc|harvc}}</includeonly><noinclude>
{{documentation}}
</noinclude>
qikxdlbp1xqdhvcyr5t7j9hm135uzhi
801764
801763
2022-01-15T17:59:55Z
en>MusikBot II
0
Protected "[[Template:Harvc]]": [[Wikipedia:High-risk templates|High-risk template or module]]: 250 transclusions ([[User:MusikBot II/TemplateProtector|more info]]) ([Edit=Require autoconfirmed or confirmed access] (indefinite))
801763
wikitext
text/x-wiki
<includeonly>{{#invoke:Harvc|harvc}}</includeonly><noinclude>
{{documentation}}
</noinclude>
qikxdlbp1xqdhvcyr5t7j9hm135uzhi
801765
801764
2026-07-24T20:05:44Z
SM7
3953
2 revisions imported from [[:en:Template:Harvc]]
801763
wikitext
text/x-wiki
<includeonly>{{#invoke:Harvc|harvc}}</includeonly><noinclude>
{{documentation}}
</noinclude>
qikxdlbp1xqdhvcyr5t7j9hm135uzhi
टेम्पलेट:Harvc/doc
10
101279
801766
2014-11-06T14:08:42Z
en>Trappist the monk
0
Create;
801766
wikitext
text/x-wiki
{{Documentation subpage}}
<!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
This template provides a way to cite a contribution to or chapter of a larger work when more than a few such cites are required.
{{tld|harvc}} is adapted from the {{tlx|harv}} family of short-form citation templates.
== Usage ==
The basic form is:
:<code><nowiki>{{</nowiki>harvc|name1|''name2''|''name3''|''name4''|year|''first''=''given name''|contribution=title|''url''=''url''|in=source}}</code>
::''italic'' font indicates an optional parameter
===Parameters===
Like the {{tld|harv}} family of templates, {{tld|harvc}} takes two to five positional parameters. Unlike the {{tld|harv}} family of templates, these parameters are used to create a <code>CITEREF</code> anchor so that {{tld|harvc}} can be the target of a link created by an {{tlx|sfn}} or {{tld|harv}} family template.
:'''name1''' – required, surname or last name of primary author
:'''name2''' – optional, surname or last name of second author
:'''name3''' – optional, surname or last name of third author
:'''name4''' – optional, surname or last name of fourth author
:'''year''' – required, publication year of the work that includes the contribution
Also like the {{tld|harv}} family of templates, {{tld|harvc}} supports several named parameters. These parameters are unique to {{tld|harvc}}.
:'''|c=''' – required, the title of chapter or contribution; rendered quoted in upright font; aliases: '''|chapter=''', '''|contribution='''
:'''|first=''' – optional, given or first name of the contribution's primary author
:'''|in=''' – required, identity of the work that includes the contribution; {{tld|harv}} family templates recommended but not required
:'''|url=''' – optional, URL of an online location where the text of the contribution can be found
===Examples===
When a Wikipedia article makes reference to a work that contains multiple chapters by different authors, bibliographies and reference sections can look rather cluttered:
* {{cite book |last=George |first=Ernest J. |last2=Read |first2=Ralph A. |last3=Johnson |first3=R. W. |last4=Ferber |first4=A. E. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Shelterbelts and Windbreaks |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |url=//archive.org/stream/yoa1957#page/n785/mode/1up |oclc=704186906}}
* {{cite book |last=Harper |first=V. L. |last2=Frank |first2=Bernard |last3=McQuilkin |first3=W. E. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Forest Practices and Productivity |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |url=//archive.org/stream/yoa1957#page/n803/mode/1up |oclc=704186906}}
* {{cite book |last=Stout |first=P. R. |last2=Johnson |first2=C. M. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Trace Elements |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |url=//archive.org/stream/yoa1957#page/n167/mode/1up |oclc=704186906}}
* {{cite book |last=Wadleigh |first=C. H. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Growth of Plants |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |url=//archive.org/stream/yoa1957#page/n57/mode/1up |oclc=704186906}}
As the list grows longer, the look becomes more cluttered with the unnecessarily repeated detail of full-length citations. With {{tld|harvc}} editors can link to {{tld|harvc}} templates using {{tlx|sfn}} templates{{sfn|George|Read|Johnson|Ferber|1957}}, {{tlx|harv}} templates (like this: {{harv|Harper|Frank|McQuilkin|1957}} and as references<ref>{{harvnb|Stout|Johnson|1957}}</ref>). {{tld|harvc}} may also be wrapped in {{tag|ref}} tags in article text so that it becomes part of the article's References section.<ref>{{harvc|Benson|first=Ezra Taft|1957|chapter=Forward|url=//archive.org/stream/yoa1957#page/n5/mode/1up|in={{harvnb|Stefferud|1957|p=vi}}}}</ref>{{sfn|Wadleigh|1957}}
By setting {{para|in|<nowiki>{{tlx|harvnb|...}}</nowiki>}}, {{tld|harvc}} provides a convenient way to link from the contribution citation to the full length citation that contains all of the rest of the important bibliographic detail. This is the recommended use but {{tld|harvc}} does not place any constraints on the content of {{para|in}}.
====Example references====
{{reflist}}
====Example bibliography====
* {{cite book |title=Soil: The Yearbook of Agriculture 1957 |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |url=//archive.org/stream/yoa1957#page/n2/mode/1up |oclc=704186906 |ref=harv}}
** {{harvc |George |first=Ernest J. | Read | Johnson |Ferber | 1957 |contribution=Shelterbelts and Windbreaks |url=//archive.org/stream/yoa1957#page/n785/mode/1up |in={{harvnb|Stefferud|1957}}}}
** {{harvc |Harper |first=V. L. | Frank | McQuilkin | 1957 |contribution=Forest Practices and Productivity |url=//archive.org/stream/yoa1957#page/n803/mode/1up |in={{harvnb|Stefferud|1957}}}}
** {{harvc |Stout |first=P. R. |Johnson |1957 |c=Trace Elements |url=//archive.org/stream/yoa1957#page/n167/mode/1up |in={{harvnb|Stefferud|1957}}}}
** {{harvc |Wadleigh |first=C. H.|1957 |c=Growth of Plants |url=//archive.org/stream/yoa1957#page/n57/mode/1up |in={{harvnb|Stefferud|1957}}}}
<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox | |
<!-- Categories below this line, please; interwikis at Wikidata -->
}}</includeonly>
kssh4mocte7lzjghfx1aqxeli75460s
801767
801766
2014-11-06T15:00:24Z
en>Trappist the monk
0
Copyedit;
801767
wikitext
text/x-wiki
{{Documentation subpage}}
{{lua|Module:Harvc}}
<!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
This template provides a way to cite a contribution to or chapter of a larger work when more than a few such cites are required.
{{tld|harvc}} is adapted from the {{tlx|harv}} family of short-form citation templates.
== Usage ==
The basic form is:
:<code><nowiki>{{</nowiki>harvc|name1|''name2''|''name3''|''name4''|year|''first''=''given name''|contribution=title|''url''=''url''|in=source}}</code>
::''italic'' font indicates an optional parameter
===Parameters===
Like the {{tld|harv}} family of templates, {{tld|harvc}} takes two to five positional parameters. Unlike the {{tld|harv}} family of templates, these parameters are used to create a <code>CITEREF</code> anchor so that {{tld|harvc}} can be the target of a link created by an {{tlx|sfn}} or {{tld|harv}} family template.
:'''name1''' – required, surname or last name of primary author
:'''name2''' – optional, surname or last name of second author
:'''name3''' – optional, surname or last name of third author
:'''name4''' – optional, surname or last name of fourth author
:'''year''' – required, publication year of the work that includes the contribution
Also like the {{tld|harv}} family of templates, {{tld|harvc}} supports several named parameters. These parameters are unique to {{tld|harvc}}.
:'''|c=''' – required, the title of chapter or contribution; rendered quoted in upright font; aliases: '''|chapter=''', '''|contribution='''
:'''|first=''' – optional, given or first name of the contribution's primary author
:'''|in=''' – required, identity of the work that includes the contribution; {{tld|harv}} family templates recommended but not required
:'''|url=''' – optional, URL of an online location where the text of the contribution can be found
===Examples===
When a Wikipedia article makes reference to a work that contains multiple chapters by different authors, bibliographies and reference sections can look rather cluttered:
* {{cite book |last=George |first=Ernest J. |last2=Read |first2=Ralph A. |last3=Johnson |first3=R. W. |last4=Ferber |first4=A. E. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Shelterbelts and Windbreaks |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |url=//archive.org/stream/yoa1957#page/n785/mode/1up |oclc=704186906}}
* {{cite book |last=Harper |first=V. L. |last2=Frank |first2=Bernard |last3=McQuilkin |first3=W. E. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Forest Practices and Productivity |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |url=//archive.org/stream/yoa1957#page/n803/mode/1up |oclc=704186906}}
* {{cite book |last=Stout |first=P. R. |last2=Johnson |first2=C. M. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Trace Elements |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |url=//archive.org/stream/yoa1957#page/n167/mode/1up |oclc=704186906}}
* {{cite book |last=Wadleigh |first=C. H. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Growth of Plants |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |url=//archive.org/stream/yoa1957#page/n57/mode/1up |oclc=704186906}}
As the list grows longer, the look becomes more cluttered with the unnecessarily repeated detail of full-length citations. With {{tld|harvc}} editors can link to shorter, less detailed contribution citations using standard implementations of {{tlx|sfn}} templates{{sfn|George|Read|Johnson|Ferber|1957}} and {{tlx|harv}} templates (like this: {{harv|Harper|Frank|McQuilkin|1957}} and also wrapped in {{tag|ref}} tags<ref>{{harvnb|Stout|Johnson|1957}}</ref>). {{tld|harvc}} may also be wrapped in {{tag|ref}} tags so that it becomes part of the article's References section.<ref>{{harvc|Benson|first=Ezra Taft|1957|chapter=Forward|url=//archive.org/stream/yoa1957#page/n5/mode/1up|in={{harvnb|Stefferud|1957|p=vi}}}}</ref>{{sfn|Wadleigh|1957}}
The recommended use for {{para|in}} is to set its value with a {{tlx|harvnb}} template: {{para|in|<nowiki>{{harvnb|...|...}}</nowiki>}}. {{tld|harvc}} then provides a convenient link from the contribution citation to the full length citation that contains all of the rest of the important bibliographic detail. Though this is the recommended use, {{tld|harvc}} does not place any constraints on the content of {{para|in}}.
====Example references section====
{{reflist}}
====Example bibliography section====
* {{cite book |title=Soil: The Yearbook of Agriculture 1957 |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |url=//archive.org/stream/yoa1957#page/n2/mode/1up |oclc=704186906 |ref=harv}}
** {{harvc |George |first=Ernest J. | Read | Johnson |Ferber | 1957 |contribution=Shelterbelts and Windbreaks |url=//archive.org/stream/yoa1957#page/n785/mode/1up |in={{harvnb|Stefferud|1957}}}}
** {{harvc |Harper |first=V. L. | Frank | McQuilkin | 1957 |contribution=Forest Practices and Productivity |url=//archive.org/stream/yoa1957#page/n803/mode/1up |in={{harvnb|Stefferud|1957}}}}
** {{harvc |Stout |first=P. R. |Johnson |1957 |c=Trace Elements |url=//archive.org/stream/yoa1957#page/n167/mode/1up |in={{harvnb|Stefferud|1957}}}}
** {{harvc |Wadleigh |first=C. H.|1957 |c=Growth of Plants |url=//archive.org/stream/yoa1957#page/n57/mode/1up |in={{harvnb|Stefferud|1957}}}}
<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox | |
<!-- Categories below this line, please; interwikis at Wikidata -->
}}</includeonly>
4d0pgphpfg8hsnymme8zew2mmg53gi9
801768
801767
2014-11-06T16:00:05Z
en>Trappist the monk
0
sp;
801768
wikitext
text/x-wiki
{{Documentation subpage}}
{{lua|Module:Harvc}}
<!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
This template provides a way to cite a contribution to or chapter of a larger work when more than a few such cites are required.
{{tld|harvc}} is adapted from the {{tlx|harv}} family of short-form citation templates.
== Usage ==
The basic form is:
:<code><nowiki>{{</nowiki>harvc|name1|''name2''|''name3''|''name4''|year|''first''=''given name''|contribution=title|''url''=''url''|in=source}}</code>
::''italic'' font indicates an optional parameter
===Parameters===
Like the {{tld|harv}} family of templates, {{tld|harvc}} takes two to five positional parameters. Unlike the {{tld|harv}} family of templates, these parameters are used to create a <code>CITEREF</code> anchor so that {{tld|harvc}} can be the target of a link created by an {{tlx|sfn}} or {{tld|harv}} family template.
:'''name1''' – required, surname or last name of primary author
:'''name2''' – optional, surname or last name of second author
:'''name3''' – optional, surname or last name of third author
:'''name4''' – optional, surname or last name of fourth author
:'''year''' – required, publication year of the work that includes the contribution
Also like the {{tld|harv}} family of templates, {{tld|harvc}} supports several named parameters. These parameters are unique to {{tld|harvc}}.
:'''|c=''' – required, the title of chapter or contribution; rendered quoted in upright font; aliases: '''|chapter=''', '''|contribution='''
:'''|first=''' – optional, given or first name of the contribution's primary author
:'''|in=''' – required, identity of the work that includes the contribution; {{tld|harv}} family templates recommended but not required
:'''|url=''' – optional, URL of an online location where the text of the contribution can be found
===Examples===
When a Wikipedia article makes reference to a work that contains multiple chapters by different authors, bibliographies and reference sections can look rather cluttered:
* {{cite book |last=George |first=Ernest J. |last2=Read |first2=Ralph A. |last3=Johnson |first3=R. W. |last4=Ferber |first4=A. E. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Shelterbelts and Windbreaks |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |url=//archive.org/stream/yoa1957#page/n785/mode/1up |oclc=704186906}}
* {{cite book |last=Harper |first=V. L. |last2=Frank |first2=Bernard |last3=McQuilkin |first3=W. E. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Forest Practices and Productivity |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |url=//archive.org/stream/yoa1957#page/n803/mode/1up |oclc=704186906}}
* {{cite book |last=Stout |first=P. R. |last2=Johnson |first2=C. M. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Trace Elements |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |url=//archive.org/stream/yoa1957#page/n167/mode/1up |oclc=704186906}}
* {{cite book |last=Wadleigh |first=C. H. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Growth of Plants |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |url=//archive.org/stream/yoa1957#page/n57/mode/1up |oclc=704186906}}
As the list grows longer, the look becomes more cluttered with the unnecessarily repeated detail of full-length citations. With {{tld|harvc}} editors can link to shorter, less detailed contribution citations using standard implementations of {{tlx|sfn}} templates{{sfn|George|Read|Johnson|Ferber|1957}} and {{tlx|harv}} templates (like this: {{harv|Harper|Frank|McQuilkin|1957}} and also wrapped in {{tag|ref}} tags<ref>{{harvnb|Stout|Johnson|1957}}</ref>). {{tld|harvc}} may also be wrapped in {{tag|ref}} tags so that it becomes part of the article's References section.<ref>{{harvc|Benson|first=Ezra Taft|1957|chapter=Foreward|url=//archive.org/stream/yoa1957#page/n5/mode/1up|in={{harvnb|Stefferud|1957|p=vi}}}}</ref>{{sfn|Wadleigh|1957}}
The recommended use for {{para|in}} is to set its value with a {{tlx|harvnb}} template: {{para|in|<nowiki>{{harvnb|...|...}}</nowiki>}}. {{tld|harvc}} then provides a convenient link from the contribution citation to the full length citation that contains all of the rest of the important bibliographic detail. Though this is the recommended use, {{tld|harvc}} does not place any constraints on the content of {{para|in}}.
====Example references section====
{{reflist}}
====Example bibliography section====
* {{cite book |title=Soil: The Yearbook of Agriculture 1957 |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |url=//archive.org/stream/yoa1957#page/n2/mode/1up |oclc=704186906 |ref=harv}}
** {{harvc |George |first=Ernest J. | Read | Johnson |Ferber | 1957 |contribution=Shelterbelts and Windbreaks |url=//archive.org/stream/yoa1957#page/n785/mode/1up |in={{harvnb|Stefferud|1957}}}}
** {{harvc |Harper |first=V. L. | Frank | McQuilkin | 1957 |contribution=Forest Practices and Productivity |url=//archive.org/stream/yoa1957#page/n803/mode/1up |in={{harvnb|Stefferud|1957}}}}
** {{harvc |Stout |first=P. R. |Johnson |1957 |c=Trace Elements |url=//archive.org/stream/yoa1957#page/n167/mode/1up |in={{harvnb|Stefferud|1957}}}}
** {{harvc |Wadleigh |first=C. H.|1957 |c=Growth of Plants |url=//archive.org/stream/yoa1957#page/n57/mode/1up |in={{harvnb|Stefferud|1957}}}}
<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox | |
<!-- Categories below this line, please; interwikis at Wikidata -->
}}</includeonly>
7akq4r0i02zif4bvlsu2cm3nvdgypkt
801769
801768
2014-11-06T16:16:09Z
en>Bollyjeff
0
spelling from the source
801769
wikitext
text/x-wiki
{{Documentation subpage}}
{{lua|Module:Harvc}}
<!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
This template provides a way to cite a contribution to or chapter of a larger work when more than a few such cites are required.
{{tld|harvc}} is adapted from the {{tlx|harv}} family of short-form citation templates.
== Usage ==
The basic form is:
:<code><nowiki>{{</nowiki>harvc|name1|''name2''|''name3''|''name4''|year|''first''=''given name''|contribution=title|''url''=''url''|in=source}}</code>
::''italic'' font indicates an optional parameter
===Parameters===
Like the {{tld|harv}} family of templates, {{tld|harvc}} takes two to five positional parameters. Unlike the {{tld|harv}} family of templates, these parameters are used to create a <code>CITEREF</code> anchor so that {{tld|harvc}} can be the target of a link created by an {{tlx|sfn}} or {{tld|harv}} family template.
:'''name1''' – required, surname or last name of primary author
:'''name2''' – optional, surname or last name of second author
:'''name3''' – optional, surname or last name of third author
:'''name4''' – optional, surname or last name of fourth author
:'''year''' – required, publication year of the work that includes the contribution
Also like the {{tld|harv}} family of templates, {{tld|harvc}} supports several named parameters. These parameters are unique to {{tld|harvc}}.
:'''|c=''' – required, the title of chapter or contribution; rendered quoted in upright font; aliases: '''|chapter=''', '''|contribution='''
:'''|first=''' – optional, given or first name of the contribution's primary author
:'''|in=''' – required, identity of the work that includes the contribution; {{tld|harv}} family templates recommended but not required
:'''|url=''' – optional, URL of an online location where the text of the contribution can be found
===Examples===
When a Wikipedia article makes reference to a work that contains multiple chapters by different authors, bibliographies and reference sections can look rather cluttered:
* {{cite book |last=George |first=Ernest J. |last2=Read |first2=Ralph A. |last3=Johnson |first3=R. W. |last4=Ferber |first4=A. E. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Shelterbelts and Windbreaks |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |url=//archive.org/stream/yoa1957#page/n785/mode/1up |oclc=704186906}}
* {{cite book |last=Harper |first=V. L. |last2=Frank |first2=Bernard |last3=McQuilkin |first3=W. E. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Forest Practices and Productivity |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |url=//archive.org/stream/yoa1957#page/n803/mode/1up |oclc=704186906}}
* {{cite book |last=Stout |first=P. R. |last2=Johnson |first2=C. M. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Trace Elements |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |url=//archive.org/stream/yoa1957#page/n167/mode/1up |oclc=704186906}}
* {{cite book |last=Wadleigh |first=C. H. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Growth of Plants |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |url=//archive.org/stream/yoa1957#page/n57/mode/1up |oclc=704186906}}
As the list grows longer, the look becomes more cluttered with the unnecessarily repeated detail of full-length citations. With {{tld|harvc}} editors can link to shorter, less detailed contribution citations using standard implementations of {{tlx|sfn}} templates{{sfn|George|Read|Johnson|Ferber|1957}} and {{tlx|harv}} templates (like this: {{harv|Harper|Frank|McQuilkin|1957}} and also wrapped in {{tag|ref}} tags<ref>{{harvnb|Stout|Johnson|1957}}</ref>). {{tld|harvc}} may also be wrapped in {{tag|ref}} tags so that it becomes part of the article's References section.<ref>{{harvc|Benson|first=Ezra Taft|1957|chapter=Foreword|url=//archive.org/stream/yoa1957#page/n5/mode/1up|in={{harvnb|Stefferud|1957|p=vi}}}}</ref>{{sfn|Wadleigh|1957}}
The recommended use for {{para|in}} is to set its value with a {{tlx|harvnb}} template: {{para|in|<nowiki>{{harvnb|...|...}}</nowiki>}}. {{tld|harvc}} then provides a convenient link from the contribution citation to the full length citation that contains all of the rest of the important bibliographic detail. Though this is the recommended use, {{tld|harvc}} does not place any constraints on the content of {{para|in}}.
====Example references section====
{{reflist}}
====Example bibliography section====
* {{cite book |title=Soil: The Yearbook of Agriculture 1957 |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |url=//archive.org/stream/yoa1957#page/n2/mode/1up |oclc=704186906 |ref=harv}}
** {{harvc |George |first=Ernest J. | Read | Johnson |Ferber | 1957 |contribution=Shelterbelts and Windbreaks |url=//archive.org/stream/yoa1957#page/n785/mode/1up |in={{harvnb|Stefferud|1957}}}}
** {{harvc |Harper |first=V. L. | Frank | McQuilkin | 1957 |contribution=Forest Practices and Productivity |url=//archive.org/stream/yoa1957#page/n803/mode/1up |in={{harvnb|Stefferud|1957}}}}
** {{harvc |Stout |first=P. R. |Johnson |1957 |c=Trace Elements |url=//archive.org/stream/yoa1957#page/n167/mode/1up |in={{harvnb|Stefferud|1957}}}}
** {{harvc |Wadleigh |first=C. H.|1957 |c=Growth of Plants |url=//archive.org/stream/yoa1957#page/n57/mode/1up |in={{harvnb|Stefferud|1957}}}}
<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox | |
<!-- Categories below this line, please; interwikis at Wikidata -->
}}</includeonly>
0nvslo9ghbubb9im3gcsan520t1vmms
801770
801769
2014-11-06T18:50:58Z
en>Trappist the monk
0
Copyedit;
801770
wikitext
text/x-wiki
{{Documentation subpage}}
{{lua|Module:Harvc}}
<!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
This template provides a way to cite a contribution to or chapter of a larger work when more than a few such cites are required.
{{tld|harvc}} is adapted from the {{tlx|harv}} family of short-form citation templates.
== Usage ==
The basic form is:
:<code><nowiki>{{</nowiki>harvc|name1|''name2''|''name3''|''name4''|year|''first''=''given name''|contribution=title|''url''=''url''|in=source|''ps''=postscript}}</code>
::''italic'' font indicates an optional parameter
===Parameters===
Like the {{tld|harv}} family of templates, {{tld|harvc}} takes two to five positional parameters. Unlike the {{tld|harv}} family of templates, these parameters are used to create a <code>CITEREF</code> anchor so that {{tld|harvc}} can be the target of a link created by an {{tlx|sfn}} or {{tld|harv}} family template.
:'''name1''' – required, surname or last name of primary author
:'''name2''' – optional, surname or last name of second author
:'''name3''' – optional, surname or last name of third author
:'''name4''' – optional, surname or last name of fourth author
:'''year''' – required, publication year of the work that includes the contribution
Also like the {{tld|harv}} family of templates, {{tld|harvc}} supports several named parameters. These parameters are unique to {{tld|harvc}}.
:'''|c=''' – required, the title of chapter or contribution; rendered quoted in upright font; aliases: '''|chapter=''', '''|contribution='''
:'''|first=''' – optional, given or first name of the contribution's primary author
:'''|in=''' – required, identity of the work that includes the contribution; {{tld|harv}} family templates recommended but not required
:'''|ps=''' – optional, sets terminal punctuation; default is full stop; for no terminal punctuation use {{para|ps|none}}; aliases: '''|postscript='''
:'''|url=''' – optional, URL of an online location where the text of the contribution can be found
===Examples===
When a Wikipedia article makes reference to a work that contains multiple chapters by different authors, bibliographies and reference sections can look rather cluttered:
* {{cite book |last=George |first=Ernest J. |last2=Read |first2=Ralph A. |last3=Johnson |first3=R. W. |last4=Ferber |first4=A. E. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Shelterbelts and Windbreaks |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |url=//archive.org/stream/yoa1957#page/n785/mode/1up |oclc=704186906}}
* {{cite book |last=Harper |first=V. L. |last2=Frank |first2=Bernard |last3=McQuilkin |first3=W. E. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Forest Practices and Productivity |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |url=//archive.org/stream/yoa1957#page/n803/mode/1up |oclc=704186906}}
* {{cite book |last=Stout |first=P. R. |last2=Johnson |first2=C. M. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Trace Elements |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |url=//archive.org/stream/yoa1957#page/n167/mode/1up |oclc=704186906}}
* {{cite book |last=Wadleigh |first=C. H. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Growth of Plants |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |url=//archive.org/stream/yoa1957#page/n57/mode/1up |oclc=704186906}}
As the list grows longer, the look becomes more cluttered with the unnecessarily repeated detail of full-length citations. With {{tld|harvc}} editors can link to shorter, less detailed contribution citations using standard implementations of {{tlx|sfn}} templates{{sfn|George|Read|Johnson|Ferber|1957}} and {{tlx|harv}} templates (like this: {{harv|Harper|Frank|McQuilkin|1957}} and also wrapped in {{tag|ref}} tags<ref>{{harvnb|Stout|Johnson|1957}}</ref>). {{tld|harvc}} may also be wrapped in {{tag|ref}} tags so that it becomes part of the article's References section.<ref>{{harvc|Benson|first=Ezra Taft|1957|chapter=Foreword|url=//archive.org/stream/yoa1957#page/n5/mode/1up|in={{harvnb|Stefferud|1957|p=vi}}}}</ref>{{sfn|Wadleigh|1957}}
The recommended use for {{para|in}} is to set its value with a {{tlx|harvnb}} template: {{para|in|<nowiki>{{harvnb|...|...}}</nowiki>}}. {{tld|harvc}} then provides a convenient link from the contribution citation to the full length citation that contains all of the rest of the important bibliographic detail. Though this is the recommended use, {{tld|harvc}} does not place any constraints on the content of {{para|in}}.
====Example references section====
{{reflist}}
====Example bibliography section====
* {{cite book |title=Soil: The Yearbook of Agriculture 1957 |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |url=//archive.org/stream/yoa1957#page/n2/mode/1up |oclc=704186906 |ref=harv}}
** {{harvc |George |first=Ernest J. | Read | Johnson |Ferber | 1957 |contribution=Shelterbelts and Windbreaks |url=//archive.org/stream/yoa1957#page/n785/mode/1up |in={{harvnb|Stefferud|1957}}}}
** {{harvc |Harper |first=V. L. | Frank | McQuilkin | 1957 |contribution=Forest Practices and Productivity |url=//archive.org/stream/yoa1957#page/n803/mode/1up |in={{harvnb|Stefferud|1957}}}}
** {{harvc |Stout |first=P. R. |Johnson |1957 |c=Trace Elements |url=//archive.org/stream/yoa1957#page/n167/mode/1up |in={{harvnb|Stefferud|1957}}}}
** {{harvc |Wadleigh |first=C. H.|1957 |c=Growth of Plants |url=//archive.org/stream/yoa1957#page/n57/mode/1up |in={{harvnb|Stefferud|1957}}}}
<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox | |
<!-- Categories below this line, please; interwikis at Wikidata -->
}}</includeonly>
tjif49zwubnr353um11yempnur4nkv2
801771
801770
2014-11-07T10:25:52Z
en>Trappist the monk
0
801771
wikitext
text/x-wiki
{{Documentation subpage}}
{{lua|Module:Harvc}}
{{ombox
| type = content
| text = This template is new and still trying to find its way in the world. Not currently recommended for use in article space.
}}
<!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
This template provides a way to cite a contribution to or chapter of a larger work when more than a few such cites are required.
{{tld|harvc}} is adapted from the {{tlx|harv}} family of short-form citation templates.
== Usage ==
The basic form is:
:<code><nowiki>{{</nowiki>harvc|name1|''name2''|''name3''|''name4''|year|''first''=''given name''|contribution=title|''url''=''url''|in=source|''ps''=postscript}}</code>
::''italic'' font indicates an optional parameter
===Parameters===
Like the {{tld|harv}} family of templates, {{tld|harvc}} takes two to five positional parameters. Unlike the {{tld|harv}} family of templates, these parameters are used to create a <code>CITEREF</code> anchor so that {{tld|harvc}} can be the target of a link created by an {{tlx|sfn}} or {{tld|harv}} family template.
:'''name1''' – required, surname or last name of primary author
:'''name2''' – optional, surname or last name of second author
:'''name3''' – optional, surname or last name of third author
:'''name4''' – optional, surname or last name of fourth author
:'''year''' – required, publication year of the work that includes the contribution
Also like the {{tld|harv}} family of templates, {{tld|harvc}} supports several named parameters. These parameters are unique to {{tld|harvc}}.
:'''|c=''' – required, the title of chapter or contribution; rendered quoted in upright font; aliases: '''|chapter=''', '''|contribution='''
:'''|first=''' – optional, given or first name of the contribution's primary author
:'''|in=''' – required, identity of the work that includes the contribution; {{tld|harv}} family templates recommended but not required
:'''|ps=''' – optional, sets terminal punctuation; default is full stop; for no terminal punctuation use {{para|ps|none}}; aliases: '''|postscript='''
:'''|url=''' – optional, URL of an online location where the text of the contribution can be found
===Examples===
When a Wikipedia article makes reference to a work that contains multiple chapters by different authors, bibliographies and reference sections can look rather cluttered:
* {{cite book |last=George |first=Ernest J. |last2=Read |first2=Ralph A. |last3=Johnson |first3=R. W. |last4=Ferber |first4=A. E. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Shelterbelts and Windbreaks |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |url=//archive.org/stream/yoa1957#page/n785/mode/1up |oclc=704186906}}
* {{cite book |last=Harper |first=V. L. |last2=Frank |first2=Bernard |last3=McQuilkin |first3=W. E. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Forest Practices and Productivity |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |url=//archive.org/stream/yoa1957#page/n803/mode/1up |oclc=704186906}}
* {{cite book |last=Stout |first=P. R. |last2=Johnson |first2=C. M. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Trace Elements |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |url=//archive.org/stream/yoa1957#page/n167/mode/1up |oclc=704186906}}
* {{cite book |last=Wadleigh |first=C. H. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Growth of Plants |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |url=//archive.org/stream/yoa1957#page/n57/mode/1up |oclc=704186906}}
As the list grows longer, the look becomes more cluttered with the unnecessarily repeated detail of full-length citations. With {{tld|harvc}} editors can link to shorter, less detailed contribution citations using standard implementations of {{tlx|sfn}} templates{{sfn|George|Read|Johnson|Ferber|1957}} and {{tlx|harv}} templates (like this: {{harv|Harper|Frank|McQuilkin|1957}} and also wrapped in {{tag|ref}} tags<ref>{{harvnb|Stout|Johnson|1957}}</ref>). {{tld|harvc}} may also be wrapped in {{tag|ref}} tags so that it becomes part of the article's References section.<ref>{{harvc|Benson|first=Ezra Taft|1957|chapter=Foreword|url=//archive.org/stream/yoa1957#page/n5/mode/1up|in={{harvnb|Stefferud|1957|p=vi}}}}</ref>{{sfn|Wadleigh|1957}}
The recommended use for {{para|in}} is to set its value with a {{tlx|harvnb}} template: {{para|in|<nowiki>{{harvnb|...|...}}</nowiki>}}. {{tld|harvc}} then provides a convenient link from the contribution citation to the full length citation that contains all of the rest of the important bibliographic detail. Though this is the recommended use, {{tld|harvc}} does not place any constraints on the content of {{para|in}}.
====Example references section====
{{reflist}}
====Example bibliography section====
* {{cite book |title=Soil: The Yearbook of Agriculture 1957 |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |url=//archive.org/stream/yoa1957#page/n2/mode/1up |oclc=704186906 |ref=harv}}
** {{harvc |George |first=Ernest J. | Read | Johnson |Ferber | 1957 |contribution=Shelterbelts and Windbreaks |url=//archive.org/stream/yoa1957#page/n785/mode/1up |in={{harvnb|Stefferud|1957}}}}
** {{harvc |Harper |first=V. L. | Frank | McQuilkin | 1957 |contribution=Forest Practices and Productivity |url=//archive.org/stream/yoa1957#page/n803/mode/1up |in={{harvnb|Stefferud|1957}}}}
** {{harvc |Stout |first=P. R. |Johnson |1957 |c=Trace Elements |url=//archive.org/stream/yoa1957#page/n167/mode/1up |in={{harvnb|Stefferud|1957}}}}
** {{harvc |Wadleigh |first=C. H.|1957 |c=Growth of Plants |url=//archive.org/stream/yoa1957#page/n57/mode/1up |in={{harvnb|Stefferud|1957}}}}
<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox | |
<!-- Categories below this line, please; interwikis at Wikidata -->
}}</includeonly>
rtghomold9qoirsva12wq0qt6214ble
801772
801771
2014-11-07T16:01:48Z
en>Trappist the monk
0
Copyedit;
801772
wikitext
text/x-wiki
{{Documentation subpage}}
{{lua|Module:Harvc}}
{{ombox
| type = content
| text = This template is new and still trying to find its way in the world. Not currently recommended for use in article space.
}}
<!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
This template provides a way to cite a contribution to or chapter of a larger work when more than a few such cites are required.
{{tld|harvc}} is adapted from the {{tlx|harv}} family of short-form citation templates and from the {{cs1}} and {{cs2}} styles.
== Usage ==
The minimal form is:
:<code><nowiki>{{</nowiki>harvc|last=name1|year=year|contribution=title|in=src name}}</code>
===Parameters===
{{tld|harvc}} creates a <code>CITEREF</code> anchor from one to four contribution or chapter author surnames ({{para|last''n''}}) and the value in {{para|year}}. This allows {{tld|harvc}} to be the target of a link created by an {{tlx|sfn}} or {{tld|harv}} family template. From {{para|in''n''}} and {{para|year}}, {{tld|harvc}} creates a CITEREF link similar to those created by {{tlx|harvnb}} and {{tlx|sfn}}
:'''|c=''' – required, the title of chapter or contribution; rendered quoted in upright font; aliases: '''|chapter=''', '''|contribution='''
:'''|first=''' – optional, given or first name of the contribution's primary author
:'''|in1=''' – required, surname or last name of primary editor or author of the work that includes the contribution; aliases '''|in='''
:'''|in2=''' – required, surname or last name of second editor or author
:'''|in3=''' – required, surname or last name of third editor or author
:'''|in4=''' – required, surname or last name of fourth editor or author
:'''|last1=''' – required, surname or last name of primary author; aliases: '''|last='''
:'''|last2=''' – optional, surname or last name of second author
:'''|last3=''' – optional, surname or last name of third author
:'''|last4=''' – optional, surname or last name of fourth author
:'''|loc=''' – optional, other location identifier, displays after {{para|p}} or {{para|pp}}
:'''|p=''' – optional, single page number where cited material can be found
:'''|pp=''' – optional, multiple page numbers, page ranges, etc where cited material can be found
:'''|ps=''' – optional, sets terminal punctuation; default is full stop; for no terminal punctuation use {{para|ps|none}}; aliases: '''|postscript='''
:'''|separator=''' – optional, specifies alternate punctuation between contributor list, contribution, and source list; default is full stop (.)
:'''|url=''' – optional, URL of an online location where the text of the contribution can be found
:'''|year=''' – required, publication year of the work that includes the contribution
===Examples===
When a Wikipedia article makes reference to a work that contains multiple chapters by different authors, bibliographies and reference sections can look rather cluttered:
* {{cite book |last=George |first=Ernest J. |last2=Read |first2=Ralph A. |last3=Johnson |first3=R. W. |last4=Ferber |first4=A. E. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Shelterbelts and Windbreaks |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |url=//archive.org/stream/yoa1957#page/n785/mode/1up |oclc=704186906}}
* {{cite book |last=Harper |first=V. L. |last2=Frank |first2=Bernard |last3=McQuilkin |first3=W. E. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Forest Practices and Productivity |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |url=//archive.org/stream/yoa1957#page/n803/mode/1up |oclc=704186906}}
* {{cite book |last=Stout |first=P. R. |last2=Johnson |first2=C. M. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Trace Elements |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |url=//archive.org/stream/yoa1957#page/n167/mode/1up |oclc=704186906}}
* {{cite book |last=Wadleigh |first=C. H. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Growth of Plants |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |url=//archive.org/stream/yoa1957#page/n57/mode/1up |oclc=704186906}}
As the list grows longer, the look becomes more cluttered with the unnecessarily repeated detail of full-length citations. With {{tld|harvc}} editors can link to shorter, less detailed contribution citations using standard implementations of {{tlx|sfn}} templates{{sfn|George|Read|Johnson|Ferber|1957}} and {{tlx|harv}} templates (like this: {{harv|Harper|Frank|McQuilkin|1957}} and also wrapped in {{tag|ref}} tags<ref>{{harvnb|Stout|Johnson|1957}}</ref>). {{tld|harvc}} may also be wrapped in {{tag|ref}} tags so that it becomes part of the article's References section.<ref>{{harvc|last=Benson|first=Ezra Taft|year=1957|chapter=Foreword|url=//archive.org/stream/yoa1957#page/n5/mode/1up|in=Stefferud|p=vi |loc=§2}}</ref>{{sfn|Wadleigh|1957}}
====Example references section====
{{reflist}}
====Example bibliography section====
* {{cite book |title=Soil: The Yearbook of Agriculture 1957 |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |url=//archive.org/stream/yoa1957#page/n2/mode/1up |oclc=704186906 |ref=harv}}
** {{harvc |last=George |first=Ernest J. |last2=Read |last3=Johnson |last4=Ferber |year=1957 |contribution=Shelterbelts and Windbreaks |url=//archive.org/stream/yoa1957#page/n785/mode/1up |in=Stefferud}}
** {{harvc |last=Harper |first=V. L. |last2=Frank |last3=McQuilkin |year=1957 |contribution=Forest Practices and Productivity |url=//archive.org/stream/yoa1957#page/n803/mode/1up |in=Stefferud}}
** {{harvc |last=Stout |first=P. R. |last2=Johnson |year=1957 |c=Trace Elements |url=//archive.org/stream/yoa1957#page/n167/mode/1up |in=Stefferud}}
** {{harvc |last=Wadleigh |first=C. H.|year=1957 |c=Growth of Plants |url=//archive.org/stream/yoa1957#page/n57/mode/1up |in=Stefferud}}
<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox | |
<!-- Categories below this line, please; interwikis at Wikidata -->
}}</includeonly>
68zauhcsrkga8xykj63ptc19qwwwmxz
801773
801772
2014-11-08T12:14:51Z
en>Trappist the monk
0
Error messages;
801773
wikitext
text/x-wiki
{{Documentation subpage}}
{{lua|Module:Harvc}}
{{ombox
| type = content
| text = This template is new and still trying to find its way in the world. Not currently recommended for use in article space.
}}
<!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
This template provides a way to cite a contribution to or chapter of a larger work when more than a few such cites are required. {{tld|harvc}} is not a substitute for a properly constructed citation.
{{tld|harvc}} is adapted from the {{tlx|harv}} family of short-form citation templates and from the {{cs1}} and {{cs2}} styles.
== Usage ==
The minimal form is:
:<code><nowiki>{{</nowiki>harvc|last=name1|year=year|contribution=title|in=src name}}</code>
===Parameters===
{{tld|harvc}} creates a <code>CITEREF</code> anchor from one to four contribution or chapter author surnames ({{para|last''n''}}) and the value in {{para|year}}. This allows {{tld|harvc}} to be the target of a link created by an {{tlx|sfn}} or {{tld|harv}} family template. From {{para|in''n''}} and {{para|year}}, {{tld|harvc}} creates a CITEREF link similar to those created by {{tlx|harvnb}} and {{tlx|sfn}}
:'''|c=''' – required, the title of chapter or contribution; rendered quoted in upright font; aliases: '''|chapter=''', '''|contribution='''
:'''|first=''' – optional, given or first name of the contribution's primary author
:'''|in1=''' – required, surname or last name of primary editor or author of the work that includes the contribution; aliases '''|in='''
:'''|in2=''' – required, surname or last name of second editor or author
:'''|in3=''' – required, surname or last name of third editor or author
:'''|in4=''' – required, surname or last name of fourth editor or author
:'''|last1=''' – required, surname or last name of primary author; aliases: '''|last='''
:'''|last2=''' – optional, surname or last name of second author
:'''|last3=''' – optional, surname or last name of third author
:'''|last4=''' – optional, surname or last name of fourth author
:'''|loc=''' – optional, other location identifier, displays after {{para|p}} or {{para|pp}}
:'''|p=''' – optional, single page number where cited material can be found
:'''|pp=''' – optional, multiple page numbers, page ranges, etc where cited material can be found
:'''|ps=''' – optional, sets terminal punctuation; default is full stop; for no terminal punctuation use {{para|ps|none}}; aliases: '''|postscript='''
:'''|separator=''' – optional, specifies alternate punctuation between contributor list, contribution, and source list; default is full stop (.)
:'''|url=''' – optional, URL of an online location where the text of the contribution can be found
:'''|year=''' – required, publication year of the work that includes the contribution
===Examples===
When a Wikipedia article makes reference to a work that contains multiple chapters by different authors, bibliographies and reference sections can look rather cluttered:
* {{cite book |last=George |first=Ernest J. |last2=Read |first2=Ralph A. |last3=Johnson |first3=R. W. |last4=Ferber |first4=A. E. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Shelterbelts and Windbreaks |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |url=//archive.org/stream/yoa1957#page/n785/mode/1up |oclc=704186906}}
* {{cite book |last=Harper |first=V. L. |last2=Frank |first2=Bernard |last3=McQuilkin |first3=W. E. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Forest Practices and Productivity |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |url=//archive.org/stream/yoa1957#page/n803/mode/1up |oclc=704186906}}
* {{cite book |last=Stout |first=P. R. |last2=Johnson |first2=C. M. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Trace Elements |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |url=//archive.org/stream/yoa1957#page/n167/mode/1up |oclc=704186906}}
* {{cite book |last=Wadleigh |first=C. H. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Growth of Plants |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |url=//archive.org/stream/yoa1957#page/n57/mode/1up |oclc=704186906}}
As the list grows longer, the look becomes more cluttered with the unnecessarily repeated detail of full-length citations. With {{tld|harvc}} editors can link to shorter, less detailed contribution citations using standard implementations of {{tlx|sfn}} templates{{sfn|George|Read|Johnson|Ferber|1957}} and {{tlx|harv}} templates (like this: {{harv|Harper|Frank|McQuilkin|1957}} and also wrapped in {{tag|ref}} tags<ref>{{harvnb|Stout|Johnson|1957}}</ref>). {{tld|harvc}} may also be wrapped in {{tag|ref}} tags so that it becomes part of the article's References section.<ref>{{harvc|last=Benson|first=Ezra Taft|year=1957|chapter=Foreword|url=//archive.org/stream/yoa1957#page/n5/mode/1up|in=Stefferud|p=vi |loc=§2}}</ref>{{sfn|Wadleigh|1957}}
====Example references section====
{{reflist}}
====Example bibliography section====
* {{cite book |title=Soil: The Yearbook of Agriculture 1957 |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |url=//archive.org/stream/yoa1957#page/n2/mode/1up |oclc=704186906 |ref=harv}}
** {{harvc |last=George |first=Ernest J. |last2=Read |last3=Johnson |last4=Ferber |year=1957 |contribution=Shelterbelts and Windbreaks |url=//archive.org/stream/yoa1957#page/n785/mode/1up |in=Stefferud}}
** {{harvc |last=Harper |first=V. L. |last2=Frank |last3=McQuilkin |year=1957 |contribution=Forest Practices and Productivity |url=//archive.org/stream/yoa1957#page/n803/mode/1up |in=Stefferud}}
** {{harvc |last=Stout |first=P. R. |last2=Johnson |year=1957 |c=Trace Elements |url=//archive.org/stream/yoa1957#page/n167/mode/1up |in=Stefferud}}
** {{harvc |last=Wadleigh |first=C. H.|year=1957 |c=Growth of Plants |url=//archive.org/stream/yoa1957#page/n57/mode/1up |in=Stefferud}}
==Error messages==
{{tld|harvc}} emits these error messages:
:<span style="font-size:100%" class="error">author missing from contributor list.</span>
::The contributors list parameters {{para|last1}}, {{para|last2}}, {{para|last3}}, and {{para|last4}} form the template's <code>CITEREF</code> anchor. All are not required but must be used in order without numerical gaps.
:<span style="font-size:100%" class="error">author missing from source list.</span>
::The source list parameters {{para|in1}}, {{para|in2}}, {{para|in3}}, and {{para|in4}} form the template's <code>CITEREF</code> link to the full citation. All are not required but must be used in order without numerical gaps.
:<span style="font-size:100%" class="error">invalid or missing year.</span>
::{{para|year}} is an integral part of the template's <code>CITEREF</code> anchor and link. The value of {{para|year}} must be a three- or four-digit number with an optional lowercase <code>CITEREF</code> disambiguator. When the source does not have an identifiable year, use {{para|year|n.d.}} or {{para|year|nd}}.
:<span style="font-size:100%" class="error">required contribution is missing.</span>
::This error message indicates that {{tld|harvc}} can't find any of {{para|c}}, {{para|chapter}}, or {{para|contribution}} with an assigned value
<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox | |
<!-- Categories below this line, please; interwikis at Wikidata -->
}}</includeonly>
o8ch9amdb30mzgzy00ca072asqqb7tn
801774
801773
2014-11-08T15:04:09Z
en>Trappist the monk
0
/* Examples */
801774
wikitext
text/x-wiki
{{Documentation subpage}}
{{lua|Module:Harvc}}
{{ombox
| type = content
| text = This template is new and still trying to find its way in the world. Not currently recommended for use in article space.
}}
<!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
This template provides a way to cite a contribution to or chapter of a larger work when more than a few such cites are required. {{tld|harvc}} is not a substitute for a properly constructed citation.
{{tld|harvc}} is adapted from the {{tlx|harv}} family of short-form citation templates and from the {{cs1}} and {{cs2}} styles.
== Usage ==
The minimal form is:
:<code><nowiki>{{</nowiki>harvc|last=name1|year=year|contribution=title|in=src name}}</code>
===Parameters===
{{tld|harvc}} creates a <code>CITEREF</code> anchor from one to four contribution or chapter author surnames ({{para|last''n''}}) and the value in {{para|year}}. This allows {{tld|harvc}} to be the target of a link created by an {{tlx|sfn}} or {{tld|harv}} family template. From {{para|in''n''}} and {{para|year}}, {{tld|harvc}} creates a CITEREF link similar to those created by {{tlx|harvnb}} and {{tlx|sfn}}
:'''|c=''' – required, the title of chapter or contribution; rendered quoted in upright font; aliases: '''|chapter=''', '''|contribution='''
:'''|first=''' – optional, given or first name of the contribution's primary author
:'''|in1=''' – required, surname or last name of primary editor or author of the work that includes the contribution; aliases '''|in='''
:'''|in2=''' – required, surname or last name of second editor or author
:'''|in3=''' – required, surname or last name of third editor or author
:'''|in4=''' – required, surname or last name of fourth editor or author
:'''|last1=''' – required, surname or last name of primary author; aliases: '''|last='''
:'''|last2=''' – optional, surname or last name of second author
:'''|last3=''' – optional, surname or last name of third author
:'''|last4=''' – optional, surname or last name of fourth author
:'''|loc=''' – optional, other location identifier, displays after {{para|p}} or {{para|pp}}
:'''|p=''' – optional, single page number where cited material can be found
:'''|pp=''' – optional, multiple page numbers, page ranges, etc where cited material can be found
:'''|ps=''' – optional, sets terminal punctuation; default is full stop; for no terminal punctuation use {{para|ps|none}}; aliases: '''|postscript='''
:'''|separator=''' – optional, specifies alternate punctuation between contributor list, contribution, and source list; default is full stop (.)
:'''|url=''' – optional, URL of an online location where the text of the contribution can be found
:'''|year=''' – required, publication year of the work that includes the contribution
===Examples===
When a Wikipedia article makes reference to a work that contains multiple chapters by different authors, bibliographies and reference sections can look rather cluttered:
* {{cite book |last=George |first=Ernest J. |last2=Read |first2=Ralph A. |last3=Johnson |first3=R. W. |last4=Ferber |first4=A. E. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Shelterbelts and Windbreaks |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |url=//archive.org/stream/yoa1957#page/n785/mode/1up |oclc=704186906}}
* {{cite book |last=Harper |first=V. L. |last2=Frank |first2=Bernard |last3=McQuilkin |first3=W. E. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Forest Practices and Productivity |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |url=//archive.org/stream/yoa1957#page/n803/mode/1up |oclc=704186906}}
* {{cite book |last=Stout |first=P. R. |last2=Johnson |first2=C. M. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Trace Elements |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |url=//archive.org/stream/yoa1957#page/n167/mode/1up |oclc=704186906}}
* {{cite book |last=Wadleigh |first=C. H. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Growth of Plants |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |url=//archive.org/stream/yoa1957#page/n57/mode/1up |oclc=704186906}}
As the list grows longer, the look becomes more cluttered with the unnecessarily repeated detail of full-length citations. With {{tld|harvc}} editors can link to shorter, less detailed contribution citations using standard implementations of {{tlx|sfn}} templates{{sfn|George|Read|Johnson|Ferber|1957}} and {{tlx|harv}} templates (like this: {{harv|Harper|Frank|McQuilkin|1957}} and also wrapped in {{tag|ref}} tags<ref>{{harvnb|Stout|Johnson|1957}}</ref>). {{tld|harvc}} may also be wrapped in {{tag|ref}} tags so that it becomes part of the article's References section.<ref>{{harvc|last=Benson|first=Ezra Taft|year=1957|chapter=Foreword|url=//archive.org/stream/yoa1957#page/n5/mode/1up|in=Stefferud|p=vi |loc=§2}}</ref>{{sfn|Wadleigh|1957}}
It may sometimes be necessary to cite a contribution of a source's editor or author such that {{para|last1}} through {{para|last4}} are the same as {{para|in1}} through {{para|in4}}, an editor's preface for example. Such citations can, depending on placement, cause {{tld|sfn}} or {{tld|harv}}-family references to link directly to the citation instead of to the {{tld|harvc}} template, or cause circular links ({{tld|harvc}} linking to itself because its <code>CITEREF</code> anchor identifier is the same as the citation's <code>CITEREF</code> anchor identifier). If {{para|id}} is set, {{tld|harvc}} will use it as an anchor identifier; if {{para|id}} is not set, {{tld|harvc}} will emit an error message when {{para|last1}} through {{para|last4}} are the same as {{para|in1}} through {{para|in4}}.
For example, to reference an editor's preface from article text,<ref>[[#Stefferud preface|Stefferud 1957]]</ref> create a wikilink inside {{tag|ref}} tags:
:<code><nowiki><ref>[[#Stefferud preface|Stefferud 1957]]</ref></nowiki></code>
Write a {{tld|harvc}} template with {{para|id|Stefferud preface}}
:<code><nowiki>{{harvc |last=Stefferud |first=A.|year=1957 |id=Stefferud preface |c=Preface |url=//archive.org/stream/yoa1957#page/n7/mode/1up |in=Stefferud}}</nowiki></code>
====Example references section====
{{reflist}}
====Example bibliography section====
* {{cite book |title=Soil: The Yearbook of Agriculture 1957 |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |url=//archive.org/stream/yoa1957#page/n2/mode/1up |oclc=704186906 |ref=harv}}
** {{harvc |last=George |first=Ernest J. |last2=Read |last3=Johnson |last4=Ferber |year=1957 |contribution=Shelterbelts and Windbreaks |url=//archive.org/stream/yoa1957#page/n785/mode/1up |in=Stefferud}}
** {{harvc |last=Harper |first=V. L. |last2=Frank |last3=McQuilkin |year=1957 |contribution=Forest Practices and Productivity |url=//archive.org/stream/yoa1957#page/n803/mode/1up |in=Stefferud}}
** {{harvc |last=Stefferud |first=A.|year=1957 |id=Stefferud preface |c=Preface |url=//archive.org/stream/yoa1957#page/n7/mode/1up |in=Stefferud}}
** {{harvc |last=Stout |first=P. R. |last2=Johnson |year=1957 |c=Trace Elements |url=//archive.org/stream/yoa1957#page/n167/mode/1up |in=Stefferud}}
** {{harvc |last=Wadleigh |first=C. H.|year=1957 |c=Growth of Plants |url=//archive.org/stream/yoa1957#page/n57/mode/1up |in=Stefferud}}
==Error messages==
{{tld|harvc}} emits these error messages:
:<span style="font-size:100%" class="error">author missing from contributor list.</span>
::The contributors list parameters {{para|last1}}, {{para|last2}}, {{para|last3}}, and {{para|last4}} form the template's <code>CITEREF</code> anchor. All are not required but must be used in order without numerical gaps.
:<span style="font-size:100%" class="error">author missing from source list.</span>
::The source list parameters {{para|in1}}, {{para|in2}}, {{para|in3}}, and {{para|in4}} form the template's <code>CITEREF</code> link to the full citation. All are not required but must be used in order without numerical gaps.
:<span style="font-size:100%" class="error">invalid or missing year.</span>
::{{para|year}} is an integral part of the template's <code>CITEREF</code> anchor and link. The value of {{para|year}} must be a three- or four-digit number with an optional lowercase <code>CITEREF</code> disambiguator. When the source does not have an identifiable year, use {{para|year|n.d.}} or {{para|year|nd}}.
:<span style="font-size:100%" class="error">required contribution is missing.</span>
::This error message indicates that {{tld|harvc}} can't find any of {{para|c}}, {{para|chapter}}, or {{para|contribution}} with an assigned value
<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox | |
<!-- Categories below this line, please; interwikis at Wikidata -->
}}</includeonly>
p7ony177zvq97rnym0najxe4x7htlmf
801775
801774
2014-11-08T15:18:00Z
en>Trappist the monk
0
801775
wikitext
text/x-wiki
{{Documentation subpage}}
{{lua|Module:Harvc}}
{{ombox
| type = content
| text = This template is new and still trying to find its way in the world. Not currently recommended for use in article space.
}}
<!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
This template provides a way to cite a contribution to or chapter of a larger work when more than a few such cites are required. {{tld|harvc}} is not a substitute for a properly constructed citation.
{{tld|harvc}} is adapted from the {{tlx|harv}} family of short-form citation templates and from the {{cs1}} and {{cs2}} styles.
== Usage ==
The minimal form is:
:<code><nowiki>{{</nowiki>harvc|last=name1|year=year|contribution=title|in=src name}}</code>
===Parameters===
{{tld|harvc}} creates a <code>CITEREF</code> anchor from one to four contribution or chapter author surnames ({{para|last''n''}}) and the value in {{para|year}}. This allows {{tld|harvc}} to be the target of a link created by an {{tlx|sfn}} or {{tld|harv}} family template. From {{para|in''n''}} and {{para|year}}, {{tld|harvc}} creates a CITEREF link similar to those created by {{tlx|harvnb}} and {{tlx|sfn}}
:'''|c=''' – required, the title of chapter or contribution; rendered quoted in upright font; aliases: '''|chapter=''', '''|contribution='''
:'''|first=''' – optional, given or first name of the contribution's primary author
:'''|id=''' – required when {{para|last1}}-{{para|last4}} are the same as {{para|in1}}-{{para|in4}}; otherwise optional. See [[#Avoiding circular reference|Examples]]
:'''|in1=''' – required, surname or last name of primary editor or author of the work that includes the contribution; aliases '''|in='''
:'''|in2=''' – required, surname or last name of second editor or author
:'''|in3=''' – required, surname or last name of third editor or author
:'''|in4=''' – required, surname or last name of fourth editor or author
:'''|last1=''' – required, surname or last name of primary author; aliases: '''|last='''
:'''|last2=''' – optional, surname or last name of second author
:'''|last3=''' – optional, surname or last name of third author
:'''|last4=''' – optional, surname or last name of fourth author
:'''|loc=''' – optional, other location identifier, displays after {{para|p}} or {{para|pp}}
:'''|p=''' – optional, single page number where cited material can be found
:'''|pp=''' – optional, multiple page numbers, page ranges, etc where cited material can be found
:'''|ps=''' – optional, sets terminal punctuation; default is full stop; for no terminal punctuation use {{para|ps|none}}; aliases: '''|postscript='''
:'''|separator=''' – optional, specifies alternate punctuation between contributor list, contribution, and source list; default is full stop (.)
:'''|url=''' – optional, URL of an online location where the text of the contribution can be found
:'''|year=''' – required, publication year of the work that includes the contribution
===Examples===
When a Wikipedia article makes reference to a work that contains multiple chapters by different authors, bibliographies and reference sections can look rather cluttered:
* {{cite book |last=George |first=Ernest J. |last2=Read |first2=Ralph A. |last3=Johnson |first3=R. W. |last4=Ferber |first4=A. E. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Shelterbelts and Windbreaks |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |url=//archive.org/stream/yoa1957#page/n785/mode/1up |oclc=704186906}}
* {{cite book |last=Harper |first=V. L. |last2=Frank |first2=Bernard |last3=McQuilkin |first3=W. E. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Forest Practices and Productivity |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |url=//archive.org/stream/yoa1957#page/n803/mode/1up |oclc=704186906}}
* {{cite book |last=Stout |first=P. R. |last2=Johnson |first2=C. M. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Trace Elements |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |url=//archive.org/stream/yoa1957#page/n167/mode/1up |oclc=704186906}}
* {{cite book |last=Wadleigh |first=C. H. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Growth of Plants |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |url=//archive.org/stream/yoa1957#page/n57/mode/1up |oclc=704186906}}
As the list grows longer, the look becomes more cluttered with the unnecessarily repeated detail of full-length citations. With {{tld|harvc}} editors can link to shorter, less detailed contribution citations using standard implementations of {{tlx|sfn}} templates{{sfn|George|Read|Johnson|Ferber|1957}} and {{tlx|harv}} templates (like this: {{harv|Harper|Frank|McQuilkin|1957}} and also wrapped in {{tag|ref}} tags<ref>{{harvnb|Stout|Johnson|1957}}</ref>). {{tld|harvc}} may also be wrapped in {{tag|ref}} tags so that it becomes part of the article's References section.<ref>{{harvc|last=Benson|first=Ezra Taft|year=1957|chapter=Foreword|url=//archive.org/stream/yoa1957#page/n5/mode/1up|in=Stefferud|p=vi |loc=§2}}</ref>{{sfn|Wadleigh|1957}}
====Avoiding circular reference====
It may sometimes be necessary to cite a contribution of a source's editor or author such that {{para|last1}} through {{para|last4}} are the same as {{para|in1}} through {{para|in4}}, an editor's preface for example. Such citations can, depending on placement, cause {{tld|sfn}} or {{tld|harv}}-family references to link directly to the citation instead of to the {{tld|harvc}} template, or cause circular links ({{tld|harvc}} linking to itself because its <code>CITEREF</code> anchor identifier is the same as the citation's <code>CITEREF</code> anchor identifier). If {{para|id}} is set, {{tld|harvc}} will use it as an anchor identifier; if {{para|id}} is not set, {{tld|harvc}} will emit an error message when {{para|last1}} through {{para|last4}} are the same as {{para|in1}} through {{para|in4}}.
For example, to reference an editor's preface from article text,<ref>[[#Stefferud preface|Stefferud 1957]]</ref> create a wikilink inside {{tag|ref}} tags:
:<code><nowiki><ref>[[#Stefferud preface|Stefferud 1957]]</ref></nowiki></code>
Write a {{tld|harvc}} template with {{para|id|Stefferud preface}}
:<code><nowiki>{{harvc |last=Stefferud |first=A.|year=1957 |id=Stefferud preface |c=Preface |url=//archive.org/stream/yoa1957#page/n7/mode/1up |in=Stefferud}}</nowiki></code>
====Example references section====
{{reflist}}
====Example bibliography section====
* {{cite book |title=Soil: The Yearbook of Agriculture 1957 |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |url=//archive.org/stream/yoa1957#page/n2/mode/1up |oclc=704186906 |ref=harv}}
** {{harvc |last=George |first=Ernest J. |last2=Read |last3=Johnson |last4=Ferber |year=1957 |contribution=Shelterbelts and Windbreaks |url=//archive.org/stream/yoa1957#page/n785/mode/1up |in=Stefferud}}
** {{harvc |last=Harper |first=V. L. |last2=Frank |last3=McQuilkin |year=1957 |contribution=Forest Practices and Productivity |url=//archive.org/stream/yoa1957#page/n803/mode/1up |in=Stefferud}}
** {{harvc |last=Stefferud |first=A.|year=1957 |id=Stefferud preface |c=Preface |url=//archive.org/stream/yoa1957#page/n7/mode/1up |in=Stefferud}}
** {{harvc |last=Stout |first=P. R. |last2=Johnson |year=1957 |c=Trace Elements |url=//archive.org/stream/yoa1957#page/n167/mode/1up |in=Stefferud}}
** {{harvc |last=Wadleigh |first=C. H.|year=1957 |c=Growth of Plants |url=//archive.org/stream/yoa1957#page/n57/mode/1up |in=Stefferud}}
==Error messages==
{{tld|harvc}} emits these error messages:
:<span style="font-size:100%" class="error">author missing from contributor list.</span>
::The contributors list parameters {{para|last1}}, {{para|last2}}, {{para|last3}}, and {{para|last4}} form the template's <code>CITEREF</code> anchor. All are not required but must be used in order without numerical gaps.
:<span style="font-size:100%" class="error">author missing from source list.</span>
::The source list parameters {{para|in1}}, {{para|in2}}, {{para|in3}}, and {{para|in4}} form the template's <code>CITEREF</code> link to the full citation. All are not required but must be used in order without numerical gaps.
:<span style="font-size:100%" class="error">invalid or missing year.</span>
::{{para|year}} is an integral part of the template's <code>CITEREF</code> anchor and link. The value of {{para|year}} must be a three- or four-digit number with an optional lowercase <code>CITEREF</code> disambiguator. When the source does not have an identifiable year, use {{para|year|n.d.}} or {{para|year|nd}}.
:<span style="font-size:100%" class="error">required contribution is missing.</span>
::This error message indicates that {{tld|harvc}} can't find any of {{para|c}}, {{para|chapter}}, or {{para|contribution}} with an assigned value
:<span style="font-size:100%" class="error">required |id= parameter missing.</span>
::This error message emitted when the {{tld|harvc}} template's <code>CITEREF</code> anchor identifier would conflict with the long-form citation's <code>CITEREF</code> anchor identifier. See [[#Avoiding circular reference|Examples]]
<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox | |
<!-- Categories below this line, please; interwikis at Wikidata -->
}}</includeonly>
6l90ie9jl9pollmqpgemrbeidfme7ja
801776
801775
2014-11-09T12:33:29Z
en>Trappist the monk
0
Copyedit;
801776
wikitext
text/x-wiki
{{Documentation subpage}}
{{lua|Module:Harvc}}
{{ombox
| type = content
| text = This template is new and still trying to find its way in the world. Not currently recommended for use in article space.
}}
<!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
This template provides a method for referring to a contribution or chapter in a larger work when more than a few such referrals are required. {{tld|harvc}} is not a substitute for a properly constructed citation.
{{tld|harvc}} is adapted from the {{tlx|harv}} family of short-form citation templates and from the {{cs1}} and {{cs2}} styles.
== Usage ==
The minimal form is:
:<code><nowiki>{{harvc |last=contributor name |year=publication year |c=contribution title |in=source editor/author name}}</nowiki></code>
===Parameters===
{{tld|harvc}} creates a <code>CITEREF</code> anchor from one to four contribution or chapter author surnames ({{para|last''n''}}) and the value in {{para|year}}. This allows {{tld|harvc}} to be the target of a link created by {{tlx|sfn}} or {{tld|harv}} family templates. From {{para|in''n''}} and {{para|year}}, {{tld|harvc}} creates a CITEREF link similar to those created by {{tlx|harvnb}} and {{tlx|sfn}}
:'''|c=''' – required, the title of chapter or contribution; rendered quoted in upright font; aliases: '''|chapter=''', '''|contribution='''
:'''|first=''' – optional, given or first name of the contribution's primary author
:'''|id=''' – required when {{para|last1}}-{{para|last4}} are the same as {{para|in1}}-{{para|in4}}; otherwise optional. See [[#Avoiding circular reference|Examples]]
:'''|in1=''' – required, surname or last name of primary editor or author of the work that includes the contribution; aliases: '''|in='''
:'''|in2=''' – optional, surname or last name of second editor or author
:'''|in3=''' – optional, surname or last name of third editor or author
:'''|in4=''' – optional, surname or last name of fourth editor or author
:'''|last1=''' – required, surname or last name of primary author; aliases: '''|last='''
:'''|last2=''' – optional, surname or last name of second author
:'''|last3=''' – optional, surname or last name of third author
:'''|last4=''' – optional, surname or last name of fourth author
:'''|loc=''' – optional, other location identifier, displays after {{para|p}} or {{para|pp}}
:'''|p=''' – optional, single page number where cited material can be found
:'''|pp=''' – optional, multiple page numbers, page ranges, etc where cited material can be found
:'''|ps=''' – optional, sets terminal punctuation; default is full stop; for no terminal punctuation use {{para|ps|none}}; aliases: '''|postscript='''
:'''|sep=''' – optional, specifies alternate punctuation between contributor list, contribution, and source list; default is full stop (.); set to comma for CS2 compatibility; aliases: '''|separator='''
:'''|url=''' – optional, URL of an online location where the text of the contribution can be found
:'''|year=''' – required, publication year of the work that includes the contribution
===Examples===
When a Wikipedia article makes reference to a work that contains multiple chapters by different authors, bibliographies and reference sections can look rather cluttered:
* {{cite book |last=George |first=Ernest J. |last2=Read |first2=Ralph A. |last3=Johnson |first3=R. W. |last4=Ferber |first4=A. E. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Shelterbelts and Windbreaks |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |url=//archive.org/stream/yoa1957#page/n785/mode/1up |oclc=704186906}}
* {{cite book |last=Harper |first=V. L. |last2=Frank |first2=Bernard |last3=McQuilkin |first3=W. E. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Forest Practices and Productivity |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |url=//archive.org/stream/yoa1957#page/n803/mode/1up |oclc=704186906}}
* {{cite book |last=Stout |first=P. R. |last2=Johnson |first2=C. M. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Trace Elements |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |url=//archive.org/stream/yoa1957#page/n167/mode/1up |oclc=704186906}}
* {{cite book |last=Wadleigh |first=C. H. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Growth of Plants |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |url=//archive.org/stream/yoa1957#page/n57/mode/1up |oclc=704186906}}
As the list grows longer, the look becomes more cluttered with the unnecessarily repeated detail of full-length citations. With {{tld|harvc}} editors can link to shorter, less detailed contribution citations using standard implementations of {{tlx|sfn}} templates{{sfn|George|Read|Johnson|Ferber|1957}} and {{tlx|harv}} templates (like this: {{harv|Harper|Frank|McQuilkin|1957}} and also wrapped in {{tag|ref}} tags<ref>{{harvnb|Stout|Johnson|1957}}</ref>). {{tld|harvc}} may also be wrapped in {{tag|ref}} tags so that it becomes part of the article's References section.<ref>{{harvc|last=Benson|first=Ezra Taft|year=1957|chapter=Foreword|url=//archive.org/stream/yoa1957#page/n5/mode/1up|in=Stefferud|p=vi |loc=§2}}</ref>{{sfn|Wadleigh|1957}}
====Avoiding circular reference====
It may sometimes be necessary to cite a contribution of a source's editor or author such that {{para|last1}} through {{para|last4}} are the same as {{para|in1}} through {{para|in4}}, an editor's preface for example. Such citations can, depending on placement, cause {{tld|sfn}} or {{tld|harv}}-family references to link directly to the citation instead of to the {{tld|harvc}} template, or cause circular links ({{tld|harvc}} linking to itself because its <code>CITEREF</code> anchor identifier is the same as the citation's <code>CITEREF</code> anchor identifier). If {{para|id}} is set, {{tld|harvc}} will use it as an anchor identifier; if {{para|id}} is not set, {{tld|harvc}} will emit an error message when {{para|last1}} through {{para|last4}} are the same as {{para|in1}} through {{para|in4}}.
For example, to reference an editor's preface from article text, create a wikilink inside {{tag|ref}} tags:<ref>[[#Stefferud preface|Stefferud 1957]]</ref>
:<code><nowiki><ref>[[#Stefferud preface|Stefferud 1957]]</ref></nowiki></code>
Write a {{tld|harvc}} template with {{para|id|Stefferud preface}}
:<code><nowiki>{{harvc |last=Stefferud |first=A.|year=1957 |id=Stefferud preface |c=Preface |url=//archive.org/stream/yoa1957#page/n7/mode/1up |in=Stefferud}}</nowiki></code>
====Example references section====
{{reflist}}
====Example bibliography section====
* {{cite book |title=Soil: The Yearbook of Agriculture 1957 |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |url=//archive.org/stream/yoa1957#page/n2/mode/1up |oclc=704186906 |ref=harv}}
** {{harvc |last=George |first=Ernest J. |last2=Read |last3=Johnson |last4=Ferber |year=1957 |contribution=Shelterbelts and Windbreaks |url=//archive.org/stream/yoa1957#page/n785/mode/1up |in=Stefferud}}
** {{harvc |last=Harper |first=V. L. |last2=Frank |last3=McQuilkin |year=1957 |contribution=Forest Practices and Productivity |url=//archive.org/stream/yoa1957#page/n803/mode/1up |in=Stefferud}}
** {{harvc |last=Stefferud |first=A.|year=1957 |id=Stefferud preface |c=Preface |url=//archive.org/stream/yoa1957#page/n7/mode/1up |in=Stefferud}}
** {{harvc |last=Stout |first=P. R. |last2=Johnson |year=1957 |c=Trace Elements |url=//archive.org/stream/yoa1957#page/n167/mode/1up |in=Stefferud}}
** {{harvc |last=Wadleigh |first=C. H.|year=1957 |c=Growth of Plants |url=//archive.org/stream/yoa1957#page/n57/mode/1up |in=Stefferud}}
==Error messages==
{{tld|harvc}} emits these error messages:
:<span style="font-size:100%" class="error">author missing from contributor list.</span>
::The contributors list parameters {{para|last1}}, {{para|last2}}, {{para|last3}}, and {{para|last4}} form the template's <code>CITEREF</code> anchor. All are not required but must be used in order without numerical gaps.
:<span style="font-size:100%" class="error">author missing from source list.</span>
::The source list parameters {{para|in1}}, {{para|in2}}, {{para|in3}}, and {{para|in4}} form the template's <code>CITEREF</code> link to the full citation. All are not required but must be used in order without numerical gaps.
:<span style="font-size:100%" class="error">invalid or missing year.</span>
::{{para|year}} is an integral part of the template's <code>CITEREF</code> anchor and link. The value of {{para|year}} must be a three- or four-digit number with an optional lowercase <code>CITEREF</code> disambiguator. When the source does not have an identifiable year, use {{para|year|n.d.}} or {{para|year|nd}}.
:<span style="font-size:100%" class="error">required contribution is missing.</span>
::This error message indicates that {{tld|harvc}} can't find any of {{para|c}}, {{para|chapter}}, or {{para|contribution}} with an assigned value
:<span style="font-size:100%" class="error">required |id= parameter missing.</span>
::This error message emitted when the {{tld|harvc}} template's <code>CITEREF</code> anchor identifier would conflict with the long-form citation's <code>CITEREF</code> anchor identifier. See [[#Avoiding circular reference|Examples]]
==Template data==
<templatedata>
{
"description": "A method for referring to a contribution or chapter in a larger work when more than a few such referrals are required. {{harvc}} is not a substitute for a properly constructed citation.",
"params": {
"c": {
"aliases": ["chapter", " contribution"],
"description": "the title of chapter or contribution; rendered quoted in upright font",
"type": "string",
"required": true
},
"first": {
"description": "given or first name of the contribution's primary author",
"type": "string"
},
"id": {
"description": "required when |last1=-|last4= are the same as |in1=-|in4=; otherwise optional",
"type": "string"
},
"in1": {
"aliases": ["in"],
"description": "surname or last name of primary editor or author of the work that includes the contribution",
"type": "string",
"required": true
},
"in2": {
"description": "surname or last name of second editor or author",
"type": "string"
},
"in3": {
"description": "surname or last name of third editor or author",
"type": "string"
},
"in4": {
"description": "surname or last name of fourth editor or author",
"type": "string"
},
"last1": {
"aliases": ["last"],
"description": "surname or last name of primary contributor",
"type": "string",
"required": true
},
"last2": {
"description": "surname or last name of second contributor",
"type": "string"
},
"last3": {
"description": "surname or last name of third contributor",
"type": "string"
},
"last4": {
"description": "surname or last name of fourth contributor",
"type": "string"
},
"loc": {
"description": "other in-source location identifier, displays after |p= or |pp=",
"type": "string"
},
"p": {
"description": "single page number where cited material can be found",
"type": "string"
},
"pp": {
"description": "multiple page numbers, page ranges, etc where cited material can be found",
"type": "string"
},
"ps": {
"aliases": ["postscript"],
"description": "sets terminal punctuation; default is full stop; for no terminal punctuation use |ps=none",
"type": "string"
},
"sep": {
"aliases": ["separator"],
"description": "specifies alternate punctuation between contributor list, contribution, and source list; default is full stop; set to comma for CS2 compatibility",
"type": "string"
},
"url": {
"description": "URL of an online location where the text of the contribution can be found",
"type": "string"
},
"year": {
"description": "publication year of the work that includes the contribution",
"type": "date",
"required": true
}
}
}
</templatedata>
<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox | |
<!-- Categories below this line, please; interwikis at Wikidata -->
}}</includeonly>
gp9o0nu3n2y9ysnf2mxixuis0kq8g0i
801777
801776
2014-11-10T15:32:47Z
en>Trappist the monk
0
Category;
801777
wikitext
text/x-wiki
{{Documentation subpage}}
{{lua|Module:Harvc}}
<!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
This template provides a method for referring to a contribution or chapter in a larger work when more than a few such referrals are required. {{tld|harvc}} is not a substitute for a properly constructed citation.
{{tld|harvc}} is adapted from the {{tlx|harv}} family of short-form citation templates and from the {{cs1}} and {{cs2}} styles.
== Usage ==
The minimal form is:
:<code><nowiki>{{harvc |last=contributor name |year=publication year |c=contribution title |in=source editor/author name}}</nowiki></code>
===Parameters===
{{tld|harvc}} creates a <code>CITEREF</code> anchor from one to four contribution or chapter author surnames ({{para|last''n''}}) and the value in {{para|year}}. This allows {{tld|harvc}} to be the target of a link created by {{tlx|sfn}} or {{tld|harv}} family templates. From {{para|in''n''}} and {{para|year}}, {{tld|harvc}} creates a CITEREF link similar to those created by {{tlx|harvnb}} and {{tlx|sfn}}
:'''|c=''' – required, the title of chapter or contribution; rendered quoted in upright font; aliases: '''|chapter=''', '''|contribution='''
:'''|first=''' – optional, given or first name of the contribution's primary author
:'''|id=''' – required when {{para|last1}}-{{para|last4}} are the same as {{para|in1}}-{{para|in4}}; otherwise optional. See [[#Avoiding circular reference|Examples]]
:'''|in1=''' – required, surname or last name of primary editor or author of the work that includes the contribution; aliases: '''|in='''
:'''|in2=''' – optional, surname or last name of second editor or author
:'''|in3=''' – optional, surname or last name of third editor or author
:'''|in4=''' – optional, surname or last name of fourth editor or author
:'''|last1=''' – required, surname or last name of primary author; aliases: '''|last='''
:'''|last2=''' – optional, surname or last name of second author
:'''|last3=''' – optional, surname or last name of third author
:'''|last4=''' – optional, surname or last name of fourth author
:'''|loc=''' – optional, other location identifier, displays after {{para|p}} or {{para|pp}}
:'''|p=''' – optional, single page number where cited material can be found
:'''|pp=''' – optional, multiple page numbers, page ranges, etc where cited material can be found
:'''|ps=''' – optional, sets terminal punctuation; default is full stop; for no terminal punctuation use {{para|ps|none}}; aliases: '''|postscript='''
:'''|sep=''' – optional, specifies alternate punctuation between contributor list, contribution, and source list; default is full stop (.); set to comma for CS2 compatibility; aliases: '''|separator='''
:'''|url=''' – optional, URL of an online location where the text of the contribution can be found
:'''|year=''' – required, publication year of the work that includes the contribution
===Examples===
When a Wikipedia article makes reference to a work that contains multiple chapters by different authors, bibliographies and reference sections can look rather cluttered:
* {{cite book |last=George |first=Ernest J. |last2=Read |first2=Ralph A. |last3=Johnson |first3=R. W. |last4=Ferber |first4=A. E. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Shelterbelts and Windbreaks |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |url=//archive.org/stream/yoa1957#page/n785/mode/1up |oclc=704186906}}
* {{cite book |last=Harper |first=V. L. |last2=Frank |first2=Bernard |last3=McQuilkin |first3=W. E. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Forest Practices and Productivity |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |url=//archive.org/stream/yoa1957#page/n803/mode/1up |oclc=704186906}}
* {{cite book |last=Stout |first=P. R. |last2=Johnson |first2=C. M. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Trace Elements |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |url=//archive.org/stream/yoa1957#page/n167/mode/1up |oclc=704186906}}
* {{cite book |last=Wadleigh |first=C. H. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Growth of Plants |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |url=//archive.org/stream/yoa1957#page/n57/mode/1up |oclc=704186906}}
As the list grows longer, the look becomes more cluttered with the unnecessarily repeated detail of full-length citations. With {{tld|harvc}} editors can link to shorter, less detailed contribution citations using standard implementations of {{tlx|sfn}} templates{{sfn|George|Read|Johnson|Ferber|1957}} and {{tlx|harv}} templates (like this: {{harv|Harper|Frank|McQuilkin|1957}} and also wrapped in {{tag|ref}} tags<ref>{{harvnb|Stout|Johnson|1957}}</ref>). {{tld|harvc}} may also be wrapped in {{tag|ref}} tags so that it becomes part of the article's References section.<ref>{{harvc|last=Benson|first=Ezra Taft|year=1957|chapter=Foreword|url=//archive.org/stream/yoa1957#page/n5/mode/1up|in=Stefferud|p=vi |loc=§2}}</ref>{{sfn|Wadleigh|1957}}
====Avoiding circular reference====
It may sometimes be necessary to cite a contribution of a source's editor or author such that {{para|last1}} through {{para|last4}} are the same as {{para|in1}} through {{para|in4}}, an editor's preface for example. Such citations can, depending on placement, cause {{tld|sfn}} or {{tld|harv}}-family references to link directly to the citation instead of to the {{tld|harvc}} template, or cause circular links ({{tld|harvc}} linking to itself because its <code>CITEREF</code> anchor identifier is the same as the citation's <code>CITEREF</code> anchor identifier). If {{para|id}} is set, {{tld|harvc}} will use it as an anchor identifier; if {{para|id}} is not set, {{tld|harvc}} will emit an error message when {{para|last1}} through {{para|last4}} are the same as {{para|in1}} through {{para|in4}}.
For example, to reference an editor's preface from article text, create a wikilink inside {{tag|ref}} tags:<ref>[[#Stefferud preface|Stefferud 1957]]</ref>
:<code><nowiki><ref>[[#Stefferud preface|Stefferud 1957]]</ref></nowiki></code>
Write a {{tld|harvc}} template with {{para|id|Stefferud preface}}
:<code><nowiki>{{harvc |last=Stefferud |first=A.|year=1957 |id=Stefferud preface |c=Preface |url=//archive.org/stream/yoa1957#page/n7/mode/1up |in=Stefferud}}</nowiki></code>
====Example references section====
{{reflist}}
====Example bibliography section====
* {{cite book |title=Soil: The Yearbook of Agriculture 1957 |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |url=//archive.org/stream/yoa1957#page/n2/mode/1up |oclc=704186906 |ref=harv}}
** {{harvc |last=George |first=Ernest J. |last2=Read |last3=Johnson |last4=Ferber |year=1957 |contribution=Shelterbelts and Windbreaks |url=//archive.org/stream/yoa1957#page/n785/mode/1up |in=Stefferud}}
** {{harvc |last=Harper |first=V. L. |last2=Frank |last3=McQuilkin |year=1957 |contribution=Forest Practices and Productivity |url=//archive.org/stream/yoa1957#page/n803/mode/1up |in=Stefferud}}
** {{harvc |last=Stefferud |first=A.|year=1957 |id=Stefferud preface |c=Preface |url=//archive.org/stream/yoa1957#page/n7/mode/1up |in=Stefferud}}
** {{harvc |last=Stout |first=P. R. |last2=Johnson |year=1957 |c=Trace Elements |url=//archive.org/stream/yoa1957#page/n167/mode/1up |in=Stefferud}}
** {{harvc |last=Wadleigh |first=C. H.|year=1957 |c=Growth of Plants |url=//archive.org/stream/yoa1957#page/n57/mode/1up |in=Stefferud}}
==Error messages==
{{tld|harvc}} emits these error messages:
:<span style="font-size:100%" class="error">author missing from contributor list.</span>
::The contributors list parameters {{para|last1}}, {{para|last2}}, {{para|last3}}, and {{para|last4}} form the template's <code>CITEREF</code> anchor. All are not required but must be used in order without numerical gaps.
:<span style="font-size:100%" class="error">author missing from source list.</span>
::The source list parameters {{para|in1}}, {{para|in2}}, {{para|in3}}, and {{para|in4}} form the template's <code>CITEREF</code> link to the full citation. All are not required but must be used in order without numerical gaps.
:<span style="font-size:100%" class="error">invalid or missing year.</span>
::{{para|year}} is an integral part of the template's <code>CITEREF</code> anchor and link. The value of {{para|year}} must be a three- or four-digit number with an optional lowercase <code>CITEREF</code> disambiguator. When the source does not have an identifiable year, use {{para|year|n.d.}} or {{para|year|nd}}.
:<span style="font-size:100%" class="error">required contribution is missing.</span>
::This error message indicates that {{tld|harvc}} can't find any of {{para|c}}, {{para|chapter}}, or {{para|contribution}} with an assigned value
:<span style="font-size:100%" class="error">required |id= parameter missing.</span>
::This error message emitted when the {{tld|harvc}} template's <code>CITEREF</code> anchor identifier would conflict with the long-form citation's <code>CITEREF</code> anchor identifier. See [[#Avoiding circular reference|Examples]]
==Template data==
<templatedata>
{
"description": "A method for referring to a contribution or chapter in a larger work when more than a few such referrals are required. {{harvc}} is not a substitute for a properly constructed citation.",
"params": {
"c": {
"aliases": ["chapter", " contribution"],
"description": "the title of chapter or contribution; rendered quoted in upright font",
"type": "string",
"required": true
},
"first": {
"description": "given or first name of the contribution's primary author",
"type": "string"
},
"id": {
"description": "required when |last1=-|last4= are the same as |in1=-|in4=; otherwise optional",
"type": "string"
},
"in1": {
"aliases": ["in"],
"description": "surname or last name of primary editor or author of the work that includes the contribution",
"type": "string",
"required": true
},
"in2": {
"description": "surname or last name of second editor or author",
"type": "string"
},
"in3": {
"description": "surname or last name of third editor or author",
"type": "string"
},
"in4": {
"description": "surname or last name of fourth editor or author",
"type": "string"
},
"last1": {
"aliases": ["last"],
"description": "surname or last name of primary contributor",
"type": "string",
"required": true
},
"last2": {
"description": "surname or last name of second contributor",
"type": "string"
},
"last3": {
"description": "surname or last name of third contributor",
"type": "string"
},
"last4": {
"description": "surname or last name of fourth contributor",
"type": "string"
},
"loc": {
"description": "other in-source location identifier, displays after |p= or |pp=",
"type": "string"
},
"p": {
"description": "single page number where cited material can be found",
"type": "string"
},
"pp": {
"description": "multiple page numbers, page ranges, etc where cited material can be found",
"type": "string"
},
"ps": {
"aliases": ["postscript"],
"description": "sets terminal punctuation; default is full stop; for no terminal punctuation use |ps=none",
"type": "string"
},
"sep": {
"aliases": ["separator"],
"description": "specifies alternate punctuation between contributor list, contribution, and source list; default is full stop; set to comma for CS2 compatibility",
"type": "string"
},
"url": {
"description": "URL of an online location where the text of the contribution can be found",
"type": "string"
},
"year": {
"description": "publication year of the work that includes the contribution",
"type": "date",
"required": true
}
}
}
</templatedata>
<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox | |
<!-- Categories below this line, please; interwikis at Wikidata -->
[[Category:Citation template utility templates]]
}}</includeonly>
sapa4qop7oprt0w4vnx2d1mxktqo3xe
801778
801777
2015-04-23T13:15:27Z
en>Trappist the monk
0
Copyedit;
801778
wikitext
text/x-wiki
{{Documentation subpage}}
{{lua|Module:Harvc}}
<!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
This template provides a method for referring to a contribution or chapter in a larger work when more than a few such referrals are required. {{tld|harvc}} is not a substitute for a properly constructed citation.
{{tld|harvc}} is adapted from the {{tlx|harv}} family of short-form citation templates and from the {{cs1}} and {{cs2}} styles.
== Usage ==
The minimal form is:
:<code><nowiki>{{harvc |last=contributor name |year=publication year |c=contribution title |in=source editor/author name}}</nowiki></code>
===Parameters===
{{tld|harvc}} creates a <code>CITEREF</code> anchor from one to four contribution or chapter author surnames ({{para|last''n''}}) and the value in {{para|year}}. This allows {{tld|harvc}} to be the target of a link created by {{tlx|sfn}} or {{tld|harv}} family templates. From {{para|in''n''}} and {{para|year}}, {{tld|harvc}} creates a CITEREF link similar to those created by {{tlx|harvnb}} and {{tlx|sfn}}
:'''|c=''' – required, the title of chapter or contribution; rendered quoted in upright font; aliases: '''|chapter=''', '''|contribution='''
:'''|display-authors=''' – optional, defines how {{tld|harvc}} displays the contributor list:
::{{para|display-authors}} – when empty or omitted, contributor list mimics the style of {{tld|sfn}} or {{tld|harv}} templates
::{{para|display-authors|''n''}} – contributor list is limited to ''n'' contributors; appends et al. when the template displays fewer contributors than are included in the template
::{{para|display-authors|all}} – displays all of the included contributors
::{{para|display-authors|etal}} – displays all of the included contributors and appends et al.
:'''|first=''' – optional, contributor's given or first name; alias: '''|first1='''
:'''|first''n''=''' – optional, contributor's given or first name; ''n'' begins at 2 and increases by 1 for each additional '''|first''n''='''
:'''|id=''' – required when {{para|last1}}-{{para|last4}} are the same as {{para|in1}}-{{para|in4}}; otherwise optional. See [[#Avoiding circular reference|Examples]]
:'''|in1=''' – required, surname or last name of primary editor or author of the work that includes the contribution; aliases: '''|in='''
:'''|in2=''' – optional, surname or last name of second editor or author
:'''|in3=''' – optional, surname or last name of third editor or author
:'''|in4=''' – optional, surname or last name of fourth editor or author
:'''|last1=''' – required, surname or last name of primary author; aliases: '''|last='''
:'''|last''n''=''' – optional, contributor's surname or last name ''n'' begins at 2 and increases by 1 for each additional '''|last''n''=''';
:'''|loc=''' – optional, other location identifier, displays after {{para|p}} or {{para|pp}}
:'''|mode=''' – controls rendered display to match that of adjacent CS1 or CS2 citations; defaults to CS1 style; set to <code>cs2</code> to mimic {{tlx|citation}} style
:'''|p=''' – optional, single page number where cited material can be found
:'''|pp=''' – optional, multiple page numbers, page ranges, etc where cited material can be found
:'''|ps=''' – optional, sets terminal punctuation; default is full stop for CS1 style, defaults to no punctuation when {{para|mode|cs2}}; for no terminal punctuation use {{para|ps|none}}; aliases: '''|postscript='''
:'''|url=''' – optional, URL of an online location where the text of the contribution can be found
:'''|year=''' – required, publication year of the work that includes the contribution
===Examples===
When a Wikipedia article makes reference to a work that contains multiple chapters by different authors, bibliographies and reference sections can look rather cluttered:
* {{cite book |last=George |first=Ernest J. |last2=Read |first2=Ralph A. |last3=Johnson |first3=R. W. |last4=Ferber |first4=A. E. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Shelterbelts and Windbreaks |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=//archive.org/stream/yoa1957#page/n785/mode/1up |oclc=704186906}}
* {{cite book |last=Harper |first=V. L. |last2=Frank |first2=Bernard |last3=McQuilkin |first3=W. E. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Forest Practices and Productivity |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=//archive.org/stream/yoa1957#page/n803/mode/1up |oclc=704186906}}
* {{cite book |last=Stout |first=P. R. |last2=Johnson |first2=C. M. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Trace Elements |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=//archive.org/stream/yoa1957#page/n167/mode/1up |oclc=704186906}}
* {{cite book |last=Wadleigh |first=C. H. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Growth of Plants |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=//archive.org/stream/yoa1957#page/n57/mode/1up |oclc=704186906}}
As the list grows longer, the look becomes more cluttered with the unnecessarily repeated detail of full-length citations. With {{tld|harvc}} editors can link to shorter, less detailed contribution citations using standard implementations of {{tlx|sfn}} templates{{sfn|George|Read|Johnson|Ferber|1957}} and {{tlx|harv}} templates (like this: {{harv|Harper|Frank|McQuilkin|1957}} and also wrapped in {{tag|ref}} tags<ref>{{harvnb|Stout|Johnson|1957}}</ref>). {{tld|harvc}} may also be wrapped in {{tag|ref}} tags so that it becomes part of the article's References section.<ref>{{harvc|last=Benson|first=Ezra Taft|year=1957|chapter=Foreword|url=//archive.org/stream/yoa1957#page/n5/mode/1up|in=Stefferud|p=vi |loc=§2}}</ref>{{sfn|Wadleigh|1957}}
====Avoiding circular reference====
It may sometimes be necessary to cite a contribution of a source's editor or author such that {{para|last1}} through {{para|last4}} are the same as {{para|in1}} through {{para|in4}}, an editor's preface for example. Such citations can, depending on placement, cause {{tld|sfn}} or {{tld|harv}}-family references to link directly to the citation instead of to the {{tld|harvc}} template, or cause circular links ({{tld|harvc}} linking to itself because its <code>CITEREF</code> anchor identifier is the same as the citation's <code>CITEREF</code> anchor identifier). If {{para|id}} is set, {{tld|harvc}} will use it as an anchor identifier; if {{para|id}} is not set, {{tld|harvc}} will emit an error message when {{para|last1}} through {{para|last4}} are the same as {{para|in1}} through {{para|in4}}.
For example, to reference an editor's preface from article text, create a wikilink inside {{tag|ref}} tags:<ref>[[#Stefferud preface|Stefferud 1957]]</ref>
:<code><nowiki><ref>[[#Stefferud preface|Stefferud 1957]]</ref></nowiki></code>
Write a {{tld|harvc}} template with {{para|id|Stefferud preface}}
:<code><nowiki>{{harvc |last=Stefferud |first=A.|year=1957 |id=Stefferud preface |c=Preface |url=//archive.org/stream/yoa1957#page/n7/mode/1up |in=Stefferud}}</nowiki></code>
====Example references section====
{{reflist}}
====Example bibliography section====
* {{cite book |title=Soil: The Yearbook of Agriculture 1957 |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |url=//archive.org/stream/yoa1957#page/n2/mode/1up |oclc=704186906 |ref=harv}}
** {{harvc |last=George |first=Ernest J. |last2=Read |last3=Johnson |last4=Ferber |year=1957 |contribution=Shelterbelts and Windbreaks |url=//archive.org/stream/yoa1957#page/n785/mode/1up |in=Stefferud}}
** {{harvc |last=Harper |first=V. L. |last2=Frank |last3=McQuilkin |year=1957 |contribution=Forest Practices and Productivity |url=//archive.org/stream/yoa1957#page/n803/mode/1up |in=Stefferud}}
** {{harvc |last=Stefferud |first=A.|year=1957 |id=Stefferud preface |c=Preface |url=//archive.org/stream/yoa1957#page/n7/mode/1up |in=Stefferud}}
** {{harvc |last=Stout |first=P. R. |last2=Johnson |year=1957 |c=Trace Elements |url=//archive.org/stream/yoa1957#page/n167/mode/1up |in=Stefferud}}
** {{harvc |last=Wadleigh |first=C. H.|year=1957 |c=Growth of Plants |url=//archive.org/stream/yoa1957#page/n57/mode/1up |in=Stefferud}}
==Error messages==
{{tld|harvc}} emits these error messages:
:<span style="font-size:100%" class="error">harvc: author missing from source list.</span>
::the source list parameters {{para|in1}}, {{para|in2}}, {{para|in3}}, and {{para|in4}} form the template's <code>CITEREF</code> link to the full citation. All are not required but must be used in order without numerical gaps.
:<span style="font-size:100%" class="error">harvc: invalid |display-authors=.</span>
::the value assigned to {{para|display-authors}} must be a number greater than 0 or one of the key words <code>all</code> or <code>etal</code>
:<span style="font-size:100%" class="error">harvc: invalid or missing year.</span>
::{{para|year}} is an integral part of the template's <code>CITEREF</code> anchor and link. The value of {{para|year}} must be a three- or four-digit number with an optional lowercase <code>CITEREF</code> disambiguator. When the source does not have an identifiable year, use {{para|year|n.d.}} or {{para|year|nd}}.
:<span style="font-size:100%" class="error">harvc: no authors in contributor list.</span>
::this error message indicates that {{tld|harvc}} can't find {{para|last}} or {{para|last1}} with an assigned value and so cannot make a usable <code>CITEREF</code> anchor without contributors. Add at least one {{para|last''n''}} parameter.
:<span style="font-size:100%" class="error">harvc: required contribution is missing.</span>
::this error message indicates that {{tld|harvc}} can't find any of {{para|c}}, {{para|chapter}}, or {{para|contribution}} with an assigned value
:<span style="font-size:100%" class="error">harvc: required |id= parameter missing.</span>
::this error message emitted when the {{tld|harvc}} template's <code>CITEREF</code> anchor identifier would conflict with the long-form citation's <code>CITEREF</code> anchor identifier. See [[#Avoiding circular reference|Examples]]
==Template data==
<templatedata>
{
"description": "A method for referring to a contribution or chapter in a larger work when more than a few such referrals are required. {{harvc}} is not a substitute for a properly constructed citation.",
"params": {
"c": {
"aliases": ["chapter", " contribution"],
"description": "the title of chapter or contribution; rendered quoted in upright font",
"type": "string",
"required": true
},
"first": {
"description": "given or first name of the contribution's primary author",
"type": "string"
},
"id": {
"description": "required when |last1=-|last4= are the same as |in1=-|in4=; otherwise optional",
"type": "string"
},
"in1": {
"aliases": ["in"],
"description": "surname or last name of primary editor or author of the work that includes the contribution",
"type": "string",
"required": true
},
"in2": {
"description": "surname or last name of second editor or author",
"type": "string"
},
"in3": {
"description": "surname or last name of third editor or author",
"type": "string"
},
"in4": {
"description": "surname or last name of fourth editor or author",
"type": "string"
},
"last1": {
"aliases": ["last"],
"description": "surname or last name of primary contributor",
"type": "string",
"required": true
},
"last2": {
"description": "surname or last name of second contributor",
"type": "string"
},
"last3": {
"description": "surname or last name of third contributor",
"type": "string"
},
"last4": {
"description": "surname or last name of fourth contributor",
"type": "string"
},
"loc": {
"description": "other in-source location identifier, displays after |p= or |pp=",
"type": "string"
},
"p": {
"description": "single page number where cited material can be found",
"type": "string"
},
"pp": {
"description": "multiple page numbers, page ranges, etc where cited material can be found",
"type": "string"
},
"ps": {
"aliases": ["postscript"],
"description": "sets terminal punctuation; default is full stop; for no terminal punctuation use |ps=none",
"type": "string"
},
"sep": {
"aliases": ["separator"],
"description": "specifies alternate punctuation between contributor list, contribution, and source list; default is full stop; set to comma for CS2 compatibility",
"type": "string"
},
"url": {
"description": "URL of an online location where the text of the contribution can be found",
"type": "string"
},
"year": {
"description": "publication year of the work that includes the contribution",
"type": "date",
"required": true
}
}
}
</templatedata>
<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox | |
<!-- Categories below this line, please; interwikis at Wikidata -->
[[Category:Citation template utility templates]]
}}</includeonly>
pefqdyi5mnjyidukapmq1ppg6dfbgia
801779
801778
2015-04-23T14:05:36Z
en>Trappist the monk
0
/* Template data */ Copyedit;
801779
wikitext
text/x-wiki
{{Documentation subpage}}
{{lua|Module:Harvc}}
<!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
This template provides a method for referring to a contribution or chapter in a larger work when more than a few such referrals are required. {{tld|harvc}} is not a substitute for a properly constructed citation.
{{tld|harvc}} is adapted from the {{tlx|harv}} family of short-form citation templates and from the {{cs1}} and {{cs2}} styles.
== Usage ==
The minimal form is:
:<code><nowiki>{{harvc |last=contributor name |year=publication year |c=contribution title |in=source editor/author name}}</nowiki></code>
===Parameters===
{{tld|harvc}} creates a <code>CITEREF</code> anchor from one to four contribution or chapter author surnames ({{para|last''n''}}) and the value in {{para|year}}. This allows {{tld|harvc}} to be the target of a link created by {{tlx|sfn}} or {{tld|harv}} family templates. From {{para|in''n''}} and {{para|year}}, {{tld|harvc}} creates a CITEREF link similar to those created by {{tlx|harvnb}} and {{tlx|sfn}}
:'''|c=''' – required, the title of chapter or contribution; rendered quoted in upright font; aliases: '''|chapter=''', '''|contribution='''
:'''|display-authors=''' – optional, defines how {{tld|harvc}} displays the contributor list:
::{{para|display-authors}} – when empty or omitted, contributor list mimics the style of {{tld|sfn}} or {{tld|harv}} templates
::{{para|display-authors|''n''}} – contributor list is limited to ''n'' contributors; appends et al. when the template displays fewer contributors than are included in the template
::{{para|display-authors|all}} – displays all of the included contributors
::{{para|display-authors|etal}} – displays all of the included contributors and appends et al.
:'''|first=''' – optional, contributor's given or first name; alias: '''|first1='''
:'''|first''n''=''' – optional, contributor's given or first name; ''n'' begins at 2 and increases by 1 for each additional '''|first''n''='''
:'''|id=''' – required when {{para|last1}}-{{para|last4}} are the same as {{para|in1}}-{{para|in4}}; otherwise optional. See [[#Avoiding circular reference|Examples]]
:'''|in1=''' – required, surname or last name of primary editor or author of the work that includes the contribution; aliases: '''|in='''
:'''|in2=''' – optional, surname or last name of second editor or author
:'''|in3=''' – optional, surname or last name of third editor or author
:'''|in4=''' – optional, surname or last name of fourth editor or author
:'''|last1=''' – required, surname or last name of primary author; aliases: '''|last='''
:'''|last''n''=''' – optional, contributor's surname or last name ''n'' begins at 2 and increases by 1 for each additional '''|last''n''=''';
:'''|loc=''' – optional, other location identifier, displays after {{para|p}} or {{para|pp}}
:'''|mode=''' – controls rendered display to match that of adjacent CS1 or CS2 citations; defaults to CS1 style; set to <code>cs2</code> to mimic {{tlx|citation}} style
:'''|p=''' – optional, single page number where cited material can be found
:'''|pp=''' – optional, multiple page numbers, page ranges, etc where cited material can be found
:'''|ps=''' – optional, sets terminal punctuation; default is full stop for CS1 style, defaults to no punctuation when {{para|mode|cs2}}; for no terminal punctuation use {{para|ps|none}}; aliases: '''|postscript='''
:'''|url=''' – optional, URL of an online location where the text of the contribution can be found
:'''|year=''' – required, publication year of the work that includes the contribution
===Examples===
When a Wikipedia article makes reference to a work that contains multiple chapters by different authors, bibliographies and reference sections can look rather cluttered:
* {{cite book |last=George |first=Ernest J. |last2=Read |first2=Ralph A. |last3=Johnson |first3=R. W. |last4=Ferber |first4=A. E. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Shelterbelts and Windbreaks |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=//archive.org/stream/yoa1957#page/n785/mode/1up |oclc=704186906}}
* {{cite book |last=Harper |first=V. L. |last2=Frank |first2=Bernard |last3=McQuilkin |first3=W. E. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Forest Practices and Productivity |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=//archive.org/stream/yoa1957#page/n803/mode/1up |oclc=704186906}}
* {{cite book |last=Stout |first=P. R. |last2=Johnson |first2=C. M. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Trace Elements |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=//archive.org/stream/yoa1957#page/n167/mode/1up |oclc=704186906}}
* {{cite book |last=Wadleigh |first=C. H. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Growth of Plants |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=//archive.org/stream/yoa1957#page/n57/mode/1up |oclc=704186906}}
As the list grows longer, the look becomes more cluttered with the unnecessarily repeated detail of full-length citations. With {{tld|harvc}} editors can link to shorter, less detailed contribution citations using standard implementations of {{tlx|sfn}} templates{{sfn|George|Read|Johnson|Ferber|1957}} and {{tlx|harv}} templates (like this: {{harv|Harper|Frank|McQuilkin|1957}} and also wrapped in {{tag|ref}} tags<ref>{{harvnb|Stout|Johnson|1957}}</ref>). {{tld|harvc}} may also be wrapped in {{tag|ref}} tags so that it becomes part of the article's References section.<ref>{{harvc|last=Benson|first=Ezra Taft|year=1957|chapter=Foreword|url=//archive.org/stream/yoa1957#page/n5/mode/1up|in=Stefferud|p=vi |loc=§2}}</ref>{{sfn|Wadleigh|1957}}
====Avoiding circular reference====
It may sometimes be necessary to cite a contribution of a source's editor or author such that {{para|last1}} through {{para|last4}} are the same as {{para|in1}} through {{para|in4}}, an editor's preface for example. Such citations can, depending on placement, cause {{tld|sfn}} or {{tld|harv}}-family references to link directly to the citation instead of to the {{tld|harvc}} template, or cause circular links ({{tld|harvc}} linking to itself because its <code>CITEREF</code> anchor identifier is the same as the citation's <code>CITEREF</code> anchor identifier). If {{para|id}} is set, {{tld|harvc}} will use it as an anchor identifier; if {{para|id}} is not set, {{tld|harvc}} will emit an error message when {{para|last1}} through {{para|last4}} are the same as {{para|in1}} through {{para|in4}}.
For example, to reference an editor's preface from article text, create a wikilink inside {{tag|ref}} tags:<ref>[[#Stefferud preface|Stefferud 1957]]</ref>
:<code><nowiki><ref>[[#Stefferud preface|Stefferud 1957]]</ref></nowiki></code>
Write a {{tld|harvc}} template with {{para|id|Stefferud preface}}
:<code><nowiki>{{harvc |last=Stefferud |first=A.|year=1957 |id=Stefferud preface |c=Preface |url=//archive.org/stream/yoa1957#page/n7/mode/1up |in=Stefferud}}</nowiki></code>
====Example references section====
{{reflist}}
====Example bibliography section====
* {{cite book |title=Soil: The Yearbook of Agriculture 1957 |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |url=//archive.org/stream/yoa1957#page/n2/mode/1up |oclc=704186906 |ref=harv}}
** {{harvc |last=George |first=Ernest J. |last2=Read |last3=Johnson |last4=Ferber |year=1957 |contribution=Shelterbelts and Windbreaks |url=//archive.org/stream/yoa1957#page/n785/mode/1up |in=Stefferud}}
** {{harvc |last=Harper |first=V. L. |last2=Frank |last3=McQuilkin |year=1957 |contribution=Forest Practices and Productivity |url=//archive.org/stream/yoa1957#page/n803/mode/1up |in=Stefferud}}
** {{harvc |last=Stefferud |first=A.|year=1957 |id=Stefferud preface |c=Preface |url=//archive.org/stream/yoa1957#page/n7/mode/1up |in=Stefferud}}
** {{harvc |last=Stout |first=P. R. |last2=Johnson |year=1957 |c=Trace Elements |url=//archive.org/stream/yoa1957#page/n167/mode/1up |in=Stefferud}}
** {{harvc |last=Wadleigh |first=C. H.|year=1957 |c=Growth of Plants |url=//archive.org/stream/yoa1957#page/n57/mode/1up |in=Stefferud}}
==Error messages==
{{tld|harvc}} emits these error messages:
:<span style="font-size:100%" class="error">harvc: author missing from source list.</span>
::the source list parameters {{para|in1}}, {{para|in2}}, {{para|in3}}, and {{para|in4}} form the template's <code>CITEREF</code> link to the full citation. All are not required but must be used in order without numerical gaps.
:<span style="font-size:100%" class="error">harvc: invalid |display-authors=.</span>
::the value assigned to {{para|display-authors}} must be a number greater than 0 or one of the key words <code>all</code> or <code>etal</code>
:<span style="font-size:100%" class="error">harvc: invalid or missing year.</span>
::{{para|year}} is an integral part of the template's <code>CITEREF</code> anchor and link. The value of {{para|year}} must be a three- or four-digit number with an optional lowercase <code>CITEREF</code> disambiguator. When the source does not have an identifiable year, use {{para|year|n.d.}} or {{para|year|nd}}.
:<span style="font-size:100%" class="error">harvc: no authors in contributor list.</span>
::this error message indicates that {{tld|harvc}} can't find {{para|last}} or {{para|last1}} with an assigned value and so cannot make a usable <code>CITEREF</code> anchor without contributors. Add at least one {{para|last''n''}} parameter.
:<span style="font-size:100%" class="error">harvc: required contribution is missing.</span>
::this error message indicates that {{tld|harvc}} can't find any of {{para|c}}, {{para|chapter}}, or {{para|contribution}} with an assigned value
:<span style="font-size:100%" class="error">harvc: required |id= parameter missing.</span>
::this error message emitted when the {{tld|harvc}} template's <code>CITEREF</code> anchor identifier would conflict with the long-form citation's <code>CITEREF</code> anchor identifier. See [[#Avoiding circular reference|Examples]]
==Template data==
<templatedata>
{
"description": "A method for referring to a contribution or chapter in a larger work when more than a few such referrals are required. {{harvc}} is not a substitute for a properly constructed citation.",
"params": {
"c": {
"aliases": ["chapter", " contribution"],
"description": "the title of chapter or contribution; rendered quoted in upright font",
"type": "string",
"required": true
},
"display-authors": {
"description": "defines how {{harvc}} displays the contributor list. When empty or omitted, contributor list mimics the style of {{sfn}} or {{harv}} templates. When set to number n, contributor list is limited to n contributors; appends et al. when the template displays fewer contributors than are included in the template. When set to 'all', displays all of the included contributors. When set to 'etal', displays all of the included contributors and appends et al.",
"type": "string"
},
"first1": {
"aliases": ["first"],
"description": "given or first name of the contribution's primary author",
"type": "string"
},
"firstn": {
"description": "contributor's given or first name; n begins at 2 and increases by 1 for each additional |firstn=",
"type": "string"
},
"id": {
"description": "required when |last1=-|last4= are the same as |in1=-|in4=; otherwise optional",
"type": "string"
},
"in1": {
"aliases": ["in"],
"description": "surname or last name of primary editor or author of the work that includes the contribution",
"type": "string",
"required": true
},
"in2": {
"description": "surname or last name of second editor or author",
"type": "string"
},
"in3": {
"description": "surname or last name of third editor or author",
"type": "string"
},
"in4": {
"description": "surname or last name of fourth editor or author",
"type": "string"
},
"last1": {
"aliases": ["last"],
"description": "surname or last name of primary author",
"type": "string",
"required": true
},
"lastn": {
"description": "contributor's surname or last name; n begins at 2 and increases by 1 for each additional |lastn=",
"type": "string",
},
"loc": {
"description": "other in-source location identifier, displays after |p= or |pp=",
"type": "string"
},
"mode": {
"description": "controls rendered display to match that of adjacent CS1 or CS2 citations; defaults to CS1 style; set to cs2 to mimic {{citation}} style",
"type": "string"
},
"p": {
"description": "single page number where cited material can be found",
"type": "string"
},
"pp": {
"description": "multiple page numbers, page ranges, etc where cited material can be found",
"type": "string"
},
"ps": {
"aliases": ["postscript"],
"description": "sets terminal punctuation; default is full stop for CS1 style, defaults to no punctuation when |mode=cs2; for no terminal punctuation use |ps=none",
"type": "string"
},
"url": {
"description": "URL of an online location where the text of the contribution can be found",
"type": "string"
},
"year": {
"description": "publication year of the work that includes the contribution",
"type": "date",
"required": true
}
}
}
</templatedata>
<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox | |
<!-- Categories below this line, please; interwikis at Wikidata -->
[[Category:Citation template utility templates]]
}}</includeonly>
ficzgqb9m0ved9f2xfwsza4grduerom
801780
801779
2015-04-26T12:54:58Z
en>Trappist the monk
0
Copyedit;
801780
wikitext
text/x-wiki
{{Documentation subpage}}
{{lua|Module:Harvc}}
<!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
This template provides a method for referring to a contribution or chapter in a larger work when more than a few such referrals are required. {{tld|harvc}} is not a substitute for a properly constructed citation.
{{tld|harvc}} is adapted from the {{tlx|harv}} family of short-form citation templates and from the {{cs1}} and {{cs2}} styles.
== Usage ==
The minimal form is:
:<code><nowiki>{{harvc |last=contributor name |year=publication year |c=contribution title |in=source editor/author name}}</nowiki></code>
===Parameters===
{{tld|harvc}} creates a <code>CITEREF</code> anchor from one to four contribution or chapter author surnames ({{para|last''n''}}) and the value in {{para|year}}. This allows {{tld|harvc}} to be the target of a link created by {{tlx|sfn}} or {{tld|harv}} family templates. From {{para|in''n''}} and {{para|year}}, {{tld|harvc}} creates a CITEREF link similar to those created by {{tlx|harvnb}} and {{tlx|sfn}}
:'''|author-link=''' – optional, title of existing Wikipedia article about the contributor—not the contributor's website; do not wikilink; requires {{para|display-authors}}; alias: '''|author-link1='''
::'''|author-link''n''=''' – optional, title of existing Wikipedia article about contributor''n''; ''n'' begins at 2 and increases by 1 for each additional '''|author-link''n''='''; requires {{para|display-authors}}
:'''|author-mask=''m''''' – optional, replaces name of the first contributor with ''m'' (commonly 2) em dashes; requires {{para|display-authors}}; alias: '''|author-mask1='''
::'''|author-mask''n''=''m''''' – optional, replaces name of contributor''n'' with ''m'' em dashes; ''n'' begins at 2 and increases by 1 for each additional '''|author-mask''n''=''m'''''; requires {{para|display-authors}}
:'''|c=''' – required, the title of chapter or contribution; rendered quoted in upright font; aliases: '''|chapter=''', '''|contribution='''
:'''|display-authors=''' – optional, defines how {{tld|harvc}} displays the contributor list:
::{{para|display-authors}} – when empty or omitted, contributor list mimics the style of {{tld|sfn}} or {{tld|harv}} templates; last names only
::{{para|display-authors|''n''}} – displays ''n'' contributor first and last names; appends et al. when the template displays fewer contributors than are included in the template
::{{para|display-authors|all}} – displays all of the included contributor first and last names
::{{para|display-authors|etal}} – displays all of the included contributor first and last names and appends et al.
:'''|first=''' – optional, contributor's given or first name; requires {{para|display-authors}}; alias: '''|first1='''
::'''|first''n''=''' – optional, contributor's given or first name; ''n'' begins at 2 and increases by 1 for each additional '''|first''n''='''; requires {{para|display-authors}}
:'''|id=''' – required when {{para|last1}}-{{para|last4}} are the same as {{para|in1}}-{{para|in4}}; otherwise optional. See [[#Avoiding circular reference|Examples]]
:'''|in1=''' – required, surname or last name of primary editor or author of the work that includes the contribution; aliases: '''|in='''
:'''|in2=''' – optional, surname or last name of second editor or author
:'''|in3=''' – optional, surname or last name of third editor or author
:'''|in4=''' – optional, surname or last name of fourth editor or author
:'''|last1=''' – required, surname or last name of primary author; aliases: '''|last='''
::'''|last''n''=''' – optional, contributor's surname or last name ''n'' begins at 2 and increases by 1 for each additional '''|last''n''=''';
:'''|loc=''' – optional, other location identifier, displays after {{para|p}} or {{para|pp}}
:'''|mode=''' – controls rendered display to match that of adjacent CS1 or CS2 citations; defaults to CS1 style; set to <code>cs2</code> to mimic {{tlx|citation}} style
:'''|p=''' – optional, single page number where cited material can be found
:'''|pp=''' – optional, multiple page numbers, page ranges, etc where cited material can be found
:'''|ps=''' – optional, sets terminal punctuation; default is full stop for CS1 style, defaults to no punctuation when {{para|mode|cs2}}; for no terminal punctuation use {{para|ps|none}}; aliases: '''|postscript='''
:'''|url=''' – optional, URL of an online location where the text of the contribution can be found
:'''|year=''' – required, publication year of the work that includes the contribution
===Examples===
When a Wikipedia article makes reference to a work that contains multiple chapters by different authors, bibliographies and reference sections can look rather cluttered:
* {{cite book |last=George |first=Ernest J. |last2=Read |first2=Ralph A. |last3=Johnson |first3=R. W. |last4=Ferber |first4=A. E. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Shelterbelts and Windbreaks |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=//archive.org/stream/yoa1957#page/n785/mode/1up |oclc=704186906}}
* {{cite book |last=Harper |first=V. L. |last2=Frank |first2=Bernard |last3=McQuilkin |first3=W. E. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Forest Practices and Productivity |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=//archive.org/stream/yoa1957#page/n803/mode/1up |oclc=704186906}}
* {{cite book |last=Stout |first=P. R. |last2=Johnson |first2=C. M. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Trace Elements |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=//archive.org/stream/yoa1957#page/n167/mode/1up |oclc=704186906}}
* {{cite book |last=Wadleigh |first=C. H. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Growth of Plants |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=//archive.org/stream/yoa1957#page/n57/mode/1up |oclc=704186906}}
As the list grows longer, the look becomes more cluttered with the unnecessarily repeated detail of full-length citations. With {{tld|harvc}} editors can link to shorter, less detailed contribution citations using standard implementations of {{tlx|sfn}} templates{{sfn|George|Read|Johnson|Ferber|1957}} and {{tlx|harv}} templates (like this: {{harv|Harper|Frank|McQuilkin|1957}} and also wrapped in {{tag|ref}} tags<ref>{{harvnb|Stout|Johnson|1957}}</ref>). {{tld|harvc}} may also be wrapped in {{tag|ref}} tags so that it becomes part of the article's References section.<ref>{{harvc|last=Benson|first=Ezra Taft|year=1957|chapter=Foreword|url=//archive.org/stream/yoa1957#page/n5/mode/1up|in=Stefferud|p=vi |loc=§2}}</ref>{{sfn|Wadleigh|1957}}
====Avoiding circular reference====
It may sometimes be necessary to cite a contribution of a source's editor or author such that {{para|last1}} through {{para|last4}} are the same as {{para|in1}} through {{para|in4}}, an editor's preface for example. Such citations can, depending on placement, cause {{tld|sfn}} or {{tld|harv}}-family references to link directly to the citation instead of to the {{tld|harvc}} template, or cause circular links ({{tld|harvc}} linking to itself because its <code>CITEREF</code> anchor identifier is the same as the citation's <code>CITEREF</code> anchor identifier). If {{para|id}} is set, {{tld|harvc}} will use it as an anchor identifier; if {{para|id}} is not set, {{tld|harvc}} will emit an error message when {{para|last1}} through {{para|last4}} are the same as {{para|in1}} through {{para|in4}}.
For example, to reference an editor's preface from article text, create a wikilink inside {{tag|ref}} tags:<ref>[[#Stefferud preface|Stefferud 1957]]</ref>
:<code><nowiki><ref>[[#Stefferud preface|Stefferud 1957]]</ref></nowiki></code>
Write a {{tld|harvc}} template with {{para|id|Stefferud preface}}
:<code><nowiki>{{harvc |last=Stefferud |first=A.|year=1957 |id=Stefferud preface |c=Preface |url=//archive.org/stream/yoa1957#page/n7/mode/1up |in=Stefferud}}</nowiki></code>
====Example references section====
{{reflist}}
====Example bibliography section====
* {{cite book |title=Soil: The Yearbook of Agriculture 1957 |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |url=//archive.org/stream/yoa1957#page/n2/mode/1up |oclc=704186906 |ref=harv}}
** {{harvc |last=George |first=Ernest J. |last2=Read |last3=Johnson |last4=Ferber |year=1957 |contribution=Shelterbelts and Windbreaks |url=//archive.org/stream/yoa1957#page/n785/mode/1up |in=Stefferud}}
** {{harvc |last=Harper |first=V. L. |last2=Frank |last3=McQuilkin |year=1957 |contribution=Forest Practices and Productivity |url=//archive.org/stream/yoa1957#page/n803/mode/1up |in=Stefferud}}
** {{harvc |last=Stefferud |first=A.|year=1957 |id=Stefferud preface |c=Preface |url=//archive.org/stream/yoa1957#page/n7/mode/1up |in=Stefferud}}
** {{harvc |last=Stout |first=P. R. |last2=Johnson |year=1957 |c=Trace Elements |url=//archive.org/stream/yoa1957#page/n167/mode/1up |in=Stefferud}}
** {{harvc |last=Wadleigh |first=C. H.|year=1957 |c=Growth of Plants |url=//archive.org/stream/yoa1957#page/n57/mode/1up |in=Stefferud}}
==Error messages==
{{tld|harvc}} emits these error messages:
:<span style="font-size:100%" class="error">harvc: author missing from source list.</span>
::the source list parameters {{para|in1}}, {{para|in2}}, {{para|in3}}, and {{para|in4}} form the template's <code>CITEREF</code> link to the full citation. All are not required but must be used in order without numerical gaps.
:<span style="font-size:100%" class="error">harvc: invalid |display-authors=.</span>
::the value assigned to {{para|display-authors}} must be a number greater than 0 or one of the key words <code>all</code> or <code>etal</code>
:<span style="font-size:100%" class="error">harvc: invalid or missing year.</span>
::{{para|year}} is an integral part of the template's <code>CITEREF</code> anchor and link. The value of {{para|year}} must be a three- or four-digit number with an optional lowercase <code>CITEREF</code> disambiguator. When the source does not have an identifiable year, use {{para|year|n.d.}} or {{para|year|nd}}.
:<span style="font-size:100%" class="error">harvc: no authors in contributor list.</span>
::this error message indicates that {{tld|harvc}} can't find {{para|last}} or {{para|last1}} with an assigned value and so cannot make a usable <code>CITEREF</code> anchor without contributors. Add at least one {{para|last''n''}} parameter.
:<span style="font-size:100%" class="error">harvc: required contribution is missing.</span>
::this error message indicates that {{tld|harvc}} can't find any of {{para|c}}, {{para|chapter}}, or {{para|contribution}} with an assigned value
:<span style="font-size:100%" class="error">harvc: required |id= parameter missing.</span>
::this error message emitted when the {{tld|harvc}} template's <code>CITEREF</code> anchor identifier would conflict with the long-form citation's <code>CITEREF</code> anchor identifier. See [[#Avoiding circular reference|Examples]]
==Template data==
<templatedata>
{
"description": "A method for referring to a contribution or chapter in a larger work when more than a few such referrals are required. harvc is not a substitute for a properly constructed citation.",
"params": {
"author-link1": {
"aliases": ["author-link"],
"description": "title of existing Wikipedia article about the contributor—not the contributor's website; do not wikilink; requires |display-authors=",
"type": "string"
},
"author-linkn": {
"description": "title of existing Wikipedia article about contributor n; n begins at 2 and increases by 1 for each additional |author-linkn=; requires |display-authors=",
"type": "string"
},
"author-mask1": {
"aliases": ["author-mask"],
"description": "replaces name of the first contributor with m (commonly 2) em dashes; requires |display-authors=",
"type": "string"
},
"author-maskn": {
"description": "replaces name of contributor n with m em dashes; n begins at 2 and increases by 1 for each additional |author-maskn=; requires |display-authors=",
"type": "string"
},
"c": {
"aliases": ["chapter", " contribution"],
"description": "the title of chapter or contribution; rendered quoted in upright font",
"type": "string",
"required": true
},
"display-authors": {
"description": "defines how harvc displays the contributor list. When empty or omitted, contributor list mimics the style of sfn or harv templates; last names only. When set to number n, displays n contributor first and last names; appends et al. when the template displays fewer contributors than are included in the template. When set to 'all', displays all of the included contributor first and last names. When set to 'etal', displays all of the included contributor first and last names and appends et al.",
"type": "string"
},
"first1": {
"aliases": ["first"],
"description": "given or first name of the contribution's primary author; requires |display-authors=",
"type": "string"
},
"firstn": {
"description": "contributor's given or first name; n begins at 2 and increases by 1 for each additional |firstn=; requires |display-authors=",
"type": "string"
},
"id": {
"description": "required when |last1=-|last4= are the same as |in1=-|in4=; otherwise optional",
"type": "string"
},
"in1": {
"aliases": ["in"],
"description": "surname or last name of primary editor or author of the work that includes the contribution",
"type": "string",
"required": true
},
"in2": {
"description": "surname or last name of second editor or author",
"type": "string"
},
"in3": {
"description": "surname or last name of third editor or author",
"type": "string"
},
"in4": {
"description": "surname or last name of fourth editor or author",
"type": "string"
},
"last1": {
"aliases": ["last"],
"description": "surname or last name of primary author",
"type": "string",
"required": true
},
"lastn": {
"description": "contributor's surname or last name; n begins at 2 and increases by 1 for each additional |lastn=",
"type": "string",
},
"loc": {
"description": "other in-source location identifier, displays after |p= or |pp=",
"type": "string"
},
"mode": {
"description": "controls rendered display to match that of adjacent CS1 or CS2 citations; defaults to CS1 style; set to cs2 to mimic citation style",
"type": "string"
},
"p": {
"description": "single page number where cited material can be found",
"type": "string"
},
"pp": {
"description": "multiple page numbers, page ranges, etc where cited material can be found",
"type": "string"
},
"ps": {
"aliases": ["postscript"],
"description": "sets terminal punctuation; default is full stop for CS1 style, defaults to no punctuation when |mode=cs2; for no terminal punctuation use |ps=none",
"type": "string"
},
"url": {
"description": "URL of an online location where the text of the contribution can be found",
"type": "string"
},
"year": {
"description": "publication year of the work that includes the contribution",
"type": "date",
"required": true
}
}
}
</templatedata>
<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox | |
<!-- Categories below this line, please; interwikis at Wikidata -->
[[Category:Citation template utility templates]]
}}</includeonly>
0m85h6zk4tnsfhlqksxiz2o4gk9ptik
801781
801780
2015-08-14T11:16:46Z
en>Trappist the monk
0
/* Parameters */ update in advance of update to [[Module:Harvc]];
801781
wikitext
text/x-wiki
{{Documentation subpage}}
{{lua|Module:Harvc}}
<!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
This template provides a method for referring to a contribution or chapter in a larger work when more than a few such referrals are required. {{tld|harvc}} is not a substitute for a properly constructed citation.
{{tld|harvc}} is adapted from the {{tlx|harv}} family of short-form citation templates and from the {{cs1}} and {{cs2}} styles.
== Usage ==
The minimal form is:
:<code><nowiki>{{harvc |last=contributor name |year=publication year |c=contribution title |in=source editor/author name}}</nowiki></code>
===Parameters===
{{tld|harvc}} creates a <code>CITEREF</code> anchor from one to four contribution or chapter author surnames ({{para|last''n''}}) and the value in {{para|year}}. This allows {{tld|harvc}} to be the target of a link created by {{tlx|sfn}} or {{tld|harv}} family templates. From {{para|in''n''}} and {{para|year}}, {{tld|harvc}} creates a CITEREF link similar to those created by {{tlx|harvnb}} and {{tlx|sfn}}
:'''|author-link=''' – optional, title of existing Wikipedia article about the first contributor—not the contributor's website; do not wikilink; alias: '''|author-link1='''
::'''|author-link''n''=''' – optional, title of existing Wikipedia article about contributor''n''; choose ''n'' to match ''n'' in '''|last''n''='''
:'''|author-mask=''m''''' – optional, replaces name of the first contributor with ''m'' (commonly 2) em dashes; alias: '''|author-mask1='''
::'''|author-mask''n''=''m''''' – optional, replaces name of contributor''n'' with ''m'' em dashes; choose ''n'' to match ''n'' in '''|last''n''='''
:'''|c=''' – required, the title of chapter or contribution; rendered quoted in upright font; aliases: '''|chapter=''', '''|contribution='''
:'''|display-authors=''' – optional, defines how {{tld|harvc}} displays the contributor list; ignored when '''|name-list-format=harv''':
::{{para|display-authors}} – when empty or omitted, displays all contributor names in last/first format
::{{para|display-authors|''n''}} – displays ''n'' contributor names in last/first format; appends et al. when ''n'' is less than the number of contributors included in the template
::{{para|display-authors|etal}} – displays all contributor names in last/first format and appends et al.
:'''|first=''' – optional, first contributor's given or first name; alias: '''|first1='''
::'''|first''n''=''' – optional, contributor''n'' given or first name; ''n'' begins at 2 and increases by 1 for each additional '''|first''n''='''
:'''|id=''' – required when {{para|last1}}-{{para|last4}} are the same as {{para|in1}}-{{para|in4}}; otherwise optional. See [[#Avoiding circular reference|Examples]]
:'''|in=''' – required, surname or last name of first editor or author of the work that includes the contribution; aliases: '''|in1='''
:'''|in2=''' – optional, surname or last name of second editor or author
:'''|in3=''' – optional, surname or last name of third editor or author
:'''|in4=''' – optional, surname or last name of fourth editor or author
:'''|last=''' – required, surname or last name of first author; aliases: '''|last1='''
::'''|last''n''=''' – optional, contributor''n'' surname or last name; ''n'' begins at 2 and increases by 1 for each additional '''|last''n''=''';
:'''|loc=''' – optional, other location identifier, displays after {{para|p}} or {{para|pp}}
:'''|mode=''' – controls rendered display to match that of adjacent CS1 or CS2 citations; defaults to CS1 style
::'''|mode=cs2''' – mimic {{tlx|citation}} style (comma separators, no terminal punctuation, static text not capitalized)
:'''|name-list-format=''' – optional, controls contributor name list display style
::'''|name-list-format=harv''' – mimic {{tld|sfn}} or {{tld|harv}} format (one to four last names); overrides '''|display-authors='''
:'''|p=''' – optional, single page number where cited material can be found
:'''|pp=''' – optional, multiple page numbers, page ranges, etc where cited material can be found
:'''|ps=''' – optional, sets terminal punctuation; default is full stop; overrides '''|mode=cs2'''; aliases: '''|postscript='''
::'''|ps=none''' – renders output without terminal punctuation
:'''|url=''' – optional, URL of an online location where the text of the contribution can be found
:'''|year=''' – required, publication year of the work that includes the contribution
===Examples===
When a Wikipedia article makes reference to a work that contains multiple chapters by different authors, bibliographies and reference sections can look rather cluttered:
* {{cite book |last=George |first=Ernest J. |last2=Read |first2=Ralph A. |last3=Johnson |first3=R. W. |last4=Ferber |first4=A. E. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Shelterbelts and Windbreaks |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=//archive.org/stream/yoa1957#page/n785/mode/1up |oclc=704186906}}
* {{cite book |last=Harper |first=V. L. |last2=Frank |first2=Bernard |last3=McQuilkin |first3=W. E. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Forest Practices and Productivity |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=//archive.org/stream/yoa1957#page/n803/mode/1up |oclc=704186906}}
* {{cite book |last=Stout |first=P. R. |last2=Johnson |first2=C. M. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Trace Elements |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=//archive.org/stream/yoa1957#page/n167/mode/1up |oclc=704186906}}
* {{cite book |last=Wadleigh |first=C. H. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Growth of Plants |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=//archive.org/stream/yoa1957#page/n57/mode/1up |oclc=704186906}}
As the list grows longer, the look becomes more cluttered with the unnecessarily repeated detail of full-length citations. With {{tld|harvc}} editors can link to shorter, less detailed contribution citations using standard implementations of {{tlx|sfn}} templates{{sfn|George|Read|Johnson|Ferber|1957}} and {{tlx|harv}} templates (like this: {{harv|Harper|Frank|McQuilkin|1957}} and also wrapped in {{tag|ref}} tags<ref>{{harvnb|Stout|Johnson|1957}}</ref>). {{tld|harvc}} may also be wrapped in {{tag|ref}} tags so that it becomes part of the article's References section.<ref>{{harvc|last=Benson|first=Ezra Taft|year=1957|chapter=Foreword|url=//archive.org/stream/yoa1957#page/n5/mode/1up|in=Stefferud|p=vi |loc=§2}}</ref>{{sfn|Wadleigh|1957}}
====Avoiding circular reference====
It may sometimes be necessary to cite a contribution of a source's editor or author such that {{para|last1}} through {{para|last4}} are the same as {{para|in1}} through {{para|in4}}, an editor's preface for example. Such citations can, depending on placement, cause {{tld|sfn}} or {{tld|harv}}-family references to link directly to the citation instead of to the {{tld|harvc}} template, or cause circular links ({{tld|harvc}} linking to itself because its <code>CITEREF</code> anchor identifier is the same as the citation's <code>CITEREF</code> anchor identifier). If {{para|id}} is set, {{tld|harvc}} will use it as an anchor identifier; if {{para|id}} is not set, {{tld|harvc}} will emit an error message when {{para|last1}} through {{para|last4}} are the same as {{para|in1}} through {{para|in4}}.
For example, to reference an editor's preface from article text, create a wikilink inside {{tag|ref}} tags:<ref>[[#Stefferud preface|Stefferud 1957]]</ref>
:<code><nowiki><ref>[[#Stefferud preface|Stefferud 1957]]</ref></nowiki></code>
Write a {{tld|harvc}} template with {{para|id|Stefferud preface}}
:<code><nowiki>{{harvc |last=Stefferud |first=A.|year=1957 |id=Stefferud preface |c=Preface |url=//archive.org/stream/yoa1957#page/n7/mode/1up |in=Stefferud}}</nowiki></code>
====Example references section====
{{reflist}}
====Example bibliography section====
* {{cite book |title=Soil: The Yearbook of Agriculture 1957 |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |url=//archive.org/stream/yoa1957#page/n2/mode/1up |oclc=704186906 |ref=harv}}
** {{harvc |last=George |first=Ernest J. |last2=Read |last3=Johnson |last4=Ferber |year=1957 |contribution=Shelterbelts and Windbreaks |url=//archive.org/stream/yoa1957#page/n785/mode/1up |in=Stefferud}}
** {{harvc |last=Harper |first=V. L. |last2=Frank |last3=McQuilkin |year=1957 |contribution=Forest Practices and Productivity |url=//archive.org/stream/yoa1957#page/n803/mode/1up |in=Stefferud}}
** {{harvc |last=Stefferud |first=A.|year=1957 |id=Stefferud preface |c=Preface |url=//archive.org/stream/yoa1957#page/n7/mode/1up |in=Stefferud}}
** {{harvc |last=Stout |first=P. R. |last2=Johnson |year=1957 |c=Trace Elements |url=//archive.org/stream/yoa1957#page/n167/mode/1up |in=Stefferud}}
** {{harvc |last=Wadleigh |first=C. H.|year=1957 |c=Growth of Plants |url=//archive.org/stream/yoa1957#page/n57/mode/1up |in=Stefferud}}
==Error messages==
{{tld|harvc}} emits these error messages:
:<span style="font-size:100%" class="error">harvc: author missing from source list.</span>
::the source list parameters {{para|in1}}, {{para|in2}}, {{para|in3}}, and {{para|in4}} form the template's <code>CITEREF</code> link to the full citation. All are not required but must be used in order without numerical gaps.
:<span style="font-size:100%" class="error">harvc: invalid |display-authors=.</span>
::the value assigned to {{para|display-authors}} must be a number greater than 0 or one of the key words <code>all</code> or <code>etal</code>
:<span style="font-size:100%" class="error">harvc: invalid or missing year.</span>
::{{para|year}} is an integral part of the template's <code>CITEREF</code> anchor and link. The value of {{para|year}} must be a three- or four-digit number with an optional lowercase <code>CITEREF</code> disambiguator. When the source does not have an identifiable year, use {{para|year|n.d.}} or {{para|year|nd}}.
:<span style="font-size:100%" class="error">harvc: no authors in contributor list.</span>
::this error message indicates that {{tld|harvc}} can't find {{para|last}} or {{para|last1}} with an assigned value and so cannot make a usable <code>CITEREF</code> anchor without contributors. Add at least one {{para|last''n''}} parameter.
:<span style="font-size:100%" class="error">harvc: required contribution is missing.</span>
::this error message indicates that {{tld|harvc}} can't find any of {{para|c}}, {{para|chapter}}, or {{para|contribution}} with an assigned value
:<span style="font-size:100%" class="error">harvc: required |id= parameter missing.</span>
::this error message emitted when the {{tld|harvc}} template's <code>CITEREF</code> anchor identifier would conflict with the long-form citation's <code>CITEREF</code> anchor identifier. See [[#Avoiding circular reference|Examples]]
==Template data==
<templatedata>
{
"description": "A method for referring to a contribution or chapter in a larger work when more than a few such referrals are required. harvc is not a substitute for a properly constructed citation.",
"params": {
"author-link1": {
"aliases": ["author-link"],
"description": "title of existing Wikipedia article about the contributor—not the contributor's website; do not wikilink; requires |display-authors=",
"type": "string"
},
"author-linkn": {
"description": "title of existing Wikipedia article about contributor n; n begins at 2 and increases by 1 for each additional |author-linkn=; requires |display-authors=",
"type": "string"
},
"author-mask1": {
"aliases": ["author-mask"],
"description": "replaces name of the first contributor with m (commonly 2) em dashes; requires |display-authors=",
"type": "string"
},
"author-maskn": {
"description": "replaces name of contributor n with m em dashes; n begins at 2 and increases by 1 for each additional |author-maskn=; requires |display-authors=",
"type": "string"
},
"c": {
"aliases": ["chapter", " contribution"],
"description": "the title of chapter or contribution; rendered quoted in upright font",
"type": "string",
"required": true
},
"display-authors": {
"description": "defines how harvc displays the contributor list. When empty or omitted, contributor list mimics the style of sfn or harv templates; last names only. When set to number n, displays n contributor first and last names; appends et al. when the template displays fewer contributors than are included in the template. When set to 'all', displays all of the included contributor first and last names. When set to 'etal', displays all of the included contributor first and last names and appends et al.",
"type": "string"
},
"first1": {
"aliases": ["first"],
"description": "given or first name of the contribution's primary author; requires |display-authors=",
"type": "string"
},
"firstn": {
"description": "contributor's given or first name; n begins at 2 and increases by 1 for each additional |firstn=; requires |display-authors=",
"type": "string"
},
"id": {
"description": "required when |last1=-|last4= are the same as |in1=-|in4=; otherwise optional",
"type": "string"
},
"in1": {
"aliases": ["in"],
"description": "surname or last name of primary editor or author of the work that includes the contribution",
"type": "string",
"required": true
},
"in2": {
"description": "surname or last name of second editor or author",
"type": "string"
},
"in3": {
"description": "surname or last name of third editor or author",
"type": "string"
},
"in4": {
"description": "surname or last name of fourth editor or author",
"type": "string"
},
"last1": {
"aliases": ["last"],
"description": "surname or last name of primary author",
"type": "string",
"required": true
},
"lastn": {
"description": "contributor's surname or last name; n begins at 2 and increases by 1 for each additional |lastn=",
"type": "string",
},
"loc": {
"description": "other in-source location identifier, displays after |p= or |pp=",
"type": "string"
},
"mode": {
"description": "controls rendered display to match that of adjacent CS1 or CS2 citations; defaults to CS1 style; set to cs2 to mimic citation style",
"type": "string"
},
"p": {
"description": "single page number where cited material can be found",
"type": "string"
},
"pp": {
"description": "multiple page numbers, page ranges, etc where cited material can be found",
"type": "string"
},
"ps": {
"aliases": ["postscript"],
"description": "sets terminal punctuation; default is full stop for CS1 style, defaults to no punctuation when |mode=cs2; for no terminal punctuation use |ps=none",
"type": "string"
},
"url": {
"description": "URL of an online location where the text of the contribution can be found",
"type": "string"
},
"year": {
"description": "publication year of the work that includes the contribution",
"type": "date",
"required": true
}
}
}
</templatedata>
<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox | |
<!-- Categories below this line, please; interwikis at Wikidata -->
[[Category:Citation template utility templates]]
}}</includeonly>
3fjkf7szsiqxdnqbo2w55e5r5sy6sdy
801782
801781
2015-08-14T11:49:12Z
en>Trappist the monk
0
/* Parameters */ last-author-amp;
801782
wikitext
text/x-wiki
{{Documentation subpage}}
{{lua|Module:Harvc}}
<!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
This template provides a method for referring to a contribution or chapter in a larger work when more than a few such referrals are required. {{tld|harvc}} is not a substitute for a properly constructed citation.
{{tld|harvc}} is adapted from the {{tlx|harv}} family of short-form citation templates and from the {{cs1}} and {{cs2}} styles.
== Usage ==
The minimal form is:
:<code><nowiki>{{harvc |last=contributor name |year=publication year |c=contribution title |in=source editor/author name}}</nowiki></code>
===Parameters===
{{tld|harvc}} creates a <code>CITEREF</code> anchor from one to four contribution or chapter author surnames ({{para|last''n''}}) and the value in {{para|year}}. This allows {{tld|harvc}} to be the target of a link created by {{tlx|sfn}} or {{tld|harv}} family templates. From {{para|in''n''}} and {{para|year}}, {{tld|harvc}} creates a CITEREF link similar to those created by {{tlx|harvnb}} and {{tlx|sfn}}
:'''|author-link=''' – optional, title of existing Wikipedia article about the first contributor—not the contributor's website; do not wikilink; alias: '''|author-link1='''
::'''|author-link''n''=''' – optional, title of existing Wikipedia article about contributor''n''; choose ''n'' to match ''n'' in '''|last''n''='''
:'''|author-mask=''m''''' – optional, replaces name of the first contributor with ''m'' (commonly 2) em dashes; alias: '''|author-mask1='''
::'''|author-mask''n''=''m''''' – optional, replaces name of contributor''n'' with ''m'' em dashes; choose ''n'' to match ''n'' in '''|last''n''='''
:'''|c=''' – required, the title of chapter or contribution; rendered quoted in upright font; aliases: '''|chapter=''', '''|contribution='''
:'''|display-authors=''' – optional, defines how {{tld|harvc}} displays the contributor list; ignored when '''|name-list-format=harv''':
::{{para|display-authors}} – when empty or omitted, displays all contributor names in last/first format
::{{para|display-authors|''n''}} – displays ''n'' contributor names in last/first format; appends et al. when ''n'' is less than the number of contributors included in the template
::{{para|display-authors|etal}} – displays all contributor names in last/first format and appends et al.
:'''|first=''' – optional, first contributor's given or first name; alias: '''|first1='''
::'''|first''n''=''' – optional, contributor''n'' given or first name; ''n'' begins at 2 and increases by 1 for each additional '''|first''n''='''
:'''|id=''' – required when {{para|last1}}-{{para|last4}} are the same as {{para|in1}}-{{para|in4}}; otherwise optional. See [[#Avoiding circular reference|Examples]]
:'''|in=''' – required, surname or last name of first editor or author of the work that includes the contribution; aliases: '''|in1='''
:'''|in2=''' – optional, surname or last name of second editor or author
:'''|in3=''' – optional, surname or last name of third editor or author
:'''|in4=''' – optional, surname or last name of fourth editor or author
:'''|last=''' – required, surname or last name of first author; aliases: '''|last1='''
::'''|last''n''=''' – optional, contributor''n'' surname or last name; ''n'' begins at 2 and increases by 1 for each additional '''|last''n''=''';
:'''|last-author-amp=''': – optional, when set to '''yes''', inserts an ampersand between the last two contributor names
:'''|loc=''' – optional, other location identifier, displays after {{para|p}} or {{para|pp}}
:'''|mode=''' – controls rendered display to match that of adjacent CS1 or CS2 citations; defaults to CS1 style
::'''|mode=cs2''' – mimic {{tlx|citation}} style (comma separators, no terminal punctuation, static text not capitalized)
:'''|name-list-format=''' – optional, controls contributor name list display style
::'''|name-list-format=harv''' – mimic {{tld|sfn}} or {{tld|harv}} format (one to four last names); overrides '''|display-authors='''
:'''|p=''' – optional, single page number where cited material can be found
:'''|pp=''' – optional, multiple page numbers, page ranges, etc where cited material can be found
:'''|ps=''' – optional, sets terminal punctuation; default is full stop; overrides '''|mode=cs2'''; aliases: '''|postscript='''
::'''|ps=none''' – renders output without terminal punctuation
:'''|url=''' – optional, URL of an online location where the text of the contribution can be found
:'''|year=''' – required, publication year of the work that includes the contribution
===Examples===
When a Wikipedia article makes reference to a work that contains multiple chapters by different authors, bibliographies and reference sections can look rather cluttered:
* {{cite book |last=George |first=Ernest J. |last2=Read |first2=Ralph A. |last3=Johnson |first3=R. W. |last4=Ferber |first4=A. E. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Shelterbelts and Windbreaks |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=//archive.org/stream/yoa1957#page/n785/mode/1up |oclc=704186906}}
* {{cite book |last=Harper |first=V. L. |last2=Frank |first2=Bernard |last3=McQuilkin |first3=W. E. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Forest Practices and Productivity |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=//archive.org/stream/yoa1957#page/n803/mode/1up |oclc=704186906}}
* {{cite book |last=Stout |first=P. R. |last2=Johnson |first2=C. M. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Trace Elements |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=//archive.org/stream/yoa1957#page/n167/mode/1up |oclc=704186906}}
* {{cite book |last=Wadleigh |first=C. H. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Growth of Plants |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=//archive.org/stream/yoa1957#page/n57/mode/1up |oclc=704186906}}
As the list grows longer, the look becomes more cluttered with the unnecessarily repeated detail of full-length citations. With {{tld|harvc}} editors can link to shorter, less detailed contribution citations using standard implementations of {{tlx|sfn}} templates{{sfn|George|Read|Johnson|Ferber|1957}} and {{tlx|harv}} templates (like this: {{harv|Harper|Frank|McQuilkin|1957}} and also wrapped in {{tag|ref}} tags<ref>{{harvnb|Stout|Johnson|1957}}</ref>). {{tld|harvc}} may also be wrapped in {{tag|ref}} tags so that it becomes part of the article's References section.<ref>{{harvc|last=Benson|first=Ezra Taft|year=1957|chapter=Foreword|url=//archive.org/stream/yoa1957#page/n5/mode/1up|in=Stefferud|p=vi |loc=§2}}</ref>{{sfn|Wadleigh|1957}}
====Avoiding circular reference====
It may sometimes be necessary to cite a contribution of a source's editor or author such that {{para|last1}} through {{para|last4}} are the same as {{para|in1}} through {{para|in4}}, an editor's preface for example. Such citations can, depending on placement, cause {{tld|sfn}} or {{tld|harv}}-family references to link directly to the citation instead of to the {{tld|harvc}} template, or cause circular links ({{tld|harvc}} linking to itself because its <code>CITEREF</code> anchor identifier is the same as the citation's <code>CITEREF</code> anchor identifier). If {{para|id}} is set, {{tld|harvc}} will use it as an anchor identifier; if {{para|id}} is not set, {{tld|harvc}} will emit an error message when {{para|last1}} through {{para|last4}} are the same as {{para|in1}} through {{para|in4}}.
For example, to reference an editor's preface from article text, create a wikilink inside {{tag|ref}} tags:<ref>[[#Stefferud preface|Stefferud 1957]]</ref>
:<code><nowiki><ref>[[#Stefferud preface|Stefferud 1957]]</ref></nowiki></code>
Write a {{tld|harvc}} template with {{para|id|Stefferud preface}}
:<code><nowiki>{{harvc |last=Stefferud |first=A.|year=1957 |id=Stefferud preface |c=Preface |url=//archive.org/stream/yoa1957#page/n7/mode/1up |in=Stefferud}}</nowiki></code>
====Example references section====
{{reflist}}
====Example bibliography section====
* {{cite book |title=Soil: The Yearbook of Agriculture 1957 |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |url=//archive.org/stream/yoa1957#page/n2/mode/1up |oclc=704186906 |ref=harv}}
** {{harvc |last=George |first=Ernest J. |last2=Read |last3=Johnson |last4=Ferber |year=1957 |contribution=Shelterbelts and Windbreaks |url=//archive.org/stream/yoa1957#page/n785/mode/1up |in=Stefferud}}
** {{harvc |last=Harper |first=V. L. |last2=Frank |last3=McQuilkin |year=1957 |contribution=Forest Practices and Productivity |url=//archive.org/stream/yoa1957#page/n803/mode/1up |in=Stefferud}}
** {{harvc |last=Stefferud |first=A.|year=1957 |id=Stefferud preface |c=Preface |url=//archive.org/stream/yoa1957#page/n7/mode/1up |in=Stefferud}}
** {{harvc |last=Stout |first=P. R. |last2=Johnson |year=1957 |c=Trace Elements |url=//archive.org/stream/yoa1957#page/n167/mode/1up |in=Stefferud}}
** {{harvc |last=Wadleigh |first=C. H.|year=1957 |c=Growth of Plants |url=//archive.org/stream/yoa1957#page/n57/mode/1up |in=Stefferud}}
==Error messages==
{{tld|harvc}} emits these error messages:
:<span style="font-size:100%" class="error">harvc: author missing from source list.</span>
::the source list parameters {{para|in1}}, {{para|in2}}, {{para|in3}}, and {{para|in4}} form the template's <code>CITEREF</code> link to the full citation. All are not required but must be used in order without numerical gaps.
:<span style="font-size:100%" class="error">harvc: invalid |display-authors=.</span>
::the value assigned to {{para|display-authors}} must be a number greater than 0 or one of the key words <code>all</code> or <code>etal</code>
:<span style="font-size:100%" class="error">harvc: invalid or missing year.</span>
::{{para|year}} is an integral part of the template's <code>CITEREF</code> anchor and link. The value of {{para|year}} must be a three- or four-digit number with an optional lowercase <code>CITEREF</code> disambiguator. When the source does not have an identifiable year, use {{para|year|n.d.}} or {{para|year|nd}}.
:<span style="font-size:100%" class="error">harvc: no authors in contributor list.</span>
::this error message indicates that {{tld|harvc}} can't find {{para|last}} or {{para|last1}} with an assigned value and so cannot make a usable <code>CITEREF</code> anchor without contributors. Add at least one {{para|last''n''}} parameter.
:<span style="font-size:100%" class="error">harvc: required contribution is missing.</span>
::this error message indicates that {{tld|harvc}} can't find any of {{para|c}}, {{para|chapter}}, or {{para|contribution}} with an assigned value
:<span style="font-size:100%" class="error">harvc: required |id= parameter missing.</span>
::this error message emitted when the {{tld|harvc}} template's <code>CITEREF</code> anchor identifier would conflict with the long-form citation's <code>CITEREF</code> anchor identifier. See [[#Avoiding circular reference|Examples]]
==Template data==
<templatedata>
{
"description": "A method for referring to a contribution or chapter in a larger work when more than a few such referrals are required. harvc is not a substitute for a properly constructed citation.",
"params": {
"author-link1": {
"aliases": ["author-link"],
"description": "title of existing Wikipedia article about the contributor—not the contributor's website; do not wikilink; requires |display-authors=",
"type": "string"
},
"author-linkn": {
"description": "title of existing Wikipedia article about contributor n; n begins at 2 and increases by 1 for each additional |author-linkn=; requires |display-authors=",
"type": "string"
},
"author-mask1": {
"aliases": ["author-mask"],
"description": "replaces name of the first contributor with m (commonly 2) em dashes; requires |display-authors=",
"type": "string"
},
"author-maskn": {
"description": "replaces name of contributor n with m em dashes; n begins at 2 and increases by 1 for each additional |author-maskn=; requires |display-authors=",
"type": "string"
},
"c": {
"aliases": ["chapter", " contribution"],
"description": "the title of chapter or contribution; rendered quoted in upright font",
"type": "string",
"required": true
},
"display-authors": {
"description": "defines how harvc displays the contributor list. When empty or omitted, contributor list mimics the style of sfn or harv templates; last names only. When set to number n, displays n contributor first and last names; appends et al. when the template displays fewer contributors than are included in the template. When set to 'all', displays all of the included contributor first and last names. When set to 'etal', displays all of the included contributor first and last names and appends et al.",
"type": "string"
},
"first1": {
"aliases": ["first"],
"description": "given or first name of the contribution's primary author; requires |display-authors=",
"type": "string"
},
"firstn": {
"description": "contributor's given or first name; n begins at 2 and increases by 1 for each additional |firstn=; requires |display-authors=",
"type": "string"
},
"id": {
"description": "required when |last1=-|last4= are the same as |in1=-|in4=; otherwise optional",
"type": "string"
},
"in1": {
"aliases": ["in"],
"description": "surname or last name of primary editor or author of the work that includes the contribution",
"type": "string",
"required": true
},
"in2": {
"description": "surname or last name of second editor or author",
"type": "string"
},
"in3": {
"description": "surname or last name of third editor or author",
"type": "string"
},
"in4": {
"description": "surname or last name of fourth editor or author",
"type": "string"
},
"last1": {
"aliases": ["last"],
"description": "surname or last name of primary author",
"type": "string",
"required": true
},
"lastn": {
"description": "contributor's surname or last name; n begins at 2 and increases by 1 for each additional |lastn=",
"type": "string",
},
"loc": {
"description": "other in-source location identifier, displays after |p= or |pp=",
"type": "string"
},
"mode": {
"description": "controls rendered display to match that of adjacent CS1 or CS2 citations; defaults to CS1 style; set to cs2 to mimic citation style",
"type": "string"
},
"p": {
"description": "single page number where cited material can be found",
"type": "string"
},
"pp": {
"description": "multiple page numbers, page ranges, etc where cited material can be found",
"type": "string"
},
"ps": {
"aliases": ["postscript"],
"description": "sets terminal punctuation; default is full stop for CS1 style, defaults to no punctuation when |mode=cs2; for no terminal punctuation use |ps=none",
"type": "string"
},
"url": {
"description": "URL of an online location where the text of the contribution can be found",
"type": "string"
},
"year": {
"description": "publication year of the work that includes the contribution",
"type": "date",
"required": true
}
}
}
</templatedata>
<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox | |
<!-- Categories below this line, please; interwikis at Wikidata -->
[[Category:Citation template utility templates]]
}}</includeonly>
c8bw20funy4dfpm312uyw2mh14ilyjc
801783
801782
2015-08-14T12:41:25Z
en>Trappist the monk
0
Copyedit;
801783
wikitext
text/x-wiki
{{Documentation subpage}}
{{lua|Module:Harvc}}
<!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
This template is a citation hybrid that has characteristics of the long-form [[Help:Citation Style 1|cs1]] and [[Help:Citation Style 2|cs2]] and characteristics of short-form {{tlx|sfn}} and the {{tlx|harv}} families of templates. Its purpose is to provide a method that allows editors to refer to a contribution or chapter in a larger work when more than a few such referrals are required. {{tld|harvc}} is not a substitute for a properly constructed citation.
Short-form templates {{tld|sfn}} and {{tld|harv}} are often used to link from an article's references section to a long-form cs1|2 template in a bibliography section:
:{{tld|sfn}} → {{tlx|cite book}}
It is not uncommon for a source have multiple contributors. When it is necessary to refer to multiple contributions in the same source, repeating all of the bibliographic details in multiple long-form citation templates adds to references-section clutter. {{tld|harvc}} is designed to hold only the detail necessary to identify a contribution and link to the enclosing work's long-form citation where all of the bibliographic detail can be found:
:{{tld|sfn}} → {{tld|harvc}} → {{tld|cite book}}
== Usage ==
The minimal form is:
:<code><nowiki>{{harvc |last=contributor name |year=publication year |c=contribution title |in=source editor/author name}}</nowiki></code>
===Parameters===
{{tld|harvc}} creates a <code>CITEREF</code> anchor from one to four contribution or chapter author surnames ({{para|last''n''}}) and the value in {{para|year}}. This allows {{tld|harvc}} to be the target of a link created by {{tlx|sfn}} or {{tld|harv}} family templates. From {{para|in''n''}} and {{para|year}}, {{tld|harvc}} creates a CITEREF link similar to those created by {{tlx|harvnb}} and {{tlx|sfn}}
:'''|author-link=''' – optional, title of existing Wikipedia article about the first contributor—not the contributor's website; do not wikilink; alias: '''|author-link1='''
::'''|author-link''n''=''' – optional, title of existing Wikipedia article about contributor''n''; choose ''n'' to match ''n'' in '''|last''n''='''
:'''|author-mask=''m''''' – optional, replaces name of the first contributor with ''m'' (commonly 2) em dashes; alias: '''|author-mask1='''
::'''|author-mask''n''=''m''''' – optional, replaces name of contributor''n'' with ''m'' em dashes; choose ''n'' to match ''n'' in '''|last''n''='''
:'''|c=''' – required, the title of chapter or contribution; rendered quoted in upright font; aliases: '''|chapter=''', '''|contribution='''
:'''|display-authors=''' – optional, defines how {{tld|harvc}} displays the contributor list; ignored when '''|name-list-format=harv''':
::{{para|display-authors}} – when empty or omitted, displays all contributor names in last/first format
::{{para|display-authors|''n''}} – displays ''n'' contributor names in last/first format; appends et al. when ''n'' is less than the number of contributors included in the template
::{{para|display-authors|etal}} – displays all contributor names in last/first format and appends et al.
:'''|first=''' – optional, first contributor's given or first name; alias: '''|first1='''
::'''|first''n''=''' – optional, contributor''n'' given or first name; ''n'' begins at 2 and increases by 1 for each additional '''|first''n''='''
:'''|id=''' – required when {{para|last1}}-{{para|last4}} are the same as {{para|in1}}-{{para|in4}}; otherwise optional. See [[#Avoiding circular reference|Examples]]
:'''|in=''' – required, surname or last name of first editor or author of the work that includes the contribution; aliases: '''|in1='''
:'''|in2=''' – optional, surname or last name of second editor or author
:'''|in3=''' – optional, surname or last name of third editor or author
:'''|in4=''' – optional, surname or last name of fourth editor or author
:'''|last=''' – required, surname or last name of first author; aliases: '''|last1='''
::'''|last''n''=''' – optional, contributor''n'' surname or last name; ''n'' begins at 2 and increases by 1 for each additional '''|last''n''=''';
:'''|last-author-amp=''': – optional, when set to '''yes''', inserts an ampersand between the last two contributor names
:'''|loc=''' – optional, other location identifier, displays after {{para|p}} or {{para|pp}}
:'''|mode=''' – controls rendered display to match that of adjacent CS1 or CS2 citations; defaults to CS1 style
::'''|mode=cs2''' – mimic {{tlx|citation}} style (comma separators, no terminal punctuation, static text not capitalized)
:'''|name-list-format=''' – optional, controls contributor name list display style
::'''|name-list-format=harv''' – mimic {{tld|sfn}} or {{tld|harv}} format (one to four last names); overrides '''|display-authors='''
:'''|p=''' – optional, single page number where cited material can be found
:'''|pp=''' – optional, multiple page numbers, page ranges, etc where cited material can be found
:'''|ps=''' – optional, sets terminal punctuation; default is full stop; overrides '''|mode=cs2'''; aliases: '''|postscript='''
::'''|ps=none''' – renders output without terminal punctuation
:'''|url=''' – optional, URL of an online location where the text of the contribution can be found
:'''|year=''' – required, publication year of the work that includes the contribution
===Examples===
When a Wikipedia article makes reference to a work that contains multiple chapters by different authors, bibliographies and reference sections can look rather cluttered:
* {{cite book |last=George |first=Ernest J. |last2=Read |first2=Ralph A. |last3=Johnson |first3=R. W. |last4=Ferber |first4=A. E. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Shelterbelts and Windbreaks |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=//archive.org/stream/yoa1957#page/n785/mode/1up |oclc=704186906}}
* {{cite book |last=Harper |first=V. L. |last2=Frank |first2=Bernard |last3=McQuilkin |first3=W. E. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Forest Practices and Productivity |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=//archive.org/stream/yoa1957#page/n803/mode/1up |oclc=704186906}}
* {{cite book |last=Stout |first=P. R. |last2=Johnson |first2=C. M. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Trace Elements |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=//archive.org/stream/yoa1957#page/n167/mode/1up |oclc=704186906}}
* {{cite book |last=Wadleigh |first=C. H. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Growth of Plants |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=//archive.org/stream/yoa1957#page/n57/mode/1up |oclc=704186906}}
As the list grows longer, the look becomes more cluttered with the unnecessarily repeated detail of full-length citations. With {{tld|harvc}} editors can link to shorter, less detailed contribution citations using standard implementations of {{tlx|sfn}} templates{{sfn|George|Read|Johnson|Ferber|1957}} and {{tlx|harv}} templates (like this: {{harv|Harper|Frank|McQuilkin|1957}} and also wrapped in {{tag|ref}} tags<ref>{{harvnb|Stout|Johnson|1957}}</ref>). {{tld|harvc}} may also be wrapped in {{tag|ref}} tags so that it becomes part of the article's References section.<ref>{{harvc|last=Benson|first=Ezra Taft|year=1957|chapter=Foreword|url=//archive.org/stream/yoa1957#page/n5/mode/1up|in=Stefferud|p=vi |loc=§2}}</ref>{{sfn|Wadleigh|1957}}
====Avoiding circular reference====
It may sometimes be necessary to cite a contribution of a source's editor or author such that {{para|last1}} through {{para|last4}} are the same as {{para|in1}} through {{para|in4}}, an editor's preface for example. Such citations can, depending on placement, cause {{tld|sfn}} or {{tld|harv}}-family references to link directly to the citation instead of to the {{tld|harvc}} template, or cause circular links ({{tld|harvc}} linking to itself because its <code>CITEREF</code> anchor identifier is the same as the citation's <code>CITEREF</code> anchor identifier). If {{para|id}} is set, {{tld|harvc}} will use it as an anchor identifier; if {{para|id}} is not set, {{tld|harvc}} will emit an error message when {{para|last1}} through {{para|last4}} are the same as {{para|in1}} through {{para|in4}}.
For example, to reference an editor's preface from article text, create a wikilink inside {{tag|ref}} tags:<ref>[[#Stefferud preface|Stefferud 1957]]</ref>
:<code><nowiki><ref>[[#Stefferud preface|Stefferud 1957]]</ref></nowiki></code>
Write a {{tld|harvc}} template with {{para|id|Stefferud preface}}
:<code><nowiki>{{harvc |last=Stefferud |first=A.|year=1957 |id=Stefferud preface |c=Preface |url=//archive.org/stream/yoa1957#page/n7/mode/1up |in=Stefferud}}</nowiki></code>
====Example references section====
{{reflist}}
====Example bibliography section====
* {{cite book |title=Soil: The Yearbook of Agriculture 1957 |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |url=//archive.org/stream/yoa1957#page/n2/mode/1up |oclc=704186906 |ref=harv}}
** {{harvc |last=George |first=Ernest J. |last2=Read |last3=Johnson |last4=Ferber |year=1957 |contribution=Shelterbelts and Windbreaks |url=//archive.org/stream/yoa1957#page/n785/mode/1up |in=Stefferud}}
** {{harvc |last=Harper |first=V. L. |last2=Frank |last3=McQuilkin |year=1957 |contribution=Forest Practices and Productivity |url=//archive.org/stream/yoa1957#page/n803/mode/1up |in=Stefferud}}
** {{harvc |last=Stefferud |first=A.|year=1957 |id=Stefferud preface |c=Preface |url=//archive.org/stream/yoa1957#page/n7/mode/1up |in=Stefferud}}
** {{harvc |last=Stout |first=P. R. |last2=Johnson |year=1957 |c=Trace Elements |url=//archive.org/stream/yoa1957#page/n167/mode/1up |in=Stefferud}}
** {{harvc |last=Wadleigh |first=C. H.|year=1957 |c=Growth of Plants |url=//archive.org/stream/yoa1957#page/n57/mode/1up |in=Stefferud}}
==Error messages==
{{tld|harvc}} emits these error messages:
:<span style="font-size:100%" class="error">harvc: author missing from source list.</span>
::the source list parameters {{para|in1}}, {{para|in2}}, {{para|in3}}, and {{para|in4}} form the template's <code>CITEREF</code> link to the full citation. All are not required but must be used in order without numerical gaps.
:<span style="font-size:100%" class="error">harvc: invalid |display-authors=.</span>
::the value assigned to {{para|display-authors}} must be a number greater than 0 or the keyword <code>etal</code>
:<span style="font-size:100%" class="error">harvc: invalid or missing year.</span>
::{{para|year}} is an integral part of the template's <code>CITEREF</code> anchor and link. The value of {{para|year}} must be a three- or four-digit number with an optional lowercase <code>CITEREF</code> disambiguator. When the source does not have an identifiable year, use {{para|year|n.d.}} or {{para|year|nd}}.
:<span style="font-size:100%" class="error">harvc: no authors in contributor list.</span>
::this error message indicates that {{tld|harvc}} can't find {{para|last}} or {{para|last1}} with an assigned value and so cannot make a usable <code>CITEREF</code> anchor without contributors. Add at least one {{para|last''n''}} parameter.
:<span style="font-size:100%" class="error">harvc: required contribution is missing.</span>
::this error message indicates that {{tld|harvc}} can't find any of {{para|c}}, {{para|chapter}}, or {{para|contribution}} with an assigned value
:<span style="font-size:100%" class="error">harvc: required |id= parameter missing.</span>
::this error message is emitted when the {{tld|harvc}} template's <code>CITEREF</code> anchor identifier would conflict with the long-form citation's <code>CITEREF</code> anchor identifier. See [[#Avoiding circular reference|Examples]]
==Template data==
<templatedata>
{
"description": "A method for referring to a contribution or chapter in a larger work when more than a few such referrals are required. harvc is not a substitute for a properly constructed citation.",
"params": {
"author-link": {
"aliases": ["author-link1"],
"description": "title of existing Wikipedia article about the contributor—not the contributor's website; do not wikilink",
"type": "string"
},
"author-linkn": {
"description": "title of existing Wikipedia article about contributor n; n begins at 2 and increases by 1 for each additional |author-linkn=",
"type": "string"
},
"author-mask1": {
"aliases": ["author-mask1"],
"description": "replaces name of the first contributor with m (commonly 2) em dashes",
"type": "string"
},
"author-maskn": {
"description": "replaces name of contributor n with m em dashes; n begins at 2 and increases by 1 for each additional |author-maskn=",
"type": "string"
},
"c": {
"aliases": ["chapter", " contribution"],
"description": "the title of chapter or contribution; rendered quoted in upright font",
"type": "string",
"required": true
},
"display-authors": {
"description": "defines how harvc displays the contributor list. When empty or omitted, contributor list mimics the style of cs1 and cs2 templates. When set to number n, displays n contributor first and last names; appends et al. when the template displays fewer contributors than are included in the template. When set to 'etal', displays all of the included contributor first and last names and appends et al.",
"type": "string"
},
"first": {
"aliases": ["first1"],
"description": "given or first name of the contribution's first author; requires |display-authors=",
"type": "string"
},
"firstn": {
"description": "contributor's given or first name; n begins at 2 and increases by 1 for each additional |firstn=",
"type": "string"
},
"id": {
"description": "required when |last1=-|last4= are the same as |in1=-|in4=; otherwise optional",
"type": "string"
},
"in": {
"aliases": ["in1"],
"description": "surname or last name of primary editor or author of the work that includes the contribution",
"type": "string",
"required": true
},
"in2": {
"description": "surname or last name of second editor or author",
"type": "string"
},
"in3": {
"description": "surname or last name of third editor or author",
"type": "string"
},
"in4": {
"description": "surname or last name of fourth editor or author",
"type": "string"
},
"last": {
"aliases": ["last1"],
"description": "surname or last name of primary author",
"type": "string",
"required": true
},
"lastn": {
"description": "contributor's surname or last name; n begins at 2 and increases by 1 for each additional |lastn=",
"type": "string",
},
"loc": {
"description": "other in-source location identifier, displays after |p= or |pp=",
"type": "string"
},
"mode": {
"description": "controls rendered display to match that of adjacent cs1 or cs2 citations; defaults to cs1 style; set |mode=cs2 to mimic citation template style",
"type": "string"
},
"p": {
"description": "single page number where cited material can be found",
"type": "string"
},
"pp": {
"description": "multiple page numbers, page ranges, etc where cited material can be found",
"type": "string"
},
"ps": {
"aliases": ["postscript"],
"description": "sets terminal punctuation; default is full stop for cs1 style, defaults to no punctuation when |mode=cs2; for no terminal punctuation use |ps=none",
"type": "string"
},
"url": {
"description": "URL of an online location where the text of the contribution can be found",
"type": "string"
},
"year": {
"description": "publication year of the work that includes the contribution",
"type": "date",
"required": true
}
}
}
</templatedata>
<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox | |
<!-- Categories below this line, please; interwikis at Wikidata -->
[[Category:Citation template utility templates]]
}}</includeonly>
pczkxxxf894exrb1q5d9qhjnwk3l40o
801784
801783
2015-08-26T08:44:44Z
en>Zyxw
0
add {{TemplateData header}} before <templatedata>
801784
wikitext
text/x-wiki
{{Documentation subpage}}
<!-- Place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
{{lua|Module:Harvc}}
This template is a citation hybrid that has characteristics of the long-form [[Help:Citation Style 1|cs1]] and [[Help:Citation Style 2|cs2]] and characteristics of short-form {{tlx|sfn}} and the {{tlx|harv}} families of templates. Its purpose is to provide a method that allows editors to refer to a contribution or chapter in a larger work when more than a few such referrals are required. {{tld|harvc}} is not a substitute for a properly constructed citation.
Short-form templates {{tld|sfn}} and {{tld|harv}} are often used to link from an article's references section to a long-form cs1|2 template in a bibliography section:
:{{tld|sfn}} → {{tlx|cite book}}
It is not uncommon for a source have multiple contributors. When it is necessary to refer to multiple contributions in the same source, repeating all of the bibliographic details in multiple long-form citation templates adds to references-section clutter. {{tld|harvc}} is designed to hold only the detail necessary to identify a contribution and link to the enclosing work's long-form citation where all of the bibliographic detail can be found:
:{{tld|sfn}} → {{tld|harvc}} → {{tld|cite book}}
== Usage ==
The minimal form is:
:<code><nowiki>{{harvc |last=contributor name |year=publication year |c=contribution title |in=source editor/author name}}</nowiki></code>
===Parameters===
{{tld|harvc}} creates a <code>CITEREF</code> anchor from one to four contribution or chapter author surnames ({{para|last''n''}}) and the value in {{para|year}}. This allows {{tld|harvc}} to be the target of a link created by {{tlx|sfn}} or {{tld|harv}} family templates. From {{para|in''n''}} and {{para|year}}, {{tld|harvc}} creates a CITEREF link similar to those created by {{tlx|harvnb}} and {{tlx|sfn}}
: '''|author-link=''' – optional, title of existing Wikipedia article about the first contributor—not the contributor's website; do not wikilink; alias: '''|author-link1='''
:: '''|author-link''n''=''' – optional, title of existing Wikipedia article about contributor''n''; choose ''n'' to match ''n'' in '''|last''n''='''
: '''|author-mask=''m''''' – optional, replaces name of the first contributor with ''m'' (commonly 2) em dashes; alias: '''|author-mask1='''
:: '''|author-mask''n''=''m''''' – optional, replaces name of contributor''n'' with ''m'' em dashes; choose ''n'' to match ''n'' in '''|last''n''='''
: '''|c=''' – required, the title of chapter or contribution; rendered quoted in upright font; aliases: '''|chapter=''', '''|contribution='''
: '''|display-authors=''' – optional, defines how {{tld|harvc}} displays the contributor list; ignored when '''|name-list-format=harv''':
:: {{para|display-authors}} – when empty or omitted, displays all contributor names in last/first format
:: {{para|display-authors|''n''}} – displays ''n'' contributor names in last/first format; appends et al. when ''n'' is less than the number of contributors included in the template
:: {{para|display-authors|etal}} – displays all contributor names in last/first format and appends et al.
: '''|first=''' – optional, first contributor's given or first name; alias: '''|first1='''
:: '''|first''n''=''' – optional, contributor''n'' given or first name; ''n'' begins at 2 and increases by 1 for each additional '''|first''n''='''
: '''|id=''' – required when {{para|last1}}-{{para|last4}} are the same as {{para|in1}}-{{para|in4}}; otherwise optional. See [[#Avoiding circular reference|Examples]]
: '''|in=''' – required, surname or last name of first editor or author of the work that includes the contribution; aliases: '''|in1='''
: '''|in2=''' – optional, surname or last name of second editor or author
: '''|in3=''' – optional, surname or last name of third editor or author
: '''|in4=''' – optional, surname or last name of fourth editor or author
: '''|last=''' – required, surname or last name of first author; aliases: '''|last1='''
:: '''|last''n''=''' – optional, contributor''n'' surname or last name; ''n'' begins at 2 and increases by 1 for each additional '''|last''n''=''';
: '''|last-author-amp=''': – optional, when set to '''yes''', inserts an ampersand between the last two contributor names
: '''|loc=''' – optional, other location identifier, displays after {{para|p}} or {{para|pp}}
: '''|mode=''' – controls rendered display to match that of adjacent CS1 or CS2 citations; defaults to CS1 style
:: '''|mode=cs2''' – mimic {{tlx|citation}} style (comma separators, no terminal punctuation, static text not capitalized)
: '''|name-list-format=''' – optional, controls contributor name list display style
:: '''|name-list-format=harv''' – mimic {{tld|sfn}} or {{tld|harv}} format (one to four last names); overrides '''|display-authors='''
: '''|p=''' – optional, single page number where cited material can be found
: '''|pp=''' – optional, multiple page numbers, page ranges, etc where cited material can be found
: '''|ps=''' – optional, sets terminal punctuation; default is full stop; overrides '''|mode=cs2'''; aliases: '''|postscript='''
:: '''|ps=none''' – renders output without terminal punctuation
: '''|url=''' – optional, URL of an online location where the text of the contribution can be found
: '''|year=''' – required, publication year of the work that includes the contribution
===Examples===
When a Wikipedia article makes reference to a work that contains multiple chapters by different authors, bibliographies and reference sections can look rather cluttered:
* {{cite book |last=George |first=Ernest J. |last2=Read |first2=Ralph A. |last3=Johnson |first3=R. W. |last4=Ferber |first4=A. E. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Shelterbelts and Windbreaks |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=//archive.org/stream/yoa1957#page/n785/mode/1up |oclc=704186906}}
* {{cite book |last=Harper |first=V. L. |last2=Frank |first2=Bernard |last3=McQuilkin |first3=W. E. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Forest Practices and Productivity |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=//archive.org/stream/yoa1957#page/n803/mode/1up |oclc=704186906}}
* {{cite book |last=Stout |first=P. R. |last2=Johnson |first2=C. M. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Trace Elements |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=//archive.org/stream/yoa1957#page/n167/mode/1up |oclc=704186906}}
* {{cite book |last=Wadleigh |first=C. H. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Growth of Plants |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=//archive.org/stream/yoa1957#page/n57/mode/1up |oclc=704186906}}
As the list grows longer, the look becomes more cluttered with the unnecessarily repeated detail of full-length citations. With {{tld|harvc}} editors can link to shorter, less detailed contribution citations using standard implementations of {{tlx|sfn}} templates{{sfn|George|Read|Johnson|Ferber|1957}} and {{tlx|harv}} templates (like this: {{harv|Harper|Frank|McQuilkin|1957}} and also wrapped in {{tag|ref}} tags<ref>{{harvnb|Stout|Johnson|1957}}</ref>). {{tld|harvc}} may also be wrapped in {{tag|ref}} tags so that it becomes part of the article's References section.<ref>{{harvc|last=Benson|first=Ezra Taft|year=1957|chapter=Foreword|url=//archive.org/stream/yoa1957#page/n5/mode/1up|in=Stefferud|p=vi |loc=§2}}</ref>{{sfn|Wadleigh|1957}}
====Avoiding circular reference====
It may sometimes be necessary to cite a contribution of a source's editor or author such that {{para|last1}} through {{para|last4}} are the same as {{para|in1}} through {{para|in4}}, an editor's preface for example. Such citations can, depending on placement, cause {{tld|sfn}} or {{tld|harv}}-family references to link directly to the citation instead of to the {{tld|harvc}} template, or cause circular links ({{tld|harvc}} linking to itself because its <code>CITEREF</code> anchor identifier is the same as the citation's <code>CITEREF</code> anchor identifier). If {{para|id}} is set, {{tld|harvc}} will use it as an anchor identifier; if {{para|id}} is not set, {{tld|harvc}} will emit an error message when {{para|last1}} through {{para|last4}} are the same as {{para|in1}} through {{para|in4}}.
For example, to reference an editor's preface from article text, create a wikilink inside {{tag|ref}} tags:<ref>[[#Stefferud preface|Stefferud 1957]]</ref>
:<code><nowiki><ref>[[#Stefferud preface|Stefferud 1957]]</ref></nowiki></code>
Write a {{tld|harvc}} template with {{para|id|Stefferud preface}}
:<code><nowiki>{{harvc |last=Stefferud |first=A.|year=1957 |id=Stefferud preface |c=Preface |url=//archive.org/stream/yoa1957#page/n7/mode/1up |in=Stefferud}}</nowiki></code>
====Example references section====
{{reflist}}
====Example bibliography section====
* {{cite book |title=Soil: The Yearbook of Agriculture 1957 |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |url=//archive.org/stream/yoa1957#page/n2/mode/1up |oclc=704186906 |ref=harv}}
** {{harvc |last=George |first=Ernest J. |last2=Read |last3=Johnson |last4=Ferber |year=1957 |contribution=Shelterbelts and Windbreaks |url=//archive.org/stream/yoa1957#page/n785/mode/1up |in=Stefferud}}
** {{harvc |last=Harper |first=V. L. |last2=Frank |last3=McQuilkin |year=1957 |contribution=Forest Practices and Productivity |url=//archive.org/stream/yoa1957#page/n803/mode/1up |in=Stefferud}}
** {{harvc |last=Stefferud |first=A.|year=1957 |id=Stefferud preface |c=Preface |url=//archive.org/stream/yoa1957#page/n7/mode/1up |in=Stefferud}}
** {{harvc |last=Stout |first=P. R. |last2=Johnson |year=1957 |c=Trace Elements |url=//archive.org/stream/yoa1957#page/n167/mode/1up |in=Stefferud}}
** {{harvc |last=Wadleigh |first=C. H.|year=1957 |c=Growth of Plants |url=//archive.org/stream/yoa1957#page/n57/mode/1up |in=Stefferud}}
==Error messages==
{{tld|harvc}} emits these error messages:
:<span style="font-size:100%" class="error">harvc: author missing from source list.</span>
::the source list parameters {{para|in1}}, {{para|in2}}, {{para|in3}}, and {{para|in4}} form the template's <code>CITEREF</code> link to the full citation. All are not required but must be used in order without numerical gaps.
:<span style="font-size:100%" class="error">harvc: invalid |display-authors=.</span>
::the value assigned to {{para|display-authors}} must be a number greater than 0 or the keyword <code>etal</code>
:<span style="font-size:100%" class="error">harvc: invalid or missing year.</span>
::{{para|year}} is an integral part of the template's <code>CITEREF</code> anchor and link. The value of {{para|year}} must be a three- or four-digit number with an optional lowercase <code>CITEREF</code> disambiguator. When the source does not have an identifiable year, use {{para|year|n.d.}} or {{para|year|nd}}.
:<span style="font-size:100%" class="error">harvc: no authors in contributor list.</span>
::this error message indicates that {{tld|harvc}} can't find {{para|last}} or {{para|last1}} with an assigned value and so cannot make a usable <code>CITEREF</code> anchor without contributors. Add at least one {{para|last''n''}} parameter.
:<span style="font-size:100%" class="error">harvc: required contribution is missing.</span>
::this error message indicates that {{tld|harvc}} can't find any of {{para|c}}, {{para|chapter}}, or {{para|contribution}} with an assigned value
:<span style="font-size:100%" class="error">harvc: required |id= parameter missing.</span>
::this error message is emitted when the {{tld|harvc}} template's <code>CITEREF</code> anchor identifier would conflict with the long-form citation's <code>CITEREF</code> anchor identifier. See [[#Avoiding circular reference|Examples]]
== TemplateData ==
{{TemplateData header}}
<templatedata>
{
"description": "A method for referring to a contribution or chapter in a larger work when more than a few such referrals are required. harvc is not a substitute for a properly constructed citation.",
"params": {
"author-link": {
"aliases": ["author-link1"],
"description": "title of existing Wikipedia article about the contributor—not the contributor's website; do not wikilink",
"type": "string"
},
"author-linkn": {
"description": "title of existing Wikipedia article about contributor n; n begins at 2 and increases by 1 for each additional |author-linkn=",
"type": "string"
},
"author-mask1": {
"aliases": ["author-mask1"],
"description": "replaces name of the first contributor with m (commonly 2) em dashes",
"type": "string"
},
"author-maskn": {
"description": "replaces name of contributor n with m em dashes; n begins at 2 and increases by 1 for each additional |author-maskn=",
"type": "string"
},
"c": {
"aliases": ["chapter", " contribution"],
"description": "the title of chapter or contribution; rendered quoted in upright font",
"type": "string",
"required": true
},
"display-authors": {
"description": "defines how harvc displays the contributor list. When empty or omitted, contributor list mimics the style of cs1 and cs2 templates. When set to number n, displays n contributor first and last names; appends et al. when the template displays fewer contributors than are included in the template. When set to 'etal', displays all of the included contributor first and last names and appends et al.",
"type": "string"
},
"first": {
"aliases": ["first1"],
"description": "given or first name of the contribution's first author; requires |display-authors=",
"type": "string"
},
"firstn": {
"description": "contributor's given or first name; n begins at 2 and increases by 1 for each additional |firstn=",
"type": "string"
},
"id": {
"description": "required when |last1=-|last4= are the same as |in1=-|in4=; otherwise optional",
"type": "string"
},
"in": {
"aliases": ["in1"],
"description": "surname or last name of primary editor or author of the work that includes the contribution",
"type": "string",
"required": true
},
"in2": {
"description": "surname or last name of second editor or author",
"type": "string"
},
"in3": {
"description": "surname or last name of third editor or author",
"type": "string"
},
"in4": {
"description": "surname or last name of fourth editor or author",
"type": "string"
},
"last": {
"aliases": ["last1"],
"description": "surname or last name of primary author",
"type": "string",
"required": true
},
"lastn": {
"description": "contributor's surname or last name; n begins at 2 and increases by 1 for each additional |lastn=",
"type": "string",
},
"loc": {
"description": "other in-source location identifier, displays after |p= or |pp=",
"type": "string"
},
"mode": {
"description": "controls rendered display to match that of adjacent cs1 or cs2 citations; defaults to cs1 style; set |mode=cs2 to mimic citation template style",
"type": "string"
},
"p": {
"description": "single page number where cited material can be found",
"type": "string"
},
"pp": {
"description": "multiple page numbers, page ranges, etc where cited material can be found",
"type": "string"
},
"ps": {
"aliases": ["postscript"],
"description": "sets terminal punctuation; default is full stop for cs1 style, defaults to no punctuation when |mode=cs2; for no terminal punctuation use |ps=none",
"type": "string"
},
"url": {
"description": "URL of an online location where the text of the contribution can be found",
"type": "string"
},
"year": {
"description": "publication year of the work that includes the contribution",
"type": "date",
"required": true
}
}
}
</templatedata>
<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox | |
<!-- Categories below this line, please; interwikis at Wikidata -->
[[Category:Citation template utility templates]]
}}</includeonly>
51cdemkul94e05oaygxbuu2jyd8psoq
801785
801784
2015-11-24T02:03:41Z
en>Good Olfactory
0
Citation utility templates
801785
wikitext
text/x-wiki
{{Documentation subpage}}
<!-- Place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
{{lua|Module:Harvc}}
This template is a citation hybrid that has characteristics of the long-form [[Help:Citation Style 1|cs1]] and [[Help:Citation Style 2|cs2]] and characteristics of short-form {{tlx|sfn}} and the {{tlx|harv}} families of templates. Its purpose is to provide a method that allows editors to refer to a contribution or chapter in a larger work when more than a few such referrals are required. {{tld|harvc}} is not a substitute for a properly constructed citation.
Short-form templates {{tld|sfn}} and {{tld|harv}} are often used to link from an article's references section to a long-form cs1|2 template in a bibliography section:
:{{tld|sfn}} → {{tlx|cite book}}
It is not uncommon for a source have multiple contributors. When it is necessary to refer to multiple contributions in the same source, repeating all of the bibliographic details in multiple long-form citation templates adds to references-section clutter. {{tld|harvc}} is designed to hold only the detail necessary to identify a contribution and link to the enclosing work's long-form citation where all of the bibliographic detail can be found:
:{{tld|sfn}} → {{tld|harvc}} → {{tld|cite book}}
== Usage ==
The minimal form is:
:<code><nowiki>{{harvc |last=contributor name |year=publication year |c=contribution title |in=source editor/author name}}</nowiki></code>
===Parameters===
{{tld|harvc}} creates a <code>CITEREF</code> anchor from one to four contribution or chapter author surnames ({{para|last''n''}}) and the value in {{para|year}}. This allows {{tld|harvc}} to be the target of a link created by {{tlx|sfn}} or {{tld|harv}} family templates. From {{para|in''n''}} and {{para|year}}, {{tld|harvc}} creates a CITEREF link similar to those created by {{tlx|harvnb}} and {{tlx|sfn}}
: '''|author-link=''' – optional, title of existing Wikipedia article about the first contributor—not the contributor's website; do not wikilink; alias: '''|author-link1='''
:: '''|author-link''n''=''' – optional, title of existing Wikipedia article about contributor''n''; choose ''n'' to match ''n'' in '''|last''n''='''
: '''|author-mask=''m''''' – optional, replaces name of the first contributor with ''m'' (commonly 2) em dashes; alias: '''|author-mask1='''
:: '''|author-mask''n''=''m''''' – optional, replaces name of contributor''n'' with ''m'' em dashes; choose ''n'' to match ''n'' in '''|last''n''='''
: '''|c=''' – required, the title of chapter or contribution; rendered quoted in upright font; aliases: '''|chapter=''', '''|contribution='''
: '''|display-authors=''' – optional, defines how {{tld|harvc}} displays the contributor list; ignored when '''|name-list-format=harv''':
:: {{para|display-authors}} – when empty or omitted, displays all contributor names in last/first format
:: {{para|display-authors|''n''}} – displays ''n'' contributor names in last/first format; appends et al. when ''n'' is less than the number of contributors included in the template
:: {{para|display-authors|etal}} – displays all contributor names in last/first format and appends et al.
: '''|first=''' – optional, first contributor's given or first name; alias: '''|first1='''
:: '''|first''n''=''' – optional, contributor''n'' given or first name; ''n'' begins at 2 and increases by 1 for each additional '''|first''n''='''
: '''|id=''' – required when {{para|last1}}-{{para|last4}} are the same as {{para|in1}}-{{para|in4}}; otherwise optional. See [[#Avoiding circular reference|Examples]]
: '''|in=''' – required, surname or last name of first editor or author of the work that includes the contribution; aliases: '''|in1='''
: '''|in2=''' – optional, surname or last name of second editor or author
: '''|in3=''' – optional, surname or last name of third editor or author
: '''|in4=''' – optional, surname or last name of fourth editor or author
: '''|last=''' – required, surname or last name of first author; aliases: '''|last1='''
:: '''|last''n''=''' – optional, contributor''n'' surname or last name; ''n'' begins at 2 and increases by 1 for each additional '''|last''n''=''';
: '''|last-author-amp=''': – optional, when set to '''yes''', inserts an ampersand between the last two contributor names
: '''|loc=''' – optional, other location identifier, displays after {{para|p}} or {{para|pp}}
: '''|mode=''' – controls rendered display to match that of adjacent CS1 or CS2 citations; defaults to CS1 style
:: '''|mode=cs2''' – mimic {{tlx|citation}} style (comma separators, no terminal punctuation, static text not capitalized)
: '''|name-list-format=''' – optional, controls contributor name list display style
:: '''|name-list-format=harv''' – mimic {{tld|sfn}} or {{tld|harv}} format (one to four last names); overrides '''|display-authors='''
: '''|p=''' – optional, single page number where cited material can be found
: '''|pp=''' – optional, multiple page numbers, page ranges, etc where cited material can be found
: '''|ps=''' – optional, sets terminal punctuation; default is full stop; overrides '''|mode=cs2'''; aliases: '''|postscript='''
:: '''|ps=none''' – renders output without terminal punctuation
: '''|url=''' – optional, URL of an online location where the text of the contribution can be found
: '''|year=''' – required, publication year of the work that includes the contribution
===Examples===
When a Wikipedia article makes reference to a work that contains multiple chapters by different authors, bibliographies and reference sections can look rather cluttered:
* {{cite book |last=George |first=Ernest J. |last2=Read |first2=Ralph A. |last3=Johnson |first3=R. W. |last4=Ferber |first4=A. E. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Shelterbelts and Windbreaks |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=//archive.org/stream/yoa1957#page/n785/mode/1up |oclc=704186906}}
* {{cite book |last=Harper |first=V. L. |last2=Frank |first2=Bernard |last3=McQuilkin |first3=W. E. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Forest Practices and Productivity |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=//archive.org/stream/yoa1957#page/n803/mode/1up |oclc=704186906}}
* {{cite book |last=Stout |first=P. R. |last2=Johnson |first2=C. M. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Trace Elements |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=//archive.org/stream/yoa1957#page/n167/mode/1up |oclc=704186906}}
* {{cite book |last=Wadleigh |first=C. H. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Growth of Plants |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=//archive.org/stream/yoa1957#page/n57/mode/1up |oclc=704186906}}
As the list grows longer, the look becomes more cluttered with the unnecessarily repeated detail of full-length citations. With {{tld|harvc}} editors can link to shorter, less detailed contribution citations using standard implementations of {{tlx|sfn}} templates{{sfn|George|Read|Johnson|Ferber|1957}} and {{tlx|harv}} templates (like this: {{harv|Harper|Frank|McQuilkin|1957}} and also wrapped in {{tag|ref}} tags<ref>{{harvnb|Stout|Johnson|1957}}</ref>). {{tld|harvc}} may also be wrapped in {{tag|ref}} tags so that it becomes part of the article's References section.<ref>{{harvc|last=Benson|first=Ezra Taft|year=1957|chapter=Foreword|url=//archive.org/stream/yoa1957#page/n5/mode/1up|in=Stefferud|p=vi |loc=§2}}</ref>{{sfn|Wadleigh|1957}}
====Avoiding circular reference====
It may sometimes be necessary to cite a contribution of a source's editor or author such that {{para|last1}} through {{para|last4}} are the same as {{para|in1}} through {{para|in4}}, an editor's preface for example. Such citations can, depending on placement, cause {{tld|sfn}} or {{tld|harv}}-family references to link directly to the citation instead of to the {{tld|harvc}} template, or cause circular links ({{tld|harvc}} linking to itself because its <code>CITEREF</code> anchor identifier is the same as the citation's <code>CITEREF</code> anchor identifier). If {{para|id}} is set, {{tld|harvc}} will use it as an anchor identifier; if {{para|id}} is not set, {{tld|harvc}} will emit an error message when {{para|last1}} through {{para|last4}} are the same as {{para|in1}} through {{para|in4}}.
For example, to reference an editor's preface from article text, create a wikilink inside {{tag|ref}} tags:<ref>[[#Stefferud preface|Stefferud 1957]]</ref>
:<code><nowiki><ref>[[#Stefferud preface|Stefferud 1957]]</ref></nowiki></code>
Write a {{tld|harvc}} template with {{para|id|Stefferud preface}}
:<code><nowiki>{{harvc |last=Stefferud |first=A.|year=1957 |id=Stefferud preface |c=Preface |url=//archive.org/stream/yoa1957#page/n7/mode/1up |in=Stefferud}}</nowiki></code>
====Example references section====
{{reflist}}
====Example bibliography section====
* {{cite book |title=Soil: The Yearbook of Agriculture 1957 |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |url=//archive.org/stream/yoa1957#page/n2/mode/1up |oclc=704186906 |ref=harv}}
** {{harvc |last=George |first=Ernest J. |last2=Read |last3=Johnson |last4=Ferber |year=1957 |contribution=Shelterbelts and Windbreaks |url=//archive.org/stream/yoa1957#page/n785/mode/1up |in=Stefferud}}
** {{harvc |last=Harper |first=V. L. |last2=Frank |last3=McQuilkin |year=1957 |contribution=Forest Practices and Productivity |url=//archive.org/stream/yoa1957#page/n803/mode/1up |in=Stefferud}}
** {{harvc |last=Stefferud |first=A.|year=1957 |id=Stefferud preface |c=Preface |url=//archive.org/stream/yoa1957#page/n7/mode/1up |in=Stefferud}}
** {{harvc |last=Stout |first=P. R. |last2=Johnson |year=1957 |c=Trace Elements |url=//archive.org/stream/yoa1957#page/n167/mode/1up |in=Stefferud}}
** {{harvc |last=Wadleigh |first=C. H.|year=1957 |c=Growth of Plants |url=//archive.org/stream/yoa1957#page/n57/mode/1up |in=Stefferud}}
==Error messages==
{{tld|harvc}} emits these error messages:
:<span style="font-size:100%" class="error">harvc: author missing from source list.</span>
::the source list parameters {{para|in1}}, {{para|in2}}, {{para|in3}}, and {{para|in4}} form the template's <code>CITEREF</code> link to the full citation. All are not required but must be used in order without numerical gaps.
:<span style="font-size:100%" class="error">harvc: invalid |display-authors=.</span>
::the value assigned to {{para|display-authors}} must be a number greater than 0 or the keyword <code>etal</code>
:<span style="font-size:100%" class="error">harvc: invalid or missing year.</span>
::{{para|year}} is an integral part of the template's <code>CITEREF</code> anchor and link. The value of {{para|year}} must be a three- or four-digit number with an optional lowercase <code>CITEREF</code> disambiguator. When the source does not have an identifiable year, use {{para|year|n.d.}} or {{para|year|nd}}.
:<span style="font-size:100%" class="error">harvc: no authors in contributor list.</span>
::this error message indicates that {{tld|harvc}} can't find {{para|last}} or {{para|last1}} with an assigned value and so cannot make a usable <code>CITEREF</code> anchor without contributors. Add at least one {{para|last''n''}} parameter.
:<span style="font-size:100%" class="error">harvc: required contribution is missing.</span>
::this error message indicates that {{tld|harvc}} can't find any of {{para|c}}, {{para|chapter}}, or {{para|contribution}} with an assigned value
:<span style="font-size:100%" class="error">harvc: required |id= parameter missing.</span>
::this error message is emitted when the {{tld|harvc}} template's <code>CITEREF</code> anchor identifier would conflict with the long-form citation's <code>CITEREF</code> anchor identifier. See [[#Avoiding circular reference|Examples]]
== TemplateData ==
{{TemplateData header}}
<templatedata>
{
"description": "A method for referring to a contribution or chapter in a larger work when more than a few such referrals are required. harvc is not a substitute for a properly constructed citation.",
"params": {
"author-link": {
"aliases": ["author-link1"],
"description": "title of existing Wikipedia article about the contributor—not the contributor's website; do not wikilink",
"type": "string"
},
"author-linkn": {
"description": "title of existing Wikipedia article about contributor n; n begins at 2 and increases by 1 for each additional |author-linkn=",
"type": "string"
},
"author-mask1": {
"aliases": ["author-mask1"],
"description": "replaces name of the first contributor with m (commonly 2) em dashes",
"type": "string"
},
"author-maskn": {
"description": "replaces name of contributor n with m em dashes; n begins at 2 and increases by 1 for each additional |author-maskn=",
"type": "string"
},
"c": {
"aliases": ["chapter", " contribution"],
"description": "the title of chapter or contribution; rendered quoted in upright font",
"type": "string",
"required": true
},
"display-authors": {
"description": "defines how harvc displays the contributor list. When empty or omitted, contributor list mimics the style of cs1 and cs2 templates. When set to number n, displays n contributor first and last names; appends et al. when the template displays fewer contributors than are included in the template. When set to 'etal', displays all of the included contributor first and last names and appends et al.",
"type": "string"
},
"first": {
"aliases": ["first1"],
"description": "given or first name of the contribution's first author; requires |display-authors=",
"type": "string"
},
"firstn": {
"description": "contributor's given or first name; n begins at 2 and increases by 1 for each additional |firstn=",
"type": "string"
},
"id": {
"description": "required when |last1=-|last4= are the same as |in1=-|in4=; otherwise optional",
"type": "string"
},
"in": {
"aliases": ["in1"],
"description": "surname or last name of primary editor or author of the work that includes the contribution",
"type": "string",
"required": true
},
"in2": {
"description": "surname or last name of second editor or author",
"type": "string"
},
"in3": {
"description": "surname or last name of third editor or author",
"type": "string"
},
"in4": {
"description": "surname or last name of fourth editor or author",
"type": "string"
},
"last": {
"aliases": ["last1"],
"description": "surname or last name of primary author",
"type": "string",
"required": true
},
"lastn": {
"description": "contributor's surname or last name; n begins at 2 and increases by 1 for each additional |lastn=",
"type": "string",
},
"loc": {
"description": "other in-source location identifier, displays after |p= or |pp=",
"type": "string"
},
"mode": {
"description": "controls rendered display to match that of adjacent cs1 or cs2 citations; defaults to cs1 style; set |mode=cs2 to mimic citation template style",
"type": "string"
},
"p": {
"description": "single page number where cited material can be found",
"type": "string"
},
"pp": {
"description": "multiple page numbers, page ranges, etc where cited material can be found",
"type": "string"
},
"ps": {
"aliases": ["postscript"],
"description": "sets terminal punctuation; default is full stop for cs1 style, defaults to no punctuation when |mode=cs2; for no terminal punctuation use |ps=none",
"type": "string"
},
"url": {
"description": "URL of an online location where the text of the contribution can be found",
"type": "string"
},
"year": {
"description": "publication year of the work that includes the contribution",
"type": "date",
"required": true
}
}
}
</templatedata>
<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox | |
<!-- Categories below this line, please; interwikis at Wikidata -->
[[Category:Citation utility templates]]
}}</includeonly>
f3cjl9kkuaykg1diltbcf5hthdz9mg4
801786
801785
2015-12-04T11:50:20Z
en>Trappist the monk
0
/* Parameters */ chapter-url and contribution-url;
801786
wikitext
text/x-wiki
{{Documentation subpage}}
<!-- Place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
{{lua|Module:Harvc}}
This template is a citation hybrid that has characteristics of the long-form [[Help:Citation Style 1|cs1]] and [[Help:Citation Style 2|cs2]] and characteristics of short-form {{tlx|sfn}} and the {{tlx|harv}} families of templates. Its purpose is to provide a method that allows editors to refer to a contribution or chapter in a larger work when more than a few such referrals are required. {{tld|harvc}} is not a substitute for a properly constructed citation.
Short-form templates {{tld|sfn}} and {{tld|harv}} are often used to link from an article's references section to a long-form cs1|2 template in a bibliography section:
:{{tld|sfn}} → {{tlx|cite book}}
It is not uncommon for a source have multiple contributors. When it is necessary to refer to multiple contributions in the same source, repeating all of the bibliographic details in multiple long-form citation templates adds to references-section clutter. {{tld|harvc}} is designed to hold only the detail necessary to identify a contribution and link to the enclosing work's long-form citation where all of the bibliographic detail can be found:
:{{tld|sfn}} → {{tld|harvc}} → {{tld|cite book}}
== Usage ==
The minimal form is:
:<code><nowiki>{{harvc |last=contributor name |year=publication year |c=contribution title |in=source editor/author name}}</nowiki></code>
===Parameters===
{{tld|harvc}} creates a <code>CITEREF</code> anchor from one to four contribution or chapter author surnames ({{para|last''n''}}) and the value in {{para|year}}. This allows {{tld|harvc}} to be the target of a link created by {{tlx|sfn}} or {{tld|harv}} family templates. From {{para|in''n''}} and {{para|year}}, {{tld|harvc}} creates a CITEREF link similar to those created by {{tlx|harvnb}} and {{tlx|sfn}}
: '''|author-link=''' – optional, title of existing Wikipedia article about the first contributor—not the contributor's website; do not wikilink; alias: '''|author-link1='''
:: '''|author-link''n''=''' – optional, title of existing Wikipedia article about contributor''n''; choose ''n'' to match ''n'' in '''|last''n''='''
: '''|author-mask=''m''''' – optional, replaces name of the first contributor with ''m'' (commonly 2) em dashes; alias: '''|author-mask1='''
:: '''|author-mask''n''=''m''''' – optional, replaces name of contributor''n'' with ''m'' em dashes; choose ''n'' to match ''n'' in '''|last''n''='''
: '''|c=''' – required, the title of chapter or contribution; rendered quoted in upright font; aliases: '''|chapter=''', '''|contribution='''
: '''|display-authors=''' – optional, defines how {{tld|harvc}} displays the contributor list; ignored when '''|name-list-format=harv''':
:: {{para|display-authors}} – when empty or omitted, displays all contributor names in last/first format
:: {{para|display-authors|''n''}} – displays ''n'' contributor names in last/first format; appends et al. when ''n'' is less than the number of contributors included in the template
:: {{para|display-authors|etal}} – displays all contributor names in last/first format and appends et al.
: '''|first=''' – optional, first contributor's given or first name; alias: '''|first1='''
:: '''|first''n''=''' – optional, contributor''n'' given or first name; ''n'' begins at 2 and increases by 1 for each additional '''|first''n''='''
: '''|id=''' – required when {{para|last1}}-{{para|last4}} are the same as {{para|in1}}-{{para|in4}}; otherwise optional. See [[#Avoiding circular reference|Examples]]
: '''|in=''' – required, surname or last name of first editor or author of the work that includes the contribution; aliases: '''|in1='''
: '''|in2=''' – optional, surname or last name of second editor or author
: '''|in3=''' – optional, surname or last name of third editor or author
: '''|in4=''' – optional, surname or last name of fourth editor or author
: '''|last=''' – required, surname or last name of first author; aliases: '''|last1='''
:: '''|last''n''=''' – optional, contributor''n'' surname or last name; ''n'' begins at 2 and increases by 1 for each additional '''|last''n''=''';
: '''|last-author-amp=''': – optional, when set to '''yes''', inserts an ampersand between the last two contributor names
: '''|loc=''' – optional, other location identifier, displays after {{para|p}} or {{para|pp}}
: '''|mode=''' – controls rendered display to match that of adjacent CS1 or CS2 citations; defaults to CS1 style
:: '''|mode=cs2''' – mimic {{tlx|citation}} style (comma separators, no terminal punctuation, static text not capitalized)
: '''|name-list-format=''' – optional, controls contributor name list display style
:: '''|name-list-format=harv''' – mimic {{tld|sfn}} or {{tld|harv}} format (one to four last names); overrides '''|display-authors='''
: '''|p=''' – optional, single page number where cited material can be found
: '''|pp=''' – optional, multiple page numbers, page ranges, etc where cited material can be found
: '''|ps=''' – optional, sets terminal punctuation; default is full stop; overrides '''|mode=cs2'''; aliases: '''|postscript='''
:: '''|ps=none''' – renders output without terminal punctuation
: '''|url=''' – optional, URL of an online location where the text of the contribution can be found; aliases: '''|chapter-url''', '''|contribution-url'''
: '''|year=''' – required, publication year of the work that includes the contribution
===Examples===
When a Wikipedia article makes reference to a work that contains multiple chapters by different authors, bibliographies and reference sections can look rather cluttered:
* {{cite book |last=George |first=Ernest J. |last2=Read |first2=Ralph A. |last3=Johnson |first3=R. W. |last4=Ferber |first4=A. E. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Shelterbelts and Windbreaks |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=//archive.org/stream/yoa1957#page/n785/mode/1up |oclc=704186906}}
* {{cite book |last=Harper |first=V. L. |last2=Frank |first2=Bernard |last3=McQuilkin |first3=W. E. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Forest Practices and Productivity |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=//archive.org/stream/yoa1957#page/n803/mode/1up |oclc=704186906}}
* {{cite book |last=Stout |first=P. R. |last2=Johnson |first2=C. M. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Trace Elements |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=//archive.org/stream/yoa1957#page/n167/mode/1up |oclc=704186906}}
* {{cite book |last=Wadleigh |first=C. H. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Growth of Plants |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=//archive.org/stream/yoa1957#page/n57/mode/1up |oclc=704186906}}
As the list grows longer, the look becomes more cluttered with the unnecessarily repeated detail of full-length citations. With {{tld|harvc}} editors can link to shorter, less detailed contribution citations using standard implementations of {{tlx|sfn}} templates{{sfn|George|Read|Johnson|Ferber|1957}} and {{tlx|harv}} templates (like this: {{harv|Harper|Frank|McQuilkin|1957}} and also wrapped in {{tag|ref}} tags<ref>{{harvnb|Stout|Johnson|1957}}</ref>). {{tld|harvc}} may also be wrapped in {{tag|ref}} tags so that it becomes part of the article's References section.<ref>{{harvc|last=Benson|first=Ezra Taft|year=1957|chapter=Foreword|url=//archive.org/stream/yoa1957#page/n5/mode/1up|in=Stefferud|p=vi |loc=§2}}</ref>{{sfn|Wadleigh|1957}}
====Avoiding circular reference====
It may sometimes be necessary to cite a contribution of a source's editor or author such that {{para|last1}} through {{para|last4}} are the same as {{para|in1}} through {{para|in4}}, an editor's preface for example. Such citations can, depending on placement, cause {{tld|sfn}} or {{tld|harv}}-family references to link directly to the citation instead of to the {{tld|harvc}} template, or cause circular links ({{tld|harvc}} linking to itself because its <code>CITEREF</code> anchor identifier is the same as the citation's <code>CITEREF</code> anchor identifier). If {{para|id}} is set, {{tld|harvc}} will use it as an anchor identifier; if {{para|id}} is not set, {{tld|harvc}} will emit an error message when {{para|last1}} through {{para|last4}} are the same as {{para|in1}} through {{para|in4}}.
For example, to reference an editor's preface from article text, create a wikilink inside {{tag|ref}} tags:<ref>[[#Stefferud preface|Stefferud 1957]]</ref>
:<code><nowiki><ref>[[#Stefferud preface|Stefferud 1957]]</ref></nowiki></code>
Write a {{tld|harvc}} template with {{para|id|Stefferud preface}}
:<code><nowiki>{{harvc |last=Stefferud |first=A.|year=1957 |id=Stefferud preface |c=Preface |url=//archive.org/stream/yoa1957#page/n7/mode/1up |in=Stefferud}}</nowiki></code>
====Example references section====
{{reflist}}
====Example bibliography section====
* {{cite book |title=Soil: The Yearbook of Agriculture 1957 |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |url=//archive.org/stream/yoa1957#page/n2/mode/1up |oclc=704186906 |ref=harv}}
** {{harvc |last=George |first=Ernest J. |last2=Read |last3=Johnson |last4=Ferber |year=1957 |contribution=Shelterbelts and Windbreaks |url=//archive.org/stream/yoa1957#page/n785/mode/1up |in=Stefferud}}
** {{harvc |last=Harper |first=V. L. |last2=Frank |last3=McQuilkin |year=1957 |contribution=Forest Practices and Productivity |url=//archive.org/stream/yoa1957#page/n803/mode/1up |in=Stefferud}}
** {{harvc |last=Stefferud |first=A.|year=1957 |id=Stefferud preface |c=Preface |url=//archive.org/stream/yoa1957#page/n7/mode/1up |in=Stefferud}}
** {{harvc |last=Stout |first=P. R. |last2=Johnson |year=1957 |c=Trace Elements |url=//archive.org/stream/yoa1957#page/n167/mode/1up |in=Stefferud}}
** {{harvc |last=Wadleigh |first=C. H.|year=1957 |c=Growth of Plants |url=//archive.org/stream/yoa1957#page/n57/mode/1up |in=Stefferud}}
==Error messages==
{{tld|harvc}} emits these error messages:
:<span style="font-size:100%" class="error">harvc: author missing from source list.</span>
::the source list parameters {{para|in1}}, {{para|in2}}, {{para|in3}}, and {{para|in4}} form the template's <code>CITEREF</code> link to the full citation. All are not required but must be used in order without numerical gaps.
:<span style="font-size:100%" class="error">harvc: invalid |display-authors=.</span>
::the value assigned to {{para|display-authors}} must be a number greater than 0 or the keyword <code>etal</code>
:<span style="font-size:100%" class="error">harvc: invalid or missing year.</span>
::{{para|year}} is an integral part of the template's <code>CITEREF</code> anchor and link. The value of {{para|year}} must be a three- or four-digit number with an optional lowercase <code>CITEREF</code> disambiguator. When the source does not have an identifiable year, use {{para|year|n.d.}} or {{para|year|nd}}.
:<span style="font-size:100%" class="error">harvc: no authors in contributor list.</span>
::this error message indicates that {{tld|harvc}} can't find {{para|last}} or {{para|last1}} with an assigned value and so cannot make a usable <code>CITEREF</code> anchor without contributors. Add at least one {{para|last''n''}} parameter.
:<span style="font-size:100%" class="error">harvc: required contribution is missing.</span>
::this error message indicates that {{tld|harvc}} can't find any of {{para|c}}, {{para|chapter}}, or {{para|contribution}} with an assigned value
:<span style="font-size:100%" class="error">harvc: required |id= parameter missing.</span>
::this error message is emitted when the {{tld|harvc}} template's <code>CITEREF</code> anchor identifier would conflict with the long-form citation's <code>CITEREF</code> anchor identifier. See [[#Avoiding circular reference|Examples]]
== TemplateData ==
{{TemplateData header}}
<templatedata>
{
"description": "A method for referring to a contribution or chapter in a larger work when more than a few such referrals are required. harvc is not a substitute for a properly constructed citation.",
"params": {
"author-link": {
"aliases": ["author-link1"],
"description": "title of existing Wikipedia article about the contributor—not the contributor's website; do not wikilink",
"type": "string"
},
"author-linkn": {
"description": "title of existing Wikipedia article about contributor n; n begins at 2 and increases by 1 for each additional |author-linkn=",
"type": "string"
},
"author-mask1": {
"aliases": ["author-mask1"],
"description": "replaces name of the first contributor with m (commonly 2) em dashes",
"type": "string"
},
"author-maskn": {
"description": "replaces name of contributor n with m em dashes; n begins at 2 and increases by 1 for each additional |author-maskn=",
"type": "string"
},
"c": {
"aliases": ["chapter", " contribution"],
"description": "the title of chapter or contribution; rendered quoted in upright font",
"type": "string",
"required": true
},
"display-authors": {
"description": "defines how harvc displays the contributor list. When empty or omitted, contributor list mimics the style of cs1 and cs2 templates. When set to number n, displays n contributor first and last names; appends et al. when the template displays fewer contributors than are included in the template. When set to 'etal', displays all of the included contributor first and last names and appends et al.",
"type": "string"
},
"first": {
"aliases": ["first1"],
"description": "given or first name of the contribution's first author; requires |display-authors=",
"type": "string"
},
"firstn": {
"description": "contributor's given or first name; n begins at 2 and increases by 1 for each additional |firstn=",
"type": "string"
},
"id": {
"description": "required when |last1=-|last4= are the same as |in1=-|in4=; otherwise optional",
"type": "string"
},
"in": {
"aliases": ["in1"],
"description": "surname or last name of primary editor or author of the work that includes the contribution",
"type": "string",
"required": true
},
"in2": {
"description": "surname or last name of second editor or author",
"type": "string"
},
"in3": {
"description": "surname or last name of third editor or author",
"type": "string"
},
"in4": {
"description": "surname or last name of fourth editor or author",
"type": "string"
},
"last": {
"aliases": ["last1"],
"description": "surname or last name of primary author",
"type": "string",
"required": true
},
"lastn": {
"description": "contributor's surname or last name; n begins at 2 and increases by 1 for each additional |lastn=",
"type": "string",
},
"loc": {
"description": "other in-source location identifier, displays after |p= or |pp=",
"type": "string"
},
"mode": {
"description": "controls rendered display to match that of adjacent cs1 or cs2 citations; defaults to cs1 style; set |mode=cs2 to mimic citation template style",
"type": "string"
},
"p": {
"description": "single page number where cited material can be found",
"type": "string"
},
"pp": {
"description": "multiple page numbers, page ranges, etc where cited material can be found",
"type": "string"
},
"ps": {
"aliases": ["postscript"],
"description": "sets terminal punctuation; default is full stop for cs1 style, defaults to no punctuation when |mode=cs2; for no terminal punctuation use |ps=none",
"type": "string"
},
"url": {
"description": "URL of an online location where the text of the contribution can be found",
"type": "string"
},
"year": {
"description": "publication year of the work that includes the contribution",
"type": "date",
"required": true
}
}
}
</templatedata>
<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox | |
<!-- Categories below this line, please; interwikis at Wikidata -->
[[Category:Citation utility templates]]
}}</includeonly>
3d4h9w8cqmvjpl90dgbzwtm2ajsm4pl
801787
801786
2019-08-28T21:52:35Z
en>Trappist the monk
0
/* Error messages */ ce;
801787
wikitext
text/x-wiki
{{Documentation subpage}}
<!-- Place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
{{lua|Module:Harvc}}
This template is a citation hybrid that has characteristics of the long-form [[Help:Citation Style 1|cs1]] and [[Help:Citation Style 2|cs2]] and characteristics of short-form {{tlx|sfn}} and the {{tlx|harv}} families of templates. Its purpose is to provide a method that allows editors to refer to a contribution or chapter in a larger work when more than a few such referrals are required. {{tld|harvc}} is not a substitute for a properly constructed citation.
Short-form templates {{tld|sfn}} and {{tld|harv}} are often used to link from an article's references section to a long-form cs1|2 template in a bibliography section:
:{{tld|sfn}} → {{tlx|cite book}}
It is not uncommon for a source have multiple contributors. When it is necessary to refer to multiple contributions in the same source, repeating all of the bibliographic details in multiple long-form citation templates adds to references-section clutter. {{tld|harvc}} is designed to hold only the detail necessary to identify a contribution and link to the enclosing work's long-form citation where all of the bibliographic detail can be found:
:{{tld|sfn}} → {{tld|harvc}} → {{tld|cite book}}
== Usage ==
The minimal form is:
:<code><nowiki>{{harvc |last=contributor name |year=publication year |c=contribution title |in=source editor/author name}}</nowiki></code>
===Parameters===
{{tld|harvc}} creates a <code>CITEREF</code> anchor from one to four contribution or chapter author surnames ({{para|last''n''}}) and the value in {{para|year}}. This allows {{tld|harvc}} to be the target of a link created by {{tlx|sfn}} or {{tld|harv}} family templates. From {{para|in''n''}} and {{para|year}}, {{tld|harvc}} creates a CITEREF link similar to those created by {{tlx|harvnb}} and {{tlx|sfn}}
: '''|author-link=''' – optional, title of existing Wikipedia article about the first contributor—not the contributor's website; do not wikilink; alias: '''|author-link1='''
:: '''|author-link''n''=''' – optional, title of existing Wikipedia article about contributor''n''; choose ''n'' to match ''n'' in '''|last''n''='''
: '''|author-mask=''m''''' – optional, replaces name of the first contributor with ''m'' (commonly 2) em dashes; alias: '''|author-mask1='''
:: '''|author-mask''n''=''m''''' – optional, replaces name of contributor''n'' with ''m'' em dashes; choose ''n'' to match ''n'' in '''|last''n''='''
: '''|c=''' – required, the title of chapter or contribution; rendered quoted in upright font; aliases: '''|chapter=''', '''|contribution='''
: '''|display-authors=''' – optional, defines how {{tld|harvc}} displays the contributor list; ignored when '''|name-list-format=harv''':
:: {{para|display-authors}} – when empty or omitted, displays all contributor names in last/first format
:: {{para|display-authors|''n''}} – displays ''n'' contributor names in last/first format; appends et al. when ''n'' is less than the number of contributors included in the template
:: {{para|display-authors|etal}} – displays all contributor names in last/first format and appends et al.
: '''|first=''' – optional, first contributor's given or first name; alias: '''|first1='''
:: '''|first''n''=''' – optional, contributor''n'' given or first name; ''n'' begins at 2 and increases by 1 for each additional '''|first''n''='''
: '''|id=''' – required when {{para|last1}}-{{para|last4}} are the same as {{para|in1}}-{{para|in4}}; otherwise optional. See [[#Avoiding circular reference|Examples]]
: '''|in=''' – required, surname or last name of first editor or author of the work that includes the contribution; aliases: '''|in1='''
: '''|in2=''' – optional, surname or last name of second editor or author
: '''|in3=''' – optional, surname or last name of third editor or author
: '''|in4=''' – optional, surname or last name of fourth editor or author
: '''|last=''' – required, surname or last name of first author; aliases: '''|last1='''
:: '''|last''n''=''' – optional, contributor''n'' surname or last name; ''n'' begins at 2 and increases by 1 for each additional '''|last''n''=''';
: '''|last-author-amp=''': – optional, when set to '''yes''', inserts an ampersand between the last two contributor names
: '''|loc=''' – optional, other location identifier, displays after {{para|p}} or {{para|pp}}
: '''|mode=''' – controls rendered display to match that of adjacent CS1 or CS2 citations; defaults to CS1 style
:: '''|mode=cs2''' – mimic {{tlx|citation}} style (comma separators, no terminal punctuation, static text not capitalized)
: '''|name-list-format=''' – optional, controls contributor name list display style
:: '''|name-list-format=harv''' – mimic {{tld|sfn}} or {{tld|harv}} format (one to four last names); overrides '''|display-authors='''
: '''|p=''' – optional, single page number where cited material can be found
: '''|pp=''' – optional, multiple page numbers, page ranges, etc where cited material can be found
: '''|ps=''' – optional, sets terminal punctuation; default is full stop; overrides '''|mode=cs2'''; aliases: '''|postscript='''
:: '''|ps=none''' – renders output without terminal punctuation
: '''|url=''' – optional, URL of an online location where the text of the contribution can be found; aliases: '''|chapter-url''', '''|contribution-url'''
: '''|year=''' – required, publication year of the work that includes the contribution
===Examples===
When a Wikipedia article makes reference to a work that contains multiple chapters by different authors, bibliographies and reference sections can look rather cluttered:
* {{cite book |last=George |first=Ernest J. |last2=Read |first2=Ralph A. |last3=Johnson |first3=R. W. |last4=Ferber |first4=A. E. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Shelterbelts and Windbreaks |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=//archive.org/stream/yoa1957#page/n785/mode/1up |oclc=704186906}}
* {{cite book |last=Harper |first=V. L. |last2=Frank |first2=Bernard |last3=McQuilkin |first3=W. E. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Forest Practices and Productivity |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=//archive.org/stream/yoa1957#page/n803/mode/1up |oclc=704186906}}
* {{cite book |last=Stout |first=P. R. |last2=Johnson |first2=C. M. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Trace Elements |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=//archive.org/stream/yoa1957#page/n167/mode/1up |oclc=704186906}}
* {{cite book |last=Wadleigh |first=C. H. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Growth of Plants |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=//archive.org/stream/yoa1957#page/n57/mode/1up |oclc=704186906}}
As the list grows longer, the look becomes more cluttered with the unnecessarily repeated detail of full-length citations. With {{tld|harvc}} editors can link to shorter, less detailed contribution citations using standard implementations of {{tlx|sfn}} templates{{sfn|George|Read|Johnson|Ferber|1957}} and {{tlx|harv}} templates (like this: {{harv|Harper|Frank|McQuilkin|1957}} and also wrapped in {{tag|ref}} tags<ref>{{harvnb|Stout|Johnson|1957}}</ref>). {{tld|harvc}} may also be wrapped in {{tag|ref}} tags so that it becomes part of the article's References section.<ref>{{harvc|last=Benson|first=Ezra Taft|year=1957|chapter=Foreword|url=//archive.org/stream/yoa1957#page/n5/mode/1up|in=Stefferud|p=vi |loc=§2}}</ref>{{sfn|Wadleigh|1957}}
====Avoiding circular reference====
It may sometimes be necessary to cite a contribution of a source's editor or author such that {{para|last1}} through {{para|last4}} are the same as {{para|in1}} through {{para|in4}}, an editor's preface for example. Such citations can, depending on placement, cause {{tld|sfn}} or {{tld|harv}}-family references to link directly to the citation instead of to the {{tld|harvc}} template, or cause circular links ({{tld|harvc}} linking to itself because its <code>CITEREF</code> anchor identifier is the same as the citation's <code>CITEREF</code> anchor identifier). If {{para|id}} is set, {{tld|harvc}} will use it as an anchor identifier; if {{para|id}} is not set, {{tld|harvc}} will emit an error message when {{para|last1}} through {{para|last4}} are the same as {{para|in1}} through {{para|in4}}.
For example, to reference an editor's preface from article text, create a wikilink inside {{tag|ref}} tags:<ref>[[#Stefferud preface|Stefferud 1957]]</ref>
:<code><nowiki><ref>[[#Stefferud preface|Stefferud 1957]]</ref></nowiki></code>
Write a {{tld|harvc}} template with {{para|id|Stefferud preface}}
:<code><nowiki>{{harvc |last=Stefferud |first=A.|year=1957 |id=Stefferud preface |c=Preface |url=//archive.org/stream/yoa1957#page/n7/mode/1up |in=Stefferud}}</nowiki></code>
====Example references section====
{{reflist}}
====Example bibliography section====
* {{cite book |title=Soil: The Yearbook of Agriculture 1957 |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |url=//archive.org/stream/yoa1957#page/n2/mode/1up |oclc=704186906 |ref=harv}}
** {{harvc |last=George |first=Ernest J. |last2=Read |last3=Johnson |last4=Ferber |year=1957 |contribution=Shelterbelts and Windbreaks |url=//archive.org/stream/yoa1957#page/n785/mode/1up |in=Stefferud}}
** {{harvc |last=Harper |first=V. L. |last2=Frank |last3=McQuilkin |year=1957 |contribution=Forest Practices and Productivity |url=//archive.org/stream/yoa1957#page/n803/mode/1up |in=Stefferud}}
** {{harvc |last=Stefferud |first=A.|year=1957 |id=Stefferud preface |c=Preface |url=//archive.org/stream/yoa1957#page/n7/mode/1up |in=Stefferud}}
** {{harvc |last=Stout |first=P. R. |last2=Johnson |year=1957 |c=Trace Elements |url=//archive.org/stream/yoa1957#page/n167/mode/1up |in=Stefferud}}
** {{harvc |last=Wadleigh |first=C. H.|year=1957 |c=Growth of Plants |url=//archive.org/stream/yoa1957#page/n57/mode/1up |in=Stefferud}}
==Error messages==
{{tld|harvc}} emits these error messages:
:<span style="font-size:100%" class="error">harvc: {{para|anchor-year|plain=yes}} missing dab.</span>
::when used, {{para|anchor-year}} must include a single, lowercase letter disambiguator
:<span style="font-size:100%" class="error">harvc: author missing from source list.</span>
::the source list parameters {{para|in1}}, {{para|in2}}, {{para|in3}}, and {{para|in4}} form the template's <code>CITEREF</code> link to the full citation. All are not required but must be used in order without numerical gaps.
:<span style="font-size:100%" class="error">harvc: invalid {{para|anchor-year|plain=yes}}.</span>
::when used, {{para|anchor-year}} must be a three- or four-digit number and must have a lowercase <code>CITEREF</code> disambiguator. When the source does not have an identifiable year, use {{para|anchor-year|n.d.{{var|l}}}} or {{para|anchor-year|nd{{var|l}}}} with lowercase <code>CITEREF</code> disambiguator.
:<span style="font-size:100%" class="error">harvc: invalid {{para|display-authors|plain=yes}}.</span>
::the value assigned to {{para|display-authors}} must be a number greater than 0 or the keyword <code>etal</code>
:<span style="font-size:100%" class="error">harvc: invalid {{para|year|plain=yes}}.</span>
::{{para|year}} is an integral part of the template's <code>CITEREF</code> anchor and link. The value of {{para|year}} must be a three- or four-digit number with an optional lowercase <code>CITEREF</code> disambiguator. When the source does not have an identifiable year, use {{para|year|n.d.}} or {{para|year|nd}}.
:<span style="font-size:100%" class="error">harvc: missing {{para|year|plain=yes}}.</span>
::{{para|year}} is missing; the parameter is required.
:<span style="font-size:100%" class="error">harvc: no authors in contributor list.</span>
::this error message indicates that {{tld|harvc}} can't find any of {{para|last}}, {{para|last1}}, {{para|author}} or {{para|author1}} with an assigned value and so cannot make a usable <code>CITEREF</code> anchor. Add at least one of the listed parameters.
:<span style="font-size:100%" class="error">harvc: required contribution is missing.</span>
::this error message indicates that {{tld|harvc}} can't find any of {{para|c}}, {{para|chapter}}, or {{para|contribution}} with an assigned value
:<span style="font-size:100%" class="error">harvc: required {{para|id|plain=yes}} parameter missing.</span>
::this error message is emitted when the {{tld|harvc}} template's <code>CITEREF</code> anchor identifier would conflict with the long-form citation's <code>CITEREF</code> anchor identifier. See [[#Avoiding circular reference|Examples]]
:<span style="font-size:100%" class="error">harvc: {{para|year|plain=yes}} / {{para|anchor-year|plain=yes}} mismatch.</span>
::the year portion of {{para|anchor-year|YYYY{{var|l}}}} must match the year given in {{para|year|YYYY}}
== TemplateData ==
{{TemplateData header}}
<templatedata>
{
"description": "A method for referring to a contribution or chapter in a larger work when more than a few such referrals are required. harvc is not a substitute for a properly constructed citation.",
"params": {
"author-link": {
"aliases": ["author-link1"],
"description": "title of existing Wikipedia article about the contributor—not the contributor's website; do not wikilink",
"type": "string"
},
"author-linkn": {
"description": "title of existing Wikipedia article about contributor n; n begins at 2 and increases by 1 for each additional |author-linkn=",
"type": "string"
},
"author-mask1": {
"aliases": ["author-mask1"],
"description": "replaces name of the first contributor with m (commonly 2) em dashes",
"type": "string"
},
"author-maskn": {
"description": "replaces name of contributor n with m em dashes; n begins at 2 and increases by 1 for each additional |author-maskn=",
"type": "string"
},
"c": {
"aliases": ["chapter", " contribution"],
"description": "the title of chapter or contribution; rendered quoted in upright font",
"type": "string",
"required": true
},
"display-authors": {
"description": "defines how harvc displays the contributor list. When empty or omitted, contributor list mimics the style of cs1 and cs2 templates. When set to number n, displays n contributor first and last names; appends et al. when the template displays fewer contributors than are included in the template. When set to 'etal', displays all of the included contributor first and last names and appends et al.",
"type": "string"
},
"first": {
"aliases": ["first1"],
"description": "given or first name of the contribution's first author; requires |display-authors=",
"type": "string"
},
"firstn": {
"description": "contributor's given or first name; n begins at 2 and increases by 1 for each additional |firstn=",
"type": "string"
},
"id": {
"description": "required when |last1=-|last4= are the same as |in1=-|in4=; otherwise optional",
"type": "string"
},
"in": {
"aliases": ["in1"],
"description": "surname or last name of primary editor or author of the work that includes the contribution",
"type": "string",
"required": true
},
"in2": {
"description": "surname or last name of second editor or author",
"type": "string"
},
"in3": {
"description": "surname or last name of third editor or author",
"type": "string"
},
"in4": {
"description": "surname or last name of fourth editor or author",
"type": "string"
},
"last": {
"aliases": ["last1"],
"description": "surname or last name of primary author",
"type": "string",
"required": true
},
"lastn": {
"description": "contributor's surname or last name; n begins at 2 and increases by 1 for each additional |lastn=",
"type": "string",
},
"loc": {
"description": "other in-source location identifier, displays after |p= or |pp=",
"type": "string"
},
"mode": {
"description": "controls rendered display to match that of adjacent cs1 or cs2 citations; defaults to cs1 style; set |mode=cs2 to mimic citation template style",
"type": "string"
},
"p": {
"description": "single page number where cited material can be found",
"type": "string"
},
"pp": {
"description": "multiple page numbers, page ranges, etc where cited material can be found",
"type": "string"
},
"ps": {
"aliases": ["postscript"],
"description": "sets terminal punctuation; default is full stop for cs1 style, defaults to no punctuation when |mode=cs2; for no terminal punctuation use |ps=none",
"type": "string"
},
"url": {
"description": "URL of an online location where the text of the contribution can be found",
"type": "string"
},
"year": {
"description": "publication year of the work that includes the contribution",
"type": "date",
"required": true
}
}
}
</templatedata>
<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox | |
<!-- Categories below this line, please; interwikis at Wikidata -->
[[Category:Citation utility templates]]
}}</includeonly>
hzcrqrw1iwjbpd82e1lgxnqvo8n3vjh
801788
801787
2019-08-28T22:02:55Z
en>Trappist the monk
0
/* Parameters */ ce;
801788
wikitext
text/x-wiki
{{Documentation subpage}}
<!-- Place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
{{lua|Module:Harvc}}
This template is a citation hybrid that has characteristics of the long-form [[Help:Citation Style 1|cs1]] and [[Help:Citation Style 2|cs2]] and characteristics of short-form {{tlx|sfn}} and the {{tlx|harv}} families of templates. Its purpose is to provide a method that allows editors to refer to a contribution or chapter in a larger work when more than a few such referrals are required. {{tld|harvc}} is not a substitute for a properly constructed citation.
Short-form templates {{tld|sfn}} and {{tld|harv}} are often used to link from an article's references section to a long-form cs1|2 template in a bibliography section:
:{{tld|sfn}} → {{tlx|cite book}}
It is not uncommon for a source have multiple contributors. When it is necessary to refer to multiple contributions in the same source, repeating all of the bibliographic details in multiple long-form citation templates adds to references-section clutter. {{tld|harvc}} is designed to hold only the detail necessary to identify a contribution and link to the enclosing work's long-form citation where all of the bibliographic detail can be found:
:{{tld|sfn}} → {{tld|harvc}} → {{tld|cite book}}
== Usage ==
The minimal form is:
:<code><nowiki>{{harvc |last=contributor name |year=publication year |c=contribution title |in=source editor/author name}}</nowiki></code>
===Parameters===
{{tld|harvc}} creates a <code>CITEREF</code> anchor from one to four contribution or chapter author surnames ({{para|last''n''}}) and the value in {{para|year}}. This allows {{tld|harvc}} to be the target of a link created by {{tlx|sfn}} or {{tld|harv}} family templates. From {{para|in{{var|n}}}} and {{para|year}}, {{tld|harvc}} creates a CITEREF link similar to those created by {{tlx|harvnb}} and {{tlx|sfn}}
: '''|anchor-year=''' – optional, for use for author(s) with more than one contribution to the work; requires CITEREF disambiguator; see [[#More than one contribution|Examples]]
: '''|author-link=''' – optional, title of existing Wikipedia article about the first contributor—not the contributor's website; do not wikilink; alias: '''|author-link1='''
:: '''|author-link''n''=''' – optional, title of existing Wikipedia article about contributor''n''; choose ''n'' to match ''n'' in '''|last''n''='''
: '''|author-mask=''m''''' – optional, replaces name of the first contributor with ''m'' (commonly 2) em dashes; alias: '''|author-mask1='''
:: '''|author-mask''n''=''m''''' – optional, replaces name of contributor''n'' with ''m'' em dashes; choose ''n'' to match ''n'' in '''|last''n''='''
: '''|c=''' – required, the title of chapter or contribution; rendered quoted in upright font; aliases: '''|chapter=''', '''|contribution='''
: '''|display-authors=''' – optional, defines how {{tld|harvc}} displays the contributor list; ignored when '''|name-list-format=harv''':
:: {{para|display-authors}} – when empty or omitted, displays all contributor names in last/first format
:: {{para|display-authors|{{var|n}}}} – displays ''n'' contributor names in last/first format; appends et al. when ''n'' is less than the number of contributors included in the template
:: {{para|display-authors|etal}} – displays all contributor names in last/first format and appends et al.
: '''|first=''' – optional, first contributor's given or first name; alias: '''|first1='''
:: '''|first''n''=''' – optional, contributor''n'' given or first name; ''n'' begins at 2 and increases by 1 for each additional '''|first''n''='''
: '''|id=''' – required when {{para|last1}}-{{para|last4}} are the same as {{para|in1}}-{{para|in4}}; otherwise optional. See [[#Avoiding circular reference|Examples]]
: '''|in=''' – required, surname or last name of first editor or author of the work that includes the contribution; aliases: '''|in1='''
: '''|in2=''' – optional, surname or last name of second editor or author
: '''|in3=''' – optional, surname or last name of third editor or author
: '''|in4=''' – optional, surname or last name of fourth editor or author
: '''|last=''' – required, surname or last name of first author; aliases: '''|last1='''
:: '''|last''n''=''' – optional, contributor''n'' surname or last name; ''n'' begins at 2 and increases by 1 for each additional '''|last''n''=''';
: '''|last-author-amp=''': – optional, when set to '''yes''', inserts an ampersand between the last two contributor names
: '''|loc=''' – optional, other location identifier, displays after {{para|p}} or {{para|pp}}
: '''|mode=''' – controls rendered display to match that of adjacent CS1 or CS2 citations; defaults to CS1 style
:: '''|mode=cs2''' – mimic {{tlx|citation}} style (comma separators, no terminal punctuation, static text not capitalized)
: '''|name-list-format=''' – optional, controls contributor name list display style
:: '''|name-list-format=harv''' – mimic {{tld|sfn}} or {{tld|harv}} format (one to four last names); overrides '''|display-authors='''
: '''|nb=''' – optional, when set to <code>yes</code>, instructs {{tld|harvc}} to render source link with out parentheses around the year; same format as that produced by {{tlx|harvnb}}
: '''|p=''' – optional, single page number where cited material can be found
: '''|pp=''' – optional, multiple page numbers, page ranges, etc where cited material can be found
: '''|ps=''' – optional, sets terminal punctuation; default is full stop; overrides '''|mode=cs2'''; aliases: '''|postscript='''
:: '''|ps=none''' – renders output without terminal punctuation
: '''|url=''' – optional, URL of an online location where the text of the contribution can be found; aliases: '''|chapter-url''', '''|contribution-url'''
: '''|year=''' – required, publication year of the work that includes the contribution
===Examples===
When a Wikipedia article makes reference to a work that contains multiple chapters by different authors, bibliographies and reference sections can look rather cluttered:
* {{cite book |last=George |first=Ernest J. |last2=Read |first2=Ralph A. |last3=Johnson |first3=R. W. |last4=Ferber |first4=A. E. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Shelterbelts and Windbreaks |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=//archive.org/stream/yoa1957#page/n785/mode/1up |oclc=704186906}}
* {{cite book |last=Harper |first=V. L. |last2=Frank |first2=Bernard |last3=McQuilkin |first3=W. E. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Forest Practices and Productivity |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=//archive.org/stream/yoa1957#page/n803/mode/1up |oclc=704186906}}
* {{cite book |last=Stout |first=P. R. |last2=Johnson |first2=C. M. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Trace Elements |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=//archive.org/stream/yoa1957#page/n167/mode/1up |oclc=704186906}}
* {{cite book |last=Wadleigh |first=C. H. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Growth of Plants |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=//archive.org/stream/yoa1957#page/n57/mode/1up |oclc=704186906}}
As the list grows longer, the look becomes more cluttered with the unnecessarily repeated detail of full-length citations. With {{tld|harvc}} editors can link to shorter, less detailed contribution citations using standard implementations of {{tlx|sfn}} templates{{sfn|George|Read|Johnson|Ferber|1957}} and {{tlx|harv}} templates (like this: {{harv|Harper|Frank|McQuilkin|1957}} and also wrapped in {{tag|ref}} tags<ref>{{harvnb|Stout|Johnson|1957}}</ref>). {{tld|harvc}} may also be wrapped in {{tag|ref}} tags so that it becomes part of the article's References section.<ref>{{harvc|last=Benson|first=Ezra Taft|year=1957|chapter=Foreword|url=//archive.org/stream/yoa1957#page/n5/mode/1up|in=Stefferud|p=vi |loc=§2}}</ref>{{sfn|Wadleigh|1957}}
====Avoiding circular reference====
It may sometimes be necessary to cite a contribution of a source's editor or author such that {{para|last1}} through {{para|last4}} are the same as {{para|in1}} through {{para|in4}}, an editor's preface for example. Such citations can, depending on placement, cause {{tld|sfn}} or {{tld|harv}}-family references to link directly to the citation instead of to the {{tld|harvc}} template, or cause circular links ({{tld|harvc}} linking to itself because its <code>CITEREF</code> anchor identifier is the same as the citation's <code>CITEREF</code> anchor identifier). If {{para|id}} is set, {{tld|harvc}} will use it as an anchor identifier; if {{para|id}} is not set, {{tld|harvc}} will emit an error message when {{para|last1}} through {{para|last4}} are the same as {{para|in1}} through {{para|in4}}.
For example, to reference an editor's preface from article text, create a wikilink inside {{tag|ref}} tags:<ref>[[#Stefferud preface|Stefferud 1957]]</ref>
:<code><nowiki><ref>[[#Stefferud preface|Stefferud 1957]]</ref></nowiki></code>
Write a {{tld|harvc}} template with {{para|id|Stefferud preface}}
:<code><nowiki>{{harvc |last=Stefferud |first=A.|year=1957 |id=Stefferud preface |c=Preface |url=//archive.org/stream/yoa1957#page/n7/mode/1up |in=Stefferud}}</nowiki></code>
====Example references section====
{{reflist}}
====Example bibliography section====
* {{cite book |title=Soil: The Yearbook of Agriculture 1957 |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |url=//archive.org/stream/yoa1957#page/n2/mode/1up |oclc=704186906 |ref=harv}}
** {{harvc |last=George |first=Ernest J. |last2=Read |last3=Johnson |last4=Ferber |year=1957 |contribution=Shelterbelts and Windbreaks |url=//archive.org/stream/yoa1957#page/n785/mode/1up |in=Stefferud}}
** {{harvc |last=Harper |first=V. L. |last2=Frank |last3=McQuilkin |year=1957 |contribution=Forest Practices and Productivity |url=//archive.org/stream/yoa1957#page/n803/mode/1up |in=Stefferud}}
** {{harvc |last=Stefferud |first=A.|year=1957 |id=Stefferud preface |c=Preface |url=//archive.org/stream/yoa1957#page/n7/mode/1up |in=Stefferud}}
** {{harvc |last=Stout |first=P. R. |last2=Johnson |year=1957 |c=Trace Elements |url=//archive.org/stream/yoa1957#page/n167/mode/1up |in=Stefferud}}
** {{harvc |last=Wadleigh |first=C. H.|year=1957 |c=Growth of Plants |url=//archive.org/stream/yoa1957#page/n57/mode/1up |in=Stefferud}}
==Error messages==
{{tld|harvc}} emits these error messages:
:<span style="font-size:100%" class="error">harvc: {{para|anchor-year|plain=yes}} missing dab.</span>
::when used, {{para|anchor-year}} must include a single, lowercase letter disambiguator
:<span style="font-size:100%" class="error">harvc: author missing from source list.</span>
::the source list parameters {{para|in1}}, {{para|in2}}, {{para|in3}}, and {{para|in4}} form the template's <code>CITEREF</code> link to the full citation. All are not required but must be used in order without numerical gaps.
:<span style="font-size:100%" class="error">harvc: invalid {{para|anchor-year|plain=yes}}.</span>
::when used, {{para|anchor-year}} must be a three- or four-digit number and must have a lowercase <code>CITEREF</code> disambiguator. When the source does not have an identifiable year, use {{para|anchor-year|n.d.{{var|l}}}} or {{para|anchor-year|nd{{var|l}}}} with lowercase <code>CITEREF</code> disambiguator.
:<span style="font-size:100%" class="error">harvc: invalid {{para|display-authors|plain=yes}}.</span>
::the value assigned to {{para|display-authors}} must be a number greater than 0 or the keyword <code>etal</code>
:<span style="font-size:100%" class="error">harvc: invalid {{para|year|plain=yes}}.</span>
::{{para|year}} is an integral part of the template's <code>CITEREF</code> anchor and link. The value of {{para|year}} must be a three- or four-digit number with an optional lowercase <code>CITEREF</code> disambiguator. When the source does not have an identifiable year, use {{para|year|n.d.}} or {{para|year|nd}}.
:<span style="font-size:100%" class="error">harvc: missing {{para|year|plain=yes}}.</span>
::{{para|year}} is missing; the parameter is required.
:<span style="font-size:100%" class="error">harvc: no authors in contributor list.</span>
::this error message indicates that {{tld|harvc}} can't find any of {{para|last}}, {{para|last1}}, {{para|author}} or {{para|author1}} with an assigned value and so cannot make a usable <code>CITEREF</code> anchor. Add at least one of the listed parameters.
:<span style="font-size:100%" class="error">harvc: required contribution is missing.</span>
::this error message indicates that {{tld|harvc}} can't find any of {{para|c}}, {{para|chapter}}, or {{para|contribution}} with an assigned value
:<span style="font-size:100%" class="error">harvc: required {{para|id|plain=yes}} parameter missing.</span>
::this error message is emitted when the {{tld|harvc}} template's <code>CITEREF</code> anchor identifier would conflict with the long-form citation's <code>CITEREF</code> anchor identifier. See [[#Avoiding circular reference|Examples]]
:<span style="font-size:100%" class="error">harvc: {{para|year|plain=yes}} / {{para|anchor-year|plain=yes}} mismatch.</span>
::the year portion of {{para|anchor-year|YYYY{{var|l}}}} must match the year given in {{para|year|YYYY}}
== TemplateData ==
{{TemplateData header}}
<templatedata>
{
"description": "A method for referring to a contribution or chapter in a larger work when more than a few such referrals are required. harvc is not a substitute for a properly constructed citation.",
"params": {
"author-link": {
"aliases": ["author-link1"],
"description": "title of existing Wikipedia article about the contributor—not the contributor's website; do not wikilink",
"type": "string"
},
"author-linkn": {
"description": "title of existing Wikipedia article about contributor n; n begins at 2 and increases by 1 for each additional |author-linkn=",
"type": "string"
},
"author-mask1": {
"aliases": ["author-mask1"],
"description": "replaces name of the first contributor with m (commonly 2) em dashes",
"type": "string"
},
"author-maskn": {
"description": "replaces name of contributor n with m em dashes; n begins at 2 and increases by 1 for each additional |author-maskn=",
"type": "string"
},
"c": {
"aliases": ["chapter", " contribution"],
"description": "the title of chapter or contribution; rendered quoted in upright font",
"type": "string",
"required": true
},
"display-authors": {
"description": "defines how harvc displays the contributor list. When empty or omitted, contributor list mimics the style of cs1 and cs2 templates. When set to number n, displays n contributor first and last names; appends et al. when the template displays fewer contributors than are included in the template. When set to 'etal', displays all of the included contributor first and last names and appends et al.",
"type": "string"
},
"first": {
"aliases": ["first1"],
"description": "given or first name of the contribution's first author; requires |display-authors=",
"type": "string"
},
"firstn": {
"description": "contributor's given or first name; n begins at 2 and increases by 1 for each additional |firstn=",
"type": "string"
},
"id": {
"description": "required when |last1=-|last4= are the same as |in1=-|in4=; otherwise optional",
"type": "string"
},
"in": {
"aliases": ["in1"],
"description": "surname or last name of primary editor or author of the work that includes the contribution",
"type": "string",
"required": true
},
"in2": {
"description": "surname or last name of second editor or author",
"type": "string"
},
"in3": {
"description": "surname or last name of third editor or author",
"type": "string"
},
"in4": {
"description": "surname or last name of fourth editor or author",
"type": "string"
},
"last": {
"aliases": ["last1"],
"description": "surname or last name of primary author",
"type": "string",
"required": true
},
"lastn": {
"description": "contributor's surname or last name; n begins at 2 and increases by 1 for each additional |lastn=",
"type": "string",
},
"loc": {
"description": "other in-source location identifier, displays after |p= or |pp=",
"type": "string"
},
"mode": {
"description": "controls rendered display to match that of adjacent cs1 or cs2 citations; defaults to cs1 style; set |mode=cs2 to mimic citation template style",
"type": "string"
},
"p": {
"description": "single page number where cited material can be found",
"type": "string"
},
"pp": {
"description": "multiple page numbers, page ranges, etc where cited material can be found",
"type": "string"
},
"ps": {
"aliases": ["postscript"],
"description": "sets terminal punctuation; default is full stop for cs1 style, defaults to no punctuation when |mode=cs2; for no terminal punctuation use |ps=none",
"type": "string"
},
"url": {
"description": "URL of an online location where the text of the contribution can be found",
"type": "string"
},
"year": {
"description": "publication year of the work that includes the contribution",
"type": "date",
"required": true
}
}
}
</templatedata>
<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox | |
<!-- Categories below this line, please; interwikis at Wikidata -->
[[Category:Citation utility templates]]
}}</includeonly>
ecefgt196phuk5eitkff4t3vbe97950
801789
801788
2019-08-28T23:24:42Z
en>Trappist the monk
0
/* Examples */ ce;
801789
wikitext
text/x-wiki
{{Documentation subpage}}
<!-- Place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
{{lua|Module:Harvc}}
This template is a citation hybrid that has characteristics of the long-form [[Help:Citation Style 1|cs1]] and [[Help:Citation Style 2|cs2]] and characteristics of short-form {{tlx|sfn}} and the {{tlx|harv}} families of templates. Its purpose is to provide a method that allows editors to refer to a contribution or chapter in a larger work when more than a few such referrals are required. {{tld|harvc}} is not a substitute for a properly constructed citation.
Short-form templates {{tld|sfn}} and {{tld|harv}} are often used to link from an article's references section to a long-form cs1|2 template in a bibliography section:
:{{tld|sfn}} → {{tlx|cite book}}
It is not uncommon for a source have multiple contributors. When it is necessary to refer to multiple contributions in the same source, repeating all of the bibliographic details in multiple long-form citation templates adds to references-section clutter. {{tld|harvc}} is designed to hold only the detail necessary to identify a contribution and link to the enclosing work's long-form citation where all of the bibliographic detail can be found:
:{{tld|sfn}} → {{tld|harvc}} → {{tld|cite book}}
== Usage ==
The minimal form is:
:<code><nowiki>{{harvc |last=contributor name |year=publication year |c=contribution title |in=source editor/author name}}</nowiki></code>
===Parameters===
{{tld|harvc}} creates a <code>CITEREF</code> anchor from one to four contribution or chapter author surnames ({{para|last''n''}}) and the value in {{para|year}}. This allows {{tld|harvc}} to be the target of a link created by {{tlx|sfn}} or {{tld|harv}} family templates. From {{para|in{{var|n}}}} and {{para|year}}, {{tld|harvc}} creates a CITEREF link similar to those created by {{tlx|harvnb}} and {{tlx|sfn}}
: '''|anchor-year=''' – optional, for use for author(s) with more than one contribution to the work; requires CITEREF disambiguator; see [[#More than one contribution|Examples]]
: '''|author-link=''' – optional, title of existing Wikipedia article about the first contributor—not the contributor's website; do not wikilink; alias: '''|author-link1='''
:: '''|author-link''n''=''' – optional, title of existing Wikipedia article about contributor''n''; choose ''n'' to match ''n'' in '''|last''n''='''
: '''|author-mask=''m''''' – optional, replaces name of the first contributor with ''m'' (commonly 2) em dashes; alias: '''|author-mask1='''
:: '''|author-mask''n''=''m''''' – optional, replaces name of contributor''n'' with ''m'' em dashes; choose ''n'' to match ''n'' in '''|last''n''='''
: '''|c=''' – required, the title of chapter or contribution; rendered quoted in upright font; aliases: '''|chapter=''', '''|contribution='''
: '''|display-authors=''' – optional, defines how {{tld|harvc}} displays the contributor list; ignored when '''|name-list-format=harv''':
:: {{para|display-authors}} – when empty or omitted, displays all contributor names in last/first format
:: {{para|display-authors|{{var|n}}}} – displays ''n'' contributor names in last/first format; appends et al. when ''n'' is less than the number of contributors included in the template
:: {{para|display-authors|etal}} – displays all contributor names in last/first format and appends et al.
: '''|first=''' – optional, first contributor's given or first name; alias: '''|first1='''
:: '''|first''n''=''' – optional, contributor''n'' given or first name; ''n'' begins at 2 and increases by 1 for each additional '''|first''n''='''
: '''|id=''' – required when {{para|last1}}-{{para|last4}} are the same as {{para|in1}}-{{para|in4}}; otherwise optional. See [[#Avoiding circular reference|Examples]]
: '''|in=''' – required, surname or last name of first editor or author of the work that includes the contribution; aliases: '''|in1='''
: '''|in2=''' – optional, surname or last name of second editor or author
: '''|in3=''' – optional, surname or last name of third editor or author
: '''|in4=''' – optional, surname or last name of fourth editor or author
: '''|last=''' – required, surname or last name of first author; aliases: '''|last1='''
:: '''|last''n''=''' – optional, contributor''n'' surname or last name; ''n'' begins at 2 and increases by 1 for each additional '''|last''n''=''';
: '''|last-author-amp=''': – optional, when set to '''yes''', inserts an ampersand between the last two contributor names
: '''|loc=''' – optional, other location identifier, displays after {{para|p}} or {{para|pp}}
: '''|mode=''' – controls rendered display to match that of adjacent CS1 or CS2 citations; defaults to CS1 style
:: '''|mode=cs2''' – mimic {{tlx|citation}} style (comma separators, no terminal punctuation, static text not capitalized)
: '''|name-list-format=''' – optional, controls contributor name list display style
:: '''|name-list-format=harv''' – mimic {{tld|sfn}} or {{tld|harv}} format (one to four last names); overrides '''|display-authors='''
: '''|nb=''' – optional, when set to <code>yes</code>, instructs {{tld|harvc}} to render source link with out parentheses around the year; same format as that produced by {{tlx|harvnb}}
: '''|p=''' – optional, single page number where cited material can be found
: '''|pp=''' – optional, multiple page numbers, page ranges, etc where cited material can be found
: '''|ps=''' – optional, sets terminal punctuation; default is full stop; overrides '''|mode=cs2'''; aliases: '''|postscript='''
:: '''|ps=none''' – renders output without terminal punctuation
: '''|url=''' – optional, URL of an online location where the text of the contribution can be found; aliases: '''|chapter-url''', '''|contribution-url'''
: '''|year=''' – required, publication year of the work that includes the contribution
===Examples===
When a Wikipedia article makes reference to a work that contains multiple chapters by different authors, bibliographies and reference sections can look rather cluttered:
* {{cite book |last=George |first=Ernest J. |last2=Read |first2=Ralph A. |last3=Johnson |first3=R. W. |last4=Ferber |first4=A. E. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Shelterbelts and Windbreaks |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=//archive.org/stream/yoa1957#page/n785/mode/1up |oclc=704186906}}
* {{cite book |last=Harper |first=V. L. |last2=Frank |first2=Bernard |last3=McQuilkin |first3=W. E. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Forest Practices and Productivity |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=//archive.org/stream/yoa1957#page/n803/mode/1up |oclc=704186906}}
* {{cite book |last=Stout |first=P. R. |last2=Johnson |first2=C. M. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Trace Elements |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=//archive.org/stream/yoa1957#page/n167/mode/1up |oclc=704186906}}
* {{cite book |last=Wadleigh |first=C. H. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Growth of Plants |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=//archive.org/stream/yoa1957#page/n57/mode/1up |oclc=704186906}}
As the list grows longer, the look becomes more cluttered with the unnecessarily repeated detail of full-length citations. With {{tld|harvc}} editors can link to shorter, less detailed contribution citations using standard implementations of {{tlx|sfn}} templates{{sfn|George|Read|Johnson|Ferber|1957}} and {{tlx|harv}} templates (like this: {{harv|Harper|Frank|McQuilkin|1957}} and also wrapped in {{tag|ref}} tags<ref>{{harvnb|Stout|Johnson|1957}}</ref>). {{tld|harvc}} may also be wrapped in {{tag|ref}} tags so that it becomes part of the article's References section.<ref>{{harvc|last=Benson|first=Ezra Taft|year=1957|chapter=Foreword|url=//archive.org/stream/yoa1957#page/n5/mode/1up|in=Stefferud|p=vi |loc=§2}}</ref>{{sfn|Wadleigh|1957}}
====Avoiding circular reference====
It may sometimes be necessary to cite a contribution of a source's editor or author such that {{para|last1}} through {{para|last4}} are the same as {{para|in1}} through {{para|in4}}, an editor's preface for example. Such citations can, depending on placement, cause {{tld|sfn}} or {{tld|harv}}-family references to link directly to the citation instead of to the {{tld|harvc}} template, or cause circular links ({{tld|harvc}} linking to itself because its <code>CITEREF</code> anchor identifier is the same as the citation's <code>CITEREF</code> anchor identifier). If {{para|id}} is set, {{tld|harvc}} will use it as an anchor identifier; if {{para|id}} is not set, {{tld|harvc}} will emit an error message when {{para|last1}} through {{para|last4}} are the same as {{para|in1}} through {{para|in4}}.
For example, to reference an editor's preface from article text, create a wikilink inside {{tag|ref}} tags:<ref>[[#Stefferud preface|Stefferud 1957]]</ref>
:<code><nowiki><ref>[[#Stefferud preface|Stefferud 1957]]</ref></nowiki></code>
Write a {{tld|harvc}} template with {{para|id|Stefferud preface}}
:<code><nowiki>{{harvc |last=Stefferud |first=A.|year=1957 |id=Stefferud preface |c=Preface |url=//archive.org/stream/yoa1957#page/n7/mode/1up |in=Stefferud}}</nowiki></code>
====Example references section====
{{reflist}}
====Example bibliography section====
* {{cite book |title=Soil: The Yearbook of Agriculture 1957 |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |url=//archive.org/stream/yoa1957#page/n2/mode/1up |oclc=704186906 |ref=harv}}
** {{harvc |last=George |first=Ernest J. |last2=Read |last3=Johnson |last4=Ferber |year=1957 |contribution=Shelterbelts and Windbreaks |url=//archive.org/stream/yoa1957#page/n785/mode/1up |in=Stefferud}}
** {{harvc |last=Harper |first=V. L. |last2=Frank |last3=McQuilkin |year=1957 |contribution=Forest Practices and Productivity |url=//archive.org/stream/yoa1957#page/n803/mode/1up |in=Stefferud}}
** {{harvc |last=Stefferud |first=A.|year=1957 |id=Stefferud preface |c=Preface |url=//archive.org/stream/yoa1957#page/n7/mode/1up |in=Stefferud}}
** {{harvc |last=Stout |first=P. R. |last2=Johnson |year=1957 |c=Trace Elements |url=//archive.org/stream/yoa1957#page/n167/mode/1up |in=Stefferud}}
** {{harvc |last=Wadleigh |first=C. H.|year=1957 |c=Growth of Plants |url=//archive.org/stream/yoa1957#page/n57/mode/1up |in=Stefferud}}
====More than one contribution====
There are times when an author or authors will have contributed more than once to a work. When this occurs, it is necessary to disambiguate the CITEREF links from the {{tld|harv}} or {{tld|sfn}} templates to the CITEREF id of the appropriate {{tld|harvc}} template.
:{{tld|harv|Author|YYYYa}} → {{tld|harvc|Author|Contribution 1|YYYYa}} → {{tld|citation|...}}}
:{{tld|harv|Author|YYYYb}} → {{tld|harvc|Author|Contribution 2|YYYYb}} ↑
In this example, author David Hunt contributed two appendices to ''Christmas Cacti: The Genus ''Schlumbergera'' and Its Hybrids''.
There are two {{tlx|harvnb}} templates that are disambiguated:
:<code><nowiki>{{harvnb |Hunt |1995a}}</nowiki></code> → {{harvnb |Hunt |1995a}}
:<code><nowiki>{{harvnb |Hunt |1995b}}</nowiki></code> → {{harvnb |Hunt |1995b}}
These link to two {{tld|harvc}} templates which use {{para|anchor-year}} for their CITEREF id and for the date in the {{tld|harvc}} rendering as a visual aid for readers:
*<code><nowiki>{{harvc |in=McMillan |in2=Horobin |last=Hunt |first=David |c=Appendix I Names and synonyms of the species, subspecies and interspecific hybrids |year=1995 |anchor-year=1995a |mode=cs2 |nb=yes}}</nowiki></code>
*:{{harvc |in=McMillan |in2=Horobin |last=Hunt |first=David |c=Appendix I Names and synonyms of the species, subspecies and interspecific hybrids |year=1995 |anchor-year=1995a |mode=cs2 |nb=yes}}
*<code><nowiki>{{harvc |in=McMillan |in2=Horobin |last=Hunt |first=David |c=Appendix III Excerpts from a Brazilian diary |year=1995 |anchor-year=1995b |mode=cs2 |nb=yes}}</nowiki></code>
*:{{harvc |in=McMillan |in2=Horobin |last=Hunt |first=David |c=Appendix III Excerpts from a Brazilian diary |year=1995 |anchor-year=1995b |mode=cs2 |nb=yes}}
and the single {{tld|citation}} template:
*<code><nowiki>{{Citation |last=McMillan |first=A. J. S. |last2=Horobin |first2=J. F. |year=1995 |title=Christmas Cacti: The Genus ''Schlumbergera'' and Its Hybrids |edition=p/b |publication-place=Sherbourne, Dorset, UK |publisher=David Hunt |isbn=978-0-9517234-6-3}}</nowiki></code>
*:{{Citation |last=McMillan |first=A. J. S. |last2=Horobin |first2=J. F. |year=1995 |title=Christmas Cacti: The Genus ''Schlumbergera'' and Its Hybrids |edition=p/b |publication-place=Sherbourne, Dorset, UK |publisher=David Hunt |isbn=978-0-9517234-6-3}}
==Error messages==
{{tld|harvc}} emits these error messages:
:<span style="font-size:100%" class="error">harvc: {{para|anchor-year|plain=yes}} missing dab.</span>
::when used, {{para|anchor-year}} must include a single, lowercase letter disambiguator
:<span style="font-size:100%" class="error">harvc: author missing from source list.</span>
::the source list parameters {{para|in1}}, {{para|in2}}, {{para|in3}}, and {{para|in4}} form the template's <code>CITEREF</code> link to the full citation. All are not required but must be used in order without numerical gaps.
:<span style="font-size:100%" class="error">harvc: invalid {{para|anchor-year|plain=yes}}.</span>
::when used, {{para|anchor-year}} must be a three- or four-digit number and must have a lowercase <code>CITEREF</code> disambiguator. When the source does not have an identifiable year, use {{para|anchor-year|n.d.{{var|l}}}} or {{para|anchor-year|nd{{var|l}}}} with lowercase <code>CITEREF</code> disambiguator.
:<span style="font-size:100%" class="error">harvc: invalid {{para|display-authors|plain=yes}}.</span>
::the value assigned to {{para|display-authors}} must be a number greater than 0 or the keyword <code>etal</code>
:<span style="font-size:100%" class="error">harvc: invalid {{para|year|plain=yes}}.</span>
::{{para|year}} is an integral part of the template's <code>CITEREF</code> anchor and link. The value of {{para|year}} must be a three- or four-digit number with an optional lowercase <code>CITEREF</code> disambiguator. When the source does not have an identifiable year, use {{para|year|n.d.}} or {{para|year|nd}}.
:<span style="font-size:100%" class="error">harvc: missing {{para|year|plain=yes}}.</span>
::{{para|year}} is missing; the parameter is required.
:<span style="font-size:100%" class="error">harvc: no authors in contributor list.</span>
::this error message indicates that {{tld|harvc}} can't find any of {{para|last}}, {{para|last1}}, {{para|author}} or {{para|author1}} with an assigned value and so cannot make a usable <code>CITEREF</code> anchor. Add at least one of the listed parameters.
:<span style="font-size:100%" class="error">harvc: required contribution is missing.</span>
::this error message indicates that {{tld|harvc}} can't find any of {{para|c}}, {{para|chapter}}, or {{para|contribution}} with an assigned value
:<span style="font-size:100%" class="error">harvc: required {{para|id|plain=yes}} parameter missing.</span>
::this error message is emitted when the {{tld|harvc}} template's <code>CITEREF</code> anchor identifier would conflict with the long-form citation's <code>CITEREF</code> anchor identifier. See [[#Avoiding circular reference|Examples]]
:<span style="font-size:100%" class="error">harvc: {{para|year|plain=yes}} / {{para|anchor-year|plain=yes}} mismatch.</span>
::the year portion of {{para|anchor-year|YYYY{{var|l}}}} must match the year given in {{para|year|YYYY}}
== TemplateData ==
{{TemplateData header}}
<templatedata>
{
"description": "A method for referring to a contribution or chapter in a larger work when more than a few such referrals are required. harvc is not a substitute for a properly constructed citation.",
"params": {
"author-link": {
"aliases": ["author-link1"],
"description": "title of existing Wikipedia article about the contributor—not the contributor's website; do not wikilink",
"type": "string"
},
"author-linkn": {
"description": "title of existing Wikipedia article about contributor n; n begins at 2 and increases by 1 for each additional |author-linkn=",
"type": "string"
},
"author-mask1": {
"aliases": ["author-mask1"],
"description": "replaces name of the first contributor with m (commonly 2) em dashes",
"type": "string"
},
"author-maskn": {
"description": "replaces name of contributor n with m em dashes; n begins at 2 and increases by 1 for each additional |author-maskn=",
"type": "string"
},
"c": {
"aliases": ["chapter", " contribution"],
"description": "the title of chapter or contribution; rendered quoted in upright font",
"type": "string",
"required": true
},
"display-authors": {
"description": "defines how harvc displays the contributor list. When empty or omitted, contributor list mimics the style of cs1 and cs2 templates. When set to number n, displays n contributor first and last names; appends et al. when the template displays fewer contributors than are included in the template. When set to 'etal', displays all of the included contributor first and last names and appends et al.",
"type": "string"
},
"first": {
"aliases": ["first1"],
"description": "given or first name of the contribution's first author; requires |display-authors=",
"type": "string"
},
"firstn": {
"description": "contributor's given or first name; n begins at 2 and increases by 1 for each additional |firstn=",
"type": "string"
},
"id": {
"description": "required when |last1=-|last4= are the same as |in1=-|in4=; otherwise optional",
"type": "string"
},
"in": {
"aliases": ["in1"],
"description": "surname or last name of primary editor or author of the work that includes the contribution",
"type": "string",
"required": true
},
"in2": {
"description": "surname or last name of second editor or author",
"type": "string"
},
"in3": {
"description": "surname or last name of third editor or author",
"type": "string"
},
"in4": {
"description": "surname or last name of fourth editor or author",
"type": "string"
},
"last": {
"aliases": ["last1"],
"description": "surname or last name of primary author",
"type": "string",
"required": true
},
"lastn": {
"description": "contributor's surname or last name; n begins at 2 and increases by 1 for each additional |lastn=",
"type": "string",
},
"loc": {
"description": "other in-source location identifier, displays after |p= or |pp=",
"type": "string"
},
"mode": {
"description": "controls rendered display to match that of adjacent cs1 or cs2 citations; defaults to cs1 style; set |mode=cs2 to mimic citation template style",
"type": "string"
},
"p": {
"description": "single page number where cited material can be found",
"type": "string"
},
"pp": {
"description": "multiple page numbers, page ranges, etc where cited material can be found",
"type": "string"
},
"ps": {
"aliases": ["postscript"],
"description": "sets terminal punctuation; default is full stop for cs1 style, defaults to no punctuation when |mode=cs2; for no terminal punctuation use |ps=none",
"type": "string"
},
"url": {
"description": "URL of an online location where the text of the contribution can be found",
"type": "string"
},
"year": {
"description": "publication year of the work that includes the contribution",
"type": "date",
"required": true
}
}
}
</templatedata>
<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox | |
<!-- Categories below this line, please; interwikis at Wikidata -->
[[Category:Citation utility templates]]
}}</includeonly>
95zxnhu6lnllzf5x6yybud0wnc2zytn
801790
801789
2019-09-13T11:02:40Z
en>Trappist the monk
0
/* Parameters */ ce;
801790
wikitext
text/x-wiki
{{Documentation subpage}}
<!-- Place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
{{lua|Module:Harvc}}
This template is a citation hybrid that has characteristics of the long-form [[Help:Citation Style 1|cs1]] and [[Help:Citation Style 2|cs2]] and characteristics of short-form {{tlx|sfn}} and the {{tlx|harv}} families of templates. Its purpose is to provide a method that allows editors to refer to a contribution or chapter in a larger work when more than a few such referrals are required. {{tld|harvc}} is not a substitute for a properly constructed citation.
Short-form templates {{tld|sfn}} and {{tld|harv}} are often used to link from an article's references section to a long-form cs1|2 template in a bibliography section:
:{{tld|sfn}} → {{tlx|cite book}}
It is not uncommon for a source have multiple contributors. When it is necessary to refer to multiple contributions in the same source, repeating all of the bibliographic details in multiple long-form citation templates adds to references-section clutter. {{tld|harvc}} is designed to hold only the detail necessary to identify a contribution and link to the enclosing work's long-form citation where all of the bibliographic detail can be found:
:{{tld|sfn}} → {{tld|harvc}} → {{tld|cite book}}
== Usage ==
The minimal form is:
:<code><nowiki>{{harvc |last=contributor name |year=publication year |c=contribution title |in=source editor/author name}}</nowiki></code>
===Parameters===
{{tld|harvc}} creates a <code>CITEREF</code> anchor from one to four contribution or chapter author surnames ({{para|last''n''}}) and the value in {{para|year}}. This allows {{tld|harvc}} to be the target of a link created by {{tlx|sfn}} or {{tld|harv}} family templates. From {{para|in{{var|n}}}} and {{para|year}}, {{tld|harvc}} creates a CITEREF link similar to those created by {{tlx|harvnb}} and {{tlx|sfn}}
: '''|anchor-year=''' – optional, for use for author(s) with more than one contribution to the work; requires CITEREF disambiguator; see [[#More than one contribution|Examples]]
: '''|author-link=''' – optional, title of existing Wikipedia article about the first contributor—not the contributor's website; do not wikilink; alias: '''|author-link1='''
:: '''|author-link''n''=''' – optional, title of existing Wikipedia article about contributor''n''; choose ''n'' to match ''n'' in '''|last''n''='''
: '''|author-mask=''m''''' – optional, replaces name of the first contributor with ''m'' (commonly 2) em dashes; alias: '''|author-mask1='''
:: '''|author-mask''n''=''m''''' – optional, replaces name of contributor''n'' with ''m'' em dashes; choose ''n'' to match ''n'' in '''|last''n''='''
:: '''|author-mask{{var|n}}=<{{var|text}}>''' – optional, replaces name of contributor''n'' with <{{var|text}}>
: '''|c=''' – required, the title of chapter or contribution; rendered quoted in upright font; aliases: '''|chapter=''', '''|contribution='''
: '''|display-authors=''' – optional, defines how {{tld|harvc}} displays the contributor list; ignored when '''|name-list-format=harv''':
:: {{para|display-authors}} – when empty or omitted, displays all contributor names in last/first format
:: {{para|display-authors|{{var|n}}}} – displays ''n'' contributor names in last/first format; appends et al. when ''n'' is less than the number of contributors included in the template
:: {{para|display-authors|etal}} – displays all contributor names in last/first format and appends et al.
: '''|first=''' – optional, first contributor's given or first name; alias: '''|first1='''
:: '''|first''n''=''' – optional, contributor''n'' given or first name; ''n'' begins at 2 and increases by 1 for each additional '''|first''n''='''
: '''|id=''' – required when {{para|last1}}-{{para|last4}} are the same as {{para|in1}}-{{para|in4}}; otherwise optional. See [[#Avoiding circular reference|Examples]]
: '''|in=''' – required, surname or last name of first editor or author of the work that includes the contribution; aliases: '''|in1='''
: '''|in2=''' – optional, surname or last name of second editor or author
: '''|in3=''' – optional, surname or last name of third editor or author
: '''|in4=''' – optional, surname or last name of fourth editor or author
: '''|last=''' – required, surname or last name of first author; aliases: '''|last1='''
:: '''|last''n''=''' – optional, contributor''n'' surname or last name; ''n'' begins at 2 and increases by 1 for each additional '''|last''n''=''';
: '''|last-author-amp=''': – optional, when set to '''yes''', inserts an ampersand between the last two contributor names
: '''|loc=''' – optional, other location identifier, displays after {{para|p}} or {{para|pp}}
: '''|mode=''' – controls rendered display to match that of adjacent CS1 or CS2 citations; defaults to CS1 style
:: '''|mode=cs2''' – mimic {{tlx|citation}} style (comma separators, no terminal punctuation, static text not capitalized)
: '''|name-list-format=''' – optional, controls contributor name list display style
:: '''|name-list-format=harv''' – mimic {{tld|sfn}} or {{tld|harv}} format (one to four last names); overrides '''|display-authors='''
: '''|nb=''' – optional, when set to <code>yes</code>, instructs {{tld|harvc}} to render source link with out parentheses around the year; same format as that produced by {{tlx|harvnb}}
: '''|p=''' – optional, single page number where cited material can be found
: '''|pp=''' – optional, multiple page numbers, page ranges, etc where cited material can be found
: '''|ps=''' – optional, sets terminal punctuation; default is full stop; overrides '''|mode=cs2'''; aliases: '''|postscript='''
:: '''|ps=none''' – renders output without terminal punctuation
: '''|url=''' – optional, URL of an online location where the text of the contribution can be found; aliases: '''|chapter-url''', '''|contribution-url'''
: '''|year=''' – required, publication year of the work that includes the contribution
===Examples===
When a Wikipedia article makes reference to a work that contains multiple chapters by different authors, bibliographies and reference sections can look rather cluttered:
* {{cite book |last=George |first=Ernest J. |last2=Read |first2=Ralph A. |last3=Johnson |first3=R. W. |last4=Ferber |first4=A. E. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Shelterbelts and Windbreaks |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=//archive.org/stream/yoa1957#page/n785/mode/1up |oclc=704186906}}
* {{cite book |last=Harper |first=V. L. |last2=Frank |first2=Bernard |last3=McQuilkin |first3=W. E. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Forest Practices and Productivity |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=//archive.org/stream/yoa1957#page/n803/mode/1up |oclc=704186906}}
* {{cite book |last=Stout |first=P. R. |last2=Johnson |first2=C. M. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Trace Elements |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=//archive.org/stream/yoa1957#page/n167/mode/1up |oclc=704186906}}
* {{cite book |last=Wadleigh |first=C. H. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Growth of Plants |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=//archive.org/stream/yoa1957#page/n57/mode/1up |oclc=704186906}}
As the list grows longer, the look becomes more cluttered with the unnecessarily repeated detail of full-length citations. With {{tld|harvc}} editors can link to shorter, less detailed contribution citations using standard implementations of {{tlx|sfn}} templates{{sfn|George|Read|Johnson|Ferber|1957}} and {{tlx|harv}} templates (like this: {{harv|Harper|Frank|McQuilkin|1957}} and also wrapped in {{tag|ref}} tags<ref>{{harvnb|Stout|Johnson|1957}}</ref>). {{tld|harvc}} may also be wrapped in {{tag|ref}} tags so that it becomes part of the article's References section.<ref>{{harvc|last=Benson|first=Ezra Taft|year=1957|chapter=Foreword|url=//archive.org/stream/yoa1957#page/n5/mode/1up|in=Stefferud|p=vi |loc=§2}}</ref>{{sfn|Wadleigh|1957}}
====Avoiding circular reference====
It may sometimes be necessary to cite a contribution of a source's editor or author such that {{para|last1}} through {{para|last4}} are the same as {{para|in1}} through {{para|in4}}, an editor's preface for example. Such citations can, depending on placement, cause {{tld|sfn}} or {{tld|harv}}-family references to link directly to the citation instead of to the {{tld|harvc}} template, or cause circular links ({{tld|harvc}} linking to itself because its <code>CITEREF</code> anchor identifier is the same as the citation's <code>CITEREF</code> anchor identifier). If {{para|id}} is set, {{tld|harvc}} will use it as an anchor identifier; if {{para|id}} is not set, {{tld|harvc}} will emit an error message when {{para|last1}} through {{para|last4}} are the same as {{para|in1}} through {{para|in4}}.
For example, to reference an editor's preface from article text, create a wikilink inside {{tag|ref}} tags:<ref>[[#Stefferud preface|Stefferud 1957]]</ref>
:<code><nowiki><ref>[[#Stefferud preface|Stefferud 1957]]</ref></nowiki></code>
Write a {{tld|harvc}} template with {{para|id|Stefferud preface}}
:<code><nowiki>{{harvc |last=Stefferud |first=A.|year=1957 |id=Stefferud preface |c=Preface |url=//archive.org/stream/yoa1957#page/n7/mode/1up |in=Stefferud}}</nowiki></code>
====Example references section====
{{reflist}}
====Example bibliography section====
* {{cite book |title=Soil: The Yearbook of Agriculture 1957 |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |url=//archive.org/stream/yoa1957#page/n2/mode/1up |oclc=704186906 |ref=harv}}
** {{harvc |last=George |first=Ernest J. |last2=Read |last3=Johnson |last4=Ferber |year=1957 |contribution=Shelterbelts and Windbreaks |url=//archive.org/stream/yoa1957#page/n785/mode/1up |in=Stefferud}}
** {{harvc |last=Harper |first=V. L. |last2=Frank |last3=McQuilkin |year=1957 |contribution=Forest Practices and Productivity |url=//archive.org/stream/yoa1957#page/n803/mode/1up |in=Stefferud}}
** {{harvc |last=Stefferud |first=A.|year=1957 |id=Stefferud preface |c=Preface |url=//archive.org/stream/yoa1957#page/n7/mode/1up |in=Stefferud}}
** {{harvc |last=Stout |first=P. R. |last2=Johnson |year=1957 |c=Trace Elements |url=//archive.org/stream/yoa1957#page/n167/mode/1up |in=Stefferud}}
** {{harvc |last=Wadleigh |first=C. H.|year=1957 |c=Growth of Plants |url=//archive.org/stream/yoa1957#page/n57/mode/1up |in=Stefferud}}
====More than one contribution====
There are times when an author or authors will have contributed more than once to a work. When this occurs, it is necessary to disambiguate the CITEREF links from the {{tld|harv}} or {{tld|sfn}} templates to the CITEREF id of the appropriate {{tld|harvc}} template.
:{{tld|harv|Author|YYYYa}} → {{tld|harvc|Author|Contribution 1|YYYYa}} → {{tld|citation|...}}}
:{{tld|harv|Author|YYYYb}} → {{tld|harvc|Author|Contribution 2|YYYYb}} ↑
In this example, author David Hunt contributed two appendices to ''Christmas Cacti: The Genus ''Schlumbergera'' and Its Hybrids''.
There are two {{tlx|harvnb}} templates that are disambiguated:
:<code><nowiki>{{harvnb |Hunt |1995a}}</nowiki></code> → {{harvnb |Hunt |1995a}}
:<code><nowiki>{{harvnb |Hunt |1995b}}</nowiki></code> → {{harvnb |Hunt |1995b}}
These link to two {{tld|harvc}} templates which use {{para|anchor-year}} for their CITEREF id and for the date in the {{tld|harvc}} rendering as a visual aid for readers:
*<code><nowiki>{{harvc |in=McMillan |in2=Horobin |last=Hunt |first=David |c=Appendix I Names and synonyms of the species, subspecies and interspecific hybrids |year=1995 |anchor-year=1995a |mode=cs2 |nb=yes}}</nowiki></code>
*:{{harvc |in=McMillan |in2=Horobin |last=Hunt |first=David |c=Appendix I Names and synonyms of the species, subspecies and interspecific hybrids |year=1995 |anchor-year=1995a |mode=cs2 |nb=yes}}
*<code><nowiki>{{harvc |in=McMillan |in2=Horobin |last=Hunt |first=David |c=Appendix III Excerpts from a Brazilian diary |year=1995 |anchor-year=1995b |mode=cs2 |nb=yes}}</nowiki></code>
*:{{harvc |in=McMillan |in2=Horobin |last=Hunt |first=David |c=Appendix III Excerpts from a Brazilian diary |year=1995 |anchor-year=1995b |mode=cs2 |nb=yes}}
and the single {{tld|citation}} template:
*<code><nowiki>{{Citation |last=McMillan |first=A. J. S. |last2=Horobin |first2=J. F. |year=1995 |title=Christmas Cacti: The Genus ''Schlumbergera'' and Its Hybrids |edition=p/b |publication-place=Sherbourne, Dorset, UK |publisher=David Hunt |isbn=978-0-9517234-6-3}}</nowiki></code>
*:{{Citation |last=McMillan |first=A. J. S. |last2=Horobin |first2=J. F. |year=1995 |title=Christmas Cacti: The Genus ''Schlumbergera'' and Its Hybrids |edition=p/b |publication-place=Sherbourne, Dorset, UK |publisher=David Hunt |isbn=978-0-9517234-6-3}}
==Error messages==
{{tld|harvc}} emits these error messages:
:<span style="font-size:100%" class="error">harvc: {{para|anchor-year|plain=yes}} missing dab.</span>
::when used, {{para|anchor-year}} must include a single, lowercase letter disambiguator
:<span style="font-size:100%" class="error">harvc: author missing from source list.</span>
::the source list parameters {{para|in1}}, {{para|in2}}, {{para|in3}}, and {{para|in4}} form the template's <code>CITEREF</code> link to the full citation. All are not required but must be used in order without numerical gaps.
:<span style="font-size:100%" class="error">harvc: invalid {{para|anchor-year|plain=yes}}.</span>
::when used, {{para|anchor-year}} must be a three- or four-digit number and must have a lowercase <code>CITEREF</code> disambiguator. When the source does not have an identifiable year, use {{para|anchor-year|n.d.{{var|l}}}} or {{para|anchor-year|nd{{var|l}}}} with lowercase <code>CITEREF</code> disambiguator.
:<span style="font-size:100%" class="error">harvc: invalid {{para|display-authors|plain=yes}}.</span>
::the value assigned to {{para|display-authors}} must be a number greater than 0 or the keyword <code>etal</code>
:<span style="font-size:100%" class="error">harvc: invalid {{para|year|plain=yes}}.</span>
::{{para|year}} is an integral part of the template's <code>CITEREF</code> anchor and link. The value of {{para|year}} must be a three- or four-digit number with an optional lowercase <code>CITEREF</code> disambiguator. When the source does not have an identifiable year, use {{para|year|n.d.}} or {{para|year|nd}}.
:<span style="font-size:100%" class="error">harvc: missing {{para|year|plain=yes}}.</span>
::{{para|year}} is missing; the parameter is required.
:<span style="font-size:100%" class="error">harvc: no authors in contributor list.</span>
::this error message indicates that {{tld|harvc}} can't find any of {{para|last}}, {{para|last1}}, {{para|author}} or {{para|author1}} with an assigned value and so cannot make a usable <code>CITEREF</code> anchor. Add at least one of the listed parameters.
:<span style="font-size:100%" class="error">harvc: required contribution is missing.</span>
::this error message indicates that {{tld|harvc}} can't find any of {{para|c}}, {{para|chapter}}, or {{para|contribution}} with an assigned value
:<span style="font-size:100%" class="error">harvc: required {{para|id|plain=yes}} parameter missing.</span>
::this error message is emitted when the {{tld|harvc}} template's <code>CITEREF</code> anchor identifier would conflict with the long-form citation's <code>CITEREF</code> anchor identifier. See [[#Avoiding circular reference|Examples]]
:<span style="font-size:100%" class="error">harvc: {{para|year|plain=yes}} / {{para|anchor-year|plain=yes}} mismatch.</span>
::the year portion of {{para|anchor-year|YYYY{{var|l}}}} must match the year given in {{para|year|YYYY}}
<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox | |
<!-- Categories below this line, please; interwikis at Wikidata -->
[[Category:Citation utility templates]]
}}</includeonly>
hylm3kysdb577reg77gabtdbwhhrb8n
801791
801790
2019-10-07T14:26:18Z
en>Trappist the monk
0
ce;
801791
wikitext
text/x-wiki
{{Documentation subpage}}
<!-- Place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
{{lua|Module:Harvc}}
{{uses TemplateStyles|Module:Citation/CS1/styles.css|noprotcat=yes}}
This template is a citation hybrid that has characteristics of the long-form [[Help:Citation Style 1|cs1]] and [[Help:Citation Style 2|cs2]] and characteristics of short-form {{tlx|sfn}} and the {{tlx|harv}} families of templates. Its purpose is to provide a method that allows editors to refer to a contribution or chapter in a larger work when more than a few such referrals are required. {{tld|harvc}} is not a substitute for a properly constructed citation.
Short-form templates {{tld|sfn}} and {{tld|harv}} are often used to link from an article's references section to a long-form cs1|2 template in a bibliography section:
:{{tld|sfn}} → {{tlx|cite book}}
It is not uncommon for a source have multiple contributors. When it is necessary to refer to multiple contributions in the same source, repeating all of the bibliographic details in multiple long-form citation templates adds to references-section clutter. {{tld|harvc}} is designed to hold only the detail necessary to identify a contribution and link to the enclosing work's long-form citation where all of the bibliographic detail can be found:
:{{tld|sfn}} → {{tld|harvc}} → {{tld|cite book}}
== Usage ==
The minimal form is:
:<code><nowiki>{{harvc |last=contributor name |year=publication year |c=contribution title |in=source editor/author name}}</nowiki></code>
===Parameters===
{{tld|harvc}} creates a <code>CITEREF</code> anchor from one to four contribution or chapter author surnames ({{para|last''n''}}) and the value in {{para|year}}. This allows {{tld|harvc}} to be the target of a link created by {{tlx|sfn}} or {{tld|harv}} family templates. From {{para|in{{var|n}}}} and {{para|year}}, {{tld|harvc}} creates a CITEREF link similar to those created by {{tlx|harvnb}} and {{tlx|sfn}}
: '''|anchor-year=''' – optional, for use for author(s) with more than one contribution to the work; requires CITEREF disambiguator; see [[#More than one contribution|Examples]]
: '''|author-link=''' – optional, title of existing Wikipedia article about the first contributor—not the contributor's website; do not wikilink; alias: '''|author-link1='''
:: '''|author-link''n''=''' – optional, title of existing Wikipedia article about contributor''n''; choose ''n'' to match ''n'' in '''|last''n''='''
: '''|author-mask=''m''''' – optional, replaces name of the first contributor with ''m'' (commonly 2) em dashes; alias: '''|author-mask1='''
:: '''|author-mask''n''=''m''''' – optional, replaces name of contributor''n'' with ''m'' em dashes; choose ''n'' to match ''n'' in '''|last''n''='''
:: '''|author-mask{{var|n}}=<{{var|text}}>''' – optional, replaces name of contributor''n'' with <{{var|text}}>
: '''|c=''' – required, the title of chapter or contribution; rendered quoted in upright font; aliases: '''|chapter=''', '''|contribution='''
: '''|display-authors=''' – optional, defines how {{tld|harvc}} displays the contributor list; ignored when '''|name-list-format=harv''':
:: {{para|display-authors}} – when empty or omitted, displays all contributor names in last/first format
:: {{para|display-authors|{{var|n}}}} – displays ''n'' contributor names in last/first format; appends et al. when ''n'' is less than the number of contributors included in the template
:: {{para|display-authors|etal}} – displays all contributor names in last/first format and appends et al.
: '''|first=''' – optional, first contributor's given or first name; alias: '''|first1='''
:: '''|first''n''=''' – optional, contributor''n'' given or first name; ''n'' begins at 2 and increases by 1 for each additional '''|first''n''='''
: '''|id=''' – required when {{para|last1}}-{{para|last4}} are the same as {{para|in1}}-{{para|in4}}; otherwise optional. See [[#Avoiding circular reference|Examples]]
: '''|in=''' – required, surname or last name of first editor or author of the work that includes the contribution; aliases: '''|in1='''
: '''|in2=''' – optional, surname or last name of second editor or author
: '''|in3=''' – optional, surname or last name of third editor or author
: '''|in4=''' – optional, surname or last name of fourth editor or author
: '''|last=''' – required, surname or last name of first author; aliases: '''|last1='''
:: '''|last''n''=''' – optional, contributor''n'' surname or last name; ''n'' begins at 2 and increases by 1 for each additional '''|last''n''=''';
: '''|last-author-amp=''': – optional, when set to '''yes''', inserts an ampersand between the last two contributor names
: '''|loc=''' – optional, other location identifier, displays after {{para|p}} or {{para|pp}}
: '''|mode=''' – controls rendered display to match that of adjacent CS1 or CS2 citations; defaults to CS1 style
:: '''|mode=cs2''' – mimic {{tlx|citation}} style (comma separators, no terminal punctuation, static text not capitalized)
: '''|name-list-format=''' – optional, controls contributor name list display style
:: '''|name-list-format=harv''' – mimic {{tld|sfn}} or {{tld|harv}} format (one to four last names); overrides '''|display-authors='''
: '''|nb=''' – optional, when set to <code>yes</code>, instructs {{tld|harvc}} to render source link with out parentheses around the year; same format as that produced by {{tlx|harvnb}}
: '''|p=''' – optional, single page number where cited material can be found
: '''|pp=''' – optional, multiple page numbers, page ranges, etc where cited material can be found
: '''|ps=''' – optional, sets terminal punctuation; default is full stop; overrides '''|mode=cs2'''; aliases: '''|postscript='''
:: '''|ps=none''' – renders output without terminal punctuation
: '''|url=''' – optional, URL of an online location where the text of the contribution can be found; aliases: '''|chapter-url''', '''|contribution-url'''
: '''|url-access=''' – optional, use when URL links to a source behind a registration barrier or paywall; inserts [[Help:Citation_Style_1#Registration_or_subscription_required|cs1{{pipe}}2 access icon]]; accepted values are: <code>limited</code>, <code>registration</code>, <code>subscription</code>
: '''|year=''' – required, publication year of the work that includes the contribution
===Examples===
When a Wikipedia article makes reference to a work that contains multiple chapters by different authors, bibliographies and reference sections can look rather cluttered:
* {{cite book |last=George |first=Ernest J. |last2=Read |first2=Ralph A. |last3=Johnson |first3=R. W. |last4=Ferber |first4=A. E. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Shelterbelts and Windbreaks |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=//archive.org/stream/yoa1957#page/n785/mode/1up |oclc=704186906}}
* {{cite book |last=Harper |first=V. L. |last2=Frank |first2=Bernard |last3=McQuilkin |first3=W. E. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Forest Practices and Productivity |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=//archive.org/stream/yoa1957#page/n803/mode/1up |oclc=704186906}}
* {{cite book |last=Stout |first=P. R. |last2=Johnson |first2=C. M. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Trace Elements |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=//archive.org/stream/yoa1957#page/n167/mode/1up |oclc=704186906}}
* {{cite book |last=Wadleigh |first=C. H. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Growth of Plants |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=//archive.org/stream/yoa1957#page/n57/mode/1up |oclc=704186906}}
As the list grows longer, the look becomes more cluttered with the unnecessarily repeated detail of full-length citations. With {{tld|harvc}} editors can link to shorter, less detailed contribution citations using standard implementations of {{tlx|sfn}} templates{{sfn|George|Read|Johnson|Ferber|1957}} and {{tlx|harv}} templates (like this: {{harv|Harper|Frank|McQuilkin|1957}} and also wrapped in {{tag|ref}} tags<ref>{{harvnb|Stout|Johnson|1957}}</ref>). {{tld|harvc}} may also be wrapped in {{tag|ref}} tags so that it becomes part of the article's References section.<ref>{{harvc|last=Benson|first=Ezra Taft|year=1957|chapter=Foreword|url=//archive.org/stream/yoa1957#page/n5/mode/1up|in=Stefferud|p=vi |loc=§2}}</ref>{{sfn|Wadleigh|1957}}
====Avoiding circular reference====
It may sometimes be necessary to cite a contribution of a source's editor or author such that {{para|last1}} through {{para|last4}} are the same as {{para|in1}} through {{para|in4}}, an editor's preface for example. Such citations can, depending on placement, cause {{tld|sfn}} or {{tld|harv}}-family references to link directly to the citation instead of to the {{tld|harvc}} template, or cause circular links ({{tld|harvc}} linking to itself because its <code>CITEREF</code> anchor identifier is the same as the citation's <code>CITEREF</code> anchor identifier). If {{para|id}} is set, {{tld|harvc}} will use it as an anchor identifier; if {{para|id}} is not set, {{tld|harvc}} will emit an error message when {{para|last1}} through {{para|last4}} are the same as {{para|in1}} through {{para|in4}}.
For example, to reference an editor's preface from article text, create a wikilink inside {{tag|ref}} tags:<ref>[[#Stefferud preface|Stefferud 1957]]</ref>
:<code><nowiki><ref>[[#Stefferud preface|Stefferud 1957]]</ref></nowiki></code>
Write a {{tld|harvc}} template with {{para|id|Stefferud preface}}
:<code><nowiki>{{harvc |last=Stefferud |first=A.|year=1957 |id=Stefferud preface |c=Preface |url=//archive.org/stream/yoa1957#page/n7/mode/1up |in=Stefferud}}</nowiki></code>
====Example references section====
{{reflist}}
====Example bibliography section====
* {{cite book |title=Soil: The Yearbook of Agriculture 1957 |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |url=//archive.org/stream/yoa1957#page/n2/mode/1up |oclc=704186906 |ref=harv}}
** {{harvc |last=George |first=Ernest J. |last2=Read |last3=Johnson |last4=Ferber |year=1957 |contribution=Shelterbelts and Windbreaks |url=//archive.org/stream/yoa1957#page/n785/mode/1up |in=Stefferud}}
** {{harvc |last=Harper |first=V. L. |last2=Frank |last3=McQuilkin |year=1957 |contribution=Forest Practices and Productivity |url=//archive.org/stream/yoa1957#page/n803/mode/1up |in=Stefferud}}
** {{harvc |last=Stefferud |first=A.|year=1957 |id=Stefferud preface |c=Preface |url=//archive.org/stream/yoa1957#page/n7/mode/1up |in=Stefferud}}
** {{harvc |last=Stout |first=P. R. |last2=Johnson |year=1957 |c=Trace Elements |url=//archive.org/stream/yoa1957#page/n167/mode/1up |in=Stefferud}}
** {{harvc |last=Wadleigh |first=C. H.|year=1957 |c=Growth of Plants |url=//archive.org/stream/yoa1957#page/n57/mode/1up |in=Stefferud}}
====More than one contribution====
There are times when an author or authors will have contributed more than once to a work. When this occurs, it is necessary to disambiguate the CITEREF links from the {{tld|harv}} or {{tld|sfn}} templates to the CITEREF id of the appropriate {{tld|harvc}} template.
:{{tld|harv|Author|YYYYa}} → {{tld|harvc|Author|Contribution 1|YYYYa}} → {{tld|citation|...}}}
:{{tld|harv|Author|YYYYb}} → {{tld|harvc|Author|Contribution 2|YYYYb}} ↑
In this example, author David Hunt contributed two appendices to ''Christmas Cacti: The Genus ''Schlumbergera'' and Its Hybrids''.
There are two {{tlx|harvnb}} templates that are disambiguated:
:<code><nowiki>{{harvnb |Hunt |1995a}}</nowiki></code> → {{harvnb |Hunt |1995a}}
:<code><nowiki>{{harvnb |Hunt |1995b}}</nowiki></code> → {{harvnb |Hunt |1995b}}
These link to two {{tld|harvc}} templates which use {{para|anchor-year}} for their CITEREF id and for the date in the {{tld|harvc}} rendering as a visual aid for readers:
*<code><nowiki>{{harvc |in=McMillan |in2=Horobin |last=Hunt |first=David |c=Appendix I Names and synonyms of the species, subspecies and interspecific hybrids |year=1995 |anchor-year=1995a |mode=cs2 |nb=yes}}</nowiki></code>
*:{{harvc |in=McMillan |in2=Horobin |last=Hunt |first=David |c=Appendix I Names and synonyms of the species, subspecies and interspecific hybrids |year=1995 |anchor-year=1995a |mode=cs2 |nb=yes}}
*<code><nowiki>{{harvc |in=McMillan |in2=Horobin |last=Hunt |first=David |c=Appendix III Excerpts from a Brazilian diary |year=1995 |anchor-year=1995b |mode=cs2 |nb=yes}}</nowiki></code>
*:{{harvc |in=McMillan |in2=Horobin |last=Hunt |first=David |c=Appendix III Excerpts from a Brazilian diary |year=1995 |anchor-year=1995b |mode=cs2 |nb=yes}}
and the single {{tld|citation}} template:
*<code><nowiki>{{Citation |last=McMillan |first=A. J. S. |last2=Horobin |first2=J. F. |year=1995 |title=Christmas Cacti: The Genus ''Schlumbergera'' and Its Hybrids |edition=p/b |publication-place=Sherbourne, Dorset, UK |publisher=David Hunt |isbn=978-0-9517234-6-3}}</nowiki></code>
*:{{Citation |last=McMillan |first=A. J. S. |last2=Horobin |first2=J. F. |year=1995 |title=Christmas Cacti: The Genus ''Schlumbergera'' and Its Hybrids |edition=p/b |publication-place=Sherbourne, Dorset, UK |publisher=David Hunt |isbn=978-0-9517234-6-3}}
==Error messages==
{{tld|harvc}} emits these error messages:
:<span style="font-size:100%" class="error">harvc: {{para|anchor-year|plain=yes}} missing dab.</span>
::when used, {{para|anchor-year}} must include a single, lowercase letter disambiguator
:<span style="font-size:100%" class="error">harvc: author missing from source list.</span>
::the source list parameters {{para|in1}}, {{para|in2}}, {{para|in3}}, and {{para|in4}} form the template's <code>CITEREF</code> link to the full citation. All are not required but must be used in order without numerical gaps.
:<span style="font-size:100%" class="error">harvc: invalid {{para|anchor-year|plain=yes}}.</span>
::when used, {{para|anchor-year}} must be a three- or four-digit number and must have a lowercase <code>CITEREF</code> disambiguator. When the source does not have an identifiable year, use {{para|anchor-year|n.d.{{var|l}}}} or {{para|anchor-year|nd{{var|l}}}} with lowercase <code>CITEREF</code> disambiguator.
:<span style="font-size:100%" class="error">harvc: invalid {{para|display-authors|plain=yes}}.</span>
::the value assigned to {{para|display-authors}} must be a number greater than 0 or the keyword <code>etal</code>
:<span style="font-size:100%" class="error">harvc: invalid {{para|year|plain=yes}}.</span>
::{{para|year}} is an integral part of the template's <code>CITEREF</code> anchor and link. The value of {{para|year}} must be a three- or four-digit number with an optional lowercase <code>CITEREF</code> disambiguator. When the source does not have an identifiable year, use {{para|year|n.d.}} or {{para|year|nd}}.
:<span style="font-size:100%" class="error">harvc: missing {{para|year|plain=yes}}.</span>
::{{para|year}} is missing; the parameter is required.
:<span style="font-size:100%" class="error">harvc: no authors in contributor list.</span>
::this error message indicates that {{tld|harvc}} can't find any of {{para|last}}, {{para|last1}}, {{para|author}} or {{para|author1}} with an assigned value and so cannot make a usable <code>CITEREF</code> anchor. Add at least one of the listed parameters.
:<span style="font-size:100%" class="error">harvc: required contribution is missing.</span>
::this error message indicates that {{tld|harvc}} can't find any of {{para|c}}, {{para|chapter}}, or {{para|contribution}} with an assigned value
:<span style="font-size:100%" class="error">harvc: required {{para|id|plain=yes}} parameter missing.</span>
::this error message is emitted when the {{tld|harvc}} template's <code>CITEREF</code> anchor identifier would conflict with the long-form citation's <code>CITEREF</code> anchor identifier. See [[#Avoiding circular reference|Examples]]
:<span style="font-size:100%" class="error">harvc: {{para|year|plain=yes}} / {{para|anchor-year|plain=yes}} mismatch.</span>
::the year portion of {{para|anchor-year|YYYY{{var|l}}}} must match the year given in {{para|year|YYYY}}
<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox | |
<!-- Categories below this line, please; interwikis at Wikidata -->
[[Category:Citation utility templates]]
}}</includeonly>
5fjfiqyf5cj3axk7rqxa95lx0h6036w
801792
801791
2020-04-25T16:39:52Z
en>Vanisaac
0
/* Error messages */clean up per [[WP:CAT#T]] and [[WP:AWBREQ]] add template:Sandbox other
801792
wikitext
text/x-wiki
{{Documentation subpage}}
<!-- Place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
{{lua|Module:Harvc}}
{{uses TemplateStyles|Module:Citation/CS1/styles.css|noprotcat=yes}}
This template is a citation hybrid that has characteristics of the long-form [[Help:Citation Style 1|cs1]] and [[Help:Citation Style 2|cs2]] and characteristics of short-form {{tlx|sfn}} and the {{tlx|harv}} families of templates. Its purpose is to provide a method that allows editors to refer to a contribution or chapter in a larger work when more than a few such referrals are required. {{tld|harvc}} is not a substitute for a properly constructed citation.
Short-form templates {{tld|sfn}} and {{tld|harv}} are often used to link from an article's references section to a long-form cs1|2 template in a bibliography section:
:{{tld|sfn}} → {{tlx|cite book}}
It is not uncommon for a source have multiple contributors. When it is necessary to refer to multiple contributions in the same source, repeating all of the bibliographic details in multiple long-form citation templates adds to references-section clutter. {{tld|harvc}} is designed to hold only the detail necessary to identify a contribution and link to the enclosing work's long-form citation where all of the bibliographic detail can be found:
:{{tld|sfn}} → {{tld|harvc}} → {{tld|cite book}}
== Usage ==
The minimal form is:
:<code><nowiki>{{harvc |last=contributor name |year=publication year |c=contribution title |in=source editor/author name}}</nowiki></code>
===Parameters===
{{tld|harvc}} creates a <code>CITEREF</code> anchor from one to four contribution or chapter author surnames ({{para|last''n''}}) and the value in {{para|year}}. This allows {{tld|harvc}} to be the target of a link created by {{tlx|sfn}} or {{tld|harv}} family templates. From {{para|in{{var|n}}}} and {{para|year}}, {{tld|harvc}} creates a CITEREF link similar to those created by {{tlx|harvnb}} and {{tlx|sfn}}
: '''|anchor-year=''' – optional, for use for author(s) with more than one contribution to the work; requires CITEREF disambiguator; see [[#More than one contribution|Examples]]
: '''|author-link=''' – optional, title of existing Wikipedia article about the first contributor—not the contributor's website; do not wikilink; alias: '''|author-link1='''
:: '''|author-link''n''=''' – optional, title of existing Wikipedia article about contributor''n''; choose ''n'' to match ''n'' in '''|last''n''='''
: '''|author-mask=''m''''' – optional, replaces name of the first contributor with ''m'' (commonly 2) em dashes; alias: '''|author-mask1='''
:: '''|author-mask''n''=''m''''' – optional, replaces name of contributor''n'' with ''m'' em dashes; choose ''n'' to match ''n'' in '''|last''n''='''
:: '''|author-mask{{var|n}}=<{{var|text}}>''' – optional, replaces name of contributor''n'' with <{{var|text}}>
: '''|c=''' – required, the title of chapter or contribution; rendered quoted in upright font; aliases: '''|chapter=''', '''|contribution='''
: '''|display-authors=''' – optional, defines how {{tld|harvc}} displays the contributor list; ignored when '''|name-list-format=harv''':
:: {{para|display-authors}} – when empty or omitted, displays all contributor names in last/first format
:: {{para|display-authors|{{var|n}}}} – displays ''n'' contributor names in last/first format; appends et al. when ''n'' is less than the number of contributors included in the template
:: {{para|display-authors|etal}} – displays all contributor names in last/first format and appends et al.
: '''|first=''' – optional, first contributor's given or first name; alias: '''|first1='''
:: '''|first''n''=''' – optional, contributor''n'' given or first name; ''n'' begins at 2 and increases by 1 for each additional '''|first''n''='''
: '''|id=''' – required when {{para|last1}}-{{para|last4}} are the same as {{para|in1}}-{{para|in4}}; otherwise optional. See [[#Avoiding circular reference|Examples]]
: '''|in=''' – required, surname or last name of first editor or author of the work that includes the contribution; aliases: '''|in1='''
: '''|in2=''' – optional, surname or last name of second editor or author
: '''|in3=''' – optional, surname or last name of third editor or author
: '''|in4=''' – optional, surname or last name of fourth editor or author
: '''|last=''' – required, surname or last name of first author; aliases: '''|last1='''
:: '''|last''n''=''' – optional, contributor''n'' surname or last name; ''n'' begins at 2 and increases by 1 for each additional '''|last''n''=''';
: '''|last-author-amp=''': – optional, when set to '''yes''', inserts an ampersand between the last two contributor names
: '''|loc=''' – optional, other location identifier, displays after {{para|p}} or {{para|pp}}
: '''|mode=''' – controls rendered display to match that of adjacent CS1 or CS2 citations; defaults to CS1 style
:: '''|mode=cs2''' – mimic {{tlx|citation}} style (comma separators, no terminal punctuation, static text not capitalized)
: '''|name-list-format=''' – optional, controls contributor name list display style
:: '''|name-list-format=harv''' – mimic {{tld|sfn}} or {{tld|harv}} format (one to four last names); overrides '''|display-authors='''
: '''|nb=''' – optional, when set to <code>yes</code>, instructs {{tld|harvc}} to render source link with out parentheses around the year; same format as that produced by {{tlx|harvnb}}
: '''|p=''' – optional, single page number where cited material can be found
: '''|pp=''' – optional, multiple page numbers, page ranges, etc where cited material can be found
: '''|ps=''' – optional, sets terminal punctuation; default is full stop; overrides '''|mode=cs2'''; aliases: '''|postscript='''
:: '''|ps=none''' – renders output without terminal punctuation
: '''|url=''' – optional, URL of an online location where the text of the contribution can be found; aliases: '''|chapter-url''', '''|contribution-url'''
: '''|url-access=''' – optional, use when URL links to a source behind a registration barrier or paywall; inserts [[Help:Citation_Style_1#Registration_or_subscription_required|cs1{{pipe}}2 access icon]]; accepted values are: <code>limited</code>, <code>registration</code>, <code>subscription</code>
: '''|year=''' – required, publication year of the work that includes the contribution
===Examples===
When a Wikipedia article makes reference to a work that contains multiple chapters by different authors, bibliographies and reference sections can look rather cluttered:
* {{cite book |last=George |first=Ernest J. |last2=Read |first2=Ralph A. |last3=Johnson |first3=R. W. |last4=Ferber |first4=A. E. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Shelterbelts and Windbreaks |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=//archive.org/stream/yoa1957#page/n785/mode/1up |oclc=704186906}}
* {{cite book |last=Harper |first=V. L. |last2=Frank |first2=Bernard |last3=McQuilkin |first3=W. E. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Forest Practices and Productivity |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=//archive.org/stream/yoa1957#page/n803/mode/1up |oclc=704186906}}
* {{cite book |last=Stout |first=P. R. |last2=Johnson |first2=C. M. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Trace Elements |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=//archive.org/stream/yoa1957#page/n167/mode/1up |oclc=704186906}}
* {{cite book |last=Wadleigh |first=C. H. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Growth of Plants |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=//archive.org/stream/yoa1957#page/n57/mode/1up |oclc=704186906}}
As the list grows longer, the look becomes more cluttered with the unnecessarily repeated detail of full-length citations. With {{tld|harvc}} editors can link to shorter, less detailed contribution citations using standard implementations of {{tlx|sfn}} templates{{sfn|George|Read|Johnson|Ferber|1957}} and {{tlx|harv}} templates (like this: {{harv|Harper|Frank|McQuilkin|1957}} and also wrapped in {{tag|ref}} tags<ref>{{harvnb|Stout|Johnson|1957}}</ref>). {{tld|harvc}} may also be wrapped in {{tag|ref}} tags so that it becomes part of the article's References section.<ref>{{harvc|last=Benson|first=Ezra Taft|year=1957|chapter=Foreword|url=//archive.org/stream/yoa1957#page/n5/mode/1up|in=Stefferud|p=vi |loc=§2}}</ref>{{sfn|Wadleigh|1957}}
====Avoiding circular reference====
It may sometimes be necessary to cite a contribution of a source's editor or author such that {{para|last1}} through {{para|last4}} are the same as {{para|in1}} through {{para|in4}}, an editor's preface for example. Such citations can, depending on placement, cause {{tld|sfn}} or {{tld|harv}}-family references to link directly to the citation instead of to the {{tld|harvc}} template, or cause circular links ({{tld|harvc}} linking to itself because its <code>CITEREF</code> anchor identifier is the same as the citation's <code>CITEREF</code> anchor identifier). If {{para|id}} is set, {{tld|harvc}} will use it as an anchor identifier; if {{para|id}} is not set, {{tld|harvc}} will emit an error message when {{para|last1}} through {{para|last4}} are the same as {{para|in1}} through {{para|in4}}.
For example, to reference an editor's preface from article text, create a wikilink inside {{tag|ref}} tags:<ref>[[#Stefferud preface|Stefferud 1957]]</ref>
:<code><nowiki><ref>[[#Stefferud preface|Stefferud 1957]]</ref></nowiki></code>
Write a {{tld|harvc}} template with {{para|id|Stefferud preface}}
:<code><nowiki>{{harvc |last=Stefferud |first=A.|year=1957 |id=Stefferud preface |c=Preface |url=//archive.org/stream/yoa1957#page/n7/mode/1up |in=Stefferud}}</nowiki></code>
====Example references section====
{{reflist}}
====Example bibliography section====
* {{cite book |title=Soil: The Yearbook of Agriculture 1957 |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |url=//archive.org/stream/yoa1957#page/n2/mode/1up |oclc=704186906 |ref=harv}}
** {{harvc |last=George |first=Ernest J. |last2=Read |last3=Johnson |last4=Ferber |year=1957 |contribution=Shelterbelts and Windbreaks |url=//archive.org/stream/yoa1957#page/n785/mode/1up |in=Stefferud}}
** {{harvc |last=Harper |first=V. L. |last2=Frank |last3=McQuilkin |year=1957 |contribution=Forest Practices and Productivity |url=//archive.org/stream/yoa1957#page/n803/mode/1up |in=Stefferud}}
** {{harvc |last=Stefferud |first=A.|year=1957 |id=Stefferud preface |c=Preface |url=//archive.org/stream/yoa1957#page/n7/mode/1up |in=Stefferud}}
** {{harvc |last=Stout |first=P. R. |last2=Johnson |year=1957 |c=Trace Elements |url=//archive.org/stream/yoa1957#page/n167/mode/1up |in=Stefferud}}
** {{harvc |last=Wadleigh |first=C. H.|year=1957 |c=Growth of Plants |url=//archive.org/stream/yoa1957#page/n57/mode/1up |in=Stefferud}}
====More than one contribution====
There are times when an author or authors will have contributed more than once to a work. When this occurs, it is necessary to disambiguate the CITEREF links from the {{tld|harv}} or {{tld|sfn}} templates to the CITEREF id of the appropriate {{tld|harvc}} template.
:{{tld|harv|Author|YYYYa}} → {{tld|harvc|Author|Contribution 1|YYYYa}} → {{tld|citation|...}}}
:{{tld|harv|Author|YYYYb}} → {{tld|harvc|Author|Contribution 2|YYYYb}} ↑
In this example, author David Hunt contributed two appendices to ''Christmas Cacti: The Genus ''Schlumbergera'' and Its Hybrids''.
There are two {{tlx|harvnb}} templates that are disambiguated:
:<code><nowiki>{{harvnb |Hunt |1995a}}</nowiki></code> → {{harvnb |Hunt |1995a}}
:<code><nowiki>{{harvnb |Hunt |1995b}}</nowiki></code> → {{harvnb |Hunt |1995b}}
These link to two {{tld|harvc}} templates which use {{para|anchor-year}} for their CITEREF id and for the date in the {{tld|harvc}} rendering as a visual aid for readers:
*<code><nowiki>{{harvc |in=McMillan |in2=Horobin |last=Hunt |first=David |c=Appendix I Names and synonyms of the species, subspecies and interspecific hybrids |year=1995 |anchor-year=1995a |mode=cs2 |nb=yes}}</nowiki></code>
*:{{harvc |in=McMillan |in2=Horobin |last=Hunt |first=David |c=Appendix I Names and synonyms of the species, subspecies and interspecific hybrids |year=1995 |anchor-year=1995a |mode=cs2 |nb=yes}}
*<code><nowiki>{{harvc |in=McMillan |in2=Horobin |last=Hunt |first=David |c=Appendix III Excerpts from a Brazilian diary |year=1995 |anchor-year=1995b |mode=cs2 |nb=yes}}</nowiki></code>
*:{{harvc |in=McMillan |in2=Horobin |last=Hunt |first=David |c=Appendix III Excerpts from a Brazilian diary |year=1995 |anchor-year=1995b |mode=cs2 |nb=yes}}
and the single {{tld|citation}} template:
*<code><nowiki>{{Citation |last=McMillan |first=A. J. S. |last2=Horobin |first2=J. F. |year=1995 |title=Christmas Cacti: The Genus ''Schlumbergera'' and Its Hybrids |edition=p/b |publication-place=Sherbourne, Dorset, UK |publisher=David Hunt |isbn=978-0-9517234-6-3}}</nowiki></code>
*:{{Citation |last=McMillan |first=A. J. S. |last2=Horobin |first2=J. F. |year=1995 |title=Christmas Cacti: The Genus ''Schlumbergera'' and Its Hybrids |edition=p/b |publication-place=Sherbourne, Dorset, UK |publisher=David Hunt |isbn=978-0-9517234-6-3}}
==Error messages==
{{tld|harvc}} emits these error messages:
:<span style="font-size:100%" class="error">harvc: {{para|anchor-year|plain=yes}} missing dab.</span>
::when used, {{para|anchor-year}} must include a single, lowercase letter disambiguator
:<span style="font-size:100%" class="error">harvc: author missing from source list.</span>
::the source list parameters {{para|in1}}, {{para|in2}}, {{para|in3}}, and {{para|in4}} form the template's <code>CITEREF</code> link to the full citation. All are not required but must be used in order without numerical gaps.
:<span style="font-size:100%" class="error">harvc: invalid {{para|anchor-year|plain=yes}}.</span>
::when used, {{para|anchor-year}} must be a three- or four-digit number and must have a lowercase <code>CITEREF</code> disambiguator. When the source does not have an identifiable year, use {{para|anchor-year|n.d.{{var|l}}}} or {{para|anchor-year|nd{{var|l}}}} with lowercase <code>CITEREF</code> disambiguator.
:<span style="font-size:100%" class="error">harvc: invalid {{para|display-authors|plain=yes}}.</span>
::the value assigned to {{para|display-authors}} must be a number greater than 0 or the keyword <code>etal</code>
:<span style="font-size:100%" class="error">harvc: invalid {{para|year|plain=yes}}.</span>
::{{para|year}} is an integral part of the template's <code>CITEREF</code> anchor and link. The value of {{para|year}} must be a three- or four-digit number with an optional lowercase <code>CITEREF</code> disambiguator. When the source does not have an identifiable year, use {{para|year|n.d.}} or {{para|year|nd}}.
:<span style="font-size:100%" class="error">harvc: missing {{para|year|plain=yes}}.</span>
::{{para|year}} is missing; the parameter is required.
:<span style="font-size:100%" class="error">harvc: no authors in contributor list.</span>
::this error message indicates that {{tld|harvc}} can't find any of {{para|last}}, {{para|last1}}, {{para|author}} or {{para|author1}} with an assigned value and so cannot make a usable <code>CITEREF</code> anchor. Add at least one of the listed parameters.
:<span style="font-size:100%" class="error">harvc: required contribution is missing.</span>
::this error message indicates that {{tld|harvc}} can't find any of {{para|c}}, {{para|chapter}}, or {{para|contribution}} with an assigned value
:<span style="font-size:100%" class="error">harvc: required {{para|id|plain=yes}} parameter missing.</span>
::this error message is emitted when the {{tld|harvc}} template's <code>CITEREF</code> anchor identifier would conflict with the long-form citation's <code>CITEREF</code> anchor identifier. See [[#Avoiding circular reference|Examples]]
:<span style="font-size:100%" class="error">harvc: {{para|year|plain=yes}} / {{para|anchor-year|plain=yes}} mismatch.</span>
::the year portion of {{para|anchor-year|YYYY{{var|l}}}} must match the year given in {{para|year|YYYY}}
<includeonly>{{Sandbox other||
<!-- Categories below this line, please; interwikis at Wikidata -->
[[Category:Citation utility templates]]
}}</includeonly>
aat02jp6ozn3rm24puqkrz453fvqt74
801793
801792
2020-04-29T16:43:59Z
en>JCW-CleanerBot
0
clean up, removed: |ref=harv
801793
wikitext
text/x-wiki
{{Documentation subpage}}
<!-- Place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
{{lua|Module:Harvc}}
{{uses TemplateStyles|Module:Citation/CS1/styles.css|noprotcat=yes}}
This template is a citation hybrid that has characteristics of the long-form [[Help:Citation Style 1|cs1]] and [[Help:Citation Style 2|cs2]] and characteristics of short-form {{tlx|sfn}} and the {{tlx|harv}} families of templates. Its purpose is to provide a method that allows editors to refer to a contribution or chapter in a larger work when more than a few such referrals are required. {{tld|harvc}} is not a substitute for a properly constructed citation.
Short-form templates {{tld|sfn}} and {{tld|harv}} are often used to link from an article's references section to a long-form cs1|2 template in a bibliography section:
:{{tld|sfn}} → {{tlx|cite book}}
It is not uncommon for a source have multiple contributors. When it is necessary to refer to multiple contributions in the same source, repeating all of the bibliographic details in multiple long-form citation templates adds to references-section clutter. {{tld|harvc}} is designed to hold only the detail necessary to identify a contribution and link to the enclosing work's long-form citation where all of the bibliographic detail can be found:
:{{tld|sfn}} → {{tld|harvc}} → {{tld|cite book}}
== Usage ==
The minimal form is:
:<code><nowiki>{{harvc |last=contributor name |year=publication year |c=contribution title |in=source editor/author name}}</nowiki></code>
===Parameters===
{{tld|harvc}} creates a <code>CITEREF</code> anchor from one to four contribution or chapter author surnames ({{para|last''n''}}) and the value in {{para|year}}. This allows {{tld|harvc}} to be the target of a link created by {{tlx|sfn}} or {{tld|harv}} family templates. From {{para|in{{var|n}}}} and {{para|year}}, {{tld|harvc}} creates a CITEREF link similar to those created by {{tlx|harvnb}} and {{tlx|sfn}}
: '''|anchor-year=''' – optional, for use for author(s) with more than one contribution to the work; requires CITEREF disambiguator; see [[#More than one contribution|Examples]]
: '''|author-link=''' – optional, title of existing Wikipedia article about the first contributor—not the contributor's website; do not wikilink; alias: '''|author-link1='''
:: '''|author-link''n''=''' – optional, title of existing Wikipedia article about contributor''n''; choose ''n'' to match ''n'' in '''|last''n''='''
: '''|author-mask=''m''''' – optional, replaces name of the first contributor with ''m'' (commonly 2) em dashes; alias: '''|author-mask1='''
:: '''|author-mask''n''=''m''''' – optional, replaces name of contributor''n'' with ''m'' em dashes; choose ''n'' to match ''n'' in '''|last''n''='''
:: '''|author-mask{{var|n}}=<{{var|text}}>''' – optional, replaces name of contributor''n'' with <{{var|text}}>
: '''|c=''' – required, the title of chapter or contribution; rendered quoted in upright font; aliases: '''|chapter=''', '''|contribution='''
: '''|display-authors=''' – optional, defines how {{tld|harvc}} displays the contributor list; ignored when '''|name-list-format=harv''':
:: {{para|display-authors}} – when empty or omitted, displays all contributor names in last/first format
:: {{para|display-authors|{{var|n}}}} – displays ''n'' contributor names in last/first format; appends et al. when ''n'' is less than the number of contributors included in the template
:: {{para|display-authors|etal}} – displays all contributor names in last/first format and appends et al.
: '''|first=''' – optional, first contributor's given or first name; alias: '''|first1='''
:: '''|first''n''=''' – optional, contributor''n'' given or first name; ''n'' begins at 2 and increases by 1 for each additional '''|first''n''='''
: '''|id=''' – required when {{para|last1}}-{{para|last4}} are the same as {{para|in1}}-{{para|in4}}; otherwise optional. See [[#Avoiding circular reference|Examples]]
: '''|in=''' – required, surname or last name of first editor or author of the work that includes the contribution; aliases: '''|in1='''
: '''|in2=''' – optional, surname or last name of second editor or author
: '''|in3=''' – optional, surname or last name of third editor or author
: '''|in4=''' – optional, surname or last name of fourth editor or author
: '''|last=''' – required, surname or last name of first author; aliases: '''|last1='''
:: '''|last''n''=''' – optional, contributor''n'' surname or last name; ''n'' begins at 2 and increases by 1 for each additional '''|last''n''=''';
: '''|last-author-amp=''': – optional, when set to '''yes''', inserts an ampersand between the last two contributor names
: '''|loc=''' – optional, other location identifier, displays after {{para|p}} or {{para|pp}}
: '''|mode=''' – controls rendered display to match that of adjacent CS1 or CS2 citations; defaults to CS1 style
:: '''|mode=cs2''' – mimic {{tlx|citation}} style (comma separators, no terminal punctuation, static text not capitalized)
: '''|name-list-format=''' – optional, controls contributor name list display style
:: '''|name-list-format=harv''' – mimic {{tld|sfn}} or {{tld|harv}} format (one to four last names); overrides '''|display-authors='''
: '''|nb=''' – optional, when set to <code>yes</code>, instructs {{tld|harvc}} to render source link with out parentheses around the year; same format as that produced by {{tlx|harvnb}}
: '''|p=''' – optional, single page number where cited material can be found
: '''|pp=''' – optional, multiple page numbers, page ranges, etc where cited material can be found
: '''|ps=''' – optional, sets terminal punctuation; default is full stop; overrides '''|mode=cs2'''; aliases: '''|postscript='''
:: '''|ps=none''' – renders output without terminal punctuation
: '''|url=''' – optional, URL of an online location where the text of the contribution can be found; aliases: '''|chapter-url''', '''|contribution-url'''
: '''|url-access=''' – optional, use when URL links to a source behind a registration barrier or paywall; inserts [[Help:Citation_Style_1#Registration_or_subscription_required|cs1{{pipe}}2 access icon]]; accepted values are: <code>limited</code>, <code>registration</code>, <code>subscription</code>
: '''|year=''' – required, publication year of the work that includes the contribution
===Examples===
When a Wikipedia article makes reference to a work that contains multiple chapters by different authors, bibliographies and reference sections can look rather cluttered:
* {{cite book |last=George |first=Ernest J. |last2=Read |first2=Ralph A. |last3=Johnson |first3=R. W. |last4=Ferber |first4=A. E. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Shelterbelts and Windbreaks |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=//archive.org/stream/yoa1957#page/n785/mode/1up |oclc=704186906}}
* {{cite book |last=Harper |first=V. L. |last2=Frank |first2=Bernard |last3=McQuilkin |first3=W. E. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Forest Practices and Productivity |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=//archive.org/stream/yoa1957#page/n803/mode/1up |oclc=704186906}}
* {{cite book |last=Stout |first=P. R. |last2=Johnson |first2=C. M. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Trace Elements |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=//archive.org/stream/yoa1957#page/n167/mode/1up |oclc=704186906}}
* {{cite book |last=Wadleigh |first=C. H. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Growth of Plants |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=//archive.org/stream/yoa1957#page/n57/mode/1up |oclc=704186906}}
As the list grows longer, the look becomes more cluttered with the unnecessarily repeated detail of full-length citations. With {{tld|harvc}} editors can link to shorter, less detailed contribution citations using standard implementations of {{tlx|sfn}} templates{{sfn|George|Read|Johnson|Ferber|1957}} and {{tlx|harv}} templates (like this: {{harv|Harper|Frank|McQuilkin|1957}} and also wrapped in {{tag|ref}} tags<ref>{{harvnb|Stout|Johnson|1957}}</ref>). {{tld|harvc}} may also be wrapped in {{tag|ref}} tags so that it becomes part of the article's References section.<ref>{{harvc|last=Benson|first=Ezra Taft|year=1957|chapter=Foreword|url=//archive.org/stream/yoa1957#page/n5/mode/1up|in=Stefferud|p=vi |loc=§2}}</ref>{{sfn|Wadleigh|1957}}
====Avoiding circular reference====
It may sometimes be necessary to cite a contribution of a source's editor or author such that {{para|last1}} through {{para|last4}} are the same as {{para|in1}} through {{para|in4}}, an editor's preface for example. Such citations can, depending on placement, cause {{tld|sfn}} or {{tld|harv}}-family references to link directly to the citation instead of to the {{tld|harvc}} template, or cause circular links ({{tld|harvc}} linking to itself because its <code>CITEREF</code> anchor identifier is the same as the citation's <code>CITEREF</code> anchor identifier). If {{para|id}} is set, {{tld|harvc}} will use it as an anchor identifier; if {{para|id}} is not set, {{tld|harvc}} will emit an error message when {{para|last1}} through {{para|last4}} are the same as {{para|in1}} through {{para|in4}}.
For example, to reference an editor's preface from article text, create a wikilink inside {{tag|ref}} tags:<ref>[[#Stefferud preface|Stefferud 1957]]</ref>
:<code><nowiki><ref>[[#Stefferud preface|Stefferud 1957]]</ref></nowiki></code>
Write a {{tld|harvc}} template with {{para|id|Stefferud preface}}
:<code><nowiki>{{harvc |last=Stefferud |first=A.|year=1957 |id=Stefferud preface |c=Preface |url=//archive.org/stream/yoa1957#page/n7/mode/1up |in=Stefferud}}</nowiki></code>
====Example references section====
{{reflist}}
====Example bibliography section====
* {{cite book |title=Soil: The Yearbook of Agriculture 1957 |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |url=//archive.org/stream/yoa1957#page/n2/mode/1up |oclc=704186906 }}
** {{harvc |last=George |first=Ernest J. |last2=Read |last3=Johnson |last4=Ferber |year=1957 |contribution=Shelterbelts and Windbreaks |url=//archive.org/stream/yoa1957#page/n785/mode/1up |in=Stefferud}}
** {{harvc |last=Harper |first=V. L. |last2=Frank |last3=McQuilkin |year=1957 |contribution=Forest Practices and Productivity |url=//archive.org/stream/yoa1957#page/n803/mode/1up |in=Stefferud}}
** {{harvc |last=Stefferud |first=A.|year=1957 |id=Stefferud preface |c=Preface |url=//archive.org/stream/yoa1957#page/n7/mode/1up |in=Stefferud}}
** {{harvc |last=Stout |first=P. R. |last2=Johnson |year=1957 |c=Trace Elements |url=//archive.org/stream/yoa1957#page/n167/mode/1up |in=Stefferud}}
** {{harvc |last=Wadleigh |first=C. H.|year=1957 |c=Growth of Plants |url=//archive.org/stream/yoa1957#page/n57/mode/1up |in=Stefferud}}
====More than one contribution====
There are times when an author or authors will have contributed more than once to a work. When this occurs, it is necessary to disambiguate the CITEREF links from the {{tld|harv}} or {{tld|sfn}} templates to the CITEREF id of the appropriate {{tld|harvc}} template.
:{{tld|harv|Author|YYYYa}} → {{tld|harvc|Author|Contribution 1|YYYYa}} → {{tld|citation|...}}}
:{{tld|harv|Author|YYYYb}} → {{tld|harvc|Author|Contribution 2|YYYYb}} ↑
In this example, author David Hunt contributed two appendices to ''Christmas Cacti: The Genus ''Schlumbergera'' and Its Hybrids''.
There are two {{tlx|harvnb}} templates that are disambiguated:
:<code><nowiki>{{harvnb |Hunt |1995a}}</nowiki></code> → {{harvnb |Hunt |1995a}}
:<code><nowiki>{{harvnb |Hunt |1995b}}</nowiki></code> → {{harvnb |Hunt |1995b}}
These link to two {{tld|harvc}} templates which use {{para|anchor-year}} for their CITEREF id and for the date in the {{tld|harvc}} rendering as a visual aid for readers:
*<code><nowiki>{{harvc |in=McMillan |in2=Horobin |last=Hunt |first=David |c=Appendix I Names and synonyms of the species, subspecies and interspecific hybrids |year=1995 |anchor-year=1995a |mode=cs2 |nb=yes}}</nowiki></code>
*:{{harvc |in=McMillan |in2=Horobin |last=Hunt |first=David |c=Appendix I Names and synonyms of the species, subspecies and interspecific hybrids |year=1995 |anchor-year=1995a |mode=cs2 |nb=yes}}
*<code><nowiki>{{harvc |in=McMillan |in2=Horobin |last=Hunt |first=David |c=Appendix III Excerpts from a Brazilian diary |year=1995 |anchor-year=1995b |mode=cs2 |nb=yes}}</nowiki></code>
*:{{harvc |in=McMillan |in2=Horobin |last=Hunt |first=David |c=Appendix III Excerpts from a Brazilian diary |year=1995 |anchor-year=1995b |mode=cs2 |nb=yes}}
and the single {{tld|citation}} template:
*<code><nowiki>{{Citation |last=McMillan |first=A. J. S. |last2=Horobin |first2=J. F. |year=1995 |title=Christmas Cacti: The Genus ''Schlumbergera'' and Its Hybrids |edition=p/b |publication-place=Sherbourne, Dorset, UK |publisher=David Hunt |isbn=978-0-9517234-6-3}}</nowiki></code>
*:{{Citation |last=McMillan |first=A. J. S. |last2=Horobin |first2=J. F. |year=1995 |title=Christmas Cacti: The Genus ''Schlumbergera'' and Its Hybrids |edition=p/b |publication-place=Sherbourne, Dorset, UK |publisher=David Hunt |isbn=978-0-9517234-6-3}}
==Error messages==
{{tld|harvc}} emits these error messages:
:<span style="font-size:100%" class="error">harvc: {{para|anchor-year|plain=yes}} missing dab.</span>
::when used, {{para|anchor-year}} must include a single, lowercase letter disambiguator
:<span style="font-size:100%" class="error">harvc: author missing from source list.</span>
::the source list parameters {{para|in1}}, {{para|in2}}, {{para|in3}}, and {{para|in4}} form the template's <code>CITEREF</code> link to the full citation. All are not required but must be used in order without numerical gaps.
:<span style="font-size:100%" class="error">harvc: invalid {{para|anchor-year|plain=yes}}.</span>
::when used, {{para|anchor-year}} must be a three- or four-digit number and must have a lowercase <code>CITEREF</code> disambiguator. When the source does not have an identifiable year, use {{para|anchor-year|n.d.{{var|l}}}} or {{para|anchor-year|nd{{var|l}}}} with lowercase <code>CITEREF</code> disambiguator.
:<span style="font-size:100%" class="error">harvc: invalid {{para|display-authors|plain=yes}}.</span>
::the value assigned to {{para|display-authors}} must be a number greater than 0 or the keyword <code>etal</code>
:<span style="font-size:100%" class="error">harvc: invalid {{para|year|plain=yes}}.</span>
::{{para|year}} is an integral part of the template's <code>CITEREF</code> anchor and link. The value of {{para|year}} must be a three- or four-digit number with an optional lowercase <code>CITEREF</code> disambiguator. When the source does not have an identifiable year, use {{para|year|n.d.}} or {{para|year|nd}}.
:<span style="font-size:100%" class="error">harvc: missing {{para|year|plain=yes}}.</span>
::{{para|year}} is missing; the parameter is required.
:<span style="font-size:100%" class="error">harvc: no authors in contributor list.</span>
::this error message indicates that {{tld|harvc}} can't find any of {{para|last}}, {{para|last1}}, {{para|author}} or {{para|author1}} with an assigned value and so cannot make a usable <code>CITEREF</code> anchor. Add at least one of the listed parameters.
:<span style="font-size:100%" class="error">harvc: required contribution is missing.</span>
::this error message indicates that {{tld|harvc}} can't find any of {{para|c}}, {{para|chapter}}, or {{para|contribution}} with an assigned value
:<span style="font-size:100%" class="error">harvc: required {{para|id|plain=yes}} parameter missing.</span>
::this error message is emitted when the {{tld|harvc}} template's <code>CITEREF</code> anchor identifier would conflict with the long-form citation's <code>CITEREF</code> anchor identifier. See [[#Avoiding circular reference|Examples]]
:<span style="font-size:100%" class="error">harvc: {{para|year|plain=yes}} / {{para|anchor-year|plain=yes}} mismatch.</span>
::the year portion of {{para|anchor-year|YYYY{{var|l}}}} must match the year given in {{para|year|YYYY}}
<includeonly>{{Sandbox other||
<!-- Categories below this line, please; interwikis at Wikidata -->
[[Category:Citation utility templates]]
}}</includeonly>
ezi854sm7dia5ey5kswfke1mhquokhd
801794
801793
2020-06-07T14:52:17Z
en>Trappist the monk
0
/* Error messages */
801794
wikitext
text/x-wiki
{{Documentation subpage}}
<!-- Place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
{{lua|Module:Harvc}}
{{uses TemplateStyles|Module:Citation/CS1/styles.css|noprotcat=yes}}
This template is a citation hybrid that has characteristics of the long-form [[Help:Citation Style 1|cs1]] and [[Help:Citation Style 2|cs2]] and characteristics of short-form {{tlx|sfn}} and the {{tlx|harv}} families of templates. Its purpose is to provide a method that allows editors to refer to a contribution or chapter in a larger work when more than a few such referrals are required. {{tld|harvc}} is not a substitute for a properly constructed citation.
Short-form templates {{tld|sfn}} and {{tld|harv}} are often used to link from an article's references section to a long-form cs1|2 template in a bibliography section:
:{{tld|sfn}} → {{tlx|cite book}}
It is not uncommon for a source have multiple contributors. When it is necessary to refer to multiple contributions in the same source, repeating all of the bibliographic details in multiple long-form citation templates adds to references-section clutter. {{tld|harvc}} is designed to hold only the detail necessary to identify a contribution and link to the enclosing work's long-form citation where all of the bibliographic detail can be found:
:{{tld|sfn}} → {{tld|harvc}} → {{tld|cite book}}
== Usage ==
The minimal form is:
:<code><nowiki>{{harvc |last=contributor name |year=publication year |c=contribution title |in=source editor/author name}}</nowiki></code>
===Parameters===
{{tld|harvc}} creates a <code>CITEREF</code> anchor from one to four contribution or chapter author surnames ({{para|last''n''}}) and the value in {{para|year}}. This allows {{tld|harvc}} to be the target of a link created by {{tlx|sfn}} or {{tld|harv}} family templates. From {{para|in{{var|n}}}} and {{para|year}}, {{tld|harvc}} creates a CITEREF link similar to those created by {{tlx|harvnb}} and {{tlx|sfn}}
: '''|anchor-year=''' – optional, for use for author(s) with more than one contribution to the work; requires CITEREF disambiguator; see [[#More than one contribution|Examples]]
: '''|author-link=''' – optional, title of existing Wikipedia article about the first contributor—not the contributor's website; do not wikilink; alias: '''|author-link1='''
:: '''|author-link''n''=''' – optional, title of existing Wikipedia article about contributor''n''; choose ''n'' to match ''n'' in '''|last''n''='''
: '''|author-mask=''m''''' – optional, replaces name of the first contributor with ''m'' (commonly 2) em dashes; alias: '''|author-mask1='''
:: '''|author-mask''n''=''m''''' – optional, replaces name of contributor''n'' with ''m'' em dashes; choose ''n'' to match ''n'' in '''|last''n''='''
:: '''|author-mask{{var|n}}=<{{var|text}}>''' – optional, replaces name of contributor''n'' with <{{var|text}}>
: '''|c=''' – required, the title of chapter or contribution; rendered quoted in upright font; aliases: '''|chapter=''', '''|contribution='''
: '''|display-authors=''' – optional, defines how {{tld|harvc}} displays the contributor list; ignored when '''|name-list-format=harv''':
:: {{para|display-authors}} – when empty or omitted, displays all contributor names in last/first format
:: {{para|display-authors|{{var|n}}}} – displays ''n'' contributor names in last/first format; appends et al. when ''n'' is less than the number of contributors included in the template
:: {{para|display-authors|etal}} – displays all contributor names in last/first format and appends et al.
: '''|first=''' – optional, first contributor's given or first name; alias: '''|first1='''
:: '''|first''n''=''' – optional, contributor''n'' given or first name; ''n'' begins at 2 and increases by 1 for each additional '''|first''n''='''
: '''|id=''' – required when {{para|last1}}-{{para|last4}} are the same as {{para|in1}}-{{para|in4}}; otherwise optional. See [[#Avoiding circular reference|Examples]]
: '''|in=''' – required, surname or last name of first editor or author of the work that includes the contribution; aliases: '''|in1='''
: '''|in2=''' – optional, surname or last name of second editor or author
: '''|in3=''' – optional, surname or last name of third editor or author
: '''|in4=''' – optional, surname or last name of fourth editor or author
: '''|last=''' – required, surname or last name of first author; aliases: '''|last1='''
:: '''|last''n''=''' – optional, contributor''n'' surname or last name; ''n'' begins at 2 and increases by 1 for each additional '''|last''n''=''';
: '''|last-author-amp=''': – optional, when set to '''yes''', inserts an ampersand between the last two contributor names
: '''|loc=''' – optional, other location identifier, displays after {{para|p}} or {{para|pp}}
: '''|mode=''' – controls rendered display to match that of adjacent CS1 or CS2 citations; defaults to CS1 style
:: '''|mode=cs2''' – mimic {{tlx|citation}} style (comma separators, no terminal punctuation, static text not capitalized)
: '''|name-list-format=''' – optional, controls contributor name list display style
:: '''|name-list-format=harv''' – mimic {{tld|sfn}} or {{tld|harv}} format (one to four last names); overrides '''|display-authors='''
: '''|nb=''' – optional, when set to <code>yes</code>, instructs {{tld|harvc}} to render source link with out parentheses around the year; same format as that produced by {{tlx|harvnb}}
: '''|p=''' – optional, single page number where cited material can be found
: '''|pp=''' – optional, multiple page numbers, page ranges, etc where cited material can be found
: '''|ps=''' – optional, sets terminal punctuation; default is full stop; overrides '''|mode=cs2'''; aliases: '''|postscript='''
:: '''|ps=none''' – renders output without terminal punctuation
: '''|url=''' – optional, URL of an online location where the text of the contribution can be found; aliases: '''|chapter-url''', '''|contribution-url'''
: '''|url-access=''' – optional, use when URL links to a source behind a registration barrier or paywall; inserts [[Help:Citation_Style_1#Registration_or_subscription_required|cs1{{pipe}}2 access icon]]; accepted values are: <code>limited</code>, <code>registration</code>, <code>subscription</code>
: '''|year=''' – required, publication year of the work that includes the contribution
===Examples===
When a Wikipedia article makes reference to a work that contains multiple chapters by different authors, bibliographies and reference sections can look rather cluttered:
* {{cite book |last=George |first=Ernest J. |last2=Read |first2=Ralph A. |last3=Johnson |first3=R. W. |last4=Ferber |first4=A. E. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Shelterbelts and Windbreaks |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=//archive.org/stream/yoa1957#page/n785/mode/1up |oclc=704186906}}
* {{cite book |last=Harper |first=V. L. |last2=Frank |first2=Bernard |last3=McQuilkin |first3=W. E. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Forest Practices and Productivity |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=//archive.org/stream/yoa1957#page/n803/mode/1up |oclc=704186906}}
* {{cite book |last=Stout |first=P. R. |last2=Johnson |first2=C. M. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Trace Elements |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=//archive.org/stream/yoa1957#page/n167/mode/1up |oclc=704186906}}
* {{cite book |last=Wadleigh |first=C. H. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Growth of Plants |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=//archive.org/stream/yoa1957#page/n57/mode/1up |oclc=704186906}}
As the list grows longer, the look becomes more cluttered with the unnecessarily repeated detail of full-length citations. With {{tld|harvc}} editors can link to shorter, less detailed contribution citations using standard implementations of {{tlx|sfn}} templates{{sfn|George|Read|Johnson|Ferber|1957}} and {{tlx|harv}} templates (like this: {{harv|Harper|Frank|McQuilkin|1957}} and also wrapped in {{tag|ref}} tags<ref>{{harvnb|Stout|Johnson|1957}}</ref>). {{tld|harvc}} may also be wrapped in {{tag|ref}} tags so that it becomes part of the article's References section.<ref>{{harvc|last=Benson|first=Ezra Taft|year=1957|chapter=Foreword|url=//archive.org/stream/yoa1957#page/n5/mode/1up|in=Stefferud|p=vi |loc=§2}}</ref>{{sfn|Wadleigh|1957}}
====Avoiding circular reference====
It may sometimes be necessary to cite a contribution of a source's editor or author such that {{para|last1}} through {{para|last4}} are the same as {{para|in1}} through {{para|in4}}, an editor's preface for example. Such citations can, depending on placement, cause {{tld|sfn}} or {{tld|harv}}-family references to link directly to the citation instead of to the {{tld|harvc}} template, or cause circular links ({{tld|harvc}} linking to itself because its <code>CITEREF</code> anchor identifier is the same as the citation's <code>CITEREF</code> anchor identifier). If {{para|id}} is set, {{tld|harvc}} will use it as an anchor identifier; if {{para|id}} is not set, {{tld|harvc}} will emit an error message when {{para|last1}} through {{para|last4}} are the same as {{para|in1}} through {{para|in4}}.
For example, to reference an editor's preface from article text, create a wikilink inside {{tag|ref}} tags:<ref>[[#Stefferud preface|Stefferud 1957]]</ref>
:<code><nowiki><ref>[[#Stefferud preface|Stefferud 1957]]</ref></nowiki></code>
Write a {{tld|harvc}} template with {{para|id|Stefferud preface}}
:<code><nowiki>{{harvc |last=Stefferud |first=A.|year=1957 |id=Stefferud preface |c=Preface |url=//archive.org/stream/yoa1957#page/n7/mode/1up |in=Stefferud}}</nowiki></code>
====Example references section====
{{reflist}}
====Example bibliography section====
* {{cite book |title=Soil: The Yearbook of Agriculture 1957 |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |url=//archive.org/stream/yoa1957#page/n2/mode/1up |oclc=704186906 }}
** {{harvc |last=George |first=Ernest J. |last2=Read |last3=Johnson |last4=Ferber |year=1957 |contribution=Shelterbelts and Windbreaks |url=//archive.org/stream/yoa1957#page/n785/mode/1up |in=Stefferud}}
** {{harvc |last=Harper |first=V. L. |last2=Frank |last3=McQuilkin |year=1957 |contribution=Forest Practices and Productivity |url=//archive.org/stream/yoa1957#page/n803/mode/1up |in=Stefferud}}
** {{harvc |last=Stefferud |first=A.|year=1957 |id=Stefferud preface |c=Preface |url=//archive.org/stream/yoa1957#page/n7/mode/1up |in=Stefferud}}
** {{harvc |last=Stout |first=P. R. |last2=Johnson |year=1957 |c=Trace Elements |url=//archive.org/stream/yoa1957#page/n167/mode/1up |in=Stefferud}}
** {{harvc |last=Wadleigh |first=C. H.|year=1957 |c=Growth of Plants |url=//archive.org/stream/yoa1957#page/n57/mode/1up |in=Stefferud}}
====More than one contribution====
There are times when an author or authors will have contributed more than once to a work. When this occurs, it is necessary to disambiguate the CITEREF links from the {{tld|harv}} or {{tld|sfn}} templates to the CITEREF id of the appropriate {{tld|harvc}} template.
:{{tld|harv|Author|YYYYa}} → {{tld|harvc|Author|Contribution 1|YYYYa}} → {{tld|citation|...}}}
:{{tld|harv|Author|YYYYb}} → {{tld|harvc|Author|Contribution 2|YYYYb}} ↑
In this example, author David Hunt contributed two appendices to ''Christmas Cacti: The Genus ''Schlumbergera'' and Its Hybrids''.
There are two {{tlx|harvnb}} templates that are disambiguated:
:<code><nowiki>{{harvnb |Hunt |1995a}}</nowiki></code> → {{harvnb |Hunt |1995a}}
:<code><nowiki>{{harvnb |Hunt |1995b}}</nowiki></code> → {{harvnb |Hunt |1995b}}
These link to two {{tld|harvc}} templates which use {{para|anchor-year}} for their CITEREF id and for the date in the {{tld|harvc}} rendering as a visual aid for readers:
*<code><nowiki>{{harvc |in=McMillan |in2=Horobin |last=Hunt |first=David |c=Appendix I Names and synonyms of the species, subspecies and interspecific hybrids |year=1995 |anchor-year=1995a |mode=cs2 |nb=yes}}</nowiki></code>
*:{{harvc |in=McMillan |in2=Horobin |last=Hunt |first=David |c=Appendix I Names and synonyms of the species, subspecies and interspecific hybrids |year=1995 |anchor-year=1995a |mode=cs2 |nb=yes}}
*<code><nowiki>{{harvc |in=McMillan |in2=Horobin |last=Hunt |first=David |c=Appendix III Excerpts from a Brazilian diary |year=1995 |anchor-year=1995b |mode=cs2 |nb=yes}}</nowiki></code>
*:{{harvc |in=McMillan |in2=Horobin |last=Hunt |first=David |c=Appendix III Excerpts from a Brazilian diary |year=1995 |anchor-year=1995b |mode=cs2 |nb=yes}}
and the single {{tld|citation}} template:
*<code><nowiki>{{Citation |last=McMillan |first=A. J. S. |last2=Horobin |first2=J. F. |year=1995 |title=Christmas Cacti: The Genus ''Schlumbergera'' and Its Hybrids |edition=p/b |publication-place=Sherbourne, Dorset, UK |publisher=David Hunt |isbn=978-0-9517234-6-3}}</nowiki></code>
*:{{Citation |last=McMillan |first=A. J. S. |last2=Horobin |first2=J. F. |year=1995 |title=Christmas Cacti: The Genus ''Schlumbergera'' and Its Hybrids |edition=p/b |publication-place=Sherbourne, Dorset, UK |publisher=David Hunt |isbn=978-0-9517234-6-3}}
==Error messages==
{{tld|harvc}} emits these error messages:<!--
:<span style="font-size:100%" class="error">harvc: {{para|anchor-year|plain=yes}} missing dab.</span>
::when used, {{para|anchor-year}} must include a single, lowercase letter disambiguator -->
:<span style="font-size:100%" class="error">harvc: author missing from source list.</span>
::the source list parameters {{para|in1}}, {{para|in2}}, {{para|in3}}, and {{para|in4}} form the template's <code>CITEREF</code> link to the full citation. All are not required but must be used in order without numerical gaps.
:<span style="font-size:100%" class="error">harvc: invalid {{para|anchor-year|plain=yes}}.</span>
::when used, {{para|anchor-year}} must be a three- or four-digit number and must have a lowercase <code>CITEREF</code> disambiguator. When the source does not have an identifiable year, use {{para|anchor-year|n.d.{{var|l}}}} or {{para|anchor-year|nd{{var|l}}}} with lowercase <code>CITEREF</code> disambiguator.
:<span style="font-size:100%" class="error">harvc: invalid {{para|display-authors|plain=yes}}.</span>
::the value assigned to {{para|display-authors}} must be a number greater than 0 or the keyword <code>etal</code>
:<span style="font-size:100%" class="error">harvc: invalid {{para|year|plain=yes}}.</span>
::{{para|year}} is an integral part of the template's <code>CITEREF</code> anchor and link. The value of {{para|year}} must be a three- or four-digit number with an optional lowercase <code>CITEREF</code> disambiguator. When the source does not have an identifiable year, use {{para|year|n.d.}} or {{para|year|nd}}.
:<span style="font-size:100%" class="error">harvc: missing {{para|year|plain=yes}}.</span>
::{{para|year}} is missing; the parameter is required.
:<span style="font-size:100%" class="error">harvc: no authors in contributor list.</span>
::this error message indicates that {{tld|harvc}} can't find any of {{para|last}}, {{para|last1}}, {{para|author}} or {{para|author1}} with an assigned value and so cannot make a usable <code>CITEREF</code> anchor. Add at least one of the listed parameters.
:<span style="font-size:100%" class="error">harvc: required contribution is missing.</span>
::this error message indicates that {{tld|harvc}} can't find any of {{para|c}}, {{para|chapter}}, or {{para|contribution}} with an assigned value
:<span style="font-size:100%" class="error">harvc: required {{para|id|plain=yes}} parameter missing.</span>
::this error message is emitted when the {{tld|harvc}} template's <code>CITEREF</code> anchor identifier would conflict with the long-form citation's <code>CITEREF</code> anchor identifier. See [[#Avoiding circular reference|Examples]]
:<span style="font-size:100%" class="error">harvc: {{para|year|plain=yes}} / {{para|anchor-year|plain=yes}} mismatch.</span>
::the year portion of {{para|anchor-year|YYYY{{var|l}}}} must match the year given in {{para|year|YYYY}}
<includeonly>{{Sandbox other||
<!-- Categories below this line, please; interwikis at Wikidata -->
[[Category:Citation utility templates]]
}}</includeonly>
m9elpza2bs87h184ovyl6l5jd124c3q
801795
801794
2020-10-24T15:41:41Z
en>Trappist the monk
0
/* Parameters */ name-list-style;
801795
wikitext
text/x-wiki
{{Documentation subpage}}
<!-- Place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
{{lua|Module:Harvc}}
{{uses TemplateStyles|Module:Citation/CS1/styles.css|noprotcat=yes}}
This template is a citation hybrid that has characteristics of the long-form [[Help:Citation Style 1|cs1]] and [[Help:Citation Style 2|cs2]] and characteristics of short-form {{tlx|sfn}} and the {{tlx|harv}} families of templates. Its purpose is to provide a method that allows editors to refer to a contribution or chapter in a larger work when more than a few such referrals are required. {{tld|harvc}} is not a substitute for a properly constructed citation.
Short-form templates {{tld|sfn}} and {{tld|harv}} are often used to link from an article's references section to a long-form cs1|2 template in a bibliography section:
:{{tld|sfn}} → {{tlx|cite book}}
It is not uncommon for a source have multiple contributors. When it is necessary to refer to multiple contributions in the same source, repeating all of the bibliographic details in multiple long-form citation templates adds to references-section clutter. {{tld|harvc}} is designed to hold only the detail necessary to identify a contribution and link to the enclosing work's long-form citation where all of the bibliographic detail can be found:
:{{tld|sfn}} → {{tld|harvc}} → {{tld|cite book}}
== Usage ==
The minimal form is:
:<code><nowiki>{{harvc |last=contributor name |year=publication year |c=contribution title |in=source editor/author name}}</nowiki></code>
===Parameters===
{{tld|harvc}} creates a <code>CITEREF</code> anchor from one to four contribution or chapter author surnames ({{para|last''n''}}) and the value in {{para|year}}. This allows {{tld|harvc}} to be the target of a link created by {{tlx|sfn}} or {{tld|harv}} family templates. From {{para|in{{var|n}}}} and {{para|year}}, {{tld|harvc}} creates a CITEREF link similar to those created by {{tlx|harvnb}} and {{tlx|sfn}}
: '''|anchor-year=''' – optional, for use for author(s) with more than one contribution to the work; requires CITEREF disambiguator; see [[#More than one contribution|Examples]]
: '''|author-link=''' – optional, title of existing Wikipedia article about the first contributor—not the contributor's website; do not wikilink; alias: '''|author-link1='''
:: '''|author-link''n''=''' – optional, title of existing Wikipedia article about contributor''n''; choose ''n'' to match ''n'' in '''|last''n''='''
: '''|author-mask=''m''''' – optional, replaces name of the first contributor with ''m'' (commonly 2) em dashes; alias: '''|author-mask1='''
:: '''|author-mask''n''=''m''''' – optional, replaces name of contributor''n'' with ''m'' em dashes; choose ''n'' to match ''n'' in '''|last''n''='''
:: '''|author-mask{{var|n}}=<{{var|text}}>''' – optional, replaces name of contributor''n'' with <{{var|text}}>
: '''|c=''' – required, the title of chapter or contribution; rendered quoted in upright font; aliases: '''|chapter=''', '''|contribution='''
: '''|display-authors=''' – optional, defines how {{tld|harvc}} displays the contributor list; ignored when '''|name-list-format=harv''':
:: {{para|display-authors}} – when empty or omitted, displays all contributor names in last/first format
:: {{para|display-authors|{{var|n}}}} – displays ''n'' contributor names in last/first format; appends et al. when ''n'' is less than the number of contributors included in the template
:: {{para|display-authors|etal}} – displays all contributor names in last/first format and appends et al.
: '''|first=''' – optional, first contributor's given or first name; alias: '''|first1='''
:: '''|first''n''=''' – optional, contributor''n'' given or first name; ''n'' begins at 2 and increases by 1 for each additional '''|first''n''='''
: '''|id=''' – required when {{para|last1}}-{{para|last4}} are the same as {{para|in1}}-{{para|in4}}; otherwise optional. See [[#Avoiding circular reference|Examples]]
: '''|in=''' – required, surname or last name of first editor or author of the work that includes the contribution; aliases: '''|in1='''
: '''|in2=''' – optional, surname or last name of second editor or author
: '''|in3=''' – optional, surname or last name of third editor or author
: '''|in4=''' – optional, surname or last name of fourth editor or author
: '''|last=''' – required, surname or last name of first author; aliases: '''|last1='''
:: '''|last''n''=''' – optional, contributor''n'' surname or last name; ''n'' begins at 2 and increases by 1 for each additional '''|last''n''=''';
: '''|last-author-amp=''': – optional, when set to '''yes''', inserts an ampersand between the last two contributor names
: '''|loc=''' – optional, other location identifier, displays after {{para|p}} or {{para|pp}}
: '''|mode=''' – controls rendered display to match that of adjacent CS1 or CS2 citations; defaults to CS1 style
:: '''|mode=cs2''' – mimic {{tlx|citation}} style (comma separators, no terminal punctuation, static text not capitalized)
: '''|name-list-style=''' – optional, controls contributor name list display style
:: '''|name-list-style=harv''' – mimic {{tld|sfn}} or {{tld|harv}} format (one to four last names); overrides '''|display-authors='''
: '''|nb=''' – optional, when set to <code>yes</code>, instructs {{tld|harvc}} to render source link with out parentheses around the year; same format as that produced by {{tlx|harvnb}}
: '''|p=''' – optional, single page number where cited material can be found
: '''|pp=''' – optional, multiple page numbers, page ranges, etc where cited material can be found
: '''|ps=''' – optional, sets terminal punctuation; default is full stop; overrides '''|mode=cs2'''; aliases: '''|postscript='''
:: '''|ps=none''' – renders output without terminal punctuation
: '''|url=''' – optional, URL of an online location where the text of the contribution can be found; aliases: '''|chapter-url''', '''|contribution-url'''
: '''|url-access=''' – optional, use when URL links to a source behind a registration barrier or paywall; inserts [[Help:Citation_Style_1#Registration_or_subscription_required|cs1{{pipe}}2 access icon]]; accepted values are: <code>limited</code>, <code>registration</code>, <code>subscription</code>
: '''|year=''' – required, publication year of the work that includes the contribution
===Examples===
When a Wikipedia article makes reference to a work that contains multiple chapters by different authors, bibliographies and reference sections can look rather cluttered:
* {{cite book |last=George |first=Ernest J. |last2=Read |first2=Ralph A. |last3=Johnson |first3=R. W. |last4=Ferber |first4=A. E. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Shelterbelts and Windbreaks |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=//archive.org/stream/yoa1957#page/n785/mode/1up |oclc=704186906}}
* {{cite book |last=Harper |first=V. L. |last2=Frank |first2=Bernard |last3=McQuilkin |first3=W. E. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Forest Practices and Productivity |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=//archive.org/stream/yoa1957#page/n803/mode/1up |oclc=704186906}}
* {{cite book |last=Stout |first=P. R. |last2=Johnson |first2=C. M. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Trace Elements |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=//archive.org/stream/yoa1957#page/n167/mode/1up |oclc=704186906}}
* {{cite book |last=Wadleigh |first=C. H. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Growth of Plants |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=//archive.org/stream/yoa1957#page/n57/mode/1up |oclc=704186906}}
As the list grows longer, the look becomes more cluttered with the unnecessarily repeated detail of full-length citations. With {{tld|harvc}} editors can link to shorter, less detailed contribution citations using standard implementations of {{tlx|sfn}} templates{{sfn|George|Read|Johnson|Ferber|1957}} and {{tlx|harv}} templates (like this: {{harv|Harper|Frank|McQuilkin|1957}} and also wrapped in {{tag|ref}} tags<ref>{{harvnb|Stout|Johnson|1957}}</ref>). {{tld|harvc}} may also be wrapped in {{tag|ref}} tags so that it becomes part of the article's References section.<ref>{{harvc|last=Benson|first=Ezra Taft|year=1957|chapter=Foreword|url=//archive.org/stream/yoa1957#page/n5/mode/1up|in=Stefferud|p=vi |loc=§2}}</ref>{{sfn|Wadleigh|1957}}
====Avoiding circular reference====
It may sometimes be necessary to cite a contribution of a source's editor or author such that {{para|last1}} through {{para|last4}} are the same as {{para|in1}} through {{para|in4}}, an editor's preface for example. Such citations can, depending on placement, cause {{tld|sfn}} or {{tld|harv}}-family references to link directly to the citation instead of to the {{tld|harvc}} template, or cause circular links ({{tld|harvc}} linking to itself because its <code>CITEREF</code> anchor identifier is the same as the citation's <code>CITEREF</code> anchor identifier). If {{para|id}} is set, {{tld|harvc}} will use it as an anchor identifier; if {{para|id}} is not set, {{tld|harvc}} will emit an error message when {{para|last1}} through {{para|last4}} are the same as {{para|in1}} through {{para|in4}}.
For example, to reference an editor's preface from article text, create a wikilink inside {{tag|ref}} tags:<ref>[[#Stefferud preface|Stefferud 1957]]</ref>
:<code><nowiki><ref>[[#Stefferud preface|Stefferud 1957]]</ref></nowiki></code>
Write a {{tld|harvc}} template with {{para|id|Stefferud preface}}
:<code><nowiki>{{harvc |last=Stefferud |first=A.|year=1957 |id=Stefferud preface |c=Preface |url=//archive.org/stream/yoa1957#page/n7/mode/1up |in=Stefferud}}</nowiki></code>
====Example references section====
{{reflist}}
====Example bibliography section====
* {{cite book |title=Soil: The Yearbook of Agriculture 1957 |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |url=//archive.org/stream/yoa1957#page/n2/mode/1up |oclc=704186906 }}
** {{harvc |last=George |first=Ernest J. |last2=Read |last3=Johnson |last4=Ferber |year=1957 |contribution=Shelterbelts and Windbreaks |url=//archive.org/stream/yoa1957#page/n785/mode/1up |in=Stefferud}}
** {{harvc |last=Harper |first=V. L. |last2=Frank |last3=McQuilkin |year=1957 |contribution=Forest Practices and Productivity |url=//archive.org/stream/yoa1957#page/n803/mode/1up |in=Stefferud}}
** {{harvc |last=Stefferud |first=A.|year=1957 |id=Stefferud preface |c=Preface |url=//archive.org/stream/yoa1957#page/n7/mode/1up |in=Stefferud}}
** {{harvc |last=Stout |first=P. R. |last2=Johnson |year=1957 |c=Trace Elements |url=//archive.org/stream/yoa1957#page/n167/mode/1up |in=Stefferud}}
** {{harvc |last=Wadleigh |first=C. H.|year=1957 |c=Growth of Plants |url=//archive.org/stream/yoa1957#page/n57/mode/1up |in=Stefferud}}
====More than one contribution====
There are times when an author or authors will have contributed more than once to a work. When this occurs, it is necessary to disambiguate the CITEREF links from the {{tld|harv}} or {{tld|sfn}} templates to the CITEREF id of the appropriate {{tld|harvc}} template.
:{{tld|harv|Author|YYYYa}} → {{tld|harvc|Author|Contribution 1|YYYYa}} → {{tld|citation|...}}}
:{{tld|harv|Author|YYYYb}} → {{tld|harvc|Author|Contribution 2|YYYYb}} ↑
In this example, author David Hunt contributed two appendices to ''Christmas Cacti: The Genus ''Schlumbergera'' and Its Hybrids''.
There are two {{tlx|harvnb}} templates that are disambiguated:
:<code><nowiki>{{harvnb |Hunt |1995a}}</nowiki></code> → {{harvnb |Hunt |1995a}}
:<code><nowiki>{{harvnb |Hunt |1995b}}</nowiki></code> → {{harvnb |Hunt |1995b}}
These link to two {{tld|harvc}} templates which use {{para|anchor-year}} for their CITEREF id and for the date in the {{tld|harvc}} rendering as a visual aid for readers:
*<code><nowiki>{{harvc |in=McMillan |in2=Horobin |last=Hunt |first=David |c=Appendix I Names and synonyms of the species, subspecies and interspecific hybrids |year=1995 |anchor-year=1995a |mode=cs2 |nb=yes}}</nowiki></code>
*:{{harvc |in=McMillan |in2=Horobin |last=Hunt |first=David |c=Appendix I Names and synonyms of the species, subspecies and interspecific hybrids |year=1995 |anchor-year=1995a |mode=cs2 |nb=yes}}
*<code><nowiki>{{harvc |in=McMillan |in2=Horobin |last=Hunt |first=David |c=Appendix III Excerpts from a Brazilian diary |year=1995 |anchor-year=1995b |mode=cs2 |nb=yes}}</nowiki></code>
*:{{harvc |in=McMillan |in2=Horobin |last=Hunt |first=David |c=Appendix III Excerpts from a Brazilian diary |year=1995 |anchor-year=1995b |mode=cs2 |nb=yes}}
and the single {{tld|citation}} template:
*<code><nowiki>{{Citation |last=McMillan |first=A. J. S. |last2=Horobin |first2=J. F. |year=1995 |title=Christmas Cacti: The Genus ''Schlumbergera'' and Its Hybrids |edition=p/b |publication-place=Sherbourne, Dorset, UK |publisher=David Hunt |isbn=978-0-9517234-6-3}}</nowiki></code>
*:{{Citation |last=McMillan |first=A. J. S. |last2=Horobin |first2=J. F. |year=1995 |title=Christmas Cacti: The Genus ''Schlumbergera'' and Its Hybrids |edition=p/b |publication-place=Sherbourne, Dorset, UK |publisher=David Hunt |isbn=978-0-9517234-6-3}}
==Error messages==
{{tld|harvc}} emits these error messages:<!--
:<span style="font-size:100%" class="error">harvc: {{para|anchor-year|plain=yes}} missing dab.</span>
::when used, {{para|anchor-year}} must include a single, lowercase letter disambiguator -->
:<span style="font-size:100%" class="error">harvc: author missing from source list.</span>
::the source list parameters {{para|in1}}, {{para|in2}}, {{para|in3}}, and {{para|in4}} form the template's <code>CITEREF</code> link to the full citation. All are not required but must be used in order without numerical gaps.
:<span style="font-size:100%" class="error">harvc: invalid {{para|anchor-year|plain=yes}}.</span>
::when used, {{para|anchor-year}} must be a three- or four-digit number and must have a lowercase <code>CITEREF</code> disambiguator. When the source does not have an identifiable year, use {{para|anchor-year|n.d.{{var|l}}}} or {{para|anchor-year|nd{{var|l}}}} with lowercase <code>CITEREF</code> disambiguator.
:<span style="font-size:100%" class="error">harvc: invalid {{para|display-authors|plain=yes}}.</span>
::the value assigned to {{para|display-authors}} must be a number greater than 0 or the keyword <code>etal</code>
:<span style="font-size:100%" class="error">harvc: invalid {{para|year|plain=yes}}.</span>
::{{para|year}} is an integral part of the template's <code>CITEREF</code> anchor and link. The value of {{para|year}} must be a three- or four-digit number with an optional lowercase <code>CITEREF</code> disambiguator. When the source does not have an identifiable year, use {{para|year|n.d.}} or {{para|year|nd}}.
:<span style="font-size:100%" class="error">harvc: missing {{para|year|plain=yes}}.</span>
::{{para|year}} is missing; the parameter is required.
:<span style="font-size:100%" class="error">harvc: no authors in contributor list.</span>
::this error message indicates that {{tld|harvc}} can't find any of {{para|last}}, {{para|last1}}, {{para|author}} or {{para|author1}} with an assigned value and so cannot make a usable <code>CITEREF</code> anchor. Add at least one of the listed parameters.
:<span style="font-size:100%" class="error">harvc: required contribution is missing.</span>
::this error message indicates that {{tld|harvc}} can't find any of {{para|c}}, {{para|chapter}}, or {{para|contribution}} with an assigned value
:<span style="font-size:100%" class="error">harvc: required {{para|id|plain=yes}} parameter missing.</span>
::this error message is emitted when the {{tld|harvc}} template's <code>CITEREF</code> anchor identifier would conflict with the long-form citation's <code>CITEREF</code> anchor identifier. See [[#Avoiding circular reference|Examples]]
:<span style="font-size:100%" class="error">harvc: {{para|year|plain=yes}} / {{para|anchor-year|plain=yes}} mismatch.</span>
::the year portion of {{para|anchor-year|YYYY{{var|l}}}} must match the year given in {{para|year|YYYY}}
<includeonly>{{Sandbox other||
<!-- Categories below this line, please; interwikis at Wikidata -->
[[Category:Citation utility templates]]
}}</includeonly>
hphw79faq73l1v6c85dqu80fusvvjy7
801796
801795
2020-10-24T17:25:50Z
en>Trappist the monk
0
/* Parameters */ name-list-style;
801796
wikitext
text/x-wiki
{{Documentation subpage}}
<!-- Place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
{{lua|Module:Harvc}}
{{uses TemplateStyles|Module:Citation/CS1/styles.css|noprotcat=yes}}
This template is a citation hybrid that has characteristics of the long-form [[Help:Citation Style 1|cs1]] and [[Help:Citation Style 2|cs2]] and characteristics of short-form {{tlx|sfn}} and the {{tlx|harv}} families of templates. Its purpose is to provide a method that allows editors to refer to a contribution or chapter in a larger work when more than a few such referrals are required. {{tld|harvc}} is not a substitute for a properly constructed citation.
Short-form templates {{tld|sfn}} and {{tld|harv}} are often used to link from an article's references section to a long-form cs1|2 template in a bibliography section:
:{{tld|sfn}} → {{tlx|cite book}}
It is not uncommon for a source have multiple contributors. When it is necessary to refer to multiple contributions in the same source, repeating all of the bibliographic details in multiple long-form citation templates adds to references-section clutter. {{tld|harvc}} is designed to hold only the detail necessary to identify a contribution and link to the enclosing work's long-form citation where all of the bibliographic detail can be found:
:{{tld|sfn}} → {{tld|harvc}} → {{tld|cite book}}
== Usage ==
The minimal form is:
:<code><nowiki>{{harvc |last=contributor name |year=publication year |c=contribution title |in=source editor/author name}}</nowiki></code>
===Parameters===
{{tld|harvc}} creates a <code>CITEREF</code> anchor from one to four contribution or chapter author surnames ({{para|last''n''}}) and the value in {{para|year}}. This allows {{tld|harvc}} to be the target of a link created by {{tlx|sfn}} or {{tld|harv}} family templates. From {{para|in{{var|n}}}} and {{para|year}}, {{tld|harvc}} creates a CITEREF link similar to those created by {{tlx|harvnb}} and {{tlx|sfn}}
: '''|anchor-year=''' – optional, for use for author(s) with more than one contribution to the work; requires CITEREF disambiguator; see [[#More than one contribution|Examples]]
: '''|author-link=''' – optional, title of existing Wikipedia article about the first contributor—not the contributor's website; do not wikilink; alias: '''|author-link1='''
:: '''|author-link''n''=''' – optional, title of existing Wikipedia article about contributor''n''; choose ''n'' to match ''n'' in '''|last''n''='''
: '''|author-mask=''m''''' – optional, replaces name of the first contributor with ''m'' (commonly 2) em dashes; alias: '''|author-mask1='''
:: '''|author-mask''n''=''m''''' – optional, replaces name of contributor''n'' with ''m'' em dashes; choose ''n'' to match ''n'' in '''|last''n''='''
:: '''|author-mask{{var|n}}=<{{var|text}}>''' – optional, replaces name of contributor''n'' with <{{var|text}}>
: '''|c=''' – required, the title of chapter or contribution; rendered quoted in upright font; aliases: '''|chapter=''', '''|contribution='''
: '''|display-authors=''' – optional, defines how {{tld|harvc}} displays the contributor list; ignored when '''|name-list-format=harv''':
:: {{para|display-authors}} – when empty or omitted, displays all contributor names in last/first format
:: {{para|display-authors|{{var|n}}}} – displays ''n'' contributor names in last/first format; appends et al. when ''n'' is less than the number of contributors included in the template
:: {{para|display-authors|etal}} – displays all contributor names in last/first format and appends et al.
: '''|first=''' – optional, first contributor's given or first name; alias: '''|first1='''
:: '''|first''n''=''' – optional, contributor''n'' given or first name; ''n'' begins at 2 and increases by 1 for each additional '''|first''n''='''
: '''|id=''' – required when {{para|last1}}-{{para|last4}} are the same as {{para|in1}}-{{para|in4}}; otherwise optional. See [[#Avoiding circular reference|Examples]]
: '''|in=''' – required, surname or last name of first editor or author of the work that includes the contribution; aliases: '''|in1='''
: '''|in2=''' – optional, surname or last name of second editor or author
: '''|in3=''' – optional, surname or last name of third editor or author
: '''|in4=''' – optional, surname or last name of fourth editor or author
: '''|last=''' – required, surname or last name of first author; aliases: '''|last1='''
:: '''|last''n''=''' – optional, contributor''n'' surname or last name; ''n'' begins at 2 and increases by 1 for each additional '''|last''n''=''';
: '''|loc=''' – optional, other location identifier, displays after {{para|p}} or {{para|pp}}
: '''|mode=''' – controls rendered display to match that of adjacent CS1 or CS2 citations; defaults to CS1 style
:: '''|mode=cs2''' – mimic {{tlx|citation}} style (comma separators, no terminal punctuation, static text not capitalized)
: '''|name-list-style=''' – optional, controls contributor name list display style
:: '''|name-list-style=harv''' – mimic {{tld|sfn}} or {{tld|harv}} format (one to four last names); overrides '''|display-authors='''
:: '''|name-list-style=amp''' – inserts an ampersand between the last two contributor names
: '''|nb=''' – optional, when set to <code>yes</code>, instructs {{tld|harvc}} to render source link with out parentheses around the year; same format as that produced by {{tlx|harvnb}}
: '''|p=''' – optional, single page number where cited material can be found
: '''|pp=''' – optional, multiple page numbers, page ranges, etc where cited material can be found
: '''|ps=''' – optional, sets terminal punctuation; default is full stop; overrides '''|mode=cs2'''; aliases: '''|postscript='''
:: '''|ps=none''' – renders output without terminal punctuation
: '''|url=''' – optional, URL of an online location where the text of the contribution can be found; aliases: '''|chapter-url''', '''|contribution-url'''
: '''|url-access=''' – optional, use when URL links to a source behind a registration barrier or paywall; inserts [[Help:Citation_Style_1#Registration_or_subscription_required|cs1{{pipe}}2 access icon]]; accepted values are: <code>limited</code>, <code>registration</code>, <code>subscription</code>
: '''|year=''' – required, publication year of the work that includes the contribution
===Examples===
When a Wikipedia article makes reference to a work that contains multiple chapters by different authors, bibliographies and reference sections can look rather cluttered:
* {{cite book |last=George |first=Ernest J. |last2=Read |first2=Ralph A. |last3=Johnson |first3=R. W. |last4=Ferber |first4=A. E. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Shelterbelts and Windbreaks |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=//archive.org/stream/yoa1957#page/n785/mode/1up |oclc=704186906}}
* {{cite book |last=Harper |first=V. L. |last2=Frank |first2=Bernard |last3=McQuilkin |first3=W. E. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Forest Practices and Productivity |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=//archive.org/stream/yoa1957#page/n803/mode/1up |oclc=704186906}}
* {{cite book |last=Stout |first=P. R. |last2=Johnson |first2=C. M. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Trace Elements |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=//archive.org/stream/yoa1957#page/n167/mode/1up |oclc=704186906}}
* {{cite book |last=Wadleigh |first=C. H. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Growth of Plants |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=//archive.org/stream/yoa1957#page/n57/mode/1up |oclc=704186906}}
As the list grows longer, the look becomes more cluttered with the unnecessarily repeated detail of full-length citations. With {{tld|harvc}} editors can link to shorter, less detailed contribution citations using standard implementations of {{tlx|sfn}} templates{{sfn|George|Read|Johnson|Ferber|1957}} and {{tlx|harv}} templates (like this: {{harv|Harper|Frank|McQuilkin|1957}} and also wrapped in {{tag|ref}} tags<ref>{{harvnb|Stout|Johnson|1957}}</ref>). {{tld|harvc}} may also be wrapped in {{tag|ref}} tags so that it becomes part of the article's References section.<ref>{{harvc|last=Benson|first=Ezra Taft|year=1957|chapter=Foreword|url=//archive.org/stream/yoa1957#page/n5/mode/1up|in=Stefferud|p=vi |loc=§2}}</ref>{{sfn|Wadleigh|1957}}
====Avoiding circular reference====
It may sometimes be necessary to cite a contribution of a source's editor or author such that {{para|last1}} through {{para|last4}} are the same as {{para|in1}} through {{para|in4}}, an editor's preface for example. Such citations can, depending on placement, cause {{tld|sfn}} or {{tld|harv}}-family references to link directly to the citation instead of to the {{tld|harvc}} template, or cause circular links ({{tld|harvc}} linking to itself because its <code>CITEREF</code> anchor identifier is the same as the citation's <code>CITEREF</code> anchor identifier). If {{para|id}} is set, {{tld|harvc}} will use it as an anchor identifier; if {{para|id}} is not set, {{tld|harvc}} will emit an error message when {{para|last1}} through {{para|last4}} are the same as {{para|in1}} through {{para|in4}}.
For example, to reference an editor's preface from article text, create a wikilink inside {{tag|ref}} tags:<ref>[[#Stefferud preface|Stefferud 1957]]</ref>
:<code><nowiki><ref>[[#Stefferud preface|Stefferud 1957]]</ref></nowiki></code>
Write a {{tld|harvc}} template with {{para|id|Stefferud preface}}
:<code><nowiki>{{harvc |last=Stefferud |first=A.|year=1957 |id=Stefferud preface |c=Preface |url=//archive.org/stream/yoa1957#page/n7/mode/1up |in=Stefferud}}</nowiki></code>
====Example references section====
{{reflist}}
====Example bibliography section====
* {{cite book |title=Soil: The Yearbook of Agriculture 1957 |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |url=//archive.org/stream/yoa1957#page/n2/mode/1up |oclc=704186906 }}
** {{harvc |last=George |first=Ernest J. |last2=Read |last3=Johnson |last4=Ferber |year=1957 |contribution=Shelterbelts and Windbreaks |url=//archive.org/stream/yoa1957#page/n785/mode/1up |in=Stefferud}}
** {{harvc |last=Harper |first=V. L. |last2=Frank |last3=McQuilkin |year=1957 |contribution=Forest Practices and Productivity |url=//archive.org/stream/yoa1957#page/n803/mode/1up |in=Stefferud}}
** {{harvc |last=Stefferud |first=A.|year=1957 |id=Stefferud preface |c=Preface |url=//archive.org/stream/yoa1957#page/n7/mode/1up |in=Stefferud}}
** {{harvc |last=Stout |first=P. R. |last2=Johnson |year=1957 |c=Trace Elements |url=//archive.org/stream/yoa1957#page/n167/mode/1up |in=Stefferud}}
** {{harvc |last=Wadleigh |first=C. H.|year=1957 |c=Growth of Plants |url=//archive.org/stream/yoa1957#page/n57/mode/1up |in=Stefferud}}
====More than one contribution====
There are times when an author or authors will have contributed more than once to a work. When this occurs, it is necessary to disambiguate the CITEREF links from the {{tld|harv}} or {{tld|sfn}} templates to the CITEREF id of the appropriate {{tld|harvc}} template.
:{{tld|harv|Author|YYYYa}} → {{tld|harvc|Author|Contribution 1|YYYYa}} → {{tld|citation|...}}}
:{{tld|harv|Author|YYYYb}} → {{tld|harvc|Author|Contribution 2|YYYYb}} ↑
In this example, author David Hunt contributed two appendices to ''Christmas Cacti: The Genus ''Schlumbergera'' and Its Hybrids''.
There are two {{tlx|harvnb}} templates that are disambiguated:
:<code><nowiki>{{harvnb |Hunt |1995a}}</nowiki></code> → {{harvnb |Hunt |1995a}}
:<code><nowiki>{{harvnb |Hunt |1995b}}</nowiki></code> → {{harvnb |Hunt |1995b}}
These link to two {{tld|harvc}} templates which use {{para|anchor-year}} for their CITEREF id and for the date in the {{tld|harvc}} rendering as a visual aid for readers:
*<code><nowiki>{{harvc |in=McMillan |in2=Horobin |last=Hunt |first=David |c=Appendix I Names and synonyms of the species, subspecies and interspecific hybrids |year=1995 |anchor-year=1995a |mode=cs2 |nb=yes}}</nowiki></code>
*:{{harvc |in=McMillan |in2=Horobin |last=Hunt |first=David |c=Appendix I Names and synonyms of the species, subspecies and interspecific hybrids |year=1995 |anchor-year=1995a |mode=cs2 |nb=yes}}
*<code><nowiki>{{harvc |in=McMillan |in2=Horobin |last=Hunt |first=David |c=Appendix III Excerpts from a Brazilian diary |year=1995 |anchor-year=1995b |mode=cs2 |nb=yes}}</nowiki></code>
*:{{harvc |in=McMillan |in2=Horobin |last=Hunt |first=David |c=Appendix III Excerpts from a Brazilian diary |year=1995 |anchor-year=1995b |mode=cs2 |nb=yes}}
and the single {{tld|citation}} template:
*<code><nowiki>{{Citation |last=McMillan |first=A. J. S. |last2=Horobin |first2=J. F. |year=1995 |title=Christmas Cacti: The Genus ''Schlumbergera'' and Its Hybrids |edition=p/b |publication-place=Sherbourne, Dorset, UK |publisher=David Hunt |isbn=978-0-9517234-6-3}}</nowiki></code>
*:{{Citation |last=McMillan |first=A. J. S. |last2=Horobin |first2=J. F. |year=1995 |title=Christmas Cacti: The Genus ''Schlumbergera'' and Its Hybrids |edition=p/b |publication-place=Sherbourne, Dorset, UK |publisher=David Hunt |isbn=978-0-9517234-6-3}}
==Error messages==
{{tld|harvc}} emits these error messages:<!--
:<span style="font-size:100%" class="error">harvc: {{para|anchor-year|plain=yes}} missing dab.</span>
::when used, {{para|anchor-year}} must include a single, lowercase letter disambiguator -->
:<span style="font-size:100%" class="error">harvc: author missing from source list.</span>
::the source list parameters {{para|in1}}, {{para|in2}}, {{para|in3}}, and {{para|in4}} form the template's <code>CITEREF</code> link to the full citation. All are not required but must be used in order without numerical gaps.
:<span style="font-size:100%" class="error">harvc: invalid {{para|anchor-year|plain=yes}}.</span>
::when used, {{para|anchor-year}} must be a three- or four-digit number and must have a lowercase <code>CITEREF</code> disambiguator. When the source does not have an identifiable year, use {{para|anchor-year|n.d.{{var|l}}}} or {{para|anchor-year|nd{{var|l}}}} with lowercase <code>CITEREF</code> disambiguator.
:<span style="font-size:100%" class="error">harvc: invalid {{para|display-authors|plain=yes}}.</span>
::the value assigned to {{para|display-authors}} must be a number greater than 0 or the keyword <code>etal</code>
:<span style="font-size:100%" class="error">harvc: invalid {{para|year|plain=yes}}.</span>
::{{para|year}} is an integral part of the template's <code>CITEREF</code> anchor and link. The value of {{para|year}} must be a three- or four-digit number with an optional lowercase <code>CITEREF</code> disambiguator. When the source does not have an identifiable year, use {{para|year|n.d.}} or {{para|year|nd}}.
:<span style="font-size:100%" class="error">harvc: missing {{para|year|plain=yes}}.</span>
::{{para|year}} is missing; the parameter is required.
:<span style="font-size:100%" class="error">harvc: no authors in contributor list.</span>
::this error message indicates that {{tld|harvc}} can't find any of {{para|last}}, {{para|last1}}, {{para|author}} or {{para|author1}} with an assigned value and so cannot make a usable <code>CITEREF</code> anchor. Add at least one of the listed parameters.
:<span style="font-size:100%" class="error">harvc: required contribution is missing.</span>
::this error message indicates that {{tld|harvc}} can't find any of {{para|c}}, {{para|chapter}}, or {{para|contribution}} with an assigned value
:<span style="font-size:100%" class="error">harvc: required {{para|id|plain=yes}} parameter missing.</span>
::this error message is emitted when the {{tld|harvc}} template's <code>CITEREF</code> anchor identifier would conflict with the long-form citation's <code>CITEREF</code> anchor identifier. See [[#Avoiding circular reference|Examples]]
:<span style="font-size:100%" class="error">harvc: {{para|year|plain=yes}} / {{para|anchor-year|plain=yes}} mismatch.</span>
::the year portion of {{para|anchor-year|YYYY{{var|l}}}} must match the year given in {{para|year|YYYY}}
<includeonly>{{Sandbox other||
<!-- Categories below this line, please; interwikis at Wikidata -->
[[Category:Citation utility templates]]
}}</includeonly>
asgvsprplsi0a30jiez1g1p475enopd
801797
801796
2021-01-16T02:35:26Z
en>Matthiaspaul
0
updated doc
801797
wikitext
text/x-wiki
{{Documentation subpage}}
<!-- Place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
{{lua|Module:Harvc}}
{{uses TemplateStyles|Module:Citation/CS1/styles.css|noprotcat=yes}}
This template is a citation hybrid that has characteristics of the long-form [[Help:Citation Style 1|cs1]] and [[Help:Citation Style 2|cs2]] and characteristics of short-form {{tlx|sfn}} and the {{tlx|harv}} families of templates. Its purpose is to provide a method that allows editors to refer to a contribution or chapter in a larger work when more than a few such referrals are required. {{tld|harvc}} is not a substitute for a properly constructed citation.
Short-form templates {{tld|sfn}} and {{tld|harv}} are often used to link from an article's references section to a long-form cs1|2 template in a bibliography section:
:{{tld|sfn}} → {{tlx|cite book}}
It is not uncommon for a source have multiple contributors. When it is necessary to refer to multiple contributions in the same source, repeating all of the bibliographic details in multiple long-form citation templates adds to references-section clutter. {{tld|harvc}} is designed to hold only the detail necessary to identify a contribution and link to the enclosing work's long-form citation where all of the bibliographic detail can be found:
:{{tld|sfn}} → {{tld|harvc}} → {{tld|cite book}}
== Usage ==
The minimal form is:
:<code><nowiki>{{harvc |last=contributor name |year=publication year |c=contribution title |in=source editor/author name}}</nowiki></code>
===Parameters===
{{tld|harvc}} creates a <code>CITEREF</code> anchor from one to four contribution or chapter author surnames ({{para|last''n''}}) and the value in {{para|year}}. This allows {{tld|harvc}} to be the target of a link created by {{tlx|sfn}} or {{tld|harv}} family templates. From {{para|in{{var|n}}}} and {{para|year}}, {{tld|harvc}} creates a CITEREF link similar to those created by {{tlx|harvnb}} and {{tlx|sfn}}
: '''|anchor-year=''' – optional, for use for author(s) with more than one contribution to the work; requires CITEREF disambiguator; see [[#More than one contribution|Examples]]
: '''|author-link=''' – optional, title of existing Wikipedia article about the first contributor—not the contributor's website; do not wikilink; alias: '''|author-link1='''
:: '''|author-link''n''=''' – optional, title of existing Wikipedia article about contributor''n''; choose ''n'' to match ''n'' in '''|last''n''='''
: '''|author-mask=''m''''' – optional, replaces name of the first contributor with ''m'' (commonly 2) em dashes; alias: '''|author-mask1='''
:: '''|author-mask''n''=''m''''' – optional, replaces name of contributor''n'' with ''m'' em dashes; choose ''n'' to match ''n'' in '''|last''n''='''
:: '''|author-mask{{var|n}}=<{{var|text}}>''' – optional, replaces name of contributor''n'' with <{{var|text}}>
: '''|c=''' – required, the title of chapter or contribution; rendered quoted in upright font; aliases: '''|chapter=''', '''|contribution='''
: '''|display-authors=''' – optional, defines how {{tld|harvc}} displays the contributor list; ignored when '''|name-list-style=harv''':
:: {{para|display-authors}} – when empty or omitted, displays all contributor names in last/first format
:: {{para|display-authors|{{var|n}}}} – displays ''n'' contributor names in last/first format; appends et al. when ''n'' is less than the number of contributors included in the template
:: {{para|display-authors|etal}} – displays all contributor names in last/first format and appends et al.
: '''|first=''' – optional, first contributor's given or first name; alias: '''|first1='''
:: '''|first''n''=''' – optional, contributor''n'' given or first name; ''n'' begins at 2 and increases by 1 for each additional '''|first''n''='''
: '''|id=''' – required when {{para|last1}}-{{para|last4}} are the same as {{para|in1}}-{{para|in4}}; otherwise optional. See [[#Avoiding circular reference|Examples]]
: '''|in=''' – required, surname or last name of first editor or author of the work that includes the contribution; aliases: '''|in1='''
: '''|in2=''' – optional, surname or last name of second editor or author
: '''|in3=''' – optional, surname or last name of third editor or author
: '''|in4=''' – optional, surname or last name of fourth editor or author
: '''|last=''' – required, surname or last name of first author; aliases: '''|last1='''
:: '''|last''n''=''' – optional, contributor''n'' surname or last name; ''n'' begins at 2 and increases by 1 for each additional '''|last''n''=''';
: '''|loc=''' – optional, other location identifier, displays after {{para|p}} or {{para|pp}}
: '''|mode=''' – controls rendered display to match that of adjacent CS1 or CS2 citations; defaults to CS1 style
:: '''|mode=cs2''' – mimic {{tlx|citation}} style (comma separators, no terminal punctuation, static text not capitalized)
: '''|name-list-style=''' – optional, controls contributor name list display style
:: '''|name-list-style=harv''' – mimic {{tld|sfn}} or {{tld|harv}} format (one to four last names); overrides '''|display-authors='''
:: '''|name-list-style=amp''' – inserts an ampersand between the last two contributor names
: '''|nb=''' – optional, when set to <code>yes</code>, instructs {{tld|harvc}} to render source link with out parentheses around the year; same format as that produced by {{tlx|harvnb}}
: '''|p=''' – optional, single page number where cited material can be found
: '''|pp=''' – optional, multiple page numbers, page ranges, etc where cited material can be found
: '''|ps=''' – optional, sets terminal punctuation; default is full stop; overrides '''|mode=cs2'''; aliases: '''|postscript='''
:: '''|ps=none''' – renders output without terminal punctuation
: '''|url=''' – optional, URL of an online location where the text of the contribution can be found; aliases: '''|chapter-url''', '''|contribution-url'''
: '''|url-access=''' – optional, use when URL links to a source behind a registration barrier or paywall; inserts [[Help:Citation_Style_1#Registration_or_subscription_required|cs1{{pipe}}2 access icon]]; accepted values are: <code>limited</code>, <code>registration</code>, <code>subscription</code>
: '''|year=''' – required, publication year of the work that includes the contribution
===Examples===
When a Wikipedia article makes reference to a work that contains multiple chapters by different authors, bibliographies and reference sections can look rather cluttered:
* {{cite book |last=George |first=Ernest J. |last2=Read |first2=Ralph A. |last3=Johnson |first3=R. W. |last4=Ferber |first4=A. E. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Shelterbelts and Windbreaks |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=//archive.org/stream/yoa1957#page/n785/mode/1up |oclc=704186906}}
* {{cite book |last=Harper |first=V. L. |last2=Frank |first2=Bernard |last3=McQuilkin |first3=W. E. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Forest Practices and Productivity |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=//archive.org/stream/yoa1957#page/n803/mode/1up |oclc=704186906}}
* {{cite book |last=Stout |first=P. R. |last2=Johnson |first2=C. M. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Trace Elements |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=//archive.org/stream/yoa1957#page/n167/mode/1up |oclc=704186906}}
* {{cite book |last=Wadleigh |first=C. H. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Growth of Plants |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=//archive.org/stream/yoa1957#page/n57/mode/1up |oclc=704186906}}
As the list grows longer, the look becomes more cluttered with the unnecessarily repeated detail of full-length citations. With {{tld|harvc}} editors can link to shorter, less detailed contribution citations using standard implementations of {{tlx|sfn}} templates{{sfn|George|Read|Johnson|Ferber|1957}} and {{tlx|harv}} templates (like this: {{harv|Harper|Frank|McQuilkin|1957}} and also wrapped in {{tag|ref}} tags<ref>{{harvnb|Stout|Johnson|1957}}</ref>). {{tld|harvc}} may also be wrapped in {{tag|ref}} tags so that it becomes part of the article's References section.<ref>{{harvc|last=Benson|first=Ezra Taft|year=1957|chapter=Foreword|url=//archive.org/stream/yoa1957#page/n5/mode/1up|in=Stefferud|p=vi |loc=§2}}</ref>{{sfn|Wadleigh|1957}}
====Avoiding circular reference====
It may sometimes be necessary to cite a contribution of a source's editor or author such that {{para|last1}} through {{para|last4}} are the same as {{para|in1}} through {{para|in4}}, an editor's preface for example. Such citations can, depending on placement, cause {{tld|sfn}} or {{tld|harv}}-family references to link directly to the citation instead of to the {{tld|harvc}} template, or cause circular links ({{tld|harvc}} linking to itself because its <code>CITEREF</code> anchor identifier is the same as the citation's <code>CITEREF</code> anchor identifier). If {{para|id}} is set, {{tld|harvc}} will use it as an anchor identifier; if {{para|id}} is not set, {{tld|harvc}} will emit an error message when {{para|last1}} through {{para|last4}} are the same as {{para|in1}} through {{para|in4}}.
For example, to reference an editor's preface from article text, create a wikilink inside {{tag|ref}} tags:<ref>[[#Stefferud preface|Stefferud 1957]]</ref>
:<code><nowiki><ref>[[#Stefferud preface|Stefferud 1957]]</ref></nowiki></code>
Write a {{tld|harvc}} template with {{para|id|Stefferud preface}}
:<code><nowiki>{{harvc |last=Stefferud |first=A.|year=1957 |id=Stefferud preface |c=Preface |url=//archive.org/stream/yoa1957#page/n7/mode/1up |in=Stefferud}}</nowiki></code>
====Example references section====
{{reflist}}
====Example bibliography section====
* {{cite book |title=Soil: The Yearbook of Agriculture 1957 |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |url=//archive.org/stream/yoa1957#page/n2/mode/1up |oclc=704186906 }}
** {{harvc |last=George |first=Ernest J. |last2=Read |last3=Johnson |last4=Ferber |year=1957 |contribution=Shelterbelts and Windbreaks |url=//archive.org/stream/yoa1957#page/n785/mode/1up |in=Stefferud}}
** {{harvc |last=Harper |first=V. L. |last2=Frank |last3=McQuilkin |year=1957 |contribution=Forest Practices and Productivity |url=//archive.org/stream/yoa1957#page/n803/mode/1up |in=Stefferud}}
** {{harvc |last=Stefferud |first=A.|year=1957 |id=Stefferud preface |c=Preface |url=//archive.org/stream/yoa1957#page/n7/mode/1up |in=Stefferud}}
** {{harvc |last=Stout |first=P. R. |last2=Johnson |year=1957 |c=Trace Elements |url=//archive.org/stream/yoa1957#page/n167/mode/1up |in=Stefferud}}
** {{harvc |last=Wadleigh |first=C. H.|year=1957 |c=Growth of Plants |url=//archive.org/stream/yoa1957#page/n57/mode/1up |in=Stefferud}}
====More than one contribution====
There are times when an author or authors will have contributed more than once to a work. When this occurs, it is necessary to disambiguate the CITEREF links from the {{tld|harv}} or {{tld|sfn}} templates to the CITEREF id of the appropriate {{tld|harvc}} template.
:{{tld|harv|Author|YYYYa}} → {{tld|harvc|Author|Contribution 1|YYYYa}} → {{tld|citation|...}}}
:{{tld|harv|Author|YYYYb}} → {{tld|harvc|Author|Contribution 2|YYYYb}} ↑
In this example, author David Hunt contributed two appendices to ''Christmas Cacti: The Genus ''Schlumbergera'' and Its Hybrids''.
There are two {{tlx|harvnb}} templates that are disambiguated:
:<code><nowiki>{{harvnb |Hunt |1995a}}</nowiki></code> → {{harvnb |Hunt |1995a}}
:<code><nowiki>{{harvnb |Hunt |1995b}}</nowiki></code> → {{harvnb |Hunt |1995b}}
These link to two {{tld|harvc}} templates which use {{para|anchor-year}} for their CITEREF id and for the date in the {{tld|harvc}} rendering as a visual aid for readers:
*<code><nowiki>{{harvc |in=McMillan |in2=Horobin |last=Hunt |first=David |c=Appendix I Names and synonyms of the species, subspecies and interspecific hybrids |year=1995 |anchor-year=1995a |mode=cs2 |nb=yes}}</nowiki></code>
*:{{harvc |in=McMillan |in2=Horobin |last=Hunt |first=David |c=Appendix I Names and synonyms of the species, subspecies and interspecific hybrids |year=1995 |anchor-year=1995a |mode=cs2 |nb=yes}}
*<code><nowiki>{{harvc |in=McMillan |in2=Horobin |last=Hunt |first=David |c=Appendix III Excerpts from a Brazilian diary |year=1995 |anchor-year=1995b |mode=cs2 |nb=yes}}</nowiki></code>
*:{{harvc |in=McMillan |in2=Horobin |last=Hunt |first=David |c=Appendix III Excerpts from a Brazilian diary |year=1995 |anchor-year=1995b |mode=cs2 |nb=yes}}
and the single {{tld|citation}} template:
*<code><nowiki>{{Citation |last=McMillan |first=A. J. S. |last2=Horobin |first2=J. F. |year=1995 |title=Christmas Cacti: The Genus ''Schlumbergera'' and Its Hybrids |edition=p/b |publication-place=Sherbourne, Dorset, UK |publisher=David Hunt |isbn=978-0-9517234-6-3}}</nowiki></code>
*:{{Citation |last=McMillan |first=A. J. S. |last2=Horobin |first2=J. F. |year=1995 |title=Christmas Cacti: The Genus ''Schlumbergera'' and Its Hybrids |edition=p/b |publication-place=Sherbourne, Dorset, UK |publisher=David Hunt |isbn=978-0-9517234-6-3}}
==Error messages==
{{tld|harvc}} emits these error messages:<!--
:<span style="font-size:100%" class="error">harvc: {{para|anchor-year|plain=yes}} missing dab.</span>
::when used, {{para|anchor-year}} must include a single, lowercase letter disambiguator -->
:<span style="font-size:100%" class="error">harvc: author missing from source list.</span>
::the source list parameters {{para|in1}}, {{para|in2}}, {{para|in3}}, and {{para|in4}} form the template's <code>CITEREF</code> link to the full citation. All are not required but must be used in order without numerical gaps.
:<span style="font-size:100%" class="error">harvc: invalid {{para|anchor-year|plain=yes}}.</span>
::when used, {{para|anchor-year}} must be a three- or four-digit number and must have a lowercase <code>CITEREF</code> disambiguator. When the source does not have an identifiable year, use {{para|anchor-year|n.d.{{var|l}}}} or {{para|anchor-year|nd{{var|l}}}} with lowercase <code>CITEREF</code> disambiguator.
:<span style="font-size:100%" class="error">harvc: invalid {{para|display-authors|plain=yes}}.</span>
::the value assigned to {{para|display-authors}} must be a number greater than 0 or the keyword <code>etal</code>
:<span style="font-size:100%" class="error">harvc: invalid {{para|year|plain=yes}}.</span>
::{{para|year}} is an integral part of the template's <code>CITEREF</code> anchor and link. The value of {{para|year}} must be a three- or four-digit number with an optional lowercase <code>CITEREF</code> disambiguator. When the source does not have an identifiable year, use {{para|year|n.d.}} or {{para|year|nd}}.
:<span style="font-size:100%" class="error">harvc: missing {{para|year|plain=yes}}.</span>
::{{para|year}} is missing; the parameter is required.
:<span style="font-size:100%" class="error">harvc: no authors in contributor list.</span>
::this error message indicates that {{tld|harvc}} can't find any of {{para|last}}, {{para|last1}}, {{para|author}} or {{para|author1}} with an assigned value and so cannot make a usable <code>CITEREF</code> anchor. Add at least one of the listed parameters.
:<span style="font-size:100%" class="error">harvc: required contribution is missing.</span>
::this error message indicates that {{tld|harvc}} can't find any of {{para|c}}, {{para|chapter}}, or {{para|contribution}} with an assigned value
:<span style="font-size:100%" class="error">harvc: required {{para|id|plain=yes}} parameter missing.</span>
::this error message is emitted when the {{tld|harvc}} template's <code>CITEREF</code> anchor identifier would conflict with the long-form citation's <code>CITEREF</code> anchor identifier. See [[#Avoiding circular reference|Examples]]
:<span style="font-size:100%" class="error">harvc: {{para|year|plain=yes}} / {{para|anchor-year|plain=yes}} mismatch.</span>
::the year portion of {{para|anchor-year|YYYY{{var|l}}}} must match the year given in {{para|year|YYYY}}
<includeonly>{{Sandbox other||
<!-- Categories below this line, please; interwikis at Wikidata -->
[[Category:Citation utility templates]]
}}</includeonly>
lgm0muajvzx7tx48ptx9vxlm2xjjkqo
801798
801797
2021-04-05T11:09:48Z
en>Trappist the monk
0
/* Parameters */
801798
wikitext
text/x-wiki
{{Documentation subpage}}
<!-- Place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
{{lua|Module:Harvc}}
{{uses TemplateStyles|Module:Citation/CS1/styles.css|noprotcat=yes}}
This template is a citation hybrid that has characteristics of the long-form [[Help:Citation Style 1|cs1]] and [[Help:Citation Style 2|cs2]] and characteristics of short-form {{tlx|sfn}} and the {{tlx|harv}} families of templates. Its purpose is to provide a method that allows editors to refer to a contribution or chapter in a larger work when more than a few such referrals are required. {{tld|harvc}} is not a substitute for a properly constructed citation.
Short-form templates {{tld|sfn}} and {{tld|harv}} are often used to link from an article's references section to a long-form cs1|2 template in a bibliography section:
:{{tld|sfn}} → {{tlx|cite book}}
It is not uncommon for a source have multiple contributors. When it is necessary to refer to multiple contributions in the same source, repeating all of the bibliographic details in multiple long-form citation templates adds to references-section clutter. {{tld|harvc}} is designed to hold only the detail necessary to identify a contribution and link to the enclosing work's long-form citation where all of the bibliographic detail can be found:
:{{tld|sfn}} → {{tld|harvc}} → {{tld|cite book}}
== Usage ==
The minimal form is:
:<code><nowiki>{{harvc |last=contributor name |year=publication year |c=contribution title |in=source editor/author name}}</nowiki></code>
===Parameters===
{{tld|harvc}} creates a <code>CITEREF</code> anchor from one to four contribution or chapter author surnames ({{para|last''n''}}) and the value in {{para|year}}. This allows {{tld|harvc}} to be the target of a link created by {{tlx|sfn}} or {{tld|harv}} family templates. From {{para|in{{var|n}}}} and {{para|year}}, {{tld|harvc}} creates a CITEREF link similar to those created by {{tlx|harvnb}} and {{tlx|sfn}}
: '''|anchor-year=''' – optional, for use for author(s) with more than one contribution to the work; requires CITEREF disambiguator; see [[#More than one contribution|Examples]]
: '''|author-link=''' – optional, title of existing Wikipedia article about the first contributor—not the contributor's website; do not wikilink; alias: '''|author-link1='''
:: '''|author-link''n''=''' – optional, title of existing Wikipedia article about contributor''n''; choose ''n'' to match ''n'' in '''|last''n''='''
: '''|author-mask=''m''''' – optional, replaces name of the first contributor with ''m'' (commonly 2) em dashes; alias: '''|author-mask1='''
:: '''|author-mask''n''=''m''''' – optional, replaces name of contributor''n'' with ''m'' em dashes; choose ''n'' to match ''n'' in '''|last''n''='''
:: '''|author-mask{{var|n}}=<{{var|text}}>''' – optional, replaces name of contributor''n'' with <{{var|text}}>
: '''|c=''' – required, the title of chapter or contribution; rendered quoted in upright font; aliases: '''|chapter=''', '''|contribution='''
: '''|display-authors=''' – optional, defines how {{tld|harvc}} displays the contributor list; ignored when '''|name-list-style=harv''':
:: {{para|display-authors}} – when empty or omitted, displays all contributor names in last/first format
:: {{para|display-authors|{{var|n}}}} – displays ''n'' contributor names in last/first format; appends et al. when ''n'' is less than the number of contributors included in the template
:: {{para|display-authors|etal}} – displays all contributor names in last/first format and appends et al.
: '''|first=''' – optional, first contributor's given or first name; alias: '''|first1='''
:: '''|first''n''=''' – optional, contributor''n'' given or first name; ''n'' begins at 2 and increases by 1 for each additional '''|first''n''='''
: '''|id=''' – required when {{para|last1}}-{{para|last4}} are the same as {{para|in1}}-{{para|in4}}; otherwise optional. See [[#Avoiding circular reference|Examples]]
: '''|in=''' – required, surname or last name of first editor or author of the work that includes the contribution; aliases: '''|in1='''
: '''|in2=''' – optional, surname or last name of second editor or author
: '''|in3=''' – optional, surname or last name of third editor or author
: '''|in4=''' – optional, surname or last name of fourth editor or author
: '''|last=''' – required, surname or last name of first author; aliases: '''|last1='''
:: '''|last''n''=''' – optional, contributor''n'' surname or last name; ''n'' begins at 2 and increases by 1 for each additional '''|last''n''=''';
: '''|loc=''' – optional, other location identifier, displays after {{para|p}} or {{para|pp}}
: '''|mode=''' – controls rendered display to match that of adjacent CS1 or CS2 citations; defaults to CS1 style
:: '''|mode=cs2''' – mimic {{tlx|citation}} style (comma separators, no terminal punctuation, static text not capitalized)
: '''|name-list-style=''' – optional, controls contributor name list display style
:: '''|name-list-style=harv''' – mimic {{tld|sfn}} or {{tld|harv}} format (one to four last names); overrides '''|display-authors='''
:: '''|name-list-style=amp''' – inserts an ampersand between the last two contributor names
: '''|nb=''' – optional, when set to <code>yes</code>, instructs {{tld|harvc}} to render source link with out parentheses around the year; same format as that produced by {{tlx|harvnb}}
: '''|p=''' – optional, single page number where cited material can be found; aliases: '''|page='''
: '''|pp=''' – optional, multiple page numbers, page ranges, etc where cited material can be found; aliases: '''|pages='''
: '''|ps=''' – optional, sets terminal punctuation; default is full stop; overrides '''|mode=cs2'''; aliases: '''|postscript='''
:: '''|ps=none''' – renders output without terminal punctuation
: '''|url=''' – optional, URL of an online location where the text of the contribution can be found; aliases: '''|chapter-url''', '''|contribution-url'''
: '''|url-access=''' – optional, use when URL links to a source behind a registration barrier or paywall; inserts [[Help:Citation_Style_1#Registration_or_subscription_required|cs1{{pipe}}2 access icon]]; accepted values are: <code>limited</code>, <code>registration</code>, <code>subscription</code>
: '''|year=''' – required, publication year of the work that includes the contribution
===Examples===
When a Wikipedia article makes reference to a work that contains multiple chapters by different authors, bibliographies and reference sections can look rather cluttered:
* {{cite book |last=George |first=Ernest J. |last2=Read |first2=Ralph A. |last3=Johnson |first3=R. W. |last4=Ferber |first4=A. E. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Shelterbelts and Windbreaks |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=//archive.org/stream/yoa1957#page/n785/mode/1up |oclc=704186906}}
* {{cite book |last=Harper |first=V. L. |last2=Frank |first2=Bernard |last3=McQuilkin |first3=W. E. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Forest Practices and Productivity |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=//archive.org/stream/yoa1957#page/n803/mode/1up |oclc=704186906}}
* {{cite book |last=Stout |first=P. R. |last2=Johnson |first2=C. M. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Trace Elements |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=//archive.org/stream/yoa1957#page/n167/mode/1up |oclc=704186906}}
* {{cite book |last=Wadleigh |first=C. H. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Growth of Plants |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=//archive.org/stream/yoa1957#page/n57/mode/1up |oclc=704186906}}
As the list grows longer, the look becomes more cluttered with the unnecessarily repeated detail of full-length citations. With {{tld|harvc}} editors can link to shorter, less detailed contribution citations using standard implementations of {{tlx|sfn}} templates{{sfn|George|Read|Johnson|Ferber|1957}} and {{tlx|harv}} templates (like this: {{harv|Harper|Frank|McQuilkin|1957}} and also wrapped in {{tag|ref}} tags<ref>{{harvnb|Stout|Johnson|1957}}</ref>). {{tld|harvc}} may also be wrapped in {{tag|ref}} tags so that it becomes part of the article's References section.<ref>{{harvc|last=Benson|first=Ezra Taft|year=1957|chapter=Foreword|url=//archive.org/stream/yoa1957#page/n5/mode/1up|in=Stefferud|p=vi |loc=§2}}</ref>{{sfn|Wadleigh|1957}}
====Avoiding circular reference====
It may sometimes be necessary to cite a contribution of a source's editor or author such that {{para|last1}} through {{para|last4}} are the same as {{para|in1}} through {{para|in4}}, an editor's preface for example. Such citations can, depending on placement, cause {{tld|sfn}} or {{tld|harv}}-family references to link directly to the citation instead of to the {{tld|harvc}} template, or cause circular links ({{tld|harvc}} linking to itself because its <code>CITEREF</code> anchor identifier is the same as the citation's <code>CITEREF</code> anchor identifier). If {{para|id}} is set, {{tld|harvc}} will use it as an anchor identifier; if {{para|id}} is not set, {{tld|harvc}} will emit an error message when {{para|last1}} through {{para|last4}} are the same as {{para|in1}} through {{para|in4}}.
For example, to reference an editor's preface from article text, create a wikilink inside {{tag|ref}} tags:<ref>[[#Stefferud preface|Stefferud 1957]]</ref>
:<code><nowiki><ref>[[#Stefferud preface|Stefferud 1957]]</ref></nowiki></code>
Write a {{tld|harvc}} template with {{para|id|Stefferud preface}}
:<code><nowiki>{{harvc |last=Stefferud |first=A.|year=1957 |id=Stefferud preface |c=Preface |url=//archive.org/stream/yoa1957#page/n7/mode/1up |in=Stefferud}}</nowiki></code>
====Example references section====
{{reflist}}
====Example bibliography section====
* {{cite book |title=Soil: The Yearbook of Agriculture 1957 |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |url=//archive.org/stream/yoa1957#page/n2/mode/1up |oclc=704186906 }}
** {{harvc |last=George |first=Ernest J. |last2=Read |last3=Johnson |last4=Ferber |year=1957 |contribution=Shelterbelts and Windbreaks |url=//archive.org/stream/yoa1957#page/n785/mode/1up |in=Stefferud}}
** {{harvc |last=Harper |first=V. L. |last2=Frank |last3=McQuilkin |year=1957 |contribution=Forest Practices and Productivity |url=//archive.org/stream/yoa1957#page/n803/mode/1up |in=Stefferud}}
** {{harvc |last=Stefferud |first=A.|year=1957 |id=Stefferud preface |c=Preface |url=//archive.org/stream/yoa1957#page/n7/mode/1up |in=Stefferud}}
** {{harvc |last=Stout |first=P. R. |last2=Johnson |year=1957 |c=Trace Elements |url=//archive.org/stream/yoa1957#page/n167/mode/1up |in=Stefferud}}
** {{harvc |last=Wadleigh |first=C. H.|year=1957 |c=Growth of Plants |url=//archive.org/stream/yoa1957#page/n57/mode/1up |in=Stefferud}}
====More than one contribution====
There are times when an author or authors will have contributed more than once to a work. When this occurs, it is necessary to disambiguate the CITEREF links from the {{tld|harv}} or {{tld|sfn}} templates to the CITEREF id of the appropriate {{tld|harvc}} template.
:{{tld|harv|Author|YYYYa}} → {{tld|harvc|Author|Contribution 1|YYYYa}} → {{tld|citation|...}}}
:{{tld|harv|Author|YYYYb}} → {{tld|harvc|Author|Contribution 2|YYYYb}} ↑
In this example, author David Hunt contributed two appendices to ''Christmas Cacti: The Genus ''Schlumbergera'' and Its Hybrids''.
There are two {{tlx|harvnb}} templates that are disambiguated:
:<code><nowiki>{{harvnb |Hunt |1995a}}</nowiki></code> → {{harvnb |Hunt |1995a}}
:<code><nowiki>{{harvnb |Hunt |1995b}}</nowiki></code> → {{harvnb |Hunt |1995b}}
These link to two {{tld|harvc}} templates which use {{para|anchor-year}} for their CITEREF id and for the date in the {{tld|harvc}} rendering as a visual aid for readers:
*<code><nowiki>{{harvc |in=McMillan |in2=Horobin |last=Hunt |first=David |c=Appendix I Names and synonyms of the species, subspecies and interspecific hybrids |year=1995 |anchor-year=1995a |mode=cs2 |nb=yes}}</nowiki></code>
*:{{harvc |in=McMillan |in2=Horobin |last=Hunt |first=David |c=Appendix I Names and synonyms of the species, subspecies and interspecific hybrids |year=1995 |anchor-year=1995a |mode=cs2 |nb=yes}}
*<code><nowiki>{{harvc |in=McMillan |in2=Horobin |last=Hunt |first=David |c=Appendix III Excerpts from a Brazilian diary |year=1995 |anchor-year=1995b |mode=cs2 |nb=yes}}</nowiki></code>
*:{{harvc |in=McMillan |in2=Horobin |last=Hunt |first=David |c=Appendix III Excerpts from a Brazilian diary |year=1995 |anchor-year=1995b |mode=cs2 |nb=yes}}
and the single {{tld|citation}} template:
*<code><nowiki>{{Citation |last=McMillan |first=A. J. S. |last2=Horobin |first2=J. F. |year=1995 |title=Christmas Cacti: The Genus ''Schlumbergera'' and Its Hybrids |edition=p/b |publication-place=Sherbourne, Dorset, UK |publisher=David Hunt |isbn=978-0-9517234-6-3}}</nowiki></code>
*:{{Citation |last=McMillan |first=A. J. S. |last2=Horobin |first2=J. F. |year=1995 |title=Christmas Cacti: The Genus ''Schlumbergera'' and Its Hybrids |edition=p/b |publication-place=Sherbourne, Dorset, UK |publisher=David Hunt |isbn=978-0-9517234-6-3}}
==Error messages==
{{tld|harvc}} emits these error messages:<!--
:<span style="font-size:100%" class="error">harvc: {{para|anchor-year|plain=yes}} missing dab.</span>
::when used, {{para|anchor-year}} must include a single, lowercase letter disambiguator -->
:<span style="font-size:100%" class="error">harvc: author missing from source list.</span>
::the source list parameters {{para|in1}}, {{para|in2}}, {{para|in3}}, and {{para|in4}} form the template's <code>CITEREF</code> link to the full citation. All are not required but must be used in order without numerical gaps.
:<span style="font-size:100%" class="error">harvc: invalid {{para|anchor-year|plain=yes}}.</span>
::when used, {{para|anchor-year}} must be a three- or four-digit number and must have a lowercase <code>CITEREF</code> disambiguator. When the source does not have an identifiable year, use {{para|anchor-year|n.d.{{var|l}}}} or {{para|anchor-year|nd{{var|l}}}} with lowercase <code>CITEREF</code> disambiguator.
:<span style="font-size:100%" class="error">harvc: invalid {{para|display-authors|plain=yes}}.</span>
::the value assigned to {{para|display-authors}} must be a number greater than 0 or the keyword <code>etal</code>
:<span style="font-size:100%" class="error">harvc: invalid {{para|year|plain=yes}}.</span>
::{{para|year}} is an integral part of the template's <code>CITEREF</code> anchor and link. The value of {{para|year}} must be a three- or four-digit number with an optional lowercase <code>CITEREF</code> disambiguator. When the source does not have an identifiable year, use {{para|year|n.d.}} or {{para|year|nd}}.
:<span style="font-size:100%" class="error">harvc: missing {{para|year|plain=yes}}.</span>
::{{para|year}} is missing; the parameter is required.
:<span style="font-size:100%" class="error">harvc: no authors in contributor list.</span>
::this error message indicates that {{tld|harvc}} can't find any of {{para|last}}, {{para|last1}}, {{para|author}} or {{para|author1}} with an assigned value and so cannot make a usable <code>CITEREF</code> anchor. Add at least one of the listed parameters.
:<span style="font-size:100%" class="error">harvc: required contribution is missing.</span>
::this error message indicates that {{tld|harvc}} can't find any of {{para|c}}, {{para|chapter}}, or {{para|contribution}} with an assigned value
:<span style="font-size:100%" class="error">harvc: required {{para|id|plain=yes}} parameter missing.</span>
::this error message is emitted when the {{tld|harvc}} template's <code>CITEREF</code> anchor identifier would conflict with the long-form citation's <code>CITEREF</code> anchor identifier. See [[#Avoiding circular reference|Examples]]
:<span style="font-size:100%" class="error">harvc: {{para|year|plain=yes}} / {{para|anchor-year|plain=yes}} mismatch.</span>
::the year portion of {{para|anchor-year|YYYY{{var|l}}}} must match the year given in {{para|year|YYYY}}
<includeonly>{{Sandbox other||
<!-- Categories below this line, please; interwikis at Wikidata -->
[[Category:Citation utility templates]]
}}</includeonly>
r5yp3b08pbxru3uo77glnhaz1ullogx
801799
801798
2021-06-20T15:03:02Z
en>Mirokado
0
ce: without
801799
wikitext
text/x-wiki
{{Documentation subpage}}
<!-- Place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
{{lua|Module:Harvc}}
{{uses TemplateStyles|Module:Citation/CS1/styles.css|noprotcat=yes}}
This template is a citation hybrid that has characteristics of the long-form [[Help:Citation Style 1|cs1]] and [[Help:Citation Style 2|cs2]] and characteristics of short-form {{tlx|sfn}} and the {{tlx|harv}} families of templates. Its purpose is to provide a method that allows editors to refer to a contribution or chapter in a larger work when more than a few such referrals are required. {{tld|harvc}} is not a substitute for a properly constructed citation.
Short-form templates {{tld|sfn}} and {{tld|harv}} are often used to link from an article's references section to a long-form cs1|2 template in a bibliography section:
:{{tld|sfn}} → {{tlx|cite book}}
It is not uncommon for a source have multiple contributors. When it is necessary to refer to multiple contributions in the same source, repeating all of the bibliographic details in multiple long-form citation templates adds to references-section clutter. {{tld|harvc}} is designed to hold only the detail necessary to identify a contribution and link to the enclosing work's long-form citation where all of the bibliographic detail can be found:
:{{tld|sfn}} → {{tld|harvc}} → {{tld|cite book}}
== Usage ==
The minimal form is:
:<code><nowiki>{{harvc |last=contributor name |year=publication year |c=contribution title |in=source editor/author name}}</nowiki></code>
===Parameters===
{{tld|harvc}} creates a <code>CITEREF</code> anchor from one to four contribution or chapter author surnames ({{para|last''n''}}) and the value in {{para|year}}. This allows {{tld|harvc}} to be the target of a link created by {{tlx|sfn}} or {{tld|harv}} family templates. From {{para|in{{var|n}}}} and {{para|year}}, {{tld|harvc}} creates a CITEREF link similar to those created by {{tlx|harvnb}} and {{tlx|sfn}}
: '''|anchor-year=''' – optional, for use for author(s) with more than one contribution to the work; requires CITEREF disambiguator; see [[#More than one contribution|Examples]]
: '''|author-link=''' – optional, title of existing Wikipedia article about the first contributor—not the contributor's website; do not wikilink; alias: '''|author-link1='''
:: '''|author-link''n''=''' – optional, title of existing Wikipedia article about contributor''n''; choose ''n'' to match ''n'' in '''|last''n''='''
: '''|author-mask=''m''''' – optional, replaces name of the first contributor with ''m'' (commonly 2) em dashes; alias: '''|author-mask1='''
:: '''|author-mask''n''=''m''''' – optional, replaces name of contributor''n'' with ''m'' em dashes; choose ''n'' to match ''n'' in '''|last''n''='''
:: '''|author-mask{{var|n}}=<{{var|text}}>''' – optional, replaces name of contributor''n'' with <{{var|text}}>
: '''|c=''' – required, the title of chapter or contribution; rendered quoted in upright font; aliases: '''|chapter=''', '''|contribution='''
: '''|display-authors=''' – optional, defines how {{tld|harvc}} displays the contributor list; ignored when '''|name-list-style=harv''':
:: {{para|display-authors}} – when empty or omitted, displays all contributor names in last/first format
:: {{para|display-authors|{{var|n}}}} – displays ''n'' contributor names in last/first format; appends et al. when ''n'' is less than the number of contributors included in the template
:: {{para|display-authors|etal}} – displays all contributor names in last/first format and appends et al.
: '''|first=''' – optional, first contributor's given or first name; alias: '''|first1='''
:: '''|first''n''=''' – optional, contributor''n'' given or first name; ''n'' begins at 2 and increases by 1 for each additional '''|first''n''='''
: '''|id=''' – required when {{para|last1}}-{{para|last4}} are the same as {{para|in1}}-{{para|in4}}; otherwise optional. See [[#Avoiding circular reference|Examples]]
: '''|in=''' – required, surname or last name of first editor or author of the work that includes the contribution; aliases: '''|in1='''
: '''|in2=''' – optional, surname or last name of second editor or author
: '''|in3=''' – optional, surname or last name of third editor or author
: '''|in4=''' – optional, surname or last name of fourth editor or author
: '''|last=''' – required, surname or last name of first author; aliases: '''|last1='''
:: '''|last''n''=''' – optional, contributor''n'' surname or last name; ''n'' begins at 2 and increases by 1 for each additional '''|last''n''=''';
: '''|loc=''' – optional, other location identifier, displays after {{para|p}} or {{para|pp}}
: '''|mode=''' – controls rendered display to match that of adjacent CS1 or CS2 citations; defaults to CS1 style
:: '''|mode=cs2''' – mimic {{tlx|citation}} style (comma separators, no terminal punctuation, static text not capitalized)
: '''|name-list-style=''' – optional, controls contributor name list display style
:: '''|name-list-style=harv''' – mimic {{tld|sfn}} or {{tld|harv}} format (one to four last names); overrides '''|display-authors='''
:: '''|name-list-style=amp''' – inserts an ampersand between the last two contributor names
: '''|nb=''' – optional, when set to <code>yes</code>, instructs {{tld|harvc}} to render source link without parentheses around the year; same format as that produced by {{tlx|harvnb}}
: '''|p=''' – optional, single page number where cited material can be found; aliases: '''|page='''
: '''|pp=''' – optional, multiple page numbers, page ranges, etc where cited material can be found; aliases: '''|pages='''
: '''|ps=''' – optional, sets terminal punctuation; default is full stop; overrides '''|mode=cs2'''; aliases: '''|postscript='''
:: '''|ps=none''' – renders output without terminal punctuation
: '''|url=''' – optional, URL of an online location where the text of the contribution can be found; aliases: '''|chapter-url''', '''|contribution-url'''
: '''|url-access=''' – optional, use when URL links to a source behind a registration barrier or paywall; inserts [[Help:Citation_Style_1#Registration_or_subscription_required|cs1{{pipe}}2 access icon]]; accepted values are: <code>limited</code>, <code>registration</code>, <code>subscription</code>
: '''|year=''' – required, publication year of the work that includes the contribution
===Examples===
When a Wikipedia article makes reference to a work that contains multiple chapters by different authors, bibliographies and reference sections can look rather cluttered:
* {{cite book |last=George |first=Ernest J. |last2=Read |first2=Ralph A. |last3=Johnson |first3=R. W. |last4=Ferber |first4=A. E. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Shelterbelts and Windbreaks |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=//archive.org/stream/yoa1957#page/n785/mode/1up |oclc=704186906}}
* {{cite book |last=Harper |first=V. L. |last2=Frank |first2=Bernard |last3=McQuilkin |first3=W. E. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Forest Practices and Productivity |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=//archive.org/stream/yoa1957#page/n803/mode/1up |oclc=704186906}}
* {{cite book |last=Stout |first=P. R. |last2=Johnson |first2=C. M. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Trace Elements |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=//archive.org/stream/yoa1957#page/n167/mode/1up |oclc=704186906}}
* {{cite book |last=Wadleigh |first=C. H. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Growth of Plants |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=//archive.org/stream/yoa1957#page/n57/mode/1up |oclc=704186906}}
As the list grows longer, the look becomes more cluttered with the unnecessarily repeated detail of full-length citations. With {{tld|harvc}} editors can link to shorter, less detailed contribution citations using standard implementations of {{tlx|sfn}} templates{{sfn|George|Read|Johnson|Ferber|1957}} and {{tlx|harv}} templates (like this: {{harv|Harper|Frank|McQuilkin|1957}} and also wrapped in {{tag|ref}} tags<ref>{{harvnb|Stout|Johnson|1957}}</ref>). {{tld|harvc}} may also be wrapped in {{tag|ref}} tags so that it becomes part of the article's References section.<ref>{{harvc|last=Benson|first=Ezra Taft|year=1957|chapter=Foreword|url=//archive.org/stream/yoa1957#page/n5/mode/1up|in=Stefferud|p=vi |loc=§2}}</ref>{{sfn|Wadleigh|1957}}
====Avoiding circular reference====
It may sometimes be necessary to cite a contribution of a source's editor or author such that {{para|last1}} through {{para|last4}} are the same as {{para|in1}} through {{para|in4}}, an editor's preface for example. Such citations can, depending on placement, cause {{tld|sfn}} or {{tld|harv}}-family references to link directly to the citation instead of to the {{tld|harvc}} template, or cause circular links ({{tld|harvc}} linking to itself because its <code>CITEREF</code> anchor identifier is the same as the citation's <code>CITEREF</code> anchor identifier). If {{para|id}} is set, {{tld|harvc}} will use it as an anchor identifier; if {{para|id}} is not set, {{tld|harvc}} will emit an error message when {{para|last1}} through {{para|last4}} are the same as {{para|in1}} through {{para|in4}}.
For example, to reference an editor's preface from article text, create a wikilink inside {{tag|ref}} tags:<ref>[[#Stefferud preface|Stefferud 1957]]</ref>
:<code><nowiki><ref>[[#Stefferud preface|Stefferud 1957]]</ref></nowiki></code>
Write a {{tld|harvc}} template with {{para|id|Stefferud preface}}
:<code><nowiki>{{harvc |last=Stefferud |first=A.|year=1957 |id=Stefferud preface |c=Preface |url=//archive.org/stream/yoa1957#page/n7/mode/1up |in=Stefferud}}</nowiki></code>
====Example references section====
{{reflist}}
====Example bibliography section====
* {{cite book |title=Soil: The Yearbook of Agriculture 1957 |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |url=//archive.org/stream/yoa1957#page/n2/mode/1up |oclc=704186906 }}
** {{harvc |last=George |first=Ernest J. |last2=Read |last3=Johnson |last4=Ferber |year=1957 |contribution=Shelterbelts and Windbreaks |url=//archive.org/stream/yoa1957#page/n785/mode/1up |in=Stefferud}}
** {{harvc |last=Harper |first=V. L. |last2=Frank |last3=McQuilkin |year=1957 |contribution=Forest Practices and Productivity |url=//archive.org/stream/yoa1957#page/n803/mode/1up |in=Stefferud}}
** {{harvc |last=Stefferud |first=A.|year=1957 |id=Stefferud preface |c=Preface |url=//archive.org/stream/yoa1957#page/n7/mode/1up |in=Stefferud}}
** {{harvc |last=Stout |first=P. R. |last2=Johnson |year=1957 |c=Trace Elements |url=//archive.org/stream/yoa1957#page/n167/mode/1up |in=Stefferud}}
** {{harvc |last=Wadleigh |first=C. H.|year=1957 |c=Growth of Plants |url=//archive.org/stream/yoa1957#page/n57/mode/1up |in=Stefferud}}
====More than one contribution====
There are times when an author or authors will have contributed more than once to a work. When this occurs, it is necessary to disambiguate the CITEREF links from the {{tld|harv}} or {{tld|sfn}} templates to the CITEREF id of the appropriate {{tld|harvc}} template.
:{{tld|harv|Author|YYYYa}} → {{tld|harvc|Author|Contribution 1|YYYYa}} → {{tld|citation|...}}}
:{{tld|harv|Author|YYYYb}} → {{tld|harvc|Author|Contribution 2|YYYYb}} ↑
In this example, author David Hunt contributed two appendices to ''Christmas Cacti: The Genus ''Schlumbergera'' and Its Hybrids''.
There are two {{tlx|harvnb}} templates that are disambiguated:
:<code><nowiki>{{harvnb |Hunt |1995a}}</nowiki></code> → {{harvnb |Hunt |1995a}}
:<code><nowiki>{{harvnb |Hunt |1995b}}</nowiki></code> → {{harvnb |Hunt |1995b}}
These link to two {{tld|harvc}} templates which use {{para|anchor-year}} for their CITEREF id and for the date in the {{tld|harvc}} rendering as a visual aid for readers:
*<code><nowiki>{{harvc |in=McMillan |in2=Horobin |last=Hunt |first=David |c=Appendix I Names and synonyms of the species, subspecies and interspecific hybrids |year=1995 |anchor-year=1995a |mode=cs2 |nb=yes}}</nowiki></code>
*:{{harvc |in=McMillan |in2=Horobin |last=Hunt |first=David |c=Appendix I Names and synonyms of the species, subspecies and interspecific hybrids |year=1995 |anchor-year=1995a |mode=cs2 |nb=yes}}
*<code><nowiki>{{harvc |in=McMillan |in2=Horobin |last=Hunt |first=David |c=Appendix III Excerpts from a Brazilian diary |year=1995 |anchor-year=1995b |mode=cs2 |nb=yes}}</nowiki></code>
*:{{harvc |in=McMillan |in2=Horobin |last=Hunt |first=David |c=Appendix III Excerpts from a Brazilian diary |year=1995 |anchor-year=1995b |mode=cs2 |nb=yes}}
and the single {{tld|citation}} template:
*<code><nowiki>{{Citation |last=McMillan |first=A. J. S. |last2=Horobin |first2=J. F. |year=1995 |title=Christmas Cacti: The Genus ''Schlumbergera'' and Its Hybrids |edition=p/b |publication-place=Sherbourne, Dorset, UK |publisher=David Hunt |isbn=978-0-9517234-6-3}}</nowiki></code>
*:{{Citation |last=McMillan |first=A. J. S. |last2=Horobin |first2=J. F. |year=1995 |title=Christmas Cacti: The Genus ''Schlumbergera'' and Its Hybrids |edition=p/b |publication-place=Sherbourne, Dorset, UK |publisher=David Hunt |isbn=978-0-9517234-6-3}}
==Error messages==
{{tld|harvc}} emits these error messages:<!--
:<span style="font-size:100%" class="error">harvc: {{para|anchor-year|plain=yes}} missing dab.</span>
::when used, {{para|anchor-year}} must include a single, lowercase letter disambiguator -->
:<span style="font-size:100%" class="error">harvc: author missing from source list.</span>
::the source list parameters {{para|in1}}, {{para|in2}}, {{para|in3}}, and {{para|in4}} form the template's <code>CITEREF</code> link to the full citation. All are not required but must be used in order without numerical gaps.
:<span style="font-size:100%" class="error">harvc: invalid {{para|anchor-year|plain=yes}}.</span>
::when used, {{para|anchor-year}} must be a three- or four-digit number and must have a lowercase <code>CITEREF</code> disambiguator. When the source does not have an identifiable year, use {{para|anchor-year|n.d.{{var|l}}}} or {{para|anchor-year|nd{{var|l}}}} with lowercase <code>CITEREF</code> disambiguator.
:<span style="font-size:100%" class="error">harvc: invalid {{para|display-authors|plain=yes}}.</span>
::the value assigned to {{para|display-authors}} must be a number greater than 0 or the keyword <code>etal</code>
:<span style="font-size:100%" class="error">harvc: invalid {{para|year|plain=yes}}.</span>
::{{para|year}} is an integral part of the template's <code>CITEREF</code> anchor and link. The value of {{para|year}} must be a three- or four-digit number with an optional lowercase <code>CITEREF</code> disambiguator. When the source does not have an identifiable year, use {{para|year|n.d.}} or {{para|year|nd}}.
:<span style="font-size:100%" class="error">harvc: missing {{para|year|plain=yes}}.</span>
::{{para|year}} is missing; the parameter is required.
:<span style="font-size:100%" class="error">harvc: no authors in contributor list.</span>
::this error message indicates that {{tld|harvc}} can't find any of {{para|last}}, {{para|last1}}, {{para|author}} or {{para|author1}} with an assigned value and so cannot make a usable <code>CITEREF</code> anchor. Add at least one of the listed parameters.
:<span style="font-size:100%" class="error">harvc: required contribution is missing.</span>
::this error message indicates that {{tld|harvc}} can't find any of {{para|c}}, {{para|chapter}}, or {{para|contribution}} with an assigned value
:<span style="font-size:100%" class="error">harvc: required {{para|id|plain=yes}} parameter missing.</span>
::this error message is emitted when the {{tld|harvc}} template's <code>CITEREF</code> anchor identifier would conflict with the long-form citation's <code>CITEREF</code> anchor identifier. See [[#Avoiding circular reference|Examples]]
:<span style="font-size:100%" class="error">harvc: {{para|year|plain=yes}} / {{para|anchor-year|plain=yes}} mismatch.</span>
::the year portion of {{para|anchor-year|YYYY{{var|l}}}} must match the year given in {{para|year|YYYY}}
<includeonly>{{Sandbox other||
<!-- Categories below this line, please; interwikis at Wikidata -->
[[Category:Citation utility templates]]
}}</includeonly>
pyz8alnn1r7j7ochpu5ff800251qmf4
801800
801799
2021-10-05T00:55:07Z
en>StarryGrandma
0
/* Examples */ experiment with suppressing red error messages using |ignore-err=yes
801800
wikitext
text/x-wiki
{{Documentation subpage}}
<!-- Place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
{{lua|Module:Harvc}}
{{uses TemplateStyles|Module:Citation/CS1/styles.css|noprotcat=yes}}
This template is a citation hybrid that has characteristics of the long-form [[Help:Citation Style 1|cs1]] and [[Help:Citation Style 2|cs2]] and characteristics of short-form {{tlx|sfn}} and the {{tlx|harv}} families of templates. Its purpose is to provide a method that allows editors to refer to a contribution or chapter in a larger work when more than a few such referrals are required. {{tld|harvc}} is not a substitute for a properly constructed citation.
Short-form templates {{tld|sfn}} and {{tld|harv}} are often used to link from an article's references section to a long-form cs1|2 template in a bibliography section:
:{{tld|sfn}} → {{tlx|cite book}}
It is not uncommon for a source have multiple contributors. When it is necessary to refer to multiple contributions in the same source, repeating all of the bibliographic details in multiple long-form citation templates adds to references-section clutter. {{tld|harvc}} is designed to hold only the detail necessary to identify a contribution and link to the enclosing work's long-form citation where all of the bibliographic detail can be found:
:{{tld|sfn}} → {{tld|harvc}} → {{tld|cite book}}
== Usage ==
The minimal form is:
:<code><nowiki>{{harvc |last=contributor name |year=publication year |c=contribution title |in=source editor/author name}}</nowiki></code>
===Parameters===
{{tld|harvc}} creates a <code>CITEREF</code> anchor from one to four contribution or chapter author surnames ({{para|last''n''}}) and the value in {{para|year}}. This allows {{tld|harvc}} to be the target of a link created by {{tlx|sfn}} or {{tld|harv}} family templates. From {{para|in{{var|n}}}} and {{para|year}}, {{tld|harvc}} creates a CITEREF link similar to those created by {{tlx|harvnb}} and {{tlx|sfn}}
: '''|anchor-year=''' – optional, for use for author(s) with more than one contribution to the work; requires CITEREF disambiguator; see [[#More than one contribution|Examples]]
: '''|author-link=''' – optional, title of existing Wikipedia article about the first contributor—not the contributor's website; do not wikilink; alias: '''|author-link1='''
:: '''|author-link''n''=''' – optional, title of existing Wikipedia article about contributor''n''; choose ''n'' to match ''n'' in '''|last''n''='''
: '''|author-mask=''m''''' – optional, replaces name of the first contributor with ''m'' (commonly 2) em dashes; alias: '''|author-mask1='''
:: '''|author-mask''n''=''m''''' – optional, replaces name of contributor''n'' with ''m'' em dashes; choose ''n'' to match ''n'' in '''|last''n''='''
:: '''|author-mask{{var|n}}=<{{var|text}}>''' – optional, replaces name of contributor''n'' with <{{var|text}}>
: '''|c=''' – required, the title of chapter or contribution; rendered quoted in upright font; aliases: '''|chapter=''', '''|contribution='''
: '''|display-authors=''' – optional, defines how {{tld|harvc}} displays the contributor list; ignored when '''|name-list-style=harv''':
:: {{para|display-authors}} – when empty or omitted, displays all contributor names in last/first format
:: {{para|display-authors|{{var|n}}}} – displays ''n'' contributor names in last/first format; appends et al. when ''n'' is less than the number of contributors included in the template
:: {{para|display-authors|etal}} – displays all contributor names in last/first format and appends et al.
: '''|first=''' – optional, first contributor's given or first name; alias: '''|first1='''
:: '''|first''n''=''' – optional, contributor''n'' given or first name; ''n'' begins at 2 and increases by 1 for each additional '''|first''n''='''
: '''|id=''' – required when {{para|last1}}-{{para|last4}} are the same as {{para|in1}}-{{para|in4}}; otherwise optional. See [[#Avoiding circular reference|Examples]]
: '''|in=''' – required, surname or last name of first editor or author of the work that includes the contribution; aliases: '''|in1='''
: '''|in2=''' – optional, surname or last name of second editor or author
: '''|in3=''' – optional, surname or last name of third editor or author
: '''|in4=''' – optional, surname or last name of fourth editor or author
: '''|last=''' – required, surname or last name of first author; aliases: '''|last1='''
:: '''|last''n''=''' – optional, contributor''n'' surname or last name; ''n'' begins at 2 and increases by 1 for each additional '''|last''n''=''';
: '''|loc=''' – optional, other location identifier, displays after {{para|p}} or {{para|pp}}
: '''|mode=''' – controls rendered display to match that of adjacent CS1 or CS2 citations; defaults to CS1 style
:: '''|mode=cs2''' – mimic {{tlx|citation}} style (comma separators, no terminal punctuation, static text not capitalized)
: '''|name-list-style=''' – optional, controls contributor name list display style
:: '''|name-list-style=harv''' – mimic {{tld|sfn}} or {{tld|harv}} format (one to four last names); overrides '''|display-authors='''
:: '''|name-list-style=amp''' – inserts an ampersand between the last two contributor names
: '''|nb=''' – optional, when set to <code>yes</code>, instructs {{tld|harvc}} to render source link without parentheses around the year; same format as that produced by {{tlx|harvnb}}
: '''|p=''' – optional, single page number where cited material can be found; aliases: '''|page='''
: '''|pp=''' – optional, multiple page numbers, page ranges, etc where cited material can be found; aliases: '''|pages='''
: '''|ps=''' – optional, sets terminal punctuation; default is full stop; overrides '''|mode=cs2'''; aliases: '''|postscript='''
:: '''|ps=none''' – renders output without terminal punctuation
: '''|url=''' – optional, URL of an online location where the text of the contribution can be found; aliases: '''|chapter-url''', '''|contribution-url'''
: '''|url-access=''' – optional, use when URL links to a source behind a registration barrier or paywall; inserts [[Help:Citation_Style_1#Registration_or_subscription_required|cs1{{pipe}}2 access icon]]; accepted values are: <code>limited</code>, <code>registration</code>, <code>subscription</code>
: '''|year=''' – required, publication year of the work that includes the contribution
===Examples===
When a Wikipedia article makes reference to a work that contains multiple chapters by different authors, bibliographies and reference sections can look rather cluttered:
* {{cite book |last=George |first=Ernest J. |last2=Read |first2=Ralph A. |last3=Johnson |first3=R. W. |last4=Ferber |first4=A. E. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Shelterbelts and Windbreaks |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=//archive.org/stream/yoa1957#page/n785/mode/1up |oclc=704186906}}
* {{cite book |last=Harper |first=V. L. |last2=Frank |first2=Bernard |last3=McQuilkin |first3=W. E. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Forest Practices and Productivity |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=//archive.org/stream/yoa1957#page/n803/mode/1up |oclc=704186906}}
* {{cite book |last=Stout |first=P. R. |last2=Johnson |first2=C. M. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Trace Elements |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=//archive.org/stream/yoa1957#page/n167/mode/1up |oclc=704186906}}
* {{cite book |last=Wadleigh |first=C. H. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Growth of Plants |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=//archive.org/stream/yoa1957#page/n57/mode/1up |oclc=704186906}}
As the list grows longer, the look becomes more cluttered with the unnecessarily repeated detail of full-length citations. With {{tld|harvc}} editors can link to shorter, less detailed contribution citations using standard implementations of {{tlx|sfn}} templates{{sfn|George|Read|Johnson|Ferber|1957}} and {{tlx|harv}} templates (like this: {{harv|Harper|Frank|McQuilkin|1957}} and also wrapped in {{tag|ref}} tags<ref>{{harvnb|Stout|Johnson|1957}}</ref>). {{tld|harvc}} may also be wrapped in {{tag|ref}} tags so that it becomes part of the article's References section.<ref>{{harvc|last=Benson|first=Ezra Taft|year=1957|chapter=Foreword|url=//archive.org/stream/yoa1957#page/n5/mode/1up|in=Stefferud|p=vi |loc=§2 |ignore-err=yes}}</ref>{{sfn|Wadleigh|1957}}
====Avoiding circular reference====
It may sometimes be necessary to cite a contribution of a source's editor or author such that {{para|last1}} through {{para|last4}} are the same as {{para|in1}} through {{para|in4}}, an editor's preface for example. Such citations can, depending on placement, cause {{tld|sfn}} or {{tld|harv}}-family references to link directly to the citation instead of to the {{tld|harvc}} template, or cause circular links ({{tld|harvc}} linking to itself because its <code>CITEREF</code> anchor identifier is the same as the citation's <code>CITEREF</code> anchor identifier). If {{para|id}} is set, {{tld|harvc}} will use it as an anchor identifier; if {{para|id}} is not set, {{tld|harvc}} will emit an error message when {{para|last1}} through {{para|last4}} are the same as {{para|in1}} through {{para|in4}}.
For example, to reference an editor's preface from article text, create a wikilink inside {{tag|ref}} tags:<ref>[[#Stefferud preface|Stefferud 1957]]</ref>
:<code><nowiki><ref>[[#Stefferud preface|Stefferud 1957]]</ref></nowiki></code>
Write a {{tld|harvc}} template with {{para|id|Stefferud preface}}
:<code><nowiki>{{harvc |last=Stefferud |first=A.|year=1957 |id=Stefferud preface |c=Preface |url=//archive.org/stream/yoa1957#page/n7/mode/1up |in=Stefferud}}</nowiki></code>
====Example references section====
{{reflist}}
====Example bibliography section====
* {{cite book |title=Soil: The Yearbook of Agriculture 1957 |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |url=//archive.org/stream/yoa1957#page/n2/mode/1up |oclc=704186906 }}
** {{harvc |last=George |first=Ernest J. |last2=Read |last3=Johnson |last4=Ferber |year=1957 |contribution=Shelterbelts and Windbreaks |url=//archive.org/stream/yoa1957#page/n785/mode/1up |in=Stefferud}}
** {{harvc |last=Harper |first=V. L. |last2=Frank |last3=McQuilkin |year=1957 |contribution=Forest Practices and Productivity |url=//archive.org/stream/yoa1957#page/n803/mode/1up |in=Stefferud}}
** {{harvc |last=Stefferud |first=A.|year=1957 |id=Stefferud preface |c=Preface |url=//archive.org/stream/yoa1957#page/n7/mode/1up |in=Stefferud}}
** {{harvc |last=Stout |first=P. R. |last2=Johnson |year=1957 |c=Trace Elements |url=//archive.org/stream/yoa1957#page/n167/mode/1up |in=Stefferud}}
** {{harvc |last=Wadleigh |first=C. H.|year=1957 |c=Growth of Plants |url=//archive.org/stream/yoa1957#page/n57/mode/1up |in=Stefferud}}
====More than one contribution====
There are times when an author or authors will have contributed more than once to a work. When this occurs, it is necessary to disambiguate the CITEREF links from the {{tld|harv}} or {{tld|sfn}} templates to the CITEREF id of the appropriate {{tld|harvc}} template.
:{{tld|harv|Author|YYYYa}} → {{tld|harvc|Author|Contribution 1|YYYYa}} → {{tld|citation|...}}}
:{{tld|harv|Author|YYYYb}} → {{tld|harvc|Author|Contribution 2|YYYYb}} ↑
In this example, author David Hunt contributed two appendices to ''Christmas Cacti: The Genus ''Schlumbergera'' and Its Hybrids''.
There are two {{tlx|harvnb}} templates that are disambiguated:
:<code><nowiki>{{harvnb |Hunt |1995a}}</nowiki></code> → {{harvnb |Hunt |1995a}}
:<code><nowiki>{{harvnb |Hunt |1995b}}</nowiki></code> → {{harvnb |Hunt |1995b}}
These link to two {{tld|harvc}} templates which use {{para|anchor-year}} for their CITEREF id and for the date in the {{tld|harvc}} rendering as a visual aid for readers:
*<code><nowiki>{{harvc |in=McMillan |in2=Horobin |last=Hunt |first=David |c=Appendix I Names and synonyms of the species, subspecies and interspecific hybrids |year=1995 |anchor-year=1995a |mode=cs2 |nb=yes}}</nowiki></code>
*:{{harvc |in=McMillan |in2=Horobin |last=Hunt |first=David |c=Appendix I Names and synonyms of the species, subspecies and interspecific hybrids |year=1995 |anchor-year=1995a |mode=cs2 |nb=yes}}
*<code><nowiki>{{harvc |in=McMillan |in2=Horobin |last=Hunt |first=David |c=Appendix III Excerpts from a Brazilian diary |year=1995 |anchor-year=1995b |mode=cs2 |nb=yes}}</nowiki></code>
*:{{harvc |in=McMillan |in2=Horobin |last=Hunt |first=David |c=Appendix III Excerpts from a Brazilian diary |year=1995 |anchor-year=1995b |mode=cs2 |nb=yes}}
and the single {{tld|citation}} template:
*<code><nowiki>{{Citation |last=McMillan |first=A. J. S. |last2=Horobin |first2=J. F. |year=1995 |title=Christmas Cacti: The Genus ''Schlumbergera'' and Its Hybrids |edition=p/b |publication-place=Sherbourne, Dorset, UK |publisher=David Hunt |isbn=978-0-9517234-6-3}}</nowiki></code>
*:{{Citation |last=McMillan |first=A. J. S. |last2=Horobin |first2=J. F. |year=1995 |title=Christmas Cacti: The Genus ''Schlumbergera'' and Its Hybrids |edition=p/b |publication-place=Sherbourne, Dorset, UK |publisher=David Hunt |isbn=978-0-9517234-6-3}}
==Error messages==
{{tld|harvc}} emits these error messages:<!--
:<span style="font-size:100%" class="error">harvc: {{para|anchor-year|plain=yes}} missing dab.</span>
::when used, {{para|anchor-year}} must include a single, lowercase letter disambiguator -->
:<span style="font-size:100%" class="error">harvc: author missing from source list.</span>
::the source list parameters {{para|in1}}, {{para|in2}}, {{para|in3}}, and {{para|in4}} form the template's <code>CITEREF</code> link to the full citation. All are not required but must be used in order without numerical gaps.
:<span style="font-size:100%" class="error">harvc: invalid {{para|anchor-year|plain=yes}}.</span>
::when used, {{para|anchor-year}} must be a three- or four-digit number and must have a lowercase <code>CITEREF</code> disambiguator. When the source does not have an identifiable year, use {{para|anchor-year|n.d.{{var|l}}}} or {{para|anchor-year|nd{{var|l}}}} with lowercase <code>CITEREF</code> disambiguator.
:<span style="font-size:100%" class="error">harvc: invalid {{para|display-authors|plain=yes}}.</span>
::the value assigned to {{para|display-authors}} must be a number greater than 0 or the keyword <code>etal</code>
:<span style="font-size:100%" class="error">harvc: invalid {{para|year|plain=yes}}.</span>
::{{para|year}} is an integral part of the template's <code>CITEREF</code> anchor and link. The value of {{para|year}} must be a three- or four-digit number with an optional lowercase <code>CITEREF</code> disambiguator. When the source does not have an identifiable year, use {{para|year|n.d.}} or {{para|year|nd}}.
:<span style="font-size:100%" class="error">harvc: missing {{para|year|plain=yes}}.</span>
::{{para|year}} is missing; the parameter is required.
:<span style="font-size:100%" class="error">harvc: no authors in contributor list.</span>
::this error message indicates that {{tld|harvc}} can't find any of {{para|last}}, {{para|last1}}, {{para|author}} or {{para|author1}} with an assigned value and so cannot make a usable <code>CITEREF</code> anchor. Add at least one of the listed parameters.
:<span style="font-size:100%" class="error">harvc: required contribution is missing.</span>
::this error message indicates that {{tld|harvc}} can't find any of {{para|c}}, {{para|chapter}}, or {{para|contribution}} with an assigned value
:<span style="font-size:100%" class="error">harvc: required {{para|id|plain=yes}} parameter missing.</span>
::this error message is emitted when the {{tld|harvc}} template's <code>CITEREF</code> anchor identifier would conflict with the long-form citation's <code>CITEREF</code> anchor identifier. See [[#Avoiding circular reference|Examples]]
:<span style="font-size:100%" class="error">harvc: {{para|year|plain=yes}} / {{para|anchor-year|plain=yes}} mismatch.</span>
::the year portion of {{para|anchor-year|YYYY{{var|l}}}} must match the year given in {{para|year|YYYY}}
<includeonly>{{Sandbox other||
<!-- Categories below this line, please; interwikis at Wikidata -->
[[Category:Citation utility templates]]
}}</includeonly>
4pxyt8wu0g1o0hjmexoyh7fuunmm1i8
801801
801800
2021-10-05T01:18:10Z
en>StarryGrandma
0
/* Example bibliography section */ seems to have worked, try some more
801801
wikitext
text/x-wiki
{{Documentation subpage}}
<!-- Place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
{{lua|Module:Harvc}}
{{uses TemplateStyles|Module:Citation/CS1/styles.css|noprotcat=yes}}
This template is a citation hybrid that has characteristics of the long-form [[Help:Citation Style 1|cs1]] and [[Help:Citation Style 2|cs2]] and characteristics of short-form {{tlx|sfn}} and the {{tlx|harv}} families of templates. Its purpose is to provide a method that allows editors to refer to a contribution or chapter in a larger work when more than a few such referrals are required. {{tld|harvc}} is not a substitute for a properly constructed citation.
Short-form templates {{tld|sfn}} and {{tld|harv}} are often used to link from an article's references section to a long-form cs1|2 template in a bibliography section:
:{{tld|sfn}} → {{tlx|cite book}}
It is not uncommon for a source have multiple contributors. When it is necessary to refer to multiple contributions in the same source, repeating all of the bibliographic details in multiple long-form citation templates adds to references-section clutter. {{tld|harvc}} is designed to hold only the detail necessary to identify a contribution and link to the enclosing work's long-form citation where all of the bibliographic detail can be found:
:{{tld|sfn}} → {{tld|harvc}} → {{tld|cite book}}
== Usage ==
The minimal form is:
:<code><nowiki>{{harvc |last=contributor name |year=publication year |c=contribution title |in=source editor/author name}}</nowiki></code>
===Parameters===
{{tld|harvc}} creates a <code>CITEREF</code> anchor from one to four contribution or chapter author surnames ({{para|last''n''}}) and the value in {{para|year}}. This allows {{tld|harvc}} to be the target of a link created by {{tlx|sfn}} or {{tld|harv}} family templates. From {{para|in{{var|n}}}} and {{para|year}}, {{tld|harvc}} creates a CITEREF link similar to those created by {{tlx|harvnb}} and {{tlx|sfn}}
: '''|anchor-year=''' – optional, for use for author(s) with more than one contribution to the work; requires CITEREF disambiguator; see [[#More than one contribution|Examples]]
: '''|author-link=''' – optional, title of existing Wikipedia article about the first contributor—not the contributor's website; do not wikilink; alias: '''|author-link1='''
:: '''|author-link''n''=''' – optional, title of existing Wikipedia article about contributor''n''; choose ''n'' to match ''n'' in '''|last''n''='''
: '''|author-mask=''m''''' – optional, replaces name of the first contributor with ''m'' (commonly 2) em dashes; alias: '''|author-mask1='''
:: '''|author-mask''n''=''m''''' – optional, replaces name of contributor''n'' with ''m'' em dashes; choose ''n'' to match ''n'' in '''|last''n''='''
:: '''|author-mask{{var|n}}=<{{var|text}}>''' – optional, replaces name of contributor''n'' with <{{var|text}}>
: '''|c=''' – required, the title of chapter or contribution; rendered quoted in upright font; aliases: '''|chapter=''', '''|contribution='''
: '''|display-authors=''' – optional, defines how {{tld|harvc}} displays the contributor list; ignored when '''|name-list-style=harv''':
:: {{para|display-authors}} – when empty or omitted, displays all contributor names in last/first format
:: {{para|display-authors|{{var|n}}}} – displays ''n'' contributor names in last/first format; appends et al. when ''n'' is less than the number of contributors included in the template
:: {{para|display-authors|etal}} – displays all contributor names in last/first format and appends et al.
: '''|first=''' – optional, first contributor's given or first name; alias: '''|first1='''
:: '''|first''n''=''' – optional, contributor''n'' given or first name; ''n'' begins at 2 and increases by 1 for each additional '''|first''n''='''
: '''|id=''' – required when {{para|last1}}-{{para|last4}} are the same as {{para|in1}}-{{para|in4}}; otherwise optional. See [[#Avoiding circular reference|Examples]]
: '''|in=''' – required, surname or last name of first editor or author of the work that includes the contribution; aliases: '''|in1='''
: '''|in2=''' – optional, surname or last name of second editor or author
: '''|in3=''' – optional, surname or last name of third editor or author
: '''|in4=''' – optional, surname or last name of fourth editor or author
: '''|last=''' – required, surname or last name of first author; aliases: '''|last1='''
:: '''|last''n''=''' – optional, contributor''n'' surname or last name; ''n'' begins at 2 and increases by 1 for each additional '''|last''n''=''';
: '''|loc=''' – optional, other location identifier, displays after {{para|p}} or {{para|pp}}
: '''|mode=''' – controls rendered display to match that of adjacent CS1 or CS2 citations; defaults to CS1 style
:: '''|mode=cs2''' – mimic {{tlx|citation}} style (comma separators, no terminal punctuation, static text not capitalized)
: '''|name-list-style=''' – optional, controls contributor name list display style
:: '''|name-list-style=harv''' – mimic {{tld|sfn}} or {{tld|harv}} format (one to four last names); overrides '''|display-authors='''
:: '''|name-list-style=amp''' – inserts an ampersand between the last two contributor names
: '''|nb=''' – optional, when set to <code>yes</code>, instructs {{tld|harvc}} to render source link without parentheses around the year; same format as that produced by {{tlx|harvnb}}
: '''|p=''' – optional, single page number where cited material can be found; aliases: '''|page='''
: '''|pp=''' – optional, multiple page numbers, page ranges, etc where cited material can be found; aliases: '''|pages='''
: '''|ps=''' – optional, sets terminal punctuation; default is full stop; overrides '''|mode=cs2'''; aliases: '''|postscript='''
:: '''|ps=none''' – renders output without terminal punctuation
: '''|url=''' – optional, URL of an online location where the text of the contribution can be found; aliases: '''|chapter-url''', '''|contribution-url'''
: '''|url-access=''' – optional, use when URL links to a source behind a registration barrier or paywall; inserts [[Help:Citation_Style_1#Registration_or_subscription_required|cs1{{pipe}}2 access icon]]; accepted values are: <code>limited</code>, <code>registration</code>, <code>subscription</code>
: '''|year=''' – required, publication year of the work that includes the contribution
===Examples===
When a Wikipedia article makes reference to a work that contains multiple chapters by different authors, bibliographies and reference sections can look rather cluttered:
* {{cite book |last=George |first=Ernest J. |last2=Read |first2=Ralph A. |last3=Johnson |first3=R. W. |last4=Ferber |first4=A. E. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Shelterbelts and Windbreaks |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=//archive.org/stream/yoa1957#page/n785/mode/1up |oclc=704186906}}
* {{cite book |last=Harper |first=V. L. |last2=Frank |first2=Bernard |last3=McQuilkin |first3=W. E. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Forest Practices and Productivity |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=//archive.org/stream/yoa1957#page/n803/mode/1up |oclc=704186906}}
* {{cite book |last=Stout |first=P. R. |last2=Johnson |first2=C. M. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Trace Elements |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=//archive.org/stream/yoa1957#page/n167/mode/1up |oclc=704186906}}
* {{cite book |last=Wadleigh |first=C. H. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Growth of Plants |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=//archive.org/stream/yoa1957#page/n57/mode/1up |oclc=704186906}}
As the list grows longer, the look becomes more cluttered with the unnecessarily repeated detail of full-length citations. With {{tld|harvc}} editors can link to shorter, less detailed contribution citations using standard implementations of {{tlx|sfn}} templates{{sfn|George|Read|Johnson|Ferber|1957}} and {{tlx|harv}} templates (like this: {{harv|Harper|Frank|McQuilkin|1957}} and also wrapped in {{tag|ref}} tags<ref>{{harvnb|Stout|Johnson|1957}}</ref>). {{tld|harvc}} may also be wrapped in {{tag|ref}} tags so that it becomes part of the article's References section.<ref>{{harvc|last=Benson|first=Ezra Taft|year=1957|chapter=Foreword|url=//archive.org/stream/yoa1957#page/n5/mode/1up|in=Stefferud|p=vi |loc=§2 |ignore-err=yes}}</ref>{{sfn|Wadleigh|1957}}
====Avoiding circular reference====
It may sometimes be necessary to cite a contribution of a source's editor or author such that {{para|last1}} through {{para|last4}} are the same as {{para|in1}} through {{para|in4}}, an editor's preface for example. Such citations can, depending on placement, cause {{tld|sfn}} or {{tld|harv}}-family references to link directly to the citation instead of to the {{tld|harvc}} template, or cause circular links ({{tld|harvc}} linking to itself because its <code>CITEREF</code> anchor identifier is the same as the citation's <code>CITEREF</code> anchor identifier). If {{para|id}} is set, {{tld|harvc}} will use it as an anchor identifier; if {{para|id}} is not set, {{tld|harvc}} will emit an error message when {{para|last1}} through {{para|last4}} are the same as {{para|in1}} through {{para|in4}}.
For example, to reference an editor's preface from article text, create a wikilink inside {{tag|ref}} tags:<ref>[[#Stefferud preface|Stefferud 1957]]</ref>
:<code><nowiki><ref>[[#Stefferud preface|Stefferud 1957]]</ref></nowiki></code>
Write a {{tld|harvc}} template with {{para|id|Stefferud preface}}
:<code><nowiki>{{harvc |last=Stefferud |first=A.|year=1957 |id=Stefferud preface |c=Preface |url=//archive.org/stream/yoa1957#page/n7/mode/1up |in=Stefferud}}</nowiki></code>
====Example references section====
{{reflist}}
====Example bibliography section====
* {{cite book |title=Soil: The Yearbook of Agriculture 1957 |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |url=//archive.org/stream/yoa1957#page/n2/mode/1up |oclc=704186906 }}
** {{harvc |last=George |first=Ernest J. |last2=Read |last3=Johnson |last4=Ferber |year=1957 |contribution=Shelterbelts and Windbreaks |url=//archive.org/stream/yoa1957#page/n785/mode/1up |in=Stefferud |ignore-err=yes}}
** {{harvc |last=Harper |first=V. L. |last2=Frank |last3=McQuilkin |year=1957 |contribution=Forest Practices and Productivity |url=//archive.org/stream/yoa1957#page/n803/mode/1up |in=Stefferud |ignore-err=yes}}
** {{harvc |last=Stefferud |first=A.|year=1957 |id=Stefferud preface |c=Preface |url=//archive.org/stream/yoa1957#page/n7/mode/1up |in=Stefferud |ignore-err=yes}}
** {{harvc |last=Stout |first=P. R. |last2=Johnson |year=1957 |c=Trace Elements |url=//archive.org/stream/yoa1957#page/n167/mode/1up |in=Stefferud |ignore-err=yes}}
** {{harvc |last=Wadleigh |first=C. H.|year=1957 |c=Growth of Plants |url=//archive.org/stream/yoa1957#page/n57/mode/1up |in=Stefferud |ignore-err=yes}}
====More than one contribution====
There are times when an author or authors will have contributed more than once to a work. When this occurs, it is necessary to disambiguate the CITEREF links from the {{tld|harv}} or {{tld|sfn}} templates to the CITEREF id of the appropriate {{tld|harvc}} template.
:{{tld|harv|Author|YYYYa}} → {{tld|harvc|Author|Contribution 1|YYYYa}} → {{tld|citation|...}}}
:{{tld|harv|Author|YYYYb}} → {{tld|harvc|Author|Contribution 2|YYYYb}} ↑
In this example, author David Hunt contributed two appendices to ''Christmas Cacti: The Genus ''Schlumbergera'' and Its Hybrids''.
There are two {{tlx|harvnb}} templates that are disambiguated:
:<code><nowiki>{{harvnb |Hunt |1995a}}</nowiki></code> → {{harvnb |Hunt |1995a}}
:<code><nowiki>{{harvnb |Hunt |1995b}}</nowiki></code> → {{harvnb |Hunt |1995b}}
These link to two {{tld|harvc}} templates which use {{para|anchor-year}} for their CITEREF id and for the date in the {{tld|harvc}} rendering as a visual aid for readers:
*<code><nowiki>{{harvc |in=McMillan |in2=Horobin |last=Hunt |first=David |c=Appendix I Names and synonyms of the species, subspecies and interspecific hybrids |year=1995 |anchor-year=1995a |mode=cs2 |nb=yes}}</nowiki></code>
*:{{harvc |in=McMillan |in2=Horobin |last=Hunt |first=David |c=Appendix I Names and synonyms of the species, subspecies and interspecific hybrids |year=1995 |anchor-year=1995a |mode=cs2 |nb=yes}}
*<code><nowiki>{{harvc |in=McMillan |in2=Horobin |last=Hunt |first=David |c=Appendix III Excerpts from a Brazilian diary |year=1995 |anchor-year=1995b |mode=cs2 |nb=yes}}</nowiki></code>
*:{{harvc |in=McMillan |in2=Horobin |last=Hunt |first=David |c=Appendix III Excerpts from a Brazilian diary |year=1995 |anchor-year=1995b |mode=cs2 |nb=yes}}
and the single {{tld|citation}} template:
*<code><nowiki>{{Citation |last=McMillan |first=A. J. S. |last2=Horobin |first2=J. F. |year=1995 |title=Christmas Cacti: The Genus ''Schlumbergera'' and Its Hybrids |edition=p/b |publication-place=Sherbourne, Dorset, UK |publisher=David Hunt |isbn=978-0-9517234-6-3}}</nowiki></code>
*:{{Citation |last=McMillan |first=A. J. S. |last2=Horobin |first2=J. F. |year=1995 |title=Christmas Cacti: The Genus ''Schlumbergera'' and Its Hybrids |edition=p/b |publication-place=Sherbourne, Dorset, UK |publisher=David Hunt |isbn=978-0-9517234-6-3}}
==Error messages==
{{tld|harvc}} emits these error messages:<!--
:<span style="font-size:100%" class="error">harvc: {{para|anchor-year|plain=yes}} missing dab.</span>
::when used, {{para|anchor-year}} must include a single, lowercase letter disambiguator -->
:<span style="font-size:100%" class="error">harvc: author missing from source list.</span>
::the source list parameters {{para|in1}}, {{para|in2}}, {{para|in3}}, and {{para|in4}} form the template's <code>CITEREF</code> link to the full citation. All are not required but must be used in order without numerical gaps.
:<span style="font-size:100%" class="error">harvc: invalid {{para|anchor-year|plain=yes}}.</span>
::when used, {{para|anchor-year}} must be a three- or four-digit number and must have a lowercase <code>CITEREF</code> disambiguator. When the source does not have an identifiable year, use {{para|anchor-year|n.d.{{var|l}}}} or {{para|anchor-year|nd{{var|l}}}} with lowercase <code>CITEREF</code> disambiguator.
:<span style="font-size:100%" class="error">harvc: invalid {{para|display-authors|plain=yes}}.</span>
::the value assigned to {{para|display-authors}} must be a number greater than 0 or the keyword <code>etal</code>
:<span style="font-size:100%" class="error">harvc: invalid {{para|year|plain=yes}}.</span>
::{{para|year}} is an integral part of the template's <code>CITEREF</code> anchor and link. The value of {{para|year}} must be a three- or four-digit number with an optional lowercase <code>CITEREF</code> disambiguator. When the source does not have an identifiable year, use {{para|year|n.d.}} or {{para|year|nd}}.
:<span style="font-size:100%" class="error">harvc: missing {{para|year|plain=yes}}.</span>
::{{para|year}} is missing; the parameter is required.
:<span style="font-size:100%" class="error">harvc: no authors in contributor list.</span>
::this error message indicates that {{tld|harvc}} can't find any of {{para|last}}, {{para|last1}}, {{para|author}} or {{para|author1}} with an assigned value and so cannot make a usable <code>CITEREF</code> anchor. Add at least one of the listed parameters.
:<span style="font-size:100%" class="error">harvc: required contribution is missing.</span>
::this error message indicates that {{tld|harvc}} can't find any of {{para|c}}, {{para|chapter}}, or {{para|contribution}} with an assigned value
:<span style="font-size:100%" class="error">harvc: required {{para|id|plain=yes}} parameter missing.</span>
::this error message is emitted when the {{tld|harvc}} template's <code>CITEREF</code> anchor identifier would conflict with the long-form citation's <code>CITEREF</code> anchor identifier. See [[#Avoiding circular reference|Examples]]
:<span style="font-size:100%" class="error">harvc: {{para|year|plain=yes}} / {{para|anchor-year|plain=yes}} mismatch.</span>
::the year portion of {{para|anchor-year|YYYY{{var|l}}}} must match the year given in {{para|year|YYYY}}
<includeonly>{{Sandbox other||
<!-- Categories below this line, please; interwikis at Wikidata -->
[[Category:Citation utility templates]]
}}</includeonly>
4sp6rm4l6ewjgo31xwuc5swhheznp6w
801802
801801
2021-10-05T05:08:19Z
en>StarryGrandma
0
/* More than one contribution */ Fix the last error messages
801802
wikitext
text/x-wiki
{{Documentation subpage}}
<!-- Place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
{{lua|Module:Harvc}}
{{uses TemplateStyles|Module:Citation/CS1/styles.css|noprotcat=yes}}
This template is a citation hybrid that has characteristics of the long-form [[Help:Citation Style 1|cs1]] and [[Help:Citation Style 2|cs2]] and characteristics of short-form {{tlx|sfn}} and the {{tlx|harv}} families of templates. Its purpose is to provide a method that allows editors to refer to a contribution or chapter in a larger work when more than a few such referrals are required. {{tld|harvc}} is not a substitute for a properly constructed citation.
Short-form templates {{tld|sfn}} and {{tld|harv}} are often used to link from an article's references section to a long-form cs1|2 template in a bibliography section:
:{{tld|sfn}} → {{tlx|cite book}}
It is not uncommon for a source have multiple contributors. When it is necessary to refer to multiple contributions in the same source, repeating all of the bibliographic details in multiple long-form citation templates adds to references-section clutter. {{tld|harvc}} is designed to hold only the detail necessary to identify a contribution and link to the enclosing work's long-form citation where all of the bibliographic detail can be found:
:{{tld|sfn}} → {{tld|harvc}} → {{tld|cite book}}
== Usage ==
The minimal form is:
:<code><nowiki>{{harvc |last=contributor name |year=publication year |c=contribution title |in=source editor/author name}}</nowiki></code>
===Parameters===
{{tld|harvc}} creates a <code>CITEREF</code> anchor from one to four contribution or chapter author surnames ({{para|last''n''}}) and the value in {{para|year}}. This allows {{tld|harvc}} to be the target of a link created by {{tlx|sfn}} or {{tld|harv}} family templates. From {{para|in{{var|n}}}} and {{para|year}}, {{tld|harvc}} creates a CITEREF link similar to those created by {{tlx|harvnb}} and {{tlx|sfn}}
: '''|anchor-year=''' – optional, for use for author(s) with more than one contribution to the work; requires CITEREF disambiguator; see [[#More than one contribution|Examples]]
: '''|author-link=''' – optional, title of existing Wikipedia article about the first contributor—not the contributor's website; do not wikilink; alias: '''|author-link1='''
:: '''|author-link''n''=''' – optional, title of existing Wikipedia article about contributor''n''; choose ''n'' to match ''n'' in '''|last''n''='''
: '''|author-mask=''m''''' – optional, replaces name of the first contributor with ''m'' (commonly 2) em dashes; alias: '''|author-mask1='''
:: '''|author-mask''n''=''m''''' – optional, replaces name of contributor''n'' with ''m'' em dashes; choose ''n'' to match ''n'' in '''|last''n''='''
:: '''|author-mask{{var|n}}=<{{var|text}}>''' – optional, replaces name of contributor''n'' with <{{var|text}}>
: '''|c=''' – required, the title of chapter or contribution; rendered quoted in upright font; aliases: '''|chapter=''', '''|contribution='''
: '''|display-authors=''' – optional, defines how {{tld|harvc}} displays the contributor list; ignored when '''|name-list-style=harv''':
:: {{para|display-authors}} – when empty or omitted, displays all contributor names in last/first format
:: {{para|display-authors|{{var|n}}}} – displays ''n'' contributor names in last/first format; appends et al. when ''n'' is less than the number of contributors included in the template
:: {{para|display-authors|etal}} – displays all contributor names in last/first format and appends et al.
: '''|first=''' – optional, first contributor's given or first name; alias: '''|first1='''
:: '''|first''n''=''' – optional, contributor''n'' given or first name; ''n'' begins at 2 and increases by 1 for each additional '''|first''n''='''
: '''|id=''' – required when {{para|last1}}-{{para|last4}} are the same as {{para|in1}}-{{para|in4}}; otherwise optional. See [[#Avoiding circular reference|Examples]]
: '''|in=''' – required, surname or last name of first editor or author of the work that includes the contribution; aliases: '''|in1='''
: '''|in2=''' – optional, surname or last name of second editor or author
: '''|in3=''' – optional, surname or last name of third editor or author
: '''|in4=''' – optional, surname or last name of fourth editor or author
: '''|last=''' – required, surname or last name of first author; aliases: '''|last1='''
:: '''|last''n''=''' – optional, contributor''n'' surname or last name; ''n'' begins at 2 and increases by 1 for each additional '''|last''n''=''';
: '''|loc=''' – optional, other location identifier, displays after {{para|p}} or {{para|pp}}
: '''|mode=''' – controls rendered display to match that of adjacent CS1 or CS2 citations; defaults to CS1 style
:: '''|mode=cs2''' – mimic {{tlx|citation}} style (comma separators, no terminal punctuation, static text not capitalized)
: '''|name-list-style=''' – optional, controls contributor name list display style
:: '''|name-list-style=harv''' – mimic {{tld|sfn}} or {{tld|harv}} format (one to four last names); overrides '''|display-authors='''
:: '''|name-list-style=amp''' – inserts an ampersand between the last two contributor names
: '''|nb=''' – optional, when set to <code>yes</code>, instructs {{tld|harvc}} to render source link without parentheses around the year; same format as that produced by {{tlx|harvnb}}
: '''|p=''' – optional, single page number where cited material can be found; aliases: '''|page='''
: '''|pp=''' – optional, multiple page numbers, page ranges, etc where cited material can be found; aliases: '''|pages='''
: '''|ps=''' – optional, sets terminal punctuation; default is full stop; overrides '''|mode=cs2'''; aliases: '''|postscript='''
:: '''|ps=none''' – renders output without terminal punctuation
: '''|url=''' – optional, URL of an online location where the text of the contribution can be found; aliases: '''|chapter-url''', '''|contribution-url'''
: '''|url-access=''' – optional, use when URL links to a source behind a registration barrier or paywall; inserts [[Help:Citation_Style_1#Registration_or_subscription_required|cs1{{pipe}}2 access icon]]; accepted values are: <code>limited</code>, <code>registration</code>, <code>subscription</code>
: '''|year=''' – required, publication year of the work that includes the contribution
===Examples===
When a Wikipedia article makes reference to a work that contains multiple chapters by different authors, bibliographies and reference sections can look rather cluttered:
* {{cite book |last=George |first=Ernest J. |last2=Read |first2=Ralph A. |last3=Johnson |first3=R. W. |last4=Ferber |first4=A. E. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Shelterbelts and Windbreaks |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=//archive.org/stream/yoa1957#page/n785/mode/1up |oclc=704186906}}
* {{cite book |last=Harper |first=V. L. |last2=Frank |first2=Bernard |last3=McQuilkin |first3=W. E. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Forest Practices and Productivity |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=//archive.org/stream/yoa1957#page/n803/mode/1up |oclc=704186906}}
* {{cite book |last=Stout |first=P. R. |last2=Johnson |first2=C. M. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Trace Elements |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=//archive.org/stream/yoa1957#page/n167/mode/1up |oclc=704186906}}
* {{cite book |last=Wadleigh |first=C. H. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Growth of Plants |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=//archive.org/stream/yoa1957#page/n57/mode/1up |oclc=704186906}}
As the list grows longer, the look becomes more cluttered with the unnecessarily repeated detail of full-length citations. With {{tld|harvc}} editors can link to shorter, less detailed contribution citations using standard implementations of {{tlx|sfn}} templates{{sfn|George|Read|Johnson|Ferber|1957}} and {{tlx|harv}} templates (like this: {{harv|Harper|Frank|McQuilkin|1957}} and also wrapped in {{tag|ref}} tags<ref>{{harvnb|Stout|Johnson|1957}}</ref>). {{tld|harvc}} may also be wrapped in {{tag|ref}} tags so that it becomes part of the article's References section.<ref>{{harvc|last=Benson|first=Ezra Taft|year=1957|chapter=Foreword|url=//archive.org/stream/yoa1957#page/n5/mode/1up|in=Stefferud|p=vi |loc=§2 |ignore-err=yes}}</ref>{{sfn|Wadleigh|1957}}
====Avoiding circular reference====
It may sometimes be necessary to cite a contribution of a source's editor or author such that {{para|last1}} through {{para|last4}} are the same as {{para|in1}} through {{para|in4}}, an editor's preface for example. Such citations can, depending on placement, cause {{tld|sfn}} or {{tld|harv}}-family references to link directly to the citation instead of to the {{tld|harvc}} template, or cause circular links ({{tld|harvc}} linking to itself because its <code>CITEREF</code> anchor identifier is the same as the citation's <code>CITEREF</code> anchor identifier). If {{para|id}} is set, {{tld|harvc}} will use it as an anchor identifier; if {{para|id}} is not set, {{tld|harvc}} will emit an error message when {{para|last1}} through {{para|last4}} are the same as {{para|in1}} through {{para|in4}}.
For example, to reference an editor's preface from article text, create a wikilink inside {{tag|ref}} tags:<ref>[[#Stefferud preface|Stefferud 1957]]</ref>
:<code><nowiki><ref>[[#Stefferud preface|Stefferud 1957]]</ref></nowiki></code>
Write a {{tld|harvc}} template with {{para|id|Stefferud preface}}
:<code><nowiki>{{harvc |last=Stefferud |first=A.|year=1957 |id=Stefferud preface |c=Preface |url=//archive.org/stream/yoa1957#page/n7/mode/1up |in=Stefferud}}</nowiki></code>
====Example references section====
{{reflist}}
====Example bibliography section====
* {{cite book |title=Soil: The Yearbook of Agriculture 1957 |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |url=//archive.org/stream/yoa1957#page/n2/mode/1up |oclc=704186906 }}
** {{harvc |last=George |first=Ernest J. |last2=Read |last3=Johnson |last4=Ferber |year=1957 |contribution=Shelterbelts and Windbreaks |url=//archive.org/stream/yoa1957#page/n785/mode/1up |in=Stefferud |ignore-err=yes}}
** {{harvc |last=Harper |first=V. L. |last2=Frank |last3=McQuilkin |year=1957 |contribution=Forest Practices and Productivity |url=//archive.org/stream/yoa1957#page/n803/mode/1up |in=Stefferud |ignore-err=yes}}
** {{harvc |last=Stefferud |first=A.|year=1957 |id=Stefferud preface |c=Preface |url=//archive.org/stream/yoa1957#page/n7/mode/1up |in=Stefferud |ignore-err=yes}}
** {{harvc |last=Stout |first=P. R. |last2=Johnson |year=1957 |c=Trace Elements |url=//archive.org/stream/yoa1957#page/n167/mode/1up |in=Stefferud |ignore-err=yes}}
** {{harvc |last=Wadleigh |first=C. H.|year=1957 |c=Growth of Plants |url=//archive.org/stream/yoa1957#page/n57/mode/1up |in=Stefferud |ignore-err=yes}}
====More than one contribution====
There are times when an author or authors will have contributed more than once to a work. When this occurs, it is necessary to disambiguate the CITEREF links from the {{tld|harv}} or {{tld|sfn}} templates to the CITEREF id of the appropriate {{tld|harvc}} template.
:{{tld|harv|Author|YYYYa}} → {{tld|harvc|Author|Contribution 1|YYYYa}} → {{tld|citation|...}}}
:{{tld|harv|Author|YYYYb}} → {{tld|harvc|Author|Contribution 2|YYYYb}} ↑
In this example, author David Hunt contributed two appendices to ''Christmas Cacti: The Genus ''Schlumbergera'' and Its Hybrids''.
There are two {{tlx|harvnb}} templates that are disambiguated:
:<code><nowiki>{{harvnb |Hunt |1995a}}</nowiki></code> → {{harvnb |Hunt |1995a}}
:<code><nowiki>{{harvnb |Hunt |1995b}}</nowiki></code> → {{harvnb |Hunt |1995b}}
These link to two {{tld|harvc}} templates which use {{para|anchor-year}} for their CITEREF id and for the date in the {{tld|harvc}} rendering as a visual aid for readers:
*<code><nowiki>{{harvc |in=McMillan |in2=Horobin |last=Hunt |first=David |c=Appendix I Names and synonyms of the species, subspecies and interspecific hybrids |year=1995 |anchor-year=1995a |mode=cs2 |nb=yes}}</nowiki></code>
*:{{harvc |in=McMillan |in2=Horobin |last=Hunt |first=David |c=Appendix I Names and synonyms of the species, subspecies and interspecific hybrids |year=1995 |anchor-year=1995a |mode=cs2 |nb=yes |ignore-err=yes}}
*<code><nowiki>{{harvc |in=McMillan |in2=Horobin |last=Hunt |first=David |c=Appendix III Excerpts from a Brazilian diary |year=1995 |anchor-year=1995b |mode=cs2 |nb=yes}}</nowiki></code>
*:{{harvc |in=McMillan |in2=Horobin |last=Hunt |first=David |c=Appendix III Excerpts from a Brazilian diary |year=1995 |anchor-year=1995b |mode=cs2 |nb=yes |ignore-err=yes}}
and the single {{tld|citation}} template:
*<code><nowiki>{{Citation |last=McMillan |first=A. J. S. |last2=Horobin |first2=J. F. |year=1995 |title=Christmas Cacti: The Genus ''Schlumbergera'' and Its Hybrids |edition=p/b |publication-place=Sherbourne, Dorset, UK |publisher=David Hunt |isbn=978-0-9517234-6-3}}</nowiki></code>
*:{{Citation |last=McMillan |first=A. J. S. |last2=Horobin |first2=J. F. |year=1995 |title=Christmas Cacti: The Genus ''Schlumbergera'' and Its Hybrids |edition=p/b |publication-place=Sherbourne, Dorset, UK |publisher=David Hunt |isbn=978-0-9517234-6-3}}
==Error messages==
{{tld|harvc}} emits these error messages:<!--
:<span style="font-size:100%" class="error">harvc: {{para|anchor-year|plain=yes}} missing dab.</span>
::when used, {{para|anchor-year}} must include a single, lowercase letter disambiguator -->
:<span style="font-size:100%" class="error">harvc: author missing from source list.</span>
::the source list parameters {{para|in1}}, {{para|in2}}, {{para|in3}}, and {{para|in4}} form the template's <code>CITEREF</code> link to the full citation. All are not required but must be used in order without numerical gaps.
:<span style="font-size:100%" class="error">harvc: invalid {{para|anchor-year|plain=yes}}.</span>
::when used, {{para|anchor-year}} must be a three- or four-digit number and must have a lowercase <code>CITEREF</code> disambiguator. When the source does not have an identifiable year, use {{para|anchor-year|n.d.{{var|l}}}} or {{para|anchor-year|nd{{var|l}}}} with lowercase <code>CITEREF</code> disambiguator.
:<span style="font-size:100%" class="error">harvc: invalid {{para|display-authors|plain=yes}}.</span>
::the value assigned to {{para|display-authors}} must be a number greater than 0 or the keyword <code>etal</code>
:<span style="font-size:100%" class="error">harvc: invalid {{para|year|plain=yes}}.</span>
::{{para|year}} is an integral part of the template's <code>CITEREF</code> anchor and link. The value of {{para|year}} must be a three- or four-digit number with an optional lowercase <code>CITEREF</code> disambiguator. When the source does not have an identifiable year, use {{para|year|n.d.}} or {{para|year|nd}}.
:<span style="font-size:100%" class="error">harvc: missing {{para|year|plain=yes}}.</span>
::{{para|year}} is missing; the parameter is required.
:<span style="font-size:100%" class="error">harvc: no authors in contributor list.</span>
::this error message indicates that {{tld|harvc}} can't find any of {{para|last}}, {{para|last1}}, {{para|author}} or {{para|author1}} with an assigned value and so cannot make a usable <code>CITEREF</code> anchor. Add at least one of the listed parameters.
:<span style="font-size:100%" class="error">harvc: required contribution is missing.</span>
::this error message indicates that {{tld|harvc}} can't find any of {{para|c}}, {{para|chapter}}, or {{para|contribution}} with an assigned value
:<span style="font-size:100%" class="error">harvc: required {{para|id|plain=yes}} parameter missing.</span>
::this error message is emitted when the {{tld|harvc}} template's <code>CITEREF</code> anchor identifier would conflict with the long-form citation's <code>CITEREF</code> anchor identifier. See [[#Avoiding circular reference|Examples]]
:<span style="font-size:100%" class="error">harvc: {{para|year|plain=yes}} / {{para|anchor-year|plain=yes}} mismatch.</span>
::the year portion of {{para|anchor-year|YYYY{{var|l}}}} must match the year given in {{para|year|YYYY}}
<includeonly>{{Sandbox other||
<!-- Categories below this line, please; interwikis at Wikidata -->
[[Category:Citation utility templates]]
}}</includeonly>
dn66ua24jaao98742vkbcgks4livt7s
801803
801802
2021-10-06T00:38:18Z
en>StarryGrandma
0
/* Usage */ documenting |ignore-err=yes
801803
wikitext
text/x-wiki
{{Documentation subpage}}
<!-- Place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
{{lua|Module:Harvc}}
{{uses TemplateStyles|Module:Citation/CS1/styles.css|noprotcat=yes}}
This template is a citation hybrid that has characteristics of the long-form [[Help:Citation Style 1|cs1]] and [[Help:Citation Style 2|cs2]] and characteristics of short-form {{tlx|sfn}} and the {{tlx|harv}} families of templates. Its purpose is to provide a method that allows editors to refer to a contribution or chapter in a larger work when more than a few such referrals are required. {{tld|harvc}} is not a substitute for a properly constructed citation.
Short-form templates {{tld|sfn}} and {{tld|harv}} are often used to link from an article's references section to a long-form cs1|2 template in a bibliography section:
:{{tld|sfn}} → {{tlx|cite book}}
It is not uncommon for a source have multiple contributors. When it is necessary to refer to multiple contributions in the same source, repeating all of the bibliographic details in multiple long-form citation templates adds to references-section clutter. {{tld|harvc}} is designed to hold only the detail necessary to identify a contribution and link to the enclosing work's long-form citation where all of the bibliographic detail can be found:
:{{tld|sfn}} → {{tld|harvc}} → {{tld|cite book}}
== Usage ==
The minimal form is:
:<code><nowiki>{{harvc |last=contributor name |year=publication year |c=contribution title |in=source editor/author name}}</nowiki></code>
According to the comments in [[Module:Harvc]], mistaken {{red|Harvc error: no target:}} error messages may be produced when the template is nested in other templates as on documentation pages. The otherwise undocumented parameter, {{para|ignore-err|yes}}, can be added to prevent this.
===Parameters===
{{tld|harvc}} creates a <code>CITEREF</code> anchor from one to four contribution or chapter author surnames ({{para|last''n''}}) and the value in {{para|year}}. This allows {{tld|harvc}} to be the target of a link created by {{tlx|sfn}} or {{tld|harv}} family templates. From {{para|in{{var|n}}}} and {{para|year}}, {{tld|harvc}} creates a CITEREF link similar to those created by {{tlx|harvnb}} and {{tlx|sfn}}
: '''|anchor-year=''' – optional, for use for author(s) with more than one contribution to the work; requires CITEREF disambiguator; see [[#More than one contribution|Examples]]
: '''|author-link=''' – optional, title of existing Wikipedia article about the first contributor—not the contributor's website; do not wikilink; alias: '''|author-link1='''
:: '''|author-link''n''=''' – optional, title of existing Wikipedia article about contributor''n''; choose ''n'' to match ''n'' in '''|last''n''='''
: '''|author-mask=''m''''' – optional, replaces name of the first contributor with ''m'' (commonly 2) em dashes; alias: '''|author-mask1='''
:: '''|author-mask''n''=''m''''' – optional, replaces name of contributor''n'' with ''m'' em dashes; choose ''n'' to match ''n'' in '''|last''n''='''
:: '''|author-mask{{var|n}}=<{{var|text}}>''' – optional, replaces name of contributor''n'' with <{{var|text}}>
: '''|c=''' – required, the title of chapter or contribution; rendered quoted in upright font; aliases: '''|chapter=''', '''|contribution='''
: '''|display-authors=''' – optional, defines how {{tld|harvc}} displays the contributor list; ignored when '''|name-list-style=harv''':
:: {{para|display-authors}} – when empty or omitted, displays all contributor names in last/first format
:: {{para|display-authors|{{var|n}}}} – displays ''n'' contributor names in last/first format; appends et al. when ''n'' is less than the number of contributors included in the template
:: {{para|display-authors|etal}} – displays all contributor names in last/first format and appends et al.
: '''|first=''' – optional, first contributor's given or first name; alias: '''|first1='''
:: '''|first''n''=''' – optional, contributor''n'' given or first name; ''n'' begins at 2 and increases by 1 for each additional '''|first''n''='''
: '''|id=''' – required when {{para|last1}}-{{para|last4}} are the same as {{para|in1}}-{{para|in4}}; otherwise optional. See [[#Avoiding circular reference|Examples]]
: '''|in=''' – required, surname or last name of first editor or author of the work that includes the contribution; aliases: '''|in1='''
: '''|in2=''' – optional, surname or last name of second editor or author
: '''|in3=''' – optional, surname or last name of third editor or author
: '''|in4=''' – optional, surname or last name of fourth editor or author
: '''|last=''' – required, surname or last name of first author; aliases: '''|last1='''
:: '''|last''n''=''' – optional, contributor''n'' surname or last name; ''n'' begins at 2 and increases by 1 for each additional '''|last''n''=''';
: '''|loc=''' – optional, other location identifier, displays after {{para|p}} or {{para|pp}}
: '''|mode=''' – controls rendered display to match that of adjacent CS1 or CS2 citations; defaults to CS1 style
:: '''|mode=cs2''' – mimic {{tlx|citation}} style (comma separators, no terminal punctuation, static text not capitalized)
: '''|name-list-style=''' – optional, controls contributor name list display style
:: '''|name-list-style=harv''' – mimic {{tld|sfn}} or {{tld|harv}} format (one to four last names); overrides '''|display-authors='''
:: '''|name-list-style=amp''' – inserts an ampersand between the last two contributor names
: '''|nb=''' – optional, when set to <code>yes</code>, instructs {{tld|harvc}} to render source link without parentheses around the year; same format as that produced by {{tlx|harvnb}}
: '''|p=''' – optional, single page number where cited material can be found; aliases: '''|page='''
: '''|pp=''' – optional, multiple page numbers, page ranges, etc where cited material can be found; aliases: '''|pages='''
: '''|ps=''' – optional, sets terminal punctuation; default is full stop; overrides '''|mode=cs2'''; aliases: '''|postscript='''
:: '''|ps=none''' – renders output without terminal punctuation
: '''|url=''' – optional, URL of an online location where the text of the contribution can be found; aliases: '''|chapter-url''', '''|contribution-url'''
: '''|url-access=''' – optional, use when URL links to a source behind a registration barrier or paywall; inserts [[Help:Citation_Style_1#Registration_or_subscription_required|cs1{{pipe}}2 access icon]]; accepted values are: <code>limited</code>, <code>registration</code>, <code>subscription</code>
: '''|year=''' – required, publication year of the work that includes the contribution
===Examples===
When a Wikipedia article makes reference to a work that contains multiple chapters by different authors, bibliographies and reference sections can look rather cluttered:
* {{cite book |last=George |first=Ernest J. |last2=Read |first2=Ralph A. |last3=Johnson |first3=R. W. |last4=Ferber |first4=A. E. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Shelterbelts and Windbreaks |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=//archive.org/stream/yoa1957#page/n785/mode/1up |oclc=704186906}}
* {{cite book |last=Harper |first=V. L. |last2=Frank |first2=Bernard |last3=McQuilkin |first3=W. E. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Forest Practices and Productivity |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=//archive.org/stream/yoa1957#page/n803/mode/1up |oclc=704186906}}
* {{cite book |last=Stout |first=P. R. |last2=Johnson |first2=C. M. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Trace Elements |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=//archive.org/stream/yoa1957#page/n167/mode/1up |oclc=704186906}}
* {{cite book |last=Wadleigh |first=C. H. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Growth of Plants |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=//archive.org/stream/yoa1957#page/n57/mode/1up |oclc=704186906}}
As the list grows longer, the look becomes more cluttered with the unnecessarily repeated detail of full-length citations. With {{tld|harvc}} editors can link to shorter, less detailed contribution citations using standard implementations of {{tlx|sfn}} templates{{sfn|George|Read|Johnson|Ferber|1957}} and {{tlx|harv}} templates (like this: {{harv|Harper|Frank|McQuilkin|1957}} and also wrapped in {{tag|ref}} tags<ref>{{harvnb|Stout|Johnson|1957}}</ref>). {{tld|harvc}} may also be wrapped in {{tag|ref}} tags so that it becomes part of the article's References section.<ref>{{harvc|last=Benson|first=Ezra Taft|year=1957|chapter=Foreword|url=//archive.org/stream/yoa1957#page/n5/mode/1up|in=Stefferud|p=vi |loc=§2 |ignore-err=yes}}</ref>{{sfn|Wadleigh|1957}}
====Avoiding circular reference====
It may sometimes be necessary to cite a contribution of a source's editor or author such that {{para|last1}} through {{para|last4}} are the same as {{para|in1}} through {{para|in4}}, an editor's preface for example. Such citations can, depending on placement, cause {{tld|sfn}} or {{tld|harv}}-family references to link directly to the citation instead of to the {{tld|harvc}} template, or cause circular links ({{tld|harvc}} linking to itself because its <code>CITEREF</code> anchor identifier is the same as the citation's <code>CITEREF</code> anchor identifier). If {{para|id}} is set, {{tld|harvc}} will use it as an anchor identifier; if {{para|id}} is not set, {{tld|harvc}} will emit an error message when {{para|last1}} through {{para|last4}} are the same as {{para|in1}} through {{para|in4}}.
For example, to reference an editor's preface from article text, create a wikilink inside {{tag|ref}} tags:<ref>[[#Stefferud preface|Stefferud 1957]]</ref>
:<code><nowiki><ref>[[#Stefferud preface|Stefferud 1957]]</ref></nowiki></code>
Write a {{tld|harvc}} template with {{para|id|Stefferud preface}}
:<code><nowiki>{{harvc |last=Stefferud |first=A.|year=1957 |id=Stefferud preface |c=Preface |url=//archive.org/stream/yoa1957#page/n7/mode/1up |in=Stefferud}}</nowiki></code>
====Example references section====
{{reflist}}
====Example bibliography section====
* {{cite book |title=Soil: The Yearbook of Agriculture 1957 |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |url=//archive.org/stream/yoa1957#page/n2/mode/1up |oclc=704186906 }}
** {{harvc |last=George |first=Ernest J. |last2=Read |last3=Johnson |last4=Ferber |year=1957 |contribution=Shelterbelts and Windbreaks |url=//archive.org/stream/yoa1957#page/n785/mode/1up |in=Stefferud |ignore-err=yes}}
** {{harvc |last=Harper |first=V. L. |last2=Frank |last3=McQuilkin |year=1957 |contribution=Forest Practices and Productivity |url=//archive.org/stream/yoa1957#page/n803/mode/1up |in=Stefferud |ignore-err=yes}}
** {{harvc |last=Stefferud |first=A.|year=1957 |id=Stefferud preface |c=Preface |url=//archive.org/stream/yoa1957#page/n7/mode/1up |in=Stefferud |ignore-err=yes}}
** {{harvc |last=Stout |first=P. R. |last2=Johnson |year=1957 |c=Trace Elements |url=//archive.org/stream/yoa1957#page/n167/mode/1up |in=Stefferud |ignore-err=yes}}
** {{harvc |last=Wadleigh |first=C. H.|year=1957 |c=Growth of Plants |url=//archive.org/stream/yoa1957#page/n57/mode/1up |in=Stefferud |ignore-err=yes}}
====More than one contribution====
There are times when an author or authors will have contributed more than once to a work. When this occurs, it is necessary to disambiguate the CITEREF links from the {{tld|harv}} or {{tld|sfn}} templates to the CITEREF id of the appropriate {{tld|harvc}} template.
:{{tld|harv|Author|YYYYa}} → {{tld|harvc|Author|Contribution 1|YYYYa}} → {{tld|citation|...}}}
:{{tld|harv|Author|YYYYb}} → {{tld|harvc|Author|Contribution 2|YYYYb}} ↑
In this example, author David Hunt contributed two appendices to ''Christmas Cacti: The Genus ''Schlumbergera'' and Its Hybrids''.
There are two {{tlx|harvnb}} templates that are disambiguated:
:<code><nowiki>{{harvnb |Hunt |1995a}}</nowiki></code> → {{harvnb |Hunt |1995a}}
:<code><nowiki>{{harvnb |Hunt |1995b}}</nowiki></code> → {{harvnb |Hunt |1995b}}
These link to two {{tld|harvc}} templates which use {{para|anchor-year}} for their CITEREF id and for the date in the {{tld|harvc}} rendering as a visual aid for readers:
*<code><nowiki>{{harvc |in=McMillan |in2=Horobin |last=Hunt |first=David |c=Appendix I Names and synonyms of the species, subspecies and interspecific hybrids |year=1995 |anchor-year=1995a |mode=cs2 |nb=yes}}</nowiki></code>
*:{{harvc |in=McMillan |in2=Horobin |last=Hunt |first=David |c=Appendix I Names and synonyms of the species, subspecies and interspecific hybrids |year=1995 |anchor-year=1995a |mode=cs2 |nb=yes |ignore-err=yes}}
*<code><nowiki>{{harvc |in=McMillan |in2=Horobin |last=Hunt |first=David |c=Appendix III Excerpts from a Brazilian diary |year=1995 |anchor-year=1995b |mode=cs2 |nb=yes}}</nowiki></code>
*:{{harvc |in=McMillan |in2=Horobin |last=Hunt |first=David |c=Appendix III Excerpts from a Brazilian diary |year=1995 |anchor-year=1995b |mode=cs2 |nb=yes |ignore-err=yes}}
and the single {{tld|citation}} template:
*<code><nowiki>{{Citation |last=McMillan |first=A. J. S. |last2=Horobin |first2=J. F. |year=1995 |title=Christmas Cacti: The Genus ''Schlumbergera'' and Its Hybrids |edition=p/b |publication-place=Sherbourne, Dorset, UK |publisher=David Hunt |isbn=978-0-9517234-6-3}}</nowiki></code>
*:{{Citation |last=McMillan |first=A. J. S. |last2=Horobin |first2=J. F. |year=1995 |title=Christmas Cacti: The Genus ''Schlumbergera'' and Its Hybrids |edition=p/b |publication-place=Sherbourne, Dorset, UK |publisher=David Hunt |isbn=978-0-9517234-6-3}}
==Error messages==
{{tld|harvc}} emits these error messages:<!--
:<span style="font-size:100%" class="error">harvc: {{para|anchor-year|plain=yes}} missing dab.</span>
::when used, {{para|anchor-year}} must include a single, lowercase letter disambiguator -->
:<span style="font-size:100%" class="error">harvc: author missing from source list.</span>
::the source list parameters {{para|in1}}, {{para|in2}}, {{para|in3}}, and {{para|in4}} form the template's <code>CITEREF</code> link to the full citation. All are not required but must be used in order without numerical gaps.
:<span style="font-size:100%" class="error">harvc: invalid {{para|anchor-year|plain=yes}}.</span>
::when used, {{para|anchor-year}} must be a three- or four-digit number and must have a lowercase <code>CITEREF</code> disambiguator. When the source does not have an identifiable year, use {{para|anchor-year|n.d.{{var|l}}}} or {{para|anchor-year|nd{{var|l}}}} with lowercase <code>CITEREF</code> disambiguator.
:<span style="font-size:100%" class="error">harvc: invalid {{para|display-authors|plain=yes}}.</span>
::the value assigned to {{para|display-authors}} must be a number greater than 0 or the keyword <code>etal</code>
:<span style="font-size:100%" class="error">harvc: invalid {{para|year|plain=yes}}.</span>
::{{para|year}} is an integral part of the template's <code>CITEREF</code> anchor and link. The value of {{para|year}} must be a three- or four-digit number with an optional lowercase <code>CITEREF</code> disambiguator. When the source does not have an identifiable year, use {{para|year|n.d.}} or {{para|year|nd}}.
:<span style="font-size:100%" class="error">harvc: missing {{para|year|plain=yes}}.</span>
::{{para|year}} is missing; the parameter is required.
:<span style="font-size:100%" class="error">harvc: no authors in contributor list.</span>
::this error message indicates that {{tld|harvc}} can't find any of {{para|last}}, {{para|last1}}, {{para|author}} or {{para|author1}} with an assigned value and so cannot make a usable <code>CITEREF</code> anchor. Add at least one of the listed parameters.
:<span style="font-size:100%" class="error">harvc: required contribution is missing.</span>
::this error message indicates that {{tld|harvc}} can't find any of {{para|c}}, {{para|chapter}}, or {{para|contribution}} with an assigned value
:<span style="font-size:100%" class="error">harvc: required {{para|id|plain=yes}} parameter missing.</span>
::this error message is emitted when the {{tld|harvc}} template's <code>CITEREF</code> anchor identifier would conflict with the long-form citation's <code>CITEREF</code> anchor identifier. See [[#Avoiding circular reference|Examples]]
:<span style="font-size:100%" class="error">harvc: {{para|year|plain=yes}} / {{para|anchor-year|plain=yes}} mismatch.</span>
::the year portion of {{para|anchor-year|YYYY{{var|l}}}} must match the year given in {{para|year|YYYY}}
<includeonly>{{Sandbox other||
<!-- Categories below this line, please; interwikis at Wikidata -->
[[Category:Citation utility templates]]
}}</includeonly>
m00v79ndhxyu11b48xs6mxovj11pyt8
801804
801803
2021-11-10T05:14:14Z
en>Newone
0
801804
wikitext
text/x-wiki
{{Documentation subpage}}
<!-- Place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
{{lua|Module:Harvc}}
{{uses TemplateStyles|Module:Citation/CS1/styles.css|noprotcat=yes}}
This template is a citation hybrid that has characteristics of the long-form [[Help:Citation Style 1|cs1]] and [[Help:Citation Style 2|cs2]] and characteristics of short-form {{tlx|sfn}} and the {{tlx|harv}} families of templates. Its purpose is to provide a method that allows editors to refer to a contribution or chapter in a larger work when more than a few such referrals are required. {{tld|harvc}} is not a substitute for a properly constructed citation.
Short-form templates {{Template link code|sfn}} and {{tld|harv}} are often used to link from an article's references section to a long-form cs1|2 template in a bibliography section:
:{{tld|sfn}} → {{tlx|cite book}}
It is not uncommon for a source have multiple contributors. When it is necessary to refer to multiple contributions in the same source, repeating all of the bibliographic details in multiple long-form citation templates adds to references-section clutter. {{tld|harvc}} is designed to hold only the detail necessary to identify a contribution and link to the enclosing work's long-form citation where all of the bibliographic detail can be found:
:{{tld|sfn}} → {{tld|harvc}} → {{tld|cite book}}
== Usage ==
The minimal form is:
:<code><nowiki>{{harvc |last=contributor name |year=publication year |c=contribution title |in=source editor/author name}}</nowiki></code>
According to the comments in [[Module:Harvc]], mistaken {{red|Harvc error: no target:}} error messages may be produced when the template is nested in other templates as on documentation pages. The otherwise undocumented parameter, {{para|ignore-err|yes}}, can be added to prevent this.
===Parameters===
{{tld|harvc}} creates a <code>CITEREF</code> anchor from one to four contribution or chapter author surnames ({{para|last''n''}}) and the value in {{para|year}}. This allows {{tld|harvc}} to be the target of a link created by {{tlx|sfn}} or {{tld|harv}} family templates. From {{para|in{{var|n}}}} and {{para|year}}, {{tld|harvc}} creates a CITEREF link similar to those created by {{tlx|Harvard citation no brackets}} and {{tlx|sfn}}
: '''|anchor-year=''' – optional, for use for author(s) with more than one contribution to the work; requires CITEREF disambiguator; see [[#More than one contribution|Examples]]
: '''|author-link=''' – optional, title of existing Wikipedia article about the first contributor—not the contributor's website; do not wikilink; alias: '''|author-link1='''
:: '''|author-link''n''=''' – optional, title of existing Wikipedia article about contributor''n''; choose ''n'' to match ''n'' in '''|last''n''='''
: '''|author-mask=''m''''' – optional, replaces name of the first contributor with ''m'' (commonly 2) em dashes; alias: '''|author-mask1='''
:: '''|author-mask''n''=''m''''' – optional, replaces name of contributor''n'' with ''m'' em dashes; choose ''n'' to match ''n'' in '''|last''n''='''
:: '''|author-mask{{var|n}}=<{{var|text}}>''' – optional, replaces name of contributor''n'' with <{{var|text}}>
: '''|c=''' – required, the title of chapter or contribution; rendered quoted in upright font; aliases: '''|chapter=''', '''|contribution='''
: '''|display-authors=''' – optional, defines how {{tld|harvc}} displays the contributor list; ignored when '''|name-list-style=harv''':
:: {{para|display-authors}} – when empty or omitted, displays all contributor names in last/first format
:: {{para|display-authors|{{var|n}}}} – displays ''n'' contributor names in last/first format; appends et al. when ''n'' is less than the number of contributors included in the template
:: {{para|display-authors|etal}} – displays all contributor names in last/first format and appends et al.
: '''|first=''' – optional, first contributor's given or first name; alias: '''|first1='''
:: '''|first''n''=''' – optional, contributor''n'' given or first name; ''n'' begins at 2 and increases by 1 for each additional '''|first''n''='''
: '''|id=''' – required when {{para|last1}}-{{para|last4}} are the same as {{para|in1}}-{{para|in4}}; otherwise optional. See [[#Avoiding circular reference|Examples]]
: '''|in=''' – required, surname or last name of first editor or author of the work that includes the contribution; aliases: '''|in1='''
: '''|in2=''' – optional, surname or last name of second editor or author
: '''|in3=''' – optional, surname or last name of third editor or author
: '''|in4=''' – optional, surname or last name of fourth editor or author
: '''|last=''' – required, surname or last name of first author; aliases: '''|last1='''
:: '''|last''n''=''' – optional, contributor''n'' surname or last name; ''n'' begins at 2 and increases by 1 for each additional '''|last''n''=''';
: '''|loc=''' – optional, other location identifier, displays after {{para|p}} or {{para|pp}}
: '''|mode=''' – controls rendered display to match that of adjacent CS1 or CS2 citations; defaults to CS1 style
:: '''|mode=cs2''' – mimic {{tlx|citation}} style (comma separators, no terminal punctuation, static text not capitalized)
: '''|name-list-style=''' – optional, controls contributor name list display style
:: '''|name-list-style=harv''' – mimic {{tld|sfn}} or {{tld|harv}} format (one to four last names); overrides '''|display-authors='''
:: '''|name-list-style=amp''' – inserts an ampersand between the last two contributor names
: '''|nb=''' – optional, when set to <code>yes</code>, instructs {{tld|harvc}} to render source link without parentheses around the year; same format as that produced by {{tlx|Harvard citation no brackets}}
: '''|p=''' – optional, single page number where cited material can be found; aliases: '''|page='''
: '''|pp=''' – optional, multiple page numbers, page ranges, etc where cited material can be found; aliases: '''|pages='''
: '''|ps=''' – optional, sets terminal punctuation; default is full stop; overrides '''|mode=cs2'''; aliases: '''|postscript='''
:: '''|ps=none''' – renders output without terminal punctuation
: '''|url=''' – optional, URL of an online location where the text of the contribution can be found; aliases: '''|chapter-url''', '''|contribution-url'''
: '''|url-access=''' – optional, use when URL links to a source behind a registration barrier or paywall; inserts [[Help:Citation_Style_1#Registration_or_subscription_required|cs1{{pipe}}2 access icon]]; accepted values are: <code>limited</code>, <code>registration</code>, <code>subscription</code>
: '''|year=''' – required, publication year of the work that includes the contribution
===Examples===
When a Wikipedia article makes reference to a work that contains multiple chapters by different authors, bibliographies and reference sections can look rather cluttered:
* {{cite book |last=George |first=Ernest J. |last2=Read |first2=Ralph A. |last3=Johnson |first3=R. W. |last4=Ferber |first4=A. E. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Shelterbelts and Windbreaks |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=//archive.org/stream/yoa1957#page/n785/mode/1up |oclc=704186906}}
* {{cite book |last=Harper |first=V. L. |last2=Frank |first2=Bernard |last3=McQuilkin |first3=W. E. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Forest Practices and Productivity |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=//archive.org/stream/yoa1957#page/n803/mode/1up |oclc=704186906}}
* {{cite book |last=Stout |first=P. R. |last2=Johnson |first2=C. M. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Trace Elements |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=//archive.org/stream/yoa1957#page/n167/mode/1up |oclc=704186906}}
* {{cite book |last=Wadleigh |first=C. H. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Growth of Plants |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=//archive.org/stream/yoa1957#page/n57/mode/1up |oclc=704186906}}
As the list grows longer, the look becomes more cluttered with the unnecessarily repeated detail of full-length citations. With {{tld|harvc}} editors can link to shorter, less detailed contribution citations using standard implementations of {{tlx|sfn}} templates{{sfn|George|Read|Johnson|Ferber|1957}} and {{tlx|harv}} templates (like this: {{Harvard citation|Harper|Frank|McQuilkin|1957}} and also wrapped in {{tag|ref}} tags<ref>{{Harvard citation no brackets|Stout|Johnson|1957}}</ref>). {{tld|harvc}} may also be wrapped in {{tag|ref}} tags so that it becomes part of the article's References section.<ref>{{harvc|last=Benson|first=Ezra Taft|year=1957|chapter=Foreword|url=//archive.org/stream/yoa1957#page/n5/mode/1up|in=Stefferud|p=vi |loc=§2 |ignore-err=yes}}</ref>{{sfn|Wadleigh|1957}}
====Avoiding circular reference====
It may sometimes be necessary to cite a contribution of a source's editor or author such that {{para|last1}} through {{para|last4}} are the same as {{para|in1}} through {{para|in4}}, an editor's preface for example. Such citations can, depending on placement, cause {{tld|sfn}} or {{tld|harv}}-family references to link directly to the citation instead of to the {{tld|harvc}} template, or cause circular links ({{tld|harvc}} linking to itself because its <code>CITEREF</code> anchor identifier is the same as the citation's <code>CITEREF</code> anchor identifier). If {{para|id}} is set, {{tld|harvc}} will use it as an anchor identifier; if {{para|id}} is not set, {{tld|harvc}} will emit an error message when {{para|last1}} through {{para|last4}} are the same as {{para|in1}} through {{para|in4}}.
For example, to reference an editor's preface from article text, create a wikilink inside {{tag|ref}} tags:<ref>[[#Stefferud preface|Stefferud 1957]]</ref>
:<code><nowiki><ref>[[#Stefferud preface|Stefferud 1957]]</ref></nowiki></code>
Write a {{tld|harvc}} template with {{para|id|Stefferud preface}}
:<code><nowiki>{{harvc |last=Stefferud |first=A.|year=1957 |id=Stefferud preface |c=Preface |url=//archive.org/stream/yoa1957#page/n7/mode/1up |in=Stefferud}}</nowiki></code>
====Example references section====
{{reflist}}
====Example bibliography section====
* {{cite book |title=Soil: The Yearbook of Agriculture 1957 |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |url=//archive.org/stream/yoa1957#page/n2/mode/1up |oclc=704186906 }}
** {{harvc |last=George |first=Ernest J. |last2=Read |last3=Johnson |last4=Ferber |year=1957 |contribution=Shelterbelts and Windbreaks |url=//archive.org/stream/yoa1957#page/n785/mode/1up |in=Stefferud |ignore-err=yes}}
** {{harvc |last=Harper |first=V. L. |last2=Frank |last3=McQuilkin |year=1957 |contribution=Forest Practices and Productivity |url=//archive.org/stream/yoa1957#page/n803/mode/1up |in=Stefferud |ignore-err=yes}}
** {{harvc |last=Stefferud |first=A.|year=1957 |id=Stefferud preface |c=Preface |url=//archive.org/stream/yoa1957#page/n7/mode/1up |in=Stefferud |ignore-err=yes}}
** {{harvc |last=Stout |first=P. R. |last2=Johnson |year=1957 |c=Trace Elements |url=//archive.org/stream/yoa1957#page/n167/mode/1up |in=Stefferud |ignore-err=yes}}
** {{harvc |last=Wadleigh |first=C. H.|year=1957 |c=Growth of Plants |url=//archive.org/stream/yoa1957#page/n57/mode/1up |in=Stefferud |ignore-err=yes}}
====More than one contribution====
There are times when an author or authors will have contributed more than once to a work. When this occurs, it is necessary to disambiguate the CITEREF links from the {{tld|harv}} or {{tld|sfn}} templates to the CITEREF id of the appropriate {{tld|harvc}} template.
:{{tld|Harvard citation|Author|YYYYa}} → {{tld|harvc|Author|Contribution 1|YYYYa}} → {{tld|citation|...}}}
:{{tld|Harvard citation|Author|YYYYb}} → {{tld|harvc|Author|Contribution 2|YYYYb}} ↑
In this example, author David Hunt contributed two appendices to ''Christmas Cacti: The Genus ''Schlumbergera'' and Its Hybrids''.
There are two {{tlx|Harvard citation no brackets}} templates that are disambiguated:
:<code><nowiki>{{Harvard citation no brackets|Hunt |1995a}}</nowiki></code> → {{Harvard citation no brackets|Hunt |1995a}}
:<code><nowiki>{{Harvard citation no brackets|Hunt |1995b}}</nowiki></code> → {{Harvard citation no brackets|Hunt |1995b}}
These link to two {{tld|harvc}} templates which use {{para|anchor-year}} for their CITEREF id and for the date in the {{tld|harvc}} rendering as a visual aid for readers:
*<code><nowiki>{{harvc |in=McMillan |in2=Horobin |last=Hunt |first=David |c=Appendix I Names and synonyms of the species, subspecies and interspecific hybrids |year=1995 |anchor-year=1995a |mode=cs2 |nb=yes}}</nowiki></code>
*:{{harvc |in=McMillan |in2=Horobin |last=Hunt |first=David |c=Appendix I Names and synonyms of the species, subspecies and interspecific hybrids |year=1995 |anchor-year=1995a |mode=cs2 |nb=yes |ignore-err=yes}}
*<code><nowiki>{{harvc |in=McMillan |in2=Horobin |last=Hunt |first=David |c=Appendix III Excerpts from a Brazilian diary |year=1995 |anchor-year=1995b |mode=cs2 |nb=yes}}</nowiki></code>
*:{{harvc |in=McMillan |in2=Horobin |last=Hunt |first=David |c=Appendix III Excerpts from a Brazilian diary |year=1995 |anchor-year=1995b |mode=cs2 |nb=yes |ignore-err=yes}}
and the single {{tld|citation}} template:
*<code><nowiki>{{Citation |last=McMillan |first=A. J. S. |last2=Horobin |first2=J. F. |year=1995 |title=Christmas Cacti: The Genus ''Schlumbergera'' and Its Hybrids |edition=p/b |publication-place=Sherbourne, Dorset, UK |publisher=David Hunt |isbn=978-0-9517234-6-3}}</nowiki></code>
*:{{Citation |last=McMillan |first=A. J. S. |last2=Horobin |first2=J. F. |year=1995 |title=Christmas Cacti: The Genus ''Schlumbergera'' and Its Hybrids |edition=p/b |publication-place=Sherbourne, Dorset, UK |publisher=David Hunt |isbn=978-0-9517234-6-3}}
==Error messages==
{{tld|harvc}} emits these error messages:<!--
:<span style="font-size:100%" class="error">harvc: {{para|anchor-year|plain=yes}} missing dab.</span>
::when used, {{para|anchor-year}} must include a single, lowercase letter disambiguator -->
:<span style="font-size:100%" class="error">harvc: author missing from source list.</span>
::the source list parameters {{para|in1}}, {{para|in2}}, {{para|in3}}, and {{para|in4}} form the template's <code>CITEREF</code> link to the full citation. All are not required but must be used in order without numerical gaps.
:<span style="font-size:100%" class="error">harvc: invalid {{para|anchor-year|plain=yes}}.</span>
::when used, {{para|anchor-year}} must be a three- or four-digit number and must have a lowercase <code>CITEREF</code> disambiguator. When the source does not have an identifiable year, use {{para|anchor-year|n.d.{{var|l}}}} or {{para|anchor-year|nd{{var|l}}}} with lowercase <code>CITEREF</code> disambiguator.
:<span style="font-size:100%" class="error">harvc: invalid {{para|display-authors|plain=yes}}.</span>
::the value assigned to {{para|display-authors}} must be a number greater than 0 or the keyword <code>etal</code>
:<span style="font-size:100%" class="error">harvc: invalid {{para|year|plain=yes}}.</span>
::{{para|year}} is an integral part of the template's <code>CITEREF</code> anchor and link. The value of {{para|year}} must be a three- or four-digit number with an optional lowercase <code>CITEREF</code> disambiguator. When the source does not have an identifiable year, use {{para|year|n.d.}} or {{para|year|nd}}.
:<span style="font-size:100%" class="error">harvc: missing {{para|year|plain=yes}}.</span>
::{{para|year}} is missing; the parameter is required.
:<span style="font-size:100%" class="error">harvc: no authors in contributor list.</span>
::this error message indicates that {{tld|harvc}} can't find any of {{para|last}}, {{para|last1}}, {{para|author}} or {{para|author1}} with an assigned value and so cannot make a usable <code>CITEREF</code> anchor. Add at least one of the listed parameters.
:<span style="font-size:100%" class="error">harvc: required contribution is missing.</span>
::this error message indicates that {{tld|harvc}} can't find any of {{para|c}}, {{para|chapter}}, or {{para|contribution}} with an assigned value
:<span style="font-size:100%" class="error">harvc: required {{para|id|plain=yes}} parameter missing.</span>
::this error message is emitted when the {{tld|harvc}} template's <code>CITEREF</code> anchor identifier would conflict with the long-form citation's <code>CITEREF</code> anchor identifier. See [[#Avoiding circular reference|Examples]]
:<span style="font-size:100%" class="error">harvc: {{para|year|plain=yes}} / {{para|anchor-year|plain=yes}} mismatch.</span>
::the year portion of {{para|anchor-year|YYYY{{var|l}}}} must match the year given in {{para|year|YYYY}}
<includeonly>{{Sandbox other||
<!-- Categories below this line, please; interwikis at Wikidata -->
[[Category:Citation utility templates]]
}}</includeonly>
1od2wjrsy465o8pwe3u0s8krytccz9q
801805
801804
2021-11-10T05:17:56Z
en>Newone
0
801805
wikitext
text/x-wiki
{{Documentation subpage}}
<!-- Place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
{{lua|Module:Harvc}}
{{uses TemplateStyles|Module:Citation/CS1/styles.css|noprotcat=yes}}
This template is a citation hybrid that has characteristics of the long-form [[Help:Citation Style 1|cs1]] and [[Help:Citation Style 2|cs2]] and characteristics of short-form {{Template link expanded|sfn}} and the {{Template link expanded|harv}} families of templates. Its purpose is to provide a method that allows editors to refer to a contribution or chapter in a larger work when more than a few such referrals are required. {{Template link code|harvc}} is not a substitute for a properly constructed citation.
Short-form templates {{Template link code|sfn}} and {{Template link code|harv}} are often used to link from an article's references section to a long-form cs1|2 template in a bibliography section:
:{{Template link code|sfn}} → {{Template link expanded|cite book}}
It is not uncommon for a source have multiple contributors. When it is necessary to refer to multiple contributions in the same source, repeating all of the bibliographic details in multiple long-form citation templates adds to references-section clutter. {{Template link code|harvc}} is designed to hold only the detail necessary to identify a contribution and link to the enclosing work's long-form citation where all of the bibliographic detail can be found:
:{{Template link code|sfn}} → {{Template link code|harvc}} → {{Template link code|cite book}}
== Usage ==
The minimal form is:
:<code><nowiki>{{harvc |last=contributor name |year=publication year |c=contribution title |in=source editor/author name}}</nowiki></code>
According to the comments in [[Module:Harvc]], mistaken {{red|Harvc error: no target:}} error messages may be produced when the template is nested in other templates as on documentation pages. The otherwise undocumented parameter, {{para|ignore-err|yes}}, can be added to prevent this.
===Parameters===
{{Template link code|harvc}} creates a <code>CITEREF</code> anchor from one to four contribution or chapter author surnames ({{para|last''n''}}) and the value in {{para|year}}. This allows {{Template link code|harvc}} to be the target of a link created by {{Template link expanded|sfn}} or {{Template link code|harv}} family templates. From {{para|in{{var|n}}}} and {{para|year}}, {{Template link code|harvc}} creates a CITEREF link similar to those created by {{Template link expanded|Harvard citation no brackets}} and {{Template link expanded|sfn}}
: '''|anchor-year=''' – optional, for use for author(s) with more than one contribution to the work; requires CITEREF disambiguator; see [[#More than one contribution|Examples]]
: '''|author-link=''' – optional, title of existing Wikipedia article about the first contributor—not the contributor's website; do not wikilink; alias: '''|author-link1='''
:: '''|author-link''n''=''' – optional, title of existing Wikipedia article about contributor''n''; choose ''n'' to match ''n'' in '''|last''n''='''
: '''|author-mask=''m''''' – optional, replaces name of the first contributor with ''m'' (commonly 2) em dashes; alias: '''|author-mask1='''
:: '''|author-mask''n''=''m''''' – optional, replaces name of contributor''n'' with ''m'' em dashes; choose ''n'' to match ''n'' in '''|last''n''='''
:: '''|author-mask{{var|n}}=<{{var|text}}>''' – optional, replaces name of contributor''n'' with <{{var|text}}>
: '''|c=''' – required, the title of chapter or contribution; rendered quoted in upright font; aliases: '''|chapter=''', '''|contribution='''
: '''|display-authors=''' – optional, defines how {{Template link code|harvc}} displays the contributor list; ignored when '''|name-list-style=harv''':
:: {{para|display-authors}} – when empty or omitted, displays all contributor names in last/first format
:: {{para|display-authors|{{var|n}}}} – displays ''n'' contributor names in last/first format; appends et al. when ''n'' is less than the number of contributors included in the template
:: {{para|display-authors|etal}} – displays all contributor names in last/first format and appends et al.
: '''|first=''' – optional, first contributor's given or first name; alias: '''|first1='''
:: '''|first''n''=''' – optional, contributor''n'' given or first name; ''n'' begins at 2 and increases by 1 for each additional '''|first''n''='''
: '''|id=''' – required when {{para|last1}}-{{para|last4}} are the same as {{para|in1}}-{{para|in4}}; otherwise optional. See [[#Avoiding circular reference|Examples]]
: '''|in=''' – required, surname or last name of first editor or author of the work that includes the contribution; aliases: '''|in1='''
: '''|in2=''' – optional, surname or last name of second editor or author
: '''|in3=''' – optional, surname or last name of third editor or author
: '''|in4=''' – optional, surname or last name of fourth editor or author
: '''|last=''' – required, surname or last name of first author; aliases: '''|last1='''
:: '''|last''n''=''' – optional, contributor''n'' surname or last name; ''n'' begins at 2 and increases by 1 for each additional '''|last''n''=''';
: '''|loc=''' – optional, other location identifier, displays after {{para|p}} or {{para|pp}}
: '''|mode=''' – controls rendered display to match that of adjacent CS1 or CS2 citations; defaults to CS1 style
:: '''|mode=cs2''' – mimic {{Template link expanded|citation}} style (comma separators, no terminal punctuation, static text not capitalized)
: '''|name-list-style=''' – optional, controls contributor name list display style
:: '''|name-list-style=harv''' – mimic {{Template link code|sfn}} or {{Template link code|harv}} format (one to four last names); overrides '''|display-authors='''
:: '''|name-list-style=amp''' – inserts an ampersand between the last two contributor names
: '''|nb=''' – optional, when set to <code>yes</code>, instructs {{Template link code|harvc}} to render source link without parentheses around the year; same format as that produced by {{Template link expanded|Harvard citation no brackets}}
: '''|p=''' – optional, single page number where cited material can be found; aliases: '''|page='''
: '''|pp=''' – optional, multiple page numbers, page ranges, etc where cited material can be found; aliases: '''|pages='''
: '''|ps=''' – optional, sets terminal punctuation; default is full stop; overrides '''|mode=cs2'''; aliases: '''|postscript='''
:: '''|ps=none''' – renders output without terminal punctuation
: '''|url=''' – optional, URL of an online location where the text of the contribution can be found; aliases: '''|chapter-url''', '''|contribution-url'''
: '''|url-access=''' – optional, use when URL links to a source behind a registration barrier or paywall; inserts [[Help:Citation_Style_1#Registration_or_subscription_required|cs1{{pipe}}2 access icon]]; accepted values are: <code>limited</code>, <code>registration</code>, <code>subscription</code>
: '''|year=''' – required, publication year of the work that includes the contribution
===Examples===
When a Wikipedia article makes reference to a work that contains multiple chapters by different authors, bibliographies and reference sections can look rather cluttered:
* {{cite book |last=George |first=Ernest J. |last2=Read |first2=Ralph A. |last3=Johnson |first3=R. W. |last4=Ferber |first4=A. E. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Shelterbelts and Windbreaks |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=//archive.org/stream/yoa1957#page/n785/mode/1up |oclc=704186906}}
* {{cite book |last=Harper |first=V. L. |last2=Frank |first2=Bernard |last3=McQuilkin |first3=W. E. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Forest Practices and Productivity |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=//archive.org/stream/yoa1957#page/n803/mode/1up |oclc=704186906}}
* {{cite book |last=Stout |first=P. R. |last2=Johnson |first2=C. M. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Trace Elements |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=//archive.org/stream/yoa1957#page/n167/mode/1up |oclc=704186906}}
* {{cite book |last=Wadleigh |first=C. H. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Growth of Plants |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=//archive.org/stream/yoa1957#page/n57/mode/1up |oclc=704186906}}
As the list grows longer, the look becomes more cluttered with the unnecessarily repeated detail of full-length citations. With {{Template link code|harvc}} editors can link to shorter, less detailed contribution citations using standard implementations of {{Template link expanded|sfn}} templates{{sfn|George|Read|Johnson|Ferber|1957}} and {{Template link expanded|harv}} templates (like this: {{Harvard citation|Harper|Frank|McQuilkin|1957}} and also wrapped in {{tag|ref}} tags<ref>{{Harvard citation no brackets|Stout|Johnson|1957}}</ref>). {{Template link code|harvc}} may also be wrapped in {{tag|ref}} tags so that it becomes part of the article's References section.<ref>{{harvc|last=Benson|first=Ezra Taft|year=1957|chapter=Foreword|url=//archive.org/stream/yoa1957#page/n5/mode/1up|in=Stefferud|p=vi |loc=§2 |ignore-err=yes}}</ref>{{sfn|Wadleigh|1957}}
====Avoiding circular reference====
It may sometimes be necessary to cite a contribution of a source's editor or author such that {{para|last1}} through {{para|last4}} are the same as {{para|in1}} through {{para|in4}}, an editor's preface for example. Such citations can, depending on placement, cause {{Template link code|sfn}} or {{Template link code|harv}}-family references to link directly to the citation instead of to the {{Template link code|harvc}} template, or cause circular links ({{Template link code|harvc}} linking to itself because its <code>CITEREF</code> anchor identifier is the same as the citation's <code>CITEREF</code> anchor identifier). If {{para|id}} is set, {{Template link code|harvc}} will use it as an anchor identifier; if {{para|id}} is not set, {{Template link code|harvc}} will emit an error message when {{para|last1}} through {{para|last4}} are the same as {{para|in1}} through {{para|in4}}.
For example, to reference an editor's preface from article text, create a wikilink inside {{tag|ref}} tags:<ref>[[#Stefferud preface|Stefferud 1957]]</ref>
:<code><nowiki><ref>[[#Stefferud preface|Stefferud 1957]]</ref></nowiki></code>
Write a {{Template link code|harvc}} template with {{para|id|Stefferud preface}}
:<code><nowiki>{{harvc |last=Stefferud |first=A.|year=1957 |id=Stefferud preface |c=Preface |url=//archive.org/stream/yoa1957#page/n7/mode/1up |in=Stefferud}}</nowiki></code>
====Example references section====
{{reflist}}
====Example bibliography section====
* {{cite book |title=Soil: The Yearbook of Agriculture 1957 |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |url=//archive.org/stream/yoa1957#page/n2/mode/1up |oclc=704186906 }}
** {{harvc |last=George |first=Ernest J. |last2=Read |last3=Johnson |last4=Ferber |year=1957 |contribution=Shelterbelts and Windbreaks |url=//archive.org/stream/yoa1957#page/n785/mode/1up |in=Stefferud |ignore-err=yes}}
** {{harvc |last=Harper |first=V. L. |last2=Frank |last3=McQuilkin |year=1957 |contribution=Forest Practices and Productivity |url=//archive.org/stream/yoa1957#page/n803/mode/1up |in=Stefferud |ignore-err=yes}}
** {{harvc |last=Stefferud |first=A.|year=1957 |id=Stefferud preface |c=Preface |url=//archive.org/stream/yoa1957#page/n7/mode/1up |in=Stefferud |ignore-err=yes}}
** {{harvc |last=Stout |first=P. R. |last2=Johnson |year=1957 |c=Trace Elements |url=//archive.org/stream/yoa1957#page/n167/mode/1up |in=Stefferud |ignore-err=yes}}
** {{harvc |last=Wadleigh |first=C. H.|year=1957 |c=Growth of Plants |url=//archive.org/stream/yoa1957#page/n57/mode/1up |in=Stefferud |ignore-err=yes}}
====More than one contribution====
There are times when an author or authors will have contributed more than once to a work. When this occurs, it is necessary to disambiguate the CITEREF links from the {{Template link code|harv}} or {{Template link code|sfn}} templates to the CITEREF id of the appropriate {{Template link code|harvc}} template.
:{{Template link code|Harvard citation|Author|YYYYa}} → {{Template link code|harvc|Author|Contribution 1|YYYYa}} → {{Template link code|citation|...}}}
:{{Template link code|Harvard citation|Author|YYYYb}} → {{Template link code|harvc|Author|Contribution 2|YYYYb}} ↑
In this example, author David Hunt contributed two appendices to ''Christmas Cacti: The Genus ''Schlumbergera'' and Its Hybrids''.
There are two {{Template link expanded|Harvard citation no brackets}} templates that are disambiguated:
:<code><nowiki>{{Harvard citation no brackets|Hunt |1995a}}</nowiki></code> → {{Harvard citation no brackets|Hunt |1995a}}
:<code><nowiki>{{Harvard citation no brackets|Hunt |1995b}}</nowiki></code> → {{Harvard citation no brackets|Hunt |1995b}}
These link to two {{Template link code|harvc}} templates which use {{para|anchor-year}} for their CITEREF id and for the date in the {{Template link code|harvc}} rendering as a visual aid for readers:
*<code><nowiki>{{harvc |in=McMillan |in2=Horobin |last=Hunt |first=David |c=Appendix I Names and synonyms of the species, subspecies and interspecific hybrids |year=1995 |anchor-year=1995a |mode=cs2 |nb=yes}}</nowiki></code>
*:{{harvc |in=McMillan |in2=Horobin |last=Hunt |first=David |c=Appendix I Names and synonyms of the species, subspecies and interspecific hybrids |year=1995 |anchor-year=1995a |mode=cs2 |nb=yes |ignore-err=yes}}
*<code><nowiki>{{harvc |in=McMillan |in2=Horobin |last=Hunt |first=David |c=Appendix III Excerpts from a Brazilian diary |year=1995 |anchor-year=1995b |mode=cs2 |nb=yes}}</nowiki></code>
*:{{harvc |in=McMillan |in2=Horobin |last=Hunt |first=David |c=Appendix III Excerpts from a Brazilian diary |year=1995 |anchor-year=1995b |mode=cs2 |nb=yes |ignore-err=yes}}
and the single {{Template link code|citation}} template:
*<code><nowiki>{{Citation |last=McMillan |first=A. J. S. |last2=Horobin |first2=J. F. |year=1995 |title=Christmas Cacti: The Genus ''Schlumbergera'' and Its Hybrids |edition=p/b |publication-place=Sherbourne, Dorset, UK |publisher=David Hunt |isbn=978-0-9517234-6-3}}</nowiki></code>
*:{{Citation |last=McMillan |first=A. J. S. |last2=Horobin |first2=J. F. |year=1995 |title=Christmas Cacti: The Genus ''Schlumbergera'' and Its Hybrids |edition=p/b |publication-place=Sherbourne, Dorset, UK |publisher=David Hunt |isbn=978-0-9517234-6-3}}
==Error messages==
{{Template link code|harvc}} emits these error messages:<!--
:<span style="font-size:100%" class="error">harvc: {{para|anchor-year|plain=yes}} missing dab.</span>
::when used, {{para|anchor-year}} must include a single, lowercase letter disambiguator -->
:<span style="font-size:100%" class="error">harvc: author missing from source list.</span>
::the source list parameters {{para|in1}}, {{para|in2}}, {{para|in3}}, and {{para|in4}} form the template's <code>CITEREF</code> link to the full citation. All are not required but must be used in order without numerical gaps.
:<span style="font-size:100%" class="error">harvc: invalid {{para|anchor-year|plain=yes}}.</span>
::when used, {{para|anchor-year}} must be a three- or four-digit number and must have a lowercase <code>CITEREF</code> disambiguator. When the source does not have an identifiable year, use {{para|anchor-year|n.d.{{var|l}}}} or {{para|anchor-year|nd{{var|l}}}} with lowercase <code>CITEREF</code> disambiguator.
:<span style="font-size:100%" class="error">harvc: invalid {{para|display-authors|plain=yes}}.</span>
::the value assigned to {{para|display-authors}} must be a number greater than 0 or the keyword <code>etal</code>
:<span style="font-size:100%" class="error">harvc: invalid {{para|year|plain=yes}}.</span>
::{{para|year}} is an integral part of the template's <code>CITEREF</code> anchor and link. The value of {{para|year}} must be a three- or four-digit number with an optional lowercase <code>CITEREF</code> disambiguator. When the source does not have an identifiable year, use {{para|year|n.d.}} or {{para|year|nd}}.
:<span style="font-size:100%" class="error">harvc: missing {{para|year|plain=yes}}.</span>
::{{para|year}} is missing; the parameter is required.
:<span style="font-size:100%" class="error">harvc: no authors in contributor list.</span>
::this error message indicates that {{Template link code|harvc}} can't find any of {{para|last}}, {{para|last1}}, {{para|author}} or {{para|author1}} with an assigned value and so cannot make a usable <code>CITEREF</code> anchor. Add at least one of the listed parameters.
:<span style="font-size:100%" class="error">harvc: required contribution is missing.</span>
::this error message indicates that {{Template link code|harvc}} can't find any of {{para|c}}, {{para|chapter}}, or {{para|contribution}} with an assigned value
:<span style="font-size:100%" class="error">harvc: required {{para|id|plain=yes}} parameter missing.</span>
::this error message is emitted when the {{Template link code|harvc}} template's <code>CITEREF</code> anchor identifier would conflict with the long-form citation's <code>CITEREF</code> anchor identifier. See [[#Avoiding circular reference|Examples]]
:<span style="font-size:100%" class="error">harvc: {{para|year|plain=yes}} / {{para|anchor-year|plain=yes}} mismatch.</span>
::the year portion of {{para|anchor-year|YYYY{{var|l}}}} must match the year given in {{para|year|YYYY}}
<includeonly>{{Sandbox other||
<!-- Categories below this line, please; interwikis at Wikidata -->
[[Category:Citation utility templates]]
}}</includeonly>
a831acgltb7dhl7k4nmmt3vmkwdufn3
801806
801805
2021-11-10T12:54:25Z
en>Trappist the monk
0
revert multiple; pointless;
801806
wikitext
text/x-wiki
{{Documentation subpage}}
<!-- Place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
{{lua|Module:Harvc}}
{{uses TemplateStyles|Module:Citation/CS1/styles.css|noprotcat=yes}}
This template is a citation hybrid that has characteristics of the long-form [[Help:Citation Style 1|cs1]] and [[Help:Citation Style 2|cs2]] and characteristics of short-form {{tlx|sfn}} and the {{tlx|harv}} families of templates. Its purpose is to provide a method that allows editors to refer to a contribution or chapter in a larger work when more than a few such referrals are required. {{tld|harvc}} is not a substitute for a properly constructed citation.
Short-form templates {{tld|sfn}} and {{tld|harv}} are often used to link from an article's references section to a long-form cs1|2 template in a bibliography section:
:{{tld|sfn}} → {{tlx|cite book}}
It is not uncommon for a source have multiple contributors. When it is necessary to refer to multiple contributions in the same source, repeating all of the bibliographic details in multiple long-form citation templates adds to references-section clutter. {{tld|harvc}} is designed to hold only the detail necessary to identify a contribution and link to the enclosing work's long-form citation where all of the bibliographic detail can be found:
:{{tld|sfn}} → {{tld|harvc}} → {{tld|cite book}}
== Usage ==
The minimal form is:
:<code><nowiki>{{harvc |last=contributor name |year=publication year |c=contribution title |in=source editor/author name}}</nowiki></code>
According to the comments in [[Module:Harvc]], mistaken {{red|Harvc error: no target:}} error messages may be produced when the template is nested in other templates as on documentation pages. The otherwise undocumented parameter, {{para|ignore-err|yes}}, can be added to prevent this.
===Parameters===
{{tld|harvc}} creates a <code>CITEREF</code> anchor from one to four contribution or chapter author surnames ({{para|last''n''}}) and the value in {{para|year}}. This allows {{tld|harvc}} to be the target of a link created by {{tlx|sfn}} or {{tld|harv}} family templates. From {{para|in{{var|n}}}} and {{para|year}}, {{tld|harvc}} creates a CITEREF link similar to those created by {{tlx|harvnb}} and {{tlx|sfn}}
: '''|anchor-year=''' – optional, for use for author(s) with more than one contribution to the work; requires CITEREF disambiguator; see [[#More than one contribution|Examples]]
: '''|author-link=''' – optional, title of existing Wikipedia article about the first contributor—not the contributor's website; do not wikilink; alias: '''|author-link1='''
:: '''|author-link''n''=''' – optional, title of existing Wikipedia article about contributor''n''; choose ''n'' to match ''n'' in '''|last''n''='''
: '''|author-mask=''m''''' – optional, replaces name of the first contributor with ''m'' (commonly 2) em dashes; alias: '''|author-mask1='''
:: '''|author-mask''n''=''m''''' – optional, replaces name of contributor''n'' with ''m'' em dashes; choose ''n'' to match ''n'' in '''|last''n''='''
:: '''|author-mask{{var|n}}=<{{var|text}}>''' – optional, replaces name of contributor''n'' with <{{var|text}}>
: '''|c=''' – required, the title of chapter or contribution; rendered quoted in upright font; aliases: '''|chapter=''', '''|contribution='''
: '''|display-authors=''' – optional, defines how {{tld|harvc}} displays the contributor list; ignored when '''|name-list-style=harv''':
:: {{para|display-authors}} – when empty or omitted, displays all contributor names in last/first format
:: {{para|display-authors|{{var|n}}}} – displays ''n'' contributor names in last/first format; appends et al. when ''n'' is less than the number of contributors included in the template
:: {{para|display-authors|etal}} – displays all contributor names in last/first format and appends et al.
: '''|first=''' – optional, first contributor's given or first name; alias: '''|first1='''
:: '''|first''n''=''' – optional, contributor''n'' given or first name; ''n'' begins at 2 and increases by 1 for each additional '''|first''n''='''
: '''|id=''' – required when {{para|last1}}-{{para|last4}} are the same as {{para|in1}}-{{para|in4}}; otherwise optional. See [[#Avoiding circular reference|Examples]]
: '''|in=''' – required, surname or last name of first editor or author of the work that includes the contribution; aliases: '''|in1='''
: '''|in2=''' – optional, surname or last name of second editor or author
: '''|in3=''' – optional, surname or last name of third editor or author
: '''|in4=''' – optional, surname or last name of fourth editor or author
: '''|last=''' – required, surname or last name of first author; aliases: '''|last1='''
:: '''|last''n''=''' – optional, contributor''n'' surname or last name; ''n'' begins at 2 and increases by 1 for each additional '''|last''n''=''';
: '''|loc=''' – optional, other location identifier, displays after {{para|p}} or {{para|pp}}
: '''|mode=''' – controls rendered display to match that of adjacent CS1 or CS2 citations; defaults to CS1 style
:: '''|mode=cs2''' – mimic {{tlx|citation}} style (comma separators, no terminal punctuation, static text not capitalized)
: '''|name-list-style=''' – optional, controls contributor name list display style
:: '''|name-list-style=harv''' – mimic {{tld|sfn}} or {{tld|harv}} format (one to four last names); overrides '''|display-authors='''
:: '''|name-list-style=amp''' – inserts an ampersand between the last two contributor names
: '''|nb=''' – optional, when set to <code>yes</code>, instructs {{tld|harvc}} to render source link without parentheses around the year; same format as that produced by {{tlx|harvnb}}
: '''|p=''' – optional, single page number where cited material can be found; aliases: '''|page='''
: '''|pp=''' – optional, multiple page numbers, page ranges, etc where cited material can be found; aliases: '''|pages='''
: '''|ps=''' – optional, sets terminal punctuation; default is full stop; overrides '''|mode=cs2'''; aliases: '''|postscript='''
:: '''|ps=none''' – renders output without terminal punctuation
: '''|url=''' – optional, URL of an online location where the text of the contribution can be found; aliases: '''|chapter-url''', '''|contribution-url'''
: '''|url-access=''' – optional, use when URL links to a source behind a registration barrier or paywall; inserts [[Help:Citation_Style_1#Registration_or_subscription_required|cs1{{pipe}}2 access icon]]; accepted values are: <code>limited</code>, <code>registration</code>, <code>subscription</code>
: '''|year=''' – required, publication year of the work that includes the contribution
===Examples===
When a Wikipedia article makes reference to a work that contains multiple chapters by different authors, bibliographies and reference sections can look rather cluttered:
* {{cite book |last=George |first=Ernest J. |last2=Read |first2=Ralph A. |last3=Johnson |first3=R. W. |last4=Ferber |first4=A. E. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Shelterbelts and Windbreaks |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=//archive.org/stream/yoa1957#page/n785/mode/1up |oclc=704186906}}
* {{cite book |last=Harper |first=V. L. |last2=Frank |first2=Bernard |last3=McQuilkin |first3=W. E. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Forest Practices and Productivity |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=//archive.org/stream/yoa1957#page/n803/mode/1up |oclc=704186906}}
* {{cite book |last=Stout |first=P. R. |last2=Johnson |first2=C. M. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Trace Elements |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=//archive.org/stream/yoa1957#page/n167/mode/1up |oclc=704186906}}
* {{cite book |last=Wadleigh |first=C. H. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Growth of Plants |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=//archive.org/stream/yoa1957#page/n57/mode/1up |oclc=704186906}}
As the list grows longer, the look becomes more cluttered with the unnecessarily repeated detail of full-length citations. With {{tld|harvc}} editors can link to shorter, less detailed contribution citations using standard implementations of {{tlx|sfn}} templates{{sfn|George|Read|Johnson|Ferber|1957}} and {{tlx|harv}} templates (like this: {{harv|Harper|Frank|McQuilkin|1957}} and also wrapped in {{tag|ref}} tags<ref>{{harvnb|Stout|Johnson|1957}}</ref>). {{tld|harvc}} may also be wrapped in {{tag|ref}} tags so that it becomes part of the article's References section.<ref>{{harvc|last=Benson|first=Ezra Taft|year=1957|chapter=Foreword|url=//archive.org/stream/yoa1957#page/n5/mode/1up|in=Stefferud|p=vi |loc=§2 |ignore-err=yes}}</ref>{{sfn|Wadleigh|1957}}
====Avoiding circular reference====
It may sometimes be necessary to cite a contribution of a source's editor or author such that {{para|last1}} through {{para|last4}} are the same as {{para|in1}} through {{para|in4}}, an editor's preface for example. Such citations can, depending on placement, cause {{tld|sfn}} or {{tld|harv}}-family references to link directly to the citation instead of to the {{tld|harvc}} template, or cause circular links ({{tld|harvc}} linking to itself because its <code>CITEREF</code> anchor identifier is the same as the citation's <code>CITEREF</code> anchor identifier). If {{para|id}} is set, {{tld|harvc}} will use it as an anchor identifier; if {{para|id}} is not set, {{tld|harvc}} will emit an error message when {{para|last1}} through {{para|last4}} are the same as {{para|in1}} through {{para|in4}}.
For example, to reference an editor's preface from article text, create a wikilink inside {{tag|ref}} tags:<ref>[[#Stefferud preface|Stefferud 1957]]</ref>
:<code><nowiki><ref>[[#Stefferud preface|Stefferud 1957]]</ref></nowiki></code>
Write a {{tld|harvc}} template with {{para|id|Stefferud preface}}
:<code><nowiki>{{harvc |last=Stefferud |first=A.|year=1957 |id=Stefferud preface |c=Preface |url=//archive.org/stream/yoa1957#page/n7/mode/1up |in=Stefferud}}</nowiki></code>
====Example references section====
{{reflist}}
====Example bibliography section====
* {{cite book |title=Soil: The Yearbook of Agriculture 1957 |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |url=//archive.org/stream/yoa1957#page/n2/mode/1up |oclc=704186906 }}
** {{harvc |last=George |first=Ernest J. |last2=Read |last3=Johnson |last4=Ferber |year=1957 |contribution=Shelterbelts and Windbreaks |url=//archive.org/stream/yoa1957#page/n785/mode/1up |in=Stefferud |ignore-err=yes}}
** {{harvc |last=Harper |first=V. L. |last2=Frank |last3=McQuilkin |year=1957 |contribution=Forest Practices and Productivity |url=//archive.org/stream/yoa1957#page/n803/mode/1up |in=Stefferud |ignore-err=yes}}
** {{harvc |last=Stefferud |first=A.|year=1957 |id=Stefferud preface |c=Preface |url=//archive.org/stream/yoa1957#page/n7/mode/1up |in=Stefferud |ignore-err=yes}}
** {{harvc |last=Stout |first=P. R. |last2=Johnson |year=1957 |c=Trace Elements |url=//archive.org/stream/yoa1957#page/n167/mode/1up |in=Stefferud |ignore-err=yes}}
** {{harvc |last=Wadleigh |first=C. H.|year=1957 |c=Growth of Plants |url=//archive.org/stream/yoa1957#page/n57/mode/1up |in=Stefferud |ignore-err=yes}}
====More than one contribution====
There are times when an author or authors will have contributed more than once to a work. When this occurs, it is necessary to disambiguate the CITEREF links from the {{tld|harv}} or {{tld|sfn}} templates to the CITEREF id of the appropriate {{tld|harvc}} template.
:{{tld|harv|Author|YYYYa}} → {{tld|harvc|Author|Contribution 1|YYYYa}} → {{tld|citation|...}}}
:{{tld|harv|Author|YYYYb}} → {{tld|harvc|Author|Contribution 2|YYYYb}} ↑
In this example, author David Hunt contributed two appendices to ''Christmas Cacti: The Genus ''Schlumbergera'' and Its Hybrids''.
There are two {{tlx|harvnb}} templates that are disambiguated:
:<code><nowiki>{{harvnb |Hunt |1995a}}</nowiki></code> → {{harvnb |Hunt |1995a}}
:<code><nowiki>{{harvnb |Hunt |1995b}}</nowiki></code> → {{harvnb |Hunt |1995b}}
These link to two {{tld|harvc}} templates which use {{para|anchor-year}} for their CITEREF id and for the date in the {{tld|harvc}} rendering as a visual aid for readers:
*<code><nowiki>{{harvc |in=McMillan |in2=Horobin |last=Hunt |first=David |c=Appendix I Names and synonyms of the species, subspecies and interspecific hybrids |year=1995 |anchor-year=1995a |mode=cs2 |nb=yes}}</nowiki></code>
*:{{harvc |in=McMillan |in2=Horobin |last=Hunt |first=David |c=Appendix I Names and synonyms of the species, subspecies and interspecific hybrids |year=1995 |anchor-year=1995a |mode=cs2 |nb=yes |ignore-err=yes}}
*<code><nowiki>{{harvc |in=McMillan |in2=Horobin |last=Hunt |first=David |c=Appendix III Excerpts from a Brazilian diary |year=1995 |anchor-year=1995b |mode=cs2 |nb=yes}}</nowiki></code>
*:{{harvc |in=McMillan |in2=Horobin |last=Hunt |first=David |c=Appendix III Excerpts from a Brazilian diary |year=1995 |anchor-year=1995b |mode=cs2 |nb=yes |ignore-err=yes}}
and the single {{tld|citation}} template:
*<code><nowiki>{{Citation |last=McMillan |first=A. J. S. |last2=Horobin |first2=J. F. |year=1995 |title=Christmas Cacti: The Genus ''Schlumbergera'' and Its Hybrids |edition=p/b |publication-place=Sherbourne, Dorset, UK |publisher=David Hunt |isbn=978-0-9517234-6-3}}</nowiki></code>
*:{{Citation |last=McMillan |first=A. J. S. |last2=Horobin |first2=J. F. |year=1995 |title=Christmas Cacti: The Genus ''Schlumbergera'' and Its Hybrids |edition=p/b |publication-place=Sherbourne, Dorset, UK |publisher=David Hunt |isbn=978-0-9517234-6-3}}
==Error messages==
{{tld|harvc}} emits these error messages:<!--
:<span style="font-size:100%" class="error">harvc: {{para|anchor-year|plain=yes}} missing dab.</span>
::when used, {{para|anchor-year}} must include a single, lowercase letter disambiguator -->
:<span style="font-size:100%" class="error">harvc: author missing from source list.</span>
::the source list parameters {{para|in1}}, {{para|in2}}, {{para|in3}}, and {{para|in4}} form the template's <code>CITEREF</code> link to the full citation. All are not required but must be used in order without numerical gaps.
:<span style="font-size:100%" class="error">harvc: invalid {{para|anchor-year|plain=yes}}.</span>
::when used, {{para|anchor-year}} must be a three- or four-digit number and must have a lowercase <code>CITEREF</code> disambiguator. When the source does not have an identifiable year, use {{para|anchor-year|n.d.{{var|l}}}} or {{para|anchor-year|nd{{var|l}}}} with lowercase <code>CITEREF</code> disambiguator.
:<span style="font-size:100%" class="error">harvc: invalid {{para|display-authors|plain=yes}}.</span>
::the value assigned to {{para|display-authors}} must be a number greater than 0 or the keyword <code>etal</code>
:<span style="font-size:100%" class="error">harvc: invalid {{para|year|plain=yes}}.</span>
::{{para|year}} is an integral part of the template's <code>CITEREF</code> anchor and link. The value of {{para|year}} must be a three- or four-digit number with an optional lowercase <code>CITEREF</code> disambiguator. When the source does not have an identifiable year, use {{para|year|n.d.}} or {{para|year|nd}}.
:<span style="font-size:100%" class="error">harvc: missing {{para|year|plain=yes}}.</span>
::{{para|year}} is missing; the parameter is required.
:<span style="font-size:100%" class="error">harvc: no authors in contributor list.</span>
::this error message indicates that {{tld|harvc}} can't find any of {{para|last}}, {{para|last1}}, {{para|author}} or {{para|author1}} with an assigned value and so cannot make a usable <code>CITEREF</code> anchor. Add at least one of the listed parameters.
:<span style="font-size:100%" class="error">harvc: required contribution is missing.</span>
::this error message indicates that {{tld|harvc}} can't find any of {{para|c}}, {{para|chapter}}, or {{para|contribution}} with an assigned value
:<span style="font-size:100%" class="error">harvc: required {{para|id|plain=yes}} parameter missing.</span>
::this error message is emitted when the {{tld|harvc}} template's <code>CITEREF</code> anchor identifier would conflict with the long-form citation's <code>CITEREF</code> anchor identifier. See [[#Avoiding circular reference|Examples]]
:<span style="font-size:100%" class="error">harvc: {{para|year|plain=yes}} / {{para|anchor-year|plain=yes}} mismatch.</span>
::the year portion of {{para|anchor-year|YYYY{{var|l}}}} must match the year given in {{para|year|YYYY}}
<includeonly>{{Sandbox other||
<!-- Categories below this line, please; interwikis at Wikidata -->
[[Category:Citation utility templates]]
}}</includeonly>
m00v79ndhxyu11b48xs6mxovj11pyt8
801807
801806
2022-08-13T01:24:13Z
en>Guarapiranga
0
/* */ grammar
801807
wikitext
text/x-wiki
{{Documentation subpage}}
<!-- Place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
{{lua|Module:Harvc}}
{{uses TemplateStyles|Module:Citation/CS1/styles.css|noprotcat=yes}}
This template is a citation hybrid that has characteristics of long-form [[Help:Citation Style 1|cs1]] and [[Help:Citation Style 2|cs2]], of short-form {{tlx|sfn}} and of the {{tlx|harv}} families of templates. Its purpose is to provide a method that allows editors to refer to a contribution or chapter in a larger work when more than a few such referrals are required. {{tld|harvc}} is not a substitute for a properly constructed citation.
Short-form templates {{tld|sfn}} and {{tld|harv}} are often used to link from an article's references section to a long-form cs1|2 template in a bibliography section:
:{{tld|sfn}} → {{tlx|cite book}}
It is not uncommon for a source have multiple contributors. When it is necessary to refer to multiple contributions in the same source, repeating all of the bibliographic details in multiple long-form citation templates adds to references-section clutter. {{tld|harvc}} is designed to hold only the detail necessary to identify a contribution and link to the enclosing work's long-form citation where all of the bibliographic detail can be found:
:{{tld|sfn}} → {{tld|harvc}} → {{tld|cite book}}
== Usage ==
The minimal form is:
:<code><nowiki>{{harvc |last=contributor name |year=publication year |c=contribution title |in=source editor/author name}}</nowiki></code>
According to the comments in [[Module:Harvc]], mistaken {{red|Harvc error: no target:}} error messages may be produced when the template is nested in other templates as on documentation pages. The otherwise undocumented parameter, {{para|ignore-err|yes}}, can be added to prevent this.
===Parameters===
{{tld|harvc}} creates a <code>CITEREF</code> anchor from one to four contribution or chapter author surnames ({{para|last''n''}}) and the value in {{para|year}}. This allows {{tld|harvc}} to be the target of a link created by {{tlx|sfn}} or {{tld|harv}} family templates. From {{para|in{{var|n}}}} and {{para|year}}, {{tld|harvc}} creates a CITEREF link similar to those created by {{tlx|harvnb}} and {{tlx|sfn}}
: '''|anchor-year=''' – optional, for use for author(s) with more than one contribution to the work; requires CITEREF disambiguator; see [[#More than one contribution|Examples]]
: '''|author-link=''' – optional, title of existing Wikipedia article about the first contributor—not the contributor's website; do not wikilink; alias: '''|author-link1='''
:: '''|author-link''n''=''' – optional, title of existing Wikipedia article about contributor''n''; choose ''n'' to match ''n'' in '''|last''n''='''
: '''|author-mask=''m''''' – optional, replaces name of the first contributor with ''m'' (commonly 2) em dashes; alias: '''|author-mask1='''
:: '''|author-mask''n''=''m''''' – optional, replaces name of contributor''n'' with ''m'' em dashes; choose ''n'' to match ''n'' in '''|last''n''='''
:: '''|author-mask{{var|n}}=<{{var|text}}>''' – optional, replaces name of contributor''n'' with <{{var|text}}>
: '''|c=''' – required, the title of chapter or contribution; rendered quoted in upright font; aliases: '''|chapter=''', '''|contribution='''
: '''|display-authors=''' – optional, defines how {{tld|harvc}} displays the contributor list; ignored when '''|name-list-style=harv''':
:: {{para|display-authors}} – when empty or omitted, displays all contributor names in last/first format
:: {{para|display-authors|{{var|n}}}} – displays ''n'' contributor names in last/first format; appends et al. when ''n'' is less than the number of contributors included in the template
:: {{para|display-authors|etal}} – displays all contributor names in last/first format and appends et al.
: '''|first=''' – optional, first contributor's given or first name; alias: '''|first1='''
:: '''|first''n''=''' – optional, contributor''n'' given or first name; ''n'' begins at 2 and increases by 1 for each additional '''|first''n''='''
: '''|id=''' – required when {{para|last1}}-{{para|last4}} are the same as {{para|in1}}-{{para|in4}}; otherwise optional. See [[#Avoiding circular reference|Examples]]
: '''|in=''' – required, surname or last name of first editor or author of the work that includes the contribution; aliases: '''|in1='''
: '''|in2=''' – optional, surname or last name of second editor or author
: '''|in3=''' – optional, surname or last name of third editor or author
: '''|in4=''' – optional, surname or last name of fourth editor or author
: '''|last=''' – required, surname or last name of first author; aliases: '''|last1='''
:: '''|last''n''=''' – optional, contributor''n'' surname or last name; ''n'' begins at 2 and increases by 1 for each additional '''|last''n''=''';
: '''|loc=''' – optional, other location identifier, displays after {{para|p}} or {{para|pp}}
: '''|mode=''' – controls rendered display to match that of adjacent CS1 or CS2 citations; defaults to CS1 style
:: '''|mode=cs2''' – mimic {{tlx|citation}} style (comma separators, no terminal punctuation, static text not capitalized)
: '''|name-list-style=''' – optional, controls contributor name list display style
:: '''|name-list-style=harv''' – mimic {{tld|sfn}} or {{tld|harv}} format (one to four last names); overrides '''|display-authors='''
:: '''|name-list-style=amp''' – inserts an ampersand between the last two contributor names
: '''|nb=''' – optional, when set to <code>yes</code>, instructs {{tld|harvc}} to render source link without parentheses around the year; same format as that produced by {{tlx|harvnb}}
: '''|p=''' – optional, single page number where cited material can be found; aliases: '''|page='''
: '''|pp=''' – optional, multiple page numbers, page ranges, etc where cited material can be found; aliases: '''|pages='''
: '''|ps=''' – optional, sets terminal punctuation; default is full stop; overrides '''|mode=cs2'''; aliases: '''|postscript='''
:: '''|ps=none''' – renders output without terminal punctuation
: '''|url=''' – optional, URL of an online location where the text of the contribution can be found; aliases: '''|chapter-url''', '''|contribution-url'''
: '''|url-access=''' – optional, use when URL links to a source behind a registration barrier or paywall; inserts [[Help:Citation_Style_1#Registration_or_subscription_required|cs1{{pipe}}2 access icon]]; accepted values are: <code>limited</code>, <code>registration</code>, <code>subscription</code>
: '''|year=''' – required, publication year of the work that includes the contribution
===Examples===
When a Wikipedia article makes reference to a work that contains multiple chapters by different authors, bibliographies and reference sections can look rather cluttered:
* {{cite book |last=George |first=Ernest J. |last2=Read |first2=Ralph A. |last3=Johnson |first3=R. W. |last4=Ferber |first4=A. E. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Shelterbelts and Windbreaks |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=//archive.org/stream/yoa1957#page/n785/mode/1up |oclc=704186906}}
* {{cite book |last=Harper |first=V. L. |last2=Frank |first2=Bernard |last3=McQuilkin |first3=W. E. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Forest Practices and Productivity |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=//archive.org/stream/yoa1957#page/n803/mode/1up |oclc=704186906}}
* {{cite book |last=Stout |first=P. R. |last2=Johnson |first2=C. M. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Trace Elements |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=//archive.org/stream/yoa1957#page/n167/mode/1up |oclc=704186906}}
* {{cite book |last=Wadleigh |first=C. H. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Growth of Plants |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=//archive.org/stream/yoa1957#page/n57/mode/1up |oclc=704186906}}
As the list grows longer, the look becomes more cluttered with the unnecessarily repeated detail of full-length citations. With {{tld|harvc}} editors can link to shorter, less detailed contribution citations using standard implementations of {{tlx|sfn}} templates{{sfn|George|Read|Johnson|Ferber|1957}} and {{tlx|harv}} templates (like this: {{harv|Harper|Frank|McQuilkin|1957}} and also wrapped in {{tag|ref}} tags<ref>{{harvnb|Stout|Johnson|1957}}</ref>). {{tld|harvc}} may also be wrapped in {{tag|ref}} tags so that it becomes part of the article's References section.<ref>{{harvc|last=Benson|first=Ezra Taft|year=1957|chapter=Foreword|url=//archive.org/stream/yoa1957#page/n5/mode/1up|in=Stefferud|p=vi |loc=§2 |ignore-err=yes}}</ref>{{sfn|Wadleigh|1957}}
====Avoiding circular reference====
It may sometimes be necessary to cite a contribution of a source's editor or author such that {{para|last1}} through {{para|last4}} are the same as {{para|in1}} through {{para|in4}}, an editor's preface for example. Such citations can, depending on placement, cause {{tld|sfn}} or {{tld|harv}}-family references to link directly to the citation instead of to the {{tld|harvc}} template, or cause circular links ({{tld|harvc}} linking to itself because its <code>CITEREF</code> anchor identifier is the same as the citation's <code>CITEREF</code> anchor identifier). If {{para|id}} is set, {{tld|harvc}} will use it as an anchor identifier; if {{para|id}} is not set, {{tld|harvc}} will emit an error message when {{para|last1}} through {{para|last4}} are the same as {{para|in1}} through {{para|in4}}.
For example, to reference an editor's preface from article text, create a wikilink inside {{tag|ref}} tags:<ref>[[#Stefferud preface|Stefferud 1957]]</ref>
:<code><nowiki><ref>[[#Stefferud preface|Stefferud 1957]]</ref></nowiki></code>
Write a {{tld|harvc}} template with {{para|id|Stefferud preface}}
:<code><nowiki>{{harvc |last=Stefferud |first=A.|year=1957 |id=Stefferud preface |c=Preface |url=//archive.org/stream/yoa1957#page/n7/mode/1up |in=Stefferud}}</nowiki></code>
====Example references section====
{{reflist}}
====Example bibliography section====
* {{cite book |title=Soil: The Yearbook of Agriculture 1957 |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |url=//archive.org/stream/yoa1957#page/n2/mode/1up |oclc=704186906 }}
** {{harvc |last=George |first=Ernest J. |last2=Read |last3=Johnson |last4=Ferber |year=1957 |contribution=Shelterbelts and Windbreaks |url=//archive.org/stream/yoa1957#page/n785/mode/1up |in=Stefferud |ignore-err=yes}}
** {{harvc |last=Harper |first=V. L. |last2=Frank |last3=McQuilkin |year=1957 |contribution=Forest Practices and Productivity |url=//archive.org/stream/yoa1957#page/n803/mode/1up |in=Stefferud |ignore-err=yes}}
** {{harvc |last=Stefferud |first=A.|year=1957 |id=Stefferud preface |c=Preface |url=//archive.org/stream/yoa1957#page/n7/mode/1up |in=Stefferud |ignore-err=yes}}
** {{harvc |last=Stout |first=P. R. |last2=Johnson |year=1957 |c=Trace Elements |url=//archive.org/stream/yoa1957#page/n167/mode/1up |in=Stefferud |ignore-err=yes}}
** {{harvc |last=Wadleigh |first=C. H.|year=1957 |c=Growth of Plants |url=//archive.org/stream/yoa1957#page/n57/mode/1up |in=Stefferud |ignore-err=yes}}
====More than one contribution====
There are times when an author or authors will have contributed more than once to a work. When this occurs, it is necessary to disambiguate the CITEREF links from the {{tld|harv}} or {{tld|sfn}} templates to the CITEREF id of the appropriate {{tld|harvc}} template.
:{{tld|harv|Author|YYYYa}} → {{tld|harvc|Author|Contribution 1|YYYYa}} → {{tld|citation|...}}}
:{{tld|harv|Author|YYYYb}} → {{tld|harvc|Author|Contribution 2|YYYYb}} ↑
In this example, author David Hunt contributed two appendices to ''Christmas Cacti: The Genus ''Schlumbergera'' and Its Hybrids''.
There are two {{tlx|harvnb}} templates that are disambiguated:
:<code><nowiki>{{harvnb |Hunt |1995a}}</nowiki></code> → {{harvnb |Hunt |1995a}}
:<code><nowiki>{{harvnb |Hunt |1995b}}</nowiki></code> → {{harvnb |Hunt |1995b}}
These link to two {{tld|harvc}} templates which use {{para|anchor-year}} for their CITEREF id and for the date in the {{tld|harvc}} rendering as a visual aid for readers:
*<code><nowiki>{{harvc |in=McMillan |in2=Horobin |last=Hunt |first=David |c=Appendix I Names and synonyms of the species, subspecies and interspecific hybrids |year=1995 |anchor-year=1995a |mode=cs2 |nb=yes}}</nowiki></code>
*:{{harvc |in=McMillan |in2=Horobin |last=Hunt |first=David |c=Appendix I Names and synonyms of the species, subspecies and interspecific hybrids |year=1995 |anchor-year=1995a |mode=cs2 |nb=yes |ignore-err=yes}}
*<code><nowiki>{{harvc |in=McMillan |in2=Horobin |last=Hunt |first=David |c=Appendix III Excerpts from a Brazilian diary |year=1995 |anchor-year=1995b |mode=cs2 |nb=yes}}</nowiki></code>
*:{{harvc |in=McMillan |in2=Horobin |last=Hunt |first=David |c=Appendix III Excerpts from a Brazilian diary |year=1995 |anchor-year=1995b |mode=cs2 |nb=yes |ignore-err=yes}}
and the single {{tld|citation}} template:
*<code><nowiki>{{Citation |last=McMillan |first=A. J. S. |last2=Horobin |first2=J. F. |year=1995 |title=Christmas Cacti: The Genus ''Schlumbergera'' and Its Hybrids |edition=p/b |publication-place=Sherbourne, Dorset, UK |publisher=David Hunt |isbn=978-0-9517234-6-3}}</nowiki></code>
*:{{Citation |last=McMillan |first=A. J. S. |last2=Horobin |first2=J. F. |year=1995 |title=Christmas Cacti: The Genus ''Schlumbergera'' and Its Hybrids |edition=p/b |publication-place=Sherbourne, Dorset, UK |publisher=David Hunt |isbn=978-0-9517234-6-3}}
==Error messages==
{{tld|harvc}} emits these error messages:<!--
:<span style="font-size:100%" class="error">harvc: {{para|anchor-year|plain=yes}} missing dab.</span>
::when used, {{para|anchor-year}} must include a single, lowercase letter disambiguator -->
:<span style="font-size:100%" class="error">harvc: author missing from source list.</span>
::the source list parameters {{para|in1}}, {{para|in2}}, {{para|in3}}, and {{para|in4}} form the template's <code>CITEREF</code> link to the full citation. All are not required but must be used in order without numerical gaps.
:<span style="font-size:100%" class="error">harvc: invalid {{para|anchor-year|plain=yes}}.</span>
::when used, {{para|anchor-year}} must be a three- or four-digit number and must have a lowercase <code>CITEREF</code> disambiguator. When the source does not have an identifiable year, use {{para|anchor-year|n.d.{{var|l}}}} or {{para|anchor-year|nd{{var|l}}}} with lowercase <code>CITEREF</code> disambiguator.
:<span style="font-size:100%" class="error">harvc: invalid {{para|display-authors|plain=yes}}.</span>
::the value assigned to {{para|display-authors}} must be a number greater than 0 or the keyword <code>etal</code>
:<span style="font-size:100%" class="error">harvc: invalid {{para|year|plain=yes}}.</span>
::{{para|year}} is an integral part of the template's <code>CITEREF</code> anchor and link. The value of {{para|year}} must be a three- or four-digit number with an optional lowercase <code>CITEREF</code> disambiguator. When the source does not have an identifiable year, use {{para|year|n.d.}} or {{para|year|nd}}.
:<span style="font-size:100%" class="error">harvc: missing {{para|year|plain=yes}}.</span>
::{{para|year}} is missing; the parameter is required.
:<span style="font-size:100%" class="error">harvc: no authors in contributor list.</span>
::this error message indicates that {{tld|harvc}} can't find any of {{para|last}}, {{para|last1}}, {{para|author}} or {{para|author1}} with an assigned value and so cannot make a usable <code>CITEREF</code> anchor. Add at least one of the listed parameters.
:<span style="font-size:100%" class="error">harvc: required contribution is missing.</span>
::this error message indicates that {{tld|harvc}} can't find any of {{para|c}}, {{para|chapter}}, or {{para|contribution}} with an assigned value
:<span style="font-size:100%" class="error">harvc: required {{para|id|plain=yes}} parameter missing.</span>
::this error message is emitted when the {{tld|harvc}} template's <code>CITEREF</code> anchor identifier would conflict with the long-form citation's <code>CITEREF</code> anchor identifier. See [[#Avoiding circular reference|Examples]]
:<span style="font-size:100%" class="error">harvc: {{para|year|plain=yes}} / {{para|anchor-year|plain=yes}} mismatch.</span>
::the year portion of {{para|anchor-year|YYYY{{var|l}}}} must match the year given in {{para|year|YYYY}}
<includeonly>{{Sandbox other||
<!-- Categories below this line, please; interwikis at Wikidata -->
[[Category:Citation utility templates]]
}}</includeonly>
mtklkjfftpr9rjcugqjqaxb6zatp3f5
801808
801807
2022-08-13T01:26:22Z
en>Guarapiranga
0
/* */ clearer
801808
wikitext
text/x-wiki
{{Documentation subpage}}
<!-- Place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
{{lua|Module:Harvc}}
{{uses TemplateStyles|Module:Citation/CS1/styles.css|noprotcat=yes}}
This template is a citation hybrid that has characteristics of long-form [[Help:Citation Style 1|cs1]] and [[Help:Citation Style 2|cs2]], of short-form {{tlx|sfn}} and of the {{tlx|harv}} families of templates. Its purpose is to provide a method that allows editors to refer to a contribution or chapter in a larger work when more than a few such referrals are required. {{tld|harvc}} is not a substitute for a properly constructed citation.
Short-form templates {{tld|sfn}} and {{tld|harv}} are often used to link from an article's references section to a long-form cs1|2 template in a bibliography section:
:{{tld|harv}} → {{tlx|cite book}}
It is not uncommon for a source to have multiple contributors. When it is necessary to refer to multiple contributions in the same source, repeating all of the bibliographic details in multiple long-form citation templates adds to references-section clutter. {{tld|harvc}} is designed to hold only the detail necessary to identify a contribution and link to the enclosing work's long-form citation where all of the bibliographic detail can be found:
:{{tld|harv}} → {{tld|harvc}} → {{tld|cite book}}
== Usage ==
The minimal form is:
:<code><nowiki>{{harvc |last=contributor name |year=publication year |c=contribution title |in=source editor/author name}}</nowiki></code>
According to the comments in [[Module:Harvc]], mistaken {{red|Harvc error: no target:}} error messages may be produced when the template is nested in other templates as on documentation pages. The otherwise undocumented parameter, {{para|ignore-err|yes}}, can be added to prevent this.
===Parameters===
{{tld|harvc}} creates a <code>CITEREF</code> anchor from one to four contribution or chapter author surnames ({{para|last''n''}}) and the value in {{para|year}}. This allows {{tld|harvc}} to be the target of a link created by {{tlx|sfn}} or {{tld|harv}} family templates. From {{para|in{{var|n}}}} and {{para|year}}, {{tld|harvc}} creates a CITEREF link similar to those created by {{tlx|harvnb}} and {{tlx|sfn}}
: '''|anchor-year=''' – optional, for use for author(s) with more than one contribution to the work; requires CITEREF disambiguator; see [[#More than one contribution|Examples]]
: '''|author-link=''' – optional, title of existing Wikipedia article about the first contributor—not the contributor's website; do not wikilink; alias: '''|author-link1='''
:: '''|author-link''n''=''' – optional, title of existing Wikipedia article about contributor''n''; choose ''n'' to match ''n'' in '''|last''n''='''
: '''|author-mask=''m''''' – optional, replaces name of the first contributor with ''m'' (commonly 2) em dashes; alias: '''|author-mask1='''
:: '''|author-mask''n''=''m''''' – optional, replaces name of contributor''n'' with ''m'' em dashes; choose ''n'' to match ''n'' in '''|last''n''='''
:: '''|author-mask{{var|n}}=<{{var|text}}>''' – optional, replaces name of contributor''n'' with <{{var|text}}>
: '''|c=''' – required, the title of chapter or contribution; rendered quoted in upright font; aliases: '''|chapter=''', '''|contribution='''
: '''|display-authors=''' – optional, defines how {{tld|harvc}} displays the contributor list; ignored when '''|name-list-style=harv''':
:: {{para|display-authors}} – when empty or omitted, displays all contributor names in last/first format
:: {{para|display-authors|{{var|n}}}} – displays ''n'' contributor names in last/first format; appends et al. when ''n'' is less than the number of contributors included in the template
:: {{para|display-authors|etal}} – displays all contributor names in last/first format and appends et al.
: '''|first=''' – optional, first contributor's given or first name; alias: '''|first1='''
:: '''|first''n''=''' – optional, contributor''n'' given or first name; ''n'' begins at 2 and increases by 1 for each additional '''|first''n''='''
: '''|id=''' – required when {{para|last1}}-{{para|last4}} are the same as {{para|in1}}-{{para|in4}}; otherwise optional. See [[#Avoiding circular reference|Examples]]
: '''|in=''' – required, surname or last name of first editor or author of the work that includes the contribution; aliases: '''|in1='''
: '''|in2=''' – optional, surname or last name of second editor or author
: '''|in3=''' – optional, surname or last name of third editor or author
: '''|in4=''' – optional, surname or last name of fourth editor or author
: '''|last=''' – required, surname or last name of first author; aliases: '''|last1='''
:: '''|last''n''=''' – optional, contributor''n'' surname or last name; ''n'' begins at 2 and increases by 1 for each additional '''|last''n''=''';
: '''|loc=''' – optional, other location identifier, displays after {{para|p}} or {{para|pp}}
: '''|mode=''' – controls rendered display to match that of adjacent CS1 or CS2 citations; defaults to CS1 style
:: '''|mode=cs2''' – mimic {{tlx|citation}} style (comma separators, no terminal punctuation, static text not capitalized)
: '''|name-list-style=''' – optional, controls contributor name list display style
:: '''|name-list-style=harv''' – mimic {{tld|sfn}} or {{tld|harv}} format (one to four last names); overrides '''|display-authors='''
:: '''|name-list-style=amp''' – inserts an ampersand between the last two contributor names
: '''|nb=''' – optional, when set to <code>yes</code>, instructs {{tld|harvc}} to render source link without parentheses around the year; same format as that produced by {{tlx|harvnb}}
: '''|p=''' – optional, single page number where cited material can be found; aliases: '''|page='''
: '''|pp=''' – optional, multiple page numbers, page ranges, etc where cited material can be found; aliases: '''|pages='''
: '''|ps=''' – optional, sets terminal punctuation; default is full stop; overrides '''|mode=cs2'''; aliases: '''|postscript='''
:: '''|ps=none''' – renders output without terminal punctuation
: '''|url=''' – optional, URL of an online location where the text of the contribution can be found; aliases: '''|chapter-url''', '''|contribution-url'''
: '''|url-access=''' – optional, use when URL links to a source behind a registration barrier or paywall; inserts [[Help:Citation_Style_1#Registration_or_subscription_required|cs1{{pipe}}2 access icon]]; accepted values are: <code>limited</code>, <code>registration</code>, <code>subscription</code>
: '''|year=''' – required, publication year of the work that includes the contribution
===Examples===
When a Wikipedia article makes reference to a work that contains multiple chapters by different authors, bibliographies and reference sections can look rather cluttered:
* {{cite book |last=George |first=Ernest J. |last2=Read |first2=Ralph A. |last3=Johnson |first3=R. W. |last4=Ferber |first4=A. E. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Shelterbelts and Windbreaks |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=//archive.org/stream/yoa1957#page/n785/mode/1up |oclc=704186906}}
* {{cite book |last=Harper |first=V. L. |last2=Frank |first2=Bernard |last3=McQuilkin |first3=W. E. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Forest Practices and Productivity |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=//archive.org/stream/yoa1957#page/n803/mode/1up |oclc=704186906}}
* {{cite book |last=Stout |first=P. R. |last2=Johnson |first2=C. M. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Trace Elements |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=//archive.org/stream/yoa1957#page/n167/mode/1up |oclc=704186906}}
* {{cite book |last=Wadleigh |first=C. H. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Growth of Plants |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=//archive.org/stream/yoa1957#page/n57/mode/1up |oclc=704186906}}
As the list grows longer, the look becomes more cluttered with the unnecessarily repeated detail of full-length citations. With {{tld|harvc}} editors can link to shorter, less detailed contribution citations using standard implementations of {{tlx|sfn}} templates{{sfn|George|Read|Johnson|Ferber|1957}} and {{tlx|harv}} templates (like this: {{harv|Harper|Frank|McQuilkin|1957}} and also wrapped in {{tag|ref}} tags<ref>{{harvnb|Stout|Johnson|1957}}</ref>). {{tld|harvc}} may also be wrapped in {{tag|ref}} tags so that it becomes part of the article's References section.<ref>{{harvc|last=Benson|first=Ezra Taft|year=1957|chapter=Foreword|url=//archive.org/stream/yoa1957#page/n5/mode/1up|in=Stefferud|p=vi |loc=§2 |ignore-err=yes}}</ref>{{sfn|Wadleigh|1957}}
====Avoiding circular reference====
It may sometimes be necessary to cite a contribution of a source's editor or author such that {{para|last1}} through {{para|last4}} are the same as {{para|in1}} through {{para|in4}}, an editor's preface for example. Such citations can, depending on placement, cause {{tld|sfn}} or {{tld|harv}}-family references to link directly to the citation instead of to the {{tld|harvc}} template, or cause circular links ({{tld|harvc}} linking to itself because its <code>CITEREF</code> anchor identifier is the same as the citation's <code>CITEREF</code> anchor identifier). If {{para|id}} is set, {{tld|harvc}} will use it as an anchor identifier; if {{para|id}} is not set, {{tld|harvc}} will emit an error message when {{para|last1}} through {{para|last4}} are the same as {{para|in1}} through {{para|in4}}.
For example, to reference an editor's preface from article text, create a wikilink inside {{tag|ref}} tags:<ref>[[#Stefferud preface|Stefferud 1957]]</ref>
:<code><nowiki><ref>[[#Stefferud preface|Stefferud 1957]]</ref></nowiki></code>
Write a {{tld|harvc}} template with {{para|id|Stefferud preface}}
:<code><nowiki>{{harvc |last=Stefferud |first=A.|year=1957 |id=Stefferud preface |c=Preface |url=//archive.org/stream/yoa1957#page/n7/mode/1up |in=Stefferud}}</nowiki></code>
====Example references section====
{{reflist}}
====Example bibliography section====
* {{cite book |title=Soil: The Yearbook of Agriculture 1957 |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |url=//archive.org/stream/yoa1957#page/n2/mode/1up |oclc=704186906 }}
** {{harvc |last=George |first=Ernest J. |last2=Read |last3=Johnson |last4=Ferber |year=1957 |contribution=Shelterbelts and Windbreaks |url=//archive.org/stream/yoa1957#page/n785/mode/1up |in=Stefferud |ignore-err=yes}}
** {{harvc |last=Harper |first=V. L. |last2=Frank |last3=McQuilkin |year=1957 |contribution=Forest Practices and Productivity |url=//archive.org/stream/yoa1957#page/n803/mode/1up |in=Stefferud |ignore-err=yes}}
** {{harvc |last=Stefferud |first=A.|year=1957 |id=Stefferud preface |c=Preface |url=//archive.org/stream/yoa1957#page/n7/mode/1up |in=Stefferud |ignore-err=yes}}
** {{harvc |last=Stout |first=P. R. |last2=Johnson |year=1957 |c=Trace Elements |url=//archive.org/stream/yoa1957#page/n167/mode/1up |in=Stefferud |ignore-err=yes}}
** {{harvc |last=Wadleigh |first=C. H.|year=1957 |c=Growth of Plants |url=//archive.org/stream/yoa1957#page/n57/mode/1up |in=Stefferud |ignore-err=yes}}
====More than one contribution====
There are times when an author or authors will have contributed more than once to a work. When this occurs, it is necessary to disambiguate the CITEREF links from the {{tld|harv}} or {{tld|sfn}} templates to the CITEREF id of the appropriate {{tld|harvc}} template.
:{{tld|harv|Author|YYYYa}} → {{tld|harvc|Author|Contribution 1|YYYYa}} → {{tld|citation|...}}}
:{{tld|harv|Author|YYYYb}} → {{tld|harvc|Author|Contribution 2|YYYYb}} ↑
In this example, author David Hunt contributed two appendices to ''Christmas Cacti: The Genus ''Schlumbergera'' and Its Hybrids''.
There are two {{tlx|harvnb}} templates that are disambiguated:
:<code><nowiki>{{harvnb |Hunt |1995a}}</nowiki></code> → {{harvnb |Hunt |1995a}}
:<code><nowiki>{{harvnb |Hunt |1995b}}</nowiki></code> → {{harvnb |Hunt |1995b}}
These link to two {{tld|harvc}} templates which use {{para|anchor-year}} for their CITEREF id and for the date in the {{tld|harvc}} rendering as a visual aid for readers:
*<code><nowiki>{{harvc |in=McMillan |in2=Horobin |last=Hunt |first=David |c=Appendix I Names and synonyms of the species, subspecies and interspecific hybrids |year=1995 |anchor-year=1995a |mode=cs2 |nb=yes}}</nowiki></code>
*:{{harvc |in=McMillan |in2=Horobin |last=Hunt |first=David |c=Appendix I Names and synonyms of the species, subspecies and interspecific hybrids |year=1995 |anchor-year=1995a |mode=cs2 |nb=yes |ignore-err=yes}}
*<code><nowiki>{{harvc |in=McMillan |in2=Horobin |last=Hunt |first=David |c=Appendix III Excerpts from a Brazilian diary |year=1995 |anchor-year=1995b |mode=cs2 |nb=yes}}</nowiki></code>
*:{{harvc |in=McMillan |in2=Horobin |last=Hunt |first=David |c=Appendix III Excerpts from a Brazilian diary |year=1995 |anchor-year=1995b |mode=cs2 |nb=yes |ignore-err=yes}}
and the single {{tld|citation}} template:
*<code><nowiki>{{Citation |last=McMillan |first=A. J. S. |last2=Horobin |first2=J. F. |year=1995 |title=Christmas Cacti: The Genus ''Schlumbergera'' and Its Hybrids |edition=p/b |publication-place=Sherbourne, Dorset, UK |publisher=David Hunt |isbn=978-0-9517234-6-3}}</nowiki></code>
*:{{Citation |last=McMillan |first=A. J. S. |last2=Horobin |first2=J. F. |year=1995 |title=Christmas Cacti: The Genus ''Schlumbergera'' and Its Hybrids |edition=p/b |publication-place=Sherbourne, Dorset, UK |publisher=David Hunt |isbn=978-0-9517234-6-3}}
==Error messages==
{{tld|harvc}} emits these error messages:<!--
:<span style="font-size:100%" class="error">harvc: {{para|anchor-year|plain=yes}} missing dab.</span>
::when used, {{para|anchor-year}} must include a single, lowercase letter disambiguator -->
:<span style="font-size:100%" class="error">harvc: author missing from source list.</span>
::the source list parameters {{para|in1}}, {{para|in2}}, {{para|in3}}, and {{para|in4}} form the template's <code>CITEREF</code> link to the full citation. All are not required but must be used in order without numerical gaps.
:<span style="font-size:100%" class="error">harvc: invalid {{para|anchor-year|plain=yes}}.</span>
::when used, {{para|anchor-year}} must be a three- or four-digit number and must have a lowercase <code>CITEREF</code> disambiguator. When the source does not have an identifiable year, use {{para|anchor-year|n.d.{{var|l}}}} or {{para|anchor-year|nd{{var|l}}}} with lowercase <code>CITEREF</code> disambiguator.
:<span style="font-size:100%" class="error">harvc: invalid {{para|display-authors|plain=yes}}.</span>
::the value assigned to {{para|display-authors}} must be a number greater than 0 or the keyword <code>etal</code>
:<span style="font-size:100%" class="error">harvc: invalid {{para|year|plain=yes}}.</span>
::{{para|year}} is an integral part of the template's <code>CITEREF</code> anchor and link. The value of {{para|year}} must be a three- or four-digit number with an optional lowercase <code>CITEREF</code> disambiguator. When the source does not have an identifiable year, use {{para|year|n.d.}} or {{para|year|nd}}.
:<span style="font-size:100%" class="error">harvc: missing {{para|year|plain=yes}}.</span>
::{{para|year}} is missing; the parameter is required.
:<span style="font-size:100%" class="error">harvc: no authors in contributor list.</span>
::this error message indicates that {{tld|harvc}} can't find any of {{para|last}}, {{para|last1}}, {{para|author}} or {{para|author1}} with an assigned value and so cannot make a usable <code>CITEREF</code> anchor. Add at least one of the listed parameters.
:<span style="font-size:100%" class="error">harvc: required contribution is missing.</span>
::this error message indicates that {{tld|harvc}} can't find any of {{para|c}}, {{para|chapter}}, or {{para|contribution}} with an assigned value
:<span style="font-size:100%" class="error">harvc: required {{para|id|plain=yes}} parameter missing.</span>
::this error message is emitted when the {{tld|harvc}} template's <code>CITEREF</code> anchor identifier would conflict with the long-form citation's <code>CITEREF</code> anchor identifier. See [[#Avoiding circular reference|Examples]]
:<span style="font-size:100%" class="error">harvc: {{para|year|plain=yes}} / {{para|anchor-year|plain=yes}} mismatch.</span>
::the year portion of {{para|anchor-year|YYYY{{var|l}}}} must match the year given in {{para|year|YYYY}}
<includeonly>{{Sandbox other||
<!-- Categories below this line, please; interwikis at Wikidata -->
[[Category:Citation utility templates]]
}}</includeonly>
8dvmyj5i9uzfn92wp66orz3x10a6y98
801809
801808
2022-08-13T01:28:55Z
en>Guarapiranga
0
/* */ Clearer; [[MOS:OL]] doesn't apply to template docs, of course
801809
wikitext
text/x-wiki
{{Documentation subpage}}
<!-- Place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
{{lua|Module:Harvc}}
{{uses TemplateStyles|Module:Citation/CS1/styles.css|noprotcat=yes}}
This template is a citation hybrid that has characteristics of long-form [[Help:Citation Style 1|cs1]] and [[Help:Citation Style 2|cs2]], of short-form {{tlx|sfn}} and of the {{tlx|harv}} families of templates. Its purpose is to provide a method that allows editors to refer to a contribution or chapter in a larger work when more than a few such referrals are required. {{tlx|harvc}} is not a substitute for a properly constructed citation.
Short-form templates {{tlx|sfn}} and {{tlx|harv}} are often used to link from an article's references section to a long-form cs1|2 template in a bibliography section:
:{{tlx|harv}} → {{tlx|cite book}}
It is not uncommon for a source to have multiple contributors. When it is necessary to refer to multiple contributions in the same source, repeating all of the bibliographic details in multiple long-form citation templates adds to references-section clutter. {{tlx|harvc}} is designed to hold only the detail necessary to identify a contribution and link to the enclosing work's long-form citation where all of the bibliographic detail can be found:
:{{tlx|harv}} → {{tlx|harvc}} → {{tlx|cite book}}
== Usage ==
The minimal form is:
:<code><nowiki>{{harvc |last=contributor name |year=publication year |c=contribution title |in=source editor/author name}}</nowiki></code>
According to the comments in [[Module:Harvc]], mistaken {{red|Harvc error: no target:}} error messages may be produced when the template is nested in other templates as on documentation pages. The otherwise undocumented parameter, {{para|ignore-err|yes}}, can be added to prevent this.
===Parameters===
{{tlx|harvc}} creates a <code>CITEREF</code> anchor from one to four contribution or chapter author surnames ({{para|last''n''}}) and the value in {{para|year}}. This allows {{tlx|harvc}} to be the target of a link created by {{tlx|sfn}} or {{tlx|harv}} family templates. From {{para|in{{var|n}}}} and {{para|year}}, {{tlx|harvc}} creates a CITEREF link similar to those created by {{tlx|harvnb}} and {{tlx|sfn}}
: '''|anchor-year=''' – optional, for use for author(s) with more than one contribution to the work; requires CITEREF disambiguator; see [[#More than one contribution|Examples]]
: '''|author-link=''' – optional, title of existing Wikipedia article about the first contributor—not the contributor's website; do not wikilink; alias: '''|author-link1='''
:: '''|author-link''n''=''' – optional, title of existing Wikipedia article about contributor''n''; choose ''n'' to match ''n'' in '''|last''n''='''
: '''|author-mask=''m''''' – optional, replaces name of the first contributor with ''m'' (commonly 2) em dashes; alias: '''|author-mask1='''
:: '''|author-mask''n''=''m''''' – optional, replaces name of contributor''n'' with ''m'' em dashes; choose ''n'' to match ''n'' in '''|last''n''='''
:: '''|author-mask{{var|n}}=<{{var|text}}>''' – optional, replaces name of contributor''n'' with <{{var|text}}>
: '''|c=''' – required, the title of chapter or contribution; rendered quoted in upright font; aliases: '''|chapter=''', '''|contribution='''
: '''|display-authors=''' – optional, defines how {{tlx|harvc}} displays the contributor list; ignored when '''|name-list-style=harv''':
:: {{para|display-authors}} – when empty or omitted, displays all contributor names in last/first format
:: {{para|display-authors|{{var|n}}}} – displays ''n'' contributor names in last/first format; appends et al. when ''n'' is less than the number of contributors included in the template
:: {{para|display-authors|etal}} – displays all contributor names in last/first format and appends et al.
: '''|first=''' – optional, first contributor's given or first name; alias: '''|first1='''
:: '''|first''n''=''' – optional, contributor''n'' given or first name; ''n'' begins at 2 and increases by 1 for each additional '''|first''n''='''
: '''|id=''' – required when {{para|last1}}-{{para|last4}} are the same as {{para|in1}}-{{para|in4}}; otherwise optional. See [[#Avoiding circular reference|Examples]]
: '''|in=''' – required, surname or last name of first editor or author of the work that includes the contribution; aliases: '''|in1='''
: '''|in2=''' – optional, surname or last name of second editor or author
: '''|in3=''' – optional, surname or last name of third editor or author
: '''|in4=''' – optional, surname or last name of fourth editor or author
: '''|last=''' – required, surname or last name of first author; aliases: '''|last1='''
:: '''|last''n''=''' – optional, contributor''n'' surname or last name; ''n'' begins at 2 and increases by 1 for each additional '''|last''n''=''';
: '''|loc=''' – optional, other location identifier, displays after {{para|p}} or {{para|pp}}
: '''|mode=''' – controls rendered display to match that of adjacent CS1 or CS2 citations; defaults to CS1 style
:: '''|mode=cs2''' – mimic {{tlx|citation}} style (comma separators, no terminal punctuation, static text not capitalized)
: '''|name-list-style=''' – optional, controls contributor name list display style
:: '''|name-list-style=harv''' – mimic {{tlx|sfn}} or {{tlx|harv}} format (one to four last names); overrides '''|display-authors='''
:: '''|name-list-style=amp''' – inserts an ampersand between the last two contributor names
: '''|nb=''' – optional, when set to <code>yes</code>, instructs {{tlx|harvc}} to render source link without parentheses around the year; same format as that produced by {{tlx|harvnb}}
: '''|p=''' – optional, single page number where cited material can be found; aliases: '''|page='''
: '''|pp=''' – optional, multiple page numbers, page ranges, etc where cited material can be found; aliases: '''|pages='''
: '''|ps=''' – optional, sets terminal punctuation; default is full stop; overrides '''|mode=cs2'''; aliases: '''|postscript='''
:: '''|ps=none''' – renders output without terminal punctuation
: '''|url=''' – optional, URL of an online location where the text of the contribution can be found; aliases: '''|chapter-url''', '''|contribution-url'''
: '''|url-access=''' – optional, use when URL links to a source behind a registration barrier or paywall; inserts [[Help:Citation_Style_1#Registration_or_subscription_required|cs1{{pipe}}2 access icon]]; accepted values are: <code>limited</code>, <code>registration</code>, <code>subscription</code>
: '''|year=''' – required, publication year of the work that includes the contribution
===Examples===
When a Wikipedia article makes reference to a work that contains multiple chapters by different authors, bibliographies and reference sections can look rather cluttered:
* {{cite book |last=George |first=Ernest J. |last2=Read |first2=Ralph A. |last3=Johnson |first3=R. W. |last4=Ferber |first4=A. E. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Shelterbelts and Windbreaks |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=//archive.org/stream/yoa1957#page/n785/mode/1up |oclc=704186906}}
* {{cite book |last=Harper |first=V. L. |last2=Frank |first2=Bernard |last3=McQuilkin |first3=W. E. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Forest Practices and Productivity |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=//archive.org/stream/yoa1957#page/n803/mode/1up |oclc=704186906}}
* {{cite book |last=Stout |first=P. R. |last2=Johnson |first2=C. M. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Trace Elements |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=//archive.org/stream/yoa1957#page/n167/mode/1up |oclc=704186906}}
* {{cite book |last=Wadleigh |first=C. H. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Growth of Plants |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=//archive.org/stream/yoa1957#page/n57/mode/1up |oclc=704186906}}
As the list grows longer, the look becomes more cluttered with the unnecessarily repeated detail of full-length citations. With {{tlx|harvc}} editors can link to shorter, less detailed contribution citations using standard implementations of {{tlx|sfn}} templates{{sfn|George|Read|Johnson|Ferber|1957}} and {{tlx|harv}} templates (like this: {{harv|Harper|Frank|McQuilkin|1957}} and also wrapped in {{tag|ref}} tags<ref>{{harvnb|Stout|Johnson|1957}}</ref>). {{tlx|harvc}} may also be wrapped in {{tag|ref}} tags so that it becomes part of the article's References section.<ref>{{harvc|last=Benson|first=Ezra Taft|year=1957|chapter=Foreword|url=//archive.org/stream/yoa1957#page/n5/mode/1up|in=Stefferud|p=vi |loc=§2 |ignore-err=yes}}</ref>{{sfn|Wadleigh|1957}}
====Avoiding circular reference====
It may sometimes be necessary to cite a contribution of a source's editor or author such that {{para|last1}} through {{para|last4}} are the same as {{para|in1}} through {{para|in4}}, an editor's preface for example. Such citations can, depending on placement, cause {{tlx|sfn}} or {{tlx|harv}}-family references to link directly to the citation instead of to the {{tlx|harvc}} template, or cause circular links ({{tlx|harvc}} linking to itself because its <code>CITEREF</code> anchor identifier is the same as the citation's <code>CITEREF</code> anchor identifier). If {{para|id}} is set, {{tlx|harvc}} will use it as an anchor identifier; if {{para|id}} is not set, {{tlx|harvc}} will emit an error message when {{para|last1}} through {{para|last4}} are the same as {{para|in1}} through {{para|in4}}.
For example, to reference an editor's preface from article text, create a wikilink inside {{tag|ref}} tags:<ref>[[#Stefferud preface|Stefferud 1957]]</ref>
:<code><nowiki><ref>[[#Stefferud preface|Stefferud 1957]]</ref></nowiki></code>
Write a {{tlx|harvc}} template with {{para|id|Stefferud preface}}
:<code><nowiki>{{harvc |last=Stefferud |first=A.|year=1957 |id=Stefferud preface |c=Preface |url=//archive.org/stream/yoa1957#page/n7/mode/1up |in=Stefferud}}</nowiki></code>
====Example references section====
{{reflist}}
====Example bibliography section====
* {{cite book |title=Soil: The Yearbook of Agriculture 1957 |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |url=//archive.org/stream/yoa1957#page/n2/mode/1up |oclc=704186906 }}
** {{harvc |last=George |first=Ernest J. |last2=Read |last3=Johnson |last4=Ferber |year=1957 |contribution=Shelterbelts and Windbreaks |url=//archive.org/stream/yoa1957#page/n785/mode/1up |in=Stefferud |ignore-err=yes}}
** {{harvc |last=Harper |first=V. L. |last2=Frank |last3=McQuilkin |year=1957 |contribution=Forest Practices and Productivity |url=//archive.org/stream/yoa1957#page/n803/mode/1up |in=Stefferud |ignore-err=yes}}
** {{harvc |last=Stefferud |first=A.|year=1957 |id=Stefferud preface |c=Preface |url=//archive.org/stream/yoa1957#page/n7/mode/1up |in=Stefferud |ignore-err=yes}}
** {{harvc |last=Stout |first=P. R. |last2=Johnson |year=1957 |c=Trace Elements |url=//archive.org/stream/yoa1957#page/n167/mode/1up |in=Stefferud |ignore-err=yes}}
** {{harvc |last=Wadleigh |first=C. H.|year=1957 |c=Growth of Plants |url=//archive.org/stream/yoa1957#page/n57/mode/1up |in=Stefferud |ignore-err=yes}}
====More than one contribution====
There are times when an author or authors will have contributed more than once to a work. When this occurs, it is necessary to disambiguate the CITEREF links from the {{tlx|harv}} or {{tlx|sfn}} templates to the CITEREF id of the appropriate {{tlx|harvc}} template.
:{{tlx|harv|Author|YYYYa}} → {{tlx|harvc|Author|Contribution 1|YYYYa}} → {{tlx|citation|...}}}
:{{tlx|harv|Author|YYYYb}} → {{tlx|harvc|Author|Contribution 2|YYYYb}} ↑
In this example, author David Hunt contributed two appendices to ''Christmas Cacti: The Genus ''Schlumbergera'' and Its Hybrids''.
There are two {{tlx|harvnb}} templates that are disambiguated:
:<code><nowiki>{{harvnb |Hunt |1995a}}</nowiki></code> → {{harvnb |Hunt |1995a}}
:<code><nowiki>{{harvnb |Hunt |1995b}}</nowiki></code> → {{harvnb |Hunt |1995b}}
These link to two {{tlx|harvc}} templates which use {{para|anchor-year}} for their CITEREF id and for the date in the {{tlx|harvc}} rendering as a visual aid for readers:
*<code><nowiki>{{harvc |in=McMillan |in2=Horobin |last=Hunt |first=David |c=Appendix I Names and synonyms of the species, subspecies and interspecific hybrids |year=1995 |anchor-year=1995a |mode=cs2 |nb=yes}}</nowiki></code>
*:{{harvc |in=McMillan |in2=Horobin |last=Hunt |first=David |c=Appendix I Names and synonyms of the species, subspecies and interspecific hybrids |year=1995 |anchor-year=1995a |mode=cs2 |nb=yes |ignore-err=yes}}
*<code><nowiki>{{harvc |in=McMillan |in2=Horobin |last=Hunt |first=David |c=Appendix III Excerpts from a Brazilian diary |year=1995 |anchor-year=1995b |mode=cs2 |nb=yes}}</nowiki></code>
*:{{harvc |in=McMillan |in2=Horobin |last=Hunt |first=David |c=Appendix III Excerpts from a Brazilian diary |year=1995 |anchor-year=1995b |mode=cs2 |nb=yes |ignore-err=yes}}
and the single {{tlx|citation}} template:
*<code><nowiki>{{Citation |last=McMillan |first=A. J. S. |last2=Horobin |first2=J. F. |year=1995 |title=Christmas Cacti: The Genus ''Schlumbergera'' and Its Hybrids |edition=p/b |publication-place=Sherbourne, Dorset, UK |publisher=David Hunt |isbn=978-0-9517234-6-3}}</nowiki></code>
*:{{Citation |last=McMillan |first=A. J. S. |last2=Horobin |first2=J. F. |year=1995 |title=Christmas Cacti: The Genus ''Schlumbergera'' and Its Hybrids |edition=p/b |publication-place=Sherbourne, Dorset, UK |publisher=David Hunt |isbn=978-0-9517234-6-3}}
==Error messages==
{{tlx|harvc}} emits these error messages:<!--
:<span style="font-size:100%" class="error">harvc: {{para|anchor-year|plain=yes}} missing dab.</span>
::when used, {{para|anchor-year}} must include a single, lowercase letter disambiguator -->
:<span style="font-size:100%" class="error">harvc: author missing from source list.</span>
::the source list parameters {{para|in1}}, {{para|in2}}, {{para|in3}}, and {{para|in4}} form the template's <code>CITEREF</code> link to the full citation. All are not required but must be used in order without numerical gaps.
:<span style="font-size:100%" class="error">harvc: invalid {{para|anchor-year|plain=yes}}.</span>
::when used, {{para|anchor-year}} must be a three- or four-digit number and must have a lowercase <code>CITEREF</code> disambiguator. When the source does not have an identifiable year, use {{para|anchor-year|n.d.{{var|l}}}} or {{para|anchor-year|nd{{var|l}}}} with lowercase <code>CITEREF</code> disambiguator.
:<span style="font-size:100%" class="error">harvc: invalid {{para|display-authors|plain=yes}}.</span>
::the value assigned to {{para|display-authors}} must be a number greater than 0 or the keyword <code>etal</code>
:<span style="font-size:100%" class="error">harvc: invalid {{para|year|plain=yes}}.</span>
::{{para|year}} is an integral part of the template's <code>CITEREF</code> anchor and link. The value of {{para|year}} must be a three- or four-digit number with an optional lowercase <code>CITEREF</code> disambiguator. When the source does not have an identifiable year, use {{para|year|n.d.}} or {{para|year|nd}}.
:<span style="font-size:100%" class="error">harvc: missing {{para|year|plain=yes}}.</span>
::{{para|year}} is missing; the parameter is required.
:<span style="font-size:100%" class="error">harvc: no authors in contributor list.</span>
::this error message indicates that {{tlx|harvc}} can't find any of {{para|last}}, {{para|last1}}, {{para|author}} or {{para|author1}} with an assigned value and so cannot make a usable <code>CITEREF</code> anchor. Add at least one of the listed parameters.
:<span style="font-size:100%" class="error">harvc: required contribution is missing.</span>
::this error message indicates that {{tlx|harvc}} can't find any of {{para|c}}, {{para|chapter}}, or {{para|contribution}} with an assigned value
:<span style="font-size:100%" class="error">harvc: required {{para|id|plain=yes}} parameter missing.</span>
::this error message is emitted when the {{tlx|harvc}} template's <code>CITEREF</code> anchor identifier would conflict with the long-form citation's <code>CITEREF</code> anchor identifier. See [[#Avoiding circular reference|Examples]]
:<span style="font-size:100%" class="error">harvc: {{para|year|plain=yes}} / {{para|anchor-year|plain=yes}} mismatch.</span>
::the year portion of {{para|anchor-year|YYYY{{var|l}}}} must match the year given in {{para|year|YYYY}}
<includeonly>{{Sandbox other||
<!-- Categories below this line, please; interwikis at Wikidata -->
[[Category:Citation utility templates]]
}}</includeonly>
ac1mg2at87ijutbrx2nrmai3p93r7fx
801810
801809
2022-08-16T05:35:25Z
en>SamuelRiv
0
/* Examples */ put large example with ref and notes section demo into single markup-and-demo table, similar to how standard Harvard documentation is presented (using tl:markupv)
801810
wikitext
text/x-wiki
{{Documentation subpage}}
<!-- Place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
{{lua|Module:Harvc}}
{{uses TemplateStyles|Module:Citation/CS1/styles.css|noprotcat=yes}}
This template is a citation hybrid that has characteristics of long-form [[Help:Citation Style 1|cs1]] and [[Help:Citation Style 2|cs2]], of short-form {{tlx|sfn}} and of the {{tlx|harv}} families of templates. Its purpose is to provide a method that allows editors to refer to a contribution or chapter in a larger work when more than a few such referrals are required. {{tlx|harvc}} is not a substitute for a properly constructed citation.
Short-form templates {{tlx|sfn}} and {{tlx|harv}} are often used to link from an article's references section to a long-form cs1|2 template in a bibliography section:
:{{tlx|harv}} → {{tlx|cite book}}
It is not uncommon for a source to have multiple contributors. When it is necessary to refer to multiple contributions in the same source, repeating all of the bibliographic details in multiple long-form citation templates adds to references-section clutter. {{tlx|harvc}} is designed to hold only the detail necessary to identify a contribution and link to the enclosing work's long-form citation where all of the bibliographic detail can be found:
:{{tlx|harv}} → {{tlx|harvc}} → {{tlx|cite book}}
== Usage ==
The minimal form is:
:<code><nowiki>{{harvc |last=contributor name |year=publication year |c=contribution title |in=source editor/author name}}</nowiki></code>
According to the comments in [[Module:Harvc]], mistaken {{red|Harvc error: no target:}} error messages may be produced when the template is nested in other templates as on documentation pages. The otherwise undocumented parameter, {{para|ignore-err|yes}}, can be added to prevent this.
===Parameters===
{{tlx|harvc}} creates a <code>CITEREF</code> anchor from one to four contribution or chapter author surnames ({{para|last''n''}}) and the value in {{para|year}}. This allows {{tlx|harvc}} to be the target of a link created by {{tlx|sfn}} or {{tlx|harv}} family templates. From {{para|in{{var|n}}}} and {{para|year}}, {{tlx|harvc}} creates a CITEREF link similar to those created by {{tlx|harvnb}} and {{tlx|sfn}}
: '''|anchor-year=''' – optional, for use for author(s) with more than one contribution to the work; requires CITEREF disambiguator; see [[#More than one contribution|Examples]]
: '''|author-link=''' – optional, title of existing Wikipedia article about the first contributor—not the contributor's website; do not wikilink; alias: '''|author-link1='''
:: '''|author-link''n''=''' – optional, title of existing Wikipedia article about contributor''n''; choose ''n'' to match ''n'' in '''|last''n''='''
: '''|author-mask=''m''''' – optional, replaces name of the first contributor with ''m'' (commonly 2) em dashes; alias: '''|author-mask1='''
:: '''|author-mask''n''=''m''''' – optional, replaces name of contributor''n'' with ''m'' em dashes; choose ''n'' to match ''n'' in '''|last''n''='''
:: '''|author-mask{{var|n}}=<{{var|text}}>''' – optional, replaces name of contributor''n'' with <{{var|text}}>
: '''|c=''' – required, the title of chapter or contribution; rendered quoted in upright font; aliases: '''|chapter=''', '''|contribution='''
: '''|display-authors=''' – optional, defines how {{tlx|harvc}} displays the contributor list; ignored when '''|name-list-style=harv''':
:: {{para|display-authors}} – when empty or omitted, displays all contributor names in last/first format
:: {{para|display-authors|{{var|n}}}} – displays ''n'' contributor names in last/first format; appends et al. when ''n'' is less than the number of contributors included in the template
:: {{para|display-authors|etal}} – displays all contributor names in last/first format and appends et al.
: '''|first=''' – optional, first contributor's given or first name; alias: '''|first1='''
:: '''|first''n''=''' – optional, contributor''n'' given or first name; ''n'' begins at 2 and increases by 1 for each additional '''|first''n''='''
: '''|id=''' – required when {{para|last1}}-{{para|last4}} are the same as {{para|in1}}-{{para|in4}}; otherwise optional. See [[#Avoiding circular reference|Examples]]
: '''|in=''' – required, surname or last name of first editor or author of the work that includes the contribution; aliases: '''|in1='''
: '''|in2=''' – optional, surname or last name of second editor or author
: '''|in3=''' – optional, surname or last name of third editor or author
: '''|in4=''' – optional, surname or last name of fourth editor or author
: '''|last=''' – required, surname or last name of first author; aliases: '''|last1='''
:: '''|last''n''=''' – optional, contributor''n'' surname or last name; ''n'' begins at 2 and increases by 1 for each additional '''|last''n''=''';
: '''|loc=''' – optional, other location identifier, displays after {{para|p}} or {{para|pp}}
: '''|mode=''' – controls rendered display to match that of adjacent CS1 or CS2 citations; defaults to CS1 style
:: '''|mode=cs2''' – mimic {{tlx|citation}} style (comma separators, no terminal punctuation, static text not capitalized)
: '''|name-list-style=''' – optional, controls contributor name list display style
:: '''|name-list-style=harv''' – mimic {{tlx|sfn}} or {{tlx|harv}} format (one to four last names); overrides '''|display-authors='''
:: '''|name-list-style=amp''' – inserts an ampersand between the last two contributor names
: '''|nb=''' – optional, when set to <code>yes</code>, instructs {{tlx|harvc}} to render source link without parentheses around the year; same format as that produced by {{tlx|harvnb}}
: '''|p=''' – optional, single page number where cited material can be found; aliases: '''|page='''
: '''|pp=''' – optional, multiple page numbers, page ranges, etc where cited material can be found; aliases: '''|pages='''
: '''|ps=''' – optional, sets terminal punctuation; default is full stop; overrides '''|mode=cs2'''; aliases: '''|postscript='''
:: '''|ps=none''' – renders output without terminal punctuation
: '''|url=''' – optional, URL of an online location where the text of the contribution can be found; aliases: '''|chapter-url''', '''|contribution-url'''
: '''|url-access=''' – optional, use when URL links to a source behind a registration barrier or paywall; inserts [[Help:Citation_Style_1#Registration_or_subscription_required|cs1{{pipe}}2 access icon]]; accepted values are: <code>limited</code>, <code>registration</code>, <code>subscription</code>
: '''|year=''' – required, publication year of the work that includes the contribution
===Examples===
When a Wikipedia article makes reference to a work that contains multiple chapters by different authors, bibliographies and reference sections can look rather cluttered:
* {{cite book |last=George |first=Ernest J. |last2=Read |first2=Ralph A. |last3=Johnson |first3=R. W. |last4=Ferber |first4=A. E. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Shelterbelts and Windbreaks |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=//archive.org/stream/yoa1957#page/n785/mode/1up |oclc=704186906}}
* {{cite book |last=Harper |first=V. L. |last2=Frank |first2=Bernard |last3=McQuilkin |first3=W. E. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Forest Practices and Productivity |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=//archive.org/stream/yoa1957#page/n803/mode/1up |oclc=704186906}}
* {{cite book |last=Stout |first=P. R. |last2=Johnson |first2=C. M. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Trace Elements |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=//archive.org/stream/yoa1957#page/n167/mode/1up |oclc=704186906}}
* {{cite book |last=Wadleigh |first=C. H. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Growth of Plants |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=//archive.org/stream/yoa1957#page/n57/mode/1up |oclc=704186906}}
As the list grows longer, the look becomes more cluttered with the unnecessarily repeated detail of full-length citations. With {{tlx|harvc}} editors can link to shorter, less detailed contribution citations using standard implementations of {{tlx|sfn}} templates= and {{tlx|harv}} templates (and also wrapped in {{tag|ref}} tags with {{tlx|harvnb}}). {{tlx|harvc}} may also be wrapped in {{tag|ref}} tags so that it becomes part of the article's References section. See full example below.
====Avoiding circular reference====
It may sometimes be necessary to cite a contribution of a source's editor or author such that {{para|last1}} through {{para|last4}} are the same as {{para|in1}} through {{para|in4}}, an editor's preface for example. Such citations can, depending on placement, cause {{tlx|sfn}} or {{tlx|harv}}-family references to link directly to the citation instead of to the {{tlx|harvc}} template, or cause circular links ({{tlx|harvc}} linking to itself because its <code>CITEREF</code> anchor identifier is the same as the citation's <code>CITEREF</code> anchor identifier). If {{para|id}} is set, {{tlx|harvc}} will use it as an anchor identifier; if {{para|id}} is not set, {{tlx|harvc}} will emit an error message when {{para|last1}} through {{para|last4}} are the same as {{para|in1}} through {{para|in4}}.
For example, to reference an editor's preface from article text, create a wikilink inside {{tag|ref}} tags:
:<code><nowiki><ref>[[#Stefferud preface|Stefferud 1957]]</ref></nowiki></code>
Write a {{tlx|harvc}} template with {{para|id|Stefferud preface}}
:<code><nowiki>{{harvc |last=Stefferud |first=A.|year=1957 |id=Stefferud preface |c=Preface |url=//archive.org/stream/yoa1957#page/n7/mode/1up |in=Stefferud}}</nowiki></code>
{{markup|
<nowiki>First information.{{sfn|George|Read|Johnson|Ferber|1957}} Second.<ref>{{harvnb|Stout|Johnson|1957}}</ref> Three thru five.<ref>{{harvnb|Stout|Johnson|1957}}</ref><ref>{{harvc|last=Benson|first=Ezra Taft|year=1957|chapter=Foreword|url=//archive.org/stream/yoa1957#page/n5/mode/1up|in=Stefferud|p=vi |loc=§2 |ignore-err=yes}}</ref>{{sfn|Wadleigh|1957}} Sixth.<ref>[[#Stefferud preface|Stefferud 1957]]</ref>
===Notes===
{{reflist}}
===References===
* {{cite book |title=Soil: The Yearbook of Agriculture 1957 |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |url=//archive.org/stream/yoa1957 |oclc=704186906 }}
** {{harvc |last=George |first=Ernest J. |last2=Read |last3=Johnson |last4=Ferber |year=1957 |contribution=Shelterbelts and Windbreaks |url=//archive.org/stream/yoa1957#page/n785/mode/1up |in=Stefferud}}
** {{harvc |last=Harper |first=V. L. |last2=Frank |last3=McQuilkin |year=1957 |contribution=Forest Practices |url=//archive.org/stream/yoa1957#page/n803/mode/1up |in=Stefferud}}
** {{harvc |last=Stefferud |first=A.|year=1957 |id=Stefferud preface |c=Preface |url=//archive.org/stream/yoa1957#page/n7/mode/1up |in=Stefferud}}
** {{harvc |last=Stout |first=P. R. |last2=Johnson |year=1957 |c=Trace Elements |url=//archive.org/stream/yoa1957#page/n167/mode/1up |in=Stefferud}}
** {{harvc |last=Wadleigh |first=C. H.|year=1957 |c=Growth of Plants |url=//archive.org/stream/yoa1957#page/n57/mode/1up |in=Stefferud |ignore-err=yes}}
</nowiki>|First information.{{sfn|George|Read|Johnson|Ferber|1957}} Second.<ref>{{harvnb|Stout|Johnson|1957}}</ref> Three thru five.<ref>{{harvnb|Stout|Johnson|1957}}</ref><ref>{{harvc|last=Benson|first=Ezra Taft|year=1957|chapter=Foreword|url=//archive.org/stream/yoa1957#page/n5/mode/1up|in=Stefferud|p=vi |loc=§2 |ignore-err=yes}}</ref>{{sfn|Wadleigh|1957}} Sixth.<ref>[[#Stefferud preface|Stefferud 1957]]</ref>
===Notes===
{{reflist}}
===References===
* {{cite book |title=Soil: The Yearbook of Agriculture 1957 |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |url=//archive.org/stream/yoa1957 |oclc=704186906 }}
** {{harvc |last=George |first=Ernest J. |last2=Read |last3=Johnson |last4=Ferber |year=1957 |contribution=Shelterbelts and Windbreaks |url=//archive.org/stream/yoa1957#page/n785/mode/1up |in=Stefferud}}
** {{harvc |last=Harper |first=V. L. |last2=Frank |last3=McQuilkin |year=1957 |contribution=Forest Practices |url=//archive.org/stream/yoa1957#page/n803/mode/1up |in=Stefferud}}
** {{harvc |last=Stefferud |first=A.|year=1957 |id=Stefferud preface |c=Preface |url=//archive.org/stream/yoa1957#page/n7/mode/1up |in=Stefferud}}
** {{harvc |last=Stout |first=P. R. |last2=Johnson |year=1957 |c=Trace Elements |url=//archive.org/stream/yoa1957#page/n167/mode/1up |in=Stefferud}}
** {{harvc |last=Wadleigh |first=C. H.|year=1957 |c=Growth of Plants |url=//archive.org/stream/yoa1957#page/n57/mode/1up |in=Stefferud |ignore-err=yes}}}}<!-- Template:Mra -->
<!--
====Example bibliography section====
* {{cite book |title=Soil: The Yearbook of Agriculture 1957 |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |url=//archive.org/stream/yoa1957#page/n2/mode/1up |oclc=704186906 }}
** {{harvc |last=George |first=Ernest J. |last2=Read |last3=Johnson |last4=Ferber |year=1957 |contribution=Shelterbelts and Windbreaks |url=//archive.org/stream/yoa1957#page/n785/mode/1up |in=Stefferud |ignore-err=yes}}
** {{harvc |last=Harper |first=V. L. |last2=Frank |last3=McQuilkin |year=1957 |contribution=Forest Practices and Productivity |url=//archive.org/stream/yoa1957#page/n803/mode/1up |in=Stefferud |ignore-err=yes}}
** {{harvc |last=Stefferud |first=A.|year=1957 |id=Stefferud preface |c=Preface |url=//archive.org/stream/yoa1957#page/n7/mode/1up |in=Stefferud |ignore-err=yes}}
** {{harvc |last=Stout |first=P. R. |last2=Johnson |year=1957 |c=Trace Elements |url=//archive.org/stream/yoa1957#page/n167/mode/1up |in=Stefferud |ignore-err=yes}}
** {{harvc |last=Wadleigh |first=C. H.|year=1957 |c=Growth of Plants |url=//archive.org/stream/yoa1957#page/n57/mode/1up |in=Stefferud |ignore-err=yes}}
-->
====More than one contribution====
There are times when an author or authors will have contributed more than once to a work. When this occurs, it is necessary to disambiguate the CITEREF links from the {{tlx|harv}} or {{tlx|sfn}} templates to the CITEREF id of the appropriate {{tlx|harvc}} template.
:{{tlx|harv|Author|YYYYa}} → {{tlx|harvc|Author|Contribution 1|YYYYa}} → {{tlx|citation|...}}}
:{{tlx|harv|Author|YYYYb}} → {{tlx|harvc|Author|Contribution 2|YYYYb}} ↑
In this example, author David Hunt contributed two appendices to ''Christmas Cacti: The Genus ''Schlumbergera'' and Its Hybrids''.
There are two {{tlx|harvnb}} templates that are disambiguated:
:<code><nowiki>{{harvnb |Hunt |1995a}}</nowiki></code> → {{harvnb |Hunt |1995a}}
:<code><nowiki>{{harvnb |Hunt |1995b}}</nowiki></code> → {{harvnb |Hunt |1995b}}
These link to two {{tlx|harvc}} templates which use {{para|anchor-year}} for their CITEREF id and for the date in the {{tlx|harvc}} rendering as a visual aid for readers:
*<code><nowiki>{{harvc |in=McMillan |in2=Horobin |last=Hunt |first=David |c=Appendix I Names and synonyms of the species, subspecies and interspecific hybrids |year=1995 |anchor-year=1995a |mode=cs2 |nb=yes}}</nowiki></code>
*:{{harvc |in=McMillan |in2=Horobin |last=Hunt |first=David |c=Appendix I Names and synonyms of the species, subspecies and interspecific hybrids |year=1995 |anchor-year=1995a |mode=cs2 |nb=yes |ignore-err=yes}}
*<code><nowiki>{{harvc |in=McMillan |in2=Horobin |last=Hunt |first=David |c=Appendix III Excerpts from a Brazilian diary |year=1995 |anchor-year=1995b |mode=cs2 |nb=yes}}</nowiki></code>
*:{{harvc |in=McMillan |in2=Horobin |last=Hunt |first=David |c=Appendix III Excerpts from a Brazilian diary |year=1995 |anchor-year=1995b |mode=cs2 |nb=yes |ignore-err=yes}}
and the single {{tlx|citation}} template:
*<code><nowiki>{{Citation |last=McMillan |first=A. J. S. |last2=Horobin |first2=J. F. |year=1995 |title=Christmas Cacti: The Genus ''Schlumbergera'' and Its Hybrids |edition=p/b |publication-place=Sherbourne, Dorset, UK |publisher=David Hunt |isbn=978-0-9517234-6-3}}</nowiki></code>
*:{{Citation |last=McMillan |first=A. J. S. |last2=Horobin |first2=J. F. |year=1995 |title=Christmas Cacti: The Genus ''Schlumbergera'' and Its Hybrids |edition=p/b |publication-place=Sherbourne, Dorset, UK |publisher=David Hunt |isbn=978-0-9517234-6-3}}
==Error messages==
{{tlx|harvc}} emits these error messages:<!--
:<span style="font-size:100%" class="error">harvc: {{para|anchor-year|plain=yes}} missing dab.</span>
::when used, {{para|anchor-year}} must include a single, lowercase letter disambiguator -->
:<span style="font-size:100%" class="error">harvc: author missing from source list.</span>
::the source list parameters {{para|in1}}, {{para|in2}}, {{para|in3}}, and {{para|in4}} form the template's <code>CITEREF</code> link to the full citation. All are not required but must be used in order without numerical gaps.
:<span style="font-size:100%" class="error">harvc: invalid {{para|anchor-year|plain=yes}}.</span>
::when used, {{para|anchor-year}} must be a three- or four-digit number and must have a lowercase <code>CITEREF</code> disambiguator. When the source does not have an identifiable year, use {{para|anchor-year|n.d.{{var|l}}}} or {{para|anchor-year|nd{{var|l}}}} with lowercase <code>CITEREF</code> disambiguator.
:<span style="font-size:100%" class="error">harvc: invalid {{para|display-authors|plain=yes}}.</span>
::the value assigned to {{para|display-authors}} must be a number greater than 0 or the keyword <code>etal</code>
:<span style="font-size:100%" class="error">harvc: invalid {{para|year|plain=yes}}.</span>
::{{para|year}} is an integral part of the template's <code>CITEREF</code> anchor and link. The value of {{para|year}} must be a three- or four-digit number with an optional lowercase <code>CITEREF</code> disambiguator. When the source does not have an identifiable year, use {{para|year|n.d.}} or {{para|year|nd}}.
:<span style="font-size:100%" class="error">harvc: missing {{para|year|plain=yes}}.</span>
::{{para|year}} is missing; the parameter is required.
:<span style="font-size:100%" class="error">harvc: no authors in contributor list.</span>
::this error message indicates that {{tlx|harvc}} can't find any of {{para|last}}, {{para|last1}}, {{para|author}} or {{para|author1}} with an assigned value and so cannot make a usable <code>CITEREF</code> anchor. Add at least one of the listed parameters.
:<span style="font-size:100%" class="error">harvc: required contribution is missing.</span>
::this error message indicates that {{tlx|harvc}} can't find any of {{para|c}}, {{para|chapter}}, or {{para|contribution}} with an assigned value
:<span style="font-size:100%" class="error">harvc: required {{para|id|plain=yes}} parameter missing.</span>
::this error message is emitted when the {{tlx|harvc}} template's <code>CITEREF</code> anchor identifier would conflict with the long-form citation's <code>CITEREF</code> anchor identifier. See [[#Avoiding circular reference|Examples]]
:<span style="font-size:100%" class="error">harvc: {{para|year|plain=yes}} / {{para|anchor-year|plain=yes}} mismatch.</span>
::the year portion of {{para|anchor-year|YYYY{{var|l}}}} must match the year given in {{para|year|YYYY}}
<includeonly>{{Sandbox other||
<!-- Categories below this line, please; interwikis at Wikidata -->
[[Category:Citation utility templates]]
}}</includeonly>
kcy7i28efgnttm0t9cz096fe9fhsxh5
801811
801810
2022-08-16T05:52:30Z
en>SamuelRiv
0
/* Examples */ move subst markup template to markupv (better for smaller windows), convert lower example (wordy) to markup table also
801811
wikitext
text/x-wiki
{{Documentation subpage}}
<!-- Place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
{{lua|Module:Harvc}}
{{uses TemplateStyles|Module:Citation/CS1/styles.css|noprotcat=yes}}
This template is a citation hybrid that has characteristics of long-form [[Help:Citation Style 1|cs1]] and [[Help:Citation Style 2|cs2]], of short-form {{tlx|sfn}} and of the {{tlx|harv}} families of templates. Its purpose is to provide a method that allows editors to refer to a contribution or chapter in a larger work when more than a few such referrals are required. {{tlx|harvc}} is not a substitute for a properly constructed citation.
Short-form templates {{tlx|sfn}} and {{tlx|harv}} are often used to link from an article's references section to a long-form cs1|2 template in a bibliography section:
:{{tlx|harv}} → {{tlx|cite book}}
It is not uncommon for a source to have multiple contributors. When it is necessary to refer to multiple contributions in the same source, repeating all of the bibliographic details in multiple long-form citation templates adds to references-section clutter. {{tlx|harvc}} is designed to hold only the detail necessary to identify a contribution and link to the enclosing work's long-form citation where all of the bibliographic detail can be found:
:{{tlx|harv}} → {{tlx|harvc}} → {{tlx|cite book}}
== Usage ==
The minimal form is:
:<code><nowiki>{{harvc |last=contributor name |year=publication year |c=contribution title |in=source editor/author name}}</nowiki></code>
According to the comments in [[Module:Harvc]], mistaken {{red|Harvc error: no target:}} error messages may be produced when the template is nested in other templates as on documentation pages. The otherwise undocumented parameter, {{para|ignore-err|yes}}, can be added to prevent this.
===Parameters===
{{tlx|harvc}} creates a <code>CITEREF</code> anchor from one to four contribution or chapter author surnames ({{para|last''n''}}) and the value in {{para|year}}. This allows {{tlx|harvc}} to be the target of a link created by {{tlx|sfn}} or {{tlx|harv}} family templates. From {{para|in{{var|n}}}} and {{para|year}}, {{tlx|harvc}} creates a CITEREF link similar to those created by {{tlx|harvnb}} and {{tlx|sfn}}
: '''|anchor-year=''' – optional, for use for author(s) with more than one contribution to the work; requires CITEREF disambiguator; see [[#More than one contribution|Examples]]
: '''|author-link=''' – optional, title of existing Wikipedia article about the first contributor—not the contributor's website; do not wikilink; alias: '''|author-link1='''
:: '''|author-link''n''=''' – optional, title of existing Wikipedia article about contributor''n''; choose ''n'' to match ''n'' in '''|last''n''='''
: '''|author-mask=''m''''' – optional, replaces name of the first contributor with ''m'' (commonly 2) em dashes; alias: '''|author-mask1='''
:: '''|author-mask''n''=''m''''' – optional, replaces name of contributor''n'' with ''m'' em dashes; choose ''n'' to match ''n'' in '''|last''n''='''
:: '''|author-mask{{var|n}}=<{{var|text}}>''' – optional, replaces name of contributor''n'' with <{{var|text}}>
: '''|c=''' – required, the title of chapter or contribution; rendered quoted in upright font; aliases: '''|chapter=''', '''|contribution='''
: '''|display-authors=''' – optional, defines how {{tlx|harvc}} displays the contributor list; ignored when '''|name-list-style=harv''':
:: {{para|display-authors}} – when empty or omitted, displays all contributor names in last/first format
:: {{para|display-authors|{{var|n}}}} – displays ''n'' contributor names in last/first format; appends et al. when ''n'' is less than the number of contributors included in the template
:: {{para|display-authors|etal}} – displays all contributor names in last/first format and appends et al.
: '''|first=''' – optional, first contributor's given or first name; alias: '''|first1='''
:: '''|first''n''=''' – optional, contributor''n'' given or first name; ''n'' begins at 2 and increases by 1 for each additional '''|first''n''='''
: '''|id=''' – required when {{para|last1}}-{{para|last4}} are the same as {{para|in1}}-{{para|in4}}; otherwise optional. See [[#Avoiding circular reference|Examples]]
: '''|in=''' – required, surname or last name of first editor or author of the work that includes the contribution; aliases: '''|in1='''
: '''|in2=''' – optional, surname or last name of second editor or author
: '''|in3=''' – optional, surname or last name of third editor or author
: '''|in4=''' – optional, surname or last name of fourth editor or author
: '''|last=''' – required, surname or last name of first author; aliases: '''|last1='''
:: '''|last''n''=''' – optional, contributor''n'' surname or last name; ''n'' begins at 2 and increases by 1 for each additional '''|last''n''=''';
: '''|loc=''' – optional, other location identifier, displays after {{para|p}} or {{para|pp}}
: '''|mode=''' – controls rendered display to match that of adjacent CS1 or CS2 citations; defaults to CS1 style
:: '''|mode=cs2''' – mimic {{tlx|citation}} style (comma separators, no terminal punctuation, static text not capitalized)
: '''|name-list-style=''' – optional, controls contributor name list display style
:: '''|name-list-style=harv''' – mimic {{tlx|sfn}} or {{tlx|harv}} format (one to four last names); overrides '''|display-authors='''
:: '''|name-list-style=amp''' – inserts an ampersand between the last two contributor names
: '''|nb=''' – optional, when set to <code>yes</code>, instructs {{tlx|harvc}} to render source link without parentheses around the year; same format as that produced by {{tlx|harvnb}}
: '''|p=''' – optional, single page number where cited material can be found; aliases: '''|page='''
: '''|pp=''' – optional, multiple page numbers, page ranges, etc where cited material can be found; aliases: '''|pages='''
: '''|ps=''' – optional, sets terminal punctuation; default is full stop; overrides '''|mode=cs2'''; aliases: '''|postscript='''
:: '''|ps=none''' – renders output without terminal punctuation
: '''|url=''' – optional, URL of an online location where the text of the contribution can be found; aliases: '''|chapter-url''', '''|contribution-url'''
: '''|url-access=''' – optional, use when URL links to a source behind a registration barrier or paywall; inserts [[Help:Citation_Style_1#Registration_or_subscription_required|cs1{{pipe}}2 access icon]]; accepted values are: <code>limited</code>, <code>registration</code>, <code>subscription</code>
: '''|year=''' – required, publication year of the work that includes the contribution
===Examples===
When a Wikipedia article makes reference to a work that contains multiple chapters by different authors, bibliographies and reference sections can look rather cluttered:
* {{cite book |last=George |first=Ernest J. |last2=Read |first2=Ralph A. |last3=Johnson |first3=R. W. |last4=Ferber |first4=A. E. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Shelterbelts and Windbreaks |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=//archive.org/stream/yoa1957#page/n785/mode/1up |oclc=704186906}}
* {{cite book |last=Harper |first=V. L. |last2=Frank |first2=Bernard |last3=McQuilkin |first3=W. E. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Forest Practices and Productivity |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=//archive.org/stream/yoa1957#page/n803/mode/1up |oclc=704186906}}
* {{cite book |last=Stout |first=P. R. |last2=Johnson |first2=C. M. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Trace Elements |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=//archive.org/stream/yoa1957#page/n167/mode/1up |oclc=704186906}}
* {{cite book |last=Wadleigh |first=C. H. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Growth of Plants |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=//archive.org/stream/yoa1957#page/n57/mode/1up |oclc=704186906}}
As the list grows longer, the look becomes more cluttered with the unnecessarily repeated detail of full-length citations. With {{tlx|harvc}} editors can link to shorter, less detailed contribution citations using standard implementations of {{tlx|sfn}} templates and {{tlx|harv}} templates (and also wrapped in {{tag|ref}} tags with {{tlx|harvnb}}). {{tlx|harvc}} may also be wrapped in {{tag|ref}} tags so that it becomes part of the article's References section. See full example below.
====Avoiding circular reference====
It may sometimes be necessary to cite a contribution of a source's editor or author such that {{para|last1}} through {{para|last4}} are the same as {{para|in1}} through {{para|in4}}, an editor's preface for example. Such citations can, depending on placement, cause {{tlx|sfn}} or {{tlx|harv}}-family references to link directly to the citation instead of to the {{tlx|harvc}} template, or cause circular links ({{tlx|harvc}} linking to itself because its <code>CITEREF</code> anchor identifier is the same as the citation's <code>CITEREF</code> anchor identifier). If {{para|id}} is set, {{tlx|harvc}} will use it as an anchor identifier; if {{para|id}} is not set, {{tlx|harvc}} will emit an error message when {{para|last1}} through {{para|last4}} are the same as {{para|in1}} through {{para|in4}}.
For example, to reference an editor's preface from article text, create a wikilink inside {{tag|ref}} tags:
:<code><nowiki><ref>[[#Stefferud preface|Stefferud 1957]]</ref></nowiki></code>
Write a {{tlx|harvc}} template with {{para|id|Stefferud preface}}
:<code><nowiki>{{harvc |last=Stefferud |first=A.|year=1957 |id=Stefferud preface |c=Preface |url=//archive.org/stream/yoa1957#page/n7/mode/1up |in=Stefferud}}</nowiki></code>
{{markupv|title=Full example:|markup=
<nowiki>First information.{{sfn|George|Read|Johnson|Ferber|1957}} Second.<ref>{{harvnb|Stout|Johnson|1957}}</ref> Three thru five.<ref>{{harvnb|Stout|Johnson|1957}}</ref><ref>{{harvc|last=Benson|first=Ezra Taft|year=1957|chapter=Foreword|url=//archive.org/stream/yoa1957#page/n5/mode/1up|in=Stefferud|p=vi |loc=§2 |ignore-err=yes}}</ref>{{sfn|Wadleigh|1957}} Sixth.<ref>[[#Stefferud preface|Stefferud 1957]]</ref>
===Notes===
{{reflist}}
===References===
* {{cite book |title=Soil: The Yearbook of Agriculture 1957 |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |url=//archive.org/stream/yoa1957 |oclc=704186906 }}
** {{harvc |last=George |first=Ernest J. |last2=Read |last3=Johnson |last4=Ferber |year=1957 |contribution=Shelterbelts and Windbreaks |url=//archive.org/stream/yoa1957#page/n785/mode/1up |in=Stefferud}}
** {{harvc |last=Harper |first=V. L. |last2=Frank |last3=McQuilkin |year=1957 |contribution=Forest Practices |url=//archive.org/stream/yoa1957#page/n803/mode/1up |in=Stefferud}}
** {{harvc |last=Stefferud |first=A.|year=1957 |id=Stefferud preface |c=Preface |url=//archive.org/stream/yoa1957#page/n7/mode/1up |in=Stefferud}}
** {{harvc |last=Stout |first=P. R. |last2=Johnson |year=1957 |c=Trace Elements |url=//archive.org/stream/yoa1957#page/n167/mode/1up |in=Stefferud}}
** {{harvc |last=Wadleigh |first=C. H.|year=1957 |c=Growth of Plants |url=//archive.org/stream/yoa1957#page/n57/mode/1up |in=Stefferud |ignore-err=yes}}
</nowiki>|renders=First information.{{sfn|George|Read|Johnson|Ferber|1957}} Second.<ref>{{harvnb|Stout|Johnson|1957}}</ref> Three thru five.<ref>{{harvnb|Stout|Johnson|1957}}</ref><ref>{{harvc|last=Benson|first=Ezra Taft|year=1957|chapter=Foreword|url=//archive.org/stream/yoa1957#page/n5/mode/1up|in=Stefferud|p=vi |loc=§2 |ignore-err=yes}}</ref>{{sfn|Wadleigh|1957}} Sixth.<ref>[[#Stefferud preface|Stefferud 1957]]</ref>
===Notes===
{{reflist}}
===References===
* {{cite book |title=Soil: The Yearbook of Agriculture 1957 |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |url=//archive.org/stream/yoa1957 |oclc=704186906 }}
** {{harvc |last=George |first=Ernest J. |last2=Read |last3=Johnson |last4=Ferber |year=1957 |contribution=Shelterbelts and Windbreaks |url=//archive.org/stream/yoa1957#page/n785/mode/1up |in=Stefferud}}
** {{harvc |last=Harper |first=V. L. |last2=Frank |last3=McQuilkin |year=1957 |contribution=Forest Practices |url=//archive.org/stream/yoa1957#page/n803/mode/1up |in=Stefferud}}
** {{harvc |last=Stefferud |first=A.|year=1957 |id=Stefferud preface |c=Preface |url=//archive.org/stream/yoa1957#page/n7/mode/1up |in=Stefferud}}
** {{harvc |last=Stout |first=P. R. |last2=Johnson |year=1957 |c=Trace Elements |url=//archive.org/stream/yoa1957#page/n167/mode/1up |in=Stefferud}}
** {{harvc |last=Wadleigh |first=C. H.|year=1957 |c=Growth of Plants |url=//archive.org/stream/yoa1957#page/n57/mode/1up |in=Stefferud |ignore-err=yes}}}}<!-- Template:Mra -->
<!--
====Example bibliography section====
* {{cite book |title=Soil: The Yearbook of Agriculture 1957 |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |url=//archive.org/stream/yoa1957#page/n2/mode/1up |oclc=704186906 }}
** {{harvc |last=George |first=Ernest J. |last2=Read |last3=Johnson |last4=Ferber |year=1957 |contribution=Shelterbelts and Windbreaks |url=//archive.org/stream/yoa1957#page/n785/mode/1up |in=Stefferud |ignore-err=yes}}
** {{harvc |last=Harper |first=V. L. |last2=Frank |last3=McQuilkin |year=1957 |contribution=Forest Practices and Productivity |url=//archive.org/stream/yoa1957#page/n803/mode/1up |in=Stefferud |ignore-err=yes}}
** {{harvc |last=Stefferud |first=A.|year=1957 |id=Stefferud preface |c=Preface |url=//archive.org/stream/yoa1957#page/n7/mode/1up |in=Stefferud |ignore-err=yes}}
** {{harvc |last=Stout |first=P. R. |last2=Johnson |year=1957 |c=Trace Elements |url=//archive.org/stream/yoa1957#page/n167/mode/1up |in=Stefferud |ignore-err=yes}}
** {{harvc |last=Wadleigh |first=C. H.|year=1957 |c=Growth of Plants |url=//archive.org/stream/yoa1957#page/n57/mode/1up |in=Stefferud |ignore-err=yes}}
-->
====More than one contribution====
There are times when an author or authors will have contributed more than once to a work. When this occurs, it is necessary to disambiguate the CITEREF links from the {{tlx|harv}} or {{tlx|sfn}} templates to the CITEREF id of the appropriate {{tlx|harvc}} template.
:{{tlx|harv|Author|YYYYa}} → {{tlx|harvc|Author|Contribution 1|YYYYa}} → {{tlx|citation|...}}}
:{{tlx|harv|Author|YYYYb}} → {{tlx|harvc|Author|Contribution 2|YYYYb}} ↑
In this example, author David Hunt contributed two appendices to ''Christmas Cacti: The Genus ''Schlumbergera'' and Its Hybrids''.
There are two {{tlx|harvnb}} templates that are disambiguated:
:<code><nowiki>{{harvnb |Hunt |1995a}}</nowiki></code> → Hunt 1995a
:<code><nowiki>{{harvnb |Hunt |1995b}}</nowiki></code> → Hunt 1995b
These link to two {{tlx|harvc}} templates which use {{para|anchor-year}} for their CITEREF id and for the date in the {{tlx|harvc}} rendering as a visual aid for readers:
{{markup|
<nowiki>{{harvnb |Hunt |1995a}}; {{harvnb |Hunt |1995b}}.
===References===
* {{Citation |last=McMillan |first=AJS |last2=Horobin |first2=JF |year=1995 |title=Christmas Cacti: The Genus ''Schlumbergera'' and Its Hybrids |edition=p/b |publication-place=Sherbourne, UK |publisher=David Hunt |isbn=978-0-9517234-6-3}}
** {{harvc |in=McMillan |in2=Horobin |last=Hunt |first=David |c=Appendix I Names of the species |year=1995 |anchor-year=1995a |mode=cs2 |nb=yes}}
** {{harvc |in=McMillan |in2=Horobin |last=Hunt |first=David |c=Appendix III Excerpts from a Brazilian diary |year=1995 |anchor-year=1995b |mode=cs2 |nb=yes |ignore-err=yes}}
</nowiki>|{{harvnb |Hunt |1995a}}; {{harvnb |Hunt |1995b}}.
===References===
* {{Citation |last=McMillan |first=AJS |last2=Horobin |first2=JF |year=1995 |title=Christmas Cacti: The Genus ''Schlumbergera'' and Its Hybrids |edition=p/b |publication-place=Sherbourne, UK |publisher=David Hunt |isbn=978-0-9517234-6-3}}
** {{harvc |in=McMillan |in2=Horobin |last=Hunt |first=David |c=Appendix I Names of the species |year=1995 |anchor-year=1995a |mode=cs2 |nb=yes}}
** {{harvc |in=McMillan |in2=Horobin |last=Hunt |first=David |c=Appendix III Excerpts from a Brazilian diary |year=1995 |anchor-year=1995b |mode=cs2 |nb=yes |ignore-err=yes}}}}<!-- Template:Mra -->
<!--
There are two {{tlx|harvnb}} templates that are disambiguated:
:<code><nowiki>{{harvnb |Hunt |1995a}}</nowiki></code> → {{harvnb |Hunt |1995a}}
:<code><nowiki>{{harvnb |Hunt |1995b}}</nowiki></code> → {{harvnb |Hunt |1995b}}
These link to two {{tlx|harvc}} templates which use {{para|anchor-year}} for their CITEREF id and for the date in the {{tlx|harvc}} rendering as a visual aid for readers:
*<code><nowiki>{{harvc |in=McMillan |in2=Horobin |last=Hunt |first=David |c=Appendix I Names and synonyms of the species, subspecies and interspecific hybrids |year=1995 |anchor-year=1995a |mode=cs2 |nb=yes}}</nowiki></code>
*:{{harvc |in=McMillan |in2=Horobin |last=Hunt |first=David |c=Appendix I Names and synonyms of the species, subspecies and interspecific hybrids |year=1995 |anchor-year=1995a |mode=cs2 |nb=yes |ignore-err=yes}}
*<code><nowiki>{{harvc |in=McMillan |in2=Horobin |last=Hunt |first=David |c=Appendix III Excerpts from a Brazilian diary |year=1995 |anchor-year=1995b |mode=cs2 |nb=yes}}</nowiki></code>
*:{{harvc |in=McMillan |in2=Horobin |last=Hunt |first=David |c=Appendix III Excerpts from a Brazilian diary |year=1995 |anchor-year=1995b |mode=cs2 |nb=yes |ignore-err=yes}}
and the single {{tlx|citation}} template:
*<code><nowiki>{{Citation |last=McMillan |first=A. J. S. |last2=Horobin |first2=J. F. |year=1995 |title=Christmas Cacti: The Genus ''Schlumbergera'' and Its Hybrids |edition=p/b |publication-place=Sherbourne, Dorset, UK |publisher=David Hunt |isbn=978-0-9517234-6-3}}</nowiki></code>
*:{{Citation |last=McMillan |first=A. J. S. |last2=Horobin |first2=J. F. |year=1995 |title=Christmas Cacti: The Genus ''Schlumbergera'' and Its Hybrids |edition=p/b |publication-place=Sherbourne, Dorset, UK |publisher=David Hunt |isbn=978-0-9517234-6-3}}
-->
==Error messages==
{{tlx|harvc}} emits these error messages:<!--
:<span style="font-size:100%" class="error">harvc: {{para|anchor-year|plain=yes}} missing dab.</span>
::when used, {{para|anchor-year}} must include a single, lowercase letter disambiguator -->
:<span style="font-size:100%" class="error">harvc: author missing from source list.</span>
::the source list parameters {{para|in1}}, {{para|in2}}, {{para|in3}}, and {{para|in4}} form the template's <code>CITEREF</code> link to the full citation. All are not required but must be used in order without numerical gaps.
:<span style="font-size:100%" class="error">harvc: invalid {{para|anchor-year|plain=yes}}.</span>
::when used, {{para|anchor-year}} must be a three- or four-digit number and must have a lowercase <code>CITEREF</code> disambiguator. When the source does not have an identifiable year, use {{para|anchor-year|n.d.{{var|l}}}} or {{para|anchor-year|nd{{var|l}}}} with lowercase <code>CITEREF</code> disambiguator.
:<span style="font-size:100%" class="error">harvc: invalid {{para|display-authors|plain=yes}}.</span>
::the value assigned to {{para|display-authors}} must be a number greater than 0 or the keyword <code>etal</code>
:<span style="font-size:100%" class="error">harvc: invalid {{para|year|plain=yes}}.</span>
::{{para|year}} is an integral part of the template's <code>CITEREF</code> anchor and link. The value of {{para|year}} must be a three- or four-digit number with an optional lowercase <code>CITEREF</code> disambiguator. When the source does not have an identifiable year, use {{para|year|n.d.}} or {{para|year|nd}}.
:<span style="font-size:100%" class="error">harvc: missing {{para|year|plain=yes}}.</span>
::{{para|year}} is missing; the parameter is required.
:<span style="font-size:100%" class="error">harvc: no authors in contributor list.</span>
::this error message indicates that {{tlx|harvc}} can't find any of {{para|last}}, {{para|last1}}, {{para|author}} or {{para|author1}} with an assigned value and so cannot make a usable <code>CITEREF</code> anchor. Add at least one of the listed parameters.
:<span style="font-size:100%" class="error">harvc: required contribution is missing.</span>
::this error message indicates that {{tlx|harvc}} can't find any of {{para|c}}, {{para|chapter}}, or {{para|contribution}} with an assigned value
:<span style="font-size:100%" class="error">harvc: required {{para|id|plain=yes}} parameter missing.</span>
::this error message is emitted when the {{tlx|harvc}} template's <code>CITEREF</code> anchor identifier would conflict with the long-form citation's <code>CITEREF</code> anchor identifier. See [[#Avoiding circular reference|Examples]]
:<span style="font-size:100%" class="error">harvc: {{para|year|plain=yes}} / {{para|anchor-year|plain=yes}} mismatch.</span>
::the year portion of {{para|anchor-year|YYYY{{var|l}}}} must match the year given in {{para|year|YYYY}}
<includeonly>{{Sandbox other||
<!-- Categories below this line, please; interwikis at Wikidata -->
[[Category:Citation utility templates]]
}}</includeonly>
pzdoee18cm56vhqkwpdho9ah9zitm1a
801812
801811
2022-08-16T18:49:58Z
en>SamuelRiv
0
rp with fake headings in tl:markup examples (reason: because real headings appear in TOC!)
801812
wikitext
text/x-wiki
{{Documentation subpage}}
<!-- Place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
{{lua|Module:Harvc}}
{{uses TemplateStyles|Module:Citation/CS1/styles.css|noprotcat=yes}}
This template is a citation hybrid that has characteristics of long-form [[Help:Citation Style 1|cs1]] and [[Help:Citation Style 2|cs2]], of short-form {{tlx|sfn}} and of the {{tlx|harv}} families of templates. Its purpose is to provide a method that allows editors to refer to a contribution or chapter in a larger work when more than a few such referrals are required. {{tlx|harvc}} is not a substitute for a properly constructed citation.
Short-form templates {{tlx|sfn}} and {{tlx|harv}} are often used to link from an article's references section to a long-form cs1|2 template in a bibliography section:
:{{tlx|harv}} → {{tlx|cite book}}
It is not uncommon for a source to have multiple contributors. When it is necessary to refer to multiple contributions in the same source, repeating all of the bibliographic details in multiple long-form citation templates adds to references-section clutter. {{tlx|harvc}} is designed to hold only the detail necessary to identify a contribution and link to the enclosing work's long-form citation where all of the bibliographic detail can be found:
:{{tlx|harv}} → {{tlx|harvc}} → {{tlx|cite book}}
== Usage ==
The minimal form is:
:<code><nowiki>{{harvc |last=contributor name |year=publication year |c=contribution title |in=source editor/author name}}</nowiki></code>
According to the comments in [[Module:Harvc]], mistaken {{red|Harvc error: no target:}} error messages may be produced when the template is nested in other templates as on documentation pages. The otherwise undocumented parameter, {{para|ignore-err|yes}}, can be added to prevent this.
===Parameters===
{{tlx|harvc}} creates a <code>CITEREF</code> anchor from one to four contribution or chapter author surnames ({{para|last''n''}}) and the value in {{para|year}}. This allows {{tlx|harvc}} to be the target of a link created by {{tlx|sfn}} or {{tlx|harv}} family templates. From {{para|in{{var|n}}}} and {{para|year}}, {{tlx|harvc}} creates a CITEREF link similar to those created by {{tlx|harvnb}} and {{tlx|sfn}}
: '''|anchor-year=''' – optional, for use for author(s) with more than one contribution to the work; requires CITEREF disambiguator; see [[#More than one contribution|Examples]]
: '''|author-link=''' – optional, title of existing Wikipedia article about the first contributor—not the contributor's website; do not wikilink; alias: '''|author-link1='''
:: '''|author-link''n''=''' – optional, title of existing Wikipedia article about contributor''n''; choose ''n'' to match ''n'' in '''|last''n''='''
: '''|author-mask=''m''''' – optional, replaces name of the first contributor with ''m'' (commonly 2) em dashes; alias: '''|author-mask1='''
:: '''|author-mask''n''=''m''''' – optional, replaces name of contributor''n'' with ''m'' em dashes; choose ''n'' to match ''n'' in '''|last''n''='''
:: '''|author-mask{{var|n}}=<{{var|text}}>''' – optional, replaces name of contributor''n'' with <{{var|text}}>
: '''|c=''' – required, the title of chapter or contribution; rendered quoted in upright font; aliases: '''|chapter=''', '''|contribution='''
: '''|display-authors=''' – optional, defines how {{tlx|harvc}} displays the contributor list; ignored when '''|name-list-style=harv''':
:: {{para|display-authors}} – when empty or omitted, displays all contributor names in last/first format
:: {{para|display-authors|{{var|n}}}} – displays ''n'' contributor names in last/first format; appends et al. when ''n'' is less than the number of contributors included in the template
:: {{para|display-authors|etal}} – displays all contributor names in last/first format and appends et al.
: '''|first=''' – optional, first contributor's given or first name; alias: '''|first1='''
:: '''|first''n''=''' – optional, contributor''n'' given or first name; ''n'' begins at 2 and increases by 1 for each additional '''|first''n''='''
: '''|id=''' – required when {{para|last1}}-{{para|last4}} are the same as {{para|in1}}-{{para|in4}}; otherwise optional. See [[#Avoiding circular reference|Examples]]
: '''|in=''' – required, surname or last name of first editor or author of the work that includes the contribution; aliases: '''|in1='''
: '''|in2=''' – optional, surname or last name of second editor or author
: '''|in3=''' – optional, surname or last name of third editor or author
: '''|in4=''' – optional, surname or last name of fourth editor or author
: '''|last=''' – required, surname or last name of first author; aliases: '''|last1='''
:: '''|last''n''=''' – optional, contributor''n'' surname or last name; ''n'' begins at 2 and increases by 1 for each additional '''|last''n''=''';
: '''|loc=''' – optional, other location identifier, displays after {{para|p}} or {{para|pp}}
: '''|mode=''' – controls rendered display to match that of adjacent CS1 or CS2 citations; defaults to CS1 style
:: '''|mode=cs2''' – mimic {{tlx|citation}} style (comma separators, no terminal punctuation, static text not capitalized)
: '''|name-list-style=''' – optional, controls contributor name list display style
:: '''|name-list-style=harv''' – mimic {{tlx|sfn}} or {{tlx|harv}} format (one to four last names); overrides '''|display-authors='''
:: '''|name-list-style=amp''' – inserts an ampersand between the last two contributor names
: '''|nb=''' – optional, when set to <code>yes</code>, instructs {{tlx|harvc}} to render source link without parentheses around the year; same format as that produced by {{tlx|harvnb}}
: '''|p=''' – optional, single page number where cited material can be found; aliases: '''|page='''
: '''|pp=''' – optional, multiple page numbers, page ranges, etc where cited material can be found; aliases: '''|pages='''
: '''|ps=''' – optional, sets terminal punctuation; default is full stop; overrides '''|mode=cs2'''; aliases: '''|postscript='''
:: '''|ps=none''' – renders output without terminal punctuation
: '''|url=''' – optional, URL of an online location where the text of the contribution can be found; aliases: '''|chapter-url''', '''|contribution-url'''
: '''|url-access=''' – optional, use when URL links to a source behind a registration barrier or paywall; inserts [[Help:Citation_Style_1#Registration_or_subscription_required|cs1{{pipe}}2 access icon]]; accepted values are: <code>limited</code>, <code>registration</code>, <code>subscription</code>
: '''|year=''' – required, publication year of the work that includes the contribution
===Examples===
When a Wikipedia article makes reference to a work that contains multiple chapters by different authors, bibliographies and reference sections can look rather cluttered:
* {{cite book |last=George |first=Ernest J. |last2=Read |first2=Ralph A. |last3=Johnson |first3=R. W. |last4=Ferber |first4=A. E. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Shelterbelts and Windbreaks |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=//archive.org/stream/yoa1957#page/n785/mode/1up |oclc=704186906}}
* {{cite book |last=Harper |first=V. L. |last2=Frank |first2=Bernard |last3=McQuilkin |first3=W. E. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Forest Practices and Productivity |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=//archive.org/stream/yoa1957#page/n803/mode/1up |oclc=704186906}}
* {{cite book |last=Stout |first=P. R. |last2=Johnson |first2=C. M. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Trace Elements |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=//archive.org/stream/yoa1957#page/n167/mode/1up |oclc=704186906}}
* {{cite book |last=Wadleigh |first=C. H. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Growth of Plants |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=//archive.org/stream/yoa1957#page/n57/mode/1up |oclc=704186906}}
As the list grows longer, the look becomes more cluttered with the unnecessarily repeated detail of full-length citations. With {{tlx|harvc}} editors can link to shorter, less detailed contribution citations using standard implementations of {{tlx|sfn}} templates and {{tlx|harv}} templates (and also wrapped in {{tag|ref}} tags with {{tlx|harvnb}}). {{tlx|harvc}} may also be wrapped in {{tag|ref}} tags so that it becomes part of the article's References section. See full example below.
====Avoiding circular reference====
It may sometimes be necessary to cite a contribution of a source's editor or author such that {{para|last1}} through {{para|last4}} are the same as {{para|in1}} through {{para|in4}}, an editor's preface for example. Such citations can, depending on placement, cause {{tlx|sfn}} or {{tlx|harv}}-family references to link directly to the citation instead of to the {{tlx|harvc}} template, or cause circular links ({{tlx|harvc}} linking to itself because its <code>CITEREF</code> anchor identifier is the same as the citation's <code>CITEREF</code> anchor identifier). If {{para|id}} is set, {{tlx|harvc}} will use it as an anchor identifier; if {{para|id}} is not set, {{tlx|harvc}} will emit an error message when {{para|last1}} through {{para|last4}} are the same as {{para|in1}} through {{para|in4}}.
For example, to reference an editor's preface from article text, create a wikilink inside {{tag|ref}} tags:
:<code><nowiki><ref>[[#Stefferud preface|Stefferud 1957]]</ref></nowiki></code>
Write a {{tlx|harvc}} template with {{para|id|Stefferud preface}}
:<code><nowiki>{{harvc |last=Stefferud |first=A.|year=1957 |id=Stefferud preface |c=Preface |url=//archive.org/stream/yoa1957#page/n7/mode/1up |in=Stefferud}}</nowiki></code>
{{markupv|title=Full example:|markup=
<nowiki>First information.{{sfn|George|Read|Johnson|Ferber|1957}} Second.<ref>{{harvnb|Stout|Johnson|1957}}</ref> Three thru five.<ref>{{harvnb|Stout|Johnson|1957}}</ref><ref>{{harvc|last=Benson|first=Ezra Taft|year=1957|chapter=Foreword|url=//archive.org/stream/yoa1957#page/n5/mode/1up|in=Stefferud|p=vi |loc=§2 |ignore-err=yes}}</ref>{{sfn|Wadleigh|1957}} Sixth.<ref>[[#Stefferud preface|Stefferud 1957]]</ref>
<!-- ==Notes== --> {{fake heading|sub=3|Notes}}
{{reflist}}
<!-- ==References== --> {{fake heading|sub=3|References}}
* {{cite book |title=Soil: The Yearbook of Agriculture 1957 |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |url=//archive.org/stream/yoa1957 |oclc=704186906 }}
** {{harvc |last=George |first=Ernest J. |last2=Read |last3=Johnson |last4=Ferber |year=1957 |contribution=Shelterbelts and Windbreaks |url=//archive.org/stream/yoa1957#page/n785/mode/1up |in=Stefferud}}
** {{harvc |last=Harper |first=V. L. |last2=Frank |last3=McQuilkin |year=1957 |contribution=Forest Practices |url=//archive.org/stream/yoa1957#page/n803/mode/1up |in=Stefferud}}
** {{harvc |last=Stefferud |first=A.|year=1957 |id=Stefferud preface |c=Preface |url=//archive.org/stream/yoa1957#page/n7/mode/1up |in=Stefferud}}
** {{harvc |last=Stout |first=P. R. |last2=Johnson |year=1957 |c=Trace Elements |url=//archive.org/stream/yoa1957#page/n167/mode/1up |in=Stefferud}}
** {{harvc |last=Wadleigh |first=C. H.|year=1957 |c=Growth of Plants |url=//archive.org/stream/yoa1957#page/n57/mode/1up |in=Stefferud |ignore-err=yes}}
</nowiki>|renders=First information.{{sfn|George|Read|Johnson|Ferber|1957}} Second.<ref>{{harvnb|Stout|Johnson|1957}}</ref> Three thru five.<ref>{{harvnb|Stout|Johnson|1957}}</ref><ref>{{harvc|last=Benson|first=Ezra Taft|year=1957|chapter=Foreword|url=//archive.org/stream/yoa1957#page/n5/mode/1up|in=Stefferud|p=vi |loc=§2 |ignore-err=yes}}</ref>{{sfn|Wadleigh|1957}} Sixth.<ref>[[#Stefferud preface|Stefferud 1957]]</ref>
<!-- ==Notes== --> {{fake heading|sub=3|Notes}}
{{reflist}}
<!-- ==References== --> {{fake heading|sub=3|References}}
* {{cite book |title=Soil: The Yearbook of Agriculture 1957 |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |url=//archive.org/stream/yoa1957 |oclc=704186906 }}
** {{harvc |last=George |first=Ernest J. |last2=Read |last3=Johnson |last4=Ferber |year=1957 |contribution=Shelterbelts and Windbreaks |url=//archive.org/stream/yoa1957#page/n785/mode/1up |in=Stefferud}}
** {{harvc |last=Harper |first=V. L. |last2=Frank |last3=McQuilkin |year=1957 |contribution=Forest Practices |url=//archive.org/stream/yoa1957#page/n803/mode/1up |in=Stefferud}}
** {{harvc |last=Stefferud |first=A.|year=1957 |id=Stefferud preface |c=Preface |url=//archive.org/stream/yoa1957#page/n7/mode/1up |in=Stefferud}}
** {{harvc |last=Stout |first=P. R. |last2=Johnson |year=1957 |c=Trace Elements |url=//archive.org/stream/yoa1957#page/n167/mode/1up |in=Stefferud}}
** {{harvc |last=Wadleigh |first=C. H.|year=1957 |c=Growth of Plants |url=//archive.org/stream/yoa1957#page/n57/mode/1up |in=Stefferud |ignore-err=yes}}}}<!-- Template:Mra -->
<!--
====Example bibliography section====
* {{cite book |title=Soil: The Yearbook of Agriculture 1957 |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |url=//archive.org/stream/yoa1957#page/n2/mode/1up |oclc=704186906 }}
** {{harvc |last=George |first=Ernest J. |last2=Read |last3=Johnson |last4=Ferber |year=1957 |contribution=Shelterbelts and Windbreaks |url=//archive.org/stream/yoa1957#page/n785/mode/1up |in=Stefferud |ignore-err=yes}}
** {{harvc |last=Harper |first=V. L. |last2=Frank |last3=McQuilkin |year=1957 |contribution=Forest Practices and Productivity |url=//archive.org/stream/yoa1957#page/n803/mode/1up |in=Stefferud |ignore-err=yes}}
** {{harvc |last=Stefferud |first=A.|year=1957 |id=Stefferud preface |c=Preface |url=//archive.org/stream/yoa1957#page/n7/mode/1up |in=Stefferud |ignore-err=yes}}
** {{harvc |last=Stout |first=P. R. |last2=Johnson |year=1957 |c=Trace Elements |url=//archive.org/stream/yoa1957#page/n167/mode/1up |in=Stefferud |ignore-err=yes}}
** {{harvc |last=Wadleigh |first=C. H.|year=1957 |c=Growth of Plants |url=//archive.org/stream/yoa1957#page/n57/mode/1up |in=Stefferud |ignore-err=yes}}
-->
====More than one contribution====
There are times when an author or authors will have contributed more than once to a work. When this occurs, it is necessary to disambiguate the CITEREF links from the {{tlx|harv}} or {{tlx|sfn}} templates to the CITEREF id of the appropriate {{tlx|harvc}} template.
:{{tlx|harv|Author|YYYYa}} → {{tlx|harvc|Author|Contribution 1|YYYYa}} → {{tlx|citation|...}}}
:{{tlx|harv|Author|YYYYb}} → {{tlx|harvc|Author|Contribution 2|YYYYb}} ↑
In this example, author David Hunt contributed two appendices to ''Christmas Cacti: The Genus ''Schlumbergera'' and Its Hybrids''.
There are two {{tlx|harvnb}} templates that are disambiguated:
:<code><nowiki>{{harvnb |Hunt |1995a}}</nowiki></code> → Hunt 1995a
:<code><nowiki>{{harvnb |Hunt |1995b}}</nowiki></code> → Hunt 1995b
These link to two {{tlx|harvc}} templates which use {{para|anchor-year}} for their CITEREF id and for the date in the {{tlx|harvc}} rendering as a visual aid for readers:
{{markup|
<nowiki>{{harvnb |Hunt |1995a}}; {{harvnb |Hunt |1995b}}.
<!-- ==References== --> {{fake heading|sub=3|References}}
* {{Citation |last=McMillan |first=AJS |last2=Horobin |first2=JF |year=1995 |title=Christmas Cacti: The Genus ''Schlumbergera'' and Its Hybrids |edition=p/b |publication-place=Sherbourne, UK |publisher=David Hunt |isbn=978-0-9517234-6-3}}
** {{harvc |in=McMillan |in2=Horobin |last=Hunt |first=David |c=Appendix I Names of the species |year=1995 |anchor-year=1995a |mode=cs2 |nb=yes}}
** {{harvc |in=McMillan |in2=Horobin |last=Hunt |first=David |c=Appendix III Excerpts from a Brazilian diary |year=1995 |anchor-year=1995b |mode=cs2 |nb=yes |ignore-err=yes}}
</nowiki>|{{harvnb |Hunt |1995a}}; {{harvnb |Hunt |1995b}}.
<!-- ==References== --> {{fake heading|sub=3|References}}
* {{Citation |last=McMillan |first=AJS |last2=Horobin |first2=JF |year=1995 |title=Christmas Cacti: The Genus ''Schlumbergera'' and Its Hybrids |edition=p/b |publication-place=Sherbourne, UK |publisher=David Hunt |isbn=978-0-9517234-6-3}}
** {{harvc |in=McMillan |in2=Horobin |last=Hunt |first=David |c=Appendix I Names of the species |year=1995 |anchor-year=1995a |mode=cs2 |nb=yes}}
** {{harvc |in=McMillan |in2=Horobin |last=Hunt |first=David |c=Appendix III Excerpts from a Brazilian diary |year=1995 |anchor-year=1995b |mode=cs2 |nb=yes |ignore-err=yes}}}}<!-- Template:Mra -->
<!--
There are two {{tlx|harvnb}} templates that are disambiguated:
:<code><nowiki>{{harvnb |Hunt |1995a}}</nowiki></code> → {{harvnb |Hunt |1995a}}
:<code><nowiki>{{harvnb |Hunt |1995b}}</nowiki></code> → {{harvnb |Hunt |1995b}}
These link to two {{tlx|harvc}} templates which use {{para|anchor-year}} for their CITEREF id and for the date in the {{tlx|harvc}} rendering as a visual aid for readers:
*<code><nowiki>{{harvc |in=McMillan |in2=Horobin |last=Hunt |first=David |c=Appendix I Names and synonyms of the species, subspecies and interspecific hybrids |year=1995 |anchor-year=1995a |mode=cs2 |nb=yes}}</nowiki></code>
*:{{harvc |in=McMillan |in2=Horobin |last=Hunt |first=David |c=Appendix I Names and synonyms of the species, subspecies and interspecific hybrids |year=1995 |anchor-year=1995a |mode=cs2 |nb=yes |ignore-err=yes}}
*<code><nowiki>{{harvc |in=McMillan |in2=Horobin |last=Hunt |first=David |c=Appendix III Excerpts from a Brazilian diary |year=1995 |anchor-year=1995b |mode=cs2 |nb=yes}}</nowiki></code>
*:{{harvc |in=McMillan |in2=Horobin |last=Hunt |first=David |c=Appendix III Excerpts from a Brazilian diary |year=1995 |anchor-year=1995b |mode=cs2 |nb=yes |ignore-err=yes}}
and the single {{tlx|citation}} template:
*<code><nowiki>{{Citation |last=McMillan |first=A. J. S. |last2=Horobin |first2=J. F. |year=1995 |title=Christmas Cacti: The Genus ''Schlumbergera'' and Its Hybrids |edition=p/b |publication-place=Sherbourne, Dorset, UK |publisher=David Hunt |isbn=978-0-9517234-6-3}}</nowiki></code>
*:{{Citation |last=McMillan |first=A. J. S. |last2=Horobin |first2=J. F. |year=1995 |title=Christmas Cacti: The Genus ''Schlumbergera'' and Its Hybrids |edition=p/b |publication-place=Sherbourne, Dorset, UK |publisher=David Hunt |isbn=978-0-9517234-6-3}}
-->
==Error messages==
{{tlx|harvc}} emits these error messages:<!--
:<span style="font-size:100%" class="error">harvc: {{para|anchor-year|plain=yes}} missing dab.</span>
::when used, {{para|anchor-year}} must include a single, lowercase letter disambiguator -->
:<span style="font-size:100%" class="error">harvc: author missing from source list.</span>
::the source list parameters {{para|in1}}, {{para|in2}}, {{para|in3}}, and {{para|in4}} form the template's <code>CITEREF</code> link to the full citation. All are not required but must be used in order without numerical gaps.
:<span style="font-size:100%" class="error">harvc: invalid {{para|anchor-year|plain=yes}}.</span>
::when used, {{para|anchor-year}} must be a three- or four-digit number and must have a lowercase <code>CITEREF</code> disambiguator. When the source does not have an identifiable year, use {{para|anchor-year|n.d.{{var|l}}}} or {{para|anchor-year|nd{{var|l}}}} with lowercase <code>CITEREF</code> disambiguator.
:<span style="font-size:100%" class="error">harvc: invalid {{para|display-authors|plain=yes}}.</span>
::the value assigned to {{para|display-authors}} must be a number greater than 0 or the keyword <code>etal</code>
:<span style="font-size:100%" class="error">harvc: invalid {{para|year|plain=yes}}.</span>
::{{para|year}} is an integral part of the template's <code>CITEREF</code> anchor and link. The value of {{para|year}} must be a three- or four-digit number with an optional lowercase <code>CITEREF</code> disambiguator. When the source does not have an identifiable year, use {{para|year|n.d.}} or {{para|year|nd}}.
:<span style="font-size:100%" class="error">harvc: missing {{para|year|plain=yes}}.</span>
::{{para|year}} is missing; the parameter is required.
:<span style="font-size:100%" class="error">harvc: no authors in contributor list.</span>
::this error message indicates that {{tlx|harvc}} can't find any of {{para|last}}, {{para|last1}}, {{para|author}} or {{para|author1}} with an assigned value and so cannot make a usable <code>CITEREF</code> anchor. Add at least one of the listed parameters.
:<span style="font-size:100%" class="error">harvc: required contribution is missing.</span>
::this error message indicates that {{tlx|harvc}} can't find any of {{para|c}}, {{para|chapter}}, or {{para|contribution}} with an assigned value
:<span style="font-size:100%" class="error">harvc: required {{para|id|plain=yes}} parameter missing.</span>
::this error message is emitted when the {{tlx|harvc}} template's <code>CITEREF</code> anchor identifier would conflict with the long-form citation's <code>CITEREF</code> anchor identifier. See [[#Avoiding circular reference|Examples]]
:<span style="font-size:100%" class="error">harvc: {{para|year|plain=yes}} / {{para|anchor-year|plain=yes}} mismatch.</span>
::the year portion of {{para|anchor-year|YYYY{{var|l}}}} must match the year given in {{para|year|YYYY}}
<includeonly>{{Sandbox other||
<!-- Categories below this line, please; interwikis at Wikidata -->
[[Category:Citation utility templates]]
}}</includeonly>
4rcvahp6633lebx3h120cb9hoe8zt40
801813
801812
2022-08-20T15:36:02Z
en>SamuelRiv
0
fix errors in main doc with ignore-err=yes (like I should have checked for initially), and clear the old commented-out courtesy code
801813
wikitext
text/x-wiki
{{Documentation subpage}}
<!-- Place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
{{lua|Module:Harvc}}
{{uses TemplateStyles|Module:Citation/CS1/styles.css|noprotcat=yes}}
This template is a citation hybrid that has characteristics of long-form [[Help:Citation Style 1|cs1]] and [[Help:Citation Style 2|cs2]], of short-form {{tlx|sfn}} and of the {{tlx|harv}} families of templates. Its purpose is to provide a method that allows editors to refer to a contribution or chapter in a larger work when more than a few such referrals are required. {{tlx|harvc}} is not a substitute for a properly constructed citation.
Short-form templates {{tlx|sfn}} and {{tlx|harv}} are often used to link from an article's references section to a long-form cs1|2 template in a bibliography section:
:{{tlx|harv}} → {{tlx|cite book}}
It is not uncommon for a source to have multiple contributors. When it is necessary to refer to multiple contributions in the same source, repeating all of the bibliographic details in multiple long-form citation templates adds to references-section clutter. {{tlx|harvc}} is designed to hold only the detail necessary to identify a contribution and link to the enclosing work's long-form citation where all of the bibliographic detail can be found:
:{{tlx|harv}} → {{tlx|harvc}} → {{tlx|cite book}}
== Usage ==
The minimal form is:
:<code><nowiki>{{harvc |last=contributor name |year=publication year |c=contribution title |in=source editor/author name}}</nowiki></code>
According to the comments in [[Module:Harvc]], mistaken {{red|Harvc error: no target:}} error messages may be produced when the template is nested in other templates as on documentation pages. The otherwise undocumented parameter, {{para|ignore-err|yes}}, can be added to prevent this.
===Parameters===
{{tlx|harvc}} creates a <code>CITEREF</code> anchor from one to four contribution or chapter author surnames ({{para|last''n''}}) and the value in {{para|year}}. This allows {{tlx|harvc}} to be the target of a link created by {{tlx|sfn}} or {{tlx|harv}} family templates. From {{para|in{{var|n}}}} and {{para|year}}, {{tlx|harvc}} creates a CITEREF link similar to those created by {{tlx|harvnb}} and {{tlx|sfn}}
: '''|anchor-year=''' – optional, for use for author(s) with more than one contribution to the work; requires CITEREF disambiguator; see [[#More than one contribution|Examples]]
: '''|author-link=''' – optional, title of existing Wikipedia article about the first contributor—not the contributor's website; do not wikilink; alias: '''|author-link1='''
:: '''|author-link''n''=''' – optional, title of existing Wikipedia article about contributor''n''; choose ''n'' to match ''n'' in '''|last''n''='''
: '''|author-mask=''m''''' – optional, replaces name of the first contributor with ''m'' (commonly 2) em dashes; alias: '''|author-mask1='''
:: '''|author-mask''n''=''m''''' – optional, replaces name of contributor''n'' with ''m'' em dashes; choose ''n'' to match ''n'' in '''|last''n''='''
:: '''|author-mask{{var|n}}=<{{var|text}}>''' – optional, replaces name of contributor''n'' with <{{var|text}}>
: '''|c=''' – required, the title of chapter or contribution; rendered quoted in upright font; aliases: '''|chapter=''', '''|contribution='''
: '''|display-authors=''' – optional, defines how {{tlx|harvc}} displays the contributor list; ignored when '''|name-list-style=harv''':
:: {{para|display-authors}} – when empty or omitted, displays all contributor names in last/first format
:: {{para|display-authors|{{var|n}}}} – displays ''n'' contributor names in last/first format; appends et al. when ''n'' is less than the number of contributors included in the template
:: {{para|display-authors|etal}} – displays all contributor names in last/first format and appends et al.
: '''|first=''' – optional, first contributor's given or first name; alias: '''|first1='''
:: '''|first''n''=''' – optional, contributor''n'' given or first name; ''n'' begins at 2 and increases by 1 for each additional '''|first''n''='''
: '''|id=''' – required when {{para|last1}}-{{para|last4}} are the same as {{para|in1}}-{{para|in4}}; otherwise optional. See [[#Avoiding circular reference|Examples]]
: '''|in=''' – required, surname or last name of first editor or author of the work that includes the contribution; aliases: '''|in1='''
: '''|in2=''' – optional, surname or last name of second editor or author
: '''|in3=''' – optional, surname or last name of third editor or author
: '''|in4=''' – optional, surname or last name of fourth editor or author
: '''|last=''' – required, surname or last name of first author; aliases: '''|last1='''
:: '''|last''n''=''' – optional, contributor''n'' surname or last name; ''n'' begins at 2 and increases by 1 for each additional '''|last''n''=''';
: '''|loc=''' – optional, other location identifier, displays after {{para|p}} or {{para|pp}}
: '''|mode=''' – controls rendered display to match that of adjacent CS1 or CS2 citations; defaults to CS1 style
:: '''|mode=cs2''' – mimic {{tlx|citation}} style (comma separators, no terminal punctuation, static text not capitalized)
: '''|name-list-style=''' – optional, controls contributor name list display style
:: '''|name-list-style=harv''' – mimic {{tlx|sfn}} or {{tlx|harv}} format (one to four last names); overrides '''|display-authors='''
:: '''|name-list-style=amp''' – inserts an ampersand between the last two contributor names
: '''|nb=''' – optional, when set to <code>yes</code>, instructs {{tlx|harvc}} to render source link without parentheses around the year; same format as that produced by {{tlx|harvnb}}
: '''|p=''' – optional, single page number where cited material can be found; aliases: '''|page='''
: '''|pp=''' – optional, multiple page numbers, page ranges, etc where cited material can be found; aliases: '''|pages='''
: '''|ps=''' – optional, sets terminal punctuation; default is full stop; overrides '''|mode=cs2'''; aliases: '''|postscript='''
:: '''|ps=none''' – renders output without terminal punctuation
: '''|url=''' – optional, URL of an online location where the text of the contribution can be found; aliases: '''|chapter-url''', '''|contribution-url'''
: '''|url-access=''' – optional, use when URL links to a source behind a registration barrier or paywall; inserts [[Help:Citation_Style_1#Registration_or_subscription_required|cs1{{pipe}}2 access icon]]; accepted values are: <code>limited</code>, <code>registration</code>, <code>subscription</code>
: '''|year=''' – required, publication year of the work that includes the contribution
===Examples===
When a Wikipedia article makes reference to a work that contains multiple chapters by different authors, bibliographies and reference sections can look rather cluttered:
* {{cite book |last=George |first=Ernest J. |last2=Read |first2=Ralph A. |last3=Johnson |first3=R. W. |last4=Ferber |first4=A. E. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Shelterbelts and Windbreaks |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=//archive.org/stream/yoa1957#page/n785/mode/1up |oclc=704186906}}
* {{cite book |last=Harper |first=V. L. |last2=Frank |first2=Bernard |last3=McQuilkin |first3=W. E. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Forest Practices and Productivity |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=//archive.org/stream/yoa1957#page/n803/mode/1up |oclc=704186906}}
* {{cite book |last=Stout |first=P. R. |last2=Johnson |first2=C. M. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Trace Elements |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=//archive.org/stream/yoa1957#page/n167/mode/1up |oclc=704186906}}
* {{cite book |last=Wadleigh |first=C. H. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Growth of Plants |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=//archive.org/stream/yoa1957#page/n57/mode/1up |oclc=704186906}}
As the list grows longer, the look becomes more cluttered with the unnecessarily repeated detail of full-length citations. With {{tlx|harvc}} editors can link to shorter, less detailed contribution citations using standard implementations of {{tlx|sfn}} templates and {{tlx|harv}} templates (and also wrapped in {{tag|ref}} tags with {{tlx|harvnb}}). {{tlx|harvc}} may also be wrapped in {{tag|ref}} tags so that it becomes part of the article's References section. See full example below.
====Avoiding circular reference====
It may sometimes be necessary to cite a contribution of a source's editor or author such that {{para|last1}} through {{para|last4}} are the same as {{para|in1}} through {{para|in4}}, an editor's preface for example. Such citations can, depending on placement, cause {{tlx|sfn}} or {{tlx|harv}}-family references to link directly to the citation instead of to the {{tlx|harvc}} template, or cause circular links ({{tlx|harvc}} linking to itself because its <code>CITEREF</code> anchor identifier is the same as the citation's <code>CITEREF</code> anchor identifier). If {{para|id}} is set, {{tlx|harvc}} will use it as an anchor identifier; if {{para|id}} is not set, {{tlx|harvc}} will emit an error message when {{para|last1}} through {{para|last4}} are the same as {{para|in1}} through {{para|in4}}.
For example, to reference an editor's preface from article text, create a wikilink inside {{tag|ref}} tags:
:<code><nowiki><ref>[[#Stefferud preface|Stefferud 1957]]</ref></nowiki></code>
Write a {{tlx|harvc}} template with {{para|id|Stefferud preface}}
:<code><nowiki>{{harvc |last=Stefferud |first=A.|year=1957 |id=Stefferud preface |c=Preface |url=//archive.org/stream/yoa1957#page/n7/mode/1up |in=Stefferud}}</nowiki></code>
{{markupv|title=Full example:|markup=
<nowiki>First information.{{sfn|George|Read|Johnson|Ferber|1957}} Second.<ref>{{harvnb|Stout|Johnson|1957}}</ref> Three thru five.<ref>{{harvnb|Stout|Johnson|1957}}</ref><ref>{{harvc|last=Benson|first=Ezra Taft|year=1957|chapter=Foreword|url=//archive.org/stream/yoa1957#page/n5/mode/1up|in=Stefferud|p=vi |loc=§2 |ignore-err=yes}}</ref>{{sfn|Wadleigh|1957}} Sixth.<ref>[[#Stefferud preface|Stefferud 1957]]</ref>
<!-- ==Notes== --> {{fake heading|sub=3|Notes}}
{{reflist}}
<!-- ==References== --> {{fake heading|sub=3|References}}
* {{cite book |title=Soil: The Yearbook of Agriculture 1957 |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |url=//archive.org/stream/yoa1957 |oclc=704186906 }}
** {{harvc |last=George |first=Ernest J. |last2=Read |last3=Johnson |last4=Ferber |year=1957 |contribution=Shelterbelts and Windbreaks |url=//archive.org/stream/yoa1957#page/n785/mode/1up |in=Stefferud |ignore-err=yes}}
** {{harvc |last=Harper |first=V. L. |last2=Frank |last3=McQuilkin |year=1957 |contribution=Forest Practices |url=//archive.org/stream/yoa1957#page/n803/mode/1up |in=Stefferud |ignore-err=yes}}
** {{harvc |last=Stefferud |first=A.|year=1957 |id=Stefferud preface |c=Preface |url=//archive.org/stream/yoa1957#page/n7/mode/1up |in=Stefferud |ignore-err=yes}}
** {{harvc |last=Stout |first=P. R. |last2=Johnson |year=1957 |c=Trace Elements |url=//archive.org/stream/yoa1957#page/n167/mode/1up |in=Stefferud |ignore-err=yes}}
** {{harvc |last=Wadleigh |first=C. H.|year=1957 |c=Growth of Plants |url=//archive.org/stream/yoa1957#page/n57/mode/1up |in=Stefferud |ignore-err=yes}}
</nowiki>|renders=First information.{{sfn|George|Read|Johnson|Ferber|1957}} Second.<ref>{{harvnb|Stout|Johnson|1957}}</ref> Three thru five.<ref>{{harvnb|Stout|Johnson|1957}}</ref><ref>{{harvc|last=Benson|first=Ezra Taft|year=1957|chapter=Foreword|url=//archive.org/stream/yoa1957#page/n5/mode/1up|in=Stefferud|p=vi |loc=§2 |ignore-err=yes}}</ref>{{sfn|Wadleigh|1957}} Sixth.<ref>[[#Stefferud preface|Stefferud 1957]]</ref>
<!-- ==Notes== --> {{fake heading|sub=3|Notes}}
{{reflist}}
<!-- ==References== --> {{fake heading|sub=3|References}}
* {{cite book |title=Soil: The Yearbook of Agriculture 1957 |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |url=//archive.org/stream/yoa1957 |oclc=704186906 }}
** {{harvc |last=George |first=Ernest J. |last2=Read |last3=Johnson |last4=Ferber |year=1957 |contribution=Shelterbelts and Windbreaks |url=//archive.org/stream/yoa1957#page/n785/mode/1up |in=Stefferud |ignore-err=yes}}
** {{harvc |last=Harper |first=V. L. |last2=Frank |last3=McQuilkin |year=1957 |contribution=Forest Practices |url=//archive.org/stream/yoa1957#page/n803/mode/1up |in=Stefferud |ignore-err=yes}}
** {{harvc |last=Stefferud |first=A.|year=1957 |id=Stefferud preface |c=Preface |url=//archive.org/stream/yoa1957#page/n7/mode/1up |in=Stefferud |ignore-err=yes}}
** {{harvc |last=Stout |first=P. R. |last2=Johnson |year=1957 |c=Trace Elements |url=//archive.org/stream/yoa1957#page/n167/mode/1up |in=Stefferud |ignore-err=yes}}
** {{harvc |last=Wadleigh |first=C. H.|year=1957 |c=Growth of Plants |url=//archive.org/stream/yoa1957#page/n57/mode/1up |in=Stefferud |ignore-err=yes}}}}<!-- Template:Mra -->
Note again the parameter <code><nowiki>ignore-err=yes</nowiki></code> is simply to suppress errors that occur when this template is embedded, such as in documentation. It should not be used otherwise.
====More than one contribution====
There are times when an author or authors will have contributed more than once to a work. When this occurs, it is necessary to disambiguate the CITEREF links from the {{tlx|harv}} or {{tlx|sfn}} templates to the CITEREF id of the appropriate {{tlx|harvc}} template.
:{{tlx|harv|Author|YYYYa}} → {{tlx|harvc|Author|Contribution 1|YYYYa}} → {{tlx|citation|...}}}
:{{tlx|harv|Author|YYYYb}} → {{tlx|harvc|Author|Contribution 2|YYYYb}} ↑
In this example, author David Hunt contributed two appendices to ''Christmas Cacti: The Genus ''Schlumbergera'' and Its Hybrids''.
There are two {{tlx|harvnb}} templates that are disambiguated:
:<code><nowiki>{{harvnb |Hunt |1995a}}</nowiki></code> → Hunt 1995a
:<code><nowiki>{{harvnb |Hunt |1995b}}</nowiki></code> → Hunt 1995b
These link to two {{tlx|harvc}} templates which use {{para|anchor-year}} for their CITEREF id and for the date in the {{tlx|harvc}} rendering as a visual aid for readers:
{{markup|
<nowiki>{{harvnb |Hunt |1995a}}; {{harvnb |Hunt |1995b}}.
<!-- ==References== --> {{fake heading|sub=3|References}}
* {{Citation |last=McMillan |first=AJS |last2=Horobin |first2=JF |year=1995 |title=Christmas Cacti: The Genus ''Schlumbergera'' and Its Hybrids |edition=p/b |publication-place=Sherbourne, UK |publisher=David Hunt |isbn=978-0-9517234-6-3}}
** {{harvc |in=McMillan |in2=Horobin |last=Hunt |first=David |c=Appendix I Names of the species |year=1995 |anchor-year=1995a |mode=cs2 |nb=yes |ignore-err=yes}}
** {{harvc |in=McMillan |in2=Horobin |last=Hunt |first=David |c=Appendix III Excerpts from a Brazilian diary |year=1995 |anchor-year=1995b |mode=cs2 |nb=yes |ignore-err=yes}}
</nowiki>|{{harvnb |Hunt |1995a}}; {{harvnb |Hunt |1995b}}.
<!-- ==References== --> {{fake heading|sub=3|References}}
* {{Citation |last=McMillan |first=AJS |last2=Horobin |first2=JF |year=1995 |title=Christmas Cacti: The Genus ''Schlumbergera'' and Its Hybrids |edition=p/b |publication-place=Sherbourne, UK |publisher=David Hunt |isbn=978-0-9517234-6-3}}
** {{harvc |in=McMillan |in2=Horobin |last=Hunt |first=David |c=Appendix I Names of the species |year=1995 |anchor-year=1995a |mode=cs2 |nb=yes |ignore-err=yes}}
** {{harvc |in=McMillan |in2=Horobin |last=Hunt |first=David |c=Appendix III Excerpts from a Brazilian diary |year=1995 |anchor-year=1995b |mode=cs2 |nb=yes |ignore-err=yes}}}}<!-- Template:Mra -->
==Error messages==
{{tlx|harvc}} emits these error messages:<!--
:<span style="font-size:100%" class="error">harvc: {{para|anchor-year|plain=yes}} missing dab.</span>
::when used, {{para|anchor-year}} must include a single, lowercase letter disambiguator -->
:<span style="font-size:100%" class="error">harvc: author missing from source list.</span>
::the source list parameters {{para|in1}}, {{para|in2}}, {{para|in3}}, and {{para|in4}} form the template's <code>CITEREF</code> link to the full citation. All are not required but must be used in order without numerical gaps.
:<span style="font-size:100%" class="error">harvc: invalid {{para|anchor-year|plain=yes}}.</span>
::when used, {{para|anchor-year}} must be a three- or four-digit number and must have a lowercase <code>CITEREF</code> disambiguator. When the source does not have an identifiable year, use {{para|anchor-year|n.d.{{var|l}}}} or {{para|anchor-year|nd{{var|l}}}} with lowercase <code>CITEREF</code> disambiguator.
:<span style="font-size:100%" class="error">harvc: invalid {{para|display-authors|plain=yes}}.</span>
::the value assigned to {{para|display-authors}} must be a number greater than 0 or the keyword <code>etal</code>
:<span style="font-size:100%" class="error">harvc: invalid {{para|year|plain=yes}}.</span>
::{{para|year}} is an integral part of the template's <code>CITEREF</code> anchor and link. The value of {{para|year}} must be a three- or four-digit number with an optional lowercase <code>CITEREF</code> disambiguator. When the source does not have an identifiable year, use {{para|year|n.d.}} or {{para|year|nd}}.
:<span style="font-size:100%" class="error">harvc: missing {{para|year|plain=yes}}.</span>
::{{para|year}} is missing; the parameter is required.
:<span style="font-size:100%" class="error">harvc: no authors in contributor list.</span>
::this error message indicates that {{tlx|harvc}} can't find any of {{para|last}}, {{para|last1}}, {{para|author}} or {{para|author1}} with an assigned value and so cannot make a usable <code>CITEREF</code> anchor. Add at least one of the listed parameters.
:<span style="font-size:100%" class="error">harvc: required contribution is missing.</span>
::this error message indicates that {{tlx|harvc}} can't find any of {{para|c}}, {{para|chapter}}, or {{para|contribution}} with an assigned value
:<span style="font-size:100%" class="error">harvc: required {{para|id|plain=yes}} parameter missing.</span>
::this error message is emitted when the {{tlx|harvc}} template's <code>CITEREF</code> anchor identifier would conflict with the long-form citation's <code>CITEREF</code> anchor identifier. See [[#Avoiding circular reference|Examples]]
:<span style="font-size:100%" class="error">harvc: {{para|year|plain=yes}} / {{para|anchor-year|plain=yes}} mismatch.</span>
::the year portion of {{para|anchor-year|YYYY{{var|l}}}} must match the year given in {{para|year|YYYY}}
<includeonly>{{Sandbox other||
<!-- Categories below this line, please; interwikis at Wikidata -->
[[Category:Citation utility templates]]
}}</includeonly>
m6ehn8kmoxkgvx80re8mi12ovrruybe
801814
801813
2022-12-29T22:56:09Z
en>Olivaw-Daneel
0
/* Examples */ this really needs an "in a nutshell" example; fix harv errors
801814
wikitext
text/x-wiki
{{Documentation subpage}}
<!-- Place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
{{lua|Module:Harvc}}
{{uses TemplateStyles|Module:Citation/CS1/styles.css|noprotcat=yes}}
This template is a citation hybrid that has characteristics of long-form [[Help:Citation Style 1|cs1]] and [[Help:Citation Style 2|cs2]], of short-form {{tlx|sfn}} and of the {{tlx|harv}} families of templates. Its purpose is to provide a method that allows editors to refer to a contribution or chapter in a larger work when more than a few such referrals are required. {{tlx|harvc}} is not a substitute for a properly constructed citation.
Short-form templates {{tlx|sfn}} and {{tlx|harv}} are often used to link from an article's references section to a long-form cs1|2 template in a bibliography section:
:{{tlx|harv}} → {{tlx|cite book}}
It is not uncommon for a source to have multiple contributors. When it is necessary to refer to multiple contributions in the same source, repeating all of the bibliographic details in multiple long-form citation templates adds to references-section clutter. {{tlx|harvc}} is designed to hold only the detail necessary to identify a contribution and link to the enclosing work's long-form citation where all of the bibliographic detail can be found:
:{{tlx|harv}} → {{tlx|harvc}} → {{tlx|cite book}}
== Usage ==
The minimal form is:
:<code><nowiki>{{harvc |last=contributor name |year=publication year |c=contribution title |in=source editor/author name}}</nowiki></code>
According to the comments in [[Module:Harvc]], mistaken {{red|Harvc error: no target:}} error messages may be produced when the template is nested in other templates as on documentation pages. The otherwise undocumented parameter, {{para|ignore-err|yes}}, can be added to prevent this.
===Parameters===
{{tlx|harvc}} creates a <code>CITEREF</code> anchor from one to four contribution or chapter author surnames ({{para|last''n''}}) and the value in {{para|year}}. This allows {{tlx|harvc}} to be the target of a link created by {{tlx|sfn}} or {{tlx|harv}} family templates. From {{para|in{{var|n}}}} and {{para|year}}, {{tlx|harvc}} creates a CITEREF link similar to those created by {{tlx|harvnb}} and {{tlx|sfn}}
: '''|anchor-year=''' – optional, for use for author(s) with more than one contribution to the work; requires CITEREF disambiguator; see [[#More than one contribution|Examples]]
: '''|author-link=''' – optional, title of existing Wikipedia article about the first contributor—not the contributor's website; do not wikilink; alias: '''|author-link1='''
:: '''|author-link''n''=''' – optional, title of existing Wikipedia article about contributor''n''; choose ''n'' to match ''n'' in '''|last''n''='''
: '''|author-mask=''m''''' – optional, replaces name of the first contributor with ''m'' (commonly 2) em dashes; alias: '''|author-mask1='''
:: '''|author-mask''n''=''m''''' – optional, replaces name of contributor''n'' with ''m'' em dashes; choose ''n'' to match ''n'' in '''|last''n''='''
:: '''|author-mask{{var|n}}=<{{var|text}}>''' – optional, replaces name of contributor''n'' with <{{var|text}}>
: '''|c=''' – required, the title of chapter or contribution; rendered quoted in upright font; aliases: '''|chapter=''', '''|contribution='''
: '''|display-authors=''' – optional, defines how {{tlx|harvc}} displays the contributor list; ignored when '''|name-list-style=harv''':
:: {{para|display-authors}} – when empty or omitted, displays all contributor names in last/first format
:: {{para|display-authors|{{var|n}}}} – displays ''n'' contributor names in last/first format; appends et al. when ''n'' is less than the number of contributors included in the template
:: {{para|display-authors|etal}} – displays all contributor names in last/first format and appends et al.
: '''|first=''' – optional, first contributor's given or first name; alias: '''|first1='''
:: '''|first''n''=''' – optional, contributor''n'' given or first name; ''n'' begins at 2 and increases by 1 for each additional '''|first''n''='''
: '''|id=''' – required when {{para|last1}}-{{para|last4}} are the same as {{para|in1}}-{{para|in4}}; otherwise optional. See [[#Avoiding circular reference|Examples]]
: '''|in=''' – required, surname or last name of first editor or author of the work that includes the contribution; aliases: '''|in1='''
: '''|in2=''' – optional, surname or last name of second editor or author
: '''|in3=''' – optional, surname or last name of third editor or author
: '''|in4=''' – optional, surname or last name of fourth editor or author
: '''|last=''' – required, surname or last name of first author; aliases: '''|last1='''
:: '''|last''n''=''' – optional, contributor''n'' surname or last name; ''n'' begins at 2 and increases by 1 for each additional '''|last''n''=''';
: '''|loc=''' – optional, other location identifier, displays after {{para|p}} or {{para|pp}}
: '''|mode=''' – controls rendered display to match that of adjacent CS1 or CS2 citations; defaults to CS1 style
:: '''|mode=cs2''' – mimic {{tlx|citation}} style (comma separators, no terminal punctuation, static text not capitalized)
: '''|name-list-style=''' – optional, controls contributor name list display style
:: '''|name-list-style=harv''' – mimic {{tlx|sfn}} or {{tlx|harv}} format (one to four last names); overrides '''|display-authors='''
:: '''|name-list-style=amp''' – inserts an ampersand between the last two contributor names
: '''|nb=''' – optional, when set to <code>yes</code>, instructs {{tlx|harvc}} to render source link without parentheses around the year; same format as that produced by {{tlx|harvnb}}
: '''|p=''' – optional, single page number where cited material can be found; aliases: '''|page='''
: '''|pp=''' – optional, multiple page numbers, page ranges, etc where cited material can be found; aliases: '''|pages='''
: '''|ps=''' – optional, sets terminal punctuation; default is full stop; overrides '''|mode=cs2'''; aliases: '''|postscript='''
:: '''|ps=none''' – renders output without terminal punctuation
: '''|url=''' – optional, URL of an online location where the text of the contribution can be found; aliases: '''|chapter-url''', '''|contribution-url'''
: '''|url-access=''' – optional, use when URL links to a source behind a registration barrier or paywall; inserts [[Help:Citation_Style_1#Registration_or_subscription_required|cs1{{pipe}}2 access icon]]; accepted values are: <code>limited</code>, <code>registration</code>, <code>subscription</code>
: '''|year=''' – required, publication year of the work that includes the contribution
===Examples===
====Basic example====
{| class=wikitable style="width: 100%"
! scope=col style="width: 50%" | Without {{tl|harvc}}
! scope=col style="width: 50%" | With {{tl|harvc}}
|-
|
* {{cite book |last=Doe |first=John |year=1990 |chapter=Chapter 1 |editor-last=Moe |editor-first=Mary |title=The Book of Knowledge |publisher=University Press |ref=none}}
* {{cite book |last=Poe |first=Jane |year=1990 |chapter=Chapter 2 |editor-last=Moe |editor-first=Mary |title=The Book of Knowledge |publisher=University Press |ref=none}}
* {{cite book |last=Roe |first=Robert |year=1990 |chapter=Chapter 3 |editor-last=Moe |editor-first=Mary |title=The Book of Knowledge |publisher=University Press |ref=none}}
|
* {{cite book |editor-last=Moe |editor-first=Mary |year=1990 |title=The Book of Knowledge |publisher=University Press}}
** {{harvc |last=Doe |first=John |c=Chapter 1 |in=Moe |year=1990 |id=none}}
** {{harvc |last=Poe |first=Jane |c=Chapter 2 |in=Moe |year=1990 |id=none}}
** {{harvc |last=Roe |first=Robert |c=Chapter 3 |in=Moe |year=1990 |id=none}}
|}
{| class=wikitable style="width: 100%"
|+ Markup
|-
| style="width: 50%" |
<nowiki>
* {{cite book |last=Doe |first=John |year=1990 |chapter=Chapter 1 |editor-last=Moe |editor-first=Mary |title=The Book of Knowledge |publisher=University Press}}
* {{cite book |last=Poe |first=Jane |year=1990 |chapter=Chapter 2 |editor-last=Moe |editor-first=Mary |title=The Book of Knowledge |publisher=University Press}}
* {{cite book |last=Roe |first=Robert |year=1990 |chapter=Chapter 3 |editor-last=Moe |editor-first=Mary |title=The Book of Knowledge |publisher=University Press}}
</nowiki>
| style="width: 50%|
<nowiki>
* {{cite book |editor-last=Moe |editor-first=Mary |year=1990 |title=The Book of Knowledge |publisher=University Press}}
** {{harvc |last=Doe |first=John |c=Chapter 1 |in=Moe |year=1990}}
** {{harvc |last=Poe |first=Jane |c=Chapter 2 |in=Moe |year=1990}}
** {{harvc |last=Roe |first=Robert |c=Chapter 3 |in=Moe |year=1990}}
</nowiki>
|}
====Detailed example====
When a Wikipedia article makes reference to a work that contains multiple chapters by different authors, bibliographies and reference sections can look rather cluttered:
* {{cite book |last=George |first=Ernest J. |last2=Read |first2=Ralph A. |last3=Johnson |first3=R. W. |last4=Ferber |first4=A. E. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Shelterbelts and Windbreaks |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=//archive.org/stream/yoa1957#page/n785/mode/1up |oclc=704186906 |ref=none}}
* {{cite book |last=Harper |first=V. L. |last2=Frank |first2=Bernard |last3=McQuilkin |first3=W. E. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Forest Practices and Productivity |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=//archive.org/stream/yoa1957#page/n803/mode/1up |oclc=704186906 |ref=none}}
* {{cite book |last=Stout |first=P. R. |last2=Johnson |first2=C. M. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Trace Elements |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=//archive.org/stream/yoa1957#page/n167/mode/1up |oclc=704186906 |ref=none}}
* {{cite book |last=Wadleigh |first=C. H. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Growth of Plants |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=//archive.org/stream/yoa1957#page/n57/mode/1up |oclc=704186906 |ref=none}}
As the list grows longer, the look becomes more cluttered with the unnecessarily repeated detail of full-length citations. With {{tlx|harvc}} editors can link to shorter, less detailed contribution citations using standard implementations of {{tlx|sfn}} templates and {{tlx|harv}} templates (and also wrapped in {{tag|ref}} tags with {{tlx|harvnb}}). {{tlx|harvc}} may also be wrapped in {{tag|ref}} tags so that it becomes part of the article's References section. See full example below.
=====Avoiding circular reference=====
It may sometimes be necessary to cite a contribution of a source's editor or author such that {{para|last1}} through {{para|last4}} are the same as {{para|in1}} through {{para|in4}}, an editor's preface for example. Such citations can, depending on placement, cause {{tlx|sfn}} or {{tlx|harv}}-family references to link directly to the citation instead of to the {{tlx|harvc}} template, or cause circular links ({{tlx|harvc}} linking to itself because its <code>CITEREF</code> anchor identifier is the same as the citation's <code>CITEREF</code> anchor identifier). If {{para|id}} is set, {{tlx|harvc}} will use it as an anchor identifier; if {{para|id}} is not set, {{tlx|harvc}} will emit an error message when {{para|last1}} through {{para|last4}} are the same as {{para|in1}} through {{para|in4}}.
For example, to reference an editor's preface from article text, create a wikilink inside {{tag|ref}} tags:
:<code><nowiki><ref>[[#Stefferud preface|Stefferud 1957]]</ref></nowiki></code>
Write a {{tlx|harvc}} template with {{para|id|Stefferud preface}}
:<code><nowiki>{{harvc |last=Stefferud |first=A.|year=1957 |id=Stefferud preface |c=Preface |url=//archive.org/stream/yoa1957#page/n7/mode/1up |in=Stefferud}}</nowiki></code>
{{markupv|title=Full example:|markup=
<nowiki>First information.{{sfn|George|Read|Johnson|Ferber|1957}} Second.<ref>{{harvnb|Stout|Johnson|1957}}</ref> Three thru five.<ref>{{harvnb|Stout|Johnson|1957}}</ref><ref>{{harvc|last=Benson|first=Ezra Taft|year=1957|chapter=Foreword|url=//archive.org/stream/yoa1957#page/n5/mode/1up|in=Stefferud|p=vi |loc=§2 |ignore-err=yes}}</ref>{{sfn|Wadleigh|1957}} Sixth.<ref>[[#Stefferud preface|Stefferud 1957]]</ref>
<!-- ==Notes== --> {{fake heading|sub=3|Notes}}
{{reflist}}
<!-- ==References== --> {{fake heading|sub=3|References}}
* {{cite book |title=Soil: The Yearbook of Agriculture 1957 |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |url=//archive.org/stream/yoa1957 |oclc=704186906 }}
** {{harvc |last=George |first=Ernest J. |last2=Read |last3=Johnson |last4=Ferber |year=1957 |contribution=Shelterbelts and Windbreaks |url=//archive.org/stream/yoa1957#page/n785/mode/1up |in=Stefferud |ignore-err=yes}}
** {{harvc |last=Harper |first=V. L. |last2=Frank |last3=McQuilkin |year=1957 |contribution=Forest Practices |url=//archive.org/stream/yoa1957#page/n803/mode/1up |in=Stefferud |ignore-err=yes}}
** {{harvc |last=Stefferud |first=A.|year=1957 |id=Stefferud preface |c=Preface |url=//archive.org/stream/yoa1957#page/n7/mode/1up |in=Stefferud |ignore-err=yes}}
** {{harvc |last=Stout |first=P. R. |last2=Johnson |year=1957 |c=Trace Elements |url=//archive.org/stream/yoa1957#page/n167/mode/1up |in=Stefferud |ignore-err=yes}}
** {{harvc |last=Wadleigh |first=C. H.|year=1957 |c=Growth of Plants |url=//archive.org/stream/yoa1957#page/n57/mode/1up |in=Stefferud |ignore-err=yes}}
</nowiki>|renders=First information.{{sfn|George|Read|Johnson|Ferber|1957}} Second.<ref>{{harvnb|Stout|Johnson|1957}}</ref> Three thru five.<ref>{{harvnb|Stout|Johnson|1957}}</ref><ref>{{harvc|last=Benson|first=Ezra Taft|year=1957|chapter=Foreword|url=//archive.org/stream/yoa1957#page/n5/mode/1up|in=Stefferud|p=vi |loc=§2 |ignore-err=yes}}</ref>{{sfn|Wadleigh|1957}} Sixth.<ref>[[#Stefferud preface|Stefferud 1957]]</ref>
<!-- ==Notes== --> {{fake heading|sub=3|Notes}}
{{reflist}}
<!-- ==References== --> {{fake heading|sub=3|References}}
* {{cite book |title=Soil: The Yearbook of Agriculture 1957 |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |url=//archive.org/stream/yoa1957 |oclc=704186906 }}
** {{harvc |last=George |first=Ernest J. |last2=Read |last3=Johnson |last4=Ferber |year=1957 |contribution=Shelterbelts and Windbreaks |url=//archive.org/stream/yoa1957#page/n785/mode/1up |in=Stefferud |ignore-err=yes}}
** {{harvc |last=Harper |first=V. L. |last2=Frank |last3=McQuilkin |year=1957 |contribution=Forest Practices |url=//archive.org/stream/yoa1957#page/n803/mode/1up |in=Stefferud |ignore-err=yes |id=none}}
** {{harvc |last=Stefferud |first=A.|year=1957 |id=Stefferud preface |c=Preface |url=//archive.org/stream/yoa1957#page/n7/mode/1up |in=Stefferud |ignore-err=yes}}
** {{harvc |last=Stout |first=P. R. |last2=Johnson |year=1957 |c=Trace Elements |url=//archive.org/stream/yoa1957#page/n167/mode/1up |in=Stefferud |ignore-err=yes}}
** {{harvc |last=Wadleigh |first=C. H.|year=1957 |c=Growth of Plants |url=//archive.org/stream/yoa1957#page/n57/mode/1up |in=Stefferud |ignore-err=yes}}}}<!-- Template:Mra -->
Note again the parameter <code><nowiki>ignore-err=yes</nowiki></code> is simply to suppress errors that occur when this template is embedded, such as in documentation. It should not be used otherwise.
=====More than one contribution=====
There are times when an author or authors will have contributed more than once to a work. When this occurs, it is necessary to disambiguate the CITEREF links from the {{tlx|harv}} or {{tlx|sfn}} templates to the CITEREF id of the appropriate {{tlx|harvc}} template.
:{{tlx|harv|Author|YYYYa}} → {{tlx|harvc|Author|Contribution 1|YYYYa}} → {{tlx|citation|...}}}
:{{tlx|harv|Author|YYYYb}} → {{tlx|harvc|Author|Contribution 2|YYYYb}} ↑
In this example, author David Hunt contributed two appendices to ''Christmas Cacti: The Genus ''Schlumbergera'' and Its Hybrids''.
There are two {{tlx|harvnb}} templates that are disambiguated:
:<code><nowiki>{{harvnb |Hunt |1995a}}</nowiki></code> → Hunt 1995a
:<code><nowiki>{{harvnb |Hunt |1995b}}</nowiki></code> → Hunt 1995b
These link to two {{tlx|harvc}} templates which use {{para|anchor-year}} for their CITEREF id and for the date in the {{tlx|harvc}} rendering as a visual aid for readers:
{{markup|
<nowiki>{{harvnb |Hunt |1995a}}; {{harvnb |Hunt |1995b}}.
<!-- ==References== --> {{fake heading|sub=3|References}}
* {{Citation |last=McMillan |first=AJS |last2=Horobin |first2=JF |year=1995 |title=Christmas Cacti: The Genus ''Schlumbergera'' and Its Hybrids |edition=p/b |publication-place=Sherbourne, UK |publisher=David Hunt |isbn=978-0-9517234-6-3}}
** {{harvc |in=McMillan |in2=Horobin |last=Hunt |first=David |c=Appendix I Names of the species |year=1995 |anchor-year=1995a |mode=cs2 |nb=yes |ignore-err=yes}}
** {{harvc |in=McMillan |in2=Horobin |last=Hunt |first=David |c=Appendix III Excerpts from a Brazilian diary |year=1995 |anchor-year=1995b |mode=cs2 |nb=yes |ignore-err=yes}}
</nowiki>|{{harvnb |Hunt |1995a}}; {{harvnb |Hunt |1995b}}.
<!-- ==References== --> {{fake heading|sub=3|References}}
* {{Citation |last=McMillan |first=AJS |last2=Horobin |first2=JF |year=1995 |title=Christmas Cacti: The Genus ''Schlumbergera'' and Its Hybrids |edition=p/b |publication-place=Sherbourne, UK |publisher=David Hunt |isbn=978-0-9517234-6-3}}
** {{harvc |in=McMillan |in2=Horobin |last=Hunt |first=David |c=Appendix I Names of the species |year=1995 |anchor-year=1995a |mode=cs2 |nb=yes |ignore-err=yes}}
** {{harvc |in=McMillan |in2=Horobin |last=Hunt |first=David |c=Appendix III Excerpts from a Brazilian diary |year=1995 |anchor-year=1995b |mode=cs2 |nb=yes |ignore-err=yes}}}}<!-- Template:Mra -->
==Error messages==
{{tlx|harvc}} emits these error messages:<!--
:<span style="font-size:100%" class="error">harvc: {{para|anchor-year|plain=yes}} missing dab.</span>
::when used, {{para|anchor-year}} must include a single, lowercase letter disambiguator -->
:<span style="font-size:100%" class="error">harvc: author missing from source list.</span>
::the source list parameters {{para|in1}}, {{para|in2}}, {{para|in3}}, and {{para|in4}} form the template's <code>CITEREF</code> link to the full citation. All are not required but must be used in order without numerical gaps.
:<span style="font-size:100%" class="error">harvc: invalid {{para|anchor-year|plain=yes}}.</span>
::when used, {{para|anchor-year}} must be a three- or four-digit number and must have a lowercase <code>CITEREF</code> disambiguator. When the source does not have an identifiable year, use {{para|anchor-year|n.d.{{var|l}}}} or {{para|anchor-year|nd{{var|l}}}} with lowercase <code>CITEREF</code> disambiguator.
:<span style="font-size:100%" class="error">harvc: invalid {{para|display-authors|plain=yes}}.</span>
::the value assigned to {{para|display-authors}} must be a number greater than 0 or the keyword <code>etal</code>
:<span style="font-size:100%" class="error">harvc: invalid {{para|year|plain=yes}}.</span>
::{{para|year}} is an integral part of the template's <code>CITEREF</code> anchor and link. The value of {{para|year}} must be a three- or four-digit number with an optional lowercase <code>CITEREF</code> disambiguator. When the source does not have an identifiable year, use {{para|year|n.d.}} or {{para|year|nd}}.
:<span style="font-size:100%" class="error">harvc: missing {{para|year|plain=yes}}.</span>
::{{para|year}} is missing; the parameter is required.
:<span style="font-size:100%" class="error">harvc: no authors in contributor list.</span>
::this error message indicates that {{tlx|harvc}} can't find any of {{para|last}}, {{para|last1}}, {{para|author}} or {{para|author1}} with an assigned value and so cannot make a usable <code>CITEREF</code> anchor. Add at least one of the listed parameters.
:<span style="font-size:100%" class="error">harvc: required contribution is missing.</span>
::this error message indicates that {{tlx|harvc}} can't find any of {{para|c}}, {{para|chapter}}, or {{para|contribution}} with an assigned value
:<span style="font-size:100%" class="error">harvc: required {{para|id|plain=yes}} parameter missing.</span>
::this error message is emitted when the {{tlx|harvc}} template's <code>CITEREF</code> anchor identifier would conflict with the long-form citation's <code>CITEREF</code> anchor identifier. See [[#Avoiding circular reference|Examples]]
:<span style="font-size:100%" class="error">harvc: {{para|year|plain=yes}} / {{para|anchor-year|plain=yes}} mismatch.</span>
::the year portion of {{para|anchor-year|YYYY{{var|l}}}} must match the year given in {{para|year|YYYY}}
<includeonly>{{Sandbox other||
<!-- Categories below this line, please; interwikis at Wikidata -->
[[Category:Citation utility templates]]
}}</includeonly>
3ygin3brqp3jaxujmsy0eex94dldzr5
801815
801814
2022-12-29T22:57:28Z
en>Olivaw-Daneel
0
/* Basic example */ ignore-err
801815
wikitext
text/x-wiki
{{Documentation subpage}}
<!-- Place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
{{lua|Module:Harvc}}
{{uses TemplateStyles|Module:Citation/CS1/styles.css|noprotcat=yes}}
This template is a citation hybrid that has characteristics of long-form [[Help:Citation Style 1|cs1]] and [[Help:Citation Style 2|cs2]], of short-form {{tlx|sfn}} and of the {{tlx|harv}} families of templates. Its purpose is to provide a method that allows editors to refer to a contribution or chapter in a larger work when more than a few such referrals are required. {{tlx|harvc}} is not a substitute for a properly constructed citation.
Short-form templates {{tlx|sfn}} and {{tlx|harv}} are often used to link from an article's references section to a long-form cs1|2 template in a bibliography section:
:{{tlx|harv}} → {{tlx|cite book}}
It is not uncommon for a source to have multiple contributors. When it is necessary to refer to multiple contributions in the same source, repeating all of the bibliographic details in multiple long-form citation templates adds to references-section clutter. {{tlx|harvc}} is designed to hold only the detail necessary to identify a contribution and link to the enclosing work's long-form citation where all of the bibliographic detail can be found:
:{{tlx|harv}} → {{tlx|harvc}} → {{tlx|cite book}}
== Usage ==
The minimal form is:
:<code><nowiki>{{harvc |last=contributor name |year=publication year |c=contribution title |in=source editor/author name}}</nowiki></code>
According to the comments in [[Module:Harvc]], mistaken {{red|Harvc error: no target:}} error messages may be produced when the template is nested in other templates as on documentation pages. The otherwise undocumented parameter, {{para|ignore-err|yes}}, can be added to prevent this.
===Parameters===
{{tlx|harvc}} creates a <code>CITEREF</code> anchor from one to four contribution or chapter author surnames ({{para|last''n''}}) and the value in {{para|year}}. This allows {{tlx|harvc}} to be the target of a link created by {{tlx|sfn}} or {{tlx|harv}} family templates. From {{para|in{{var|n}}}} and {{para|year}}, {{tlx|harvc}} creates a CITEREF link similar to those created by {{tlx|harvnb}} and {{tlx|sfn}}
: '''|anchor-year=''' – optional, for use for author(s) with more than one contribution to the work; requires CITEREF disambiguator; see [[#More than one contribution|Examples]]
: '''|author-link=''' – optional, title of existing Wikipedia article about the first contributor—not the contributor's website; do not wikilink; alias: '''|author-link1='''
:: '''|author-link''n''=''' – optional, title of existing Wikipedia article about contributor''n''; choose ''n'' to match ''n'' in '''|last''n''='''
: '''|author-mask=''m''''' – optional, replaces name of the first contributor with ''m'' (commonly 2) em dashes; alias: '''|author-mask1='''
:: '''|author-mask''n''=''m''''' – optional, replaces name of contributor''n'' with ''m'' em dashes; choose ''n'' to match ''n'' in '''|last''n''='''
:: '''|author-mask{{var|n}}=<{{var|text}}>''' – optional, replaces name of contributor''n'' with <{{var|text}}>
: '''|c=''' – required, the title of chapter or contribution; rendered quoted in upright font; aliases: '''|chapter=''', '''|contribution='''
: '''|display-authors=''' – optional, defines how {{tlx|harvc}} displays the contributor list; ignored when '''|name-list-style=harv''':
:: {{para|display-authors}} – when empty or omitted, displays all contributor names in last/first format
:: {{para|display-authors|{{var|n}}}} – displays ''n'' contributor names in last/first format; appends et al. when ''n'' is less than the number of contributors included in the template
:: {{para|display-authors|etal}} – displays all contributor names in last/first format and appends et al.
: '''|first=''' – optional, first contributor's given or first name; alias: '''|first1='''
:: '''|first''n''=''' – optional, contributor''n'' given or first name; ''n'' begins at 2 and increases by 1 for each additional '''|first''n''='''
: '''|id=''' – required when {{para|last1}}-{{para|last4}} are the same as {{para|in1}}-{{para|in4}}; otherwise optional. See [[#Avoiding circular reference|Examples]]
: '''|in=''' – required, surname or last name of first editor or author of the work that includes the contribution; aliases: '''|in1='''
: '''|in2=''' – optional, surname or last name of second editor or author
: '''|in3=''' – optional, surname or last name of third editor or author
: '''|in4=''' – optional, surname or last name of fourth editor or author
: '''|last=''' – required, surname or last name of first author; aliases: '''|last1='''
:: '''|last''n''=''' – optional, contributor''n'' surname or last name; ''n'' begins at 2 and increases by 1 for each additional '''|last''n''=''';
: '''|loc=''' – optional, other location identifier, displays after {{para|p}} or {{para|pp}}
: '''|mode=''' – controls rendered display to match that of adjacent CS1 or CS2 citations; defaults to CS1 style
:: '''|mode=cs2''' – mimic {{tlx|citation}} style (comma separators, no terminal punctuation, static text not capitalized)
: '''|name-list-style=''' – optional, controls contributor name list display style
:: '''|name-list-style=harv''' – mimic {{tlx|sfn}} or {{tlx|harv}} format (one to four last names); overrides '''|display-authors='''
:: '''|name-list-style=amp''' – inserts an ampersand between the last two contributor names
: '''|nb=''' – optional, when set to <code>yes</code>, instructs {{tlx|harvc}} to render source link without parentheses around the year; same format as that produced by {{tlx|harvnb}}
: '''|p=''' – optional, single page number where cited material can be found; aliases: '''|page='''
: '''|pp=''' – optional, multiple page numbers, page ranges, etc where cited material can be found; aliases: '''|pages='''
: '''|ps=''' – optional, sets terminal punctuation; default is full stop; overrides '''|mode=cs2'''; aliases: '''|postscript='''
:: '''|ps=none''' – renders output without terminal punctuation
: '''|url=''' – optional, URL of an online location where the text of the contribution can be found; aliases: '''|chapter-url''', '''|contribution-url'''
: '''|url-access=''' – optional, use when URL links to a source behind a registration barrier or paywall; inserts [[Help:Citation_Style_1#Registration_or_subscription_required|cs1{{pipe}}2 access icon]]; accepted values are: <code>limited</code>, <code>registration</code>, <code>subscription</code>
: '''|year=''' – required, publication year of the work that includes the contribution
===Examples===
====Basic example====
{| class=wikitable style="width: 100%"
! scope=col style="width: 50%" | Without {{tl|harvc}}
! scope=col style="width: 50%" | With {{tl|harvc}}
|-
|
* {{cite book |last=Doe |first=John |year=1990 |chapter=Chapter 1 |editor-last=Moe |editor-first=Mary |title=The Book of Knowledge |publisher=University Press |ref=none}}
* {{cite book |last=Poe |first=Jane |year=1990 |chapter=Chapter 2 |editor-last=Moe |editor-first=Mary |title=The Book of Knowledge |publisher=University Press |ref=none}}
* {{cite book |last=Roe |first=Robert |year=1990 |chapter=Chapter 3 |editor-last=Moe |editor-first=Mary |title=The Book of Knowledge |publisher=University Press |ref=none}}
|
* {{cite book |editor-last=Moe |editor-first=Mary |year=1990 |title=The Book of Knowledge |publisher=University Press}}
** {{harvc |last=Doe |first=John |c=Chapter 1 |in=Moe |year=1990 |id=none |ignore-err=yes}}
** {{harvc |last=Poe |first=Jane |c=Chapter 2 |in=Moe |year=1990 |id=none |ignore-err=yes}}
** {{harvc |last=Roe |first=Robert |c=Chapter 3 |in=Moe |year=1990 |id=none |ignore-err=yes}}
|}
{| class=wikitable style="width: 100%"
|+ Markup
|-
| style="width: 50%" |
<nowiki>
* {{cite book |last=Doe |first=John |year=1990 |chapter=Chapter 1 |editor-last=Moe |editor-first=Mary |title=The Book of Knowledge |publisher=University Press}}
* {{cite book |last=Poe |first=Jane |year=1990 |chapter=Chapter 2 |editor-last=Moe |editor-first=Mary |title=The Book of Knowledge |publisher=University Press}}
* {{cite book |last=Roe |first=Robert |year=1990 |chapter=Chapter 3 |editor-last=Moe |editor-first=Mary |title=The Book of Knowledge |publisher=University Press}}
</nowiki>
| style="width: 50%|
<nowiki>
* {{cite book |editor-last=Moe |editor-first=Mary |year=1990 |title=The Book of Knowledge |publisher=University Press}}
** {{harvc |last=Doe |first=John |c=Chapter 1 |in=Moe |year=1990}}
** {{harvc |last=Poe |first=Jane |c=Chapter 2 |in=Moe |year=1990}}
** {{harvc |last=Roe |first=Robert |c=Chapter 3 |in=Moe |year=1990}}
</nowiki>
|}
====Detailed example====
When a Wikipedia article makes reference to a work that contains multiple chapters by different authors, bibliographies and reference sections can look rather cluttered:
* {{cite book |last=George |first=Ernest J. |last2=Read |first2=Ralph A. |last3=Johnson |first3=R. W. |last4=Ferber |first4=A. E. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Shelterbelts and Windbreaks |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=//archive.org/stream/yoa1957#page/n785/mode/1up |oclc=704186906 |ref=none}}
* {{cite book |last=Harper |first=V. L. |last2=Frank |first2=Bernard |last3=McQuilkin |first3=W. E. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Forest Practices and Productivity |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=//archive.org/stream/yoa1957#page/n803/mode/1up |oclc=704186906 |ref=none}}
* {{cite book |last=Stout |first=P. R. |last2=Johnson |first2=C. M. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Trace Elements |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=//archive.org/stream/yoa1957#page/n167/mode/1up |oclc=704186906 |ref=none}}
* {{cite book |last=Wadleigh |first=C. H. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Growth of Plants |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=//archive.org/stream/yoa1957#page/n57/mode/1up |oclc=704186906 |ref=none}}
As the list grows longer, the look becomes more cluttered with the unnecessarily repeated detail of full-length citations. With {{tlx|harvc}} editors can link to shorter, less detailed contribution citations using standard implementations of {{tlx|sfn}} templates and {{tlx|harv}} templates (and also wrapped in {{tag|ref}} tags with {{tlx|harvnb}}). {{tlx|harvc}} may also be wrapped in {{tag|ref}} tags so that it becomes part of the article's References section. See full example below.
=====Avoiding circular reference=====
It may sometimes be necessary to cite a contribution of a source's editor or author such that {{para|last1}} through {{para|last4}} are the same as {{para|in1}} through {{para|in4}}, an editor's preface for example. Such citations can, depending on placement, cause {{tlx|sfn}} or {{tlx|harv}}-family references to link directly to the citation instead of to the {{tlx|harvc}} template, or cause circular links ({{tlx|harvc}} linking to itself because its <code>CITEREF</code> anchor identifier is the same as the citation's <code>CITEREF</code> anchor identifier). If {{para|id}} is set, {{tlx|harvc}} will use it as an anchor identifier; if {{para|id}} is not set, {{tlx|harvc}} will emit an error message when {{para|last1}} through {{para|last4}} are the same as {{para|in1}} through {{para|in4}}.
For example, to reference an editor's preface from article text, create a wikilink inside {{tag|ref}} tags:
:<code><nowiki><ref>[[#Stefferud preface|Stefferud 1957]]</ref></nowiki></code>
Write a {{tlx|harvc}} template with {{para|id|Stefferud preface}}
:<code><nowiki>{{harvc |last=Stefferud |first=A.|year=1957 |id=Stefferud preface |c=Preface |url=//archive.org/stream/yoa1957#page/n7/mode/1up |in=Stefferud}}</nowiki></code>
{{markupv|title=Full example:|markup=
<nowiki>First information.{{sfn|George|Read|Johnson|Ferber|1957}} Second.<ref>{{harvnb|Stout|Johnson|1957}}</ref> Three thru five.<ref>{{harvnb|Stout|Johnson|1957}}</ref><ref>{{harvc|last=Benson|first=Ezra Taft|year=1957|chapter=Foreword|url=//archive.org/stream/yoa1957#page/n5/mode/1up|in=Stefferud|p=vi |loc=§2 |ignore-err=yes}}</ref>{{sfn|Wadleigh|1957}} Sixth.<ref>[[#Stefferud preface|Stefferud 1957]]</ref>
<!-- ==Notes== --> {{fake heading|sub=3|Notes}}
{{reflist}}
<!-- ==References== --> {{fake heading|sub=3|References}}
* {{cite book |title=Soil: The Yearbook of Agriculture 1957 |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |url=//archive.org/stream/yoa1957 |oclc=704186906 }}
** {{harvc |last=George |first=Ernest J. |last2=Read |last3=Johnson |last4=Ferber |year=1957 |contribution=Shelterbelts and Windbreaks |url=//archive.org/stream/yoa1957#page/n785/mode/1up |in=Stefferud |ignore-err=yes}}
** {{harvc |last=Harper |first=V. L. |last2=Frank |last3=McQuilkin |year=1957 |contribution=Forest Practices |url=//archive.org/stream/yoa1957#page/n803/mode/1up |in=Stefferud |ignore-err=yes}}
** {{harvc |last=Stefferud |first=A.|year=1957 |id=Stefferud preface |c=Preface |url=//archive.org/stream/yoa1957#page/n7/mode/1up |in=Stefferud |ignore-err=yes}}
** {{harvc |last=Stout |first=P. R. |last2=Johnson |year=1957 |c=Trace Elements |url=//archive.org/stream/yoa1957#page/n167/mode/1up |in=Stefferud |ignore-err=yes}}
** {{harvc |last=Wadleigh |first=C. H.|year=1957 |c=Growth of Plants |url=//archive.org/stream/yoa1957#page/n57/mode/1up |in=Stefferud |ignore-err=yes}}
</nowiki>|renders=First information.{{sfn|George|Read|Johnson|Ferber|1957}} Second.<ref>{{harvnb|Stout|Johnson|1957}}</ref> Three thru five.<ref>{{harvnb|Stout|Johnson|1957}}</ref><ref>{{harvc|last=Benson|first=Ezra Taft|year=1957|chapter=Foreword|url=//archive.org/stream/yoa1957#page/n5/mode/1up|in=Stefferud|p=vi |loc=§2 |ignore-err=yes}}</ref>{{sfn|Wadleigh|1957}} Sixth.<ref>[[#Stefferud preface|Stefferud 1957]]</ref>
<!-- ==Notes== --> {{fake heading|sub=3|Notes}}
{{reflist}}
<!-- ==References== --> {{fake heading|sub=3|References}}
* {{cite book |title=Soil: The Yearbook of Agriculture 1957 |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |url=//archive.org/stream/yoa1957 |oclc=704186906 }}
** {{harvc |last=George |first=Ernest J. |last2=Read |last3=Johnson |last4=Ferber |year=1957 |contribution=Shelterbelts and Windbreaks |url=//archive.org/stream/yoa1957#page/n785/mode/1up |in=Stefferud |ignore-err=yes}}
** {{harvc |last=Harper |first=V. L. |last2=Frank |last3=McQuilkin |year=1957 |contribution=Forest Practices |url=//archive.org/stream/yoa1957#page/n803/mode/1up |in=Stefferud |ignore-err=yes |id=none}}
** {{harvc |last=Stefferud |first=A.|year=1957 |id=Stefferud preface |c=Preface |url=//archive.org/stream/yoa1957#page/n7/mode/1up |in=Stefferud |ignore-err=yes}}
** {{harvc |last=Stout |first=P. R. |last2=Johnson |year=1957 |c=Trace Elements |url=//archive.org/stream/yoa1957#page/n167/mode/1up |in=Stefferud |ignore-err=yes}}
** {{harvc |last=Wadleigh |first=C. H.|year=1957 |c=Growth of Plants |url=//archive.org/stream/yoa1957#page/n57/mode/1up |in=Stefferud |ignore-err=yes}}}}<!-- Template:Mra -->
Note again the parameter <code><nowiki>ignore-err=yes</nowiki></code> is simply to suppress errors that occur when this template is embedded, such as in documentation. It should not be used otherwise.
=====More than one contribution=====
There are times when an author or authors will have contributed more than once to a work. When this occurs, it is necessary to disambiguate the CITEREF links from the {{tlx|harv}} or {{tlx|sfn}} templates to the CITEREF id of the appropriate {{tlx|harvc}} template.
:{{tlx|harv|Author|YYYYa}} → {{tlx|harvc|Author|Contribution 1|YYYYa}} → {{tlx|citation|...}}}
:{{tlx|harv|Author|YYYYb}} → {{tlx|harvc|Author|Contribution 2|YYYYb}} ↑
In this example, author David Hunt contributed two appendices to ''Christmas Cacti: The Genus ''Schlumbergera'' and Its Hybrids''.
There are two {{tlx|harvnb}} templates that are disambiguated:
:<code><nowiki>{{harvnb |Hunt |1995a}}</nowiki></code> → Hunt 1995a
:<code><nowiki>{{harvnb |Hunt |1995b}}</nowiki></code> → Hunt 1995b
These link to two {{tlx|harvc}} templates which use {{para|anchor-year}} for their CITEREF id and for the date in the {{tlx|harvc}} rendering as a visual aid for readers:
{{markup|
<nowiki>{{harvnb |Hunt |1995a}}; {{harvnb |Hunt |1995b}}.
<!-- ==References== --> {{fake heading|sub=3|References}}
* {{Citation |last=McMillan |first=AJS |last2=Horobin |first2=JF |year=1995 |title=Christmas Cacti: The Genus ''Schlumbergera'' and Its Hybrids |edition=p/b |publication-place=Sherbourne, UK |publisher=David Hunt |isbn=978-0-9517234-6-3}}
** {{harvc |in=McMillan |in2=Horobin |last=Hunt |first=David |c=Appendix I Names of the species |year=1995 |anchor-year=1995a |mode=cs2 |nb=yes |ignore-err=yes}}
** {{harvc |in=McMillan |in2=Horobin |last=Hunt |first=David |c=Appendix III Excerpts from a Brazilian diary |year=1995 |anchor-year=1995b |mode=cs2 |nb=yes |ignore-err=yes}}
</nowiki>|{{harvnb |Hunt |1995a}}; {{harvnb |Hunt |1995b}}.
<!-- ==References== --> {{fake heading|sub=3|References}}
* {{Citation |last=McMillan |first=AJS |last2=Horobin |first2=JF |year=1995 |title=Christmas Cacti: The Genus ''Schlumbergera'' and Its Hybrids |edition=p/b |publication-place=Sherbourne, UK |publisher=David Hunt |isbn=978-0-9517234-6-3}}
** {{harvc |in=McMillan |in2=Horobin |last=Hunt |first=David |c=Appendix I Names of the species |year=1995 |anchor-year=1995a |mode=cs2 |nb=yes |ignore-err=yes}}
** {{harvc |in=McMillan |in2=Horobin |last=Hunt |first=David |c=Appendix III Excerpts from a Brazilian diary |year=1995 |anchor-year=1995b |mode=cs2 |nb=yes |ignore-err=yes}}}}<!-- Template:Mra -->
==Error messages==
{{tlx|harvc}} emits these error messages:<!--
:<span style="font-size:100%" class="error">harvc: {{para|anchor-year|plain=yes}} missing dab.</span>
::when used, {{para|anchor-year}} must include a single, lowercase letter disambiguator -->
:<span style="font-size:100%" class="error">harvc: author missing from source list.</span>
::the source list parameters {{para|in1}}, {{para|in2}}, {{para|in3}}, and {{para|in4}} form the template's <code>CITEREF</code> link to the full citation. All are not required but must be used in order without numerical gaps.
:<span style="font-size:100%" class="error">harvc: invalid {{para|anchor-year|plain=yes}}.</span>
::when used, {{para|anchor-year}} must be a three- or four-digit number and must have a lowercase <code>CITEREF</code> disambiguator. When the source does not have an identifiable year, use {{para|anchor-year|n.d.{{var|l}}}} or {{para|anchor-year|nd{{var|l}}}} with lowercase <code>CITEREF</code> disambiguator.
:<span style="font-size:100%" class="error">harvc: invalid {{para|display-authors|plain=yes}}.</span>
::the value assigned to {{para|display-authors}} must be a number greater than 0 or the keyword <code>etal</code>
:<span style="font-size:100%" class="error">harvc: invalid {{para|year|plain=yes}}.</span>
::{{para|year}} is an integral part of the template's <code>CITEREF</code> anchor and link. The value of {{para|year}} must be a three- or four-digit number with an optional lowercase <code>CITEREF</code> disambiguator. When the source does not have an identifiable year, use {{para|year|n.d.}} or {{para|year|nd}}.
:<span style="font-size:100%" class="error">harvc: missing {{para|year|plain=yes}}.</span>
::{{para|year}} is missing; the parameter is required.
:<span style="font-size:100%" class="error">harvc: no authors in contributor list.</span>
::this error message indicates that {{tlx|harvc}} can't find any of {{para|last}}, {{para|last1}}, {{para|author}} or {{para|author1}} with an assigned value and so cannot make a usable <code>CITEREF</code> anchor. Add at least one of the listed parameters.
:<span style="font-size:100%" class="error">harvc: required contribution is missing.</span>
::this error message indicates that {{tlx|harvc}} can't find any of {{para|c}}, {{para|chapter}}, or {{para|contribution}} with an assigned value
:<span style="font-size:100%" class="error">harvc: required {{para|id|plain=yes}} parameter missing.</span>
::this error message is emitted when the {{tlx|harvc}} template's <code>CITEREF</code> anchor identifier would conflict with the long-form citation's <code>CITEREF</code> anchor identifier. See [[#Avoiding circular reference|Examples]]
:<span style="font-size:100%" class="error">harvc: {{para|year|plain=yes}} / {{para|anchor-year|plain=yes}} mismatch.</span>
::the year portion of {{para|anchor-year|YYYY{{var|l}}}} must match the year given in {{para|year|YYYY}}
<includeonly>{{Sandbox other||
<!-- Categories below this line, please; interwikis at Wikidata -->
[[Category:Citation utility templates]]
}}</includeonly>
90w2u7gasgw7s882r1unrytawqnme84
801816
801815
2023-07-25T23:28:28Z
en>IznoRepeat
0
/* Avoiding circular reference */[[phab:T337149#8953569]], replaced: |url=// → |url=https:// (15)
801816
wikitext
text/x-wiki
{{Documentation subpage}}
<!-- Place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
{{lua|Module:Harvc}}
{{uses TemplateStyles|Module:Citation/CS1/styles.css|noprotcat=yes}}
This template is a citation hybrid that has characteristics of long-form [[Help:Citation Style 1|cs1]] and [[Help:Citation Style 2|cs2]], of short-form {{tlx|sfn}} and of the {{tlx|harv}} families of templates. Its purpose is to provide a method that allows editors to refer to a contribution or chapter in a larger work when more than a few such referrals are required. {{tlx|harvc}} is not a substitute for a properly constructed citation.
Short-form templates {{tlx|sfn}} and {{tlx|harv}} are often used to link from an article's references section to a long-form cs1|2 template in a bibliography section:
:{{tlx|harv}} → {{tlx|cite book}}
It is not uncommon for a source to have multiple contributors. When it is necessary to refer to multiple contributions in the same source, repeating all of the bibliographic details in multiple long-form citation templates adds to references-section clutter. {{tlx|harvc}} is designed to hold only the detail necessary to identify a contribution and link to the enclosing work's long-form citation where all of the bibliographic detail can be found:
:{{tlx|harv}} → {{tlx|harvc}} → {{tlx|cite book}}
== Usage ==
The minimal form is:
:<code><nowiki>{{harvc |last=contributor name |year=publication year |c=contribution title |in=source editor/author name}}</nowiki></code>
According to the comments in [[Module:Harvc]], mistaken {{red|Harvc error: no target:}} error messages may be produced when the template is nested in other templates as on documentation pages. The otherwise undocumented parameter, {{para|ignore-err|yes}}, can be added to prevent this.
===Parameters===
{{tlx|harvc}} creates a <code>CITEREF</code> anchor from one to four contribution or chapter author surnames ({{para|last''n''}}) and the value in {{para|year}}. This allows {{tlx|harvc}} to be the target of a link created by {{tlx|sfn}} or {{tlx|harv}} family templates. From {{para|in{{var|n}}}} and {{para|year}}, {{tlx|harvc}} creates a CITEREF link similar to those created by {{tlx|harvnb}} and {{tlx|sfn}}
: '''|anchor-year=''' – optional, for use for author(s) with more than one contribution to the work; requires CITEREF disambiguator; see [[#More than one contribution|Examples]]
: '''|author-link=''' – optional, title of existing Wikipedia article about the first contributor—not the contributor's website; do not wikilink; alias: '''|author-link1='''
:: '''|author-link''n''=''' – optional, title of existing Wikipedia article about contributor''n''; choose ''n'' to match ''n'' in '''|last''n''='''
: '''|author-mask=''m''''' – optional, replaces name of the first contributor with ''m'' (commonly 2) em dashes; alias: '''|author-mask1='''
:: '''|author-mask''n''=''m''''' – optional, replaces name of contributor''n'' with ''m'' em dashes; choose ''n'' to match ''n'' in '''|last''n''='''
:: '''|author-mask{{var|n}}=<{{var|text}}>''' – optional, replaces name of contributor''n'' with <{{var|text}}>
: '''|c=''' – required, the title of chapter or contribution; rendered quoted in upright font; aliases: '''|chapter=''', '''|contribution='''
: '''|display-authors=''' – optional, defines how {{tlx|harvc}} displays the contributor list; ignored when '''|name-list-style=harv''':
:: {{para|display-authors}} – when empty or omitted, displays all contributor names in last/first format
:: {{para|display-authors|{{var|n}}}} – displays ''n'' contributor names in last/first format; appends et al. when ''n'' is less than the number of contributors included in the template
:: {{para|display-authors|etal}} – displays all contributor names in last/first format and appends et al.
: '''|first=''' – optional, first contributor's given or first name; alias: '''|first1='''
:: '''|first''n''=''' – optional, contributor''n'' given or first name; ''n'' begins at 2 and increases by 1 for each additional '''|first''n''='''
: '''|id=''' – required when {{para|last1}}-{{para|last4}} are the same as {{para|in1}}-{{para|in4}}; otherwise optional. See [[#Avoiding circular reference|Examples]]
: '''|in=''' – required, surname or last name of first editor or author of the work that includes the contribution; aliases: '''|in1='''
: '''|in2=''' – optional, surname or last name of second editor or author
: '''|in3=''' – optional, surname or last name of third editor or author
: '''|in4=''' – optional, surname or last name of fourth editor or author
: '''|last=''' – required, surname or last name of first author; aliases: '''|last1='''
:: '''|last''n''=''' – optional, contributor''n'' surname or last name; ''n'' begins at 2 and increases by 1 for each additional '''|last''n''=''';
: '''|loc=''' – optional, other location identifier, displays after {{para|p}} or {{para|pp}}
: '''|mode=''' – controls rendered display to match that of adjacent CS1 or CS2 citations; defaults to CS1 style
:: '''|mode=cs2''' – mimic {{tlx|citation}} style (comma separators, no terminal punctuation, static text not capitalized)
: '''|name-list-style=''' – optional, controls contributor name list display style
:: '''|name-list-style=harv''' – mimic {{tlx|sfn}} or {{tlx|harv}} format (one to four last names); overrides '''|display-authors='''
:: '''|name-list-style=amp''' – inserts an ampersand between the last two contributor names
: '''|nb=''' – optional, when set to <code>yes</code>, instructs {{tlx|harvc}} to render source link without parentheses around the year; same format as that produced by {{tlx|harvnb}}
: '''|p=''' – optional, single page number where cited material can be found; aliases: '''|page='''
: '''|pp=''' – optional, multiple page numbers, page ranges, etc where cited material can be found; aliases: '''|pages='''
: '''|ps=''' – optional, sets terminal punctuation; default is full stop; overrides '''|mode=cs2'''; aliases: '''|postscript='''
:: '''|ps=none''' – renders output without terminal punctuation
: '''|url=''' – optional, URL of an online location where the text of the contribution can be found; aliases: '''|chapter-url''', '''|contribution-url'''
: '''|url-access=''' – optional, use when URL links to a source behind a registration barrier or paywall; inserts [[Help:Citation_Style_1#Registration_or_subscription_required|cs1{{pipe}}2 access icon]]; accepted values are: <code>limited</code>, <code>registration</code>, <code>subscription</code>
: '''|year=''' – required, publication year of the work that includes the contribution
===Examples===
====Basic example====
{| class=wikitable style="width: 100%"
! scope=col style="width: 50%" | Without {{tl|harvc}}
! scope=col style="width: 50%" | With {{tl|harvc}}
|-
|
* {{cite book |last=Doe |first=John |year=1990 |chapter=Chapter 1 |editor-last=Moe |editor-first=Mary |title=The Book of Knowledge |publisher=University Press |ref=none}}
* {{cite book |last=Poe |first=Jane |year=1990 |chapter=Chapter 2 |editor-last=Moe |editor-first=Mary |title=The Book of Knowledge |publisher=University Press |ref=none}}
* {{cite book |last=Roe |first=Robert |year=1990 |chapter=Chapter 3 |editor-last=Moe |editor-first=Mary |title=The Book of Knowledge |publisher=University Press |ref=none}}
|
* {{cite book |editor-last=Moe |editor-first=Mary |year=1990 |title=The Book of Knowledge |publisher=University Press}}
** {{harvc |last=Doe |first=John |c=Chapter 1 |in=Moe |year=1990 |id=none |ignore-err=yes}}
** {{harvc |last=Poe |first=Jane |c=Chapter 2 |in=Moe |year=1990 |id=none |ignore-err=yes}}
** {{harvc |last=Roe |first=Robert |c=Chapter 3 |in=Moe |year=1990 |id=none |ignore-err=yes}}
|}
{| class=wikitable style="width: 100%"
|+ Markup
|-
| style="width: 50%" |
<nowiki>
* {{cite book |last=Doe |first=John |year=1990 |chapter=Chapter 1 |editor-last=Moe |editor-first=Mary |title=The Book of Knowledge |publisher=University Press}}
* {{cite book |last=Poe |first=Jane |year=1990 |chapter=Chapter 2 |editor-last=Moe |editor-first=Mary |title=The Book of Knowledge |publisher=University Press}}
* {{cite book |last=Roe |first=Robert |year=1990 |chapter=Chapter 3 |editor-last=Moe |editor-first=Mary |title=The Book of Knowledge |publisher=University Press}}
</nowiki>
| style="width: 50%|
<nowiki>
* {{cite book |editor-last=Moe |editor-first=Mary |year=1990 |title=The Book of Knowledge |publisher=University Press}}
** {{harvc |last=Doe |first=John |c=Chapter 1 |in=Moe |year=1990}}
** {{harvc |last=Poe |first=Jane |c=Chapter 2 |in=Moe |year=1990}}
** {{harvc |last=Roe |first=Robert |c=Chapter 3 |in=Moe |year=1990}}
</nowiki>
|}
====Detailed example====
When a Wikipedia article makes reference to a work that contains multiple chapters by different authors, bibliographies and reference sections can look rather cluttered:
* {{cite book |last=George |first=Ernest J. |last2=Read |first2=Ralph A. |last3=Johnson |first3=R. W. |last4=Ferber |first4=A. E. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Shelterbelts and Windbreaks |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=//archive.org/stream/yoa1957#page/n785/mode/1up |oclc=704186906 |ref=none}}
* {{cite book |last=Harper |first=V. L. |last2=Frank |first2=Bernard |last3=McQuilkin |first3=W. E. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Forest Practices and Productivity |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=//archive.org/stream/yoa1957#page/n803/mode/1up |oclc=704186906 |ref=none}}
* {{cite book |last=Stout |first=P. R. |last2=Johnson |first2=C. M. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Trace Elements |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=//archive.org/stream/yoa1957#page/n167/mode/1up |oclc=704186906 |ref=none}}
* {{cite book |last=Wadleigh |first=C. H. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Growth of Plants |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=//archive.org/stream/yoa1957#page/n57/mode/1up |oclc=704186906 |ref=none}}
As the list grows longer, the look becomes more cluttered with the unnecessarily repeated detail of full-length citations. With {{tlx|harvc}} editors can link to shorter, less detailed contribution citations using standard implementations of {{tlx|sfn}} templates and {{tlx|harv}} templates (and also wrapped in {{tag|ref}} tags with {{tlx|harvnb}}). {{tlx|harvc}} may also be wrapped in {{tag|ref}} tags so that it becomes part of the article's References section. See full example below.
=====Avoiding circular reference=====
It may sometimes be necessary to cite a contribution of a source's editor or author such that {{para|last1}} through {{para|last4}} are the same as {{para|in1}} through {{para|in4}}, an editor's preface for example. Such citations can, depending on placement, cause {{tlx|sfn}} or {{tlx|harv}}-family references to link directly to the citation instead of to the {{tlx|harvc}} template, or cause circular links ({{tlx|harvc}} linking to itself because its <code>CITEREF</code> anchor identifier is the same as the citation's <code>CITEREF</code> anchor identifier). If {{para|id}} is set, {{tlx|harvc}} will use it as an anchor identifier; if {{para|id}} is not set, {{tlx|harvc}} will emit an error message when {{para|last1}} through {{para|last4}} are the same as {{para|in1}} through {{para|in4}}.
For example, to reference an editor's preface from article text, create a wikilink inside {{tag|ref}} tags:
:<code><nowiki><ref>[[#Stefferud preface|Stefferud 1957]]</ref></nowiki></code>
Write a {{tlx|harvc}} template with {{para|id|Stefferud preface}}
:<code><nowiki>{{harvc |last=Stefferud |first=A.|year=1957 |id=Stefferud preface |c=Preface |url=https://archive.org/stream/yoa1957#page/n7/mode/1up |in=Stefferud}}</nowiki></code>
{{markupv|title=Full example:|markup=
<nowiki>First information.{{sfn|George|Read|Johnson|Ferber|1957}} Second.<ref>{{harvnb|Stout|Johnson|1957}}</ref> Three thru five.<ref>{{harvnb|Stout|Johnson|1957}}</ref><ref>{{harvc|last=Benson|first=Ezra Taft|year=1957|chapter=Foreword|url=https://archive.org/stream/yoa1957#page/n5/mode/1up|in=Stefferud|p=vi |loc=§2 |ignore-err=yes}}</ref>{{sfn|Wadleigh|1957}} Sixth.<ref>[[#Stefferud preface|Stefferud 1957]]</ref>
<!-- ==Notes== --> {{fake heading|sub=3|Notes}}
{{reflist}}
<!-- ==References== --> {{fake heading|sub=3|References}}
* {{cite book |title=Soil: The Yearbook of Agriculture 1957 |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |url=https://archive.org/stream/yoa1957 |oclc=704186906 }}
** {{harvc |last=George |first=Ernest J. |last2=Read |last3=Johnson |last4=Ferber |year=1957 |contribution=Shelterbelts and Windbreaks |url=https://archive.org/stream/yoa1957#page/n785/mode/1up |in=Stefferud |ignore-err=yes}}
** {{harvc |last=Harper |first=V. L. |last2=Frank |last3=McQuilkin |year=1957 |contribution=Forest Practices |url=https://archive.org/stream/yoa1957#page/n803/mode/1up |in=Stefferud |ignore-err=yes}}
** {{harvc |last=Stefferud |first=A.|year=1957 |id=Stefferud preface |c=Preface |url=https://archive.org/stream/yoa1957#page/n7/mode/1up |in=Stefferud |ignore-err=yes}}
** {{harvc |last=Stout |first=P. R. |last2=Johnson |year=1957 |c=Trace Elements |url=https://archive.org/stream/yoa1957#page/n167/mode/1up |in=Stefferud |ignore-err=yes}}
** {{harvc |last=Wadleigh |first=C. H.|year=1957 |c=Growth of Plants |url=https://archive.org/stream/yoa1957#page/n57/mode/1up |in=Stefferud |ignore-err=yes}}
</nowiki>|renders=First information.{{sfn|George|Read|Johnson|Ferber|1957}} Second.<ref>{{harvnb|Stout|Johnson|1957}}</ref> Three thru five.<ref>{{harvnb|Stout|Johnson|1957}}</ref><ref>{{harvc|last=Benson|first=Ezra Taft|year=1957|chapter=Foreword|url=https://archive.org/stream/yoa1957#page/n5/mode/1up|in=Stefferud|p=vi |loc=§2 |ignore-err=yes}}</ref>{{sfn|Wadleigh|1957}} Sixth.<ref>[[#Stefferud preface|Stefferud 1957]]</ref>
<!-- ==Notes== --> {{fake heading|sub=3|Notes}}
{{reflist}}
<!-- ==References== --> {{fake heading|sub=3|References}}
* {{cite book |title=Soil: The Yearbook of Agriculture 1957 |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |url=https://archive.org/stream/yoa1957 |oclc=704186906 }}
** {{harvc |last=George |first=Ernest J. |last2=Read |last3=Johnson |last4=Ferber |year=1957 |contribution=Shelterbelts and Windbreaks |url=https://archive.org/stream/yoa1957#page/n785/mode/1up |in=Stefferud |ignore-err=yes}}
** {{harvc |last=Harper |first=V. L. |last2=Frank |last3=McQuilkin |year=1957 |contribution=Forest Practices |url=https://archive.org/stream/yoa1957#page/n803/mode/1up |in=Stefferud |ignore-err=yes |id=none}}
** {{harvc |last=Stefferud |first=A.|year=1957 |id=Stefferud preface |c=Preface |url=https://archive.org/stream/yoa1957#page/n7/mode/1up |in=Stefferud |ignore-err=yes}}
** {{harvc |last=Stout |first=P. R. |last2=Johnson |year=1957 |c=Trace Elements |url=https://archive.org/stream/yoa1957#page/n167/mode/1up |in=Stefferud |ignore-err=yes}}
** {{harvc |last=Wadleigh |first=C. H.|year=1957 |c=Growth of Plants |url=https://archive.org/stream/yoa1957#page/n57/mode/1up |in=Stefferud |ignore-err=yes}}}}<!-- Template:Mra -->
Note again the parameter <code><nowiki>ignore-err=yes</nowiki></code> is simply to suppress errors that occur when this template is embedded, such as in documentation. It should not be used otherwise.
=====More than one contribution=====
There are times when an author or authors will have contributed more than once to a work. When this occurs, it is necessary to disambiguate the CITEREF links from the {{tlx|harv}} or {{tlx|sfn}} templates to the CITEREF id of the appropriate {{tlx|harvc}} template.
:{{tlx|harv|Author|YYYYa}} → {{tlx|harvc|Author|Contribution 1|YYYYa}} → {{tlx|citation|...}}}
:{{tlx|harv|Author|YYYYb}} → {{tlx|harvc|Author|Contribution 2|YYYYb}} ↑
In this example, author David Hunt contributed two appendices to ''Christmas Cacti: The Genus ''Schlumbergera'' and Its Hybrids''.
There are two {{tlx|harvnb}} templates that are disambiguated:
:<code><nowiki>{{harvnb |Hunt |1995a}}</nowiki></code> → Hunt 1995a
:<code><nowiki>{{harvnb |Hunt |1995b}}</nowiki></code> → Hunt 1995b
These link to two {{tlx|harvc}} templates which use {{para|anchor-year}} for their CITEREF id and for the date in the {{tlx|harvc}} rendering as a visual aid for readers:
{{markup|
<nowiki>{{harvnb |Hunt |1995a}}; {{harvnb |Hunt |1995b}}.
<!-- ==References== --> {{fake heading|sub=3|References}}
* {{Citation |last=McMillan |first=AJS |last2=Horobin |first2=JF |year=1995 |title=Christmas Cacti: The Genus ''Schlumbergera'' and Its Hybrids |edition=p/b |publication-place=Sherbourne, UK |publisher=David Hunt |isbn=978-0-9517234-6-3}}
** {{harvc |in=McMillan |in2=Horobin |last=Hunt |first=David |c=Appendix I Names of the species |year=1995 |anchor-year=1995a |mode=cs2 |nb=yes |ignore-err=yes}}
** {{harvc |in=McMillan |in2=Horobin |last=Hunt |first=David |c=Appendix III Excerpts from a Brazilian diary |year=1995 |anchor-year=1995b |mode=cs2 |nb=yes |ignore-err=yes}}
</nowiki>|{{harvnb |Hunt |1995a}}; {{harvnb |Hunt |1995b}}.
<!-- ==References== --> {{fake heading|sub=3|References}}
* {{Citation |last=McMillan |first=AJS |last2=Horobin |first2=JF |year=1995 |title=Christmas Cacti: The Genus ''Schlumbergera'' and Its Hybrids |edition=p/b |publication-place=Sherbourne, UK |publisher=David Hunt |isbn=978-0-9517234-6-3}}
** {{harvc |in=McMillan |in2=Horobin |last=Hunt |first=David |c=Appendix I Names of the species |year=1995 |anchor-year=1995a |mode=cs2 |nb=yes |ignore-err=yes}}
** {{harvc |in=McMillan |in2=Horobin |last=Hunt |first=David |c=Appendix III Excerpts from a Brazilian diary |year=1995 |anchor-year=1995b |mode=cs2 |nb=yes |ignore-err=yes}}}}<!-- Template:Mra -->
==Error messages==
{{tlx|harvc}} emits these error messages:<!--
:<span style="font-size:100%" class="error">harvc: {{para|anchor-year|plain=yes}} missing dab.</span>
::when used, {{para|anchor-year}} must include a single, lowercase letter disambiguator -->
:<span style="font-size:100%" class="error">harvc: author missing from source list.</span>
::the source list parameters {{para|in1}}, {{para|in2}}, {{para|in3}}, and {{para|in4}} form the template's <code>CITEREF</code> link to the full citation. All are not required but must be used in order without numerical gaps.
:<span style="font-size:100%" class="error">harvc: invalid {{para|anchor-year|plain=yes}}.</span>
::when used, {{para|anchor-year}} must be a three- or four-digit number and must have a lowercase <code>CITEREF</code> disambiguator. When the source does not have an identifiable year, use {{para|anchor-year|n.d.{{var|l}}}} or {{para|anchor-year|nd{{var|l}}}} with lowercase <code>CITEREF</code> disambiguator.
:<span style="font-size:100%" class="error">harvc: invalid {{para|display-authors|plain=yes}}.</span>
::the value assigned to {{para|display-authors}} must be a number greater than 0 or the keyword <code>etal</code>
:<span style="font-size:100%" class="error">harvc: invalid {{para|year|plain=yes}}.</span>
::{{para|year}} is an integral part of the template's <code>CITEREF</code> anchor and link. The value of {{para|year}} must be a three- or four-digit number with an optional lowercase <code>CITEREF</code> disambiguator. When the source does not have an identifiable year, use {{para|year|n.d.}} or {{para|year|nd}}.
:<span style="font-size:100%" class="error">harvc: missing {{para|year|plain=yes}}.</span>
::{{para|year}} is missing; the parameter is required.
:<span style="font-size:100%" class="error">harvc: no authors in contributor list.</span>
::this error message indicates that {{tlx|harvc}} can't find any of {{para|last}}, {{para|last1}}, {{para|author}} or {{para|author1}} with an assigned value and so cannot make a usable <code>CITEREF</code> anchor. Add at least one of the listed parameters.
:<span style="font-size:100%" class="error">harvc: required contribution is missing.</span>
::this error message indicates that {{tlx|harvc}} can't find any of {{para|c}}, {{para|chapter}}, or {{para|contribution}} with an assigned value
:<span style="font-size:100%" class="error">harvc: required {{para|id|plain=yes}} parameter missing.</span>
::this error message is emitted when the {{tlx|harvc}} template's <code>CITEREF</code> anchor identifier would conflict with the long-form citation's <code>CITEREF</code> anchor identifier. See [[#Avoiding circular reference|Examples]]
:<span style="font-size:100%" class="error">harvc: {{para|year|plain=yes}} / {{para|anchor-year|plain=yes}} mismatch.</span>
::the year portion of {{para|anchor-year|YYYY{{var|l}}}} must match the year given in {{para|year|YYYY}}
<includeonly>{{Sandbox other||
<!-- Categories below this line, please; interwikis at Wikidata -->
[[Category:Citation utility templates]]
}}</includeonly>
lj73iy1v4r8u4lwrdgpf4m6xzx7pc5u
801817
801816
2023-07-26T02:20:08Z
en>Izno
0
couple more
801817
wikitext
text/x-wiki
{{Documentation subpage}}
<!-- Place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
{{lua|Module:Harvc}}
{{uses TemplateStyles|Module:Citation/CS1/styles.css|noprotcat=yes}}
This template is a citation hybrid that has characteristics of long-form [[Help:Citation Style 1|cs1]] and [[Help:Citation Style 2|cs2]], of short-form {{tlx|sfn}} and of the {{tlx|harv}} families of templates. Its purpose is to provide a method that allows editors to refer to a contribution or chapter in a larger work when more than a few such referrals are required. {{tlx|harvc}} is not a substitute for a properly constructed citation.
Short-form templates {{tlx|sfn}} and {{tlx|harv}} are often used to link from an article's references section to a long-form cs1|2 template in a bibliography section:
:{{tlx|harv}} → {{tlx|cite book}}
It is not uncommon for a source to have multiple contributors. When it is necessary to refer to multiple contributions in the same source, repeating all of the bibliographic details in multiple long-form citation templates adds to references-section clutter. {{tlx|harvc}} is designed to hold only the detail necessary to identify a contribution and link to the enclosing work's long-form citation where all of the bibliographic detail can be found:
:{{tlx|harv}} → {{tlx|harvc}} → {{tlx|cite book}}
== Usage ==
The minimal form is:
:<code><nowiki>{{harvc |last=contributor name |year=publication year |c=contribution title |in=source editor/author name}}</nowiki></code>
According to the comments in [[Module:Harvc]], mistaken {{red|Harvc error: no target:}} error messages may be produced when the template is nested in other templates as on documentation pages. The otherwise undocumented parameter, {{para|ignore-err|yes}}, can be added to prevent this.
===Parameters===
{{tlx|harvc}} creates a <code>CITEREF</code> anchor from one to four contribution or chapter author surnames ({{para|last''n''}}) and the value in {{para|year}}. This allows {{tlx|harvc}} to be the target of a link created by {{tlx|sfn}} or {{tlx|harv}} family templates. From {{para|in{{var|n}}}} and {{para|year}}, {{tlx|harvc}} creates a CITEREF link similar to those created by {{tlx|harvnb}} and {{tlx|sfn}}
: '''|anchor-year=''' – optional, for use for author(s) with more than one contribution to the work; requires CITEREF disambiguator; see [[#More than one contribution|Examples]]
: '''|author-link=''' – optional, title of existing Wikipedia article about the first contributor—not the contributor's website; do not wikilink; alias: '''|author-link1='''
:: '''|author-link''n''=''' – optional, title of existing Wikipedia article about contributor''n''; choose ''n'' to match ''n'' in '''|last''n''='''
: '''|author-mask=''m''''' – optional, replaces name of the first contributor with ''m'' (commonly 2) em dashes; alias: '''|author-mask1='''
:: '''|author-mask''n''=''m''''' – optional, replaces name of contributor''n'' with ''m'' em dashes; choose ''n'' to match ''n'' in '''|last''n''='''
:: '''|author-mask{{var|n}}=<{{var|text}}>''' – optional, replaces name of contributor''n'' with <{{var|text}}>
: '''|c=''' – required, the title of chapter or contribution; rendered quoted in upright font; aliases: '''|chapter=''', '''|contribution='''
: '''|display-authors=''' – optional, defines how {{tlx|harvc}} displays the contributor list; ignored when '''|name-list-style=harv''':
:: {{para|display-authors}} – when empty or omitted, displays all contributor names in last/first format
:: {{para|display-authors|{{var|n}}}} – displays ''n'' contributor names in last/first format; appends et al. when ''n'' is less than the number of contributors included in the template
:: {{para|display-authors|etal}} – displays all contributor names in last/first format and appends et al.
: '''|first=''' – optional, first contributor's given or first name; alias: '''|first1='''
:: '''|first''n''=''' – optional, contributor''n'' given or first name; ''n'' begins at 2 and increases by 1 for each additional '''|first''n''='''
: '''|id=''' – required when {{para|last1}}-{{para|last4}} are the same as {{para|in1}}-{{para|in4}}; otherwise optional. See [[#Avoiding circular reference|Examples]]
: '''|in=''' – required, surname or last name of first editor or author of the work that includes the contribution; aliases: '''|in1='''
: '''|in2=''' – optional, surname or last name of second editor or author
: '''|in3=''' – optional, surname or last name of third editor or author
: '''|in4=''' – optional, surname or last name of fourth editor or author
: '''|last=''' – required, surname or last name of first author; aliases: '''|last1='''
:: '''|last''n''=''' – optional, contributor''n'' surname or last name; ''n'' begins at 2 and increases by 1 for each additional '''|last''n''=''';
: '''|loc=''' – optional, other location identifier, displays after {{para|p}} or {{para|pp}}
: '''|mode=''' – controls rendered display to match that of adjacent CS1 or CS2 citations; defaults to CS1 style
:: '''|mode=cs2''' – mimic {{tlx|citation}} style (comma separators, no terminal punctuation, static text not capitalized)
: '''|name-list-style=''' – optional, controls contributor name list display style
:: '''|name-list-style=harv''' – mimic {{tlx|sfn}} or {{tlx|harv}} format (one to four last names); overrides '''|display-authors='''
:: '''|name-list-style=amp''' – inserts an ampersand between the last two contributor names
: '''|nb=''' – optional, when set to <code>yes</code>, instructs {{tlx|harvc}} to render source link without parentheses around the year; same format as that produced by {{tlx|harvnb}}
: '''|p=''' – optional, single page number where cited material can be found; aliases: '''|page='''
: '''|pp=''' – optional, multiple page numbers, page ranges, etc where cited material can be found; aliases: '''|pages='''
: '''|ps=''' – optional, sets terminal punctuation; default is full stop; overrides '''|mode=cs2'''; aliases: '''|postscript='''
:: '''|ps=none''' – renders output without terminal punctuation
: '''|url=''' – optional, URL of an online location where the text of the contribution can be found; aliases: '''|chapter-url''', '''|contribution-url'''
: '''|url-access=''' – optional, use when URL links to a source behind a registration barrier or paywall; inserts [[Help:Citation_Style_1#Registration_or_subscription_required|cs1{{pipe}}2 access icon]]; accepted values are: <code>limited</code>, <code>registration</code>, <code>subscription</code>
: '''|year=''' – required, publication year of the work that includes the contribution
===Examples===
====Basic example====
{| class=wikitable style="width: 100%"
! scope=col style="width: 50%" | Without {{tl|harvc}}
! scope=col style="width: 50%" | With {{tl|harvc}}
|-
|
* {{cite book |last=Doe |first=John |year=1990 |chapter=Chapter 1 |editor-last=Moe |editor-first=Mary |title=The Book of Knowledge |publisher=University Press |ref=none}}
* {{cite book |last=Poe |first=Jane |year=1990 |chapter=Chapter 2 |editor-last=Moe |editor-first=Mary |title=The Book of Knowledge |publisher=University Press |ref=none}}
* {{cite book |last=Roe |first=Robert |year=1990 |chapter=Chapter 3 |editor-last=Moe |editor-first=Mary |title=The Book of Knowledge |publisher=University Press |ref=none}}
|
* {{cite book |editor-last=Moe |editor-first=Mary |year=1990 |title=The Book of Knowledge |publisher=University Press}}
** {{harvc |last=Doe |first=John |c=Chapter 1 |in=Moe |year=1990 |id=none |ignore-err=yes}}
** {{harvc |last=Poe |first=Jane |c=Chapter 2 |in=Moe |year=1990 |id=none |ignore-err=yes}}
** {{harvc |last=Roe |first=Robert |c=Chapter 3 |in=Moe |year=1990 |id=none |ignore-err=yes}}
|}
{| class=wikitable style="width: 100%"
|+ Markup
|-
| style="width: 50%" |
<nowiki>
* {{cite book |last=Doe |first=John |year=1990 |chapter=Chapter 1 |editor-last=Moe |editor-first=Mary |title=The Book of Knowledge |publisher=University Press}}
* {{cite book |last=Poe |first=Jane |year=1990 |chapter=Chapter 2 |editor-last=Moe |editor-first=Mary |title=The Book of Knowledge |publisher=University Press}}
* {{cite book |last=Roe |first=Robert |year=1990 |chapter=Chapter 3 |editor-last=Moe |editor-first=Mary |title=The Book of Knowledge |publisher=University Press}}
</nowiki>
| style="width: 50%|
<nowiki>
* {{cite book |editor-last=Moe |editor-first=Mary |year=1990 |title=The Book of Knowledge |publisher=University Press}}
** {{harvc |last=Doe |first=John |c=Chapter 1 |in=Moe |year=1990}}
** {{harvc |last=Poe |first=Jane |c=Chapter 2 |in=Moe |year=1990}}
** {{harvc |last=Roe |first=Robert |c=Chapter 3 |in=Moe |year=1990}}
</nowiki>
|}
====Detailed example====
When a Wikipedia article makes reference to a work that contains multiple chapters by different authors, bibliographies and reference sections can look rather cluttered:
* {{cite book |last=George |first=Ernest J. |last2=Read |first2=Ralph A. |last3=Johnson |first3=R. W. |last4=Ferber |first4=A. E. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Shelterbelts and Windbreaks |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=https://archive.org/stream/yoa1957#page/n785/mode/1up |oclc=704186906 |ref=none}}
* {{cite book |last=Harper |first=V. L. |last2=Frank |first2=Bernard |last3=McQuilkin |first3=W. E. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Forest Practices and Productivity |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=https://archive.org/stream/yoa1957#page/n803/mode/1up |oclc=704186906 |ref=none}}
* {{cite book |last=Stout |first=P. R. |last2=Johnson |first2=C. M. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Trace Elements |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=https://archive.org/stream/yoa1957#page/n167/mode/1up |oclc=704186906 |ref=none}}
* {{cite book |last=Wadleigh |first=C. H. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Growth of Plants |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=https://archive.org/stream/yoa1957#page/n57/mode/1up |oclc=704186906 |ref=none}}
As the list grows longer, the look becomes more cluttered with the unnecessarily repeated detail of full-length citations. With {{tlx|harvc}} editors can link to shorter, less detailed contribution citations using standard implementations of {{tlx|sfn}} templates and {{tlx|harv}} templates (and also wrapped in {{tag|ref}} tags with {{tlx|harvnb}}). {{tlx|harvc}} may also be wrapped in {{tag|ref}} tags so that it becomes part of the article's References section. See full example below.
=====Avoiding circular reference=====
It may sometimes be necessary to cite a contribution of a source's editor or author such that {{para|last1}} through {{para|last4}} are the same as {{para|in1}} through {{para|in4}}, an editor's preface for example. Such citations can, depending on placement, cause {{tlx|sfn}} or {{tlx|harv}}-family references to link directly to the citation instead of to the {{tlx|harvc}} template, or cause circular links ({{tlx|harvc}} linking to itself because its <code>CITEREF</code> anchor identifier is the same as the citation's <code>CITEREF</code> anchor identifier). If {{para|id}} is set, {{tlx|harvc}} will use it as an anchor identifier; if {{para|id}} is not set, {{tlx|harvc}} will emit an error message when {{para|last1}} through {{para|last4}} are the same as {{para|in1}} through {{para|in4}}.
For example, to reference an editor's preface from article text, create a wikilink inside {{tag|ref}} tags:
:<code><nowiki><ref>[[#Stefferud preface|Stefferud 1957]]</ref></nowiki></code>
Write a {{tlx|harvc}} template with {{para|id|Stefferud preface}}
:<code><nowiki>{{harvc |last=Stefferud |first=A.|year=1957 |id=Stefferud preface |c=Preface |url=https://archive.org/stream/yoa1957#page/n7/mode/1up |in=Stefferud}}</nowiki></code>
{{markupv|title=Full example:|markup=
<nowiki>First information.{{sfn|George|Read|Johnson|Ferber|1957}} Second.<ref>{{harvnb|Stout|Johnson|1957}}</ref> Three thru five.<ref>{{harvnb|Stout|Johnson|1957}}</ref><ref>{{harvc|last=Benson|first=Ezra Taft|year=1957|chapter=Foreword|url=https://archive.org/stream/yoa1957#page/n5/mode/1up|in=Stefferud|p=vi |loc=§2 |ignore-err=yes}}</ref>{{sfn|Wadleigh|1957}} Sixth.<ref>[[#Stefferud preface|Stefferud 1957]]</ref>
<!-- ==Notes== --> {{fake heading|sub=3|Notes}}
{{reflist}}
<!-- ==References== --> {{fake heading|sub=3|References}}
* {{cite book |title=Soil: The Yearbook of Agriculture 1957 |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |url=https://archive.org/stream/yoa1957 |oclc=704186906 }}
** {{harvc |last=George |first=Ernest J. |last2=Read |last3=Johnson |last4=Ferber |year=1957 |contribution=Shelterbelts and Windbreaks |url=https://archive.org/stream/yoa1957#page/n785/mode/1up |in=Stefferud |ignore-err=yes}}
** {{harvc |last=Harper |first=V. L. |last2=Frank |last3=McQuilkin |year=1957 |contribution=Forest Practices |url=https://archive.org/stream/yoa1957#page/n803/mode/1up |in=Stefferud |ignore-err=yes}}
** {{harvc |last=Stefferud |first=A.|year=1957 |id=Stefferud preface |c=Preface |url=https://archive.org/stream/yoa1957#page/n7/mode/1up |in=Stefferud |ignore-err=yes}}
** {{harvc |last=Stout |first=P. R. |last2=Johnson |year=1957 |c=Trace Elements |url=https://archive.org/stream/yoa1957#page/n167/mode/1up |in=Stefferud |ignore-err=yes}}
** {{harvc |last=Wadleigh |first=C. H.|year=1957 |c=Growth of Plants |url=https://archive.org/stream/yoa1957#page/n57/mode/1up |in=Stefferud |ignore-err=yes}}
</nowiki>|renders=First information.{{sfn|George|Read|Johnson|Ferber|1957}} Second.<ref>{{harvnb|Stout|Johnson|1957}}</ref> Three thru five.<ref>{{harvnb|Stout|Johnson|1957}}</ref><ref>{{harvc|last=Benson|first=Ezra Taft|year=1957|chapter=Foreword|url=https://archive.org/stream/yoa1957#page/n5/mode/1up|in=Stefferud|p=vi |loc=§2 |ignore-err=yes}}</ref>{{sfn|Wadleigh|1957}} Sixth.<ref>[[#Stefferud preface|Stefferud 1957]]</ref>
<!-- ==Notes== --> {{fake heading|sub=3|Notes}}
{{reflist}}
<!-- ==References== --> {{fake heading|sub=3|References}}
* {{cite book |title=Soil: The Yearbook of Agriculture 1957 |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |url=https://archive.org/stream/yoa1957 |oclc=704186906 }}
** {{harvc |last=George |first=Ernest J. |last2=Read |last3=Johnson |last4=Ferber |year=1957 |contribution=Shelterbelts and Windbreaks |url=https://archive.org/stream/yoa1957#page/n785/mode/1up |in=Stefferud |ignore-err=yes}}
** {{harvc |last=Harper |first=V. L. |last2=Frank |last3=McQuilkin |year=1957 |contribution=Forest Practices |url=https://archive.org/stream/yoa1957#page/n803/mode/1up |in=Stefferud |ignore-err=yes |id=none}}
** {{harvc |last=Stefferud |first=A.|year=1957 |id=Stefferud preface |c=Preface |url=https://archive.org/stream/yoa1957#page/n7/mode/1up |in=Stefferud |ignore-err=yes}}
** {{harvc |last=Stout |first=P. R. |last2=Johnson |year=1957 |c=Trace Elements |url=https://archive.org/stream/yoa1957#page/n167/mode/1up |in=Stefferud |ignore-err=yes}}
** {{harvc |last=Wadleigh |first=C. H.|year=1957 |c=Growth of Plants |url=https://archive.org/stream/yoa1957#page/n57/mode/1up |in=Stefferud |ignore-err=yes}}}}<!-- Template:Mra -->
Note again the parameter <code><nowiki>ignore-err=yes</nowiki></code> is simply to suppress errors that occur when this template is embedded, such as in documentation. It should not be used otherwise.
=====More than one contribution=====
There are times when an author or authors will have contributed more than once to a work. When this occurs, it is necessary to disambiguate the CITEREF links from the {{tlx|harv}} or {{tlx|sfn}} templates to the CITEREF id of the appropriate {{tlx|harvc}} template.
:{{tlx|harv|Author|YYYYa}} → {{tlx|harvc|Author|Contribution 1|YYYYa}} → {{tlx|citation|...}}}
:{{tlx|harv|Author|YYYYb}} → {{tlx|harvc|Author|Contribution 2|YYYYb}} ↑
In this example, author David Hunt contributed two appendices to ''Christmas Cacti: The Genus ''Schlumbergera'' and Its Hybrids''.
There are two {{tlx|harvnb}} templates that are disambiguated:
:<code><nowiki>{{harvnb |Hunt |1995a}}</nowiki></code> → Hunt 1995a
:<code><nowiki>{{harvnb |Hunt |1995b}}</nowiki></code> → Hunt 1995b
These link to two {{tlx|harvc}} templates which use {{para|anchor-year}} for their CITEREF id and for the date in the {{tlx|harvc}} rendering as a visual aid for readers:
{{markup|
<nowiki>{{harvnb |Hunt |1995a}}; {{harvnb |Hunt |1995b}}.
<!-- ==References== --> {{fake heading|sub=3|References}}
* {{Citation |last=McMillan |first=AJS |last2=Horobin |first2=JF |year=1995 |title=Christmas Cacti: The Genus ''Schlumbergera'' and Its Hybrids |edition=p/b |publication-place=Sherbourne, UK |publisher=David Hunt |isbn=978-0-9517234-6-3}}
** {{harvc |in=McMillan |in2=Horobin |last=Hunt |first=David |c=Appendix I Names of the species |year=1995 |anchor-year=1995a |mode=cs2 |nb=yes |ignore-err=yes}}
** {{harvc |in=McMillan |in2=Horobin |last=Hunt |first=David |c=Appendix III Excerpts from a Brazilian diary |year=1995 |anchor-year=1995b |mode=cs2 |nb=yes |ignore-err=yes}}
</nowiki>|{{harvnb |Hunt |1995a}}; {{harvnb |Hunt |1995b}}.
<!-- ==References== --> {{fake heading|sub=3|References}}
* {{Citation |last=McMillan |first=AJS |last2=Horobin |first2=JF |year=1995 |title=Christmas Cacti: The Genus ''Schlumbergera'' and Its Hybrids |edition=p/b |publication-place=Sherbourne, UK |publisher=David Hunt |isbn=978-0-9517234-6-3}}
** {{harvc |in=McMillan |in2=Horobin |last=Hunt |first=David |c=Appendix I Names of the species |year=1995 |anchor-year=1995a |mode=cs2 |nb=yes |ignore-err=yes}}
** {{harvc |in=McMillan |in2=Horobin |last=Hunt |first=David |c=Appendix III Excerpts from a Brazilian diary |year=1995 |anchor-year=1995b |mode=cs2 |nb=yes |ignore-err=yes}}}}<!-- Template:Mra -->
==Error messages==
{{tlx|harvc}} emits these error messages:<!--
:<span style="font-size:100%" class="error">harvc: {{para|anchor-year|plain=yes}} missing dab.</span>
::when used, {{para|anchor-year}} must include a single, lowercase letter disambiguator -->
:<span style="font-size:100%" class="error">harvc: author missing from source list.</span>
::the source list parameters {{para|in1}}, {{para|in2}}, {{para|in3}}, and {{para|in4}} form the template's <code>CITEREF</code> link to the full citation. All are not required but must be used in order without numerical gaps.
:<span style="font-size:100%" class="error">harvc: invalid {{para|anchor-year|plain=yes}}.</span>
::when used, {{para|anchor-year}} must be a three- or four-digit number and must have a lowercase <code>CITEREF</code> disambiguator. When the source does not have an identifiable year, use {{para|anchor-year|n.d.{{var|l}}}} or {{para|anchor-year|nd{{var|l}}}} with lowercase <code>CITEREF</code> disambiguator.
:<span style="font-size:100%" class="error">harvc: invalid {{para|display-authors|plain=yes}}.</span>
::the value assigned to {{para|display-authors}} must be a number greater than 0 or the keyword <code>etal</code>
:<span style="font-size:100%" class="error">harvc: invalid {{para|year|plain=yes}}.</span>
::{{para|year}} is an integral part of the template's <code>CITEREF</code> anchor and link. The value of {{para|year}} must be a three- or four-digit number with an optional lowercase <code>CITEREF</code> disambiguator. When the source does not have an identifiable year, use {{para|year|n.d.}} or {{para|year|nd}}.
:<span style="font-size:100%" class="error">harvc: missing {{para|year|plain=yes}}.</span>
::{{para|year}} is missing; the parameter is required.
:<span style="font-size:100%" class="error">harvc: no authors in contributor list.</span>
::this error message indicates that {{tlx|harvc}} can't find any of {{para|last}}, {{para|last1}}, {{para|author}} or {{para|author1}} with an assigned value and so cannot make a usable <code>CITEREF</code> anchor. Add at least one of the listed parameters.
:<span style="font-size:100%" class="error">harvc: required contribution is missing.</span>
::this error message indicates that {{tlx|harvc}} can't find any of {{para|c}}, {{para|chapter}}, or {{para|contribution}} with an assigned value
:<span style="font-size:100%" class="error">harvc: required {{para|id|plain=yes}} parameter missing.</span>
::this error message is emitted when the {{tlx|harvc}} template's <code>CITEREF</code> anchor identifier would conflict with the long-form citation's <code>CITEREF</code> anchor identifier. See [[#Avoiding circular reference|Examples]]
:<span style="font-size:100%" class="error">harvc: {{para|year|plain=yes}} / {{para|anchor-year|plain=yes}} mismatch.</span>
::the year portion of {{para|anchor-year|YYYY{{var|l}}}} must match the year given in {{para|year|YYYY}}
<includeonly>{{Sandbox other||
<!-- Categories below this line, please; interwikis at Wikidata -->
[[Category:Citation utility templates]]
}}</includeonly>
c24qbbvp5oqfo54o5vg8x5akoq88zib
801818
801817
2023-08-18T19:34:08Z
en>Mathglot
0
/* Error messages */ Add link to [[Category:Harv and Sfn no-target errors]].
801818
wikitext
text/x-wiki
{{Documentation subpage}}
<!-- Place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
{{lua|Module:Harvc}}
{{uses TemplateStyles|Module:Citation/CS1/styles.css|noprotcat=yes}}
This template is a citation hybrid that has characteristics of long-form [[Help:Citation Style 1|cs1]] and [[Help:Citation Style 2|cs2]], of short-form {{tlx|sfn}} and of the {{tlx|harv}} families of templates. Its purpose is to provide a method that allows editors to refer to a contribution or chapter in a larger work when more than a few such referrals are required. {{tlx|harvc}} is not a substitute for a properly constructed citation.
Short-form templates {{tlx|sfn}} and {{tlx|harv}} are often used to link from an article's references section to a long-form cs1|2 template in a bibliography section:
:{{tlx|harv}} → {{tlx|cite book}}
It is not uncommon for a source to have multiple contributors. When it is necessary to refer to multiple contributions in the same source, repeating all of the bibliographic details in multiple long-form citation templates adds to references-section clutter. {{tlx|harvc}} is designed to hold only the detail necessary to identify a contribution and link to the enclosing work's long-form citation where all of the bibliographic detail can be found:
:{{tlx|harv}} → {{tlx|harvc}} → {{tlx|cite book}}
== Usage ==
The minimal form is:
:<code><nowiki>{{harvc |last=contributor name |year=publication year |c=contribution title |in=source editor/author name}}</nowiki></code>
According to the comments in [[Module:Harvc]], mistaken {{red|Harvc error: no target:}} error messages may be produced when the template is nested in other templates as on documentation pages. The otherwise undocumented parameter, {{para|ignore-err|yes}}, can be added to prevent this.
===Parameters===
{{tlx|harvc}} creates a <code>CITEREF</code> anchor from one to four contribution or chapter author surnames ({{para|last''n''}}) and the value in {{para|year}}. This allows {{tlx|harvc}} to be the target of a link created by {{tlx|sfn}} or {{tlx|harv}} family templates. From {{para|in{{var|n}}}} and {{para|year}}, {{tlx|harvc}} creates a CITEREF link similar to those created by {{tlx|harvnb}} and {{tlx|sfn}}
: '''|anchor-year=''' – optional, for use for author(s) with more than one contribution to the work; requires CITEREF disambiguator; see [[#More than one contribution|Examples]]
: '''|author-link=''' – optional, title of existing Wikipedia article about the first contributor—not the contributor's website; do not wikilink; alias: '''|author-link1='''
:: '''|author-link''n''=''' – optional, title of existing Wikipedia article about contributor''n''; choose ''n'' to match ''n'' in '''|last''n''='''
: '''|author-mask=''m''''' – optional, replaces name of the first contributor with ''m'' (commonly 2) em dashes; alias: '''|author-mask1='''
:: '''|author-mask''n''=''m''''' – optional, replaces name of contributor''n'' with ''m'' em dashes; choose ''n'' to match ''n'' in '''|last''n''='''
:: '''|author-mask{{var|n}}=<{{var|text}}>''' – optional, replaces name of contributor''n'' with <{{var|text}}>
: '''|c=''' – required, the title of chapter or contribution; rendered quoted in upright font; aliases: '''|chapter=''', '''|contribution='''
: '''|display-authors=''' – optional, defines how {{tlx|harvc}} displays the contributor list; ignored when '''|name-list-style=harv''':
:: {{para|display-authors}} – when empty or omitted, displays all contributor names in last/first format
:: {{para|display-authors|{{var|n}}}} – displays ''n'' contributor names in last/first format; appends et al. when ''n'' is less than the number of contributors included in the template
:: {{para|display-authors|etal}} – displays all contributor names in last/first format and appends et al.
: '''|first=''' – optional, first contributor's given or first name; alias: '''|first1='''
:: '''|first''n''=''' – optional, contributor''n'' given or first name; ''n'' begins at 2 and increases by 1 for each additional '''|first''n''='''
: '''|id=''' – required when {{para|last1}}-{{para|last4}} are the same as {{para|in1}}-{{para|in4}}; otherwise optional. See [[#Avoiding circular reference|Examples]]
: '''|in=''' – required, surname or last name of first editor or author of the work that includes the contribution; aliases: '''|in1='''
: '''|in2=''' – optional, surname or last name of second editor or author
: '''|in3=''' – optional, surname or last name of third editor or author
: '''|in4=''' – optional, surname or last name of fourth editor or author
: '''|last=''' – required, surname or last name of first author; aliases: '''|last1='''
:: '''|last''n''=''' – optional, contributor''n'' surname or last name; ''n'' begins at 2 and increases by 1 for each additional '''|last''n''=''';
: '''|loc=''' – optional, other location identifier, displays after {{para|p}} or {{para|pp}}
: '''|mode=''' – controls rendered display to match that of adjacent CS1 or CS2 citations; defaults to CS1 style
:: '''|mode=cs2''' – mimic {{tlx|citation}} style (comma separators, no terminal punctuation, static text not capitalized)
: '''|name-list-style=''' – optional, controls contributor name list display style
:: '''|name-list-style=harv''' – mimic {{tlx|sfn}} or {{tlx|harv}} format (one to four last names); overrides '''|display-authors='''
:: '''|name-list-style=amp''' – inserts an ampersand between the last two contributor names
: '''|nb=''' – optional, when set to <code>yes</code>, instructs {{tlx|harvc}} to render source link without parentheses around the year; same format as that produced by {{tlx|harvnb}}
: '''|p=''' – optional, single page number where cited material can be found; aliases: '''|page='''
: '''|pp=''' – optional, multiple page numbers, page ranges, etc where cited material can be found; aliases: '''|pages='''
: '''|ps=''' – optional, sets terminal punctuation; default is full stop; overrides '''|mode=cs2'''; aliases: '''|postscript='''
:: '''|ps=none''' – renders output without terminal punctuation
: '''|url=''' – optional, URL of an online location where the text of the contribution can be found; aliases: '''|chapter-url''', '''|contribution-url'''
: '''|url-access=''' – optional, use when URL links to a source behind a registration barrier or paywall; inserts [[Help:Citation_Style_1#Registration_or_subscription_required|cs1{{pipe}}2 access icon]]; accepted values are: <code>limited</code>, <code>registration</code>, <code>subscription</code>
: '''|year=''' – required, publication year of the work that includes the contribution
===Examples===
====Basic example====
{| class=wikitable style="width: 100%"
! scope=col style="width: 50%" | Without {{tl|harvc}}
! scope=col style="width: 50%" | With {{tl|harvc}}
|-
|
* {{cite book |last=Doe |first=John |year=1990 |chapter=Chapter 1 |editor-last=Moe |editor-first=Mary |title=The Book of Knowledge |publisher=University Press |ref=none}}
* {{cite book |last=Poe |first=Jane |year=1990 |chapter=Chapter 2 |editor-last=Moe |editor-first=Mary |title=The Book of Knowledge |publisher=University Press |ref=none}}
* {{cite book |last=Roe |first=Robert |year=1990 |chapter=Chapter 3 |editor-last=Moe |editor-first=Mary |title=The Book of Knowledge |publisher=University Press |ref=none}}
|
* {{cite book |editor-last=Moe |editor-first=Mary |year=1990 |title=The Book of Knowledge |publisher=University Press}}
** {{harvc |last=Doe |first=John |c=Chapter 1 |in=Moe |year=1990 |id=none |ignore-err=yes}}
** {{harvc |last=Poe |first=Jane |c=Chapter 2 |in=Moe |year=1990 |id=none |ignore-err=yes}}
** {{harvc |last=Roe |first=Robert |c=Chapter 3 |in=Moe |year=1990 |id=none |ignore-err=yes}}
|}
{| class=wikitable style="width: 100%"
|+ Markup
|-
| style="width: 50%" |
<nowiki>
* {{cite book |last=Doe |first=John |year=1990 |chapter=Chapter 1 |editor-last=Moe |editor-first=Mary |title=The Book of Knowledge |publisher=University Press}}
* {{cite book |last=Poe |first=Jane |year=1990 |chapter=Chapter 2 |editor-last=Moe |editor-first=Mary |title=The Book of Knowledge |publisher=University Press}}
* {{cite book |last=Roe |first=Robert |year=1990 |chapter=Chapter 3 |editor-last=Moe |editor-first=Mary |title=The Book of Knowledge |publisher=University Press}}
</nowiki>
| style="width: 50%|
<nowiki>
* {{cite book |editor-last=Moe |editor-first=Mary |year=1990 |title=The Book of Knowledge |publisher=University Press}}
** {{harvc |last=Doe |first=John |c=Chapter 1 |in=Moe |year=1990}}
** {{harvc |last=Poe |first=Jane |c=Chapter 2 |in=Moe |year=1990}}
** {{harvc |last=Roe |first=Robert |c=Chapter 3 |in=Moe |year=1990}}
</nowiki>
|}
====Detailed example====
When a Wikipedia article makes reference to a work that contains multiple chapters by different authors, bibliographies and reference sections can look rather cluttered:
* {{cite book |last=George |first=Ernest J. |last2=Read |first2=Ralph A. |last3=Johnson |first3=R. W. |last4=Ferber |first4=A. E. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Shelterbelts and Windbreaks |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=https://archive.org/stream/yoa1957#page/n785/mode/1up |oclc=704186906 |ref=none}}
* {{cite book |last=Harper |first=V. L. |last2=Frank |first2=Bernard |last3=McQuilkin |first3=W. E. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Forest Practices and Productivity |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=https://archive.org/stream/yoa1957#page/n803/mode/1up |oclc=704186906 |ref=none}}
* {{cite book |last=Stout |first=P. R. |last2=Johnson |first2=C. M. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Trace Elements |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=https://archive.org/stream/yoa1957#page/n167/mode/1up |oclc=704186906 |ref=none}}
* {{cite book |last=Wadleigh |first=C. H. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Growth of Plants |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=https://archive.org/stream/yoa1957#page/n57/mode/1up |oclc=704186906 |ref=none}}
As the list grows longer, the look becomes more cluttered with the unnecessarily repeated detail of full-length citations. With {{tlx|harvc}} editors can link to shorter, less detailed contribution citations using standard implementations of {{tlx|sfn}} templates and {{tlx|harv}} templates (and also wrapped in {{tag|ref}} tags with {{tlx|harvnb}}). {{tlx|harvc}} may also be wrapped in {{tag|ref}} tags so that it becomes part of the article's References section. See full example below.
=====Avoiding circular reference=====
It may sometimes be necessary to cite a contribution of a source's editor or author such that {{para|last1}} through {{para|last4}} are the same as {{para|in1}} through {{para|in4}}, an editor's preface for example. Such citations can, depending on placement, cause {{tlx|sfn}} or {{tlx|harv}}-family references to link directly to the citation instead of to the {{tlx|harvc}} template, or cause circular links ({{tlx|harvc}} linking to itself because its <code>CITEREF</code> anchor identifier is the same as the citation's <code>CITEREF</code> anchor identifier). If {{para|id}} is set, {{tlx|harvc}} will use it as an anchor identifier; if {{para|id}} is not set, {{tlx|harvc}} will emit an error message when {{para|last1}} through {{para|last4}} are the same as {{para|in1}} through {{para|in4}}.
For example, to reference an editor's preface from article text, create a wikilink inside {{tag|ref}} tags:
:<code><nowiki><ref>[[#Stefferud preface|Stefferud 1957]]</ref></nowiki></code>
Write a {{tlx|harvc}} template with {{para|id|Stefferud preface}}
:<code><nowiki>{{harvc |last=Stefferud |first=A.|year=1957 |id=Stefferud preface |c=Preface |url=https://archive.org/stream/yoa1957#page/n7/mode/1up |in=Stefferud}}</nowiki></code>
{{markupv|title=Full example:|markup=
<nowiki>First information.{{sfn|George|Read|Johnson|Ferber|1957}} Second.<ref>{{harvnb|Stout|Johnson|1957}}</ref> Three thru five.<ref>{{harvnb|Stout|Johnson|1957}}</ref><ref>{{harvc|last=Benson|first=Ezra Taft|year=1957|chapter=Foreword|url=https://archive.org/stream/yoa1957#page/n5/mode/1up|in=Stefferud|p=vi |loc=§2 |ignore-err=yes}}</ref>{{sfn|Wadleigh|1957}} Sixth.<ref>[[#Stefferud preface|Stefferud 1957]]</ref>
<!-- ==Notes== --> {{fake heading|sub=3|Notes}}
{{reflist}}
<!-- ==References== --> {{fake heading|sub=3|References}}
* {{cite book |title=Soil: The Yearbook of Agriculture 1957 |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |url=https://archive.org/stream/yoa1957 |oclc=704186906 }}
** {{harvc |last=George |first=Ernest J. |last2=Read |last3=Johnson |last4=Ferber |year=1957 |contribution=Shelterbelts and Windbreaks |url=https://archive.org/stream/yoa1957#page/n785/mode/1up |in=Stefferud |ignore-err=yes}}
** {{harvc |last=Harper |first=V. L. |last2=Frank |last3=McQuilkin |year=1957 |contribution=Forest Practices |url=https://archive.org/stream/yoa1957#page/n803/mode/1up |in=Stefferud |ignore-err=yes}}
** {{harvc |last=Stefferud |first=A.|year=1957 |id=Stefferud preface |c=Preface |url=https://archive.org/stream/yoa1957#page/n7/mode/1up |in=Stefferud |ignore-err=yes}}
** {{harvc |last=Stout |first=P. R. |last2=Johnson |year=1957 |c=Trace Elements |url=https://archive.org/stream/yoa1957#page/n167/mode/1up |in=Stefferud |ignore-err=yes}}
** {{harvc |last=Wadleigh |first=C. H.|year=1957 |c=Growth of Plants |url=https://archive.org/stream/yoa1957#page/n57/mode/1up |in=Stefferud |ignore-err=yes}}
</nowiki>|renders=First information.{{sfn|George|Read|Johnson|Ferber|1957}} Second.<ref>{{harvnb|Stout|Johnson|1957}}</ref> Three thru five.<ref>{{harvnb|Stout|Johnson|1957}}</ref><ref>{{harvc|last=Benson|first=Ezra Taft|year=1957|chapter=Foreword|url=https://archive.org/stream/yoa1957#page/n5/mode/1up|in=Stefferud|p=vi |loc=§2 |ignore-err=yes}}</ref>{{sfn|Wadleigh|1957}} Sixth.<ref>[[#Stefferud preface|Stefferud 1957]]</ref>
<!-- ==Notes== --> {{fake heading|sub=3|Notes}}
{{reflist}}
<!-- ==References== --> {{fake heading|sub=3|References}}
* {{cite book |title=Soil: The Yearbook of Agriculture 1957 |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |url=https://archive.org/stream/yoa1957 |oclc=704186906 }}
** {{harvc |last=George |first=Ernest J. |last2=Read |last3=Johnson |last4=Ferber |year=1957 |contribution=Shelterbelts and Windbreaks |url=https://archive.org/stream/yoa1957#page/n785/mode/1up |in=Stefferud |ignore-err=yes}}
** {{harvc |last=Harper |first=V. L. |last2=Frank |last3=McQuilkin |year=1957 |contribution=Forest Practices |url=https://archive.org/stream/yoa1957#page/n803/mode/1up |in=Stefferud |ignore-err=yes |id=none}}
** {{harvc |last=Stefferud |first=A.|year=1957 |id=Stefferud preface |c=Preface |url=https://archive.org/stream/yoa1957#page/n7/mode/1up |in=Stefferud |ignore-err=yes}}
** {{harvc |last=Stout |first=P. R. |last2=Johnson |year=1957 |c=Trace Elements |url=https://archive.org/stream/yoa1957#page/n167/mode/1up |in=Stefferud |ignore-err=yes}}
** {{harvc |last=Wadleigh |first=C. H.|year=1957 |c=Growth of Plants |url=https://archive.org/stream/yoa1957#page/n57/mode/1up |in=Stefferud |ignore-err=yes}}}}<!-- Template:Mra -->
Note again the parameter <code><nowiki>ignore-err=yes</nowiki></code> is simply to suppress errors that occur when this template is embedded, such as in documentation. It should not be used otherwise.
=====More than one contribution=====
There are times when an author or authors will have contributed more than once to a work. When this occurs, it is necessary to disambiguate the CITEREF links from the {{tlx|harv}} or {{tlx|sfn}} templates to the CITEREF id of the appropriate {{tlx|harvc}} template.
:{{tlx|harv|Author|YYYYa}} → {{tlx|harvc|Author|Contribution 1|YYYYa}} → {{tlx|citation|...}}}
:{{tlx|harv|Author|YYYYb}} → {{tlx|harvc|Author|Contribution 2|YYYYb}} ↑
In this example, author David Hunt contributed two appendices to ''Christmas Cacti: The Genus ''Schlumbergera'' and Its Hybrids''.
There are two {{tlx|harvnb}} templates that are disambiguated:
:<code><nowiki>{{harvnb |Hunt |1995a}}</nowiki></code> → Hunt 1995a
:<code><nowiki>{{harvnb |Hunt |1995b}}</nowiki></code> → Hunt 1995b
These link to two {{tlx|harvc}} templates which use {{para|anchor-year}} for their CITEREF id and for the date in the {{tlx|harvc}} rendering as a visual aid for readers:
{{markup|
<nowiki>{{harvnb |Hunt |1995a}}; {{harvnb |Hunt |1995b}}.
<!-- ==References== --> {{fake heading|sub=3|References}}
* {{Citation |last=McMillan |first=AJS |last2=Horobin |first2=JF |year=1995 |title=Christmas Cacti: The Genus ''Schlumbergera'' and Its Hybrids |edition=p/b |publication-place=Sherbourne, UK |publisher=David Hunt |isbn=978-0-9517234-6-3}}
** {{harvc |in=McMillan |in2=Horobin |last=Hunt |first=David |c=Appendix I Names of the species |year=1995 |anchor-year=1995a |mode=cs2 |nb=yes |ignore-err=yes}}
** {{harvc |in=McMillan |in2=Horobin |last=Hunt |first=David |c=Appendix III Excerpts from a Brazilian diary |year=1995 |anchor-year=1995b |mode=cs2 |nb=yes |ignore-err=yes}}
</nowiki>|{{harvnb |Hunt |1995a}}; {{harvnb |Hunt |1995b}}.
<!-- ==References== --> {{fake heading|sub=3|References}}
* {{Citation |last=McMillan |first=AJS |last2=Horobin |first2=JF |year=1995 |title=Christmas Cacti: The Genus ''Schlumbergera'' and Its Hybrids |edition=p/b |publication-place=Sherbourne, UK |publisher=David Hunt |isbn=978-0-9517234-6-3}}
** {{harvc |in=McMillan |in2=Horobin |last=Hunt |first=David |c=Appendix I Names of the species |year=1995 |anchor-year=1995a |mode=cs2 |nb=yes |ignore-err=yes}}
** {{harvc |in=McMillan |in2=Horobin |last=Hunt |first=David |c=Appendix III Excerpts from a Brazilian diary |year=1995 |anchor-year=1995b |mode=cs2 |nb=yes |ignore-err=yes}}}}<!-- Template:Mra -->
==Error messages==
{{tlx|harvc}} emits these error messages:<!--
:<span style="font-size:100%" class="error">harvc: {{para|anchor-year|plain=yes}} missing dab.</span>
::when used, {{para|anchor-year}} must include a single, lowercase letter disambiguator -->
:<span style="font-size:100%" class="error">harvc: author missing from source list.</span>
::the source list parameters {{para|in1}}, {{para|in2}}, {{para|in3}}, and {{para|in4}} form the template's <code>CITEREF</code> link to the full citation. All are not required but must be used in order without numerical gaps.
:<span style="font-size:100%" class="error">harvc: invalid {{para|anchor-year|plain=yes}}.</span>
::when used, {{para|anchor-year}} must be a three- or four-digit number and must have a lowercase <code>CITEREF</code> disambiguator. When the source does not have an identifiable year, use {{para|anchor-year|n.d.{{var|l}}}} or {{para|anchor-year|nd{{var|l}}}} with lowercase <code>CITEREF</code> disambiguator.
:<span style="font-size:100%" class="error">harvc: invalid {{para|display-authors|plain=yes}}.</span>
::the value assigned to {{para|display-authors}} must be a number greater than 0 or the keyword <code>etal</code>
:<span style="font-size:100%" class="error">harvc: invalid {{para|year|plain=yes}}.</span>
::{{para|year}} is an integral part of the template's <code>CITEREF</code> anchor and link. The value of {{para|year}} must be a three- or four-digit number with an optional lowercase <code>CITEREF</code> disambiguator. When the source does not have an identifiable year, use {{para|year|n.d.}} or {{para|year|nd}}.
:<span style="font-size:100%" class="error">harvc: missing {{para|year|plain=yes}}.</span>
::{{para|year}} is missing; the parameter is required.
:<span style="font-size:100%" class="error">harvc: no authors in contributor list.</span>
::this error message indicates that {{tlx|harvc}} can't find any of {{para|last}}, {{para|last1}}, {{para|author}} or {{para|author1}} with an assigned value and so cannot make a usable <code>CITEREF</code> anchor. Add at least one of the listed parameters.
:<span style="font-size:100%" class="error">harvc: required contribution is missing.</span>
::this error message indicates that {{tlx|harvc}} can't find any of {{para|c}}, {{para|chapter}}, or {{para|contribution}} with an assigned value
:<span style="font-size:100%" class="error">harvc: required {{para|id|plain=yes}} parameter missing.</span>
::this error message is emitted when the {{tlx|harvc}} template's <code>CITEREF</code> anchor identifier would conflict with the long-form citation's <code>CITEREF</code> anchor identifier. See [[#Avoiding circular reference|Examples]]
:<span style="font-size:100%" class="error">harvc: {{para|year|plain=yes}} / {{para|anchor-year|plain=yes}} mismatch.</span>
::the year portion of {{para|anchor-year|YYYY{{var|l}}}} must match the year given in {{para|year|YYYY}}
Additional information about "no target" and other category errors may be found at [[:Category:Harv and Sfn no-target errors]].
<includeonly>{{Sandbox other||
<!-- Categories below this line, please; interwikis at Wikidata -->
[[Category:Citation utility templates]]
}}</includeonly>
ti8e6ngcqrcdj2gricziwqaks56uhti
801819
801818
2023-10-20T19:58:54Z
en>Mathglot
0
/* Collision with a different work */ It's not only the case of two chapters of one book by a single author that requires resolution by distinguishing the CITEREF id, there's also this case. Not sure if we need an example here or not.
801819
wikitext
text/x-wiki
{{Documentation subpage}}
<!-- Place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
{{lua|Module:Harvc}}
{{uses TemplateStyles|Module:Citation/CS1/styles.css|noprotcat=yes}}
This template is a citation hybrid that has characteristics of long-form [[Help:Citation Style 1|cs1]] and [[Help:Citation Style 2|cs2]], of short-form {{tlx|sfn}} and of the {{tlx|harv}} families of templates. Its purpose is to provide a method that allows editors to refer to a contribution or chapter in a larger work when more than a few such referrals are required. {{tlx|harvc}} is not a substitute for a properly constructed citation.
Short-form templates {{tlx|sfn}} and {{tlx|harv}} are often used to link from an article's references section to a long-form cs1|2 template in a bibliography section:
:{{tlx|harv}} → {{tlx|cite book}}
It is not uncommon for a source to have multiple contributors. When it is necessary to refer to multiple contributions in the same source, repeating all of the bibliographic details in multiple long-form citation templates adds to references-section clutter. {{tlx|harvc}} is designed to hold only the detail necessary to identify a contribution and link to the enclosing work's long-form citation where all of the bibliographic detail can be found:
:{{tlx|harv}} → {{tlx|harvc}} → {{tlx|cite book}}
== Usage ==
The minimal form is:
:<code><nowiki>{{harvc |last=contributor name |year=publication year |c=contribution title |in=source editor/author name}}</nowiki></code>
According to the comments in [[Module:Harvc]], mistaken {{red|Harvc error: no target:}} error messages may be produced when the template is nested in other templates as on documentation pages. The otherwise undocumented parameter, {{para|ignore-err|yes}}, can be added to prevent this.
===Parameters===
{{tlx|harvc}} creates a <code>CITEREF</code> anchor from one to four contribution or chapter author surnames ({{para|last''n''}}) and the value in {{para|year}}. This allows {{tlx|harvc}} to be the target of a link created by {{tlx|sfn}} or {{tlx|harv}} family templates. From {{para|in{{var|n}}}} and {{para|year}}, {{tlx|harvc}} creates a CITEREF link similar to those created by {{tlx|harvnb}} and {{tlx|sfn}}
: '''|anchor-year=''' – optional, for use for author(s) with more than one contribution to the work; requires CITEREF disambiguator; see [[#More than one contribution|Examples]]
: '''|author-link=''' – optional, title of existing Wikipedia article about the first contributor—not the contributor's website; do not wikilink; alias: '''|author-link1='''
:: '''|author-link''n''=''' – optional, title of existing Wikipedia article about contributor''n''; choose ''n'' to match ''n'' in '''|last''n''='''
: '''|author-mask=''m''''' – optional, replaces name of the first contributor with ''m'' (commonly 2) em dashes; alias: '''|author-mask1='''
:: '''|author-mask''n''=''m''''' – optional, replaces name of contributor''n'' with ''m'' em dashes; choose ''n'' to match ''n'' in '''|last''n''='''
:: '''|author-mask{{var|n}}=<{{var|text}}>''' – optional, replaces name of contributor''n'' with <{{var|text}}>
: '''|c=''' – required, the title of chapter or contribution; rendered quoted in upright font; aliases: '''|chapter=''', '''|contribution='''
: '''|display-authors=''' – optional, defines how {{tlx|harvc}} displays the contributor list; ignored when '''|name-list-style=harv''':
:: {{para|display-authors}} – when empty or omitted, displays all contributor names in last/first format
:: {{para|display-authors|{{var|n}}}} – displays ''n'' contributor names in last/first format; appends et al. when ''n'' is less than the number of contributors included in the template
:: {{para|display-authors|etal}} – displays all contributor names in last/first format and appends et al.
: '''|first=''' – optional, first contributor's given or first name; alias: '''|first1='''
:: '''|first''n''=''' – optional, contributor''n'' given or first name; ''n'' begins at 2 and increases by 1 for each additional '''|first''n''='''
: '''|id=''' – required when {{para|last1}}-{{para|last4}} are the same as {{para|in1}}-{{para|in4}}; otherwise optional. See [[#Avoiding circular reference|Examples]]
: '''|in=''' – required, surname or last name of first editor or author of the work that includes the contribution; aliases: '''|in1='''
: '''|in2=''' – optional, surname or last name of second editor or author
: '''|in3=''' – optional, surname or last name of third editor or author
: '''|in4=''' – optional, surname or last name of fourth editor or author
: '''|last=''' – required, surname or last name of first author; aliases: '''|last1='''
:: '''|last''n''=''' – optional, contributor''n'' surname or last name; ''n'' begins at 2 and increases by 1 for each additional '''|last''n''=''';
: '''|loc=''' – optional, other location identifier, displays after {{para|p}} or {{para|pp}}
: '''|mode=''' – controls rendered display to match that of adjacent CS1 or CS2 citations; defaults to CS1 style
:: '''|mode=cs2''' – mimic {{tlx|citation}} style (comma separators, no terminal punctuation, static text not capitalized)
: '''|name-list-style=''' – optional, controls contributor name list display style
:: '''|name-list-style=harv''' – mimic {{tlx|sfn}} or {{tlx|harv}} format (one to four last names); overrides '''|display-authors='''
:: '''|name-list-style=amp''' – inserts an ampersand between the last two contributor names
: '''|nb=''' – optional, when set to <code>yes</code>, instructs {{tlx|harvc}} to render source link without parentheses around the year; same format as that produced by {{tlx|harvnb}}
: '''|p=''' – optional, single page number where cited material can be found; aliases: '''|page='''
: '''|pp=''' – optional, multiple page numbers, page ranges, etc where cited material can be found; aliases: '''|pages='''
: '''|ps=''' – optional, sets terminal punctuation; default is full stop; overrides '''|mode=cs2'''; aliases: '''|postscript='''
:: '''|ps=none''' – renders output without terminal punctuation
: '''|url=''' – optional, URL of an online location where the text of the contribution can be found; aliases: '''|chapter-url''', '''|contribution-url'''
: '''|url-access=''' – optional, use when URL links to a source behind a registration barrier or paywall; inserts [[Help:Citation_Style_1#Registration_or_subscription_required|cs1{{pipe}}2 access icon]]; accepted values are: <code>limited</code>, <code>registration</code>, <code>subscription</code>
: '''|year=''' – required, publication year of the work that includes the contribution
===Examples===
====Basic example====
{| class=wikitable style="width: 100%"
! scope=col style="width: 50%" | Without {{tl|harvc}}
! scope=col style="width: 50%" | With {{tl|harvc}}
|-
|
* {{cite book |last=Doe |first=John |year=1990 |chapter=Chapter 1 |editor-last=Moe |editor-first=Mary |title=The Book of Knowledge |publisher=University Press |ref=none}}
* {{cite book |last=Poe |first=Jane |year=1990 |chapter=Chapter 2 |editor-last=Moe |editor-first=Mary |title=The Book of Knowledge |publisher=University Press |ref=none}}
* {{cite book |last=Roe |first=Robert |year=1990 |chapter=Chapter 3 |editor-last=Moe |editor-first=Mary |title=The Book of Knowledge |publisher=University Press |ref=none}}
|
* {{cite book |editor-last=Moe |editor-first=Mary |year=1990 |title=The Book of Knowledge |publisher=University Press}}
** {{harvc |last=Doe |first=John |c=Chapter 1 |in=Moe |year=1990 |id=none |ignore-err=yes}}
** {{harvc |last=Poe |first=Jane |c=Chapter 2 |in=Moe |year=1990 |id=none |ignore-err=yes}}
** {{harvc |last=Roe |first=Robert |c=Chapter 3 |in=Moe |year=1990 |id=none |ignore-err=yes}}
|}
{| class=wikitable style="width: 100%"
|+ Markup
|-
| style="width: 50%" |
<nowiki>
* {{cite book |last=Doe |first=John |year=1990 |chapter=Chapter 1 |editor-last=Moe |editor-first=Mary |title=The Book of Knowledge |publisher=University Press}}
* {{cite book |last=Poe |first=Jane |year=1990 |chapter=Chapter 2 |editor-last=Moe |editor-first=Mary |title=The Book of Knowledge |publisher=University Press}}
* {{cite book |last=Roe |first=Robert |year=1990 |chapter=Chapter 3 |editor-last=Moe |editor-first=Mary |title=The Book of Knowledge |publisher=University Press}}
</nowiki>
| style="width: 50%|
<nowiki>
* {{cite book |editor-last=Moe |editor-first=Mary |year=1990 |title=The Book of Knowledge |publisher=University Press}}
** {{harvc |last=Doe |first=John |c=Chapter 1 |in=Moe |year=1990}}
** {{harvc |last=Poe |first=Jane |c=Chapter 2 |in=Moe |year=1990}}
** {{harvc |last=Roe |first=Robert |c=Chapter 3 |in=Moe |year=1990}}
</nowiki>
|}
====Detailed example====
When a Wikipedia article makes reference to a work that contains multiple chapters by different authors, bibliographies and reference sections can look rather cluttered:
* {{cite book |last=George |first=Ernest J. |last2=Read |first2=Ralph A. |last3=Johnson |first3=R. W. |last4=Ferber |first4=A. E. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Shelterbelts and Windbreaks |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=https://archive.org/stream/yoa1957#page/n785/mode/1up |oclc=704186906 |ref=none}}
* {{cite book |last=Harper |first=V. L. |last2=Frank |first2=Bernard |last3=McQuilkin |first3=W. E. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Forest Practices and Productivity |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=https://archive.org/stream/yoa1957#page/n803/mode/1up |oclc=704186906 |ref=none}}
* {{cite book |last=Stout |first=P. R. |last2=Johnson |first2=C. M. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Trace Elements |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=https://archive.org/stream/yoa1957#page/n167/mode/1up |oclc=704186906 |ref=none}}
* {{cite book |last=Wadleigh |first=C. H. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Growth of Plants |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=https://archive.org/stream/yoa1957#page/n57/mode/1up |oclc=704186906 |ref=none}}
As the list grows longer, the look becomes more cluttered with the unnecessarily repeated detail of full-length citations. With {{tlx|harvc}} editors can link to shorter, less detailed contribution citations using standard implementations of {{tlx|sfn}} templates and {{tlx|harv}} templates (and also wrapped in {{tag|ref}} tags with {{tlx|harvnb}}). {{tlx|harvc}} may also be wrapped in {{tag|ref}} tags so that it becomes part of the article's References section. See full example below.
=====Avoiding circular reference=====
It may sometimes be necessary to cite a contribution of a source's editor or author such that {{para|last1}} through {{para|last4}} are the same as {{para|in1}} through {{para|in4}}, an editor's preface for example. Such citations can, depending on placement, cause {{tlx|sfn}} or {{tlx|harv}}-family references to link directly to the citation instead of to the {{tlx|harvc}} template, or cause circular links ({{tlx|harvc}} linking to itself because its <code>CITEREF</code> anchor identifier is the same as the citation's <code>CITEREF</code> anchor identifier). If {{para|id}} is set, {{tlx|harvc}} will use it as an anchor identifier; if {{para|id}} is not set, {{tlx|harvc}} will emit an error message when {{para|last1}} through {{para|last4}} are the same as {{para|in1}} through {{para|in4}}.
For example, to reference an editor's preface from article text, create a wikilink inside {{tag|ref}} tags:
:<code><nowiki><ref>[[#Stefferud preface|Stefferud 1957]]</ref></nowiki></code>
Write a {{tlx|harvc}} template with {{para|id|Stefferud preface}}
:<code><nowiki>{{harvc |last=Stefferud |first=A.|year=1957 |id=Stefferud preface |c=Preface |url=https://archive.org/stream/yoa1957#page/n7/mode/1up |in=Stefferud}}</nowiki></code>
{{markupv|title=Full example:|markup=
<nowiki>First information.{{sfn|George|Read|Johnson|Ferber|1957}} Second.<ref>{{harvnb|Stout|Johnson|1957}}</ref> Three thru five.<ref>{{harvnb|Stout|Johnson|1957}}</ref><ref>{{harvc|last=Benson|first=Ezra Taft|year=1957|chapter=Foreword|url=https://archive.org/stream/yoa1957#page/n5/mode/1up|in=Stefferud|p=vi |loc=§2 |ignore-err=yes}}</ref>{{sfn|Wadleigh|1957}} Sixth.<ref>[[#Stefferud preface|Stefferud 1957]]</ref>
<!-- ==Notes== --> {{fake heading|sub=3|Notes}}
{{reflist}}
<!-- ==References== --> {{fake heading|sub=3|References}}
* {{cite book |title=Soil: The Yearbook of Agriculture 1957 |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |url=https://archive.org/stream/yoa1957 |oclc=704186906 }}
** {{harvc |last=George |first=Ernest J. |last2=Read |last3=Johnson |last4=Ferber |year=1957 |contribution=Shelterbelts and Windbreaks |url=https://archive.org/stream/yoa1957#page/n785/mode/1up |in=Stefferud |ignore-err=yes}}
** {{harvc |last=Harper |first=V. L. |last2=Frank |last3=McQuilkin |year=1957 |contribution=Forest Practices |url=https://archive.org/stream/yoa1957#page/n803/mode/1up |in=Stefferud |ignore-err=yes}}
** {{harvc |last=Stefferud |first=A.|year=1957 |id=Stefferud preface |c=Preface |url=https://archive.org/stream/yoa1957#page/n7/mode/1up |in=Stefferud |ignore-err=yes}}
** {{harvc |last=Stout |first=P. R. |last2=Johnson |year=1957 |c=Trace Elements |url=https://archive.org/stream/yoa1957#page/n167/mode/1up |in=Stefferud |ignore-err=yes}}
** {{harvc |last=Wadleigh |first=C. H.|year=1957 |c=Growth of Plants |url=https://archive.org/stream/yoa1957#page/n57/mode/1up |in=Stefferud |ignore-err=yes}}
</nowiki>|renders=First information.{{sfn|George|Read|Johnson|Ferber|1957}} Second.<ref>{{harvnb|Stout|Johnson|1957}}</ref> Three thru five.<ref>{{harvnb|Stout|Johnson|1957}}</ref><ref>{{harvc|last=Benson|first=Ezra Taft|year=1957|chapter=Foreword|url=https://archive.org/stream/yoa1957#page/n5/mode/1up|in=Stefferud|p=vi |loc=§2 |ignore-err=yes}}</ref>{{sfn|Wadleigh|1957}} Sixth.<ref>[[#Stefferud preface|Stefferud 1957]]</ref>
<!-- ==Notes== --> {{fake heading|sub=3|Notes}}
{{reflist}}
<!-- ==References== --> {{fake heading|sub=3|References}}
* {{cite book |title=Soil: The Yearbook of Agriculture 1957 |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |url=https://archive.org/stream/yoa1957 |oclc=704186906 }}
** {{harvc |last=George |first=Ernest J. |last2=Read |last3=Johnson |last4=Ferber |year=1957 |contribution=Shelterbelts and Windbreaks |url=https://archive.org/stream/yoa1957#page/n785/mode/1up |in=Stefferud |ignore-err=yes}}
** {{harvc |last=Harper |first=V. L. |last2=Frank |last3=McQuilkin |year=1957 |contribution=Forest Practices |url=https://archive.org/stream/yoa1957#page/n803/mode/1up |in=Stefferud |ignore-err=yes |id=none}}
** {{harvc |last=Stefferud |first=A.|year=1957 |id=Stefferud preface |c=Preface |url=https://archive.org/stream/yoa1957#page/n7/mode/1up |in=Stefferud |ignore-err=yes}}
** {{harvc |last=Stout |first=P. R. |last2=Johnson |year=1957 |c=Trace Elements |url=https://archive.org/stream/yoa1957#page/n167/mode/1up |in=Stefferud |ignore-err=yes}}
** {{harvc |last=Wadleigh |first=C. H.|year=1957 |c=Growth of Plants |url=https://archive.org/stream/yoa1957#page/n57/mode/1up |in=Stefferud |ignore-err=yes}}}}<!-- Template:Mra -->
Note again the parameter <code><nowiki>ignore-err=yes</nowiki></code> is simply to suppress errors that occur when this template is embedded, such as in documentation. It should not be used otherwise.
=====More than one contribution=====
There are times when an author or authors will have contributed more than once to a work. When this occurs, it is necessary to disambiguate the CITEREF links from the {{tlx|harv}} or {{tlx|sfn}} templates to the CITEREF id of the appropriate {{tlx|harvc}} template.
:{{tlx|harv|Author|YYYYa}} → {{tlx|harvc|Author|Contribution 1|YYYYa}} → {{tlx|citation|...}}}
:{{tlx|harv|Author|YYYYb}} → {{tlx|harvc|Author|Contribution 2|YYYYb}} ↑
In this example, author David Hunt contributed two appendices to ''Christmas Cacti: The Genus ''Schlumbergera'' and Its Hybrids''.
There are two {{tlx|harvnb}} templates that are disambiguated:
:<code><nowiki>{{harvnb |Hunt |1995a}}</nowiki></code> → Hunt 1995a
:<code><nowiki>{{harvnb |Hunt |1995b}}</nowiki></code> → Hunt 1995b
These link to two {{tlx|harvc}} templates which use {{para|anchor-year}} for their CITEREF id and for the date in the {{tlx|harvc}} rendering as a visual aid for readers:
{{markup|
<nowiki>{{harvnb |Hunt |1995a}}; {{harvnb |Hunt |1995b}}.
<!-- ==References== --> {{fake heading|sub=3|References}}
* {{Citation |last=McMillan |first=AJS |last2=Horobin |first2=JF |year=1995 |title=Christmas Cacti: The Genus ''Schlumbergera'' and Its Hybrids |edition=p/b |publication-place=Sherbourne, UK |publisher=David Hunt |isbn=978-0-9517234-6-3}}
** {{harvc |in=McMillan |in2=Horobin |last=Hunt |first=David |c=Appendix I Names of the species |year=1995 |anchor-year=1995a |mode=cs2 |nb=yes |ignore-err=yes}}
** {{harvc |in=McMillan |in2=Horobin |last=Hunt |first=David |c=Appendix III Excerpts from a Brazilian diary |year=1995 |anchor-year=1995b |mode=cs2 |nb=yes |ignore-err=yes}}
</nowiki>|{{harvnb |Hunt |1995a}}; {{harvnb |Hunt |1995b}}.
<!-- ==References== --> {{fake heading|sub=3|References}}
* {{Citation |last=McMillan |first=AJS |last2=Horobin |first2=JF |year=1995 |title=Christmas Cacti: The Genus ''Schlumbergera'' and Its Hybrids |edition=p/b |publication-place=Sherbourne, UK |publisher=David Hunt |isbn=978-0-9517234-6-3}}
** {{harvc |in=McMillan |in2=Horobin |last=Hunt |first=David |c=Appendix I Names of the species |year=1995 |anchor-year=1995a |mode=cs2 |nb=yes |ignore-err=yes}}
** {{harvc |in=McMillan |in2=Horobin |last=Hunt |first=David |c=Appendix III Excerpts from a Brazilian diary |year=1995 |anchor-year=1995b |mode=cs2 |nb=yes |ignore-err=yes}}}}<!-- Template:Mra -->
=====Collision with a different work=====
Because the mediawiki software uses CITEREF id to link from the {{tl|harv}} or {{tl|sfn}} templates to the matching destination anchor of the appropriate {{tl|harvc}} template (or full citation), CITEREF ids must be unique page-wide.{{efn|1=When CITEREF ids are not unique on a page, you will see a [[:Category:Harv and Sfn template errors#Error messages|red error message]], <span style="color:#d73333">Harv/sfn error: multiple targets (n): <anchor ID></span> in the References appendix on the page, unless you have notifications from [[Module:Footnotes]] turned off.}} Since the CITEREF id typically consists of 'CITEREF' + ''LastName'' of author(s) + ''Year'', this can be problematic in two cases. The first case was described [[#More than one contribution|above]]. The other case is collision with a different work, described here.
There are times when an author you wish to cite using {{tl|harvc}} has just one chapter contributed to a work, but the same author also wrote an entirely different work in the same year. Citing both of these in the normal way would cause a CITEREF id collision on the page and result in an error message. There are two ways to resolve this: one involves an additional parameter in the {{tl|harvc}} template, the other way involves an additional parameter in the full citation of the other work.
The first way is to add the {{para|anchor-year}} param to the {{tl|harvc}} chapter citation, as already [[#More than one contribution|described above]] for the case of two chapters by one author. This will assign a uniqueness character to the ''Year'' portion of the CITEREF id, thus distinguishing it from the CITEREF id of the other work that year by the same author.
The other way, is to add a {{para|ref}} param to the {{tl|cite book}} (or other [[Wikipedia:Citing sources#Short and full citations|full citation]]) of the other work in the same year by that author, specifying a different id as the ref value. See [[Template:Cite book#Anchor]] for more about using {{para|ref}} to specify a destination anchor for a citation, and see {{tl|harvid}} for how to specify the ref param value.
==Error messages==
{{tlx|harvc}} emits these error messages:<!--
:<span style="font-size:100%" class="error">harvc: {{para|anchor-year|plain=yes}} missing dab.</span>
::when used, {{para|anchor-year}} must include a single, lowercase letter disambiguator -->
:<span style="font-size:100%" class="error">harvc: author missing from source list.</span>
::the source list parameters {{para|in1}}, {{para|in2}}, {{para|in3}}, and {{para|in4}} form the template's <code>CITEREF</code> link to the full citation. All are not required but must be used in order without numerical gaps.
:<span style="font-size:100%" class="error">harvc: invalid {{para|anchor-year|plain=yes}}.</span>
::when used, {{para|anchor-year}} must be a three- or four-digit number and must have a lowercase <code>CITEREF</code> disambiguator. When the source does not have an identifiable year, use {{para|anchor-year|n.d.{{var|l}}}} or {{para|anchor-year|nd{{var|l}}}} with lowercase <code>CITEREF</code> disambiguator.
:<span style="font-size:100%" class="error">harvc: invalid {{para|display-authors|plain=yes}}.</span>
::the value assigned to {{para|display-authors}} must be a number greater than 0 or the keyword <code>etal</code>
:<span style="font-size:100%" class="error">harvc: invalid {{para|year|plain=yes}}.</span>
::{{para|year}} is an integral part of the template's <code>CITEREF</code> anchor and link. The value of {{para|year}} must be a three- or four-digit number with an optional lowercase <code>CITEREF</code> disambiguator. When the source does not have an identifiable year, use {{para|year|n.d.}} or {{para|year|nd}}.
:<span style="font-size:100%" class="error">harvc: missing {{para|year|plain=yes}}.</span>
::{{para|year}} is missing; the parameter is required.
:<span style="font-size:100%" class="error">harvc: no authors in contributor list.</span>
::this error message indicates that {{tlx|harvc}} can't find any of {{para|last}}, {{para|last1}}, {{para|author}} or {{para|author1}} with an assigned value and so cannot make a usable <code>CITEREF</code> anchor. Add at least one of the listed parameters.
:<span style="font-size:100%" class="error">harvc: required contribution is missing.</span>
::this error message indicates that {{tlx|harvc}} can't find any of {{para|c}}, {{para|chapter}}, or {{para|contribution}} with an assigned value
:<span style="font-size:100%" class="error">harvc: required {{para|id|plain=yes}} parameter missing.</span>
::this error message is emitted when the {{tlx|harvc}} template's <code>CITEREF</code> anchor identifier would conflict with the long-form citation's <code>CITEREF</code> anchor identifier. See [[#Avoiding circular reference|Examples]]
:<span style="font-size:100%" class="error">harvc: {{para|year|plain=yes}} / {{para|anchor-year|plain=yes}} mismatch.</span>
::the year portion of {{para|anchor-year|YYYY{{var|l}}}} must match the year given in {{para|year|YYYY}}
Additional information about "no target" and other category errors may be found at [[:Category:Harv and Sfn no-target errors]].
==Notes==
{{notelist}}
<includeonly>{{Sandbox other||
<!-- Categories below this line, please; interwikis at Wikidata -->
[[Category:Citation utility templates]]
}}</includeonly>
pc4ny6do3h56uhvsqpnz4da219y9d63
801820
801819
2023-10-20T23:05:54Z
en>Mathglot
0
/* Collision with a different work */ Wrong word.
801820
wikitext
text/x-wiki
{{Documentation subpage}}
<!-- Place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
{{lua|Module:Harvc}}
{{uses TemplateStyles|Module:Citation/CS1/styles.css|noprotcat=yes}}
This template is a citation hybrid that has characteristics of long-form [[Help:Citation Style 1|cs1]] and [[Help:Citation Style 2|cs2]], of short-form {{tlx|sfn}} and of the {{tlx|harv}} families of templates. Its purpose is to provide a method that allows editors to refer to a contribution or chapter in a larger work when more than a few such referrals are required. {{tlx|harvc}} is not a substitute for a properly constructed citation.
Short-form templates {{tlx|sfn}} and {{tlx|harv}} are often used to link from an article's references section to a long-form cs1|2 template in a bibliography section:
:{{tlx|harv}} → {{tlx|cite book}}
It is not uncommon for a source to have multiple contributors. When it is necessary to refer to multiple contributions in the same source, repeating all of the bibliographic details in multiple long-form citation templates adds to references-section clutter. {{tlx|harvc}} is designed to hold only the detail necessary to identify a contribution and link to the enclosing work's long-form citation where all of the bibliographic detail can be found:
:{{tlx|harv}} → {{tlx|harvc}} → {{tlx|cite book}}
== Usage ==
The minimal form is:
:<code><nowiki>{{harvc |last=contributor name |year=publication year |c=contribution title |in=source editor/author name}}</nowiki></code>
According to the comments in [[Module:Harvc]], mistaken {{red|Harvc error: no target:}} error messages may be produced when the template is nested in other templates as on documentation pages. The otherwise undocumented parameter, {{para|ignore-err|yes}}, can be added to prevent this.
===Parameters===
{{tlx|harvc}} creates a <code>CITEREF</code> anchor from one to four contribution or chapter author surnames ({{para|last''n''}}) and the value in {{para|year}}. This allows {{tlx|harvc}} to be the target of a link created by {{tlx|sfn}} or {{tlx|harv}} family templates. From {{para|in{{var|n}}}} and {{para|year}}, {{tlx|harvc}} creates a CITEREF link similar to those created by {{tlx|harvnb}} and {{tlx|sfn}}
: '''|anchor-year=''' – optional, for use for author(s) with more than one contribution to the work; requires CITEREF disambiguator; see [[#More than one contribution|Examples]]
: '''|author-link=''' – optional, title of existing Wikipedia article about the first contributor—not the contributor's website; do not wikilink; alias: '''|author-link1='''
:: '''|author-link''n''=''' – optional, title of existing Wikipedia article about contributor''n''; choose ''n'' to match ''n'' in '''|last''n''='''
: '''|author-mask=''m''''' – optional, replaces name of the first contributor with ''m'' (commonly 2) em dashes; alias: '''|author-mask1='''
:: '''|author-mask''n''=''m''''' – optional, replaces name of contributor''n'' with ''m'' em dashes; choose ''n'' to match ''n'' in '''|last''n''='''
:: '''|author-mask{{var|n}}=<{{var|text}}>''' – optional, replaces name of contributor''n'' with <{{var|text}}>
: '''|c=''' – required, the title of chapter or contribution; rendered quoted in upright font; aliases: '''|chapter=''', '''|contribution='''
: '''|display-authors=''' – optional, defines how {{tlx|harvc}} displays the contributor list; ignored when '''|name-list-style=harv''':
:: {{para|display-authors}} – when empty or omitted, displays all contributor names in last/first format
:: {{para|display-authors|{{var|n}}}} – displays ''n'' contributor names in last/first format; appends et al. when ''n'' is less than the number of contributors included in the template
:: {{para|display-authors|etal}} – displays all contributor names in last/first format and appends et al.
: '''|first=''' – optional, first contributor's given or first name; alias: '''|first1='''
:: '''|first''n''=''' – optional, contributor''n'' given or first name; ''n'' begins at 2 and increases by 1 for each additional '''|first''n''='''
: '''|id=''' – required when {{para|last1}}-{{para|last4}} are the same as {{para|in1}}-{{para|in4}}; otherwise optional. See [[#Avoiding circular reference|Examples]]
: '''|in=''' – required, surname or last name of first editor or author of the work that includes the contribution; aliases: '''|in1='''
: '''|in2=''' – optional, surname or last name of second editor or author
: '''|in3=''' – optional, surname or last name of third editor or author
: '''|in4=''' – optional, surname or last name of fourth editor or author
: '''|last=''' – required, surname or last name of first author; aliases: '''|last1='''
:: '''|last''n''=''' – optional, contributor''n'' surname or last name; ''n'' begins at 2 and increases by 1 for each additional '''|last''n''=''';
: '''|loc=''' – optional, other location identifier, displays after {{para|p}} or {{para|pp}}
: '''|mode=''' – controls rendered display to match that of adjacent CS1 or CS2 citations; defaults to CS1 style
:: '''|mode=cs2''' – mimic {{tlx|citation}} style (comma separators, no terminal punctuation, static text not capitalized)
: '''|name-list-style=''' – optional, controls contributor name list display style
:: '''|name-list-style=harv''' – mimic {{tlx|sfn}} or {{tlx|harv}} format (one to four last names); overrides '''|display-authors='''
:: '''|name-list-style=amp''' – inserts an ampersand between the last two contributor names
: '''|nb=''' – optional, when set to <code>yes</code>, instructs {{tlx|harvc}} to render source link without parentheses around the year; same format as that produced by {{tlx|harvnb}}
: '''|p=''' – optional, single page number where cited material can be found; aliases: '''|page='''
: '''|pp=''' – optional, multiple page numbers, page ranges, etc where cited material can be found; aliases: '''|pages='''
: '''|ps=''' – optional, sets terminal punctuation; default is full stop; overrides '''|mode=cs2'''; aliases: '''|postscript='''
:: '''|ps=none''' – renders output without terminal punctuation
: '''|url=''' – optional, URL of an online location where the text of the contribution can be found; aliases: '''|chapter-url''', '''|contribution-url'''
: '''|url-access=''' – optional, use when URL links to a source behind a registration barrier or paywall; inserts [[Help:Citation_Style_1#Registration_or_subscription_required|cs1{{pipe}}2 access icon]]; accepted values are: <code>limited</code>, <code>registration</code>, <code>subscription</code>
: '''|year=''' – required, publication year of the work that includes the contribution
===Examples===
====Basic example====
{| class=wikitable style="width: 100%"
! scope=col style="width: 50%" | Without {{tl|harvc}}
! scope=col style="width: 50%" | With {{tl|harvc}}
|-
|
* {{cite book |last=Doe |first=John |year=1990 |chapter=Chapter 1 |editor-last=Moe |editor-first=Mary |title=The Book of Knowledge |publisher=University Press |ref=none}}
* {{cite book |last=Poe |first=Jane |year=1990 |chapter=Chapter 2 |editor-last=Moe |editor-first=Mary |title=The Book of Knowledge |publisher=University Press |ref=none}}
* {{cite book |last=Roe |first=Robert |year=1990 |chapter=Chapter 3 |editor-last=Moe |editor-first=Mary |title=The Book of Knowledge |publisher=University Press |ref=none}}
|
* {{cite book |editor-last=Moe |editor-first=Mary |year=1990 |title=The Book of Knowledge |publisher=University Press}}
** {{harvc |last=Doe |first=John |c=Chapter 1 |in=Moe |year=1990 |id=none |ignore-err=yes}}
** {{harvc |last=Poe |first=Jane |c=Chapter 2 |in=Moe |year=1990 |id=none |ignore-err=yes}}
** {{harvc |last=Roe |first=Robert |c=Chapter 3 |in=Moe |year=1990 |id=none |ignore-err=yes}}
|}
{| class=wikitable style="width: 100%"
|+ Markup
|-
| style="width: 50%" |
<nowiki>
* {{cite book |last=Doe |first=John |year=1990 |chapter=Chapter 1 |editor-last=Moe |editor-first=Mary |title=The Book of Knowledge |publisher=University Press}}
* {{cite book |last=Poe |first=Jane |year=1990 |chapter=Chapter 2 |editor-last=Moe |editor-first=Mary |title=The Book of Knowledge |publisher=University Press}}
* {{cite book |last=Roe |first=Robert |year=1990 |chapter=Chapter 3 |editor-last=Moe |editor-first=Mary |title=The Book of Knowledge |publisher=University Press}}
</nowiki>
| style="width: 50%|
<nowiki>
* {{cite book |editor-last=Moe |editor-first=Mary |year=1990 |title=The Book of Knowledge |publisher=University Press}}
** {{harvc |last=Doe |first=John |c=Chapter 1 |in=Moe |year=1990}}
** {{harvc |last=Poe |first=Jane |c=Chapter 2 |in=Moe |year=1990}}
** {{harvc |last=Roe |first=Robert |c=Chapter 3 |in=Moe |year=1990}}
</nowiki>
|}
====Detailed example====
When a Wikipedia article makes reference to a work that contains multiple chapters by different authors, bibliographies and reference sections can look rather cluttered:
* {{cite book |last=George |first=Ernest J. |last2=Read |first2=Ralph A. |last3=Johnson |first3=R. W. |last4=Ferber |first4=A. E. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Shelterbelts and Windbreaks |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=https://archive.org/stream/yoa1957#page/n785/mode/1up |oclc=704186906 |ref=none}}
* {{cite book |last=Harper |first=V. L. |last2=Frank |first2=Bernard |last3=McQuilkin |first3=W. E. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Forest Practices and Productivity |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=https://archive.org/stream/yoa1957#page/n803/mode/1up |oclc=704186906 |ref=none}}
* {{cite book |last=Stout |first=P. R. |last2=Johnson |first2=C. M. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Trace Elements |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=https://archive.org/stream/yoa1957#page/n167/mode/1up |oclc=704186906 |ref=none}}
* {{cite book |last=Wadleigh |first=C. H. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Growth of Plants |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=https://archive.org/stream/yoa1957#page/n57/mode/1up |oclc=704186906 |ref=none}}
As the list grows longer, the look becomes more cluttered with the unnecessarily repeated detail of full-length citations. With {{tlx|harvc}} editors can link to shorter, less detailed contribution citations using standard implementations of {{tlx|sfn}} templates and {{tlx|harv}} templates (and also wrapped in {{tag|ref}} tags with {{tlx|harvnb}}). {{tlx|harvc}} may also be wrapped in {{tag|ref}} tags so that it becomes part of the article's References section. See full example below.
=====Avoiding circular reference=====
It may sometimes be necessary to cite a contribution of a source's editor or author such that {{para|last1}} through {{para|last4}} are the same as {{para|in1}} through {{para|in4}}, an editor's preface for example. Such citations can, depending on placement, cause {{tlx|sfn}} or {{tlx|harv}}-family references to link directly to the citation instead of to the {{tlx|harvc}} template, or cause circular links ({{tlx|harvc}} linking to itself because its <code>CITEREF</code> anchor identifier is the same as the citation's <code>CITEREF</code> anchor identifier). If {{para|id}} is set, {{tlx|harvc}} will use it as an anchor identifier; if {{para|id}} is not set, {{tlx|harvc}} will emit an error message when {{para|last1}} through {{para|last4}} are the same as {{para|in1}} through {{para|in4}}.
For example, to reference an editor's preface from article text, create a wikilink inside {{tag|ref}} tags:
:<code><nowiki><ref>[[#Stefferud preface|Stefferud 1957]]</ref></nowiki></code>
Write a {{tlx|harvc}} template with {{para|id|Stefferud preface}}
:<code><nowiki>{{harvc |last=Stefferud |first=A.|year=1957 |id=Stefferud preface |c=Preface |url=https://archive.org/stream/yoa1957#page/n7/mode/1up |in=Stefferud}}</nowiki></code>
{{markupv|title=Full example:|markup=
<nowiki>First information.{{sfn|George|Read|Johnson|Ferber|1957}} Second.<ref>{{harvnb|Stout|Johnson|1957}}</ref> Three thru five.<ref>{{harvnb|Stout|Johnson|1957}}</ref><ref>{{harvc|last=Benson|first=Ezra Taft|year=1957|chapter=Foreword|url=https://archive.org/stream/yoa1957#page/n5/mode/1up|in=Stefferud|p=vi |loc=§2 |ignore-err=yes}}</ref>{{sfn|Wadleigh|1957}} Sixth.<ref>[[#Stefferud preface|Stefferud 1957]]</ref>
<!-- ==Notes== --> {{fake heading|sub=3|Notes}}
{{reflist}}
<!-- ==References== --> {{fake heading|sub=3|References}}
* {{cite book |title=Soil: The Yearbook of Agriculture 1957 |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |url=https://archive.org/stream/yoa1957 |oclc=704186906 }}
** {{harvc |last=George |first=Ernest J. |last2=Read |last3=Johnson |last4=Ferber |year=1957 |contribution=Shelterbelts and Windbreaks |url=https://archive.org/stream/yoa1957#page/n785/mode/1up |in=Stefferud |ignore-err=yes}}
** {{harvc |last=Harper |first=V. L. |last2=Frank |last3=McQuilkin |year=1957 |contribution=Forest Practices |url=https://archive.org/stream/yoa1957#page/n803/mode/1up |in=Stefferud |ignore-err=yes}}
** {{harvc |last=Stefferud |first=A.|year=1957 |id=Stefferud preface |c=Preface |url=https://archive.org/stream/yoa1957#page/n7/mode/1up |in=Stefferud |ignore-err=yes}}
** {{harvc |last=Stout |first=P. R. |last2=Johnson |year=1957 |c=Trace Elements |url=https://archive.org/stream/yoa1957#page/n167/mode/1up |in=Stefferud |ignore-err=yes}}
** {{harvc |last=Wadleigh |first=C. H.|year=1957 |c=Growth of Plants |url=https://archive.org/stream/yoa1957#page/n57/mode/1up |in=Stefferud |ignore-err=yes}}
</nowiki>|renders=First information.{{sfn|George|Read|Johnson|Ferber|1957}} Second.<ref>{{harvnb|Stout|Johnson|1957}}</ref> Three thru five.<ref>{{harvnb|Stout|Johnson|1957}}</ref><ref>{{harvc|last=Benson|first=Ezra Taft|year=1957|chapter=Foreword|url=https://archive.org/stream/yoa1957#page/n5/mode/1up|in=Stefferud|p=vi |loc=§2 |ignore-err=yes}}</ref>{{sfn|Wadleigh|1957}} Sixth.<ref>[[#Stefferud preface|Stefferud 1957]]</ref>
<!-- ==Notes== --> {{fake heading|sub=3|Notes}}
{{reflist}}
<!-- ==References== --> {{fake heading|sub=3|References}}
* {{cite book |title=Soil: The Yearbook of Agriculture 1957 |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |url=https://archive.org/stream/yoa1957 |oclc=704186906 }}
** {{harvc |last=George |first=Ernest J. |last2=Read |last3=Johnson |last4=Ferber |year=1957 |contribution=Shelterbelts and Windbreaks |url=https://archive.org/stream/yoa1957#page/n785/mode/1up |in=Stefferud |ignore-err=yes}}
** {{harvc |last=Harper |first=V. L. |last2=Frank |last3=McQuilkin |year=1957 |contribution=Forest Practices |url=https://archive.org/stream/yoa1957#page/n803/mode/1up |in=Stefferud |ignore-err=yes |id=none}}
** {{harvc |last=Stefferud |first=A.|year=1957 |id=Stefferud preface |c=Preface |url=https://archive.org/stream/yoa1957#page/n7/mode/1up |in=Stefferud |ignore-err=yes}}
** {{harvc |last=Stout |first=P. R. |last2=Johnson |year=1957 |c=Trace Elements |url=https://archive.org/stream/yoa1957#page/n167/mode/1up |in=Stefferud |ignore-err=yes}}
** {{harvc |last=Wadleigh |first=C. H.|year=1957 |c=Growth of Plants |url=https://archive.org/stream/yoa1957#page/n57/mode/1up |in=Stefferud |ignore-err=yes}}}}<!-- Template:Mra -->
Note again the parameter <code><nowiki>ignore-err=yes</nowiki></code> is simply to suppress errors that occur when this template is embedded, such as in documentation. It should not be used otherwise.
=====More than one contribution=====
There are times when an author or authors will have contributed more than once to a work. When this occurs, it is necessary to disambiguate the CITEREF links from the {{tlx|harv}} or {{tlx|sfn}} templates to the CITEREF id of the appropriate {{tlx|harvc}} template.
:{{tlx|harv|Author|YYYYa}} → {{tlx|harvc|Author|Contribution 1|YYYYa}} → {{tlx|citation|...}}}
:{{tlx|harv|Author|YYYYb}} → {{tlx|harvc|Author|Contribution 2|YYYYb}} ↑
In this example, author David Hunt contributed two appendices to ''Christmas Cacti: The Genus ''Schlumbergera'' and Its Hybrids''.
There are two {{tlx|harvnb}} templates that are disambiguated:
:<code><nowiki>{{harvnb |Hunt |1995a}}</nowiki></code> → Hunt 1995a
:<code><nowiki>{{harvnb |Hunt |1995b}}</nowiki></code> → Hunt 1995b
These link to two {{tlx|harvc}} templates which use {{para|anchor-year}} for their CITEREF id and for the date in the {{tlx|harvc}} rendering as a visual aid for readers:
{{markup|
<nowiki>{{harvnb |Hunt |1995a}}; {{harvnb |Hunt |1995b}}.
<!-- ==References== --> {{fake heading|sub=3|References}}
* {{Citation |last=McMillan |first=AJS |last2=Horobin |first2=JF |year=1995 |title=Christmas Cacti: The Genus ''Schlumbergera'' and Its Hybrids |edition=p/b |publication-place=Sherbourne, UK |publisher=David Hunt |isbn=978-0-9517234-6-3}}
** {{harvc |in=McMillan |in2=Horobin |last=Hunt |first=David |c=Appendix I Names of the species |year=1995 |anchor-year=1995a |mode=cs2 |nb=yes |ignore-err=yes}}
** {{harvc |in=McMillan |in2=Horobin |last=Hunt |first=David |c=Appendix III Excerpts from a Brazilian diary |year=1995 |anchor-year=1995b |mode=cs2 |nb=yes |ignore-err=yes}}
</nowiki>|{{harvnb |Hunt |1995a}}; {{harvnb |Hunt |1995b}}.
<!-- ==References== --> {{fake heading|sub=3|References}}
* {{Citation |last=McMillan |first=AJS |last2=Horobin |first2=JF |year=1995 |title=Christmas Cacti: The Genus ''Schlumbergera'' and Its Hybrids |edition=p/b |publication-place=Sherbourne, UK |publisher=David Hunt |isbn=978-0-9517234-6-3}}
** {{harvc |in=McMillan |in2=Horobin |last=Hunt |first=David |c=Appendix I Names of the species |year=1995 |anchor-year=1995a |mode=cs2 |nb=yes |ignore-err=yes}}
** {{harvc |in=McMillan |in2=Horobin |last=Hunt |first=David |c=Appendix III Excerpts from a Brazilian diary |year=1995 |anchor-year=1995b |mode=cs2 |nb=yes |ignore-err=yes}}}}<!-- Template:Mra -->
=====Collision with a different work=====
Because the mediawiki software uses CITEREF id to link from the {{tl|harv}} or {{tl|sfn}} templates to the matching destination anchor of the appropriate {{tl|harvc}} template (or full citation), CITEREF ids must be unique page-wide.{{efn|1=When CITEREF ids are not unique on a page, you will see a [[:Category:Harv and Sfn template errors#Error messages|red error message]], <span style="color:#d73333">Harv/sfn error: multiple targets (n): <anchor ID></span> in the References appendix on the page, unless you have error messages from [[Module:Footnotes]] turned off.}} Since the CITEREF id typically consists of 'CITEREF' + ''LastName'' of author(s) + ''Year'', this can be problematic in two cases. The first case was described [[#More than one contribution|above]]. The other case is collision with a different work, described here.
There are times when an author you wish to cite using {{tl|harvc}} has just one chapter contributed to a work, but the same author also wrote an entirely different work in the same year. Citing both of these in the normal way would cause a CITEREF id collision on the page and result in an error message. There are two ways to resolve this: one involves an additional parameter in the {{tl|harvc}} template, the other way involves an additional parameter in the full citation of the other work.
The first way is to add the {{para|anchor-year}} param to the {{tl|harvc}} chapter citation, as already [[#More than one contribution|described above]] for the case of two chapters by one author. This will assign a uniqueness character to the ''Year'' portion of the CITEREF id, thus distinguishing it from the CITEREF id of the other work that year by the same author.
The other way, is to add a {{para|ref}} param to the {{tl|cite book}} (or other [[Wikipedia:Citing sources#Short and full citations|full citation]]) of the other work in the same year by that author, specifying a different id as the ref value. See [[Template:Cite book#Anchor]] for more about using {{para|ref}} to specify a destination anchor for a citation, and see {{tl|harvid}} for how to specify the ref param value.
==Error messages==
{{tlx|harvc}} emits these error messages:<!--
:<span style="font-size:100%" class="error">harvc: {{para|anchor-year|plain=yes}} missing dab.</span>
::when used, {{para|anchor-year}} must include a single, lowercase letter disambiguator -->
:<span style="font-size:100%" class="error">harvc: author missing from source list.</span>
::the source list parameters {{para|in1}}, {{para|in2}}, {{para|in3}}, and {{para|in4}} form the template's <code>CITEREF</code> link to the full citation. All are not required but must be used in order without numerical gaps.
:<span style="font-size:100%" class="error">harvc: invalid {{para|anchor-year|plain=yes}}.</span>
::when used, {{para|anchor-year}} must be a three- or four-digit number and must have a lowercase <code>CITEREF</code> disambiguator. When the source does not have an identifiable year, use {{para|anchor-year|n.d.{{var|l}}}} or {{para|anchor-year|nd{{var|l}}}} with lowercase <code>CITEREF</code> disambiguator.
:<span style="font-size:100%" class="error">harvc: invalid {{para|display-authors|plain=yes}}.</span>
::the value assigned to {{para|display-authors}} must be a number greater than 0 or the keyword <code>etal</code>
:<span style="font-size:100%" class="error">harvc: invalid {{para|year|plain=yes}}.</span>
::{{para|year}} is an integral part of the template's <code>CITEREF</code> anchor and link. The value of {{para|year}} must be a three- or four-digit number with an optional lowercase <code>CITEREF</code> disambiguator. When the source does not have an identifiable year, use {{para|year|n.d.}} or {{para|year|nd}}.
:<span style="font-size:100%" class="error">harvc: missing {{para|year|plain=yes}}.</span>
::{{para|year}} is missing; the parameter is required.
:<span style="font-size:100%" class="error">harvc: no authors in contributor list.</span>
::this error message indicates that {{tlx|harvc}} can't find any of {{para|last}}, {{para|last1}}, {{para|author}} or {{para|author1}} with an assigned value and so cannot make a usable <code>CITEREF</code> anchor. Add at least one of the listed parameters.
:<span style="font-size:100%" class="error">harvc: required contribution is missing.</span>
::this error message indicates that {{tlx|harvc}} can't find any of {{para|c}}, {{para|chapter}}, or {{para|contribution}} with an assigned value
:<span style="font-size:100%" class="error">harvc: required {{para|id|plain=yes}} parameter missing.</span>
::this error message is emitted when the {{tlx|harvc}} template's <code>CITEREF</code> anchor identifier would conflict with the long-form citation's <code>CITEREF</code> anchor identifier. See [[#Avoiding circular reference|Examples]]
:<span style="font-size:100%" class="error">harvc: {{para|year|plain=yes}} / {{para|anchor-year|plain=yes}} mismatch.</span>
::the year portion of {{para|anchor-year|YYYY{{var|l}}}} must match the year given in {{para|year|YYYY}}
Additional information about "no target" and other category errors may be found at [[:Category:Harv and Sfn no-target errors]].
==Notes==
{{notelist}}
<includeonly>{{Sandbox other||
<!-- Categories below this line, please; interwikis at Wikidata -->
[[Category:Citation utility templates]]
}}</includeonly>
2sf2706k627vel1edjyi41xx060i7ub
801821
801820
2023-11-14T06:55:09Z
en>Mathglot
0
/* top */ Include {{sfn}} in the top sample usage.
801821
wikitext
text/x-wiki
{{Documentation subpage}}
<!-- Place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
{{lua|Module:Harvc}}
{{uses TemplateStyles|Module:Citation/CS1/styles.css|noprotcat=yes}}
This template is a citation hybrid that has characteristics of long-form [[Help:Citation Style 1|cs1]] and [[Help:Citation Style 2|cs2]], of short-form {{tlx|sfn}} and of the {{tlx|harv}} families of templates. Its purpose is to provide a method that allows editors to refer to a contribution or chapter in a larger work when more than a few such referrals are required. {{tlx|harvc}} is not a substitute for a properly constructed citation.
Short-form templates {{tlx|sfn}} and {{tlx|harv}} are often used to link from an article's references section to a long-form cs1|2 template in a bibliography section:
:{{tlx|harv}} → {{tlx|cite book}} <span style="padding:0 1.5em">or:</span> {{tlx|sfn}} → {{tlx|cite book}}
It is not uncommon for a source to have multiple contributors. When it is necessary to refer to multiple contributions in the same source, repeating all of the bibliographic details in multiple long-form citation templates adds to references-section clutter. {{tlx|harvc}} is designed to hold only the detail necessary to identify a contribution and link to the enclosing work's long-form citation where all of the bibliographic detail can be found:
:{{tlx|harv}} → {{tlx|harvc}} → {{tlx|cite book}} <span style="padding:0 1.5em">or:</span> {{tlx|sfn}} → {{tlx|harvc}} → {{tlx|cite book}}
== Usage ==
The minimal form is:
:<code><nowiki>{{harvc |last=contributor name |year=publication year |c=contribution title |in=source editor/author name}}</nowiki></code>
According to the comments in [[Module:Harvc]], mistaken {{red|Harvc error: no target:}} error messages may be produced when the template is nested in other templates as on documentation pages. The otherwise undocumented parameter, {{para|ignore-err|yes}}, can be added to prevent this.
===Parameters===
{{tlx|harvc}} creates a <code>CITEREF</code> anchor from one to four contribution or chapter author surnames ({{para|last''n''}}) and the value in {{para|year}}. This allows {{tlx|harvc}} to be the target of a link created by {{tlx|sfn}} or {{tlx|harv}} family templates. From {{para|in{{var|n}}}} and {{para|year}}, {{tlx|harvc}} creates a CITEREF link similar to those created by {{tlx|harvnb}} and {{tlx|sfn}}
: '''|anchor-year=''' – optional, for use for author(s) with more than one contribution to the work; requires CITEREF disambiguator; see [[#More than one contribution|Examples]]
: '''|author-link=''' – optional, title of existing Wikipedia article about the first contributor—not the contributor's website; do not wikilink; alias: '''|author-link1='''
:: '''|author-link''n''=''' – optional, title of existing Wikipedia article about contributor''n''; choose ''n'' to match ''n'' in '''|last''n''='''
: '''|author-mask=''m''''' – optional, replaces name of the first contributor with ''m'' (commonly 2) em dashes; alias: '''|author-mask1='''
:: '''|author-mask''n''=''m''''' – optional, replaces name of contributor''n'' with ''m'' em dashes; choose ''n'' to match ''n'' in '''|last''n''='''
:: '''|author-mask{{var|n}}=<{{var|text}}>''' – optional, replaces name of contributor''n'' with <{{var|text}}>
: '''|c=''' – required, the title of chapter or contribution; rendered quoted in upright font; aliases: '''|chapter=''', '''|contribution='''
: '''|display-authors=''' – optional, defines how {{tlx|harvc}} displays the contributor list; ignored when '''|name-list-style=harv''':
:: {{para|display-authors}} – when empty or omitted, displays all contributor names in last/first format
:: {{para|display-authors|{{var|n}}}} – displays ''n'' contributor names in last/first format; appends et al. when ''n'' is less than the number of contributors included in the template
:: {{para|display-authors|etal}} – displays all contributor names in last/first format and appends et al.
: '''|first=''' – optional, first contributor's given or first name; alias: '''|first1='''
:: '''|first''n''=''' – optional, contributor''n'' given or first name; ''n'' begins at 2 and increases by 1 for each additional '''|first''n''='''
: '''|id=''' – required when {{para|last1}}-{{para|last4}} are the same as {{para|in1}}-{{para|in4}}; otherwise optional. See [[#Avoiding circular reference|Examples]]
: '''|in=''' – required, surname or last name of first editor or author of the work that includes the contribution; aliases: '''|in1='''
: '''|in2=''' – optional, surname or last name of second editor or author
: '''|in3=''' – optional, surname or last name of third editor or author
: '''|in4=''' – optional, surname or last name of fourth editor or author
: '''|last=''' – required, surname or last name of first author; aliases: '''|last1='''
:: '''|last''n''=''' – optional, contributor''n'' surname or last name; ''n'' begins at 2 and increases by 1 for each additional '''|last''n''=''';
: '''|loc=''' – optional, other location identifier, displays after {{para|p}} or {{para|pp}}
: '''|mode=''' – controls rendered display to match that of adjacent CS1 or CS2 citations; defaults to CS1 style
:: '''|mode=cs2''' – mimic {{tlx|citation}} style (comma separators, no terminal punctuation, static text not capitalized)
: '''|name-list-style=''' – optional, controls contributor name list display style
:: '''|name-list-style=harv''' – mimic {{tlx|sfn}} or {{tlx|harv}} format (one to four last names); overrides '''|display-authors='''
:: '''|name-list-style=amp''' – inserts an ampersand between the last two contributor names
: '''|nb=''' – optional, when set to <code>yes</code>, instructs {{tlx|harvc}} to render source link without parentheses around the year; same format as that produced by {{tlx|harvnb}}
: '''|p=''' – optional, single page number where cited material can be found; aliases: '''|page='''
: '''|pp=''' – optional, multiple page numbers, page ranges, etc where cited material can be found; aliases: '''|pages='''
: '''|ps=''' – optional, sets terminal punctuation; default is full stop; overrides '''|mode=cs2'''; aliases: '''|postscript='''
:: '''|ps=none''' – renders output without terminal punctuation
: '''|url=''' – optional, URL of an online location where the text of the contribution can be found; aliases: '''|chapter-url''', '''|contribution-url'''
: '''|url-access=''' – optional, use when URL links to a source behind a registration barrier or paywall; inserts [[Help:Citation_Style_1#Registration_or_subscription_required|cs1{{pipe}}2 access icon]]; accepted values are: <code>limited</code>, <code>registration</code>, <code>subscription</code>
: '''|year=''' – required, publication year of the work that includes the contribution
===Examples===
====Basic example====
{| class=wikitable style="width: 100%"
! scope=col style="width: 50%" | Without {{tl|harvc}}
! scope=col style="width: 50%" | With {{tl|harvc}}
|-
|
* {{cite book |last=Doe |first=John |year=1990 |chapter=Chapter 1 |editor-last=Moe |editor-first=Mary |title=The Book of Knowledge |publisher=University Press |ref=none}}
* {{cite book |last=Poe |first=Jane |year=1990 |chapter=Chapter 2 |editor-last=Moe |editor-first=Mary |title=The Book of Knowledge |publisher=University Press |ref=none}}
* {{cite book |last=Roe |first=Robert |year=1990 |chapter=Chapter 3 |editor-last=Moe |editor-first=Mary |title=The Book of Knowledge |publisher=University Press |ref=none}}
|
* {{cite book |editor-last=Moe |editor-first=Mary |year=1990 |title=The Book of Knowledge |publisher=University Press}}
** {{harvc |last=Doe |first=John |c=Chapter 1 |in=Moe |year=1990 |id=none |ignore-err=yes}}
** {{harvc |last=Poe |first=Jane |c=Chapter 2 |in=Moe |year=1990 |id=none |ignore-err=yes}}
** {{harvc |last=Roe |first=Robert |c=Chapter 3 |in=Moe |year=1990 |id=none |ignore-err=yes}}
|}
{| class=wikitable style="width: 100%"
|+ Markup
|-
| style="width: 50%" |
<nowiki>
* {{cite book |last=Doe |first=John |year=1990 |chapter=Chapter 1 |editor-last=Moe |editor-first=Mary |title=The Book of Knowledge |publisher=University Press}}
* {{cite book |last=Poe |first=Jane |year=1990 |chapter=Chapter 2 |editor-last=Moe |editor-first=Mary |title=The Book of Knowledge |publisher=University Press}}
* {{cite book |last=Roe |first=Robert |year=1990 |chapter=Chapter 3 |editor-last=Moe |editor-first=Mary |title=The Book of Knowledge |publisher=University Press}}
</nowiki>
| style="width: 50%|
<nowiki>
* {{cite book |editor-last=Moe |editor-first=Mary |year=1990 |title=The Book of Knowledge |publisher=University Press}}
** {{harvc |last=Doe |first=John |c=Chapter 1 |in=Moe |year=1990}}
** {{harvc |last=Poe |first=Jane |c=Chapter 2 |in=Moe |year=1990}}
** {{harvc |last=Roe |first=Robert |c=Chapter 3 |in=Moe |year=1990}}
</nowiki>
|}
====Detailed example====
When a Wikipedia article makes reference to a work that contains multiple chapters by different authors, bibliographies and reference sections can look rather cluttered:
* {{cite book |last=George |first=Ernest J. |last2=Read |first2=Ralph A. |last3=Johnson |first3=R. W. |last4=Ferber |first4=A. E. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Shelterbelts and Windbreaks |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=https://archive.org/stream/yoa1957#page/n785/mode/1up |oclc=704186906 |ref=none}}
* {{cite book |last=Harper |first=V. L. |last2=Frank |first2=Bernard |last3=McQuilkin |first3=W. E. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Forest Practices and Productivity |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=https://archive.org/stream/yoa1957#page/n803/mode/1up |oclc=704186906 |ref=none}}
* {{cite book |last=Stout |first=P. R. |last2=Johnson |first2=C. M. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Trace Elements |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=https://archive.org/stream/yoa1957#page/n167/mode/1up |oclc=704186906 |ref=none}}
* {{cite book |last=Wadleigh |first=C. H. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Growth of Plants |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=https://archive.org/stream/yoa1957#page/n57/mode/1up |oclc=704186906 |ref=none}}
As the list grows longer, the look becomes more cluttered with the unnecessarily repeated detail of full-length citations. With {{tlx|harvc}} editors can link to shorter, less detailed contribution citations using standard implementations of {{tlx|sfn}} templates and {{tlx|harv}} templates (and also wrapped in {{tag|ref}} tags with {{tlx|harvnb}}). {{tlx|harvc}} may also be wrapped in {{tag|ref}} tags so that it becomes part of the article's References section. See full example below.
=====Avoiding circular reference=====
It may sometimes be necessary to cite a contribution of a source's editor or author such that {{para|last1}} through {{para|last4}} are the same as {{para|in1}} through {{para|in4}}, an editor's preface for example. Such citations can, depending on placement, cause {{tlx|sfn}} or {{tlx|harv}}-family references to link directly to the citation instead of to the {{tlx|harvc}} template, or cause circular links ({{tlx|harvc}} linking to itself because its <code>CITEREF</code> anchor identifier is the same as the citation's <code>CITEREF</code> anchor identifier). If {{para|id}} is set, {{tlx|harvc}} will use it as an anchor identifier; if {{para|id}} is not set, {{tlx|harvc}} will emit an error message when {{para|last1}} through {{para|last4}} are the same as {{para|in1}} through {{para|in4}}.
For example, to reference an editor's preface from article text, create a wikilink inside {{tag|ref}} tags:
:<code><nowiki><ref>[[#Stefferud preface|Stefferud 1957]]</ref></nowiki></code>
Write a {{tlx|harvc}} template with {{para|id|Stefferud preface}}
:<code><nowiki>{{harvc |last=Stefferud |first=A.|year=1957 |id=Stefferud preface |c=Preface |url=https://archive.org/stream/yoa1957#page/n7/mode/1up |in=Stefferud}}</nowiki></code>
{{markupv|title=Full example:|markup=
<nowiki>First information.{{sfn|George|Read|Johnson|Ferber|1957}} Second.<ref>{{harvnb|Stout|Johnson|1957}}</ref> Three thru five.<ref>{{harvnb|Stout|Johnson|1957}}</ref><ref>{{harvc|last=Benson|first=Ezra Taft|year=1957|chapter=Foreword|url=https://archive.org/stream/yoa1957#page/n5/mode/1up|in=Stefferud|p=vi |loc=§2 |ignore-err=yes}}</ref>{{sfn|Wadleigh|1957}} Sixth.<ref>[[#Stefferud preface|Stefferud 1957]]</ref>
<!-- ==Notes== --> {{fake heading|sub=3|Notes}}
{{reflist}}
<!-- ==References== --> {{fake heading|sub=3|References}}
* {{cite book |title=Soil: The Yearbook of Agriculture 1957 |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |url=https://archive.org/stream/yoa1957 |oclc=704186906 }}
** {{harvc |last=George |first=Ernest J. |last2=Read |last3=Johnson |last4=Ferber |year=1957 |contribution=Shelterbelts and Windbreaks |url=https://archive.org/stream/yoa1957#page/n785/mode/1up |in=Stefferud |ignore-err=yes}}
** {{harvc |last=Harper |first=V. L. |last2=Frank |last3=McQuilkin |year=1957 |contribution=Forest Practices |url=https://archive.org/stream/yoa1957#page/n803/mode/1up |in=Stefferud |ignore-err=yes}}
** {{harvc |last=Stefferud |first=A.|year=1957 |id=Stefferud preface |c=Preface |url=https://archive.org/stream/yoa1957#page/n7/mode/1up |in=Stefferud |ignore-err=yes}}
** {{harvc |last=Stout |first=P. R. |last2=Johnson |year=1957 |c=Trace Elements |url=https://archive.org/stream/yoa1957#page/n167/mode/1up |in=Stefferud |ignore-err=yes}}
** {{harvc |last=Wadleigh |first=C. H.|year=1957 |c=Growth of Plants |url=https://archive.org/stream/yoa1957#page/n57/mode/1up |in=Stefferud |ignore-err=yes}}
</nowiki>|renders=First information.{{sfn|George|Read|Johnson|Ferber|1957}} Second.<ref>{{harvnb|Stout|Johnson|1957}}</ref> Three thru five.<ref>{{harvnb|Stout|Johnson|1957}}</ref><ref>{{harvc|last=Benson|first=Ezra Taft|year=1957|chapter=Foreword|url=https://archive.org/stream/yoa1957#page/n5/mode/1up|in=Stefferud|p=vi |loc=§2 |ignore-err=yes}}</ref>{{sfn|Wadleigh|1957}} Sixth.<ref>[[#Stefferud preface|Stefferud 1957]]</ref>
<!-- ==Notes== --> {{fake heading|sub=3|Notes}}
{{reflist}}
<!-- ==References== --> {{fake heading|sub=3|References}}
* {{cite book |title=Soil: The Yearbook of Agriculture 1957 |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |url=https://archive.org/stream/yoa1957 |oclc=704186906 }}
** {{harvc |last=George |first=Ernest J. |last2=Read |last3=Johnson |last4=Ferber |year=1957 |contribution=Shelterbelts and Windbreaks |url=https://archive.org/stream/yoa1957#page/n785/mode/1up |in=Stefferud |ignore-err=yes}}
** {{harvc |last=Harper |first=V. L. |last2=Frank |last3=McQuilkin |year=1957 |contribution=Forest Practices |url=https://archive.org/stream/yoa1957#page/n803/mode/1up |in=Stefferud |ignore-err=yes |id=none}}
** {{harvc |last=Stefferud |first=A.|year=1957 |id=Stefferud preface |c=Preface |url=https://archive.org/stream/yoa1957#page/n7/mode/1up |in=Stefferud |ignore-err=yes}}
** {{harvc |last=Stout |first=P. R. |last2=Johnson |year=1957 |c=Trace Elements |url=https://archive.org/stream/yoa1957#page/n167/mode/1up |in=Stefferud |ignore-err=yes}}
** {{harvc |last=Wadleigh |first=C. H.|year=1957 |c=Growth of Plants |url=https://archive.org/stream/yoa1957#page/n57/mode/1up |in=Stefferud |ignore-err=yes}}}}<!-- Template:Mra -->
Note again the parameter <code><nowiki>ignore-err=yes</nowiki></code> is simply to suppress errors that occur when this template is embedded, such as in documentation. It should not be used otherwise.
=====More than one contribution=====
There are times when an author or authors will have contributed more than once to a work. When this occurs, it is necessary to disambiguate the CITEREF links from the {{tlx|harv}} or {{tlx|sfn}} templates to the CITEREF id of the appropriate {{tlx|harvc}} template.
:{{tlx|harv|Author|YYYYa}} → {{tlx|harvc|Author|Contribution 1|YYYYa}} → {{tlx|citation|...}}}
:{{tlx|harv|Author|YYYYb}} → {{tlx|harvc|Author|Contribution 2|YYYYb}} ↑
In this example, author David Hunt contributed two appendices to ''Christmas Cacti: The Genus ''Schlumbergera'' and Its Hybrids''.
There are two {{tlx|harvnb}} templates that are disambiguated:
:<code><nowiki>{{harvnb |Hunt |1995a}}</nowiki></code> → Hunt 1995a
:<code><nowiki>{{harvnb |Hunt |1995b}}</nowiki></code> → Hunt 1995b
These link to two {{tlx|harvc}} templates which use {{para|anchor-year}} for their CITEREF id and for the date in the {{tlx|harvc}} rendering as a visual aid for readers:
{{markup|
<nowiki>{{harvnb |Hunt |1995a}}; {{harvnb |Hunt |1995b}}.
<!-- ==References== --> {{fake heading|sub=3|References}}
* {{Citation |last=McMillan |first=AJS |last2=Horobin |first2=JF |year=1995 |title=Christmas Cacti: The Genus ''Schlumbergera'' and Its Hybrids |edition=p/b |publication-place=Sherbourne, UK |publisher=David Hunt |isbn=978-0-9517234-6-3}}
** {{harvc |in=McMillan |in2=Horobin |last=Hunt |first=David |c=Appendix I Names of the species |year=1995 |anchor-year=1995a |mode=cs2 |nb=yes |ignore-err=yes}}
** {{harvc |in=McMillan |in2=Horobin |last=Hunt |first=David |c=Appendix III Excerpts from a Brazilian diary |year=1995 |anchor-year=1995b |mode=cs2 |nb=yes |ignore-err=yes}}
</nowiki>|{{harvnb |Hunt |1995a}}; {{harvnb |Hunt |1995b}}.
<!-- ==References== --> {{fake heading|sub=3|References}}
* {{Citation |last=McMillan |first=AJS |last2=Horobin |first2=JF |year=1995 |title=Christmas Cacti: The Genus ''Schlumbergera'' and Its Hybrids |edition=p/b |publication-place=Sherbourne, UK |publisher=David Hunt |isbn=978-0-9517234-6-3}}
** {{harvc |in=McMillan |in2=Horobin |last=Hunt |first=David |c=Appendix I Names of the species |year=1995 |anchor-year=1995a |mode=cs2 |nb=yes |ignore-err=yes}}
** {{harvc |in=McMillan |in2=Horobin |last=Hunt |first=David |c=Appendix III Excerpts from a Brazilian diary |year=1995 |anchor-year=1995b |mode=cs2 |nb=yes |ignore-err=yes}}}}<!-- Template:Mra -->
=====Collision with a different work=====
Because the mediawiki software uses CITEREF id to link from the {{tl|harv}} or {{tl|sfn}} templates to the matching destination anchor of the appropriate {{tl|harvc}} template (or full citation), CITEREF ids must be unique page-wide.{{efn|1=When CITEREF ids are not unique on a page, you will see a [[:Category:Harv and Sfn template errors#Error messages|red error message]], <span style="color:#d73333">Harv/sfn error: multiple targets (n): <anchor ID></span> in the References appendix on the page, unless you have error messages from [[Module:Footnotes]] turned off.}} Since the CITEREF id typically consists of 'CITEREF' + ''LastName'' of author(s) + ''Year'', this can be problematic in two cases. The first case was described [[#More than one contribution|above]]. The other case is collision with a different work, described here.
There are times when an author you wish to cite using {{tl|harvc}} has just one chapter contributed to a work, but the same author also wrote an entirely different work in the same year. Citing both of these in the normal way would cause a CITEREF id collision on the page and result in an error message. There are two ways to resolve this: one involves an additional parameter in the {{tl|harvc}} template, the other way involves an additional parameter in the full citation of the other work.
The first way is to add the {{para|anchor-year}} param to the {{tl|harvc}} chapter citation, as already [[#More than one contribution|described above]] for the case of two chapters by one author. This will assign a uniqueness character to the ''Year'' portion of the CITEREF id, thus distinguishing it from the CITEREF id of the other work that year by the same author.
The other way, is to add a {{para|ref}} param to the {{tl|cite book}} (or other [[Wikipedia:Citing sources#Short and full citations|full citation]]) of the other work in the same year by that author, specifying a different id as the ref value. See [[Template:Cite book#Anchor]] for more about using {{para|ref}} to specify a destination anchor for a citation, and see {{tl|harvid}} for how to specify the ref param value.
==Error messages==
{{tlx|harvc}} emits these error messages:<!--
:<span style="font-size:100%" class="error">harvc: {{para|anchor-year|plain=yes}} missing dab.</span>
::when used, {{para|anchor-year}} must include a single, lowercase letter disambiguator -->
:<span style="font-size:100%" class="error">harvc: author missing from source list.</span>
::the source list parameters {{para|in1}}, {{para|in2}}, {{para|in3}}, and {{para|in4}} form the template's <code>CITEREF</code> link to the full citation. All are not required but must be used in order without numerical gaps.
:<span style="font-size:100%" class="error">harvc: invalid {{para|anchor-year|plain=yes}}.</span>
::when used, {{para|anchor-year}} must be a three- or four-digit number and must have a lowercase <code>CITEREF</code> disambiguator. When the source does not have an identifiable year, use {{para|anchor-year|n.d.{{var|l}}}} or {{para|anchor-year|nd{{var|l}}}} with lowercase <code>CITEREF</code> disambiguator.
:<span style="font-size:100%" class="error">harvc: invalid {{para|display-authors|plain=yes}}.</span>
::the value assigned to {{para|display-authors}} must be a number greater than 0 or the keyword <code>etal</code>
:<span style="font-size:100%" class="error">harvc: invalid {{para|year|plain=yes}}.</span>
::{{para|year}} is an integral part of the template's <code>CITEREF</code> anchor and link. The value of {{para|year}} must be a three- or four-digit number with an optional lowercase <code>CITEREF</code> disambiguator. When the source does not have an identifiable year, use {{para|year|n.d.}} or {{para|year|nd}}.
:<span style="font-size:100%" class="error">harvc: missing {{para|year|plain=yes}}.</span>
::{{para|year}} is missing; the parameter is required.
:<span style="font-size:100%" class="error">harvc: no authors in contributor list.</span>
::this error message indicates that {{tlx|harvc}} can't find any of {{para|last}}, {{para|last1}}, {{para|author}} or {{para|author1}} with an assigned value and so cannot make a usable <code>CITEREF</code> anchor. Add at least one of the listed parameters.
:<span style="font-size:100%" class="error">harvc: required contribution is missing.</span>
::this error message indicates that {{tlx|harvc}} can't find any of {{para|c}}, {{para|chapter}}, or {{para|contribution}} with an assigned value
:<span style="font-size:100%" class="error">harvc: required {{para|id|plain=yes}} parameter missing.</span>
::this error message is emitted when the {{tlx|harvc}} template's <code>CITEREF</code> anchor identifier would conflict with the long-form citation's <code>CITEREF</code> anchor identifier. See [[#Avoiding circular reference|Examples]]
:<span style="font-size:100%" class="error">harvc: {{para|year|plain=yes}} / {{para|anchor-year|plain=yes}} mismatch.</span>
::the year portion of {{para|anchor-year|YYYY{{var|l}}}} must match the year given in {{para|year|YYYY}}
Additional information about "no target" and other category errors may be found at [[:Category:Harv and Sfn no-target errors]].
==Notes==
{{notelist}}
<includeonly>{{Sandbox other||
<!-- Categories below this line, please; interwikis at Wikidata -->
[[Category:Citation utility templates]]
}}</includeonly>
1frv1e05b9c513evvxlyixpejtlt6ad
801822
801821
2024-02-19T01:37:38Z
en>Pppery
0
Not needed
801822
wikitext
text/x-wiki
{{Documentation subpage}}
<!-- Place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
{{lua|Module:Harvc}}
{{uses TemplateStyles|Module:Citation/CS1/styles.css}}
This template is a citation hybrid that has characteristics of long-form [[Help:Citation Style 1|cs1]] and [[Help:Citation Style 2|cs2]], of short-form {{tlx|sfn}} and of the {{tlx|harv}} families of templates. Its purpose is to provide a method that allows editors to refer to a contribution or chapter in a larger work when more than a few such referrals are required. {{tlx|harvc}} is not a substitute for a properly constructed citation.
Short-form templates {{tlx|sfn}} and {{tlx|harv}} are often used to link from an article's references section to a long-form cs1|2 template in a bibliography section:
:{{tlx|harv}} → {{tlx|cite book}} <span style="padding:0 1.5em">or:</span> {{tlx|sfn}} → {{tlx|cite book}}
It is not uncommon for a source to have multiple contributors. When it is necessary to refer to multiple contributions in the same source, repeating all of the bibliographic details in multiple long-form citation templates adds to references-section clutter. {{tlx|harvc}} is designed to hold only the detail necessary to identify a contribution and link to the enclosing work's long-form citation where all of the bibliographic detail can be found:
:{{tlx|harv}} → {{tlx|harvc}} → {{tlx|cite book}} <span style="padding:0 1.5em">or:</span> {{tlx|sfn}} → {{tlx|harvc}} → {{tlx|cite book}}
== Usage ==
The minimal form is:
:<code><nowiki>{{harvc |last=contributor name |year=publication year |c=contribution title |in=source editor/author name}}</nowiki></code>
According to the comments in [[Module:Harvc]], mistaken {{red|Harvc error: no target:}} error messages may be produced when the template is nested in other templates as on documentation pages. The otherwise undocumented parameter, {{para|ignore-err|yes}}, can be added to prevent this.
===Parameters===
{{tlx|harvc}} creates a <code>CITEREF</code> anchor from one to four contribution or chapter author surnames ({{para|last''n''}}) and the value in {{para|year}}. This allows {{tlx|harvc}} to be the target of a link created by {{tlx|sfn}} or {{tlx|harv}} family templates. From {{para|in{{var|n}}}} and {{para|year}}, {{tlx|harvc}} creates a CITEREF link similar to those created by {{tlx|harvnb}} and {{tlx|sfn}}
: '''|anchor-year=''' – optional, for use for author(s) with more than one contribution to the work; requires CITEREF disambiguator; see [[#More than one contribution|Examples]]
: '''|author-link=''' – optional, title of existing Wikipedia article about the first contributor—not the contributor's website; do not wikilink; alias: '''|author-link1='''
:: '''|author-link''n''=''' – optional, title of existing Wikipedia article about contributor''n''; choose ''n'' to match ''n'' in '''|last''n''='''
: '''|author-mask=''m''''' – optional, replaces name of the first contributor with ''m'' (commonly 2) em dashes; alias: '''|author-mask1='''
:: '''|author-mask''n''=''m''''' – optional, replaces name of contributor''n'' with ''m'' em dashes; choose ''n'' to match ''n'' in '''|last''n''='''
:: '''|author-mask{{var|n}}=<{{var|text}}>''' – optional, replaces name of contributor''n'' with <{{var|text}}>
: '''|c=''' – required, the title of chapter or contribution; rendered quoted in upright font; aliases: '''|chapter=''', '''|contribution='''
: '''|display-authors=''' – optional, defines how {{tlx|harvc}} displays the contributor list; ignored when '''|name-list-style=harv''':
:: {{para|display-authors}} – when empty or omitted, displays all contributor names in last/first format
:: {{para|display-authors|{{var|n}}}} – displays ''n'' contributor names in last/first format; appends et al. when ''n'' is less than the number of contributors included in the template
:: {{para|display-authors|etal}} – displays all contributor names in last/first format and appends et al.
: '''|first=''' – optional, first contributor's given or first name; alias: '''|first1='''
:: '''|first''n''=''' – optional, contributor''n'' given or first name; ''n'' begins at 2 and increases by 1 for each additional '''|first''n''='''
: '''|id=''' – required when {{para|last1}}-{{para|last4}} are the same as {{para|in1}}-{{para|in4}}; otherwise optional. See [[#Avoiding circular reference|Examples]]
: '''|in=''' – required, surname or last name of first editor or author of the work that includes the contribution; aliases: '''|in1='''
: '''|in2=''' – optional, surname or last name of second editor or author
: '''|in3=''' – optional, surname or last name of third editor or author
: '''|in4=''' – optional, surname or last name of fourth editor or author
: '''|last=''' – required, surname or last name of first author; aliases: '''|last1='''
:: '''|last''n''=''' – optional, contributor''n'' surname or last name; ''n'' begins at 2 and increases by 1 for each additional '''|last''n''=''';
: '''|loc=''' – optional, other location identifier, displays after {{para|p}} or {{para|pp}}
: '''|mode=''' – controls rendered display to match that of adjacent CS1 or CS2 citations; defaults to CS1 style
:: '''|mode=cs2''' – mimic {{tlx|citation}} style (comma separators, no terminal punctuation, static text not capitalized)
: '''|name-list-style=''' – optional, controls contributor name list display style
:: '''|name-list-style=harv''' – mimic {{tlx|sfn}} or {{tlx|harv}} format (one to four last names); overrides '''|display-authors='''
:: '''|name-list-style=amp''' – inserts an ampersand between the last two contributor names
: '''|nb=''' – optional, when set to <code>yes</code>, instructs {{tlx|harvc}} to render source link without parentheses around the year; same format as that produced by {{tlx|harvnb}}
: '''|p=''' – optional, single page number where cited material can be found; aliases: '''|page='''
: '''|pp=''' – optional, multiple page numbers, page ranges, etc where cited material can be found; aliases: '''|pages='''
: '''|ps=''' – optional, sets terminal punctuation; default is full stop; overrides '''|mode=cs2'''; aliases: '''|postscript='''
:: '''|ps=none''' – renders output without terminal punctuation
: '''|url=''' – optional, URL of an online location where the text of the contribution can be found; aliases: '''|chapter-url''', '''|contribution-url'''
: '''|url-access=''' – optional, use when URL links to a source behind a registration barrier or paywall; inserts [[Help:Citation_Style_1#Registration_or_subscription_required|cs1{{pipe}}2 access icon]]; accepted values are: <code>limited</code>, <code>registration</code>, <code>subscription</code>
: '''|year=''' – required, publication year of the work that includes the contribution
===Examples===
====Basic example====
{| class=wikitable style="width: 100%"
! scope=col style="width: 50%" | Without {{tl|harvc}}
! scope=col style="width: 50%" | With {{tl|harvc}}
|-
|
* {{cite book |last=Doe |first=John |year=1990 |chapter=Chapter 1 |editor-last=Moe |editor-first=Mary |title=The Book of Knowledge |publisher=University Press |ref=none}}
* {{cite book |last=Poe |first=Jane |year=1990 |chapter=Chapter 2 |editor-last=Moe |editor-first=Mary |title=The Book of Knowledge |publisher=University Press |ref=none}}
* {{cite book |last=Roe |first=Robert |year=1990 |chapter=Chapter 3 |editor-last=Moe |editor-first=Mary |title=The Book of Knowledge |publisher=University Press |ref=none}}
|
* {{cite book |editor-last=Moe |editor-first=Mary |year=1990 |title=The Book of Knowledge |publisher=University Press}}
** {{harvc |last=Doe |first=John |c=Chapter 1 |in=Moe |year=1990 |id=none |ignore-err=yes}}
** {{harvc |last=Poe |first=Jane |c=Chapter 2 |in=Moe |year=1990 |id=none |ignore-err=yes}}
** {{harvc |last=Roe |first=Robert |c=Chapter 3 |in=Moe |year=1990 |id=none |ignore-err=yes}}
|}
{| class=wikitable style="width: 100%"
|+ Markup
|-
| style="width: 50%" |
<nowiki>
* {{cite book |last=Doe |first=John |year=1990 |chapter=Chapter 1 |editor-last=Moe |editor-first=Mary |title=The Book of Knowledge |publisher=University Press}}
* {{cite book |last=Poe |first=Jane |year=1990 |chapter=Chapter 2 |editor-last=Moe |editor-first=Mary |title=The Book of Knowledge |publisher=University Press}}
* {{cite book |last=Roe |first=Robert |year=1990 |chapter=Chapter 3 |editor-last=Moe |editor-first=Mary |title=The Book of Knowledge |publisher=University Press}}
</nowiki>
| style="width: 50%|
<nowiki>
* {{cite book |editor-last=Moe |editor-first=Mary |year=1990 |title=The Book of Knowledge |publisher=University Press}}
** {{harvc |last=Doe |first=John |c=Chapter 1 |in=Moe |year=1990}}
** {{harvc |last=Poe |first=Jane |c=Chapter 2 |in=Moe |year=1990}}
** {{harvc |last=Roe |first=Robert |c=Chapter 3 |in=Moe |year=1990}}
</nowiki>
|}
====Detailed example====
When a Wikipedia article makes reference to a work that contains multiple chapters by different authors, bibliographies and reference sections can look rather cluttered:
* {{cite book |last=George |first=Ernest J. |last2=Read |first2=Ralph A. |last3=Johnson |first3=R. W. |last4=Ferber |first4=A. E. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Shelterbelts and Windbreaks |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=https://archive.org/stream/yoa1957#page/n785/mode/1up |oclc=704186906 |ref=none}}
* {{cite book |last=Harper |first=V. L. |last2=Frank |first2=Bernard |last3=McQuilkin |first3=W. E. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Forest Practices and Productivity |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=https://archive.org/stream/yoa1957#page/n803/mode/1up |oclc=704186906 |ref=none}}
* {{cite book |last=Stout |first=P. R. |last2=Johnson |first2=C. M. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Trace Elements |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=https://archive.org/stream/yoa1957#page/n167/mode/1up |oclc=704186906 |ref=none}}
* {{cite book |last=Wadleigh |first=C. H. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Growth of Plants |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=https://archive.org/stream/yoa1957#page/n57/mode/1up |oclc=704186906 |ref=none}}
As the list grows longer, the look becomes more cluttered with the unnecessarily repeated detail of full-length citations. With {{tlx|harvc}} editors can link to shorter, less detailed contribution citations using standard implementations of {{tlx|sfn}} templates and {{tlx|harv}} templates (and also wrapped in {{tag|ref}} tags with {{tlx|harvnb}}). {{tlx|harvc}} may also be wrapped in {{tag|ref}} tags so that it becomes part of the article's References section. See full example below.
=====Avoiding circular reference=====
It may sometimes be necessary to cite a contribution of a source's editor or author such that {{para|last1}} through {{para|last4}} are the same as {{para|in1}} through {{para|in4}}, an editor's preface for example. Such citations can, depending on placement, cause {{tlx|sfn}} or {{tlx|harv}}-family references to link directly to the citation instead of to the {{tlx|harvc}} template, or cause circular links ({{tlx|harvc}} linking to itself because its <code>CITEREF</code> anchor identifier is the same as the citation's <code>CITEREF</code> anchor identifier). If {{para|id}} is set, {{tlx|harvc}} will use it as an anchor identifier; if {{para|id}} is not set, {{tlx|harvc}} will emit an error message when {{para|last1}} through {{para|last4}} are the same as {{para|in1}} through {{para|in4}}.
For example, to reference an editor's preface from article text, create a wikilink inside {{tag|ref}} tags:
:<code><nowiki><ref>[[#Stefferud preface|Stefferud 1957]]</ref></nowiki></code>
Write a {{tlx|harvc}} template with {{para|id|Stefferud preface}}
:<code><nowiki>{{harvc |last=Stefferud |first=A.|year=1957 |id=Stefferud preface |c=Preface |url=https://archive.org/stream/yoa1957#page/n7/mode/1up |in=Stefferud}}</nowiki></code>
{{markupv|title=Full example:|markup=
<nowiki>First information.{{sfn|George|Read|Johnson|Ferber|1957}} Second.<ref>{{harvnb|Stout|Johnson|1957}}</ref> Three thru five.<ref>{{harvnb|Stout|Johnson|1957}}</ref><ref>{{harvc|last=Benson|first=Ezra Taft|year=1957|chapter=Foreword|url=https://archive.org/stream/yoa1957#page/n5/mode/1up|in=Stefferud|p=vi |loc=§2 |ignore-err=yes}}</ref>{{sfn|Wadleigh|1957}} Sixth.<ref>[[#Stefferud preface|Stefferud 1957]]</ref>
<!-- ==Notes== --> {{fake heading|sub=3|Notes}}
{{reflist}}
<!-- ==References== --> {{fake heading|sub=3|References}}
* {{cite book |title=Soil: The Yearbook of Agriculture 1957 |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |url=https://archive.org/stream/yoa1957 |oclc=704186906 }}
** {{harvc |last=George |first=Ernest J. |last2=Read |last3=Johnson |last4=Ferber |year=1957 |contribution=Shelterbelts and Windbreaks |url=https://archive.org/stream/yoa1957#page/n785/mode/1up |in=Stefferud |ignore-err=yes}}
** {{harvc |last=Harper |first=V. L. |last2=Frank |last3=McQuilkin |year=1957 |contribution=Forest Practices |url=https://archive.org/stream/yoa1957#page/n803/mode/1up |in=Stefferud |ignore-err=yes}}
** {{harvc |last=Stefferud |first=A.|year=1957 |id=Stefferud preface |c=Preface |url=https://archive.org/stream/yoa1957#page/n7/mode/1up |in=Stefferud |ignore-err=yes}}
** {{harvc |last=Stout |first=P. R. |last2=Johnson |year=1957 |c=Trace Elements |url=https://archive.org/stream/yoa1957#page/n167/mode/1up |in=Stefferud |ignore-err=yes}}
** {{harvc |last=Wadleigh |first=C. H.|year=1957 |c=Growth of Plants |url=https://archive.org/stream/yoa1957#page/n57/mode/1up |in=Stefferud |ignore-err=yes}}
</nowiki>|renders=First information.{{sfn|George|Read|Johnson|Ferber|1957}} Second.<ref>{{harvnb|Stout|Johnson|1957}}</ref> Three thru five.<ref>{{harvnb|Stout|Johnson|1957}}</ref><ref>{{harvc|last=Benson|first=Ezra Taft|year=1957|chapter=Foreword|url=https://archive.org/stream/yoa1957#page/n5/mode/1up|in=Stefferud|p=vi |loc=§2 |ignore-err=yes}}</ref>{{sfn|Wadleigh|1957}} Sixth.<ref>[[#Stefferud preface|Stefferud 1957]]</ref>
<!-- ==Notes== --> {{fake heading|sub=3|Notes}}
{{reflist}}
<!-- ==References== --> {{fake heading|sub=3|References}}
* {{cite book |title=Soil: The Yearbook of Agriculture 1957 |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |url=https://archive.org/stream/yoa1957 |oclc=704186906 }}
** {{harvc |last=George |first=Ernest J. |last2=Read |last3=Johnson |last4=Ferber |year=1957 |contribution=Shelterbelts and Windbreaks |url=https://archive.org/stream/yoa1957#page/n785/mode/1up |in=Stefferud |ignore-err=yes}}
** {{harvc |last=Harper |first=V. L. |last2=Frank |last3=McQuilkin |year=1957 |contribution=Forest Practices |url=https://archive.org/stream/yoa1957#page/n803/mode/1up |in=Stefferud |ignore-err=yes |id=none}}
** {{harvc |last=Stefferud |first=A.|year=1957 |id=Stefferud preface |c=Preface |url=https://archive.org/stream/yoa1957#page/n7/mode/1up |in=Stefferud |ignore-err=yes}}
** {{harvc |last=Stout |first=P. R. |last2=Johnson |year=1957 |c=Trace Elements |url=https://archive.org/stream/yoa1957#page/n167/mode/1up |in=Stefferud |ignore-err=yes}}
** {{harvc |last=Wadleigh |first=C. H.|year=1957 |c=Growth of Plants |url=https://archive.org/stream/yoa1957#page/n57/mode/1up |in=Stefferud |ignore-err=yes}}}}<!-- Template:Mra -->
Note again the parameter <code><nowiki>ignore-err=yes</nowiki></code> is simply to suppress errors that occur when this template is embedded, such as in documentation. It should not be used otherwise.
=====More than one contribution=====
There are times when an author or authors will have contributed more than once to a work. When this occurs, it is necessary to disambiguate the CITEREF links from the {{tlx|harv}} or {{tlx|sfn}} templates to the CITEREF id of the appropriate {{tlx|harvc}} template.
:{{tlx|harv|Author|YYYYa}} → {{tlx|harvc|Author|Contribution 1|YYYYa}} → {{tlx|citation|...}}}
:{{tlx|harv|Author|YYYYb}} → {{tlx|harvc|Author|Contribution 2|YYYYb}} ↑
In this example, author David Hunt contributed two appendices to ''Christmas Cacti: The Genus ''Schlumbergera'' and Its Hybrids''.
There are two {{tlx|harvnb}} templates that are disambiguated:
:<code><nowiki>{{harvnb |Hunt |1995a}}</nowiki></code> → Hunt 1995a
:<code><nowiki>{{harvnb |Hunt |1995b}}</nowiki></code> → Hunt 1995b
These link to two {{tlx|harvc}} templates which use {{para|anchor-year}} for their CITEREF id and for the date in the {{tlx|harvc}} rendering as a visual aid for readers:
{{markup|
<nowiki>{{harvnb |Hunt |1995a}}; {{harvnb |Hunt |1995b}}.
<!-- ==References== --> {{fake heading|sub=3|References}}
* {{Citation |last=McMillan |first=AJS |last2=Horobin |first2=JF |year=1995 |title=Christmas Cacti: The Genus ''Schlumbergera'' and Its Hybrids |edition=p/b |publication-place=Sherbourne, UK |publisher=David Hunt |isbn=978-0-9517234-6-3}}
** {{harvc |in=McMillan |in2=Horobin |last=Hunt |first=David |c=Appendix I Names of the species |year=1995 |anchor-year=1995a |mode=cs2 |nb=yes |ignore-err=yes}}
** {{harvc |in=McMillan |in2=Horobin |last=Hunt |first=David |c=Appendix III Excerpts from a Brazilian diary |year=1995 |anchor-year=1995b |mode=cs2 |nb=yes |ignore-err=yes}}
</nowiki>|{{harvnb |Hunt |1995a}}; {{harvnb |Hunt |1995b}}.
<!-- ==References== --> {{fake heading|sub=3|References}}
* {{Citation |last=McMillan |first=AJS |last2=Horobin |first2=JF |year=1995 |title=Christmas Cacti: The Genus ''Schlumbergera'' and Its Hybrids |edition=p/b |publication-place=Sherbourne, UK |publisher=David Hunt |isbn=978-0-9517234-6-3}}
** {{harvc |in=McMillan |in2=Horobin |last=Hunt |first=David |c=Appendix I Names of the species |year=1995 |anchor-year=1995a |mode=cs2 |nb=yes |ignore-err=yes}}
** {{harvc |in=McMillan |in2=Horobin |last=Hunt |first=David |c=Appendix III Excerpts from a Brazilian diary |year=1995 |anchor-year=1995b |mode=cs2 |nb=yes |ignore-err=yes}}}}<!-- Template:Mra -->
=====Collision with a different work=====
Because the mediawiki software uses CITEREF id to link from the {{tl|harv}} or {{tl|sfn}} templates to the matching destination anchor of the appropriate {{tl|harvc}} template (or full citation), CITEREF ids must be unique page-wide.{{efn|1=When CITEREF ids are not unique on a page, you will see a [[:Category:Harv and Sfn template errors#Error messages|red error message]], <span style="color:#d73333">Harv/sfn error: multiple targets (n): <anchor ID></span> in the References appendix on the page, unless you have error messages from [[Module:Footnotes]] turned off.}} Since the CITEREF id typically consists of 'CITEREF' + ''LastName'' of author(s) + ''Year'', this can be problematic in two cases. The first case was described [[#More than one contribution|above]]. The other case is collision with a different work, described here.
There are times when an author you wish to cite using {{tl|harvc}} has just one chapter contributed to a work, but the same author also wrote an entirely different work in the same year. Citing both of these in the normal way would cause a CITEREF id collision on the page and result in an error message. There are two ways to resolve this: one involves an additional parameter in the {{tl|harvc}} template, the other way involves an additional parameter in the full citation of the other work.
The first way is to add the {{para|anchor-year}} param to the {{tl|harvc}} chapter citation, as already [[#More than one contribution|described above]] for the case of two chapters by one author. This will assign a uniqueness character to the ''Year'' portion of the CITEREF id, thus distinguishing it from the CITEREF id of the other work that year by the same author.
The other way, is to add a {{para|ref}} param to the {{tl|cite book}} (or other [[Wikipedia:Citing sources#Short and full citations|full citation]]) of the other work in the same year by that author, specifying a different id as the ref value. See [[Template:Cite book#Anchor]] for more about using {{para|ref}} to specify a destination anchor for a citation, and see {{tl|harvid}} for how to specify the ref param value.
==Error messages==
{{tlx|harvc}} emits these error messages:<!--
:<span style="font-size:100%" class="error">harvc: {{para|anchor-year|plain=yes}} missing dab.</span>
::when used, {{para|anchor-year}} must include a single, lowercase letter disambiguator -->
:<span style="font-size:100%" class="error">harvc: author missing from source list.</span>
::the source list parameters {{para|in1}}, {{para|in2}}, {{para|in3}}, and {{para|in4}} form the template's <code>CITEREF</code> link to the full citation. All are not required but must be used in order without numerical gaps.
:<span style="font-size:100%" class="error">harvc: invalid {{para|anchor-year|plain=yes}}.</span>
::when used, {{para|anchor-year}} must be a three- or four-digit number and must have a lowercase <code>CITEREF</code> disambiguator. When the source does not have an identifiable year, use {{para|anchor-year|n.d.{{var|l}}}} or {{para|anchor-year|nd{{var|l}}}} with lowercase <code>CITEREF</code> disambiguator.
:<span style="font-size:100%" class="error">harvc: invalid {{para|display-authors|plain=yes}}.</span>
::the value assigned to {{para|display-authors}} must be a number greater than 0 or the keyword <code>etal</code>
:<span style="font-size:100%" class="error">harvc: invalid {{para|year|plain=yes}}.</span>
::{{para|year}} is an integral part of the template's <code>CITEREF</code> anchor and link. The value of {{para|year}} must be a three- or four-digit number with an optional lowercase <code>CITEREF</code> disambiguator. When the source does not have an identifiable year, use {{para|year|n.d.}} or {{para|year|nd}}.
:<span style="font-size:100%" class="error">harvc: missing {{para|year|plain=yes}}.</span>
::{{para|year}} is missing; the parameter is required.
:<span style="font-size:100%" class="error">harvc: no authors in contributor list.</span>
::this error message indicates that {{tlx|harvc}} can't find any of {{para|last}}, {{para|last1}}, {{para|author}} or {{para|author1}} with an assigned value and so cannot make a usable <code>CITEREF</code> anchor. Add at least one of the listed parameters.
:<span style="font-size:100%" class="error">harvc: required contribution is missing.</span>
::this error message indicates that {{tlx|harvc}} can't find any of {{para|c}}, {{para|chapter}}, or {{para|contribution}} with an assigned value
:<span style="font-size:100%" class="error">harvc: required {{para|id|plain=yes}} parameter missing.</span>
::this error message is emitted when the {{tlx|harvc}} template's <code>CITEREF</code> anchor identifier would conflict with the long-form citation's <code>CITEREF</code> anchor identifier. See [[#Avoiding circular reference|Examples]]
:<span style="font-size:100%" class="error">harvc: {{para|year|plain=yes}} / {{para|anchor-year|plain=yes}} mismatch.</span>
::the year portion of {{para|anchor-year|YYYY{{var|l}}}} must match the year given in {{para|year|YYYY}}
Additional information about "no target" and other category errors may be found at [[:Category:Harv and Sfn no-target errors]].
==Notes==
{{notelist}}
<includeonly>{{Sandbox other||
<!-- Categories below this line, please; interwikis at Wikidata -->
[[Category:Citation utility templates]]
}}</includeonly>
svp2icuv7h43hmrj24pdz3q59qm9mcy
801823
801822
2024-09-02T03:02:16Z
46.161.197.163
801823
wikitext
text/x-wiki
{{Documentation subpage}}
<!-- Place categories where indicated at the bottom of this page and مؤسسه at Wikidata (see [[Wikipedia:Wikidata]]) -->
{{lua|Module:Harvc}}
{{uses TemplateStyles|Module:Citation/CS1/styles.css}}
This template is a citation hybrid that has characteristics of long-form [[Help:Citation Style 1|cs1]] and [[Help:Citation Style 2|cs2]], of short-form {{tlx|sfn}} and of the {{tlx|harv}} families of templates. Its purpose is to provide a method that allows editors to refer to a contribution or chapter in a larger work when more than a few such referrals are required. {{tlx|harvc}} is not a substitute for a properly constructed citation.
Short-form templates {{tlx|sfn}} and {{tlx|harv}} are often used to link from an article's references section to a long-form cs1|2 template in a bibliography section:
:{{tlx|harv}} → {{tlx|cite book}} <span style="padding:0 1.5em">or:</span> {{tlx|sfn}} → {{tlx|cite book}}
It is not uncommon for a source to have multiple contributors. When it is necessary to refer to multiple contributions in the same source, repeating all of the bibliographic details in multiple long-form citation templates adds to references-section clutter. {{tlx|harvc}} is designed to hold only the detail necessary to identify a contribution and link to the enclosing work's long-form citation where all of the bibliographic detail can be found:
:{{tlx|harv}} → {{tlx|harvc}} → {{tlx|cite book}} <span style="padding:0 1.5em">or:</span> {{tlx|sfn}} → {{tlx|harvc}} → {{tlx|cite book}}
== Usage ==
The minimal form is:
:<code><nowiki>{{harvc |last=contributor name |year=publication year |c=contribution title |in=source editor/author name}}</nowiki></code>
According to the comments in [[Module:Harvc]], mistaken {{red|Harvc error: no target:}} error messages may be produced when the template is nested in other templates as on documentation pages. The otherwise undocumented parameter, {{para|ignore-err|yes}}, can be added to prevent this.
===Parameters===
{{tlx|harvc}} creates a <code>CITEREF</code> anchor from one to four contribution or chapter author surnames ({{para|last''n''}}) and the value in {{para|year}}. This allows {{tlx|harvc}} to be the target of a link created by {{tlx|sfn}} or {{tlx|harv}} family templates. From {{para|in{{var|n}}}} and {{para|year}}, {{tlx|harvc}} creates a CITEREF link similar to those created by {{tlx|harvnb}} and {{tlx|sfn}}
: '''|anchor-year=''' – optional, for use for author(s) with more than one contribution to the work; requires CITEREF disambiguator; see [[#More than one contribution|Examples]]
: '''|author-link=''' – optional, title of existing Wikipedia article about the first contributor—not the contributor's website; do not wikilink; alias: '''|author-link1='''
:: '''|author-link''n''=''' – optional, title of existing Wikipedia article about contributor''n''; choose ''n'' to match ''n'' in '''|last''n''='''
: '''|author-mask=''m''''' – optional, replaces name of the first contributor with ''m'' (commonly 2) em dashes; alias: '''|author-mask1='''
:: '''|author-mask''n''=''m''''' – optional, replaces name of contributor''n'' with ''m'' em dashes; choose ''n'' to match ''n'' in '''|last''n''='''
:: '''|author-mask{{var|n}}=<{{var|text}}>''' – optional, replaces name of contributor''n'' with <{{var|text}}>
: '''|c=''' – required, the title of chapter or contribution; rendered quoted in upright font; aliases: '''|chapter=''', '''|contribution='''
: '''|display-authors=''' – optional, defines how {{tlx|harvc}} displays the contributor list; ignored when '''|name-list-style=harv''':
:: {{para|display-authors}} – when empty or omitted, displays all contributor names in last/first format
:: {{para|display-authors|{{var|n}}}} – displays ''n'' contributor names in last/first format; appends et al. when ''n'' is less than the number of contributors included in the template
:: {{para|display-authors|etal}} – displays all contributor names in last/first format and appends et al.
: '''|first=''' – optional, first contributor's given or first name; alias: '''|first1='''
:: '''|first''n''=''' – optional, contributor''n'' given or first name; ''n'' begins at 2 and increases by 1 for each additional '''|first''n''='''
: '''|id=''' – required when {{para|last1}}-{{para|last4}} are the same as {{para|in1}}-{{para|in4}}; otherwise optional. See [[#Avoiding circular reference|Examples]]
: '''|in=''' – required, surname or last name of first editor or author of the work that includes the contribution; aliases: '''|in1='''
: '''|in2=''' – optional, surname or last name of second editor or author
: '''|in3=''' – optional, surname or last name of third editor or author
: '''|in4=''' – optional, surname or last name of fourth editor or author
: '''|last=''' – required, surname or last name of first author; aliases: '''|last1='''
:: '''|last''n''=''' – optional, contributor''n'' surname or last name; ''n'' begins at 2 and increases by 1 for each additional '''|last''n''=''';
: '''|loc=''' – optional, other location identifier, displays after {{para|p}} or {{para|pp}}
: '''|mode=''' – controls rendered display to match that of adjacent CS1 or CS2 citations; defaults to CS1 style
:: '''|mode=cs2''' – mimic {{tlx|citation}} style (comma separators, no terminal punctuation, static text not capitalized)
: '''|name-list-style=''' – optional, controls contributor name list display style
:: '''|name-list-style=harv''' – mimic {{tlx|sfn}} or {{tlx|harv}} format (one to four last names); overrides '''|display-authors='''
:: '''|name-list-style=amp''' – inserts an ampersand between the last two contributor names
: '''|nb=''' – optional, when set to <code>yes</code>, instructs {{tlx|harvc}} to render source link without parentheses around the year; same format as that produced by {{tlx|harvnb}}
: '''|p=''' – optional, single page number where cited material can be found; aliases: '''|page='''
: '''|pp=''' – optional, multiple page numbers, page ranges, etc where cited material can be found; aliases: '''|pages='''
: '''|ps=''' – optional, sets terminal punctuation; default is full stop; overrides '''|mode=cs2'''; aliases: '''|postscript='''
:: '''|ps=none''' – renders output without terminal punctuation
: '''|url=''' – optional, URL of an online location where the text of the contribution can be found; aliases: '''|chapter-url''', '''|contribution-url'''
: '''|url-access=''' – optional, use when URL links to a source behind a registration barrier or paywall; inserts [[Help:Citation_Style_1#Registration_or_subscription_required|cs1{{pipe}}2 access icon]]; accepted values are: <code>limited</code>, <code>registration</code>, <code>subscription</code>
: '''|year=''' – required, publication year of the work that includes the contribution
===Examples===
====Basic example====
{| class=wikitable style="width: 100%"
! scope=col style="width: 50%" | Without {{tl|harvc}}
! scope=col style="width: 50%" | With {{tl|harvc}}
|-
|
* {{cite book |last=Doe |first=John |year=1990 |chapter=Chapter 1 |editor-last=Moe |editor-first=Mary |title=The Book of Knowledge |publisher=University Press |ref=none}}
* {{cite book |last=Poe |first=Jane |year=1990 |chapter=Chapter 2 |editor-last=Moe |editor-first=Mary |title=The Book of Knowledge |publisher=University Press |ref=none}}
* {{cite book |last=Roe |first=Robert |year=1990 |chapter=Chapter 3 |editor-last=Moe |editor-first=Mary |title=The Book of Knowledge |publisher=University Press |ref=none}}
|
* {{cite book |editor-last=Moe |editor-first=Mary |year=1990 |title=The Book of Knowledge |publisher=University Press}}
** {{harvc |last=Doe |first=John |c=Chapter 1 |in=Moe |year=1990 |id=none |ignore-err=yes}}
** {{harvc |last=Poe |first=Jane |c=Chapter 2 |in=Moe |year=1990 |id=none |ignore-err=yes}}
** {{harvc |last=Roe |first=Robert |c=Chapter 3 |in=Moe |year=1990 |id=none |ignore-err=yes}}
|}
{| class=wikitable style="width: 100%"
|+ Markup
|-
| style="width: 50%" |
<nowiki>
* {{cite book |last=Doe |first=John |year=1990 |chapter=Chapter 1 |editor-last=Moe |editor-first=Mary |title=The Book of Knowledge |publisher=University Press}}
* {{cite book |last=Poe |first=Jane |year=1990 |chapter=Chapter 2 |editor-last=Moe |editor-first=Mary |title=The Book of Knowledge |publisher=University Press}}
* {{cite book |last=Roe |first=Robert |year=1990 |chapter=Chapter 3 |editor-last=Moe |editor-first=Mary |title=The Book of Knowledge |publisher=University Press}}
</nowiki>
| style="width: 50%|
<nowiki>
* {{cite book |editor-last=Moe |editor-first=Mary |year=1990 |title=The Book of Knowledge |publisher=University Press}}
** {{harvc |last=Doe |first=John |c=Chapter 1 |in=Moe |year=1990}}
** {{harvc |last=Poe |first=Jane |c=Chapter 2 |in=Moe |year=1990}}
** {{harvc |last=Roe |first=Robert |c=Chapter 3 |in=Moe |year=1990}}
</nowiki>
|}
====Detailed example====
When a Wikipedia article makes reference to a work that contains multiple chapters by different authors, bibliographies and reference sections can look rather cluttered:
* {{cite book |last=George |first=Ernest J. |last2=Read |first2=Ralph A. |last3=Johnson |first3=R. W. |last4=Ferber |first4=A. E. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Shelterbelts and Windbreaks |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=https://archive.org/stream/yoa1957#page/n785/mode/1up |oclc=704186906 |ref=none}}
* {{cite book |last=Harper |first=V. L. |last2=Frank |first2=Bernard |last3=McQuilkin |first3=W. E. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Forest Practices and Productivity |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=https://archive.org/stream/yoa1957#page/n803/mode/1up |oclc=704186906 |ref=none}}
* {{cite book |last=Stout |first=P. R. |last2=Johnson |first2=C. M. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Trace Elements |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=https://archive.org/stream/yoa1957#page/n167/mode/1up |oclc=704186906 |ref=none}}
* {{cite book |last=Wadleigh |first=C. H. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Growth of Plants |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=https://archive.org/stream/yoa1957#page/n57/mode/1up |oclc=704186906 |ref=none}}
As the list grows longer, the look becomes more cluttered with the unnecessarily repeated detail of full-length citations. With {{tlx|harvc}} editors can link to shorter, less detailed contribution citations using standard implementations of {{tlx|sfn}} templates and {{tlx|harv}} templates (and also wrapped in {{tag|ref}} tags with {{tlx|harvnb}}). {{tlx|harvc}} may also be wrapped in {{tag|ref}} tags so that it becomes part of the article's References section. See full example below.
=====Avoiding circular reference=====
It may sometimes be necessary to cite a contribution of a source's editor or author such that {{para|last1}} through {{para|last4}} are the same as {{para|in1}} through {{para|in4}}, an editor's preface for example. Such citations can, depending on placement, cause {{tlx|sfn}} or {{tlx|harv}}-family references to link directly to the citation instead of to the {{tlx|harvc}} template, or cause circular links ({{tlx|harvc}} linking to itself because its <code>CITEREF</code> anchor identifier is the same as the citation's <code>CITEREF</code> anchor identifier). If {{para|id}} is set, {{tlx|harvc}} will use it as an anchor identifier; if {{para|id}} is not set, {{tlx|harvc}} will emit an error message when {{para|last1}} through {{para|last4}} are the same as {{para|in1}} through {{para|in4}}.
For example, to reference an editor's preface from article text, create a wikilink inside {{tag|ref}} tags:
:<code><nowiki><ref>[[#Stefferud preface|Stefferud 1957]]</ref></nowiki></code>
Write a {{tlx|harvc}} template with {{para|id|Stefferud preface}}
:<code><nowiki>{{harvc |last=Stefferud |first=A.|year=1957 |id=Stefferud preface |c=Preface |url=https://archive.org/stream/yoa1957#page/n7/mode/1up |in=Stefferud}}</nowiki></code>
{{markupv|title=Full example:|markup=
<nowiki>First information.{{sfn|George|Read|Johnson|Ferber|1957}} Second.<ref>{{harvnb|Stout|Johnson|1957}}</ref> Three thru five.<ref>{{harvnb|Stout|Johnson|1957}}</ref><ref>{{harvc|last=Benson|first=Ezra Taft|year=1957|chapter=Foreword|url=https://archive.org/stream/yoa1957#page/n5/mode/1up|in=Stefferud|p=vi |loc=§2 |ignore-err=yes}}</ref>{{sfn|Wadleigh|1957}} Sixth.<ref>[[#Stefferud preface|Stefferud 1957]]</ref>
<!-- ==Notes== --> {{fake heading|sub=3|Notes}}
{{reflist}}
<!-- ==References== --> {{fake heading|sub=3|References}}
* {{cite book |title=Soil: The Yearbook of Agriculture 1957 |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |url=https://archive.org/stream/yoa1957 |oclc=704186906 }}
** {{harvc |last=George |first=Ernest J. |last2=Read |last3=Johnson |last4=Ferber |year=1957 |contribution=Shelterbelts and Windbreaks |url=https://archive.org/stream/yoa1957#page/n785/mode/1up |in=Stefferud |ignore-err=yes}}
** {{harvc |last=Harper |first=V. L. |last2=Frank |last3=McQuilkin |year=1957 |contribution=Forest Practices |url=https://archive.org/stream/yoa1957#page/n803/mode/1up |in=Stefferud |ignore-err=yes}}
** {{harvc |last=Stefferud |first=A.|year=1957 |id=Stefferud preface |c=Preface |url=https://archive.org/stream/yoa1957#page/n7/mode/1up |in=Stefferud |ignore-err=yes}}
** {{harvc |last=Stout |first=P. R. |last2=Johnson |year=1957 |c=Trace Elements |url=https://archive.org/stream/yoa1957#page/n167/mode/1up |in=Stefferud |ignore-err=yes}}
** {{harvc |last=Wadleigh |first=C. H.|year=1957 |c=Growth of Plants |url=https://archive.org/stream/yoa1957#page/n57/mode/1up |in=Stefferud |ignore-err=yes}}
</nowiki>|renders=First information.{{sfn|George|Read|Johnson|Ferber|1957}} Second.<ref>{{harvnb|Stout|Johnson|1957}}</ref> Three thru five.<ref>{{harvnb|Stout|Johnson|1957}}</ref><ref>{{harvc|last=Benson|first=Ezra Taft|year=1957|chapter=Foreword|url=https://archive.org/stream/yoa1957#page/n5/mode/1up|in=Stefferud|p=vi |loc=§2 |ignore-err=yes}}</ref>{{sfn|Wadleigh|1957}} Sixth.<ref>[[#Stefferud preface|Stefferud 1957]]</ref>
<!-- ==Notes== --> {{fake heading|sub=3|Notes}}
{{reflist}}
<!-- ==References== --> {{fake heading|sub=3|References}}
* {{cite book |title=Soil: The Yearbook of Agriculture 1957 |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |url=https://archive.org/stream/yoa1957 |oclc=704186906 }}
** {{harvc |last=George |first=Ernest J. |last2=Read |last3=Johnson |last4=Ferber |year=1957 |contribution=Shelterbelts and Windbreaks |url=https://archive.org/stream/yoa1957#page/n785/mode/1up |in=Stefferud |ignore-err=yes}}
** {{harvc |last=Harper |first=V. L. |last2=Frank |last3=McQuilkin |year=1957 |contribution=Forest Practices |url=https://archive.org/stream/yoa1957#page/n803/mode/1up |in=Stefferud |ignore-err=yes |id=none}}
** {{harvc |last=Stefferud |first=A.|year=1957 |id=Stefferud preface |c=Preface |url=https://archive.org/stream/yoa1957#page/n7/mode/1up |in=Stefferud |ignore-err=yes}}
** {{harvc |last=Stout |first=P. R. |last2=Johnson |year=1957 |c=Trace Elements |url=https://archive.org/stream/yoa1957#page/n167/mode/1up |in=Stefferud |ignore-err=yes}}
** {{harvc |last=Wadleigh |first=C. H.|year=1957 |c=Growth of Plants |url=https://archive.org/stream/yoa1957#page/n57/mode/1up |in=Stefferud |ignore-err=yes}}}}<!-- Template:Mra -->
Note again the parameter <code><nowiki>ignore-err=yes</nowiki></code> is simply to suppress errors that occur when this template is embedded, such as in documentation. It should not be used otherwise.
=====More than one contribution=====
There are times when an author or authors will have contributed more than once to a work. When this occurs, it is necessary to disambiguate the CITEREF links from the {{tlx|harv}} or {{tlx|sfn}} templates to the CITEREF id of the appropriate {{tlx|harvc}} template.
:{{tlx|harv|Author|YYYYa}} → {{tlx|harvc|Author|Contribution 1|YYYYa}} → {{tlx|citation|...}}}
:{{tlx|harv|Author|YYYYb}} → {{tlx|harvc|Author|Contribution 2|YYYYb}} ↑
In this example, author David Hunt contributed two appendices to ''Christmas Cacti: The Genus ''Schlumbergera'' and Its Hybrids''.
There are two {{tlx|harvnb}} templates that are disambiguated:
:<code><nowiki>{{harvnb |Hunt |1995a}}</nowiki></code> → Hunt 1995a
:<code><nowiki>{{harvnb |Hunt |1995b}}</nowiki></code> → Hunt 1995b
These link to two {{tlx|harvc}} templates which use {{para|anchor-year}} for their CITEREF id and for the date in the {{tlx|harvc}} rendering as a visual aid for readers:
{{markup|
<nowiki>{{harvnb |Hunt |1995a}}; {{harvnb |Hunt |1995b}}.
<!-- ==References== --> {{fake heading|sub=3|References}}
* {{Citation |last=McMillan |first=AJS |last2=Horobin |first2=JF |year=1995 |title=Christmas Cacti: The Genus ''Schlumbergera'' and Its Hybrids |edition=p/b |publication-place=Sherbourne, UK |publisher=David Hunt |isbn=978-0-9517234-6-3}}
** {{harvc |in=McMillan |in2=Horobin |last=Hunt |first=David |c=Appendix I Names of the species |year=1995 |anchor-year=1995a |mode=cs2 |nb=yes |ignore-err=yes}}
** {{harvc |in=McMillan |in2=Horobin |last=Hunt |first=David |c=Appendix III Excerpts from a Brazilian diary |year=1995 |anchor-year=1995b |mode=cs2 |nb=yes |ignore-err=yes}}
</nowiki>|{{harvnb |Hunt |1995a}}; {{harvnb |Hunt |1995b}}.
<!-- ==References== --> {{fake heading|sub=3|References}}
* {{Citation |last=McMillan |first=AJS |last2=Horobin |first2=JF |year=1995 |title=Christmas Cacti: The Genus ''Schlumbergera'' and Its Hybrids |edition=p/b |publication-place=Sherbourne, UK |publisher=David Hunt |isbn=978-0-9517234-6-3}}
** {{harvc |in=McMillan |in2=Horobin |last=Hunt |first=David |c=Appendix I Names of the species |year=1995 |anchor-year=1995a |mode=cs2 |nb=yes |ignore-err=yes}}
** {{harvc |in=McMillan |in2=Horobin |last=Hunt |first=David |c=Appendix III Excerpts from a Brazilian diary |year=1995 |anchor-year=1995b |mode=cs2 |nb=yes |ignore-err=yes}}}}<!-- Template:Mra -->
=====Collision with a different work=====
Because the mediawiki software uses CITEREF id to link from the {{tl|harv}} or {{tl|sfn}} templates to the matching destination anchor of the appropriate {{tl|harvc}} template (or full citation), CITEREF ids must be unique page-wide.{{efn|1=When CITEREF ids are not unique on a page, you will see a [[:Category:Harv and Sfn template errors#Error messages|red error message]], <span style="color:#d73333">Harv/sfn error: multiple targets (n): <anchor ID></span> in the References appendix on the page, unless you have error messages from [[Module:Footnotes]] turned off.}} Since the CITEREF id typically consists of 'CITEREF' + ''LastName'' of author(s) + ''Year'', this can be problematic in two cases. The first case was described [[#More than one contribution|above]]. The other case is collision with a different work, described here.
There are times when an author you wish to cite using {{tl|harvc}} has just one chapter contributed to a work, but the same author also wrote an entirely different work in the same year. Citing both of these in the normal way would cause a CITEREF id collision on the page and result in an error message. There are two ways to resolve this: one involves an additional parameter in the {{tl|harvc}} template, the other way involves an additional parameter in the full citation of the other work.
The first way is to add the {{para|anchor-year}} param to the {{tl|harvc}} chapter citation, as already [[#More than one contribution|described above]] for the case of two chapters by one author. This will assign a uniqueness character to the ''Year'' portion of the CITEREF id, thus distinguishing it from the CITEREF id of the other work that year by the same author.
The other way, is to add a {{para|ref}} param to the {{tl|cite book}} (or other [[Wikipedia:Citing sources#Short and full citations|full citation]]) of the other work in the same year by that author, specifying a different id as the ref value. See [[Template:Cite book#Anchor]] for more about using {{para|ref}} to specify a destination anchor for a citation, and see {{tl|harvid}} for how to specify the ref param value.
==Error messages==
{{tlx|harvc}} emits these error messages:<!--
:<span style="font-size:100%" class="error">harvc: {{para|anchor-year|plain=yes}} missing dab.</span>
::when used, {{para|anchor-year}} must include a single, lowercase letter disambiguator -->
:<span style="font-size:100%" class="error">harvc: author missing from source list.</span>
::the source list parameters {{para|in1}}, {{para|in2}}, {{para|in3}}, and {{para|in4}} form the template's <code>CITEREF</code> link to the full citation. All are not required but must be used in order without numerical gaps.
:<span style="font-size:100%" class="error">harvc: invalid {{para|anchor-year|plain=yes}}.</span>
::when used, {{para|anchor-year}} must be a three- or four-digit number and must have a lowercase <code>CITEREF</code> disambiguator. When the source does not have an identifiable year, use {{para|anchor-year|n.d.{{var|l}}}} or {{para|anchor-year|nd{{var|l}}}} with lowercase <code>CITEREF</code> disambiguator.
:<span style="font-size:100%" class="error">harvc: invalid {{para|display-authors|plain=yes}}.</span>
::the value assigned to {{para|display-authors}} must be a number greater than 0 or the keyword <code>etal</code>
:<span style="font-size:100%" class="error">harvc: invalid {{para|year|plain=yes}}.</span>
::{{para|year}} is an integral part of the template's <code>CITEREF</code> anchor and link. The value of {{para|year}} must be a three- or four-digit number with an optional lowercase <code>CITEREF</code> disambiguator. When the source does not have an identifiable year, use {{para|year|n.d.}} or {{para|year|nd}}.
:<span style="font-size:100%" class="error">harvc: missing {{para|year|plain=yes}}.</span>
::{{para|year}} is missing; the parameter is required.
:<span style="font-size:100%" class="error">harvc: no authors in contributor list.</span>
::this error message indicates that {{tlx|harvc}} can't find any of {{para|last}}, {{para|last1}}, {{para|author}} or {{para|author1}} with an assigned value and so cannot make a usable <code>CITEREF</code> anchor. Add at least one of the listed parameters.
:<span style="font-size:100%" class="error">harvc: required contribution is missing.</span>
::this error message indicates that {{tlx|harvc}} can't find any of {{para|c}}, {{para|chapter}}, or {{para|contribution}} with an assigned value
:<span style="font-size:100%" class="error">harvc: required {{para|id|plain=yes}} parameter missing.</span>
::this error message is emitted when the {{tlx|harvc}} template's <code>CITEREF</code> anchor identifier would conflict with the long-form citation's <code>CITEREF</code> anchor identifier. See [[#Avoiding circular reference|Examples]]
:<span style="font-size:100%" class="error">harvc: {{para|year|plain=yes}} / {{para|anchor-year|plain=yes}} mismatch.</span>
::the year portion of {{para|anchor-year|YYYY{{var|l}}}} must match the year given in {{para|year|YYYY}}
Additional information about "no target" and other category errors may be found at [[:Category:Harv and Sfn no-target errors]].
==Notes==
{{notelist}}
<includeonly>{{Sandbox other||
<!-- Categories below this line, please; interwikis at Wikidata -->
[[Category:Citation utility templates]]
}}</includeonly>
dedcl8u16njmsjxshuso58mb2ltvj5e
801824
801823
2024-09-02T04:35:06Z
en>Michael Bednarek
0
Undid revision [[Special:Diff/1243554890|1243554890]] by [[Special:Contributions/46.161.197.163|46.161.197.163]] ([[User talk:46.161.197.163|talk]]): rv test edit.
801824
wikitext
text/x-wiki
{{Documentation subpage}}
<!-- Place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
{{lua|Module:Harvc}}
{{uses TemplateStyles|Module:Citation/CS1/styles.css}}
This template is a citation hybrid that has characteristics of long-form [[Help:Citation Style 1|cs1]] and [[Help:Citation Style 2|cs2]], of short-form {{tlx|sfn}} and of the {{tlx|harv}} families of templates. Its purpose is to provide a method that allows editors to refer to a contribution or chapter in a larger work when more than a few such referrals are required. {{tlx|harvc}} is not a substitute for a properly constructed citation.
Short-form templates {{tlx|sfn}} and {{tlx|harv}} are often used to link from an article's references section to a long-form cs1|2 template in a bibliography section:
:{{tlx|harv}} → {{tlx|cite book}} <span style="padding:0 1.5em">or:</span> {{tlx|sfn}} → {{tlx|cite book}}
It is not uncommon for a source to have multiple contributors. When it is necessary to refer to multiple contributions in the same source, repeating all of the bibliographic details in multiple long-form citation templates adds to references-section clutter. {{tlx|harvc}} is designed to hold only the detail necessary to identify a contribution and link to the enclosing work's long-form citation where all of the bibliographic detail can be found:
:{{tlx|harv}} → {{tlx|harvc}} → {{tlx|cite book}} <span style="padding:0 1.5em">or:</span> {{tlx|sfn}} → {{tlx|harvc}} → {{tlx|cite book}}
== Usage ==
The minimal form is:
:<code><nowiki>{{harvc |last=contributor name |year=publication year |c=contribution title |in=source editor/author name}}</nowiki></code>
According to the comments in [[Module:Harvc]], mistaken {{red|Harvc error: no target:}} error messages may be produced when the template is nested in other templates as on documentation pages. The otherwise undocumented parameter, {{para|ignore-err|yes}}, can be added to prevent this.
===Parameters===
{{tlx|harvc}} creates a <code>CITEREF</code> anchor from one to four contribution or chapter author surnames ({{para|last''n''}}) and the value in {{para|year}}. This allows {{tlx|harvc}} to be the target of a link created by {{tlx|sfn}} or {{tlx|harv}} family templates. From {{para|in{{var|n}}}} and {{para|year}}, {{tlx|harvc}} creates a CITEREF link similar to those created by {{tlx|harvnb}} and {{tlx|sfn}}
: '''|anchor-year=''' – optional, for use for author(s) with more than one contribution to the work; requires CITEREF disambiguator; see [[#More than one contribution|Examples]]
: '''|author-link=''' – optional, title of existing Wikipedia article about the first contributor—not the contributor's website; do not wikilink; alias: '''|author-link1='''
:: '''|author-link''n''=''' – optional, title of existing Wikipedia article about contributor''n''; choose ''n'' to match ''n'' in '''|last''n''='''
: '''|author-mask=''m''''' – optional, replaces name of the first contributor with ''m'' (commonly 2) em dashes; alias: '''|author-mask1='''
:: '''|author-mask''n''=''m''''' – optional, replaces name of contributor''n'' with ''m'' em dashes; choose ''n'' to match ''n'' in '''|last''n''='''
:: '''|author-mask{{var|n}}=<{{var|text}}>''' – optional, replaces name of contributor''n'' with <{{var|text}}>
: '''|c=''' – required, the title of chapter or contribution; rendered quoted in upright font; aliases: '''|chapter=''', '''|contribution='''
: '''|display-authors=''' – optional, defines how {{tlx|harvc}} displays the contributor list; ignored when '''|name-list-style=harv''':
:: {{para|display-authors}} – when empty or omitted, displays all contributor names in last/first format
:: {{para|display-authors|{{var|n}}}} – displays ''n'' contributor names in last/first format; appends et al. when ''n'' is less than the number of contributors included in the template
:: {{para|display-authors|etal}} – displays all contributor names in last/first format and appends et al.
: '''|first=''' – optional, first contributor's given or first name; alias: '''|first1='''
:: '''|first''n''=''' – optional, contributor''n'' given or first name; ''n'' begins at 2 and increases by 1 for each additional '''|first''n''='''
: '''|id=''' – required when {{para|last1}}-{{para|last4}} are the same as {{para|in1}}-{{para|in4}}; otherwise optional. See [[#Avoiding circular reference|Examples]]
: '''|in=''' – required, surname or last name of first editor or author of the work that includes the contribution; aliases: '''|in1='''
: '''|in2=''' – optional, surname or last name of second editor or author
: '''|in3=''' – optional, surname or last name of third editor or author
: '''|in4=''' – optional, surname or last name of fourth editor or author
: '''|last=''' – required, surname or last name of first author; aliases: '''|last1='''
:: '''|last''n''=''' – optional, contributor''n'' surname or last name; ''n'' begins at 2 and increases by 1 for each additional '''|last''n''=''';
: '''|loc=''' – optional, other location identifier, displays after {{para|p}} or {{para|pp}}
: '''|mode=''' – controls rendered display to match that of adjacent CS1 or CS2 citations; defaults to CS1 style
:: '''|mode=cs2''' – mimic {{tlx|citation}} style (comma separators, no terminal punctuation, static text not capitalized)
: '''|name-list-style=''' – optional, controls contributor name list display style
:: '''|name-list-style=harv''' – mimic {{tlx|sfn}} or {{tlx|harv}} format (one to four last names); overrides '''|display-authors='''
:: '''|name-list-style=amp''' – inserts an ampersand between the last two contributor names
: '''|nb=''' – optional, when set to <code>yes</code>, instructs {{tlx|harvc}} to render source link without parentheses around the year; same format as that produced by {{tlx|harvnb}}
: '''|p=''' – optional, single page number where cited material can be found; aliases: '''|page='''
: '''|pp=''' – optional, multiple page numbers, page ranges, etc where cited material can be found; aliases: '''|pages='''
: '''|ps=''' – optional, sets terminal punctuation; default is full stop; overrides '''|mode=cs2'''; aliases: '''|postscript='''
:: '''|ps=none''' – renders output without terminal punctuation
: '''|url=''' – optional, URL of an online location where the text of the contribution can be found; aliases: '''|chapter-url''', '''|contribution-url'''
: '''|url-access=''' – optional, use when URL links to a source behind a registration barrier or paywall; inserts [[Help:Citation_Style_1#Registration_or_subscription_required|cs1{{pipe}}2 access icon]]; accepted values are: <code>limited</code>, <code>registration</code>, <code>subscription</code>
: '''|year=''' – required, publication year of the work that includes the contribution
===Examples===
====Basic example====
{| class=wikitable style="width: 100%"
! scope=col style="width: 50%" | Without {{tl|harvc}}
! scope=col style="width: 50%" | With {{tl|harvc}}
|-
|
* {{cite book |last=Doe |first=John |year=1990 |chapter=Chapter 1 |editor-last=Moe |editor-first=Mary |title=The Book of Knowledge |publisher=University Press |ref=none}}
* {{cite book |last=Poe |first=Jane |year=1990 |chapter=Chapter 2 |editor-last=Moe |editor-first=Mary |title=The Book of Knowledge |publisher=University Press |ref=none}}
* {{cite book |last=Roe |first=Robert |year=1990 |chapter=Chapter 3 |editor-last=Moe |editor-first=Mary |title=The Book of Knowledge |publisher=University Press |ref=none}}
|
* {{cite book |editor-last=Moe |editor-first=Mary |year=1990 |title=The Book of Knowledge |publisher=University Press}}
** {{harvc |last=Doe |first=John |c=Chapter 1 |in=Moe |year=1990 |id=none |ignore-err=yes}}
** {{harvc |last=Poe |first=Jane |c=Chapter 2 |in=Moe |year=1990 |id=none |ignore-err=yes}}
** {{harvc |last=Roe |first=Robert |c=Chapter 3 |in=Moe |year=1990 |id=none |ignore-err=yes}}
|}
{| class=wikitable style="width: 100%"
|+ Markup
|-
| style="width: 50%" |
<nowiki>
* {{cite book |last=Doe |first=John |year=1990 |chapter=Chapter 1 |editor-last=Moe |editor-first=Mary |title=The Book of Knowledge |publisher=University Press}}
* {{cite book |last=Poe |first=Jane |year=1990 |chapter=Chapter 2 |editor-last=Moe |editor-first=Mary |title=The Book of Knowledge |publisher=University Press}}
* {{cite book |last=Roe |first=Robert |year=1990 |chapter=Chapter 3 |editor-last=Moe |editor-first=Mary |title=The Book of Knowledge |publisher=University Press}}
</nowiki>
| style="width: 50%|
<nowiki>
* {{cite book |editor-last=Moe |editor-first=Mary |year=1990 |title=The Book of Knowledge |publisher=University Press}}
** {{harvc |last=Doe |first=John |c=Chapter 1 |in=Moe |year=1990}}
** {{harvc |last=Poe |first=Jane |c=Chapter 2 |in=Moe |year=1990}}
** {{harvc |last=Roe |first=Robert |c=Chapter 3 |in=Moe |year=1990}}
</nowiki>
|}
====Detailed example====
When a Wikipedia article makes reference to a work that contains multiple chapters by different authors, bibliographies and reference sections can look rather cluttered:
* {{cite book |last=George |first=Ernest J. |last2=Read |first2=Ralph A. |last3=Johnson |first3=R. W. |last4=Ferber |first4=A. E. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Shelterbelts and Windbreaks |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=https://archive.org/stream/yoa1957#page/n785/mode/1up |oclc=704186906 |ref=none}}
* {{cite book |last=Harper |first=V. L. |last2=Frank |first2=Bernard |last3=McQuilkin |first3=W. E. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Forest Practices and Productivity |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=https://archive.org/stream/yoa1957#page/n803/mode/1up |oclc=704186906 |ref=none}}
* {{cite book |last=Stout |first=P. R. |last2=Johnson |first2=C. M. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Trace Elements |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=https://archive.org/stream/yoa1957#page/n167/mode/1up |oclc=704186906 |ref=none}}
* {{cite book |last=Wadleigh |first=C. H. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Growth of Plants |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=https://archive.org/stream/yoa1957#page/n57/mode/1up |oclc=704186906 |ref=none}}
As the list grows longer, the look becomes more cluttered with the unnecessarily repeated detail of full-length citations. With {{tlx|harvc}} editors can link to shorter, less detailed contribution citations using standard implementations of {{tlx|sfn}} templates and {{tlx|harv}} templates (and also wrapped in {{tag|ref}} tags with {{tlx|harvnb}}). {{tlx|harvc}} may also be wrapped in {{tag|ref}} tags so that it becomes part of the article's References section. See full example below.
=====Avoiding circular reference=====
It may sometimes be necessary to cite a contribution of a source's editor or author such that {{para|last1}} through {{para|last4}} are the same as {{para|in1}} through {{para|in4}}, an editor's preface for example. Such citations can, depending on placement, cause {{tlx|sfn}} or {{tlx|harv}}-family references to link directly to the citation instead of to the {{tlx|harvc}} template, or cause circular links ({{tlx|harvc}} linking to itself because its <code>CITEREF</code> anchor identifier is the same as the citation's <code>CITEREF</code> anchor identifier). If {{para|id}} is set, {{tlx|harvc}} will use it as an anchor identifier; if {{para|id}} is not set, {{tlx|harvc}} will emit an error message when {{para|last1}} through {{para|last4}} are the same as {{para|in1}} through {{para|in4}}.
For example, to reference an editor's preface from article text, create a wikilink inside {{tag|ref}} tags:
:<code><nowiki><ref>[[#Stefferud preface|Stefferud 1957]]</ref></nowiki></code>
Write a {{tlx|harvc}} template with {{para|id|Stefferud preface}}
:<code><nowiki>{{harvc |last=Stefferud |first=A.|year=1957 |id=Stefferud preface |c=Preface |url=https://archive.org/stream/yoa1957#page/n7/mode/1up |in=Stefferud}}</nowiki></code>
{{markupv|title=Full example:|markup=
<nowiki>First information.{{sfn|George|Read|Johnson|Ferber|1957}} Second.<ref>{{harvnb|Stout|Johnson|1957}}</ref> Three thru five.<ref>{{harvnb|Stout|Johnson|1957}}</ref><ref>{{harvc|last=Benson|first=Ezra Taft|year=1957|chapter=Foreword|url=https://archive.org/stream/yoa1957#page/n5/mode/1up|in=Stefferud|p=vi |loc=§2 |ignore-err=yes}}</ref>{{sfn|Wadleigh|1957}} Sixth.<ref>[[#Stefferud preface|Stefferud 1957]]</ref>
<!-- ==Notes== --> {{fake heading|sub=3|Notes}}
{{reflist}}
<!-- ==References== --> {{fake heading|sub=3|References}}
* {{cite book |title=Soil: The Yearbook of Agriculture 1957 |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |url=https://archive.org/stream/yoa1957 |oclc=704186906 }}
** {{harvc |last=George |first=Ernest J. |last2=Read |last3=Johnson |last4=Ferber |year=1957 |contribution=Shelterbelts and Windbreaks |url=https://archive.org/stream/yoa1957#page/n785/mode/1up |in=Stefferud |ignore-err=yes}}
** {{harvc |last=Harper |first=V. L. |last2=Frank |last3=McQuilkin |year=1957 |contribution=Forest Practices |url=https://archive.org/stream/yoa1957#page/n803/mode/1up |in=Stefferud |ignore-err=yes}}
** {{harvc |last=Stefferud |first=A.|year=1957 |id=Stefferud preface |c=Preface |url=https://archive.org/stream/yoa1957#page/n7/mode/1up |in=Stefferud |ignore-err=yes}}
** {{harvc |last=Stout |first=P. R. |last2=Johnson |year=1957 |c=Trace Elements |url=https://archive.org/stream/yoa1957#page/n167/mode/1up |in=Stefferud |ignore-err=yes}}
** {{harvc |last=Wadleigh |first=C. H.|year=1957 |c=Growth of Plants |url=https://archive.org/stream/yoa1957#page/n57/mode/1up |in=Stefferud |ignore-err=yes}}
</nowiki>|renders=First information.{{sfn|George|Read|Johnson|Ferber|1957}} Second.<ref>{{harvnb|Stout|Johnson|1957}}</ref> Three thru five.<ref>{{harvnb|Stout|Johnson|1957}}</ref><ref>{{harvc|last=Benson|first=Ezra Taft|year=1957|chapter=Foreword|url=https://archive.org/stream/yoa1957#page/n5/mode/1up|in=Stefferud|p=vi |loc=§2 |ignore-err=yes}}</ref>{{sfn|Wadleigh|1957}} Sixth.<ref>[[#Stefferud preface|Stefferud 1957]]</ref>
<!-- ==Notes== --> {{fake heading|sub=3|Notes}}
{{reflist}}
<!-- ==References== --> {{fake heading|sub=3|References}}
* {{cite book |title=Soil: The Yearbook of Agriculture 1957 |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |url=https://archive.org/stream/yoa1957 |oclc=704186906 }}
** {{harvc |last=George |first=Ernest J. |last2=Read |last3=Johnson |last4=Ferber |year=1957 |contribution=Shelterbelts and Windbreaks |url=https://archive.org/stream/yoa1957#page/n785/mode/1up |in=Stefferud |ignore-err=yes}}
** {{harvc |last=Harper |first=V. L. |last2=Frank |last3=McQuilkin |year=1957 |contribution=Forest Practices |url=https://archive.org/stream/yoa1957#page/n803/mode/1up |in=Stefferud |ignore-err=yes |id=none}}
** {{harvc |last=Stefferud |first=A.|year=1957 |id=Stefferud preface |c=Preface |url=https://archive.org/stream/yoa1957#page/n7/mode/1up |in=Stefferud |ignore-err=yes}}
** {{harvc |last=Stout |first=P. R. |last2=Johnson |year=1957 |c=Trace Elements |url=https://archive.org/stream/yoa1957#page/n167/mode/1up |in=Stefferud |ignore-err=yes}}
** {{harvc |last=Wadleigh |first=C. H.|year=1957 |c=Growth of Plants |url=https://archive.org/stream/yoa1957#page/n57/mode/1up |in=Stefferud |ignore-err=yes}}}}<!-- Template:Mra -->
Note again the parameter <code><nowiki>ignore-err=yes</nowiki></code> is simply to suppress errors that occur when this template is embedded, such as in documentation. It should not be used otherwise.
=====More than one contribution=====
There are times when an author or authors will have contributed more than once to a work. When this occurs, it is necessary to disambiguate the CITEREF links from the {{tlx|harv}} or {{tlx|sfn}} templates to the CITEREF id of the appropriate {{tlx|harvc}} template.
:{{tlx|harv|Author|YYYYa}} → {{tlx|harvc|Author|Contribution 1|YYYYa}} → {{tlx|citation|...}}}
:{{tlx|harv|Author|YYYYb}} → {{tlx|harvc|Author|Contribution 2|YYYYb}} ↑
In this example, author David Hunt contributed two appendices to ''Christmas Cacti: The Genus ''Schlumbergera'' and Its Hybrids''.
There are two {{tlx|harvnb}} templates that are disambiguated:
:<code><nowiki>{{harvnb |Hunt |1995a}}</nowiki></code> → Hunt 1995a
:<code><nowiki>{{harvnb |Hunt |1995b}}</nowiki></code> → Hunt 1995b
These link to two {{tlx|harvc}} templates which use {{para|anchor-year}} for their CITEREF id and for the date in the {{tlx|harvc}} rendering as a visual aid for readers:
{{markup|
<nowiki>{{harvnb |Hunt |1995a}}; {{harvnb |Hunt |1995b}}.
<!-- ==References== --> {{fake heading|sub=3|References}}
* {{Citation |last=McMillan |first=AJS |last2=Horobin |first2=JF |year=1995 |title=Christmas Cacti: The Genus ''Schlumbergera'' and Its Hybrids |edition=p/b |publication-place=Sherbourne, UK |publisher=David Hunt |isbn=978-0-9517234-6-3}}
** {{harvc |in=McMillan |in2=Horobin |last=Hunt |first=David |c=Appendix I Names of the species |year=1995 |anchor-year=1995a |mode=cs2 |nb=yes |ignore-err=yes}}
** {{harvc |in=McMillan |in2=Horobin |last=Hunt |first=David |c=Appendix III Excerpts from a Brazilian diary |year=1995 |anchor-year=1995b |mode=cs2 |nb=yes |ignore-err=yes}}
</nowiki>|{{harvnb |Hunt |1995a}}; {{harvnb |Hunt |1995b}}.
<!-- ==References== --> {{fake heading|sub=3|References}}
* {{Citation |last=McMillan |first=AJS |last2=Horobin |first2=JF |year=1995 |title=Christmas Cacti: The Genus ''Schlumbergera'' and Its Hybrids |edition=p/b |publication-place=Sherbourne, UK |publisher=David Hunt |isbn=978-0-9517234-6-3}}
** {{harvc |in=McMillan |in2=Horobin |last=Hunt |first=David |c=Appendix I Names of the species |year=1995 |anchor-year=1995a |mode=cs2 |nb=yes |ignore-err=yes}}
** {{harvc |in=McMillan |in2=Horobin |last=Hunt |first=David |c=Appendix III Excerpts from a Brazilian diary |year=1995 |anchor-year=1995b |mode=cs2 |nb=yes |ignore-err=yes}}}}<!-- Template:Mra -->
=====Collision with a different work=====
Because the mediawiki software uses CITEREF id to link from the {{tl|harv}} or {{tl|sfn}} templates to the matching destination anchor of the appropriate {{tl|harvc}} template (or full citation), CITEREF ids must be unique page-wide.{{efn|1=When CITEREF ids are not unique on a page, you will see a [[:Category:Harv and Sfn template errors#Error messages|red error message]], <span style="color:#d73333">Harv/sfn error: multiple targets (n): <anchor ID></span> in the References appendix on the page, unless you have error messages from [[Module:Footnotes]] turned off.}} Since the CITEREF id typically consists of 'CITEREF' + ''LastName'' of author(s) + ''Year'', this can be problematic in two cases. The first case was described [[#More than one contribution|above]]. The other case is collision with a different work, described here.
There are times when an author you wish to cite using {{tl|harvc}} has just one chapter contributed to a work, but the same author also wrote an entirely different work in the same year. Citing both of these in the normal way would cause a CITEREF id collision on the page and result in an error message. There are two ways to resolve this: one involves an additional parameter in the {{tl|harvc}} template, the other way involves an additional parameter in the full citation of the other work.
The first way is to add the {{para|anchor-year}} param to the {{tl|harvc}} chapter citation, as already [[#More than one contribution|described above]] for the case of two chapters by one author. This will assign a uniqueness character to the ''Year'' portion of the CITEREF id, thus distinguishing it from the CITEREF id of the other work that year by the same author.
The other way, is to add a {{para|ref}} param to the {{tl|cite book}} (or other [[Wikipedia:Citing sources#Short and full citations|full citation]]) of the other work in the same year by that author, specifying a different id as the ref value. See [[Template:Cite book#Anchor]] for more about using {{para|ref}} to specify a destination anchor for a citation, and see {{tl|harvid}} for how to specify the ref param value.
==Error messages==
{{tlx|harvc}} emits these error messages:<!--
:<span style="font-size:100%" class="error">harvc: {{para|anchor-year|plain=yes}} missing dab.</span>
::when used, {{para|anchor-year}} must include a single, lowercase letter disambiguator -->
:<span style="font-size:100%" class="error">harvc: author missing from source list.</span>
::the source list parameters {{para|in1}}, {{para|in2}}, {{para|in3}}, and {{para|in4}} form the template's <code>CITEREF</code> link to the full citation. All are not required but must be used in order without numerical gaps.
:<span style="font-size:100%" class="error">harvc: invalid {{para|anchor-year|plain=yes}}.</span>
::when used, {{para|anchor-year}} must be a three- or four-digit number and must have a lowercase <code>CITEREF</code> disambiguator. When the source does not have an identifiable year, use {{para|anchor-year|n.d.{{var|l}}}} or {{para|anchor-year|nd{{var|l}}}} with lowercase <code>CITEREF</code> disambiguator.
:<span style="font-size:100%" class="error">harvc: invalid {{para|display-authors|plain=yes}}.</span>
::the value assigned to {{para|display-authors}} must be a number greater than 0 or the keyword <code>etal</code>
:<span style="font-size:100%" class="error">harvc: invalid {{para|year|plain=yes}}.</span>
::{{para|year}} is an integral part of the template's <code>CITEREF</code> anchor and link. The value of {{para|year}} must be a three- or four-digit number with an optional lowercase <code>CITEREF</code> disambiguator. When the source does not have an identifiable year, use {{para|year|n.d.}} or {{para|year|nd}}.
:<span style="font-size:100%" class="error">harvc: missing {{para|year|plain=yes}}.</span>
::{{para|year}} is missing; the parameter is required.
:<span style="font-size:100%" class="error">harvc: no authors in contributor list.</span>
::this error message indicates that {{tlx|harvc}} can't find any of {{para|last}}, {{para|last1}}, {{para|author}} or {{para|author1}} with an assigned value and so cannot make a usable <code>CITEREF</code> anchor. Add at least one of the listed parameters.
:<span style="font-size:100%" class="error">harvc: required contribution is missing.</span>
::this error message indicates that {{tlx|harvc}} can't find any of {{para|c}}, {{para|chapter}}, or {{para|contribution}} with an assigned value
:<span style="font-size:100%" class="error">harvc: required {{para|id|plain=yes}} parameter missing.</span>
::this error message is emitted when the {{tlx|harvc}} template's <code>CITEREF</code> anchor identifier would conflict with the long-form citation's <code>CITEREF</code> anchor identifier. See [[#Avoiding circular reference|Examples]]
:<span style="font-size:100%" class="error">harvc: {{para|year|plain=yes}} / {{para|anchor-year|plain=yes}} mismatch.</span>
::the year portion of {{para|anchor-year|YYYY{{var|l}}}} must match the year given in {{para|year|YYYY}}
Additional information about "no target" and other category errors may be found at [[:Category:Harv and Sfn no-target errors]].
==Notes==
{{notelist}}
<includeonly>{{Sandbox other||
<!-- Categories below this line, please; interwikis at Wikidata -->
[[Category:Citation utility templates]]
}}</includeonly>
svp2icuv7h43hmrj24pdz3q59qm9mcy
801825
801824
2025-01-27T13:58:45Z
en>Hike395
0
/* Usage */ manual exclusions no longer necessary
801825
wikitext
text/x-wiki
{{Documentation subpage}}
<!-- Place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
{{lua|Module:Harvc}}
{{uses TemplateStyles|Module:Citation/CS1/styles.css}}
This template is a citation hybrid that has characteristics of long-form [[Help:Citation Style 1|cs1]] and [[Help:Citation Style 2|cs2]], of short-form {{tlx|sfn}} and of the {{tlx|harv}} families of templates. Its purpose is to provide a method that allows editors to refer to a contribution or chapter in a larger work when more than a few such referrals are required. {{tlx|harvc}} is not a substitute for a properly constructed citation.
Short-form templates {{tlx|sfn}} and {{tlx|harv}} are often used to link from an article's references section to a long-form cs1|2 template in a bibliography section:
:{{tlx|harv}} → {{tlx|cite book}} <span style="padding:0 1.5em">or:</span> {{tlx|sfn}} → {{tlx|cite book}}
It is not uncommon for a source to have multiple contributors. When it is necessary to refer to multiple contributions in the same source, repeating all of the bibliographic details in multiple long-form citation templates adds to references-section clutter. {{tlx|harvc}} is designed to hold only the detail necessary to identify a contribution and link to the enclosing work's long-form citation where all of the bibliographic detail can be found:
:{{tlx|harv}} → {{tlx|harvc}} → {{tlx|cite book}} <span style="padding:0 1.5em">or:</span> {{tlx|sfn}} → {{tlx|harvc}} → {{tlx|cite book}}
== Usage ==
The minimal form is:
:<code><nowiki>{{harvc |last=contributor name |year=publication year |c=contribution title |in=source editor/author name}}</nowiki></code>
===Parameters===
{{tlx|harvc}} creates a <code>CITEREF</code> anchor from one to four contribution or chapter author surnames ({{para|last''n''}}) and the value in {{para|year}}. This allows {{tlx|harvc}} to be the target of a link created by {{tlx|sfn}} or {{tlx|harv}} family templates. From {{para|in{{var|n}}}} and {{para|year}}, {{tlx|harvc}} creates a CITEREF link similar to those created by {{tlx|harvnb}} and {{tlx|sfn}}
: '''|anchor-year=''' – optional, for use for author(s) with more than one contribution to the work; requires CITEREF disambiguator; see [[#More than one contribution|Examples]]
: '''|author-link=''' – optional, title of existing Wikipedia article about the first contributor—not the contributor's website; do not wikilink; alias: '''|author-link1='''
:: '''|author-link''n''=''' – optional, title of existing Wikipedia article about contributor''n''; choose ''n'' to match ''n'' in '''|last''n''='''
: '''|author-mask=''m''''' – optional, replaces name of the first contributor with ''m'' (commonly 2) em dashes; alias: '''|author-mask1='''
:: '''|author-mask''n''=''m''''' – optional, replaces name of contributor''n'' with ''m'' em dashes; choose ''n'' to match ''n'' in '''|last''n''='''
:: '''|author-mask{{var|n}}=<{{var|text}}>''' – optional, replaces name of contributor''n'' with <{{var|text}}>
: '''|c=''' – required, the title of chapter or contribution; rendered quoted in upright font; aliases: '''|chapter=''', '''|contribution='''
: '''|display-authors=''' – optional, defines how {{tlx|harvc}} displays the contributor list; ignored when '''|name-list-style=harv''':
:: {{para|display-authors}} – when empty or omitted, displays all contributor names in last/first format
:: {{para|display-authors|{{var|n}}}} – displays ''n'' contributor names in last/first format; appends et al. when ''n'' is less than the number of contributors included in the template
:: {{para|display-authors|etal}} – displays all contributor names in last/first format and appends et al.
: '''|first=''' – optional, first contributor's given or first name; alias: '''|first1='''
:: '''|first''n''=''' – optional, contributor''n'' given or first name; ''n'' begins at 2 and increases by 1 for each additional '''|first''n''='''
: '''|id=''' – required when {{para|last1}}-{{para|last4}} are the same as {{para|in1}}-{{para|in4}}; otherwise optional. See [[#Avoiding circular reference|Examples]]
: '''|in=''' – required, surname or last name of first editor or author of the work that includes the contribution; aliases: '''|in1='''
: '''|in2=''' – optional, surname or last name of second editor or author
: '''|in3=''' – optional, surname or last name of third editor or author
: '''|in4=''' – optional, surname or last name of fourth editor or author
: '''|last=''' – required, surname or last name of first author; aliases: '''|last1='''
:: '''|last''n''=''' – optional, contributor''n'' surname or last name; ''n'' begins at 2 and increases by 1 for each additional '''|last''n''=''';
: '''|loc=''' – optional, other location identifier, displays after {{para|p}} or {{para|pp}}
: '''|mode=''' – controls rendered display to match that of adjacent CS1 or CS2 citations; defaults to CS1 style
:: '''|mode=cs2''' – mimic {{tlx|citation}} style (comma separators, no terminal punctuation, static text not capitalized)
: '''|name-list-style=''' – optional, controls contributor name list display style
:: '''|name-list-style=harv''' – mimic {{tlx|sfn}} or {{tlx|harv}} format (one to four last names); overrides '''|display-authors='''
:: '''|name-list-style=amp''' – inserts an ampersand between the last two contributor names
: '''|nb=''' – optional, when set to <code>yes</code>, instructs {{tlx|harvc}} to render source link without parentheses around the year; same format as that produced by {{tlx|harvnb}}
: '''|p=''' – optional, single page number where cited material can be found; aliases: '''|page='''
: '''|pp=''' – optional, multiple page numbers, page ranges, etc where cited material can be found; aliases: '''|pages='''
: '''|ps=''' – optional, sets terminal punctuation; default is full stop; overrides '''|mode=cs2'''; aliases: '''|postscript='''
:: '''|ps=none''' – renders output without terminal punctuation
: '''|url=''' – optional, URL of an online location where the text of the contribution can be found; aliases: '''|chapter-url''', '''|contribution-url'''
: '''|url-access=''' – optional, use when URL links to a source behind a registration barrier or paywall; inserts [[Help:Citation_Style_1#Registration_or_subscription_required|cs1{{pipe}}2 access icon]]; accepted values are: <code>limited</code>, <code>registration</code>, <code>subscription</code>
: '''|year=''' – required, publication year of the work that includes the contribution
===Examples===
====Basic example====
{| class=wikitable style="width: 100%"
! scope=col style="width: 50%" | Without {{tl|harvc}}
! scope=col style="width: 50%" | With {{tl|harvc}}
|-
|
* {{cite book |last=Doe |first=John |year=1990 |chapter=Chapter 1 |editor-last=Moe |editor-first=Mary |title=The Book of Knowledge |publisher=University Press |ref=none}}
* {{cite book |last=Poe |first=Jane |year=1990 |chapter=Chapter 2 |editor-last=Moe |editor-first=Mary |title=The Book of Knowledge |publisher=University Press |ref=none}}
* {{cite book |last=Roe |first=Robert |year=1990 |chapter=Chapter 3 |editor-last=Moe |editor-first=Mary |title=The Book of Knowledge |publisher=University Press |ref=none}}
|
* {{cite book |editor-last=Moe |editor-first=Mary |year=1990 |title=The Book of Knowledge |publisher=University Press}}
** {{harvc |last=Doe |first=John |c=Chapter 1 |in=Moe |year=1990 |id=none |ignore-err=yes}}
** {{harvc |last=Poe |first=Jane |c=Chapter 2 |in=Moe |year=1990 |id=none |ignore-err=yes}}
** {{harvc |last=Roe |first=Robert |c=Chapter 3 |in=Moe |year=1990 |id=none |ignore-err=yes}}
|}
{| class=wikitable style="width: 100%"
|+ Markup
|-
| style="width: 50%" |
<nowiki>
* {{cite book |last=Doe |first=John |year=1990 |chapter=Chapter 1 |editor-last=Moe |editor-first=Mary |title=The Book of Knowledge |publisher=University Press}}
* {{cite book |last=Poe |first=Jane |year=1990 |chapter=Chapter 2 |editor-last=Moe |editor-first=Mary |title=The Book of Knowledge |publisher=University Press}}
* {{cite book |last=Roe |first=Robert |year=1990 |chapter=Chapter 3 |editor-last=Moe |editor-first=Mary |title=The Book of Knowledge |publisher=University Press}}
</nowiki>
| style="width: 50%|
<nowiki>
* {{cite book |editor-last=Moe |editor-first=Mary |year=1990 |title=The Book of Knowledge |publisher=University Press}}
** {{harvc |last=Doe |first=John |c=Chapter 1 |in=Moe |year=1990}}
** {{harvc |last=Poe |first=Jane |c=Chapter 2 |in=Moe |year=1990}}
** {{harvc |last=Roe |first=Robert |c=Chapter 3 |in=Moe |year=1990}}
</nowiki>
|}
====Detailed example====
When a Wikipedia article makes reference to a work that contains multiple chapters by different authors, bibliographies and reference sections can look rather cluttered:
* {{cite book |last=George |first=Ernest J. |last2=Read |first2=Ralph A. |last3=Johnson |first3=R. W. |last4=Ferber |first4=A. E. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Shelterbelts and Windbreaks |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=https://archive.org/stream/yoa1957#page/n785/mode/1up |oclc=704186906 |ref=none}}
* {{cite book |last=Harper |first=V. L. |last2=Frank |first2=Bernard |last3=McQuilkin |first3=W. E. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Forest Practices and Productivity |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=https://archive.org/stream/yoa1957#page/n803/mode/1up |oclc=704186906 |ref=none}}
* {{cite book |last=Stout |first=P. R. |last2=Johnson |first2=C. M. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Trace Elements |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=https://archive.org/stream/yoa1957#page/n167/mode/1up |oclc=704186906 |ref=none}}
* {{cite book |last=Wadleigh |first=C. H. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Growth of Plants |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=https://archive.org/stream/yoa1957#page/n57/mode/1up |oclc=704186906 |ref=none}}
As the list grows longer, the look becomes more cluttered with the unnecessarily repeated detail of full-length citations. With {{tlx|harvc}} editors can link to shorter, less detailed contribution citations using standard implementations of {{tlx|sfn}} templates and {{tlx|harv}} templates (and also wrapped in {{tag|ref}} tags with {{tlx|harvnb}}). {{tlx|harvc}} may also be wrapped in {{tag|ref}} tags so that it becomes part of the article's References section. See full example below.
=====Avoiding circular reference=====
It may sometimes be necessary to cite a contribution of a source's editor or author such that {{para|last1}} through {{para|last4}} are the same as {{para|in1}} through {{para|in4}}, an editor's preface for example. Such citations can, depending on placement, cause {{tlx|sfn}} or {{tlx|harv}}-family references to link directly to the citation instead of to the {{tlx|harvc}} template, or cause circular links ({{tlx|harvc}} linking to itself because its <code>CITEREF</code> anchor identifier is the same as the citation's <code>CITEREF</code> anchor identifier). If {{para|id}} is set, {{tlx|harvc}} will use it as an anchor identifier; if {{para|id}} is not set, {{tlx|harvc}} will emit an error message when {{para|last1}} through {{para|last4}} are the same as {{para|in1}} through {{para|in4}}.
For example, to reference an editor's preface from article text, create a wikilink inside {{tag|ref}} tags:
:<code><nowiki><ref>[[#Stefferud preface|Stefferud 1957]]</ref></nowiki></code>
Write a {{tlx|harvc}} template with {{para|id|Stefferud preface}}
:<code><nowiki>{{harvc |last=Stefferud |first=A.|year=1957 |id=Stefferud preface |c=Preface |url=https://archive.org/stream/yoa1957#page/n7/mode/1up |in=Stefferud}}</nowiki></code>
{{markupv|title=Full example:|markup=
<nowiki>First information.{{sfn|George|Read|Johnson|Ferber|1957}} Second.<ref>{{harvnb|Stout|Johnson|1957}}</ref> Three thru five.<ref>{{harvnb|Stout|Johnson|1957}}</ref><ref>{{harvc|last=Benson|first=Ezra Taft|year=1957|chapter=Foreword|url=https://archive.org/stream/yoa1957#page/n5/mode/1up|in=Stefferud|p=vi |loc=§2 |ignore-err=yes}}</ref>{{sfn|Wadleigh|1957}} Sixth.<ref>[[#Stefferud preface|Stefferud 1957]]</ref>
<!-- ==Notes== --> {{fake heading|sub=3|Notes}}
{{reflist}}
<!-- ==References== --> {{fake heading|sub=3|References}}
* {{cite book |title=Soil: The Yearbook of Agriculture 1957 |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |url=https://archive.org/stream/yoa1957 |oclc=704186906 }}
** {{harvc |last=George |first=Ernest J. |last2=Read |last3=Johnson |last4=Ferber |year=1957 |contribution=Shelterbelts and Windbreaks |url=https://archive.org/stream/yoa1957#page/n785/mode/1up |in=Stefferud |ignore-err=yes}}
** {{harvc |last=Harper |first=V. L. |last2=Frank |last3=McQuilkin |year=1957 |contribution=Forest Practices |url=https://archive.org/stream/yoa1957#page/n803/mode/1up |in=Stefferud |ignore-err=yes}}
** {{harvc |last=Stefferud |first=A.|year=1957 |id=Stefferud preface |c=Preface |url=https://archive.org/stream/yoa1957#page/n7/mode/1up |in=Stefferud |ignore-err=yes}}
** {{harvc |last=Stout |first=P. R. |last2=Johnson |year=1957 |c=Trace Elements |url=https://archive.org/stream/yoa1957#page/n167/mode/1up |in=Stefferud |ignore-err=yes}}
** {{harvc |last=Wadleigh |first=C. H.|year=1957 |c=Growth of Plants |url=https://archive.org/stream/yoa1957#page/n57/mode/1up |in=Stefferud |ignore-err=yes}}
</nowiki>|renders=First information.{{sfn|George|Read|Johnson|Ferber|1957}} Second.<ref>{{harvnb|Stout|Johnson|1957}}</ref> Three thru five.<ref>{{harvnb|Stout|Johnson|1957}}</ref><ref>{{harvc|last=Benson|first=Ezra Taft|year=1957|chapter=Foreword|url=https://archive.org/stream/yoa1957#page/n5/mode/1up|in=Stefferud|p=vi |loc=§2 |ignore-err=yes}}</ref>{{sfn|Wadleigh|1957}} Sixth.<ref>[[#Stefferud preface|Stefferud 1957]]</ref>
<!-- ==Notes== --> {{fake heading|sub=3|Notes}}
{{reflist}}
<!-- ==References== --> {{fake heading|sub=3|References}}
* {{cite book |title=Soil: The Yearbook of Agriculture 1957 |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |url=https://archive.org/stream/yoa1957 |oclc=704186906 }}
** {{harvc |last=George |first=Ernest J. |last2=Read |last3=Johnson |last4=Ferber |year=1957 |contribution=Shelterbelts and Windbreaks |url=https://archive.org/stream/yoa1957#page/n785/mode/1up |in=Stefferud |ignore-err=yes}}
** {{harvc |last=Harper |first=V. L. |last2=Frank |last3=McQuilkin |year=1957 |contribution=Forest Practices |url=https://archive.org/stream/yoa1957#page/n803/mode/1up |in=Stefferud |ignore-err=yes |id=none}}
** {{harvc |last=Stefferud |first=A.|year=1957 |id=Stefferud preface |c=Preface |url=https://archive.org/stream/yoa1957#page/n7/mode/1up |in=Stefferud |ignore-err=yes}}
** {{harvc |last=Stout |first=P. R. |last2=Johnson |year=1957 |c=Trace Elements |url=https://archive.org/stream/yoa1957#page/n167/mode/1up |in=Stefferud |ignore-err=yes}}
** {{harvc |last=Wadleigh |first=C. H.|year=1957 |c=Growth of Plants |url=https://archive.org/stream/yoa1957#page/n57/mode/1up |in=Stefferud |ignore-err=yes}}}}<!-- Template:Mra -->
Note again the parameter <code><nowiki>ignore-err=yes</nowiki></code> is simply to suppress errors that occur when this template is embedded, such as in documentation. It should not be used otherwise.
=====More than one contribution=====
There are times when an author or authors will have contributed more than once to a work. When this occurs, it is necessary to disambiguate the CITEREF links from the {{tlx|harv}} or {{tlx|sfn}} templates to the CITEREF id of the appropriate {{tlx|harvc}} template.
:{{tlx|harv|Author|YYYYa}} → {{tlx|harvc|Author|Contribution 1|YYYYa}} → {{tlx|citation|...}}}
:{{tlx|harv|Author|YYYYb}} → {{tlx|harvc|Author|Contribution 2|YYYYb}} ↑
In this example, author David Hunt contributed two appendices to ''Christmas Cacti: The Genus ''Schlumbergera'' and Its Hybrids''.
There are two {{tlx|harvnb}} templates that are disambiguated:
:<code><nowiki>{{harvnb |Hunt |1995a}}</nowiki></code> → Hunt 1995a
:<code><nowiki>{{harvnb |Hunt |1995b}}</nowiki></code> → Hunt 1995b
These link to two {{tlx|harvc}} templates which use {{para|anchor-year}} for their CITEREF id and for the date in the {{tlx|harvc}} rendering as a visual aid for readers:
{{markup|
<nowiki>{{harvnb |Hunt |1995a}}; {{harvnb |Hunt |1995b}}.
<!-- ==References== --> {{fake heading|sub=3|References}}
* {{Citation |last=McMillan |first=AJS |last2=Horobin |first2=JF |year=1995 |title=Christmas Cacti: The Genus ''Schlumbergera'' and Its Hybrids |edition=p/b |publication-place=Sherbourne, UK |publisher=David Hunt |isbn=978-0-9517234-6-3}}
** {{harvc |in=McMillan |in2=Horobin |last=Hunt |first=David |c=Appendix I Names of the species |year=1995 |anchor-year=1995a |mode=cs2 |nb=yes |ignore-err=yes}}
** {{harvc |in=McMillan |in2=Horobin |last=Hunt |first=David |c=Appendix III Excerpts from a Brazilian diary |year=1995 |anchor-year=1995b |mode=cs2 |nb=yes |ignore-err=yes}}
</nowiki>|{{harvnb |Hunt |1995a}}; {{harvnb |Hunt |1995b}}.
<!-- ==References== --> {{fake heading|sub=3|References}}
* {{Citation |last=McMillan |first=AJS |last2=Horobin |first2=JF |year=1995 |title=Christmas Cacti: The Genus ''Schlumbergera'' and Its Hybrids |edition=p/b |publication-place=Sherbourne, UK |publisher=David Hunt |isbn=978-0-9517234-6-3}}
** {{harvc |in=McMillan |in2=Horobin |last=Hunt |first=David |c=Appendix I Names of the species |year=1995 |anchor-year=1995a |mode=cs2 |nb=yes |ignore-err=yes}}
** {{harvc |in=McMillan |in2=Horobin |last=Hunt |first=David |c=Appendix III Excerpts from a Brazilian diary |year=1995 |anchor-year=1995b |mode=cs2 |nb=yes |ignore-err=yes}}}}<!-- Template:Mra -->
=====Collision with a different work=====
Because the mediawiki software uses CITEREF id to link from the {{tl|harv}} or {{tl|sfn}} templates to the matching destination anchor of the appropriate {{tl|harvc}} template (or full citation), CITEREF ids must be unique page-wide.{{efn|1=When CITEREF ids are not unique on a page, you will see a [[:Category:Harv and Sfn template errors#Error messages|red error message]], <span style="color:#d73333">Harv/sfn error: multiple targets (n): <anchor ID></span> in the References appendix on the page, unless you have error messages from [[Module:Footnotes]] turned off.}} Since the CITEREF id typically consists of 'CITEREF' + ''LastName'' of author(s) + ''Year'', this can be problematic in two cases. The first case was described [[#More than one contribution|above]]. The other case is collision with a different work, described here.
There are times when an author you wish to cite using {{tl|harvc}} has just one chapter contributed to a work, but the same author also wrote an entirely different work in the same year. Citing both of these in the normal way would cause a CITEREF id collision on the page and result in an error message. There are two ways to resolve this: one involves an additional parameter in the {{tl|harvc}} template, the other way involves an additional parameter in the full citation of the other work.
The first way is to add the {{para|anchor-year}} param to the {{tl|harvc}} chapter citation, as already [[#More than one contribution|described above]] for the case of two chapters by one author. This will assign a uniqueness character to the ''Year'' portion of the CITEREF id, thus distinguishing it from the CITEREF id of the other work that year by the same author.
The other way, is to add a {{para|ref}} param to the {{tl|cite book}} (or other [[Wikipedia:Citing sources#Short and full citations|full citation]]) of the other work in the same year by that author, specifying a different id as the ref value. See [[Template:Cite book#Anchor]] for more about using {{para|ref}} to specify a destination anchor for a citation, and see {{tl|harvid}} for how to specify the ref param value.
==Error messages==
{{tlx|harvc}} emits these error messages:<!--
:<span style="font-size:100%" class="error">harvc: {{para|anchor-year|plain=yes}} missing dab.</span>
::when used, {{para|anchor-year}} must include a single, lowercase letter disambiguator -->
:<span style="font-size:100%" class="error">harvc: author missing from source list.</span>
::the source list parameters {{para|in1}}, {{para|in2}}, {{para|in3}}, and {{para|in4}} form the template's <code>CITEREF</code> link to the full citation. All are not required but must be used in order without numerical gaps.
:<span style="font-size:100%" class="error">harvc: invalid {{para|anchor-year|plain=yes}}.</span>
::when used, {{para|anchor-year}} must be a three- or four-digit number and must have a lowercase <code>CITEREF</code> disambiguator. When the source does not have an identifiable year, use {{para|anchor-year|n.d.{{var|l}}}} or {{para|anchor-year|nd{{var|l}}}} with lowercase <code>CITEREF</code> disambiguator.
:<span style="font-size:100%" class="error">harvc: invalid {{para|display-authors|plain=yes}}.</span>
::the value assigned to {{para|display-authors}} must be a number greater than 0 or the keyword <code>etal</code>
:<span style="font-size:100%" class="error">harvc: invalid {{para|year|plain=yes}}.</span>
::{{para|year}} is an integral part of the template's <code>CITEREF</code> anchor and link. The value of {{para|year}} must be a three- or four-digit number with an optional lowercase <code>CITEREF</code> disambiguator. When the source does not have an identifiable year, use {{para|year|n.d.}} or {{para|year|nd}}.
:<span style="font-size:100%" class="error">harvc: missing {{para|year|plain=yes}}.</span>
::{{para|year}} is missing; the parameter is required.
:<span style="font-size:100%" class="error">harvc: no authors in contributor list.</span>
::this error message indicates that {{tlx|harvc}} can't find any of {{para|last}}, {{para|last1}}, {{para|author}} or {{para|author1}} with an assigned value and so cannot make a usable <code>CITEREF</code> anchor. Add at least one of the listed parameters.
:<span style="font-size:100%" class="error">harvc: required contribution is missing.</span>
::this error message indicates that {{tlx|harvc}} can't find any of {{para|c}}, {{para|chapter}}, or {{para|contribution}} with an assigned value
:<span style="font-size:100%" class="error">harvc: required {{para|id|plain=yes}} parameter missing.</span>
::this error message is emitted when the {{tlx|harvc}} template's <code>CITEREF</code> anchor identifier would conflict with the long-form citation's <code>CITEREF</code> anchor identifier. See [[#Avoiding circular reference|Examples]]
:<span style="font-size:100%" class="error">harvc: {{para|year|plain=yes}} / {{para|anchor-year|plain=yes}} mismatch.</span>
::the year portion of {{para|anchor-year|YYYY{{var|l}}}} must match the year given in {{para|year|YYYY}}
Additional information about "no target" and other category errors may be found at [[:Category:Harv and Sfn no-target errors]].
==Notes==
{{notelist}}
<includeonly>{{Sandbox other||
<!-- Categories below this line, please; interwikis at Wikidata -->
[[Category:Citation utility templates]]
}}</includeonly>
nxeiqvfc5sik3br7fs9ddcqf5n65f3l
801826
801825
2026-01-23T11:27:56Z
en>Michael Bednarek
0
/* Parameters */ If the same author is cited *in the body of the article* with <ref>{{harvc}}</ref> for more than one chapter in the same work …
801826
wikitext
text/x-wiki
{{Documentation subpage}}
<!-- Place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
{{lua|Module:Harvc}}
{{uses TemplateStyles|Module:Citation/CS1/styles.css}}
This template is a citation hybrid that has characteristics of long-form [[Help:Citation Style 1|cs1]] and [[Help:Citation Style 2|cs2]], of short-form {{tlx|sfn}} and of the {{tlx|harv}} families of templates. Its purpose is to provide a method that allows editors to refer to a contribution or chapter in a larger work when more than a few such referrals are required. {{tlx|harvc}} is not a substitute for a properly constructed citation.
Short-form templates {{tlx|sfn}} and {{tlx|harv}} are often used to link from an article's references section to a long-form cs1|2 template in a bibliography section:
:{{tlx|harv}} → {{tlx|cite book}} <span style="padding:0 1.5em">or:</span> {{tlx|sfn}} → {{tlx|cite book}}
It is not uncommon for a source to have multiple contributors. When it is necessary to refer to multiple contributions in the same source, repeating all of the bibliographic details in multiple long-form citation templates adds to references-section clutter. {{tlx|harvc}} is designed to hold only the detail necessary to identify a contribution and link to the enclosing work's long-form citation where all of the bibliographic detail can be found:
:{{tlx|harv}} → {{tlx|harvc}} → {{tlx|cite book}} <span style="padding:0 1.5em">or:</span> {{tlx|sfn}} → {{tlx|harvc}} → {{tlx|cite book}}
== Usage ==
The minimal form is:
:<code><nowiki>{{harvc |last=contributor name |year=publication year |c=contribution title |in=source editor/author name}}</nowiki></code>
===Parameters===
{{tlx|harvc}} creates a <code>CITEREF</code> anchor from one to four contribution or chapter author surnames ({{para|last''n''}}) and the value in {{para|year}}. This allows {{tlx|harvc}} to be the target of a link created by {{tlx|sfn}} or {{tlx|harv}} family templates. From {{para|in{{var|n}}}} and {{para|year}}, {{tlx|harvc}} creates a CITEREF link similar to those created by {{tlx|harvnb}} and {{tlx|sfn}}. If the same author is cited in the body of the article with {{tag|ref|content={{tnl|harvc}}}} for more than one chapter in the same work, it leads to duplicate anchors and causes a [[Wikipedia:Linter|lint error]] in [[Special:LintErrors/duplicate-ids]]; this can be avoided by assigning non-duplicate {{para|id}} parameters, e.g. {{para|id|yyyya}} {{para|id|yyyyb}} but retaining the parameter {{para|year}}.
: '''|anchor-year=''' – optional, for use for author(s) with more than one contribution to the work; requires CITEREF disambiguator; see [[#More than one contribution|Examples]]
: '''|author-link=''' – optional, title of existing Wikipedia article about the first contributor—not the contributor's website; do not wikilink; alias: '''|author-link1='''
:: '''|author-link''n''=''' – optional, title of existing Wikipedia article about contributor''n''; choose ''n'' to match ''n'' in '''|last''n''='''
: '''|author-mask=''m''''' – optional, replaces name of the first contributor with ''m'' (commonly 2) em dashes; alias: '''|author-mask1='''
:: '''|author-mask''n''=''m''''' – optional, replaces name of contributor''n'' with ''m'' em dashes; choose ''n'' to match ''n'' in '''|last''n''='''
:: '''|author-mask{{var|n}}=<{{var|text}}>''' – optional, replaces name of contributor''n'' with <{{var|text}}>
: '''|c=''' – required, the title of chapter or contribution; rendered quoted in upright font; aliases: '''|chapter=''', '''|contribution='''
: '''|display-authors=''' – optional, defines how {{tlx|harvc}} displays the contributor list; ignored when '''|name-list-style=harv''':
:: {{para|display-authors}} – when empty or omitted, displays all contributor names in last/first format
:: {{para|display-authors|{{var|n}}}} – displays ''n'' contributor names in last/first format; appends et al. when ''n'' is less than the number of contributors included in the template
:: {{para|display-authors|etal}} – displays all contributor names in last/first format and appends et al.
: '''|first=''' – optional, first contributor's given or first name; alias: '''|first1='''
:: '''|first''n''=''' – optional, contributor''n'' given or first name; ''n'' begins at 2 and increases by 1 for each additional '''|first''n''='''
: '''|id=''' – required when {{para|last1}}-{{para|last4}} are the same as {{para|in1}}-{{para|in4}}; otherwise optional. See [[#Avoiding circular reference|Examples]]
: '''|in=''' – required, surname or last name of first editor or author of the work that includes the contribution; aliases: '''|in1='''
: '''|in2=''' – optional, surname or last name of second editor or author
: '''|in3=''' – optional, surname or last name of third editor or author
: '''|in4=''' – optional, surname or last name of fourth editor or author
: '''|last=''' – required, surname or last name of first author; aliases: '''|last1='''
:: '''|last''n''=''' – optional, contributor''n'' surname or last name; ''n'' begins at 2 and increases by 1 for each additional '''|last''n''=''';
: '''|loc=''' – optional, other location identifier, displays after {{para|p}} or {{para|pp}}
: '''|mode=''' – controls rendered display to match that of adjacent CS1 or CS2 citations; defaults to CS1 style
:: '''|mode=cs2''' – mimic {{tlx|citation}} style (comma separators, no terminal punctuation, static text not capitalized)
: '''|name-list-style=''' – optional, controls contributor name list display style
:: '''|name-list-style=harv''' – mimic {{tlx|sfn}} or {{tlx|harv}} format (one to four last names); overrides '''|display-authors='''
:: '''|name-list-style=amp''' – inserts an ampersand between the last two contributor names
: '''|nb=''' – optional, when set to <code>yes</code>, instructs {{tlx|harvc}} to render source link without parentheses around the year; same format as that produced by {{tlx|harvnb}}
: '''|p=''' – optional, single page number where cited material can be found; aliases: '''|page='''
: '''|pp=''' – optional, multiple page numbers, page ranges, etc where cited material can be found; aliases: '''|pages='''
: '''|ps=''' – optional, sets terminal punctuation; default is full stop; overrides '''|mode=cs2'''; aliases: '''|postscript='''
:: '''|ps=none''' – renders output without terminal punctuation
: '''|url=''' – optional, URL of an online location where the text of the contribution can be found; aliases: '''|chapter-url''', '''|contribution-url'''
: '''|url-access=''' – optional, use when URL links to a source behind a registration barrier or paywall; inserts [[Help:Citation_Style_1#Registration_or_subscription_required|cs1{{pipe}}2 access icon]]; accepted values are: <code>limited</code>, <code>registration</code>, <code>subscription</code>
: '''|year=''' – required, publication year of the work that includes the contribution
===Examples===
====Basic example====
{| class=wikitable style="width: 100%"
! scope=col style="width: 50%" | Without {{tl|harvc}}
! scope=col style="width: 50%" | With {{tl|harvc}}
|-
|
* {{cite book |last=Doe |first=John |year=1990 |chapter=Chapter 1 |editor-last=Moe |editor-first=Mary |title=The Book of Knowledge |publisher=University Press |ref=none}}
* {{cite book |last=Poe |first=Jane |year=1990 |chapter=Chapter 2 |editor-last=Moe |editor-first=Mary |title=The Book of Knowledge |publisher=University Press |ref=none}}
* {{cite book |last=Roe |first=Robert |year=1990 |chapter=Chapter 3 |editor-last=Moe |editor-first=Mary |title=The Book of Knowledge |publisher=University Press |ref=none}}
|
* {{cite book |editor-last=Moe |editor-first=Mary |year=1990 |title=The Book of Knowledge |publisher=University Press}}
** {{harvc |last=Doe |first=John |c=Chapter 1 |in=Moe |year=1990 |id=none |ignore-err=yes}}
** {{harvc |last=Poe |first=Jane |c=Chapter 2 |in=Moe |year=1990 |id=none |ignore-err=yes}}
** {{harvc |last=Roe |first=Robert |c=Chapter 3 |in=Moe |year=1990 |id=none |ignore-err=yes}}
|}
{| class=wikitable style="width: 100%"
|+ Markup
|-
| style="width: 50%" |
<nowiki>
* {{cite book |last=Doe |first=John |year=1990 |chapter=Chapter 1 |editor-last=Moe |editor-first=Mary |title=The Book of Knowledge |publisher=University Press}}
* {{cite book |last=Poe |first=Jane |year=1990 |chapter=Chapter 2 |editor-last=Moe |editor-first=Mary |title=The Book of Knowledge |publisher=University Press}}
* {{cite book |last=Roe |first=Robert |year=1990 |chapter=Chapter 3 |editor-last=Moe |editor-first=Mary |title=The Book of Knowledge |publisher=University Press}}
</nowiki>
| style="width: 50%|
<nowiki>
* {{cite book |editor-last=Moe |editor-first=Mary |year=1990 |title=The Book of Knowledge |publisher=University Press}}
** {{harvc |last=Doe |first=John |c=Chapter 1 |in=Moe |year=1990}}
** {{harvc |last=Poe |first=Jane |c=Chapter 2 |in=Moe |year=1990}}
** {{harvc |last=Roe |first=Robert |c=Chapter 3 |in=Moe |year=1990}}
</nowiki>
|}
====Detailed example====
When a Wikipedia article makes reference to a work that contains multiple chapters by different authors, bibliographies and reference sections can look rather cluttered:
* {{cite book |last=George |first=Ernest J. |last2=Read |first2=Ralph A. |last3=Johnson |first3=R. W. |last4=Ferber |first4=A. E. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Shelterbelts and Windbreaks |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=https://archive.org/stream/yoa1957#page/n785/mode/1up |oclc=704186906 |ref=none}}
* {{cite book |last=Harper |first=V. L. |last2=Frank |first2=Bernard |last3=McQuilkin |first3=W. E. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Forest Practices and Productivity |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=https://archive.org/stream/yoa1957#page/n803/mode/1up |oclc=704186906 |ref=none}}
* {{cite book |last=Stout |first=P. R. |last2=Johnson |first2=C. M. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Trace Elements |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=https://archive.org/stream/yoa1957#page/n167/mode/1up |oclc=704186906 |ref=none}}
* {{cite book |last=Wadleigh |first=C. H. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Growth of Plants |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=https://archive.org/stream/yoa1957#page/n57/mode/1up |oclc=704186906 |ref=none}}
As the list grows longer, the look becomes more cluttered with the unnecessarily repeated detail of full-length citations. With {{tlx|harvc}} editors can link to shorter, less detailed contribution citations using standard implementations of {{tlx|sfn}} templates and {{tlx|harv}} templates (and also wrapped in {{tag|ref}} tags with {{tlx|harvnb}}). {{tlx|harvc}} may also be wrapped in {{tag|ref}} tags so that it becomes part of the article's References section. See full example below.
=====Avoiding circular reference=====
It may sometimes be necessary to cite a contribution of a source's editor or author such that {{para|last1}} through {{para|last4}} are the same as {{para|in1}} through {{para|in4}}, an editor's preface for example. Such citations can, depending on placement, cause {{tlx|sfn}} or {{tlx|harv}}-family references to link directly to the citation instead of to the {{tlx|harvc}} template, or cause circular links ({{tlx|harvc}} linking to itself because its <code>CITEREF</code> anchor identifier is the same as the citation's <code>CITEREF</code> anchor identifier). If {{para|id}} is set, {{tlx|harvc}} will use it as an anchor identifier; if {{para|id}} is not set, {{tlx|harvc}} will emit an error message when {{para|last1}} through {{para|last4}} are the same as {{para|in1}} through {{para|in4}}.
For example, to reference an editor's preface from article text, create a wikilink inside {{tag|ref}} tags:
:<code><nowiki><ref>[[#Stefferud preface|Stefferud 1957]]</ref></nowiki></code>
Write a {{tlx|harvc}} template with {{para|id|Stefferud preface}}
:<code><nowiki>{{harvc |last=Stefferud |first=A.|year=1957 |id=Stefferud preface |c=Preface |url=https://archive.org/stream/yoa1957#page/n7/mode/1up |in=Stefferud}}</nowiki></code>
{{markupv|title=Full example:|markup=
<nowiki>First information.{{sfn|George|Read|Johnson|Ferber|1957}} Second.<ref>{{harvnb|Stout|Johnson|1957}}</ref> Three thru five.<ref>{{harvnb|Stout|Johnson|1957}}</ref><ref>{{harvc|last=Benson|first=Ezra Taft|year=1957|chapter=Foreword|url=https://archive.org/stream/yoa1957#page/n5/mode/1up|in=Stefferud|p=vi |loc=§2 |ignore-err=yes}}</ref>{{sfn|Wadleigh|1957}} Sixth.<ref>[[#Stefferud preface|Stefferud 1957]]</ref>
<!-- ==Notes== --> {{fake heading|sub=3|Notes}}
{{reflist}}
<!-- ==References== --> {{fake heading|sub=3|References}}
* {{cite book |title=Soil: The Yearbook of Agriculture 1957 |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |url=https://archive.org/stream/yoa1957 |oclc=704186906 }}
** {{harvc |last=George |first=Ernest J. |last2=Read |last3=Johnson |last4=Ferber |year=1957 |contribution=Shelterbelts and Windbreaks |url=https://archive.org/stream/yoa1957#page/n785/mode/1up |in=Stefferud |ignore-err=yes}}
** {{harvc |last=Harper |first=V. L. |last2=Frank |last3=McQuilkin |year=1957 |contribution=Forest Practices |url=https://archive.org/stream/yoa1957#page/n803/mode/1up |in=Stefferud |ignore-err=yes}}
** {{harvc |last=Stefferud |first=A.|year=1957 |id=Stefferud preface |c=Preface |url=https://archive.org/stream/yoa1957#page/n7/mode/1up |in=Stefferud |ignore-err=yes}}
** {{harvc |last=Stout |first=P. R. |last2=Johnson |year=1957 |c=Trace Elements |url=https://archive.org/stream/yoa1957#page/n167/mode/1up |in=Stefferud |ignore-err=yes}}
** {{harvc |last=Wadleigh |first=C. H.|year=1957 |c=Growth of Plants |url=https://archive.org/stream/yoa1957#page/n57/mode/1up |in=Stefferud |ignore-err=yes}}
</nowiki>|renders=First information.{{sfn|George|Read|Johnson|Ferber|1957}} Second.<ref>{{harvnb|Stout|Johnson|1957}}</ref> Three thru five.<ref>{{harvnb|Stout|Johnson|1957}}</ref><ref>{{harvc|last=Benson|first=Ezra Taft|year=1957|chapter=Foreword|url=https://archive.org/stream/yoa1957#page/n5/mode/1up|in=Stefferud|p=vi |loc=§2 |ignore-err=yes}}</ref>{{sfn|Wadleigh|1957}} Sixth.<ref>[[#Stefferud preface|Stefferud 1957]]</ref>
<!-- ==Notes== --> {{fake heading|sub=3|Notes}}
{{reflist}}
<!-- ==References== --> {{fake heading|sub=3|References}}
* {{cite book |title=Soil: The Yearbook of Agriculture 1957 |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |url=https://archive.org/stream/yoa1957 |oclc=704186906 }}
** {{harvc |last=George |first=Ernest J. |last2=Read |last3=Johnson |last4=Ferber |year=1957 |contribution=Shelterbelts and Windbreaks |url=https://archive.org/stream/yoa1957#page/n785/mode/1up |in=Stefferud |ignore-err=yes}}
** {{harvc |last=Harper |first=V. L. |last2=Frank |last3=McQuilkin |year=1957 |contribution=Forest Practices |url=https://archive.org/stream/yoa1957#page/n803/mode/1up |in=Stefferud |ignore-err=yes |id=none}}
** {{harvc |last=Stefferud |first=A.|year=1957 |id=Stefferud preface |c=Preface |url=https://archive.org/stream/yoa1957#page/n7/mode/1up |in=Stefferud |ignore-err=yes}}
** {{harvc |last=Stout |first=P. R. |last2=Johnson |year=1957 |c=Trace Elements |url=https://archive.org/stream/yoa1957#page/n167/mode/1up |in=Stefferud |ignore-err=yes}}
** {{harvc |last=Wadleigh |first=C. H.|year=1957 |c=Growth of Plants |url=https://archive.org/stream/yoa1957#page/n57/mode/1up |in=Stefferud |ignore-err=yes}}}}<!-- Template:Mra -->
Note again the parameter <code><nowiki>ignore-err=yes</nowiki></code> is simply to suppress errors that occur when this template is embedded, such as in documentation. It should not be used otherwise.
=====More than one contribution=====
There are times when an author or authors will have contributed more than once to a work. When this occurs, it is necessary to disambiguate the CITEREF links from the {{tlx|harv}} or {{tlx|sfn}} templates to the CITEREF id of the appropriate {{tlx|harvc}} template.
:{{tlx|harv|Author|YYYYa}} → {{tlx|harvc|Author|Contribution 1|YYYYa}} → {{tlx|citation|...}}}
:{{tlx|harv|Author|YYYYb}} → {{tlx|harvc|Author|Contribution 2|YYYYb}} ↑
In this example, author David Hunt contributed two appendices to ''Christmas Cacti: The Genus ''Schlumbergera'' and Its Hybrids''.
There are two {{tlx|harvnb}} templates that are disambiguated:
:<code><nowiki>{{harvnb |Hunt |1995a}}</nowiki></code> → Hunt 1995a
:<code><nowiki>{{harvnb |Hunt |1995b}}</nowiki></code> → Hunt 1995b
These link to two {{tlx|harvc}} templates which use {{para|anchor-year}} for their CITEREF id and for the date in the {{tlx|harvc}} rendering as a visual aid for readers:
{{markup|
<nowiki>{{harvnb |Hunt |1995a}}; {{harvnb |Hunt |1995b}}.
<!-- ==References== --> {{fake heading|sub=3|References}}
* {{Citation |last=McMillan |first=AJS |last2=Horobin |first2=JF |year=1995 |title=Christmas Cacti: The Genus ''Schlumbergera'' and Its Hybrids |edition=p/b |publication-place=Sherbourne, UK |publisher=David Hunt |isbn=978-0-9517234-6-3}}
** {{harvc |in=McMillan |in2=Horobin |last=Hunt |first=David |c=Appendix I Names of the species |year=1995 |anchor-year=1995a |mode=cs2 |nb=yes |ignore-err=yes}}
** {{harvc |in=McMillan |in2=Horobin |last=Hunt |first=David |c=Appendix III Excerpts from a Brazilian diary |year=1995 |anchor-year=1995b |mode=cs2 |nb=yes |ignore-err=yes}}
</nowiki>|{{harvnb |Hunt |1995a}}; {{harvnb |Hunt |1995b}}.
<!-- ==References== --> {{fake heading|sub=3|References}}
* {{Citation |last=McMillan |first=AJS |last2=Horobin |first2=JF |year=1995 |title=Christmas Cacti: The Genus ''Schlumbergera'' and Its Hybrids |edition=p/b |publication-place=Sherbourne, UK |publisher=David Hunt |isbn=978-0-9517234-6-3}}
** {{harvc |in=McMillan |in2=Horobin |last=Hunt |first=David |c=Appendix I Names of the species |year=1995 |anchor-year=1995a |mode=cs2 |nb=yes |ignore-err=yes}}
** {{harvc |in=McMillan |in2=Horobin |last=Hunt |first=David |c=Appendix III Excerpts from a Brazilian diary |year=1995 |anchor-year=1995b |mode=cs2 |nb=yes |ignore-err=yes}}}}<!-- Template:Mra -->
=====Collision with a different work=====
Because the mediawiki software uses CITEREF id to link from the {{tl|harv}} or {{tl|sfn}} templates to the matching destination anchor of the appropriate {{tl|harvc}} template (or full citation), CITEREF ids must be unique page-wide.{{efn|1=When CITEREF ids are not unique on a page, you will see a [[:Category:Harv and Sfn template errors#Error messages|red error message]], <span style="color:#d73333">Harv/sfn error: multiple targets (n): <anchor ID></span> in the References appendix on the page, unless you have error messages from [[Module:Footnotes]] turned off.}} Since the CITEREF id typically consists of 'CITEREF' + ''LastName'' of author(s) + ''Year'', this can be problematic in two cases. The first case was described [[#More than one contribution|above]]. The other case is collision with a different work, described here.
There are times when an author you wish to cite using {{tl|harvc}} has just one chapter contributed to a work, but the same author also wrote an entirely different work in the same year. Citing both of these in the normal way would cause a CITEREF id collision on the page and result in an error message. There are two ways to resolve this: one involves an additional parameter in the {{tl|harvc}} template, the other way involves an additional parameter in the full citation of the other work.
The first way is to add the {{para|anchor-year}} param to the {{tl|harvc}} chapter citation, as already [[#More than one contribution|described above]] for the case of two chapters by one author. This will assign a uniqueness character to the ''Year'' portion of the CITEREF id, thus distinguishing it from the CITEREF id of the other work that year by the same author.
The other way, is to add a {{para|ref}} param to the {{tl|cite book}} (or other [[Wikipedia:Citing sources#Short and full citations|full citation]]) of the other work in the same year by that author, specifying a different id as the ref value. See [[Template:Cite book#Anchor]] for more about using {{para|ref}} to specify a destination anchor for a citation, and see {{tl|harvid}} for how to specify the ref param value.
==Error messages==
{{tlx|harvc}} emits these error messages:<!--
:<span style="font-size:100%" class="error">harvc: {{para|anchor-year|plain=yes}} missing dab.</span>
::when used, {{para|anchor-year}} must include a single, lowercase letter disambiguator -->
:<span style="font-size:100%" class="error">harvc: author missing from source list.</span>
::the source list parameters {{para|in1}}, {{para|in2}}, {{para|in3}}, and {{para|in4}} form the template's <code>CITEREF</code> link to the full citation. All are not required but must be used in order without numerical gaps.
:<span style="font-size:100%" class="error">harvc: invalid {{para|anchor-year|plain=yes}}.</span>
::when used, {{para|anchor-year}} must be a three- or four-digit number and must have a lowercase <code>CITEREF</code> disambiguator. When the source does not have an identifiable year, use {{para|anchor-year|n.d.{{var|l}}}} or {{para|anchor-year|nd{{var|l}}}} with lowercase <code>CITEREF</code> disambiguator.
:<span style="font-size:100%" class="error">harvc: invalid {{para|display-authors|plain=yes}}.</span>
::the value assigned to {{para|display-authors}} must be a number greater than 0 or the keyword <code>etal</code>
:<span style="font-size:100%" class="error">harvc: invalid {{para|year|plain=yes}}.</span>
::{{para|year}} is an integral part of the template's <code>CITEREF</code> anchor and link. The value of {{para|year}} must be a three- or four-digit number with an optional lowercase <code>CITEREF</code> disambiguator. When the source does not have an identifiable year, use {{para|year|n.d.}} or {{para|year|nd}}.
:<span style="font-size:100%" class="error">harvc: missing {{para|year|plain=yes}}.</span>
::{{para|year}} is missing; the parameter is required.
:<span style="font-size:100%" class="error">harvc: no authors in contributor list.</span>
::this error message indicates that {{tlx|harvc}} can't find any of {{para|last}}, {{para|last1}}, {{para|author}} or {{para|author1}} with an assigned value and so cannot make a usable <code>CITEREF</code> anchor. Add at least one of the listed parameters.
:<span style="font-size:100%" class="error">harvc: required contribution is missing.</span>
::this error message indicates that {{tlx|harvc}} can't find any of {{para|c}}, {{para|chapter}}, or {{para|contribution}} with an assigned value
:<span style="font-size:100%" class="error">harvc: required {{para|id|plain=yes}} parameter missing.</span>
::this error message is emitted when the {{tlx|harvc}} template's <code>CITEREF</code> anchor identifier would conflict with the long-form citation's <code>CITEREF</code> anchor identifier. See [[#Avoiding circular reference|Examples]]
:<span style="font-size:100%" class="error">harvc: {{para|year|plain=yes}} / {{para|anchor-year|plain=yes}} mismatch.</span>
::the year portion of {{para|anchor-year|YYYY{{var|l}}}} must match the year given in {{para|year|YYYY}}
Additional information about "no target" and other category errors may be found at [[:Category:Harv and Sfn no-target errors]].
==Notes==
{{notelist}}
<includeonly>{{Sandbox other||
<!-- Categories below this line, please; interwikis at Wikidata -->
[[Category:Citation utility templates]]
}}</includeonly>
1kkbf4g3u5sjnj99uva76hzmu2irl06
801827
801826
2026-07-24T20:06:35Z
SM7
3953
61 revisions imported from [[:en:Template:Harvc/doc]]
801826
wikitext
text/x-wiki
{{Documentation subpage}}
<!-- Place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
{{lua|Module:Harvc}}
{{uses TemplateStyles|Module:Citation/CS1/styles.css}}
This template is a citation hybrid that has characteristics of long-form [[Help:Citation Style 1|cs1]] and [[Help:Citation Style 2|cs2]], of short-form {{tlx|sfn}} and of the {{tlx|harv}} families of templates. Its purpose is to provide a method that allows editors to refer to a contribution or chapter in a larger work when more than a few such referrals are required. {{tlx|harvc}} is not a substitute for a properly constructed citation.
Short-form templates {{tlx|sfn}} and {{tlx|harv}} are often used to link from an article's references section to a long-form cs1|2 template in a bibliography section:
:{{tlx|harv}} → {{tlx|cite book}} <span style="padding:0 1.5em">or:</span> {{tlx|sfn}} → {{tlx|cite book}}
It is not uncommon for a source to have multiple contributors. When it is necessary to refer to multiple contributions in the same source, repeating all of the bibliographic details in multiple long-form citation templates adds to references-section clutter. {{tlx|harvc}} is designed to hold only the detail necessary to identify a contribution and link to the enclosing work's long-form citation where all of the bibliographic detail can be found:
:{{tlx|harv}} → {{tlx|harvc}} → {{tlx|cite book}} <span style="padding:0 1.5em">or:</span> {{tlx|sfn}} → {{tlx|harvc}} → {{tlx|cite book}}
== Usage ==
The minimal form is:
:<code><nowiki>{{harvc |last=contributor name |year=publication year |c=contribution title |in=source editor/author name}}</nowiki></code>
===Parameters===
{{tlx|harvc}} creates a <code>CITEREF</code> anchor from one to four contribution or chapter author surnames ({{para|last''n''}}) and the value in {{para|year}}. This allows {{tlx|harvc}} to be the target of a link created by {{tlx|sfn}} or {{tlx|harv}} family templates. From {{para|in{{var|n}}}} and {{para|year}}, {{tlx|harvc}} creates a CITEREF link similar to those created by {{tlx|harvnb}} and {{tlx|sfn}}. If the same author is cited in the body of the article with {{tag|ref|content={{tnl|harvc}}}} for more than one chapter in the same work, it leads to duplicate anchors and causes a [[Wikipedia:Linter|lint error]] in [[Special:LintErrors/duplicate-ids]]; this can be avoided by assigning non-duplicate {{para|id}} parameters, e.g. {{para|id|yyyya}} {{para|id|yyyyb}} but retaining the parameter {{para|year}}.
: '''|anchor-year=''' – optional, for use for author(s) with more than one contribution to the work; requires CITEREF disambiguator; see [[#More than one contribution|Examples]]
: '''|author-link=''' – optional, title of existing Wikipedia article about the first contributor—not the contributor's website; do not wikilink; alias: '''|author-link1='''
:: '''|author-link''n''=''' – optional, title of existing Wikipedia article about contributor''n''; choose ''n'' to match ''n'' in '''|last''n''='''
: '''|author-mask=''m''''' – optional, replaces name of the first contributor with ''m'' (commonly 2) em dashes; alias: '''|author-mask1='''
:: '''|author-mask''n''=''m''''' – optional, replaces name of contributor''n'' with ''m'' em dashes; choose ''n'' to match ''n'' in '''|last''n''='''
:: '''|author-mask{{var|n}}=<{{var|text}}>''' – optional, replaces name of contributor''n'' with <{{var|text}}>
: '''|c=''' – required, the title of chapter or contribution; rendered quoted in upright font; aliases: '''|chapter=''', '''|contribution='''
: '''|display-authors=''' – optional, defines how {{tlx|harvc}} displays the contributor list; ignored when '''|name-list-style=harv''':
:: {{para|display-authors}} – when empty or omitted, displays all contributor names in last/first format
:: {{para|display-authors|{{var|n}}}} – displays ''n'' contributor names in last/first format; appends et al. when ''n'' is less than the number of contributors included in the template
:: {{para|display-authors|etal}} – displays all contributor names in last/first format and appends et al.
: '''|first=''' – optional, first contributor's given or first name; alias: '''|first1='''
:: '''|first''n''=''' – optional, contributor''n'' given or first name; ''n'' begins at 2 and increases by 1 for each additional '''|first''n''='''
: '''|id=''' – required when {{para|last1}}-{{para|last4}} are the same as {{para|in1}}-{{para|in4}}; otherwise optional. See [[#Avoiding circular reference|Examples]]
: '''|in=''' – required, surname or last name of first editor or author of the work that includes the contribution; aliases: '''|in1='''
: '''|in2=''' – optional, surname or last name of second editor or author
: '''|in3=''' – optional, surname or last name of third editor or author
: '''|in4=''' – optional, surname or last name of fourth editor or author
: '''|last=''' – required, surname or last name of first author; aliases: '''|last1='''
:: '''|last''n''=''' – optional, contributor''n'' surname or last name; ''n'' begins at 2 and increases by 1 for each additional '''|last''n''=''';
: '''|loc=''' – optional, other location identifier, displays after {{para|p}} or {{para|pp}}
: '''|mode=''' – controls rendered display to match that of adjacent CS1 or CS2 citations; defaults to CS1 style
:: '''|mode=cs2''' – mimic {{tlx|citation}} style (comma separators, no terminal punctuation, static text not capitalized)
: '''|name-list-style=''' – optional, controls contributor name list display style
:: '''|name-list-style=harv''' – mimic {{tlx|sfn}} or {{tlx|harv}} format (one to four last names); overrides '''|display-authors='''
:: '''|name-list-style=amp''' – inserts an ampersand between the last two contributor names
: '''|nb=''' – optional, when set to <code>yes</code>, instructs {{tlx|harvc}} to render source link without parentheses around the year; same format as that produced by {{tlx|harvnb}}
: '''|p=''' – optional, single page number where cited material can be found; aliases: '''|page='''
: '''|pp=''' – optional, multiple page numbers, page ranges, etc where cited material can be found; aliases: '''|pages='''
: '''|ps=''' – optional, sets terminal punctuation; default is full stop; overrides '''|mode=cs2'''; aliases: '''|postscript='''
:: '''|ps=none''' – renders output without terminal punctuation
: '''|url=''' – optional, URL of an online location where the text of the contribution can be found; aliases: '''|chapter-url''', '''|contribution-url'''
: '''|url-access=''' – optional, use when URL links to a source behind a registration barrier or paywall; inserts [[Help:Citation_Style_1#Registration_or_subscription_required|cs1{{pipe}}2 access icon]]; accepted values are: <code>limited</code>, <code>registration</code>, <code>subscription</code>
: '''|year=''' – required, publication year of the work that includes the contribution
===Examples===
====Basic example====
{| class=wikitable style="width: 100%"
! scope=col style="width: 50%" | Without {{tl|harvc}}
! scope=col style="width: 50%" | With {{tl|harvc}}
|-
|
* {{cite book |last=Doe |first=John |year=1990 |chapter=Chapter 1 |editor-last=Moe |editor-first=Mary |title=The Book of Knowledge |publisher=University Press |ref=none}}
* {{cite book |last=Poe |first=Jane |year=1990 |chapter=Chapter 2 |editor-last=Moe |editor-first=Mary |title=The Book of Knowledge |publisher=University Press |ref=none}}
* {{cite book |last=Roe |first=Robert |year=1990 |chapter=Chapter 3 |editor-last=Moe |editor-first=Mary |title=The Book of Knowledge |publisher=University Press |ref=none}}
|
* {{cite book |editor-last=Moe |editor-first=Mary |year=1990 |title=The Book of Knowledge |publisher=University Press}}
** {{harvc |last=Doe |first=John |c=Chapter 1 |in=Moe |year=1990 |id=none |ignore-err=yes}}
** {{harvc |last=Poe |first=Jane |c=Chapter 2 |in=Moe |year=1990 |id=none |ignore-err=yes}}
** {{harvc |last=Roe |first=Robert |c=Chapter 3 |in=Moe |year=1990 |id=none |ignore-err=yes}}
|}
{| class=wikitable style="width: 100%"
|+ Markup
|-
| style="width: 50%" |
<nowiki>
* {{cite book |last=Doe |first=John |year=1990 |chapter=Chapter 1 |editor-last=Moe |editor-first=Mary |title=The Book of Knowledge |publisher=University Press}}
* {{cite book |last=Poe |first=Jane |year=1990 |chapter=Chapter 2 |editor-last=Moe |editor-first=Mary |title=The Book of Knowledge |publisher=University Press}}
* {{cite book |last=Roe |first=Robert |year=1990 |chapter=Chapter 3 |editor-last=Moe |editor-first=Mary |title=The Book of Knowledge |publisher=University Press}}
</nowiki>
| style="width: 50%|
<nowiki>
* {{cite book |editor-last=Moe |editor-first=Mary |year=1990 |title=The Book of Knowledge |publisher=University Press}}
** {{harvc |last=Doe |first=John |c=Chapter 1 |in=Moe |year=1990}}
** {{harvc |last=Poe |first=Jane |c=Chapter 2 |in=Moe |year=1990}}
** {{harvc |last=Roe |first=Robert |c=Chapter 3 |in=Moe |year=1990}}
</nowiki>
|}
====Detailed example====
When a Wikipedia article makes reference to a work that contains multiple chapters by different authors, bibliographies and reference sections can look rather cluttered:
* {{cite book |last=George |first=Ernest J. |last2=Read |first2=Ralph A. |last3=Johnson |first3=R. W. |last4=Ferber |first4=A. E. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Shelterbelts and Windbreaks |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=https://archive.org/stream/yoa1957#page/n785/mode/1up |oclc=704186906 |ref=none}}
* {{cite book |last=Harper |first=V. L. |last2=Frank |first2=Bernard |last3=McQuilkin |first3=W. E. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Forest Practices and Productivity |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=https://archive.org/stream/yoa1957#page/n803/mode/1up |oclc=704186906 |ref=none}}
* {{cite book |last=Stout |first=P. R. |last2=Johnson |first2=C. M. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Trace Elements |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=https://archive.org/stream/yoa1957#page/n167/mode/1up |oclc=704186906 |ref=none}}
* {{cite book |last=Wadleigh |first=C. H. |title=Soil: The Yearbook of Agriculture 1957 |chapter=Growth of Plants |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |chapter-url=https://archive.org/stream/yoa1957#page/n57/mode/1up |oclc=704186906 |ref=none}}
As the list grows longer, the look becomes more cluttered with the unnecessarily repeated detail of full-length citations. With {{tlx|harvc}} editors can link to shorter, less detailed contribution citations using standard implementations of {{tlx|sfn}} templates and {{tlx|harv}} templates (and also wrapped in {{tag|ref}} tags with {{tlx|harvnb}}). {{tlx|harvc}} may also be wrapped in {{tag|ref}} tags so that it becomes part of the article's References section. See full example below.
=====Avoiding circular reference=====
It may sometimes be necessary to cite a contribution of a source's editor or author such that {{para|last1}} through {{para|last4}} are the same as {{para|in1}} through {{para|in4}}, an editor's preface for example. Such citations can, depending on placement, cause {{tlx|sfn}} or {{tlx|harv}}-family references to link directly to the citation instead of to the {{tlx|harvc}} template, or cause circular links ({{tlx|harvc}} linking to itself because its <code>CITEREF</code> anchor identifier is the same as the citation's <code>CITEREF</code> anchor identifier). If {{para|id}} is set, {{tlx|harvc}} will use it as an anchor identifier; if {{para|id}} is not set, {{tlx|harvc}} will emit an error message when {{para|last1}} through {{para|last4}} are the same as {{para|in1}} through {{para|in4}}.
For example, to reference an editor's preface from article text, create a wikilink inside {{tag|ref}} tags:
:<code><nowiki><ref>[[#Stefferud preface|Stefferud 1957]]</ref></nowiki></code>
Write a {{tlx|harvc}} template with {{para|id|Stefferud preface}}
:<code><nowiki>{{harvc |last=Stefferud |first=A.|year=1957 |id=Stefferud preface |c=Preface |url=https://archive.org/stream/yoa1957#page/n7/mode/1up |in=Stefferud}}</nowiki></code>
{{markupv|title=Full example:|markup=
<nowiki>First information.{{sfn|George|Read|Johnson|Ferber|1957}} Second.<ref>{{harvnb|Stout|Johnson|1957}}</ref> Three thru five.<ref>{{harvnb|Stout|Johnson|1957}}</ref><ref>{{harvc|last=Benson|first=Ezra Taft|year=1957|chapter=Foreword|url=https://archive.org/stream/yoa1957#page/n5/mode/1up|in=Stefferud|p=vi |loc=§2 |ignore-err=yes}}</ref>{{sfn|Wadleigh|1957}} Sixth.<ref>[[#Stefferud preface|Stefferud 1957]]</ref>
<!-- ==Notes== --> {{fake heading|sub=3|Notes}}
{{reflist}}
<!-- ==References== --> {{fake heading|sub=3|References}}
* {{cite book |title=Soil: The Yearbook of Agriculture 1957 |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |url=https://archive.org/stream/yoa1957 |oclc=704186906 }}
** {{harvc |last=George |first=Ernest J. |last2=Read |last3=Johnson |last4=Ferber |year=1957 |contribution=Shelterbelts and Windbreaks |url=https://archive.org/stream/yoa1957#page/n785/mode/1up |in=Stefferud |ignore-err=yes}}
** {{harvc |last=Harper |first=V. L. |last2=Frank |last3=McQuilkin |year=1957 |contribution=Forest Practices |url=https://archive.org/stream/yoa1957#page/n803/mode/1up |in=Stefferud |ignore-err=yes}}
** {{harvc |last=Stefferud |first=A.|year=1957 |id=Stefferud preface |c=Preface |url=https://archive.org/stream/yoa1957#page/n7/mode/1up |in=Stefferud |ignore-err=yes}}
** {{harvc |last=Stout |first=P. R. |last2=Johnson |year=1957 |c=Trace Elements |url=https://archive.org/stream/yoa1957#page/n167/mode/1up |in=Stefferud |ignore-err=yes}}
** {{harvc |last=Wadleigh |first=C. H.|year=1957 |c=Growth of Plants |url=https://archive.org/stream/yoa1957#page/n57/mode/1up |in=Stefferud |ignore-err=yes}}
</nowiki>|renders=First information.{{sfn|George|Read|Johnson|Ferber|1957}} Second.<ref>{{harvnb|Stout|Johnson|1957}}</ref> Three thru five.<ref>{{harvnb|Stout|Johnson|1957}}</ref><ref>{{harvc|last=Benson|first=Ezra Taft|year=1957|chapter=Foreword|url=https://archive.org/stream/yoa1957#page/n5/mode/1up|in=Stefferud|p=vi |loc=§2 |ignore-err=yes}}</ref>{{sfn|Wadleigh|1957}} Sixth.<ref>[[#Stefferud preface|Stefferud 1957]]</ref>
<!-- ==Notes== --> {{fake heading|sub=3|Notes}}
{{reflist}}
<!-- ==References== --> {{fake heading|sub=3|References}}
* {{cite book |title=Soil: The Yearbook of Agriculture 1957 |editor-last=Stefferud |editor-first=Alfred |year=1957 |publisher=United States Department of Agriculture |url=https://archive.org/stream/yoa1957 |oclc=704186906 }}
** {{harvc |last=George |first=Ernest J. |last2=Read |last3=Johnson |last4=Ferber |year=1957 |contribution=Shelterbelts and Windbreaks |url=https://archive.org/stream/yoa1957#page/n785/mode/1up |in=Stefferud |ignore-err=yes}}
** {{harvc |last=Harper |first=V. L. |last2=Frank |last3=McQuilkin |year=1957 |contribution=Forest Practices |url=https://archive.org/stream/yoa1957#page/n803/mode/1up |in=Stefferud |ignore-err=yes |id=none}}
** {{harvc |last=Stefferud |first=A.|year=1957 |id=Stefferud preface |c=Preface |url=https://archive.org/stream/yoa1957#page/n7/mode/1up |in=Stefferud |ignore-err=yes}}
** {{harvc |last=Stout |first=P. R. |last2=Johnson |year=1957 |c=Trace Elements |url=https://archive.org/stream/yoa1957#page/n167/mode/1up |in=Stefferud |ignore-err=yes}}
** {{harvc |last=Wadleigh |first=C. H.|year=1957 |c=Growth of Plants |url=https://archive.org/stream/yoa1957#page/n57/mode/1up |in=Stefferud |ignore-err=yes}}}}<!-- Template:Mra -->
Note again the parameter <code><nowiki>ignore-err=yes</nowiki></code> is simply to suppress errors that occur when this template is embedded, such as in documentation. It should not be used otherwise.
=====More than one contribution=====
There are times when an author or authors will have contributed more than once to a work. When this occurs, it is necessary to disambiguate the CITEREF links from the {{tlx|harv}} or {{tlx|sfn}} templates to the CITEREF id of the appropriate {{tlx|harvc}} template.
:{{tlx|harv|Author|YYYYa}} → {{tlx|harvc|Author|Contribution 1|YYYYa}} → {{tlx|citation|...}}}
:{{tlx|harv|Author|YYYYb}} → {{tlx|harvc|Author|Contribution 2|YYYYb}} ↑
In this example, author David Hunt contributed two appendices to ''Christmas Cacti: The Genus ''Schlumbergera'' and Its Hybrids''.
There are two {{tlx|harvnb}} templates that are disambiguated:
:<code><nowiki>{{harvnb |Hunt |1995a}}</nowiki></code> → Hunt 1995a
:<code><nowiki>{{harvnb |Hunt |1995b}}</nowiki></code> → Hunt 1995b
These link to two {{tlx|harvc}} templates which use {{para|anchor-year}} for their CITEREF id and for the date in the {{tlx|harvc}} rendering as a visual aid for readers:
{{markup|
<nowiki>{{harvnb |Hunt |1995a}}; {{harvnb |Hunt |1995b}}.
<!-- ==References== --> {{fake heading|sub=3|References}}
* {{Citation |last=McMillan |first=AJS |last2=Horobin |first2=JF |year=1995 |title=Christmas Cacti: The Genus ''Schlumbergera'' and Its Hybrids |edition=p/b |publication-place=Sherbourne, UK |publisher=David Hunt |isbn=978-0-9517234-6-3}}
** {{harvc |in=McMillan |in2=Horobin |last=Hunt |first=David |c=Appendix I Names of the species |year=1995 |anchor-year=1995a |mode=cs2 |nb=yes |ignore-err=yes}}
** {{harvc |in=McMillan |in2=Horobin |last=Hunt |first=David |c=Appendix III Excerpts from a Brazilian diary |year=1995 |anchor-year=1995b |mode=cs2 |nb=yes |ignore-err=yes}}
</nowiki>|{{harvnb |Hunt |1995a}}; {{harvnb |Hunt |1995b}}.
<!-- ==References== --> {{fake heading|sub=3|References}}
* {{Citation |last=McMillan |first=AJS |last2=Horobin |first2=JF |year=1995 |title=Christmas Cacti: The Genus ''Schlumbergera'' and Its Hybrids |edition=p/b |publication-place=Sherbourne, UK |publisher=David Hunt |isbn=978-0-9517234-6-3}}
** {{harvc |in=McMillan |in2=Horobin |last=Hunt |first=David |c=Appendix I Names of the species |year=1995 |anchor-year=1995a |mode=cs2 |nb=yes |ignore-err=yes}}
** {{harvc |in=McMillan |in2=Horobin |last=Hunt |first=David |c=Appendix III Excerpts from a Brazilian diary |year=1995 |anchor-year=1995b |mode=cs2 |nb=yes |ignore-err=yes}}}}<!-- Template:Mra -->
=====Collision with a different work=====
Because the mediawiki software uses CITEREF id to link from the {{tl|harv}} or {{tl|sfn}} templates to the matching destination anchor of the appropriate {{tl|harvc}} template (or full citation), CITEREF ids must be unique page-wide.{{efn|1=When CITEREF ids are not unique on a page, you will see a [[:Category:Harv and Sfn template errors#Error messages|red error message]], <span style="color:#d73333">Harv/sfn error: multiple targets (n): <anchor ID></span> in the References appendix on the page, unless you have error messages from [[Module:Footnotes]] turned off.}} Since the CITEREF id typically consists of 'CITEREF' + ''LastName'' of author(s) + ''Year'', this can be problematic in two cases. The first case was described [[#More than one contribution|above]]. The other case is collision with a different work, described here.
There are times when an author you wish to cite using {{tl|harvc}} has just one chapter contributed to a work, but the same author also wrote an entirely different work in the same year. Citing both of these in the normal way would cause a CITEREF id collision on the page and result in an error message. There are two ways to resolve this: one involves an additional parameter in the {{tl|harvc}} template, the other way involves an additional parameter in the full citation of the other work.
The first way is to add the {{para|anchor-year}} param to the {{tl|harvc}} chapter citation, as already [[#More than one contribution|described above]] for the case of two chapters by one author. This will assign a uniqueness character to the ''Year'' portion of the CITEREF id, thus distinguishing it from the CITEREF id of the other work that year by the same author.
The other way, is to add a {{para|ref}} param to the {{tl|cite book}} (or other [[Wikipedia:Citing sources#Short and full citations|full citation]]) of the other work in the same year by that author, specifying a different id as the ref value. See [[Template:Cite book#Anchor]] for more about using {{para|ref}} to specify a destination anchor for a citation, and see {{tl|harvid}} for how to specify the ref param value.
==Error messages==
{{tlx|harvc}} emits these error messages:<!--
:<span style="font-size:100%" class="error">harvc: {{para|anchor-year|plain=yes}} missing dab.</span>
::when used, {{para|anchor-year}} must include a single, lowercase letter disambiguator -->
:<span style="font-size:100%" class="error">harvc: author missing from source list.</span>
::the source list parameters {{para|in1}}, {{para|in2}}, {{para|in3}}, and {{para|in4}} form the template's <code>CITEREF</code> link to the full citation. All are not required but must be used in order without numerical gaps.
:<span style="font-size:100%" class="error">harvc: invalid {{para|anchor-year|plain=yes}}.</span>
::when used, {{para|anchor-year}} must be a three- or four-digit number and must have a lowercase <code>CITEREF</code> disambiguator. When the source does not have an identifiable year, use {{para|anchor-year|n.d.{{var|l}}}} or {{para|anchor-year|nd{{var|l}}}} with lowercase <code>CITEREF</code> disambiguator.
:<span style="font-size:100%" class="error">harvc: invalid {{para|display-authors|plain=yes}}.</span>
::the value assigned to {{para|display-authors}} must be a number greater than 0 or the keyword <code>etal</code>
:<span style="font-size:100%" class="error">harvc: invalid {{para|year|plain=yes}}.</span>
::{{para|year}} is an integral part of the template's <code>CITEREF</code> anchor and link. The value of {{para|year}} must be a three- or four-digit number with an optional lowercase <code>CITEREF</code> disambiguator. When the source does not have an identifiable year, use {{para|year|n.d.}} or {{para|year|nd}}.
:<span style="font-size:100%" class="error">harvc: missing {{para|year|plain=yes}}.</span>
::{{para|year}} is missing; the parameter is required.
:<span style="font-size:100%" class="error">harvc: no authors in contributor list.</span>
::this error message indicates that {{tlx|harvc}} can't find any of {{para|last}}, {{para|last1}}, {{para|author}} or {{para|author1}} with an assigned value and so cannot make a usable <code>CITEREF</code> anchor. Add at least one of the listed parameters.
:<span style="font-size:100%" class="error">harvc: required contribution is missing.</span>
::this error message indicates that {{tlx|harvc}} can't find any of {{para|c}}, {{para|chapter}}, or {{para|contribution}} with an assigned value
:<span style="font-size:100%" class="error">harvc: required {{para|id|plain=yes}} parameter missing.</span>
::this error message is emitted when the {{tlx|harvc}} template's <code>CITEREF</code> anchor identifier would conflict with the long-form citation's <code>CITEREF</code> anchor identifier. See [[#Avoiding circular reference|Examples]]
:<span style="font-size:100%" class="error">harvc: {{para|year|plain=yes}} / {{para|anchor-year|plain=yes}} mismatch.</span>
::the year portion of {{para|anchor-year|YYYY{{var|l}}}} must match the year given in {{para|year|YYYY}}
Additional information about "no target" and other category errors may be found at [[:Category:Harv and Sfn no-target errors]].
==Notes==
{{notelist}}
<includeonly>{{Sandbox other||
<!-- Categories below this line, please; interwikis at Wikidata -->
[[Category:Citation utility templates]]
}}</includeonly>
1kkbf4g3u5sjnj99uva76hzmu2irl06
Module:Harvc
828
101280
801828
2014-11-06T00:59:49Z
en>Trappist the monk
0
Create;
801828
Scribunto
text/plain
f = {
args_default = {
bracket_left = "",
bracket_right = "",
In = '',
c = '',
contribution = '',
author = '',
last = '',
last1='',
P1 = "",
P2 = "",
P3 = "",
P4 = "",
P5 = ""
}
};
function trim( str )
if str == nil then
return nil;
end
return str:match( "^%s*(.-)%s*$");
end
function core( args )
--<span id={{sfnref|Cottontail|2012}} class="citation">Cottontail (2012) "Evading Capture". In [[#CITEREFLapin2012|Lapin 2012]]</span>
local result;
-- form the CITEREF anchor
result = '<span id="CITEREF' .. table.concat ({args.P1, args.P2, args.P3, args.P4, args.P5}) .. '" class="citation">'
-- form the author date list; like sfn and harv, 1 to 4 names and a date; same construct as sfn and harv
if args.P5 ~= "" then
result = result .. args.P1 .. ' et al. ' .. args.bracket_year_left .. args.P5 ..
args.bracket_year_right;
elseif args.P4 ~= "" then
result = result .. args.P1 .. ', ' .. args.P2 .. ' & ' .. args.P3 .. ' ' .. args.bracket_year_left .. args.P4 .. args.bracket_year_right;
elseif args.P3 ~= "" then
result = result .. args.P1 .. ' & ' .. args.P2 .. ' ' .. args.bracket_year_left .. args.P3 .. args.bracket_year_right;
else
result = result .. args.P1 .. ' ' .. args.bracket_year_left .. args.P2 .. args.bracket_year_right;
end
--add the contribution and close the span
result = result .. '"' .. args.contribution .. '" in ' .. args.In ..'</span>';
return result;
end
function f.harvc (frame)
local args = f.args_default;
pframe = frame:getParent();
args.contribution = pframe.args.c or pframe.args.contribution or "";
args.In = pframe.args.In;
args.P1 = pframe.args.author or pframe.args.last or pframe.args.last1 or trim (pframe.args[1]) or "";
args.P2 = trim (pframe.args[2]) or "";
args.P3 = trim (pframe.args[3]) or "";
args.P4 = trim (pframe.args[4]) or "";
args.P5 = trim (pframe.args[5]) or "";
return core( args );
end
--[[
function f.sfn( frame )
local args = f.args_default;
pframe = frame:getParent();
args.postscript = pframe.args.postscript or pframe.args.ps or ".";
args.page = pframe.args.p or pframe.args.page or "";
args.pages = pframe.args.pp or pframe.args.pages or "";
args.location = pframe.args.loc or "";
args.ref = pframe.args.ref or pframe.args.Ref or "";
args.P1 = trim( pframe.args[1] ) or "";
args.P2 = trim( pframe.args[2] ) or "";
args.P3 = trim( pframe.args[3] ) or "";
args.P4 = trim( pframe.args[4] ) or "";
args.P5 = trim( pframe.args[5] ) or "";
local result = core( args );
local name = "FOOTNOTE" .. args.P1 .. args.P2 ..
args.P3 .. args.P4 .. args.P5 .. args.page .. args.pages .. args.location;
result = frame:extensionTag{ name = "ref", args = {name=name}, content=result };
return result;
end
]]
return f;
hzuep0bph5k8uwrx2fx44aqxhljmg9d
801829
801828
2014-11-06T01:12:53Z
en>Trappist the monk
0
801829
Scribunto
text/plain
f = {
args_default = {
bracket_left = "",
bracket_right = "",
In = '',
c = '',
contribution = '',
author = '',
last = '',
last1='',
P1 = "",
P2 = "",
P3 = "",
P4 = "",
P5 = ""
}
};
function trim( str )
if str == nil then
return nil;
end
return str:match( "^%s*(.-)%s*$");
end
function core( args )
--<span id={{sfnref|Cottontail|2012}} class="citation">Cottontail (2012) "Evading Capture". In [[#CITEREFLapin2012|Lapin 2012]]</span>
local result;
-- form the CITEREF anchor
result = '<span id="CITEREF' .. table.concat ({args.P1, args.P2, args.P3, args.P4, args.P5}) .. '" class="citation">'
-- form the author date list; like sfn and harv, 1 to 4 names and a date; same construct as sfn and harv
if args.P5 ~= "" then
result = result .. args.P1 .. ' et al. ' .. args.bracket_left .. args.P5 .. args.bracket_right;
elseif args.P4 ~= "" then
result = result .. args.P1 .. ', ' .. args.P2 .. ' & ' .. args.P3 .. ' ' .. args.bracket_left .. args.P4 .. args.bracket_right;
elseif args.P3 ~= "" then
result = result .. args.P1 .. ' & ' .. args.P2 .. ' ' .. args.bracket_left .. args.P3 .. args.bracket_right;
else
result = result .. args.P1 .. ' ' .. args.bracket_left .. args.P2 .. args.bracket_right;
end
--add the contribution and close the span
result = result .. '"' .. args.contribution .. '" in ' .. args.In ..'</span>';
return result;
end
function f.harvc (frame)
local args = f.args_default;
pframe = frame:getParent();
args.contribution = pframe.args.c or pframe.args.contribution or "";
args.In = pframe.args.In;
args.P1 = pframe.args.author or pframe.args.last or pframe.args.last1 or trim (pframe.args[1]) or "";
args.P2 = trim (pframe.args[2]) or "";
args.P3 = trim (pframe.args[3]) or "";
args.P4 = trim (pframe.args[4]) or "";
args.P5 = trim (pframe.args[5]) or "";
return core( args );
end
--[[
function f.sfn( frame )
local args = f.args_default;
pframe = frame:getParent();
args.postscript = pframe.args.postscript or pframe.args.ps or ".";
args.page = pframe.args.p or pframe.args.page or "";
args.pages = pframe.args.pp or pframe.args.pages or "";
args.location = pframe.args.loc or "";
args.ref = pframe.args.ref or pframe.args.Ref or "";
args.P1 = trim( pframe.args[1] ) or "";
args.P2 = trim( pframe.args[2] ) or "";
args.P3 = trim( pframe.args[3] ) or "";
args.P4 = trim( pframe.args[4] ) or "";
args.P5 = trim( pframe.args[5] ) or "";
local result = core( args );
local name = "FOOTNOTE" .. args.P1 .. args.P2 ..
args.P3 .. args.P4 .. args.P5 .. args.page .. args.pages .. args.location;
result = frame:extensionTag{ name = "ref", args = {name=name}, content=result };
return result;
end
]]
return f;
iha4mx5kr7vx0e3ko2ppegzusihsp9i
801830
801829
2014-11-06T01:16:40Z
en>Trappist the monk
0
801830
Scribunto
text/plain
f = {
args_default = {
bracket_left = "",
bracket_right = "",
In = '',
c = '',
contribution = '',
author = '',
last = '',
last1='',
P1 = "",
P2 = "",
P3 = "",
P4 = "",
P5 = ""
}
};
function trim( str )
if str == nil then
return nil;
end
return str:match( "^%s*(.-)%s*$");
end
function core( args )
--<span id={{sfnref|Cottontail|2012}} class="citation">Cottontail (2012) "Evading Capture". In [[#CITEREFLapin2012|Lapin 2012]]</span>
local result;
-- form the CITEREF anchor
result = '<span id="CITEREF' .. table.concat ({args.P1, args.P2, args.P3, args.P4, args.P5}) .. '" class="citation">'
-- form the author date list; like sfn and harv, 1 to 4 names and a date; same construct as sfn and harv
if args.P5 ~= "" then
result = result .. args.P1 .. ' et al. ' .. args.bracket_left .. args.P5 .. args.bracket_right;
elseif args.P4 ~= "" then
result = result .. args.P1 .. ', ' .. args.P2 .. ' & ' .. args.P3 .. ' ' .. args.bracket_left .. args.P4 .. args.bracket_right;
elseif args.P3 ~= "" then
result = result .. args.P1 .. ' & ' .. args.P2 .. ' ' .. args.bracket_left .. args.P3 .. args.bracket_right;
else
result = result .. args.P1 .. ' ' .. args.bracket_left .. args.P2 .. args.bracket_right;
end
--add the contribution and close the span
result = result .. '"' .. args.contribution .. '" in ' .. args.In ..'</span>';
return result;
end
function f.harvc (frame)
local args = f.args_default;
pframe = frame:getParent();
args.contribution = pframe.args.c or pframe.args.contribution or "";
args.In = pframe.args['in'];
args.P1 = pframe.args.author or pframe.args.last or pframe.args.last1 or trim (pframe.args[1]) or "";
args.P2 = trim (pframe.args[2]) or "";
args.P3 = trim (pframe.args[3]) or "";
args.P4 = trim (pframe.args[4]) or "";
args.P5 = trim (pframe.args[5]) or "";
return core( args );
end
--[[
function f.sfn( frame )
local args = f.args_default;
pframe = frame:getParent();
args.postscript = pframe.args.postscript or pframe.args.ps or ".";
args.page = pframe.args.p or pframe.args.page or "";
args.pages = pframe.args.pp or pframe.args.pages or "";
args.location = pframe.args.loc or "";
args.ref = pframe.args.ref or pframe.args.Ref or "";
args.P1 = trim( pframe.args[1] ) or "";
args.P2 = trim( pframe.args[2] ) or "";
args.P3 = trim( pframe.args[3] ) or "";
args.P4 = trim( pframe.args[4] ) or "";
args.P5 = trim( pframe.args[5] ) or "";
local result = core( args );
local name = "FOOTNOTE" .. args.P1 .. args.P2 ..
args.P3 .. args.P4 .. args.P5 .. args.page .. args.pages .. args.location;
result = frame:extensionTag{ name = "ref", args = {name=name}, content=result };
return result;
end
]]
return f;
2h9weoq4legy0hs39za66g7e5mhllxz
801831
801830
2014-11-06T01:37:31Z
en>Trappist the monk
0
801831
Scribunto
text/plain
f = {
args_default = {
bracket_left = "(",
bracket_right = ")",
In = '',
c = '',
contribution = '',
author = '',
last = '',
last1='',
P1 = "",
P2 = "",
P3 = "",
P4 = "",
P5 = ""
}
};
function trim( str )
if str == nil then
return nil;
end
return str:match( "^%s*(.-)%s*$");
end
function core( args )
--<span id={{sfnref|Cottontail|2012}} class="citation">Cottontail (2012) "Evading Capture". In [[#CITEREFLapin2012|Lapin 2012]]</span>
local result;
-- form the CITEREF anchor
result = '<span id="CITEREF' .. table.concat ({args.P1, args.P2, args.P3, args.P4, args.P5}) .. '" class="citation">'
-- form the author date list; like sfn and harv, 1 to 4 names and a date; same construct as sfn and harv
if args.P5 ~= "" then
result = result .. args.P1 .. ' et al. ' .. args.bracket_left .. args.P5 .. args.bracket_right;
elseif args.P4 ~= "" then
result = result .. args.P1 .. ', ' .. args.P2 .. ' & ' .. args.P3 .. ' ' .. args.bracket_left .. args.P4 .. args.bracket_right;
elseif args.P3 ~= "" then
result = result .. args.P1 .. ' & ' .. args.P2 .. ' ' .. args.bracket_left .. args.P3 .. args.bracket_right;
else
result = result .. args.P1 .. ' ' .. args.bracket_left .. args.P2 .. args.bracket_right;
end
--add the contribution and close the span
result = result .. ' "' .. args.contribution .. '", in ' .. args.In ..'</span>';
return result;
end
function f.harvc (frame)
local args = f.args_default;
pframe = frame:getParent();
args.contribution = pframe.args.c or pframe.args.contribution or "";
args.In = pframe.args['in'];
args.P1 = pframe.args.author or pframe.args.last or pframe.args.last1 or trim (pframe.args[1]) or "";
args.P2 = trim (pframe.args[2]) or "";
args.P3 = trim (pframe.args[3]) or "";
args.P4 = trim (pframe.args[4]) or "";
args.P5 = trim (pframe.args[5]) or "";
return core( args );
end
--[[
function f.sfn( frame )
local args = f.args_default;
pframe = frame:getParent();
args.postscript = pframe.args.postscript or pframe.args.ps or ".";
args.page = pframe.args.p or pframe.args.page or "";
args.pages = pframe.args.pp or pframe.args.pages or "";
args.location = pframe.args.loc or "";
args.ref = pframe.args.ref or pframe.args.Ref or "";
args.P1 = trim( pframe.args[1] ) or "";
args.P2 = trim( pframe.args[2] ) or "";
args.P3 = trim( pframe.args[3] ) or "";
args.P4 = trim( pframe.args[4] ) or "";
args.P5 = trim( pframe.args[5] ) or "";
local result = core( args );
local name = "FOOTNOTE" .. args.P1 .. args.P2 ..
args.P3 .. args.P4 .. args.P5 .. args.page .. args.pages .. args.location;
result = frame:extensionTag{ name = "ref", args = {name=name}, content=result };
return result;
end
]]
return f;
tttnbsizd5vfp2mjxbjquwyeyb5hq1w
801832
801831
2014-11-06T01:55:08Z
en>Trappist the monk
0
801832
Scribunto
text/plain
f = {
args_default = {
author = '', -- doesn't work yet
bracket_left = '(',
bracket_right = ')',
c = '',
contribution = '',
In = '',
last = '', -- doesn't work yet
last1='', -- doesn't work yet
P1 = '',
P2 = '',
P3 = '',
P4 = '',
P5 = '',
URL = '',
}
};
function trim( str )
if str == nil then
return nil;
end
return str:match( "^%s*(.-)%s*$");
end
function core( args )
--<span id={{sfnref|Cottontail|2012}} class="citation">Cottontail (2012) "Evading Capture". In [[#CITEREFLapin2012|Lapin 2012]]</span>
local result;
-- form the CITEREF anchor
result = '<span id="CITEREF' .. table.concat ({args.P1, args.P2, args.P3, args.P4, args.P5}) .. '" class="citation">'
-- form the author date list; like sfn and harv, 1 to 4 names and a date; same construct as sfn and harv
if args.P5 ~= "" then
result = result .. args.P1 .. ' et al. ' .. args.bracket_left .. args.P5 .. args.bracket_right;
elseif args.P4 ~= "" then
result = result .. args.P1 .. ', ' .. args.P2 .. ' & ' .. args.P3 .. ' ' .. args.bracket_left .. args.P4 .. args.bracket_right;
elseif args.P3 ~= "" then
result = result .. args.P1 .. ' & ' .. args.P2 .. ' ' .. args.bracket_left .. args.P3 .. args.bracket_right;
else
result = result .. args.P1 .. ' ' .. args.bracket_left .. args.P2 .. args.bracket_right;
end
--add the contribution and close the span
if args.URL ~= '' then
args.contribution = '[' .. mw.uri.encode(args.URL) .. ' ' .. args.contribution .. ']'; -- format external link
end
result = result .. ' "' .. args.contribution .. '", in ' .. args.In ..'</span>';
return result;
end
function f.harvc (frame)
local args = f.args_default;
pframe = frame:getParent();
args.contribution = pframe.args.c or pframe.args.contribution or "";
args.In = pframe.args['in'];
args.URL = pframe.args.url;
-- args.P1 = pframe.args.author or pframe.args.last or pframe.args.last1 or trim (pframe.args[1]) or ""; -- doesn't work
args.P1 = trim (pframe.args[1]) or "";
args.P2 = trim (pframe.args[2]) or "";
args.P3 = trim (pframe.args[3]) or "";
args.P4 = trim (pframe.args[4]) or "";
args.P5 = trim (pframe.args[5]) or "";
return core( args );
end
--[[
function f.sfn( frame )
local args = f.args_default;
pframe = frame:getParent();
args.postscript = pframe.args.postscript or pframe.args.ps or ".";
args.page = pframe.args.p or pframe.args.page or "";
args.pages = pframe.args.pp or pframe.args.pages or "";
args.location = pframe.args.loc or "";
args.ref = pframe.args.ref or pframe.args.Ref or "";
args.P1 = trim( pframe.args[1] ) or "";
args.P2 = trim( pframe.args[2] ) or "";
args.P3 = trim( pframe.args[3] ) or "";
args.P4 = trim( pframe.args[4] ) or "";
args.P5 = trim( pframe.args[5] ) or "";
local result = core( args );
local name = "FOOTNOTE" .. args.P1 .. args.P2 ..
args.P3 .. args.P4 .. args.P5 .. args.page .. args.pages .. args.location;
result = frame:extensionTag{ name = "ref", args = {name=name}, content=result };
return result;
end
]]
return f;
ntr9zdb8rahp9baif4q6mmkuzsxzzlr
801833
801832
2014-11-06T01:56:33Z
en>Trappist the monk
0
801833
Scribunto
text/plain
f = {
args_default = {
author = '', -- doesn't work yet
bracket_left = '(',
bracket_right = ')',
c = '',
contribution = '',
In = '',
last = '', -- doesn't work yet
last1='', -- doesn't work yet
P1 = '',
P2 = '',
P3 = '',
P4 = '',
P5 = '',
URL = '',
}
};
function trim( str )
if str == nil then
return nil;
end
return str:match( "^%s*(.-)%s*$");
end
function core( args )
--<span id={{sfnref|Cottontail|2012}} class="citation">Cottontail (2012) "Evading Capture". In [[#CITEREFLapin2012|Lapin 2012]]</span>
local result;
-- form the CITEREF anchor
result = '<span id="CITEREF' .. table.concat ({args.P1, args.P2, args.P3, args.P4, args.P5}) .. '" class="citation">'
-- form the author date list; like sfn and harv, 1 to 4 names and a date; same construct as sfn and harv
if args.P5 ~= "" then
result = result .. args.P1 .. ' et al. ' .. args.bracket_left .. args.P5 .. args.bracket_right;
elseif args.P4 ~= "" then
result = result .. args.P1 .. ', ' .. args.P2 .. ' & ' .. args.P3 .. ' ' .. args.bracket_left .. args.P4 .. args.bracket_right;
elseif args.P3 ~= "" then
result = result .. args.P1 .. ' & ' .. args.P2 .. ' ' .. args.bracket_left .. args.P3 .. args.bracket_right;
else
result = result .. args.P1 .. ' ' .. args.bracket_left .. args.P2 .. args.bracket_right;
end
--add the contribution and close the span
if args.URL ~= '' then
-- args.contribution = '[' .. mw.uri.encode(args.URL) .. ' ' .. args.contribution .. ']'; -- format external link
args.contribution = '[' .. args.URL .. ' ' .. args.contribution .. ']'; -- format external link
end
result = result .. ' "' .. args.contribution .. '", in ' .. args.In ..'</span>';
return result;
end
function f.harvc (frame)
local args = f.args_default;
pframe = frame:getParent();
args.contribution = pframe.args.c or pframe.args.contribution or "";
args.In = pframe.args['in'];
args.URL = pframe.args.url;
-- args.P1 = pframe.args.author or pframe.args.last or pframe.args.last1 or trim (pframe.args[1]) or ""; -- doesn't work
args.P1 = trim (pframe.args[1]) or "";
args.P2 = trim (pframe.args[2]) or "";
args.P3 = trim (pframe.args[3]) or "";
args.P4 = trim (pframe.args[4]) or "";
args.P5 = trim (pframe.args[5]) or "";
return core( args );
end
--[[
function f.sfn( frame )
local args = f.args_default;
pframe = frame:getParent();
args.postscript = pframe.args.postscript or pframe.args.ps or ".";
args.page = pframe.args.p or pframe.args.page or "";
args.pages = pframe.args.pp or pframe.args.pages or "";
args.location = pframe.args.loc or "";
args.ref = pframe.args.ref or pframe.args.Ref or "";
args.P1 = trim( pframe.args[1] ) or "";
args.P2 = trim( pframe.args[2] ) or "";
args.P3 = trim( pframe.args[3] ) or "";
args.P4 = trim( pframe.args[4] ) or "";
args.P5 = trim( pframe.args[5] ) or "";
local result = core( args );
local name = "FOOTNOTE" .. args.P1 .. args.P2 ..
args.P3 .. args.P4 .. args.P5 .. args.page .. args.pages .. args.location;
result = frame:extensionTag{ name = "ref", args = {name=name}, content=result };
return result;
end
]]
return f;
8fk2q2aaqpbyg9dvmqucmkzqqznd7jb
801834
801833
2014-11-06T02:07:15Z
en>Trappist the monk
0
801834
Scribunto
text/plain
f = {
args_default = {
author = '', -- doesn't work yet
bracket_left = '(',
bracket_right = ')',
c = '',
contribution = '',
first = '',
In = '',
last = '', -- doesn't work yet
P1 = '',
P2 = '',
P3 = '',
P4 = '',
P5 = '',
URL = '',
}
};
function trim( str )
if str == nil then
return nil;
end
return str:match( "^%s*(.-)%s*$");
end
function core( args )
--<span id={{sfnref|Cottontail|2012}} class="citation">Cottontail (2012) "Evading Capture". In [[#CITEREFLapin2012|Lapin 2012]]</span>
local result;
-- form the CITEREF anchor
result = '<span id="CITEREF' .. table.concat ({args.P1, args.P2, args.P3, args.P4, args.P5}) .. '" class="citation">'
-- form the author date list; like sfn and harv, 1 to 4 names and a date; same construct as sfn and harv
if args.first ~= '' then
args.first = ', ' .. args.first;
end
if args.P5 ~= "" then
result = result .. args.P1 .. args.first .. ' et al. ' .. args.bracket_left .. args.P5 .. args.bracket_right;
elseif args.P4 ~= "" then
result = result .. args.P1 .. args.first .. ', ' .. args.P2 .. ' & ' .. args.P3 .. ' ' .. args.bracket_left .. args.P4 .. args.bracket_right;
elseif args.P3 ~= "" then
result = result .. args.P1 .. args.first .. ' & ' .. args.P2 .. ' ' .. args.bracket_left .. args.P3 .. args.bracket_right;
else
result = result .. args.P1 .. args.first .. ' ' .. args.bracket_left .. args.P2 .. args.bracket_right;
end
--add the contribution and close the span
if args.URL ~= '' then
-- args.contribution = '[' .. mw.uri.encode(args.URL) .. ' ' .. args.contribution .. ']'; -- format external link
args.contribution = '[' .. args.URL .. ' ' .. args.contribution .. ']'; -- format external link
end
result = result .. ' "' .. args.contribution .. '", in ' .. args.In ..'</span>';
return result;
end
function f.harvc (frame)
local args = f.args_default;
pframe = frame:getParent();
args.contribution = pframe.args.c or pframe.args.contribution or "";
args.In = pframe.args['in'];
args.URL = pframe.args.url;
-- args.P1 = pframe.args.author or pframe.args.last or pframe.args.last1 or trim (pframe.args[1]) or ""; -- doesn't work
args.P1 = trim (pframe.args[1]) or "";
args.P2 = trim (pframe.args[2]) or "";
args.P3 = trim (pframe.args[3]) or "";
args.P4 = trim (pframe.args[4]) or "";
args.P5 = trim (pframe.args[5]) or "";
return core( args );
end
--[[
function f.sfn( frame )
local args = f.args_default;
pframe = frame:getParent();
args.postscript = pframe.args.postscript or pframe.args.ps or ".";
args.page = pframe.args.p or pframe.args.page or "";
args.pages = pframe.args.pp or pframe.args.pages or "";
args.location = pframe.args.loc or "";
args.ref = pframe.args.ref or pframe.args.Ref or "";
args.P1 = trim( pframe.args[1] ) or "";
args.P2 = trim( pframe.args[2] ) or "";
args.P3 = trim( pframe.args[3] ) or "";
args.P4 = trim( pframe.args[4] ) or "";
args.P5 = trim( pframe.args[5] ) or "";
local result = core( args );
local name = "FOOTNOTE" .. args.P1 .. args.P2 ..
args.P3 .. args.P4 .. args.P5 .. args.page .. args.pages .. args.location;
result = frame:extensionTag{ name = "ref", args = {name=name}, content=result };
return result;
end
]]
return f;
htvippqcmov9vds56sxyfw3elljocfn
801835
801834
2014-11-06T02:09:14Z
en>Trappist the monk
0
801835
Scribunto
text/plain
f = {
args_default = {
author = '', -- doesn't work yet
bracket_left = '(',
bracket_right = ')',
c = '',
contribution = '',
first = '',
In = '',
last = '', -- doesn't work yet
P1 = '',
P2 = '',
P3 = '',
P4 = '',
P5 = '',
URL = '',
}
};
function trim( str )
if str == nil then
return nil;
end
return str:match( "^%s*(.-)%s*$");
end
function core( args )
--<span id={{sfnref|Cottontail|2012}} class="citation">Cottontail (2012) "Evading Capture". In [[#CITEREFLapin2012|Lapin 2012]]</span>
local result;
-- form the CITEREF anchor
result = '<span id="CITEREF' .. table.concat ({args.P1, args.P2, args.P3, args.P4, args.P5}) .. '" class="citation">'
-- form the author date list; like sfn and harv, 1 to 4 names and a date; same construct as sfn and harv
if args.first ~= '' then
args.first = ', ' .. args.first;
end
if args.P5 ~= "" then
result = result .. args.P1 .. args.first .. ' et al. ' .. args.bracket_left .. args.P5 .. args.bracket_right;
elseif args.P4 ~= "" then
result = result .. args.P1 .. args.first .. ', ' .. args.P2 .. ' & ' .. args.P3 .. ' ' .. args.bracket_left .. args.P4 .. args.bracket_right;
elseif args.P3 ~= "" then
result = result .. args.P1 .. args.first .. ' & ' .. args.P2 .. ' ' .. args.bracket_left .. args.P3 .. args.bracket_right;
else
result = result .. args.P1 .. args.first .. ' ' .. args.bracket_left .. args.P2 .. args.bracket_right;
end
--add the contribution and close the span
if args.URL ~= '' then
-- args.contribution = '[' .. mw.uri.encode(args.URL) .. ' ' .. args.contribution .. ']'; -- format external link
args.contribution = '[' .. args.URL .. ' ' .. args.contribution .. ']'; -- format external link
end
result = result .. ' "' .. args.contribution .. '", in ' .. args.In ..'</span>';
return result;
end
function f.harvc (frame)
local args = f.args_default;
pframe = frame:getParent();
args.In = pframe.args['in'];
args.URL = pframe.args.url;
args.contribution = pframe.args.c or pframe.args.contribution or "";
args.first = pframe.args.first or pframe.args.first1 or '';
-- args.P1 = pframe.args.author or pframe.args.last or pframe.args.last1 or trim (pframe.args[1]) or ""; -- doesn't work
args.P1 = trim (pframe.args[1]) or "";
args.P2 = trim (pframe.args[2]) or "";
args.P3 = trim (pframe.args[3]) or "";
args.P4 = trim (pframe.args[4]) or "";
args.P5 = trim (pframe.args[5]) or "";
return core( args );
end
--[[
function f.sfn( frame )
local args = f.args_default;
pframe = frame:getParent();
args.postscript = pframe.args.postscript or pframe.args.ps or ".";
args.page = pframe.args.p or pframe.args.page or "";
args.pages = pframe.args.pp or pframe.args.pages or "";
args.location = pframe.args.loc or "";
args.ref = pframe.args.ref or pframe.args.Ref or "";
args.P1 = trim( pframe.args[1] ) or "";
args.P2 = trim( pframe.args[2] ) or "";
args.P3 = trim( pframe.args[3] ) or "";
args.P4 = trim( pframe.args[4] ) or "";
args.P5 = trim( pframe.args[5] ) or "";
local result = core( args );
local name = "FOOTNOTE" .. args.P1 .. args.P2 ..
args.P3 .. args.P4 .. args.P5 .. args.page .. args.pages .. args.location;
result = frame:extensionTag{ name = "ref", args = {name=name}, content=result };
return result;
end
]]
return f;
f1wposac87lxmvd36w44nx61ruo8pxj
801836
801835
2014-11-06T10:39:14Z
en>Trappist the monk
0
801836
Scribunto
text/plain
f = {
args_default = {
author = '', -- doesn't work yet
c = '',
contribution = '',
first = '',
In = '',
last = '', -- doesn't work yet
P1 = '',
P2 = '',
P3 = '',
P4 = '',
P5 = '',
url = '',
}
};
--[[--------------------------< T R I M >----------------------------------------------------------------------
strip leading and trailing white space from positional parameters.
]]
function trim( str )
if str == nil then
return nil;
end
return str:match( "^%s*(.-)%s*$");
end
--[[--------------------------< C O R E >----------------------------------------------------------------------
Assembles the various parts provided by the template into a properly formatted bridging citation. Adds punctuation
and text; encloses the whole within a span with id and class attributes.
]]
function core( args )
local result;
-- form the CITEREF anchor
result = '<span id="CITEREF' .. table.concat ({args.P1, args.P2, args.P3, args.P4, args.P5}) .. '" class="citation">'
-- form the author date list; like sfn and harv, 1 to 4 names and a date; same construct as sfn and harv
if args.first ~= '' then
args.first = ', ' .. args.first;
end
if args.P5 ~= "" then
result = result .. args.P1 .. args.first .. ' et al. ' .. ' (' .. args.P5 .. ')';
elseif args.P4 ~= "" then
result = result .. args.P1 .. args.first .. ', ' .. args.P2 .. ' & ' .. args.P3 .. ' (' .. args.P4 .. ')';
elseif args.P3 ~= "" then
result = result .. args.P1 .. args.first .. ' & ' .. args.P2 .. ' ' .. ' (' .. args.P3 .. ')';
else
result = result .. args.P1 .. args.first .. ' ' .. ' (' .. args.P2 .. ')';
end
--add the contribution and close the span
if args.url ~= '' then
args.contribution = '[' .. args.url .. ' ' .. args.contribution .. ']'; -- format external link
end
result = result .. ', "' .. args.contribution .. '", in ' .. args.In ..'</span>';
return result;
end
function f.harvc (frame)
local args = f.args_default;
pframe = frame:getParent();
args.In = pframe.args['in'];
args.url = pframe.args.url;
args.contribution = pframe.args.c or pframe.args.contribution or "";
args.first = pframe.args.first or pframe.args.first1 or '';
-- args.P1 = pframe.args.author or pframe.args.last or pframe.args.last1 or trim (pframe.args[1]) or ""; -- doesn't work
args.P1 = trim (pframe.args[1]) or "";
args.P2 = trim (pframe.args[2]) or "";
args.P3 = trim (pframe.args[3]) or "";
args.P4 = trim (pframe.args[4]) or "";
args.P5 = trim (pframe.args[5]) or "";
return core( args );
end
--[[
function f.sfn( frame )
local args = f.args_default;
pframe = frame:getParent();
args.postscript = pframe.args.postscript or pframe.args.ps or ".";
args.page = pframe.args.p or pframe.args.page or "";
args.pages = pframe.args.pp or pframe.args.pages or "";
args.location = pframe.args.loc or "";
args.ref = pframe.args.ref or pframe.args.Ref or "";
args.P1 = trim( pframe.args[1] ) or "";
args.P2 = trim( pframe.args[2] ) or "";
args.P3 = trim( pframe.args[3] ) or "";
args.P4 = trim( pframe.args[4] ) or "";
args.P5 = trim( pframe.args[5] ) or "";
local result = core( args );
local name = "FOOTNOTE" .. args.P1 .. args.P2 ..
args.P3 .. args.P4 .. args.P5 .. args.page .. args.pages .. args.location;
result = frame:extensionTag{ name = "ref", args = {name=name}, content=result };
return result;
end
]]
return f;
2d8gx330ify7ouuwqdspm1junvkmjie
801837
801836
2014-11-06T10:59:09Z
en>Trappist the monk
0
remove author date;
801837
Scribunto
text/plain
f = {
args_default = {
author = '', -- doesn't work yet
c = '',
contribution = '',
first = '',
In = '',
last = '', -- doesn't work yet
P1 = '',
P2 = '',
P3 = '',
P4 = '',
P5 = '',
url = '',
}
};
--[[--------------------------< T R I M >----------------------------------------------------------------------
strip leading and trailing white space from positional parameters.
]]
function trim( str )
if str == nil then
return nil;
end
return str:match( "^%s*(.-)%s*$");
end
--[[--------------------------< C O R E >----------------------------------------------------------------------
Assembles the various parts provided by the template into a properly formatted bridging citation. Adds punctuation
and text; encloses the whole within a span with id and class attributes.
]]
function core( args )
local result;
-- form the CITEREF anchor
result = '<span id="CITEREF' .. table.concat ({args.P1, args.P2, args.P3, args.P4, args.P5}) .. '" class="citation">'
-- form the author date list; like sfn and harv, 1 to 4 names and a date; same construct as sfn and harv
if args.first ~= '' then
args.first = ', ' .. args.first;
end
if args.P5 ~= "" then
-- result = result .. args.P1 .. args.first .. ' et al. ' .. ' (' .. args.P5 .. ')';
result = result .. args.P1 .. args.first .. ' et al.';
elseif args.P4 ~= "" then
-- result = result .. args.P1 .. args.first .. ', ' .. args.P2 .. ' & ' .. args.P3 .. ' (' .. args.P4 .. ')';
result = result .. args.P1 .. args.first .. ', ' .. args.P2 .. ' & ' .. args.P3;
elseif args.P3 ~= "" then
-- result = result .. args.P1 .. args.first .. ' & ' .. args.P2 .. ' (' .. args.P3 .. ')';
result = result .. args.P1 .. args.first .. ' & ' .. args.P2;
else
-- result = result .. args.P1 .. args.first .. ' (' .. args.P2 .. ')';
result = result .. args.P1 .. args.first;
end
--add the contribution and close the span
if args.url ~= '' then
args.contribution = '[' .. args.url .. ' ' .. args.contribution .. ']'; -- format external link
end
result = result .. ', "' .. args.contribution .. '", in ' .. args.In ..'</span>';
return result;
end
function f.harvc (frame)
local args = f.args_default;
pframe = frame:getParent();
args.In = pframe.args['in'];
args.url = pframe.args.url;
args.contribution = pframe.args.c or pframe.args.contribution or "";
args.first = pframe.args.first or pframe.args.first1 or '';
-- args.P1 = pframe.args.author or pframe.args.last or pframe.args.last1 or trim (pframe.args[1]) or ""; -- doesn't work
args.P1 = trim (pframe.args[1]) or "";
args.P2 = trim (pframe.args[2]) or "";
args.P3 = trim (pframe.args[3]) or "";
args.P4 = trim (pframe.args[4]) or "";
args.P5 = trim (pframe.args[5]) or "";
return core( args );
end
--[[
function f.sfn( frame )
local args = f.args_default;
pframe = frame:getParent();
args.postscript = pframe.args.postscript or pframe.args.ps or ".";
args.page = pframe.args.p or pframe.args.page or "";
args.pages = pframe.args.pp or pframe.args.pages or "";
args.location = pframe.args.loc or "";
args.ref = pframe.args.ref or pframe.args.Ref or "";
args.P1 = trim( pframe.args[1] ) or "";
args.P2 = trim( pframe.args[2] ) or "";
args.P3 = trim( pframe.args[3] ) or "";
args.P4 = trim( pframe.args[4] ) or "";
args.P5 = trim( pframe.args[5] ) or "";
local result = core( args );
local name = "FOOTNOTE" .. args.P1 .. args.P2 ..
args.P3 .. args.P4 .. args.P5 .. args.page .. args.pages .. args.location;
result = frame:extensionTag{ name = "ref", args = {name=name}, content=result };
return result;
end
]]
return f;
1kb1dsdcenldk0c00sg5jx939x7qr9p
801838
801837
2014-11-06T11:29:40Z
en>Trappist the monk
0
801838
Scribunto
text/plain
f = {
args_default = {
contribution = '',
first = '',
In = '',
P1 = '',
P2 = '',
P3 = '',
P4 = '',
P5 = '',
url = '',
}
};
--[[--------------------------< T R I M >----------------------------------------------------------------------
strip leading and trailing white space from positional parameters.
]]
function trim( str )
if str == nil then
return '';
-- return nil;
end
return str:match( "^%s*(.-)%s*$");
end
--[[--------------------------< C O R E >----------------------------------------------------------------------
Assembles the various parts provided by the template into a properly formatted bridging citation. Adds punctuation
and text; encloses the whole within a span with id and class attributes.
This function mimics the {{sfn}} and {{harv}} templates, but it does not display an author-date list, just an
author list. It is presumed that the dates of contributions are the same as the date of the enclosing work.
Even though not displayed, a date positional parameter is still required for the CITEREF anchor
]]
function core( args )
local result;
-- form the CITEREF anchor
result = '<span id="CITEREF' .. table.concat ({args.P1, args.P2, args.P3, args.P4, args.P5}) .. '" class="citation">'
-- form the author list; like {{sfn}} and {{harv}}, 1 to 4 names and a date; same construct as sfn and harv
if args.first ~= '' then
args.first = ', ' .. args.first;
end
if args.P5 ~= "" then
-- result = result .. args.P1 .. args.first .. ' et al. ' .. ' (' .. args.P5 .. ')';
result = result .. args.P1 .. args.first .. ' et al.';
elseif args.P4 ~= "" then
-- result = result .. args.P1 .. args.first .. ', ' .. args.P2 .. ' & ' .. args.P3 .. ' (' .. args.P4 .. ')';
result = result .. args.P1 .. args.first .. ', ' .. args.P2 .. ' & ' .. args.P3;
elseif args.P3 ~= "" then
-- result = result .. args.P1 .. args.first .. ' & ' .. args.P2 .. ' (' .. args.P3 .. ')';
result = result .. args.P1 .. args.first .. ' & ' .. args.P2;
else
-- result = result .. args.P1 .. args.first .. ' (' .. args.P2 .. ')';
result = result .. args.P1 .. args.first;
end
--add the contribution and close the span
if args.url ~= '' then
args.contribution = '[' .. args.url .. ' ' .. args.contribution .. ']'; -- format external link
end
result = result .. ', "' .. args.contribution .. '", in ' .. args.In ..'</span>';
return result;
end
--[[--------------------------< F . H A R V C >----------------------------------------------------------------
Entry point from {{harvc}} template. Fetches parent frame parameters
]]
function f.harvc (frame)
local args = f.args_default;
pframe = frame:getParent();
args.contribution = pframe.args.c or pframe.args.chapter or pframe.args.contribution or ""; -- chapter or contribution
args.first = pframe.args.first or pframe.args.first1 or ''; -- first author's given name; given names for other authors not supported
args.In = pframe.args['in']; -- identity of thing that contribution is part of; done this way because 'in' is a Lua reserved keyword
args.url = pframe.args.url; -- url for chapter or contribution
args.P1 = trim (pframe.args[1]); -- the positional parameters mimic {{harv}} template usage
args.P2 = trim (pframe.args[2]);
args.P3 = trim (pframe.args[3]);
args.P4 = trim (pframe.args[4]);
args.P5 = trim (pframe.args[5]);
return core (args);
end
--[[
function f.sfn( frame )
local args = f.args_default;
pframe = frame:getParent();
args.postscript = pframe.args.postscript or pframe.args.ps or ".";
args.page = pframe.args.p or pframe.args.page or "";
args.pages = pframe.args.pp or pframe.args.pages or "";
args.location = pframe.args.loc or "";
args.ref = pframe.args.ref or pframe.args.Ref or "";
args.P1 = trim( pframe.args[1] ) or "";
args.P2 = trim( pframe.args[2] ) or "";
args.P3 = trim( pframe.args[3] ) or "";
args.P4 = trim( pframe.args[4] ) or "";
args.P5 = trim( pframe.args[5] ) or "";
local result = core( args );
local name = "FOOTNOTE" .. args.P1 .. args.P2 ..
args.P3 .. args.P4 .. args.P5 .. args.page .. args.pages .. args.location;
result = frame:extensionTag{ name = "ref", args = {name=name}, content=result };
return result;
end
]]
return f;
oy61rb5duntixivj2sokfs8oyzkz6zw
801839
801838
2014-11-06T11:45:08Z
en>Trappist the monk
0
Error messages;
801839
Scribunto
text/plain
f = {
args_default = {
contribution = '<span style="font-size:100%" class="error citation-comment">required contribution is missing</span>',
first = '',
In = '<span style="font-size:100%" class="error citation-comment">required source is missing</span>',
P1 = '',
P2 = '',
P3 = '',
P4 = '',
P5 = '',
url = '',
}
};
--[[--------------------------< T R I M >----------------------------------------------------------------------
strip leading and trailing white space from positional parameters.
]]
function trim( str )
if str == nil then
return '';
-- return nil;
end
return str:match( "^%s*(.-)%s*$");
end
--[[--------------------------< C O R E >----------------------------------------------------------------------
Assembles the various parts provided by the template into a properly formatted bridging citation. Adds punctuation
and text; encloses the whole within a span with id and class attributes.
This function mimics the {{sfn}} and {{harv}} templates, but it does not display an author-date list, just an
author list. It is presumed that the dates of contributions are the same as the date of the enclosing work.
Even though not displayed, a date positional parameter is still required for the CITEREF anchor
]]
function core( args )
local result;
-- form the CITEREF anchor
result = '<span id="CITEREF' .. table.concat ({args.P1, args.P2, args.P3, args.P4, args.P5}) .. '" class="citation">'
-- form the author list; like {{sfn}} and {{harv}}, 1 to 4 names and a date; same construct as sfn and harv
if args.first ~= '' then
args.first = ', ' .. args.first;
end
if args.P5 ~= "" then
-- result = result .. args.P1 .. args.first .. ' et al. ' .. ' (' .. args.P5 .. ')';
result = result .. args.P1 .. args.first .. ' et al.';
elseif args.P4 ~= "" then
-- result = result .. args.P1 .. args.first .. ', ' .. args.P2 .. ' & ' .. args.P3 .. ' (' .. args.P4 .. ')';
result = result .. args.P1 .. args.first .. ', ' .. args.P2 .. ' & ' .. args.P3;
elseif args.P3 ~= "" then
-- result = result .. args.P1 .. args.first .. ' & ' .. args.P2 .. ' (' .. args.P3 .. ')';
result = result .. args.P1 .. args.first .. ' & ' .. args.P2;
else
-- result = result .. args.P1 .. args.first .. ' (' .. args.P2 .. ')';
result = result .. args.P1 .. args.first;
end
--add the contribution and close the span
if args.url ~= '' then
args.contribution = '[' .. args.url .. ' ' .. args.contribution .. ']'; -- format external link
end
result = result .. ', "' .. args.contribution .. '", in ' .. args.In ..'</span>';
return result;
end
--[[--------------------------< F . H A R V C >----------------------------------------------------------------
Entry point from {{harvc}} template. Fetches parent frame parameters
]]
function f.harvc (frame)
local args = f.args_default;
pframe = frame:getParent();
args.contribution = pframe.args.c or pframe.args.chapter or pframe.args.contribution or ""; -- chapter or contribution
args.first = pframe.args.first or pframe.args.first1 or ''; -- first author's given name; given names for other authors not supported
args.In = pframe.args['in']; -- identity of thing that contribution is part of; done this way because 'in' is a Lua reserved keyword
args.url = pframe.args.url; -- url for chapter or contribution
args.P1 = trim (pframe.args[1]); -- the positional parameters mimic {{harv}} template usage
args.P2 = trim (pframe.args[2]);
args.P3 = trim (pframe.args[3]);
args.P4 = trim (pframe.args[4]);
args.P5 = trim (pframe.args[5]);
return core (args);
end
--[[
function f.sfn( frame )
local args = f.args_default;
pframe = frame:getParent();
args.postscript = pframe.args.postscript or pframe.args.ps or ".";
args.page = pframe.args.p or pframe.args.page or "";
args.pages = pframe.args.pp or pframe.args.pages or "";
args.location = pframe.args.loc or "";
args.ref = pframe.args.ref or pframe.args.Ref or "";
args.P1 = trim( pframe.args[1] ) or "";
args.P2 = trim( pframe.args[2] ) or "";
args.P3 = trim( pframe.args[3] ) or "";
args.P4 = trim( pframe.args[4] ) or "";
args.P5 = trim( pframe.args[5] ) or "";
local result = core( args );
local name = "FOOTNOTE" .. args.P1 .. args.P2 ..
args.P3 .. args.P4 .. args.P5 .. args.page .. args.pages .. args.location;
result = frame:extensionTag{ name = "ref", args = {name=name}, content=result };
return result;
end
]]
return f;
qo0th0dyibbo3ger265167x9k9kx3k6
801840
801839
2014-11-06T11:52:14Z
en>Trappist the monk
0
801840
Scribunto
text/plain
f = {
args_default = {
contribution = '<span style="font-size:100%" class="error citation-comment">required contribution is missing</span>',
first = '',
In = '',
P1 = '',
P2 = '',
P3 = '',
P4 = '',
P5 = '',
url = '',
}
};
--[[--------------------------< T R I M >----------------------------------------------------------------------
strip leading and trailing white space from positional parameters.
]]
function trim( str )
if str == nil then
return '';
-- return nil;
end
return str:match( "^%s*(.-)%s*$");
end
--[[--------------------------< C O R E >----------------------------------------------------------------------
Assembles the various parts provided by the template into a properly formatted bridging citation. Adds punctuation
and text; encloses the whole within a span with id and class attributes.
This function mimics the {{sfn}} and {{harv}} templates, but it does not display an author-date list, just an
author list. It is presumed that the dates of contributions are the same as the date of the enclosing work.
Even though not displayed, a date positional parameter is still required for the CITEREF anchor
]]
function core( args )
local result;
-- form the CITEREF anchor
result = '<span id="CITEREF' .. table.concat ({args.P1, args.P2, args.P3, args.P4, args.P5}) .. '" class="citation">'
-- form the author list; like {{sfn}} and {{harv}}, 1 to 4 names and a date; same construct as sfn and harv
if args.first ~= '' then
args.first = ', ' .. args.first;
end
if args.P5 ~= "" then
-- result = result .. args.P1 .. args.first .. ' et al. ' .. ' (' .. args.P5 .. ')';
result = result .. args.P1 .. args.first .. ' et al.';
elseif args.P4 ~= "" then
-- result = result .. args.P1 .. args.first .. ', ' .. args.P2 .. ' & ' .. args.P3 .. ' (' .. args.P4 .. ')';
result = result .. args.P1 .. args.first .. ', ' .. args.P2 .. ' & ' .. args.P3;
elseif args.P3 ~= "" then
-- result = result .. args.P1 .. args.first .. ' & ' .. args.P2 .. ' (' .. args.P3 .. ')';
result = result .. args.P1 .. args.first .. ' & ' .. args.P2;
else
-- result = result .. args.P1 .. args.first .. ' (' .. args.P2 .. ')';
result = result .. args.P1 .. args.first;
end
--add the contribution and close the span
if args.url ~= '' then
args.contribution = '[' .. args.url .. ' ' .. args.contribution .. ']'; -- format external link
end
result = result .. ', "' .. args.contribution .. '", in ' .. args.In ..'</span>';
return result;
end
--[[--------------------------< F . H A R V C >----------------------------------------------------------------
Entry point from {{harvc}} template. Fetches parent frame parameters
]]
function f.harvc (frame)
local args = f.args_default;
pframe = frame:getParent();
args.contribution = pframe.args.c or pframe.args.chapter or pframe.args.contribution or ""; -- chapter or contribution
args.first = pframe.args.first or pframe.args.first1 or ''; -- first author's given name; given names for other authors not supported
args.In = pframe.args['in'] or '<span style="font-size:100%">required source is missing</span>'; -- source; 'in' is a Lua reserved keyword
args.url = pframe.args.url; -- url for chapter or contribution
args.P1 = trim (pframe.args[1]); -- the positional parameters mimic {{harv}} template usage
args.P2 = trim (pframe.args[2]);
args.P3 = trim (pframe.args[3]);
args.P4 = trim (pframe.args[4]);
args.P5 = trim (pframe.args[5]);
return core (args);
end
--[[
function f.sfn( frame )
local args = f.args_default;
pframe = frame:getParent();
args.postscript = pframe.args.postscript or pframe.args.ps or ".";
args.page = pframe.args.p or pframe.args.page or "";
args.pages = pframe.args.pp or pframe.args.pages or "";
args.location = pframe.args.loc or "";
args.ref = pframe.args.ref or pframe.args.Ref or "";
args.P1 = trim( pframe.args[1] ) or "";
args.P2 = trim( pframe.args[2] ) or "";
args.P3 = trim( pframe.args[3] ) or "";
args.P4 = trim( pframe.args[4] ) or "";
args.P5 = trim( pframe.args[5] ) or "";
local result = core( args );
local name = "FOOTNOTE" .. args.P1 .. args.P2 ..
args.P3 .. args.P4 .. args.P5 .. args.page .. args.pages .. args.location;
result = frame:extensionTag{ name = "ref", args = {name=name}, content=result };
return result;
end
]]
return f;
acrh2lj50j1fmtsdqw8dfw6tfboju5u
801841
801840
2014-11-06T11:57:28Z
en>Trappist the monk
0
801841
Scribunto
text/plain
f = {
args_default = {
contribution = '',
first = '',
In = '',
P1 = '',
P2 = '',
P3 = '',
P4 = '',
P5 = '',
url = '',
}
};
--[[--------------------------< T R I M >----------------------------------------------------------------------
strip leading and trailing white space from positional parameters.
]]
function trim( str )
if str == nil then
return '';
-- return nil;
end
return str:match( "^%s*(.-)%s*$");
end
--[[--------------------------< C O R E >----------------------------------------------------------------------
Assembles the various parts provided by the template into a properly formatted bridging citation. Adds punctuation
and text; encloses the whole within a span with id and class attributes.
This function mimics the {{sfn}} and {{harv}} templates, but it does not display an author-date list, just an
author list. It is presumed that the dates of contributions are the same as the date of the enclosing work.
Even though not displayed, a date positional parameter is still required for the CITEREF anchor
]]
function core( args )
local result;
-- form the CITEREF anchor
result = '<span id="CITEREF' .. table.concat ({args.P1, args.P2, args.P3, args.P4, args.P5}) .. '" class="citation">'
-- form the author list; like {{sfn}} and {{harv}}, 1 to 4 names and a date; same construct as sfn and harv
if args.first ~= '' then
args.first = ', ' .. args.first;
end
if args.P5 ~= "" then
-- result = result .. args.P1 .. args.first .. ' et al. ' .. ' (' .. args.P5 .. ')';
result = result .. args.P1 .. args.first .. ' et al.';
elseif args.P4 ~= "" then
-- result = result .. args.P1 .. args.first .. ', ' .. args.P2 .. ' & ' .. args.P3 .. ' (' .. args.P4 .. ')';
result = result .. args.P1 .. args.first .. ', ' .. args.P2 .. ' & ' .. args.P3;
elseif args.P3 ~= "" then
-- result = result .. args.P1 .. args.first .. ' & ' .. args.P2 .. ' (' .. args.P3 .. ')';
result = result .. args.P1 .. args.first .. ' & ' .. args.P2;
else
-- result = result .. args.P1 .. args.first .. ' (' .. args.P2 .. ')';
result = result .. args.P1 .. args.first;
end
--add the contribution and close the span
if args.url ~= '' then
args.contribution = '[' .. args.url .. ' ' .. args.contribution .. ']'; -- format external link
end
result = result .. ', "' .. args.contribution .. '", in ' .. args.In ..'</span>';
return result;
end
--[[--------------------------< F . H A R V C >----------------------------------------------------------------
Entry point from {{harvc}} template. Fetches parent frame parameters
]]
function f.harvc (frame)
local args = f.args_default;
pframe = frame:getParent();
args.contribution = pframe.args.c or -- chapter or contribution
pframe.args.chapter or
pframe.args.contribution or
'<span style="font-size:100%" class="error">required contribution is missing</span>'; -- error message if source not provided
args.first = pframe.args.first or pframe.args.first1 or ''; -- (optional) first author's given name; given names for other authors not supported
args.In = pframe.args['in'] or -- source; 'in' is a Lua reserved keyword
'<span style="font-size:100%" class="error">required source is missing</span>'; -- error message if source not provided
args.url = pframe.args.url; -- url for chapter or contribution
args.P1 = trim (pframe.args[1]); -- the positional parameters mimic {{harv}} template usage
args.P2 = trim (pframe.args[2]);
args.P3 = trim (pframe.args[3]);
args.P4 = trim (pframe.args[4]);
args.P5 = trim (pframe.args[5]);
return core (args);
end
--[[
function f.sfn( frame )
local args = f.args_default;
pframe = frame:getParent();
args.postscript = pframe.args.postscript or pframe.args.ps or ".";
args.page = pframe.args.p or pframe.args.page or "";
args.pages = pframe.args.pp or pframe.args.pages or "";
args.location = pframe.args.loc or "";
args.ref = pframe.args.ref or pframe.args.Ref or "";
args.P1 = trim( pframe.args[1] ) or "";
args.P2 = trim( pframe.args[2] ) or "";
args.P3 = trim( pframe.args[3] ) or "";
args.P4 = trim( pframe.args[4] ) or "";
args.P5 = trim( pframe.args[5] ) or "";
local result = core( args );
local name = "FOOTNOTE" .. args.P1 .. args.P2 ..
args.P3 .. args.P4 .. args.P5 .. args.page .. args.pages .. args.location;
result = frame:extensionTag{ name = "ref", args = {name=name}, content=result };
return result;
end
]]
return f;
acjt5jwn9c88l8iwcxbvk89lpu4pjid
801842
801841
2014-11-06T12:02:06Z
en>Trappist the monk
0
801842
Scribunto
text/plain
f = {
args_default = {
contribution = '',
first = '',
In = '',
P1 = '',
P2 = '',
P3 = '',
P4 = '',
P5 = '',
url = '',
}
};
--[[--------------------------< T R I M >----------------------------------------------------------------------
strip leading and trailing white space from positional parameters.
]]
function trim( str )
if str == nil then
return '';
-- return nil;
end
return str:match( "^%s*(.-)%s*$");
end
--[[--------------------------< C O R E >----------------------------------------------------------------------
Assembles the various parts provided by the template into a properly formatted bridging citation. Adds punctuation
and text; encloses the whole within a span with id and class attributes.
This function mimics the {{sfn}} and {{harv}} templates, but it does not display an author-date list, just an
author list. It is presumed that the dates of contributions are the same as the date of the enclosing work.
Even though not displayed, a date positional parameter is still required for the CITEREF anchor
]]
function core( args )
local result;
-- form the CITEREF anchor
result = '<span id="CITEREF' .. table.concat ({args.P1, args.P2, args.P3, args.P4, args.P5}) .. '" class="citation">'
-- form the author list; like {{sfn}} and {{harv}}, 1 to 4 names and a date; same construct as sfn and harv
if args.first ~= '' then
args.first = ', ' .. args.first;
end
if args.P5 ~= "" then
-- result = result .. args.P1 .. args.first .. ' et al. ' .. ' (' .. args.P5 .. ')';
result = result .. args.P1 .. args.first .. ' et al.';
elseif args.P4 ~= "" then
-- result = result .. args.P1 .. args.first .. ', ' .. args.P2 .. ' & ' .. args.P3 .. ' (' .. args.P4 .. ')';
result = result .. args.P1 .. args.first .. ', ' .. args.P2 .. ' & ' .. args.P3;
elseif args.P3 ~= "" then
-- result = result .. args.P1 .. args.first .. ' & ' .. args.P2 .. ' (' .. args.P3 .. ')';
result = result .. args.P1 .. args.first .. ' & ' .. args.P2;
else
-- result = result .. args.P1 .. args.first .. ' (' .. args.P2 .. ')';
result = result .. args.P1 .. args.first;
end
--add the contribution and close the span
if args.url ~= '' then
args.contribution = '[' .. args.url .. ' ' .. args.contribution .. ']'; -- format external link
end
result = result .. ', "' .. args.contribution .. '", in ' .. args.In ..'</span>';
return result;
end
--[[--------------------------< F . H A R V C >----------------------------------------------------------------
Entry point from {{harvc}} template. Fetches parent frame parameters
]]
function f.harvc (frame)
local args = f.args_default;
pframe = frame:getParent();
args.contribution = pframe.args.c or -- chapter or contribution
pframe.args.chapter or
pframe.args.contribution or '';
args.first = pframe.args.first or pframe.args.first1 or ''; -- (optional) first author's given name; given names for other authors not supported
args.In = pframe.args['in'] or -- source; 'in' is a Lua reserved keyword
'<span style="font-size:100%" class="error">required source is missing</span>'; -- error message if source not provided
args.url = pframe.args.url; -- url for chapter or contribution
args.P1 = trim (pframe.args[1]); -- the positional parameters mimic {{harv}} template usage
args.P2 = trim (pframe.args[2]);
args.P3 = trim (pframe.args[3]);
args.P4 = trim (pframe.args[4]);
args.P5 = trim (pframe.args[5]);
if args.contribution == '' then
args.contribution = '<span style="font-size:100%" class="error">required contribution is missing</span>'; -- error message if source not provided
args.url=''; -- if no contribution set url to empty string so we don't link the error message
end
return core (args);
end
--[[
function f.sfn( frame )
local args = f.args_default;
pframe = frame:getParent();
args.postscript = pframe.args.postscript or pframe.args.ps or ".";
args.page = pframe.args.p or pframe.args.page or "";
args.pages = pframe.args.pp or pframe.args.pages or "";
args.location = pframe.args.loc or "";
args.ref = pframe.args.ref or pframe.args.Ref or "";
args.P1 = trim( pframe.args[1] ) or "";
args.P2 = trim( pframe.args[2] ) or "";
args.P3 = trim( pframe.args[3] ) or "";
args.P4 = trim( pframe.args[4] ) or "";
args.P5 = trim( pframe.args[5] ) or "";
local result = core( args );
local name = "FOOTNOTE" .. args.P1 .. args.P2 ..
args.P3 .. args.P4 .. args.P5 .. args.page .. args.pages .. args.location;
result = frame:extensionTag{ name = "ref", args = {name=name}, content=result };
return result;
end
]]
return f;
orzl55hd2qb0wpq71g639z64r6whofq
801843
801842
2014-11-06T12:21:15Z
en>Trappist the monk
0
801843
Scribunto
text/plain
f = {
args_default = {
contribution = '',
first = '',
In = '',
P1 = '',
P2 = '',
P3 = '',
P4 = '',
P5 = '',
url = '',
}
};
--[[--------------------------< T R I M >----------------------------------------------------------------------
strip leading and trailing white space from positional parameters.
]]
function trim( str )
if str == nil then
return '';
end
return str:match( "^%s*(.-)%s*$");
end
--[[--------------------------< C O R E >----------------------------------------------------------------------
Assembles the various parts provided by the template into a properly formatted bridging citation. Adds punctuation
and text; encloses the whole within a span with id and class attributes.
This function mimics the {{sfn}} and {{harv}} templates, but it does not display an author-date list, just an
author list. It is presumed that the dates of contributions are the same as the date of the enclosing work.
Even though not displayed, a date positional parameter is still required for the CITEREF anchor
]]
function core( args )
local result;
-- form the CITEREF anchor
result = '<span id="CITEREF' .. table.concat ({args.P1, args.P2, args.P3, args.P4, args.P5}) .. '" class="citation">'
-- form the author list; like {{sfn}} and {{harv}}, 1 to 4 names and a date; same construct as sfn and harv
if args.first ~= '' then
args.first = ', ' .. args.first;
end
if args.P5 ~= "" then
result = result .. args.P1 .. args.first .. ' et al.';
elseif args.P4 ~= "" then
result = result .. args.P1 .. args.first .. ', ' .. args.P2 .. ' & ' .. args.P3;
elseif args.P3 ~= "" then
result = result .. args.P1 .. args.first .. ' & ' .. args.P2;
else
result = result .. args.P1 .. args.first;
end
--add the contribution and close the span
if args.url ~= '' then
args.contribution = '[' .. args.url .. ' ' .. args.contribution .. ']'; -- format external link
end
result = result .. ', "' .. args.contribution .. '", in ' .. args.In ..'</span>';
return result;
end
--[[--------------------------< F . H A R V C >----------------------------------------------------------------
Entry point from {{harvc}} template. Fetches parent frame parameters, does a bit of simple error checking
]]
function f.harvc (frame)
local args = f.args_default;
pframe = frame:getParent();
args.contribution = pframe.args.c or -- chapter or contribution
pframe.args.chapter or
pframe.args.contribution or '';
args.first = pframe.args.first or pframe.args.first1 or ''; -- (optional) first author's given name; given names for other authors not supported
args.In = pframe.args['in'] or -- source; 'in' is a Lua reserved keyword
'<span style="font-size:100%" class="error">required source is missing</span>'; -- error message if source not provided
args.url = pframe.args.url; -- url for chapter or contribution
args.P1 = trim (pframe.args[1]); -- the positional parameters mimic {{harv}} template usage
args.P2 = trim (pframe.args[2]);
args.P3 = trim (pframe.args[3]);
args.P4 = trim (pframe.args[4]);
args.P5 = trim (pframe.args[5]);
if args.contribution == '' then
args.contribution = '<span style="font-size:100%" class="error">required contribution is missing</span>'; -- error message if source not provided
args.url=''; -- if no contribution set url to empty string so we don't link the error message
end
return core (args);
end
--[[
function f.sfn( frame )
local args = f.args_default;
pframe = frame:getParent();
args.postscript = pframe.args.postscript or pframe.args.ps or ".";
args.page = pframe.args.p or pframe.args.page or "";
args.pages = pframe.args.pp or pframe.args.pages or "";
args.location = pframe.args.loc or "";
args.ref = pframe.args.ref or pframe.args.Ref or "";
args.P1 = trim( pframe.args[1] ) or "";
args.P2 = trim( pframe.args[2] ) or "";
args.P3 = trim( pframe.args[3] ) or "";
args.P4 = trim( pframe.args[4] ) or "";
args.P5 = trim( pframe.args[5] ) or "";
local result = core( args );
local name = "FOOTNOTE" .. args.P1 .. args.P2 ..
args.P3 .. args.P4 .. args.P5 .. args.page .. args.pages .. args.location;
result = frame:extensionTag{ name = "ref", args = {name=name}, content=result };
return result;
end
]]
return f;
dqsfrh9glqxyi9duk1iaqxw83lvyccy
801844
801843
2014-11-06T12:22:24Z
en>Trappist the monk
0
801844
Scribunto
text/plain
f = {
args_default = {
contribution = '',
first = '',
In = '',
P1 = '',
P2 = '',
P3 = '',
P4 = '',
P5 = '',
url = '',
}
};
--[[--------------------------< T R I M >----------------------------------------------------------------------
strip leading and trailing white space from positional parameters.
]]
function trim( str )
if str == nil then
return '';
end
return str:match( "^%s*(.-)%s*$");
end
--[[--------------------------< C O R E >----------------------------------------------------------------------
Assembles the various parts provided by the template into a properly formatted bridging citation. Adds punctuation
and text; encloses the whole within a span with id and class attributes.
This function mimics the {{sfn}} and {{harv}} templates, but it does not display an author-date list, just an
author list. It is presumed that the dates of contributions are the same as the date of the enclosing work.
Even though not displayed, a date positional parameter is still required for the CITEREF anchor
]]
function core( args )
local result;
-- form the CITEREF anchor
result = '<span id="CITEREF' .. table.concat ({args.P1, args.P2, args.P3, args.P4, args.P5}) .. '" class="citation">'
-- form the author list; like {{sfn}} and {{harv}}, 1 to 4 names and a date; same construct as sfn and harv
if args.first ~= '' then
args.first = ', ' .. args.first;
end
if args.P5 ~= "" then
result = result .. args.P1 .. args.first .. ' et al.';
elseif args.P4 ~= "" then
result = result .. args.P1 .. args.first .. ', ' .. args.P2 .. ' & ' .. args.P3;
elseif args.P3 ~= "" then
result = result .. args.P1 .. args.first .. ' & ' .. args.P2;
else
result = result .. args.P1 .. args.first;
end
--add the contribution and close the span
if args.url ~= '' then
args.contribution = '[' .. args.url .. ' ' .. args.contribution .. ']'; -- format external link
end
result = result .. ', "' .. args.contribution .. '", in ' .. args.In ..'.</span>';
return result;
end
--[[--------------------------< F . H A R V C >----------------------------------------------------------------
Entry point from {{harvc}} template. Fetches parent frame parameters, does a bit of simple error checking
]]
function f.harvc (frame)
local args = f.args_default;
pframe = frame:getParent();
args.contribution = pframe.args.c or -- chapter or contribution
pframe.args.chapter or
pframe.args.contribution or '';
args.first = pframe.args.first or pframe.args.first1 or ''; -- (optional) first author's given name; given names for other authors not supported
args.In = pframe.args['in'] or -- source; 'in' is a Lua reserved keyword
'<span style="font-size:100%" class="error">required source is missing</span>'; -- error message if source not provided
args.url = pframe.args.url; -- url for chapter or contribution
args.P1 = trim (pframe.args[1]); -- the positional parameters mimic {{harv}} template usage
args.P2 = trim (pframe.args[2]);
args.P3 = trim (pframe.args[3]);
args.P4 = trim (pframe.args[4]);
args.P5 = trim (pframe.args[5]);
if args.contribution == '' then
args.contribution = '<span style="font-size:100%" class="error">required contribution is missing</span>'; -- error message if source not provided
args.url=''; -- if no contribution set url to empty string so we don't link the error message
end
return core (args);
end
--[[
function f.sfn( frame )
local args = f.args_default;
pframe = frame:getParent();
args.postscript = pframe.args.postscript or pframe.args.ps or ".";
args.page = pframe.args.p or pframe.args.page or "";
args.pages = pframe.args.pp or pframe.args.pages or "";
args.location = pframe.args.loc or "";
args.ref = pframe.args.ref or pframe.args.Ref or "";
args.P1 = trim( pframe.args[1] ) or "";
args.P2 = trim( pframe.args[2] ) or "";
args.P3 = trim( pframe.args[3] ) or "";
args.P4 = trim( pframe.args[4] ) or "";
args.P5 = trim( pframe.args[5] ) or "";
local result = core( args );
local name = "FOOTNOTE" .. args.P1 .. args.P2 ..
args.P3 .. args.P4 .. args.P5 .. args.page .. args.pages .. args.location;
result = frame:extensionTag{ name = "ref", args = {name=name}, content=result };
return result;
end
]]
return f;
ge345lli7c8hbpk1g4b2gv02j35nx47
801845
801844
2014-11-06T18:21:57Z
en>Trappist the monk
0
801845
Scribunto
text/plain
f = {
args_default = {
contribution = '',
first = '',
In = '',
P1 = '',
P2 = '',
P3 = '',
P4 = '',
P5 = '',
url = '',
}
};
--[[--------------------------< T R I M >----------------------------------------------------------------------
strip leading and trailing white space from positional parameters.
]]
function trim( str )
if str == nil then
return '';
end
return str:match( "^%s*(.-)%s*$");
end
--[[--------------------------< C O R E >----------------------------------------------------------------------
Assembles the various parts provided by the template into a properly formatted bridging citation. Adds punctuation
and text; encloses the whole within a span with id and class attributes.
This function mimics the {{sfn}} and {{harv}} templates, but it does not display an author-date list, just an
author list. It is presumed that the dates of contributions are the same as the date of the enclosing work.
Even though not displayed, a date positional parameter is still required for the CITEREF anchor
]]
function core( args )
local result;
-- form the CITEREF anchor
result = '<span id="CITEREF' .. table.concat ({args.P1, args.P2, args.P3, args.P4, args.P5}) .. '" class="citation">'
-- form the author list; like {{sfn}} and {{harv}}, 1 to 4 names and a date; same construct as sfn and harv
if args.first ~= '' then
args.first = ', ' .. args.first;
end
if args.P5 ~= "" then
result = result .. args.P1 .. args.first .. ' et al.';
elseif args.P4 ~= "" then
result = result .. args.P1 .. args.first .. ', ' .. args.P2 .. ' & ' .. args.P3;
elseif args.P3 ~= "" then
result = result .. args.P1 .. args.first .. ' & ' .. args.P2;
else
result = result .. args.P1 .. args.first;
end
--add the contribution and close the span
if args.url ~= '' then
args.contribution = '[' .. args.url .. ' ' .. args.contribution .. ']'; -- format external link
end
result = result .. ', "' .. args.contribution .. '", in ' .. args.In .. args.postscript'</span>';
return result;
end
--[[--------------------------< F . H A R V C >----------------------------------------------------------------
Entry point from {{harvc}} template. Fetches parent frame parameters, does a bit of simple error checking
]]
function f.harvc (frame)
local args = f.args_default;
pframe = frame:getParent();
args.contribution = pframe.args.c or -- chapter or contribution
pframe.args.chapter or
pframe.args.contribution or '';
args.first = pframe.args.first or pframe.args.first1 or ''; -- (optional) first author's given name; given names for other authors not supported
args.In = pframe.args['in'] or -- source; 'in' is a Lua reserved keyword
'<span style="font-size:100%" class="error">required source is missing</span>'; -- error message if source not provided
args.postscript = pframe.args.ps or pframe.args.postscript or ".";
if 'none' == args.postscript:lower() then -- if |ps=none or |postscript=none then
args.postscript = ''; -- no postscript
end
args.url = pframe.args.url; -- url for chapter or contribution
args.P1 = trim (pframe.args[1]); -- the positional parameters mimic {{harv}} template usage
args.P2 = trim (pframe.args[2]);
args.P3 = trim (pframe.args[3]);
args.P4 = trim (pframe.args[4]);
args.P5 = trim (pframe.args[5]);
if args.contribution == '' then
args.contribution = '<span style="font-size:100%" class="error">required contribution is missing</span>'; -- error message if source not provided
args.url=''; -- if no contribution set url to empty string so we don't link the error message
end
return core (args);
end
--[[
function f.sfn( frame )
local args = f.args_default;
pframe = frame:getParent();
args.postscript = pframe.args.postscript or pframe.args.ps or ".";
args.page = pframe.args.p or pframe.args.page or "";
args.pages = pframe.args.pp or pframe.args.pages or "";
args.location = pframe.args.loc or "";
args.ref = pframe.args.ref or pframe.args.Ref or "";
args.P1 = trim( pframe.args[1] ) or "";
args.P2 = trim( pframe.args[2] ) or "";
args.P3 = trim( pframe.args[3] ) or "";
args.P4 = trim( pframe.args[4] ) or "";
args.P5 = trim( pframe.args[5] ) or "";
local result = core( args );
local name = "FOOTNOTE" .. args.P1 .. args.P2 ..
args.P3 .. args.P4 .. args.P5 .. args.page .. args.pages .. args.location;
result = frame:extensionTag{ name = "ref", args = {name=name}, content=result };
return result;
end
]]
return f;
nsu6mpdgg4dielwcj7sl5zuym2b61bd
801846
801845
2014-11-06T18:22:59Z
en>Trappist the monk
0
801846
Scribunto
text/plain
f = {
args_default = {
contribution = '',
first = '',
In = '',
P1 = '',
P2 = '',
P3 = '',
P4 = '',
P5 = '',
url = '',
}
};
--[[--------------------------< T R I M >----------------------------------------------------------------------
strip leading and trailing white space from positional parameters.
]]
function trim( str )
if str == nil then
return '';
end
return str:match( "^%s*(.-)%s*$");
end
--[[--------------------------< C O R E >----------------------------------------------------------------------
Assembles the various parts provided by the template into a properly formatted bridging citation. Adds punctuation
and text; encloses the whole within a span with id and class attributes.
This function mimics the {{sfn}} and {{harv}} templates, but it does not display an author-date list, just an
author list. It is presumed that the dates of contributions are the same as the date of the enclosing work.
Even though not displayed, a date positional parameter is still required for the CITEREF anchor
]]
function core( args )
local result;
-- form the CITEREF anchor
result = '<span id="CITEREF' .. table.concat ({args.P1, args.P2, args.P3, args.P4, args.P5}) .. '" class="citation">'
-- form the author list; like {{sfn}} and {{harv}}, 1 to 4 names and a date; same construct as sfn and harv
if args.first ~= '' then
args.first = ', ' .. args.first;
end
if args.P5 ~= "" then
result = result .. args.P1 .. args.first .. ' et al.';
elseif args.P4 ~= "" then
result = result .. args.P1 .. args.first .. ', ' .. args.P2 .. ' & ' .. args.P3;
elseif args.P3 ~= "" then
result = result .. args.P1 .. args.first .. ' & ' .. args.P2;
else
result = result .. args.P1 .. args.first;
end
--add the contribution and close the span
if args.url ~= '' then
args.contribution = '[' .. args.url .. ' ' .. args.contribution .. ']'; -- format external link
end
result = result .. ', "' .. args.contribution .. '", in ' .. args.In .. args.postscript .. '</span>';
return result;
end
--[[--------------------------< F . H A R V C >----------------------------------------------------------------
Entry point from {{harvc}} template. Fetches parent frame parameters, does a bit of simple error checking
]]
function f.harvc (frame)
local args = f.args_default;
pframe = frame:getParent();
args.contribution = pframe.args.c or -- chapter or contribution
pframe.args.chapter or
pframe.args.contribution or '';
args.first = pframe.args.first or pframe.args.first1 or ''; -- (optional) first author's given name; given names for other authors not supported
args.In = pframe.args['in'] or -- source; 'in' is a Lua reserved keyword
'<span style="font-size:100%" class="error">required source is missing</span>'; -- error message if source not provided
args.postscript = pframe.args.ps or pframe.args.postscript or ".";
if 'none' == args.postscript:lower() then -- if |ps=none or |postscript=none then
args.postscript = ''; -- no postscript
end
args.url = pframe.args.url; -- url for chapter or contribution
args.P1 = trim (pframe.args[1]); -- the positional parameters mimic {{harv}} template usage
args.P2 = trim (pframe.args[2]);
args.P3 = trim (pframe.args[3]);
args.P4 = trim (pframe.args[4]);
args.P5 = trim (pframe.args[5]);
if args.contribution == '' then
args.contribution = '<span style="font-size:100%" class="error">required contribution is missing</span>'; -- error message if source not provided
args.url=''; -- if no contribution set url to empty string so we don't link the error message
end
return core (args);
end
--[[
function f.sfn( frame )
local args = f.args_default;
pframe = frame:getParent();
args.postscript = pframe.args.postscript or pframe.args.ps or ".";
args.page = pframe.args.p or pframe.args.page or "";
args.pages = pframe.args.pp or pframe.args.pages or "";
args.location = pframe.args.loc or "";
args.ref = pframe.args.ref or pframe.args.Ref or "";
args.P1 = trim( pframe.args[1] ) or "";
args.P2 = trim( pframe.args[2] ) or "";
args.P3 = trim( pframe.args[3] ) or "";
args.P4 = trim( pframe.args[4] ) or "";
args.P5 = trim( pframe.args[5] ) or "";
local result = core( args );
local name = "FOOTNOTE" .. args.P1 .. args.P2 ..
args.P3 .. args.P4 .. args.P5 .. args.page .. args.pages .. args.location;
result = frame:extensionTag{ name = "ref", args = {name=name}, content=result };
return result;
end
]]
return f;
r7s9du410gejgsxpvjomnsgrcb3up6d
801847
801846
2014-11-06T18:28:58Z
en>Trappist the monk
0
801847
Scribunto
text/plain
f = {
args_default = {
contribution = '',
first = '',
In = '',
P1 = '',
P2 = '',
P3 = '',
P4 = '',
P5 = '',
url = '',
}
};
--[[--------------------------< T R I M >----------------------------------------------------------------------
strip leading and trailing white space from positional parameters.
]]
function trim( str )
if str == nil then
return '';
end
return str:match( "^%s*(.-)%s*$");
end
--[[--------------------------< C O R E >----------------------------------------------------------------------
Assembles the various parts provided by the template into a properly formatted bridging citation. Adds punctuation
and text; encloses the whole within a span with id and class attributes.
This function mimics the {{sfn}} and {{harv}} templates, but it does not display an author-date list, just an
author list. It is presumed that the dates of contributions are the same as the date of the enclosing work.
Even though not displayed, a date positional parameter is still required for the CITEREF anchor
]]
function core( args )
local result;
-- form the CITEREF anchor
result = '<span id="CITEREF' .. table.concat ({args.P1, args.P2, args.P3, args.P4, args.P5}) .. '" class="citation">'
-- form the author list; like {{sfn}} and {{harv}}, 1 to 4 names and a date; same construct as sfn and harv
if args.first ~= '' then
args.first = ', ' .. args.first;
end
if args.P5 ~= "" then
result = result .. args.P1 .. args.first .. ' et al.';
elseif args.P4 ~= "" then
result = result .. args.P1 .. args.first .. ', ' .. args.P2 .. ' & ' .. args.P3;
elseif args.P3 ~= "" then
result = result .. args.P1 .. args.first .. ' & ' .. args.P2;
else
result = result .. args.P1 .. args.first;
end
--add the contribution and close the span
if args.url ~= '' then
args.contribution = '[' .. args.url .. ' ' .. args.contribution .. ']'; -- format external link
end
result = result .. ', "' .. args.contribution .. '", in ' .. args.In .. args.postscript .. '</span>';
return result;
end
--[[--------------------------< F . H A R V C >----------------------------------------------------------------
Entry point from {{harvc}} template. Fetches parent frame parameters, does a bit of simple error checking
]]
function f.harvc (frame)
local args = f.args_default;
pframe = frame:getParent();
args.contribution = pframe.args.c or -- chapter or contribution
pframe.args.chapter or
pframe.args.contribution or '';
args.first = pframe.args.first or pframe.args.first1 or ''; -- (optional) first author's given name; given names for other authors not supported
args.In = pframe.args['in'] or -- source; 'in' is a Lua reserved keyword
'<span style="font-size:100%" class="error">required source is missing</span>'; -- error message if source not provided
args.postscript = pframe.args.ps or pframe.args.postscript or ".";
if 'none' == args.postscript:lower() then -- if |ps=none or |postscript=none then
args.postscript = ''; -- no postscript
else
args.postscript = '.'; -- default postscript
end
args.url = pframe.args.url; -- url for chapter or contribution
args.P1 = trim (pframe.args[1]); -- the positional parameters mimic {{harv}} template usage
args.P2 = trim (pframe.args[2]);
args.P3 = trim (pframe.args[3]);
args.P4 = trim (pframe.args[4]);
args.P5 = trim (pframe.args[5]);
if args.contribution == '' then
args.contribution = '<span style="font-size:100%" class="error">required contribution is missing</span>'; -- error message if source not provided
args.url=''; -- if no contribution set url to empty string so we don't link the error message
end
return core (args);
end
--[[
function f.sfn( frame )
local args = f.args_default;
pframe = frame:getParent();
args.postscript = pframe.args.postscript or pframe.args.ps or ".";
args.page = pframe.args.p or pframe.args.page or "";
args.pages = pframe.args.pp or pframe.args.pages or "";
args.location = pframe.args.loc or "";
args.ref = pframe.args.ref or pframe.args.Ref or "";
args.P1 = trim( pframe.args[1] ) or "";
args.P2 = trim( pframe.args[2] ) or "";
args.P3 = trim( pframe.args[3] ) or "";
args.P4 = trim( pframe.args[4] ) or "";
args.P5 = trim( pframe.args[5] ) or "";
local result = core( args );
local name = "FOOTNOTE" .. args.P1 .. args.P2 ..
args.P3 .. args.P4 .. args.P5 .. args.page .. args.pages .. args.location;
result = frame:extensionTag{ name = "ref", args = {name=name}, content=result };
return result;
end
]]
return f;
7q37hle641ljl8ryztgbgbbfwthvuql
801848
801847
2014-11-06T18:36:25Z
en>Trappist the monk
0
801848
Scribunto
text/plain
f = {
args_default = {
contribution = '',
first = '',
In = '',
P1 = '',
P2 = '',
P3 = '',
P4 = '',
P5 = '',
url = '',
}
};
--[[--------------------------< T R I M >----------------------------------------------------------------------
strip leading and trailing white space from positional parameters.
]]
function trim( str )
if str == nil then
return '';
end
return str:match( "^%s*(.-)%s*$");
end
--[[--------------------------< C O R E >----------------------------------------------------------------------
Assembles the various parts provided by the template into a properly formatted bridging citation. Adds punctuation
and text; encloses the whole within a span with id and class attributes.
This function mimics the {{sfn}} and {{harv}} templates, but it does not display an author-date list, just an
author list. It is presumed that the dates of contributions are the same as the date of the enclosing work.
Even though not displayed, a date positional parameter is still required for the CITEREF anchor
]]
function core( args )
local result;
-- form the CITEREF anchor
result = '<span id="CITEREF' .. table.concat ({args.P1, args.P2, args.P3, args.P4, args.P5}) .. '" class="citation">'
-- form the author list; like {{sfn}} and {{harv}}, 1 to 4 names and a date; same construct as sfn and harv
if args.first ~= '' then
args.first = ', ' .. args.first;
end
if args.P5 ~= "" then
result = result .. args.P1 .. args.first .. ' et al.';
elseif args.P4 ~= "" then
result = result .. args.P1 .. args.first .. ', ' .. args.P2 .. ' & ' .. args.P3;
elseif args.P3 ~= "" then
result = result .. args.P1 .. args.first .. ' & ' .. args.P2;
else
result = result .. args.P1 .. args.first;
end
--add the contribution and close the span
if args.url ~= '' then
args.contribution = '[' .. args.url .. ' ' .. args.contribution .. ']'; -- format external link
end
result = result .. ', "' .. args.contribution .. '", in ' .. args.In .. args.postscript .. '</span>';
return result;
end
--[[--------------------------< F . H A R V C >----------------------------------------------------------------
Entry point from {{harvc}} template. Fetches parent frame parameters, does a bit of simple error checking
]]
function f.harvc (frame)
local args = f.args_default;
pframe = frame:getParent();
args.contribution = pframe.args.c or -- chapter or contribution
pframe.args.chapter or
pframe.args.contribution or '';
args.first = pframe.args.first or pframe.args.first1 or ''; -- (optional) first author's given name; given names for other authors not supported
args.In = pframe.args['in'] or -- source; 'in' is a Lua reserved keyword
'<span style="font-size:100%" class="error">required source is missing</span>'; -- error message if source not provided
args.postscript = pframe.args.ps or pframe.args.postscript;
if args.postscript then
if 'none' == args.postscript:lower() then -- if |ps=none or |postscript=none then
args.postscript = ''; -- no postscript
end
else
args.postscript = '.'; -- default postscript
end
args.url = pframe.args.url; -- url for chapter or contribution
args.P1 = trim (pframe.args[1]); -- the positional parameters mimic {{harv}} template usage
args.P2 = trim (pframe.args[2]);
args.P3 = trim (pframe.args[3]);
args.P4 = trim (pframe.args[4]);
args.P5 = trim (pframe.args[5]);
if args.contribution == '' then
args.contribution = '<span style="font-size:100%" class="error">required contribution is missing</span>'; -- error message if source not provided
args.url=''; -- if no contribution set url to empty string so we don't link the error message
end
return core (args);
end
--[[
function f.sfn( frame )
local args = f.args_default;
pframe = frame:getParent();
args.postscript = pframe.args.postscript or pframe.args.ps or ".";
args.page = pframe.args.p or pframe.args.page or "";
args.pages = pframe.args.pp or pframe.args.pages or "";
args.location = pframe.args.loc or "";
args.ref = pframe.args.ref or pframe.args.Ref or "";
args.P1 = trim( pframe.args[1] ) or "";
args.P2 = trim( pframe.args[2] ) or "";
args.P3 = trim( pframe.args[3] ) or "";
args.P4 = trim( pframe.args[4] ) or "";
args.P5 = trim( pframe.args[5] ) or "";
local result = core( args );
local name = "FOOTNOTE" .. args.P1 .. args.P2 ..
args.P3 .. args.P4 .. args.P5 .. args.page .. args.pages .. args.location;
result = frame:extensionTag{ name = "ref", args = {name=name}, content=result };
return result;
end
]]
return f;
gsu553hrle5jvprielzywfoieiuin19
801849
801848
2014-11-06T18:38:48Z
en>Trappist the monk
0
801849
Scribunto
text/plain
f = {
args_default = {
contribution = '',
first = '',
In = '',
P1 = '',
P2 = '',
P3 = '',
P4 = '',
P5 = '',
url = '',
}
};
--[[--------------------------< T R I M >----------------------------------------------------------------------
strip leading and trailing white space from positional parameters.
]]
function trim( str )
if str == nil then
return '';
end
return str:match( "^%s*(.-)%s*$");
end
--[[--------------------------< C O R E >----------------------------------------------------------------------
Assembles the various parts provided by the template into a properly formatted bridging citation. Adds punctuation
and text; encloses the whole within a span with id and class attributes.
This function mimics the {{sfn}} and {{harv}} templates, but it does not display an author-date list, just an
author list. It is presumed that the dates of contributions are the same as the date of the enclosing work.
Even though not displayed, a date positional parameter is still required for the CITEREF anchor
]]
function core( args )
local result;
-- form the CITEREF anchor
result = '<span id="CITEREF' .. table.concat ({args.P1, args.P2, args.P3, args.P4, args.P5}) .. '" class="citation">'
-- form the author list; like {{sfn}} and {{harv}}, 1 to 4 names and a date; same construct as sfn and harv
if args.first ~= '' then
args.first = ', ' .. args.first;
end
if args.P5 ~= "" then
result = result .. args.P1 .. args.first .. ' et al.';
elseif args.P4 ~= "" then
result = result .. args.P1 .. args.first .. ', ' .. args.P2 .. ' & ' .. args.P3;
elseif args.P3 ~= "" then
result = result .. args.P1 .. args.first .. ' & ' .. args.P2;
else
result = result .. args.P1 .. args.first;
end
--add the contribution and close the span
if args.url ~= '' then
args.contribution = '[' .. args.url .. ' ' .. args.contribution .. ']'; -- format external link
end
result = result .. ', "' .. args.contribution .. '", in ' .. args.In .. args.postscript .. '</span>';
return result;
end
--[[--------------------------< F . H A R V C >----------------------------------------------------------------
Entry point from {{harvc}} template. Fetches parent frame parameters, does a bit of simple error checking
]]
function f.harvc (frame)
local args = f.args_default;
pframe = frame:getParent();
args.contribution = pframe.args.c or -- chapter or contribution
pframe.args.chapter or
pframe.args.contribution or '';
args.first = pframe.args.first or pframe.args.first1 or ''; -- (optional) first author's given name; given names for other authors not supported
args.In = pframe.args['in'] or -- source; 'in' is a Lua reserved keyword
'<span style="font-size:100%" class="error">required source is missing</span>'; -- error message if source not provided
args.postscript = pframe.args.ps or pframe.args.postscript;
if '' == args.postscript then
if 'none' == args.postscript:lower() then -- if |ps=none or |postscript=none then
args.postscript = ''; -- no postscript
end
else
args.postscript = '.'; -- default postscript
end
args.url = pframe.args.url; -- url for chapter or contribution
args.P1 = trim (pframe.args[1]); -- the positional parameters mimic {{harv}} template usage
args.P2 = trim (pframe.args[2]);
args.P3 = trim (pframe.args[3]);
args.P4 = trim (pframe.args[4]);
args.P5 = trim (pframe.args[5]);
if args.contribution == '' then
args.contribution = '<span style="font-size:100%" class="error">required contribution is missing</span>'; -- error message if source not provided
args.url=''; -- if no contribution set url to empty string so we don't link the error message
end
return core (args);
end
--[[
function f.sfn( frame )
local args = f.args_default;
pframe = frame:getParent();
args.postscript = pframe.args.postscript or pframe.args.ps or ".";
args.page = pframe.args.p or pframe.args.page or "";
args.pages = pframe.args.pp or pframe.args.pages or "";
args.location = pframe.args.loc or "";
args.ref = pframe.args.ref or pframe.args.Ref or "";
args.P1 = trim( pframe.args[1] ) or "";
args.P2 = trim( pframe.args[2] ) or "";
args.P3 = trim( pframe.args[3] ) or "";
args.P4 = trim( pframe.args[4] ) or "";
args.P5 = trim( pframe.args[5] ) or "";
local result = core( args );
local name = "FOOTNOTE" .. args.P1 .. args.P2 ..
args.P3 .. args.P4 .. args.P5 .. args.page .. args.pages .. args.location;
result = frame:extensionTag{ name = "ref", args = {name=name}, content=result };
return result;
end
]]
return f;
pizp63srtzopiv4kzuvrqzw7ocywueh
801850
801849
2014-11-06T18:39:46Z
en>Trappist the monk
0
801850
Scribunto
text/plain
f = {
args_default = {
contribution = '',
first = '',
In = '',
P1 = '',
P2 = '',
P3 = '',
P4 = '',
P5 = '',
url = '',
}
};
--[[--------------------------< T R I M >----------------------------------------------------------------------
strip leading and trailing white space from positional parameters.
]]
function trim( str )
if str == nil then
return '';
end
return str:match( "^%s*(.-)%s*$");
end
--[[--------------------------< C O R E >----------------------------------------------------------------------
Assembles the various parts provided by the template into a properly formatted bridging citation. Adds punctuation
and text; encloses the whole within a span with id and class attributes.
This function mimics the {{sfn}} and {{harv}} templates, but it does not display an author-date list, just an
author list. It is presumed that the dates of contributions are the same as the date of the enclosing work.
Even though not displayed, a date positional parameter is still required for the CITEREF anchor
]]
function core( args )
local result;
-- form the CITEREF anchor
result = '<span id="CITEREF' .. table.concat ({args.P1, args.P2, args.P3, args.P4, args.P5}) .. '" class="citation">'
-- form the author list; like {{sfn}} and {{harv}}, 1 to 4 names and a date; same construct as sfn and harv
if args.first ~= '' then
args.first = ', ' .. args.first;
end
if args.P5 ~= "" then
result = result .. args.P1 .. args.first .. ' et al.';
elseif args.P4 ~= "" then
result = result .. args.P1 .. args.first .. ', ' .. args.P2 .. ' & ' .. args.P3;
elseif args.P3 ~= "" then
result = result .. args.P1 .. args.first .. ' & ' .. args.P2;
else
result = result .. args.P1 .. args.first;
end
--add the contribution and close the span
if args.url ~= '' then
args.contribution = '[' .. args.url .. ' ' .. args.contribution .. ']'; -- format external link
end
result = result .. ', "' .. args.contribution .. '", in ' .. args.In .. args.postscript .. '</span>';
return result;
end
--[[--------------------------< F . H A R V C >----------------------------------------------------------------
Entry point from {{harvc}} template. Fetches parent frame parameters, does a bit of simple error checking
]]
function f.harvc (frame)
local args = f.args_default;
pframe = frame:getParent();
args.contribution = pframe.args.c or -- chapter or contribution
pframe.args.chapter or
pframe.args.contribution or '';
args.first = pframe.args.first or pframe.args.first1 or ''; -- (optional) first author's given name; given names for other authors not supported
args.In = pframe.args['in'] or -- source; 'in' is a Lua reserved keyword
'<span style="font-size:100%" class="error">required source is missing</span>'; -- error message if source not provided
args.postscript = pframe.args.ps or pframe.args.postscript;
if '' ~= args.postscript then
if 'none' == args.postscript:lower() then -- if |ps=none or |postscript=none then
args.postscript = ''; -- no postscript
end
else
args.postscript = '.'; -- default postscript
end
args.url = pframe.args.url; -- url for chapter or contribution
args.P1 = trim (pframe.args[1]); -- the positional parameters mimic {{harv}} template usage
args.P2 = trim (pframe.args[2]);
args.P3 = trim (pframe.args[3]);
args.P4 = trim (pframe.args[4]);
args.P5 = trim (pframe.args[5]);
if args.contribution == '' then
args.contribution = '<span style="font-size:100%" class="error">required contribution is missing</span>'; -- error message if source not provided
args.url=''; -- if no contribution set url to empty string so we don't link the error message
end
return core (args);
end
--[[
function f.sfn( frame )
local args = f.args_default;
pframe = frame:getParent();
args.postscript = pframe.args.postscript or pframe.args.ps or ".";
args.page = pframe.args.p or pframe.args.page or "";
args.pages = pframe.args.pp or pframe.args.pages or "";
args.location = pframe.args.loc or "";
args.ref = pframe.args.ref or pframe.args.Ref or "";
args.P1 = trim( pframe.args[1] ) or "";
args.P2 = trim( pframe.args[2] ) or "";
args.P3 = trim( pframe.args[3] ) or "";
args.P4 = trim( pframe.args[4] ) or "";
args.P5 = trim( pframe.args[5] ) or "";
local result = core( args );
local name = "FOOTNOTE" .. args.P1 .. args.P2 ..
args.P3 .. args.P4 .. args.P5 .. args.page .. args.pages .. args.location;
result = frame:extensionTag{ name = "ref", args = {name=name}, content=result };
return result;
end
]]
return f;
4on3d3bnr42pney8frs6k9jhi63aasz
801851
801850
2014-11-06T18:43:56Z
en>Trappist the monk
0
801851
Scribunto
text/plain
f = {
args_default = {
contribution = '',
first = '',
In = '',
P1 = '',
P2 = '',
P3 = '',
P4 = '',
P5 = '',
url = '',
}
};
--[[--------------------------< T R I M >----------------------------------------------------------------------
strip leading and trailing white space from positional parameters.
]]
function trim( str )
if str == nil then
return '';
end
return str:match( "^%s*(.-)%s*$");
end
--[[--------------------------< C O R E >----------------------------------------------------------------------
Assembles the various parts provided by the template into a properly formatted bridging citation. Adds punctuation
and text; encloses the whole within a span with id and class attributes.
This function mimics the {{sfn}} and {{harv}} templates, but it does not display an author-date list, just an
author list. It is presumed that the dates of contributions are the same as the date of the enclosing work.
Even though not displayed, a date positional parameter is still required for the CITEREF anchor
]]
function core( args )
local result;
-- form the CITEREF anchor
result = '<span id="CITEREF' .. table.concat ({args.P1, args.P2, args.P3, args.P4, args.P5}) .. '" class="citation">'
-- form the author list; like {{sfn}} and {{harv}}, 1 to 4 names and a date; same construct as sfn and harv
if args.first ~= '' then
args.first = ', ' .. args.first;
end
if args.P5 ~= "" then
result = result .. args.P1 .. args.first .. ' et al.';
elseif args.P4 ~= "" then
result = result .. args.P1 .. args.first .. ', ' .. args.P2 .. ' & ' .. args.P3;
elseif args.P3 ~= "" then
result = result .. args.P1 .. args.first .. ' & ' .. args.P2;
else
result = result .. args.P1 .. args.first;
end
--add the contribution and close the span
if args.url ~= '' then
args.contribution = '[' .. args.url .. ' ' .. args.contribution .. ']'; -- format external link
end
result = result .. ', "' .. args.contribution .. '", in ' .. args.In .. args.postscript .. '</span>';
return result;
end
--[[--------------------------< F . H A R V C >----------------------------------------------------------------
Entry point from {{harvc}} template. Fetches parent frame parameters, does a bit of simple error checking
]]
function f.harvc (frame)
local args = f.args_default;
pframe = frame:getParent();
args.contribution = pframe.args.c or -- chapter or contribution
pframe.args.chapter or
pframe.args.contribution or '';
args.first = pframe.args.first or pframe.args.first1 or ''; -- (optional) first author's given name; given names for other authors not supported
args.In = pframe.args['in'] or -- source; 'in' is a Lua reserved keyword
'<span style="font-size:100%" class="error">required source is missing</span>'; -- error message if source not provided
args.postscript = pframe.args.ps or pframe.args.postscript or '';
if '' ~= args.postscript then
if 'none' == args.postscript:lower() then -- if |ps=none or |postscript=none then
args.postscript = ''; -- no postscript
end
else -- if |postscript= omitted or present but empty
args.postscript = '.'; -- use default postscript
end
args.url = pframe.args.url; -- url for chapter or contribution
args.P1 = trim (pframe.args[1]); -- the positional parameters mimic {{harv}} template usage
args.P2 = trim (pframe.args[2]);
args.P3 = trim (pframe.args[3]);
args.P4 = trim (pframe.args[4]);
args.P5 = trim (pframe.args[5]);
if args.contribution == '' then
args.contribution = '<span style="font-size:100%" class="error">required contribution is missing</span>'; -- error message if source not provided
args.url=''; -- if no contribution set url to empty string so we don't link the error message
end
return core (args);
end
--[[
function f.sfn( frame )
local args = f.args_default;
pframe = frame:getParent();
args.postscript = pframe.args.postscript or pframe.args.ps or ".";
args.page = pframe.args.p or pframe.args.page or "";
args.pages = pframe.args.pp or pframe.args.pages or "";
args.location = pframe.args.loc or "";
args.ref = pframe.args.ref or pframe.args.Ref or "";
args.P1 = trim( pframe.args[1] ) or "";
args.P2 = trim( pframe.args[2] ) or "";
args.P3 = trim( pframe.args[3] ) or "";
args.P4 = trim( pframe.args[4] ) or "";
args.P5 = trim( pframe.args[5] ) or "";
local result = core( args );
local name = "FOOTNOTE" .. args.P1 .. args.P2 ..
args.P3 .. args.P4 .. args.P5 .. args.page .. args.pages .. args.location;
result = frame:extensionTag{ name = "ref", args = {name=name}, content=result };
return result;
end
]]
return f;
hxw9zyf6et3hwqjfhtyenkrhdbhjhro
801852
801851
2014-11-07T00:42:03Z
en>Trappist the monk
0
801852
Scribunto
text/plain
f = {
args_default = {
contribution = '',
first = '',
In = '',
P1 = '',
P2 = '',
P3 = '',
P4 = '',
P5 = '',
url = '',
}
};
--[[--------------------------< T R I M >----------------------------------------------------------------------
strip leading and trailing white space from positional parameters.
]]
function trim( str )
if str == nil then
return '';
end
return str:match( "^%s*(.-)%s*$");
end
--[[--------------------------< C O R E >----------------------------------------------------------------------
Assembles the various parts provided by the template into a properly formatted bridging citation. Adds punctuation
and text; encloses the whole within a span with id and class attributes.
This function mimics the {{sfn}} and {{harv}} templates, but it does not display an author-date list, just an
author list. It is presumed that the dates of contributions are the same as the date of the enclosing work.
Even though not displayed, a date positional parameter is still required for the CITEREF anchor
]]
function core( args )
local result;
-- form the CITEREF anchor
result = '<span id="CITEREF' .. table.concat ({args.P1, args.P2, args.P3, args.P4, args.P5}) .. '" class="citation">'
-- form the author list; like {{sfn}} and {{harv}}, 1 to 4 names and a date; same construct as sfn and harv
if args.first ~= '' then
args.first = ', ' .. args.first;
end
if args.P5 ~= "" then
result = result .. args.P1 .. args.first .. ' et al.';
elseif args.P4 ~= "" then
result = result .. args.P1 .. args.first .. ', ' .. args.P2 .. ' & ' .. args.P3;
elseif args.P3 ~= "" then
result = result .. args.P1 .. args.first .. ' & ' .. args.P2;
else
result = result .. args.P1 .. args.first;
end
--add the contribution and close the span
if args.url ~= '' then
args.contribution = '[' .. args.url .. ' ' .. args.contribution .. ']'; -- format external link
end
result = result .. ', "' .. args.contribution .. '", in ' .. args.In .. args.postscript .. '</span>';
return result;
end
--[[--------------------------< F . H A R V C >----------------------------------------------------------------
Entry point from {{harvc}} template. Fetches parent frame parameters, does a bit of simple error checking
]]
function f.harvc (frame)
local args = f.args_default;
pframe = frame:getParent();
args.contribution = pframe.args.c or -- chapter or contribution
pframe.args.chapter or
pframe.args.contribution or '';
args.first = pframe.args.first or pframe.args.first1 or ''; -- (optional) first author's given name; given names for other authors not supported
args.In = pframe.args['in'] or -- source; 'in' is a Lua reserved keyword
'<span style="font-size:100%" class="error">required source is missing</span>'; -- error message if source not provided
args.postscript = pframe.args.ps or pframe.args.postscript or '';
if '' ~= args.postscript then
if 'none' == args.postscript:lower() then -- if |ps=none or |postscript=none then
args.postscript = ''; -- no postscript
end
else -- if |postscript= omitted or present but empty
args.postscript = '.'; -- use default postscript
end
args.url = pframe.args.url or ''; -- url for chapter or contribution
args.P1 = trim (pframe.args[1]); -- the positional parameters mimic {{harv}} template usage
args.P2 = trim (pframe.args[2]);
args.P3 = trim (pframe.args[3]);
args.P4 = trim (pframe.args[4]);
args.P5 = trim (pframe.args[5]);
if args.contribution == '' then
args.contribution = '<span style="font-size:100%" class="error">required contribution is missing</span>'; -- error message if source not provided
args.url=''; -- if no contribution set url to empty string so we don't link the error message
end
return core (args);
end
--[[
function f.sfn( frame )
local args = f.args_default;
pframe = frame:getParent();
args.postscript = pframe.args.postscript or pframe.args.ps or ".";
args.page = pframe.args.p or pframe.args.page or "";
args.pages = pframe.args.pp or pframe.args.pages or "";
args.location = pframe.args.loc or "";
args.ref = pframe.args.ref or pframe.args.Ref or "";
args.P1 = trim( pframe.args[1] ) or "";
args.P2 = trim( pframe.args[2] ) or "";
args.P3 = trim( pframe.args[3] ) or "";
args.P4 = trim( pframe.args[4] ) or "";
args.P5 = trim( pframe.args[5] ) or "";
local result = core( args );
local name = "FOOTNOTE" .. args.P1 .. args.P2 ..
args.P3 .. args.P4 .. args.P5 .. args.page .. args.pages .. args.location;
result = frame:extensionTag{ name = "ref", args = {name=name}, content=result };
return result;
end
]]
return f;
1a2m67z4npilwktpl06sgfgyh6ausaz
801853
801852
2014-11-07T11:31:29Z
en>Trappist the monk
0
No more positional parameters; use last1-last4; add separator
801853
Scribunto
text/plain
f = {
args_default = {
contribution = '',
separator = '.';
first = '',
In = '',
P1 = '',
P2 = '',
P3 = '',
P4 = '',
P5 = '',
url = '',
}
};
--[[--------------------------< T R I M >----------------------------------------------------------------------
strip leading and trailing white space from positional parameters.
]]
function trim( str )
if str == nil then
return '';
end
return str:match( "^%s*(.-)%s*$");
end
--[[--------------------------< C O R E >----------------------------------------------------------------------
Assembles the various parts provided by the template into a properly formatted bridging citation. Adds punctuation
and text; encloses the whole within a span with id and class attributes.
This function mimics the {{sfn}} and {{harv}} templates, but it does not display an author-date list, just an
author list. It is presumed that the dates of contributions are the same as the date of the enclosing work.
Even though not displayed, a date positional parameter is still required for the CITEREF anchor
]]
function core( args )
local result;
-- form the CITEREF anchor
result = '<span id="CITEREF' .. table.concat ({args.last1, args.last2, args.last3, args.last4, args.year}) .. '" class="citation">'
-- form the author list; like {{sfn}} and {{harv}}, 1 to 4 names and a date; same construct as sfn and harv
if args.first ~= '' then
args.first = ', ' .. args.first;
end
if args.last4 ~= "" and args.last3 ~= "" and args.last2 ~= "" and args.last1 ~= "" then
result = result .. args.P1 .. args.first .. ' et al.';
elseif args.last3 ~= "" and args.last2 ~= "" and args.last1 ~= "" then
result = result .. args.P1 .. args.first .. ', ' .. args.P2 .. ' & ' .. args.P3;
elseif args.last2 ~= "" and args.last1 ~= "" then
result = result .. args.P1 .. args.first .. ' & ' .. args.P2;
elseif args.last1 ~= "" then
result = result .. args.P1 .. args.first;
else
result = result .. '<span style="font-size:100%" class="error">author missing from author list</span>'
end
if args.separator ~= result:sub(-1) then
result = result .. args.separator; -- add separator if not same as last character in name list
end
--add the contribution and close the span
if args.url ~= '' then
args.contribution = '[' .. args.url .. ' ' .. args.contribution .. ']'; -- format external link
end
result = result .. ', "' .. args.contribution .. '", in ' .. args.In .. args.postscript .. '</span>';
-- if '' == args.year then
-- result = result .. '<span style="font-size:100%" class="error">missing year</span>)' .. args.separator;
-- else
-- result = result .. args.year .. ')' .. args.separator;
-- end
return result;
end
--[[--------------------------< F . H A R V C >----------------------------------------------------------------
Entry point from {{harvc}} template. Fetches parent frame parameters, does a bit of simple error checking
]]
function f.harvc (frame)
local args = f.args_default;
pframe = frame:getParent();
args.contribution = pframe.args.c or -- chapter or contribution
pframe.args.chapter or
pframe.args.contribution or '';
args.first = pframe.args.first or pframe.args.first1 or ''; -- (optional) first author's given name; given names for other authors not supported
args.In = pframe.args['in'] or -- source; 'in' is a Lua reserved keyword
'<span style="font-size:100%" class="error">required source is missing</span>'; -- error message if source not provided
args.last1 = pframe.args.last or pframe.args.last1 or ''; -- contribution author(s)
args.last2 = pframe.args.last2 or '';
args.last3 = pframe.args.last3 or '';
args.last4 = pframe.args.last4 or '';
args.postscript = pframe.args.ps or pframe.args.postscript or '';
if '' ~= args.postscript then
if 'none' == args.postscript:lower() then -- if |ps=none or |postscript=none then
args.postscript = ''; -- no postscript
end
else -- if |postscript= omitted or present but empty
args.postscript = '.'; -- use default postscript
end
args.separaotr = pframe.args.separator or '.'; -- element separator defaults to full stop
args.url = pframe.args.url or ''; -- url for chapter or contribution
args.year = pframe.args.year or '';
-- args.P1 = trim (pframe.args[1]); -- the positional parameters mimic {{harv}} template usage
-- args.P2 = trim (pframe.args[2]);
-- args.P3 = trim (pframe.args[3]);
-- args.P4 = trim (pframe.args[4]);
-- args.P5 = trim (pframe.args[5]);
if args.contribution == '' then
args.contribution = '<span style="font-size:100%" class="error">required contribution is missing</span>'; -- error message if source not provided
args.url=''; -- if no contribution set url to empty string so we don't link the error message
end
return core (args);
end
--[[
function f.sfn( frame )
local args = f.args_default;
pframe = frame:getParent();
args.postscript = pframe.args.postscript or pframe.args.ps or ".";
args.page = pframe.args.p or pframe.args.page or "";
args.pages = pframe.args.pp or pframe.args.pages or "";
args.location = pframe.args.loc or "";
args.ref = pframe.args.ref or pframe.args.Ref or "";
args.P1 = trim( pframe.args[1] ) or "";
args.P2 = trim( pframe.args[2] ) or "";
args.P3 = trim( pframe.args[3] ) or "";
args.P4 = trim( pframe.args[4] ) or "";
args.P5 = trim( pframe.args[5] ) or "";
local result = core( args );
local name = "FOOTNOTE" .. args.P1 .. args.P2 ..
args.P3 .. args.P4 .. args.P5 .. args.page .. args.pages .. args.location;
result = frame:extensionTag{ name = "ref", args = {name=name}, content=result };
return result;
end
]]
return f;
737jq3dr1u1f2f58nx689gpnxkk4aod
801854
801853
2014-11-07T11:37:50Z
en>Trappist the monk
0
801854
Scribunto
text/plain
f = {
args_default = {
contribution = '',
separator = '.';
first = '',
In = '',
}
};
--[[--------------------------< T R I M >----------------------------------------------------------------------
strip leading and trailing white space from positional parameters.
]]
function trim( str )
if str == nil then
return '';
end
return str:match( "^%s*(.-)%s*$");
end
--[[--------------------------< C O R E >----------------------------------------------------------------------
Assembles the various parts provided by the template into a properly formatted bridging citation. Adds punctuation
and text; encloses the whole within a span with id and class attributes.
This function mimics the {{sfn}} and {{harv}} templates, but it does not display an author-date list, just an
author list. It is presumed that the dates of contributions are the same as the date of the enclosing work.
Even though not displayed, a date positional parameter is still required for the CITEREF anchor
]]
function core( args )
local result;
-- form the CITEREF anchor
result = '<span id="CITEREF' .. table.concat ({args.last1, args.last2, args.last3, args.last4, args.year}) .. '" class="citation">'
-- form the author list; like {{sfn}} and {{harv}}, 1 to 4 names and a date; same construct as sfn and harv
if args.first ~= '' then
args.first = ', ' .. args.first;
end
if args.last4 ~= "" and args.last3 ~= "" and args.last2 ~= "" and args.last1 ~= "" then
result = result .. args.last1 .. args.first .. ' et al.';
elseif args.last3 ~= "" and args.last2 ~= "" and args.last1 ~= "" then
result = result .. args.last1 .. args.first .. ', ' .. args.last2 .. ' & ' .. args.last3;
elseif args.last2 ~= "" and args.last1 ~= "" then
result = result .. args.last1 .. args.first .. ' & ' .. args.last2;
elseif args.last1 ~= "" then
result = result .. args.last1 .. args.first;
else
result = result .. '<span style="font-size:100%" class="error">author missing from author list</span>'
end
if args.separator ~= result:sub(-1) then
result = result .. args.separator; -- add separator if not same as last character in name list
end
--add the contribution and close the span
if args.url ~= '' then
args.contribution = '[' .. args.url .. ' ' .. args.contribution .. ']'; -- format external link
end
result = result .. ', "' .. args.contribution .. '", in ' .. args.In .. args.postscript .. '</span>';
-- if '' == args.year then
-- result = result .. '<span style="font-size:100%" class="error">missing year</span>)' .. args.separator;
-- else
-- result = result .. args.year .. ')' .. args.separator;
-- end
return result;
end
--[[--------------------------< F . H A R V C >----------------------------------------------------------------
Entry point from {{harvc}} template. Fetches parent frame parameters, does a bit of simple error checking
]]
function f.harvc (frame)
local args = f.args_default;
pframe = frame:getParent();
args.contribution = pframe.args.c or -- chapter or contribution
pframe.args.chapter or
pframe.args.contribution or '';
args.first = pframe.args.first or pframe.args.first1 or ''; -- (optional) first author's given name; given names for other authors not supported
args.In = pframe.args['in'] or -- source; 'in' is a Lua reserved keyword
'<span style="font-size:100%" class="error">required source is missing</span>'; -- error message if source not provided
args.last1 = pframe.args.last or pframe.args.last1 or ''; -- contribution author(s)
args.last2 = pframe.args.last2 or '';
args.last3 = pframe.args.last3 or '';
args.last4 = pframe.args.last4 or '';
args.postscript = pframe.args.ps or pframe.args.postscript or '';
if '' ~= args.postscript then
if 'none' == args.postscript:lower() then -- if |ps=none or |postscript=none then
args.postscript = ''; -- no postscript
end
else -- if |postscript= omitted or present but empty
args.postscript = '.'; -- use default postscript
end
args.separaotr = pframe.args.separator or '.'; -- element separator defaults to full stop
args.url = pframe.args.url or ''; -- url for chapter or contribution
args.year = pframe.args.year or '';
-- args.P1 = trim (pframe.args[1]); -- the positional parameters mimic {{harv}} template usage
-- args.P2 = trim (pframe.args[2]);
-- args.P3 = trim (pframe.args[3]);
-- args.P4 = trim (pframe.args[4]);
-- args.P5 = trim (pframe.args[5]);
if '' == args.contribution then
args.contribution = '<span style="font-size:100%" class="error">required contribution is missing</span>'; -- error message if source not provided
args.url=''; -- if no contribution set url to empty string so we don't link the error message
end
if '' == args.year then
args.contribution = '<span style="font-size:100%" class="error">missing year</span>'; -- error message if year not provided
end
return core (args);
end
--[[
function f.sfn( frame )
local args = f.args_default;
pframe = frame:getParent();
args.postscript = pframe.args.postscript or pframe.args.ps or ".";
args.page = pframe.args.p or pframe.args.page or "";
args.pages = pframe.args.pp or pframe.args.pages or "";
args.location = pframe.args.loc or "";
args.ref = pframe.args.ref or pframe.args.Ref or "";
args.P1 = trim( pframe.args[1] ) or "";
args.P2 = trim( pframe.args[2] ) or "";
args.P3 = trim( pframe.args[3] ) or "";
args.P4 = trim( pframe.args[4] ) or "";
args.P5 = trim( pframe.args[5] ) or "";
local result = core( args );
local name = "FOOTNOTE" .. args.P1 .. args.P2 ..
args.P3 .. args.P4 .. args.P5 .. args.page .. args.pages .. args.location;
result = frame:extensionTag{ name = "ref", args = {name=name}, content=result };
return result;
end
]]
return f;
p49oly51565opwrdqsprrdmm6m70iqc
801855
801854
2014-11-07T11:40:26Z
en>Trappist the monk
0
801855
Scribunto
text/plain
f = {
-- args_default = {
-- contribution = '',
-- separator = '.';
-- first = '',
-- In = '',
-- }
};
--[[--------------------------< T R I M >----------------------------------------------------------------------
strip leading and trailing white space from positional parameters.
]]
function trim( str )
if str == nil then
return '';
end
return str:match( "^%s*(.-)%s*$");
end
--[[--------------------------< C O R E >----------------------------------------------------------------------
Assembles the various parts provided by the template into a properly formatted bridging citation. Adds punctuation
and text; encloses the whole within a span with id and class attributes.
This function mimics the {{sfn}} and {{harv}} templates, but it does not display an author-date list, just an
author list. It is presumed that the dates of contributions are the same as the date of the enclosing work.
Even though not displayed, a date positional parameter is still required for the CITEREF anchor
]]
function core( args )
local result;
-- form the CITEREF anchor
result = '<span id="CITEREF' .. table.concat ({args.last1, args.last2, args.last3, args.last4, args.year}) .. '" class="citation">'
-- form the author list; like {{sfn}} and {{harv}}, 1 to 4 names and a date; same construct as sfn and harv
if args.first ~= '' then
args.first = ', ' .. args.first;
end
if args.last4 ~= "" and args.last3 ~= "" and args.last2 ~= "" and args.last1 ~= "" then
result = result .. args.last1 .. args.first .. ' et al.';
elseif args.last3 ~= "" and args.last2 ~= "" and args.last1 ~= "" then
result = result .. args.last1 .. args.first .. ', ' .. args.last2 .. ' & ' .. args.last3;
elseif args.last2 ~= "" and args.last1 ~= "" then
result = result .. args.last1 .. args.first .. ' & ' .. args.last2;
elseif args.last1 ~= "" then
result = result .. args.last1 .. args.first;
else
result = result .. '<span style="font-size:100%" class="error">author missing from author list</span>'
end
if args.separator ~= result:sub(-1) then
result = result .. args.separator; -- add separator if not same as last character in name list
end
--add the contribution and close the span
if args.url ~= '' then
args.contribution = '[' .. args.url .. ' ' .. args.contribution .. ']'; -- format external link
end
result = result .. ', "' .. args.contribution .. '", in ' .. args.In .. args.postscript .. '</span>';
-- if '' == args.year then
-- result = result .. '<span style="font-size:100%" class="error">missing year</span>)' .. args.separator;
-- else
-- result = result .. args.year .. ')' .. args.separator;
-- end
return result;
end
--[[--------------------------< F . H A R V C >----------------------------------------------------------------
Entry point from {{harvc}} template. Fetches parent frame parameters, does a bit of simple error checking
]]
function f.harvc (frame)
local args; -- = f.args_default;
pframe = frame:getParent();
args.contribution = pframe.args.c or -- chapter or contribution
pframe.args.chapter or
pframe.args.contribution or '';
args.first = pframe.args.first or pframe.args.first1 or ''; -- (optional) first author's given name; given names for other authors not supported
args.In = pframe.args['in'] or -- source; 'in' is a Lua reserved keyword
'<span style="font-size:100%" class="error">required source is missing</span>'; -- error message if source not provided
args.last1 = pframe.args.last or pframe.args.last1 or ''; -- contribution author(s)
args.last2 = pframe.args.last2 or '';
args.last3 = pframe.args.last3 or '';
args.last4 = pframe.args.last4 or '';
args.postscript = pframe.args.ps or pframe.args.postscript or '';
if '' ~= args.postscript then
if 'none' == args.postscript:lower() then -- if |ps=none or |postscript=none then
args.postscript = ''; -- no postscript
end
else -- if |postscript= omitted or present but empty
args.postscript = '.'; -- use default postscript
end
args.separaotr = pframe.args.separator or '.'; -- element separator defaults to full stop
args.url = pframe.args.url or ''; -- url for chapter or contribution
args.year = pframe.args.year or '';
-- args.P1 = trim (pframe.args[1]); -- the positional parameters mimic {{harv}} template usage
-- args.P2 = trim (pframe.args[2]);
-- args.P3 = trim (pframe.args[3]);
-- args.P4 = trim (pframe.args[4]);
-- args.P5 = trim (pframe.args[5]);
if '' == args.contribution then
args.contribution = '<span style="font-size:100%" class="error">required contribution is missing</span>'; -- error message if source not provided
args.url=''; -- if no contribution set url to empty string so we don't link the error message
end
if '' == args.year then
args.year = '<span style="font-size:100%" class="error">missing year</span>'; -- error message if year not provided
end
return core (args);
end
--[[
function f.sfn( frame )
local args = f.args_default;
pframe = frame:getParent();
args.postscript = pframe.args.postscript or pframe.args.ps or ".";
args.page = pframe.args.p or pframe.args.page or "";
args.pages = pframe.args.pp or pframe.args.pages or "";
args.location = pframe.args.loc or "";
args.ref = pframe.args.ref or pframe.args.Ref or "";
args.P1 = trim( pframe.args[1] ) or "";
args.P2 = trim( pframe.args[2] ) or "";
args.P3 = trim( pframe.args[3] ) or "";
args.P4 = trim( pframe.args[4] ) or "";
args.P5 = trim( pframe.args[5] ) or "";
local result = core( args );
local name = "FOOTNOTE" .. args.P1 .. args.P2 ..
args.P3 .. args.P4 .. args.P5 .. args.page .. args.pages .. args.location;
result = frame:extensionTag{ name = "ref", args = {name=name}, content=result };
return result;
end
]]
return f;
ldrm1afmzry88kgl9az4dqjfz79sddp
801856
801855
2014-11-07T11:42:11Z
en>Trappist the monk
0
801856
Scribunto
text/plain
f = {
args_default = {
contribution = '',
separator = '.';
first = '',
In = '',
}
};
--[[--------------------------< T R I M >----------------------------------------------------------------------
strip leading and trailing white space from positional parameters.
]]
function trim( str )
if str == nil then
return '';
end
return str:match( "^%s*(.-)%s*$");
end
--[[--------------------------< C O R E >----------------------------------------------------------------------
Assembles the various parts provided by the template into a properly formatted bridging citation. Adds punctuation
and text; encloses the whole within a span with id and class attributes.
This function mimics the {{sfn}} and {{harv}} templates, but it does not display an author-date list, just an
author list. It is presumed that the dates of contributions are the same as the date of the enclosing work.
Even though not displayed, a date positional parameter is still required for the CITEREF anchor
]]
function core( args )
local result;
-- form the CITEREF anchor
result = '<span id="CITEREF' .. table.concat ({args.last1, args.last2, args.last3, args.last4, args.year}) .. '" class="citation">'
-- form the author list; like {{sfn}} and {{harv}}, 1 to 4 names and a date; same construct as sfn and harv
if args.first ~= '' then
args.first = ', ' .. args.first;
end
if args.last4 ~= "" and args.last3 ~= "" and args.last2 ~= "" and args.last1 ~= "" then
result = result .. args.last1 .. args.first .. ' et al.';
elseif args.last3 ~= "" and args.last2 ~= "" and args.last1 ~= "" then
result = result .. args.last1 .. args.first .. ', ' .. args.last2 .. ' & ' .. args.last3;
elseif args.last2 ~= "" and args.last1 ~= "" then
result = result .. args.last1 .. args.first .. ' & ' .. args.last2;
elseif args.last1 ~= "" then
result = result .. args.last1 .. args.first;
else
result = result .. '<span style="font-size:100%" class="error">author missing from author list</span>'
end
if args.separator ~= result:sub(-1) then
result = result .. args.separator; -- add separator if not same as last character in name list
end
--add the contribution and close the span
if args.url ~= '' then
args.contribution = '[' .. args.url .. ' ' .. args.contribution .. ']'; -- format external link
end
result = result .. ', "' .. args.contribution .. '", in ' .. args.In .. args.postscript .. '</span>';
-- if '' == args.year then
-- result = result .. '<span style="font-size:100%" class="error">missing year</span>)' .. args.separator;
-- else
-- result = result .. args.year .. ')' .. args.separator;
-- end
return result;
end
--[[--------------------------< F . H A R V C >----------------------------------------------------------------
Entry point from {{harvc}} template. Fetches parent frame parameters, does a bit of simple error checking
]]
function f.harvc (frame)
local args = f.args_default;
pframe = frame:getParent();
args.contribution = pframe.args.c or -- chapter or contribution
pframe.args.chapter or
pframe.args.contribution or '';
args.first = pframe.args.first or pframe.args.first1 or ''; -- (optional) first author's given name; given names for other authors not supported
args.In = pframe.args['in'] or -- source; 'in' is a Lua reserved keyword
'<span style="font-size:100%" class="error">required source is missing</span>'; -- error message if source not provided
args.last1 = pframe.args.last or pframe.args.last1 or ''; -- contribution author(s)
args.last2 = pframe.args.last2 or '';
args.last3 = pframe.args.last3 or '';
args.last4 = pframe.args.last4 or '';
args.postscript = pframe.args.ps or pframe.args.postscript or '';
if '' ~= args.postscript then
if 'none' == args.postscript:lower() then -- if |ps=none or |postscript=none then
args.postscript = ''; -- no postscript
end
else -- if |postscript= omitted or present but empty
args.postscript = '.'; -- use default postscript
end
args.separaotr = pframe.args.separator or '.'; -- element separator defaults to full stop
args.url = pframe.args.url or ''; -- url for chapter or contribution
args.year = pframe.args.year or '';
-- args.P1 = trim (pframe.args[1]); -- the positional parameters mimic {{harv}} template usage
-- args.P2 = trim (pframe.args[2]);
-- args.P3 = trim (pframe.args[3]);
-- args.P4 = trim (pframe.args[4]);
-- args.P5 = trim (pframe.args[5]);
if '' == args.contribution then
args.contribution = '<span style="font-size:100%" class="error">required contribution is missing</span>'; -- error message if source not provided
args.url=''; -- if no contribution set url to empty string so we don't link the error message
end
if '' == args.year then
args.year = '<span style="font-size:100%" class="error">missing year</span>'; -- error message if year not provided
end
return core (args);
end
--[[
function f.sfn( frame )
local args = f.args_default;
pframe = frame:getParent();
args.postscript = pframe.args.postscript or pframe.args.ps or ".";
args.page = pframe.args.p or pframe.args.page or "";
args.pages = pframe.args.pp or pframe.args.pages or "";
args.location = pframe.args.loc or "";
args.ref = pframe.args.ref or pframe.args.Ref or "";
args.P1 = trim( pframe.args[1] ) or "";
args.P2 = trim( pframe.args[2] ) or "";
args.P3 = trim( pframe.args[3] ) or "";
args.P4 = trim( pframe.args[4] ) or "";
args.P5 = trim( pframe.args[5] ) or "";
local result = core( args );
local name = "FOOTNOTE" .. args.P1 .. args.P2 ..
args.P3 .. args.P4 .. args.P5 .. args.page .. args.pages .. args.location;
result = frame:extensionTag{ name = "ref", args = {name=name}, content=result };
return result;
end
]]
return f;
8tzj37wgb7xq4xvbon7o3g0ebdsw2db
801857
801856
2014-11-07T12:50:22Z
en>Trappist the monk
0
Add in1-4;
801857
Scribunto
text/plain
f = {
args_default = {
-- contribution = '',
-- separator = '.';
-- first = '',
-- In = '',
}
};
--[[--------------------------< T R I M >----------------------------------------------------------------------
strip leading and trailing white space from positional parameters.
]]
function trim( str )
if str == nil then
return '';
end
return str:match( "^%s*(.-)%s*$");
end
--[[--------------------------< C O R E >----------------------------------------------------------------------
Assembles the various parts provided by the template into a properly formatted bridging citation. Adds punctuation
and text; encloses the whole within a span with id and class attributes.
This function mimics the {{sfn}} and {{harv}} templates, but it does not display an author-date list, just an
author list. It is presumed that the dates of contributions are the same as the date of the enclosing work.
Even though not displayed, a date positional parameter is still required for the CITEREF anchor
]]
function core( args )
local span_open_tag; -- holds CITEREF and css
local contributors; -- chapter or contribution authors
local source = ''; -- editor/author date list that forms a CITEREF link to a full citation; mimics harvnb output except year in parentheses
local err_msg = ''; -- a place to put error message that are output following normal output
local result; -- the assemby of the above output
-- form the CITEREF anchor
span_open_tag = '<span id="CITEREF' .. table.concat ({args.last1, args.last2, args.last3, args.last4, args.year}) .. '" class="citation">'
-- form the contributors list; similar to {{sfn}} and {{harv}}, 1 to 4 names but no date and also allows first contributor given name
if args.first ~= '' then
args.first = ', ' .. args.first;
end
if args.last4 ~= '' and args.last3 ~= '' and args.last2 ~= '' and args.last1 ~= '' then
contributors = args.last1 .. args.first .. ' et al.';
elseif args.last3 ~= '' and args.last2 ~= '' and args.last1 ~= '' then
contributors = args.last1 .. args.first .. ', ' .. args.last2 .. ' & ' .. args.last3;
elseif args.last2 ~= '' and args.last1 ~= '' then
contributors = args.last1 .. args.first .. ' & ' .. args.last2;
elseif args.last1 ~= '' then
contributors = args.last1 .. args.first;
else
err_msg = '<span style="font-size:100%" class="error">author missing from contributor list</span>'
end
--form the source author-date list
if args.in4 ~= '' and args.in3 ~= '' and args.in2 ~= '' and args.in1 ~= '' then
source = args.in1 .. ' et al.';
elseif args.in3 ~= '' and args.in2 ~= '' and args.in1 ~= '' then
source = args.in1 .. ', ' .. args.in2 .. ' & ' .. args.in3;
elseif args.in2 ~= '' and args.in1 ~= '' then
source = args.in1 .. ' & ' .. args.in2;
elseif args.in1 ~= '' then
source = args.in1;
else
if '' ~= err_msg then err_msg = err_msg .. ' '; end -- space between error messages
err_msg = '<span style="font-size:100%" class="error">author missing from source list</span>'
end
source = source .. ' (' .. args.year .. ')';
source = "[[#CITEREF" .. mw.uri.anchorEncode(table.concat ({args.in1, args.in2, args.in3, args.in4, args.year})) .. "|" .. source .. "]]";
--combine contribution with url to make external link
if args.url ~= '' then
args.contribution = '[' .. args.url .. ' ' .. args.contribution .. ']'; -- format external link
end
if args.separator ~= contributors:sub(-1) then
contributors = contributors .. args.separator; -- add separator if not same as last character in name list (|first=John S. or et al.)
end
-- and put it all together
result = span_open_tag .. contributors .. ' ' .. args.contribution .. args.separator .. ' In ' .. source .. args.postscript .. '</span>';
-- if '' == args.year then
-- result = result .. '<span style="font-size:100%" class="error">missing year</span>)' .. args.separator;
-- else
-- result = result .. args.year .. ')' .. args.separator;
-- end
-- if '' == args.year then
-- args.year = '<span style="font-size:100%" class="error">missing year</span>'; -- error message if year not provided
-- end
return result;
end
--[[--------------------------< F . H A R V C >----------------------------------------------------------------
Entry point from {{harvc}} template. Fetches parent frame parameters, does a bit of simple error checking
]]
function f.harvc (frame)
local args = f.args_default;
pframe = frame:getParent();
args.contribution = pframe.args.c or -- chapter or contribution
pframe.args.chapter or
pframe.args.contribution or '';
args.first = pframe.args.first or pframe.args.first1 or ''; -- (optional) first author's given name; given names for other authors not supported
args.in1 = pframe.args['in'] or pframe.args.in1 or ''; -- source editor surnames; 'in' is a Lua reserved keyword
args.in2 = pframe.args.in2 or '';
args.in3 = pframe.args.in3 or '';
args.in4 = pframe.args.in4 or '';
-- args.In = pframe.args['in'] or -- source; 'in' is a Lua reserved keyword
-- '<span style="font-size:100%" class="error">required source is missing</span>'; -- error message if source not provided
args.last1 = pframe.args.last or pframe.args.last1 or ''; -- contribution author(s)
args.last2 = pframe.args.last2 or '';
args.last3 = pframe.args.last3 or '';
args.last4 = pframe.args.last4 or '';
args.postscript = pframe.args.ps or pframe.args.postscript or '';
if '' ~= args.postscript then
if 'none' == args.postscript:lower() then -- if |ps=none or |postscript=none then
args.postscript = ''; -- no postscript
end
else -- if |postscript= omitted or present but empty
args.postscript = '.'; -- use default postscript
end
args.separaotr = pframe.args.separator or '.'; -- element separator defaults to full stop
args.url = pframe.args.url or ''; -- url for chapter or contribution
args.year = pframe.args.year or '';
-- args.P1 = trim (pframe.args[1]); -- the positional parameters mimic {{harv}} template usage
-- args.P2 = trim (pframe.args[2]);
-- args.P3 = trim (pframe.args[3]);
-- args.P4 = trim (pframe.args[4]);
-- args.P5 = trim (pframe.args[5]);
if '' == args.contribution then
args.contribution = '<span style="font-size:100%" class="error">required contribution is missing</span>'; -- error message if source not provided
args.url=''; -- if no contribution set url to empty string so we don't link the error message
end
return core (args);
end
--[[
function f.sfn( frame )
local args = f.args_default;
pframe = frame:getParent();
args.postscript = pframe.args.postscript or pframe.args.ps or ".";
args.page = pframe.args.p or pframe.args.page or "";
args.pages = pframe.args.pp or pframe.args.pages or "";
args.location = pframe.args.loc or "";
args.ref = pframe.args.ref or pframe.args.Ref or "";
args.P1 = trim( pframe.args[1] ) or "";
args.P2 = trim( pframe.args[2] ) or "";
args.P3 = trim( pframe.args[3] ) or "";
args.P4 = trim( pframe.args[4] ) or "";
args.P5 = trim( pframe.args[5] ) or "";
local result = core( args );
local name = "FOOTNOTE" .. args.P1 .. args.P2 ..
args.P3 .. args.P4 .. args.P5 .. args.page .. args.pages .. args.location;
result = frame:extensionTag{ name = "ref", args = {name=name}, content=result };
return result;
end
]]
return f;
qypxa1wh8kqnwgziqrlkzms9prajrif
801858
801857
2014-11-07T12:51:20Z
en>Trappist the monk
0
801858
Scribunto
text/plain
f = {
args_default = {
-- contribution = '',
-- separator = '.';
-- first = '',
-- In = '',
}
};
--[[--------------------------< T R I M >----------------------------------------------------------------------
strip leading and trailing white space from positional parameters.
]]
function trim( str )
if str == nil then
return '';
end
return str:match( "^%s*(.-)%s*$");
end
--[[--------------------------< C O R E >----------------------------------------------------------------------
Assembles the various parts provided by the template into a properly formatted bridging citation. Adds punctuation
and text; encloses the whole within a span with id and class attributes.
This function mimics the {{sfn}} and {{harv}} templates, but it does not display an author-date list, just an
author list. It is presumed that the dates of contributions are the same as the date of the enclosing work.
Even though not displayed, a date positional parameter is still required for the CITEREF anchor
]]
function core( args )
local span_open_tag; -- holds CITEREF and css
local contributors; -- chapter or contribution authors
local source = ''; -- editor/author date list that forms a CITEREF link to a full citation; mimics harvnb output except year in parentheses
local err_msg = ''; -- a place to put error message that are output following normal output
local result; -- the assemby of the above output
-- form the CITEREF anchor
span_open_tag = '<span id="CITEREF' .. table.concat ({args.last1, args.last2, args.last3, args.last4, args.year}) .. '" class="citation">'
-- form the contributors list; similar to {{sfn}} and {{harv}}, 1 to 4 names but no date and also allows first contributor given name
if args.first ~= '' then
args.first = ', ' .. args.first;
end
if args.last4 ~= '' and args.last3 ~= '' and args.last2 ~= '' and args.last1 ~= '' then
contributors = args.last1 .. args.first .. ' et al.';
elseif args.last3 ~= '' and args.last2 ~= '' and args.last1 ~= '' then
contributors = args.last1 .. args.first .. ', ' .. args.last2 .. ' & ' .. args.last3;
elseif args.last2 ~= '' and args.last1 ~= '' then
contributors = args.last1 .. args.first .. ' & ' .. args.last2;
elseif args.last1 ~= '' then
contributors = args.last1 .. args.first;
else
err_msg = '<span style="font-size:100%" class="error">author missing from contributor list</span>'
end
--form the source author-date list
if args.in4 ~= '' and args.in3 ~= '' and args.in2 ~= '' and args.in1 ~= '' then
source = args.in1 .. ' et al.';
elseif args.in3 ~= '' and args.in2 ~= '' and args.in1 ~= '' then
source = args.in1 .. ', ' .. args.in2 .. ' & ' .. args.in3;
elseif args.in2 ~= '' and args.in1 ~= '' then
source = args.in1 .. ' & ' .. args.in2;
elseif args.in1 ~= '' then
source = args.in1;
else
if '' ~= err_msg then err_msg = err_msg .. ' '; end -- space between error messages
err_msg = '<span style="font-size:100%" class="error">author missing from source list</span>'
end
source = source .. ' (' .. args.year .. ')';
source = "[[#CITEREF" .. mw.uri.anchorEncode(table.concat ({args.in1, args.in2, args.in3, args.in4, args.year})) .. "|" .. source .. "]]";
--combine contribution with url to make external link
if args.url ~= '' then
args.contribution = '[' .. args.url .. ' ' .. args.contribution .. ']'; -- format external link
end
if args.separator ~= contributors:sub(-1) then
contributors = contributors .. args.separator; -- add separator if not same as last character in name list (|first=John S. or et al.)
end
-- and put it all together
result = span_open_tag .. contributors .. ' ' .. args.contribution .. args.separator .. ' In ' .. source .. args.postscript .. '</span>';
-- if '' == args.year then
-- result = result .. '<span style="font-size:100%" class="error">missing year</span>)' .. args.separator;
-- else
-- result = result .. args.year .. ')' .. args.separator;
-- end
-- if '' == args.year then
-- args.year = '<span style="font-size:100%" class="error">missing year</span>'; -- error message if year not provided
-- end
return result;
end
--[[--------------------------< F . H A R V C >----------------------------------------------------------------
Entry point from {{harvc}} template. Fetches parent frame parameters, does a bit of simple error checking
]]
function f.harvc (frame)
local args = f.args_default;
pframe = frame:getParent();
args.contribution = pframe.args.c or -- chapter or contribution
pframe.args.chapter or
pframe.args.contribution or '';
args.first = pframe.args.first or pframe.args.first1 or ''; -- (optional) first author's given name; given names for other authors not supported
args.in1 = pframe.args['in'] or pframe.args.in1 or ''; -- source editor surnames; 'in' is a Lua reserved keyword
args.in2 = pframe.args.in2 or '';
args.in3 = pframe.args.in3 or '';
args.in4 = pframe.args.in4 or '';
-- args.In = pframe.args['in'] or -- source; 'in' is a Lua reserved keyword
-- '<span style="font-size:100%" class="error">required source is missing</span>'; -- error message if source not provided
args.last1 = pframe.args.last or pframe.args.last1 or ''; -- contribution author(s)
args.last2 = pframe.args.last2 or '';
args.last3 = pframe.args.last3 or '';
args.last4 = pframe.args.last4 or '';
args.postscript = pframe.args.ps or pframe.args.postscript or '';
if '' ~= args.postscript then
if 'none' == args.postscript:lower() then -- if |ps=none or |postscript=none then
args.postscript = ''; -- no postscript
end
else -- if |postscript= omitted or present but empty
args.postscript = '.'; -- use default postscript
end
args.separator = pframe.args.separator or '.'; -- element separator defaults to full stop
args.url = pframe.args.url or ''; -- url for chapter or contribution
args.year = pframe.args.year or '';
-- args.P1 = trim (pframe.args[1]); -- the positional parameters mimic {{harv}} template usage
-- args.P2 = trim (pframe.args[2]);
-- args.P3 = trim (pframe.args[3]);
-- args.P4 = trim (pframe.args[4]);
-- args.P5 = trim (pframe.args[5]);
if '' == args.contribution then
args.contribution = '<span style="font-size:100%" class="error">required contribution is missing</span>'; -- error message if source not provided
args.url=''; -- if no contribution set url to empty string so we don't link the error message
end
return core (args);
end
--[[
function f.sfn( frame )
local args = f.args_default;
pframe = frame:getParent();
args.postscript = pframe.args.postscript or pframe.args.ps or ".";
args.page = pframe.args.p or pframe.args.page or "";
args.pages = pframe.args.pp or pframe.args.pages or "";
args.location = pframe.args.loc or "";
args.ref = pframe.args.ref or pframe.args.Ref or "";
args.P1 = trim( pframe.args[1] ) or "";
args.P2 = trim( pframe.args[2] ) or "";
args.P3 = trim( pframe.args[3] ) or "";
args.P4 = trim( pframe.args[4] ) or "";
args.P5 = trim( pframe.args[5] ) or "";
local result = core( args );
local name = "FOOTNOTE" .. args.P1 .. args.P2 ..
args.P3 .. args.P4 .. args.P5 .. args.page .. args.pages .. args.location;
result = frame:extensionTag{ name = "ref", args = {name=name}, content=result };
return result;
end
]]
return f;
8gizolouajb6a6rt1tgkh3pl2khi3h5
801859
801858
2014-11-07T13:17:09Z
en>Trappist the monk
0
Add in1-4;
801859
Scribunto
text/plain
f = {
args_default = {
err_msg = '',
-- contribution = '',
-- separator = '.';
-- first = '',
-- In = '',
}
};
--[[--------------------------< T R I M >----------------------------------------------------------------------
strip leading and trailing white space from positional parameters.
]]
function trim( str )
if str == nil then
return '';
end
return str:match( "^%s*(.-)%s*$");
end
--[[--------------------------< C O R E >----------------------------------------------------------------------
Assembles the various parts provided by the template into a properly formatted bridging citation. Adds punctuation
and text; encloses the whole within a span with id and class attributes.
This function mimics the {{sfn}} and {{harv}} templates, but it does not display an author-date list, just an
author list. It is presumed that the dates of contributions are the same as the date of the enclosing work.
Even though not displayed, a date positional parameter is still required for the CITEREF anchor
]]
function core( args )
local span_open_tag; -- holds CITEREF and css
local contributors; -- chapter or contribution authors
local source = ''; -- editor/author date list that forms a CITEREF link to a full citation; mimics harvnb output except year in parentheses
-- local err_msg = ''; -- a place to put error message that are output following normal output
local result; -- the assemby of the above output
-- form the CITEREF anchor
span_open_tag = '<span id="CITEREF' .. table.concat ({args.last1, args.last2, args.last3, args.last4, args.year}) .. '" class="citation">'
-- form the contributors list; similar to {{sfn}} and {{harv}}, 1 to 4 names but no date and also allows first contributor given name
if args.first ~= '' then
args.first = ', ' .. args.first;
end
if args.last4 ~= '' and args.last3 ~= '' and args.last2 ~= '' and args.last1 ~= '' then
contributors = args.last1 .. args.first .. ' et al.';
elseif args.last3 ~= '' and args.last2 ~= '' and args.last1 ~= '' then
contributors = args.last1 .. args.first .. ', ' .. args.last2 .. ' & ' .. args.last3;
elseif args.last2 ~= '' and args.last1 ~= '' then
contributors = args.last1 .. args.first .. ' & ' .. args.last2;
elseif args.last1 ~= '' then
contributors = args.last1 .. args.first;
else
args.err_msg = args.err_msg .. ' author missing from contributor list.';
end
--form the source author-date list
if args.in4 ~= '' and args.in3 ~= '' and args.in2 ~= '' and args.in1 ~= '' then
source = args.in1 .. ' et al.';
elseif args.in3 ~= '' and args.in2 ~= '' and args.in1 ~= '' then
source = args.in1 .. ', ' .. args.in2 .. ' & ' .. args.in3;
elseif args.in2 ~= '' and args.in1 ~= '' then
source = args.in1 .. ' & ' .. args.in2;
elseif args.in1 ~= '' then
source = args.in1;
else
args.err_msg = args.err_msg .. ' author missing from source list.'
end
if '' ~= args.year then
source = source .. ' (' .. args.year .. ')';
else
args.err_msg = args.err_msg .. ' missing year.'; -- error message if year not provided
end
source = "[[#CITEREF" .. mw.uri.anchorEncode(table.concat ({args.in1, args.in2, args.in3, args.in4, args.year})) .. "|" .. source .. "]]";
--combine contribution with url to make external link
if args.url ~= '' then
args.contribution = '[' .. args.url .. ' ' .. args.contribution .. ']'; -- format external link
end
if args.separator ~= contributors:sub(-1) then
contributors = contributors .. args.separator; -- add separator if not same as last character in name list (|first=John S. or et al.)
end
--wrap error messages in span
args.err_msg = '<span style="font-size:100%" class="error">' .. args.err_msg .. '</span>';
-- and put it all together
result = span_open_tag .. contributors .. ' ' .. args.contribution .. args.separator .. ' In ' .. source .. args.postscript .. '</span>' .. args.err_msg;
-- if '' == args.year then
-- result = result .. '<span style="font-size:100%" class="error">missing year</span>)' .. args.separator;
-- else
-- result = result .. args.year .. ')' .. args.separator;
-- end
return result;
end
--[[--------------------------< F . H A R V C >----------------------------------------------------------------
Entry point from {{harvc}} template. Fetches parent frame parameters, does a bit of simple error checking
]]
function f.harvc (frame)
local args = f.args_default;
pframe = frame:getParent();
args.contribution = pframe.args.c or -- chapter or contribution
pframe.args.chapter or
pframe.args.contribution or '';
args.first = pframe.args.first or pframe.args.first1 or ''; -- (optional) first author's given name; given names for other authors not supported
args.in1 = pframe.args['in'] or pframe.args.in1 or ''; -- source editor surnames; 'in' is a Lua reserved keyword
args.in2 = pframe.args.in2 or '';
args.in3 = pframe.args.in3 or '';
args.in4 = pframe.args.in4 or '';
args.last1 = pframe.args.last or pframe.args.last1 or ''; -- contribution author(s)
args.last2 = pframe.args.last2 or '';
args.last3 = pframe.args.last3 or '';
args.last4 = pframe.args.last4 or '';
args.postscript = pframe.args.ps or pframe.args.postscript or '';
if '' ~= args.postscript then
if 'none' == args.postscript:lower() then -- if |ps=none or |postscript=none then
args.postscript = ''; -- no postscript
end
else -- if |postscript= omitted or present but empty
args.postscript = '.'; -- use default postscript
end
args.separaotr = pframe.args.separator or '.'; -- element separator defaults to full stop
args.url = pframe.args.url or ''; -- url for chapter or contribution
args.year = pframe.args.year or '';
if '' == args.contribution then
args.err_msg = args.err_msg .. ' required contribution is missing.'; -- error message if source not provided
-- args.url=''; -- if no contribution set url to empty string so we don't link the error message
end
return core (args);
end
--[[
function f.sfn( frame )
local args = f.args_default;
pframe = frame:getParent();
args.postscript = pframe.args.postscript or pframe.args.ps or ".";
args.page = pframe.args.p or pframe.args.page or "";
args.pages = pframe.args.pp or pframe.args.pages or "";
args.location = pframe.args.loc or "";
args.ref = pframe.args.ref or pframe.args.Ref or "";
args.P1 = trim( pframe.args[1] ) or "";
args.P2 = trim( pframe.args[2] ) or "";
args.P3 = trim( pframe.args[3] ) or "";
args.P4 = trim( pframe.args[4] ) or "";
args.P5 = trim( pframe.args[5] ) or "";
local result = core( args );
local name = "FOOTNOTE" .. args.P1 .. args.P2 ..
args.P3 .. args.P4 .. args.P5 .. args.page .. args.pages .. args.location;
result = frame:extensionTag{ name = "ref", args = {name=name}, content=result };
return result;
end
]]
return f;
cx5ez5lhtnvz5u4mkrfspj42xhkrrgg
801860
801859
2014-11-07T13:18:15Z
en>Trappist the monk
0
801860
Scribunto
text/plain
f = {
args_default = {
err_msg = '',
-- contribution = '',
-- separator = '.';
-- first = '',
-- In = '',
}
};
--[[--------------------------< T R I M >----------------------------------------------------------------------
strip leading and trailing white space from positional parameters.
]]
function trim( str )
if str == nil then
return '';
end
return str:match( "^%s*(.-)%s*$");
end
--[[--------------------------< C O R E >----------------------------------------------------------------------
Assembles the various parts provided by the template into a properly formatted bridging citation. Adds punctuation
and text; encloses the whole within a span with id and class attributes.
This function mimics the {{sfn}} and {{harv}} templates, but it does not display an author-date list, just an
author list. It is presumed that the dates of contributions are the same as the date of the enclosing work.
Even though not displayed, a date positional parameter is still required for the CITEREF anchor
]]
function core( args )
local span_open_tag; -- holds CITEREF and css
local contributors; -- chapter or contribution authors
local source = ''; -- editor/author date list that forms a CITEREF link to a full citation; mimics harvnb output except year in parentheses
-- local err_msg = ''; -- a place to put error message that are output following normal output
local result; -- the assemby of the above output
-- form the CITEREF anchor
span_open_tag = '<span id="CITEREF' .. table.concat ({args.last1, args.last2, args.last3, args.last4, args.year}) .. '" class="citation">'
-- form the contributors list; similar to {{sfn}} and {{harv}}, 1 to 4 names but no date and also allows first contributor given name
if args.first ~= '' then
args.first = ', ' .. args.first;
end
if args.last4 ~= '' and args.last3 ~= '' and args.last2 ~= '' and args.last1 ~= '' then
contributors = args.last1 .. args.first .. ' et al.';
elseif args.last3 ~= '' and args.last2 ~= '' and args.last1 ~= '' then
contributors = args.last1 .. args.first .. ', ' .. args.last2 .. ' & ' .. args.last3;
elseif args.last2 ~= '' and args.last1 ~= '' then
contributors = args.last1 .. args.first .. ' & ' .. args.last2;
elseif args.last1 ~= '' then
contributors = args.last1 .. args.first;
else
args.err_msg = args.err_msg .. ' author missing from contributor list.';
end
--form the source author-date list
if args.in4 ~= '' and args.in3 ~= '' and args.in2 ~= '' and args.in1 ~= '' then
source = args.in1 .. ' et al.';
elseif args.in3 ~= '' and args.in2 ~= '' and args.in1 ~= '' then
source = args.in1 .. ', ' .. args.in2 .. ' & ' .. args.in3;
elseif args.in2 ~= '' and args.in1 ~= '' then
source = args.in1 .. ' & ' .. args.in2;
elseif args.in1 ~= '' then
source = args.in1;
else
args.err_msg = args.err_msg .. ' author missing from source list.'
end
if '' ~= args.year then
source = source .. ' (' .. args.year .. ')';
else
args.err_msg = args.err_msg .. ' missing year.'; -- error message if year not provided
end
source = "[[#CITEREF" .. mw.uri.anchorEncode(table.concat ({args.in1, args.in2, args.in3, args.in4, args.year})) .. "|" .. source .. "]]";
--combine contribution with url to make external link
if args.url ~= '' then
args.contribution = '[' .. args.url .. ' ' .. args.contribution .. ']'; -- format external link
end
if args.separator ~= contributors:sub(-1) then
contributors = contributors .. args.separator; -- add separator if not same as last character in name list (|first=John S. or et al.)
end
--wrap error messages in span
args.err_msg = '<span style="font-size:100%" class="error">' .. args.err_msg .. '</span>';
-- and put it all together
result = span_open_tag .. contributors .. ' ' .. args.contribution .. args.separator .. ' In ' .. source .. args.postscript .. '</span>' .. args.err_msg;
-- if '' == args.year then
-- result = result .. '<span style="font-size:100%" class="error">missing year</span>)' .. args.separator;
-- else
-- result = result .. args.year .. ')' .. args.separator;
-- end
return result;
end
--[[--------------------------< F . H A R V C >----------------------------------------------------------------
Entry point from {{harvc}} template. Fetches parent frame parameters, does a bit of simple error checking
]]
function f.harvc (frame)
local args = f.args_default;
pframe = frame:getParent();
args.contribution = pframe.args.c or -- chapter or contribution
pframe.args.chapter or
pframe.args.contribution or '';
args.first = pframe.args.first or pframe.args.first1 or ''; -- (optional) first author's given name; given names for other authors not supported
args.in1 = pframe.args['in'] or pframe.args.in1 or ''; -- source editor surnames; 'in' is a Lua reserved keyword
args.in2 = pframe.args.in2 or '';
args.in3 = pframe.args.in3 or '';
args.in4 = pframe.args.in4 or '';
args.last1 = pframe.args.last or pframe.args.last1 or ''; -- contribution author(s)
args.last2 = pframe.args.last2 or '';
args.last3 = pframe.args.last3 or '';
args.last4 = pframe.args.last4 or '';
args.postscript = pframe.args.ps or pframe.args.postscript or '';
if '' ~= args.postscript then
if 'none' == args.postscript:lower() then -- if |ps=none or |postscript=none then
args.postscript = ''; -- no postscript
end
else -- if |postscript= omitted or present but empty
args.postscript = '.'; -- use default postscript
end
args.separator = pframe.args.separator or '.'; -- element separator defaults to full stop
args.url = pframe.args.url or ''; -- url for chapter or contribution
args.year = pframe.args.year or '';
if '' == args.contribution then
args.err_msg = args.err_msg .. ' required contribution is missing.'; -- error message if source not provided
-- args.url=''; -- if no contribution set url to empty string so we don't link the error message
end
return core (args);
end
--[[
function f.sfn( frame )
local args = f.args_default;
pframe = frame:getParent();
args.postscript = pframe.args.postscript or pframe.args.ps or ".";
args.page = pframe.args.p or pframe.args.page or "";
args.pages = pframe.args.pp or pframe.args.pages or "";
args.location = pframe.args.loc or "";
args.ref = pframe.args.ref or pframe.args.Ref or "";
args.P1 = trim( pframe.args[1] ) or "";
args.P2 = trim( pframe.args[2] ) or "";
args.P3 = trim( pframe.args[3] ) or "";
args.P4 = trim( pframe.args[4] ) or "";
args.P5 = trim( pframe.args[5] ) or "";
local result = core( args );
local name = "FOOTNOTE" .. args.P1 .. args.P2 ..
args.P3 .. args.P4 .. args.P5 .. args.page .. args.pages .. args.location;
result = frame:extensionTag{ name = "ref", args = {name=name}, content=result };
return result;
end
]]
return f;
l96n6v82lzkb8ghh02kt5bofq26if7t
801861
801860
2014-11-07T13:28:54Z
en>Trappist the monk
0
801861
Scribunto
text/plain
f = {
args_default = {
err_msg = '',
-- contribution = '',
-- separator = '.';
-- first = '',
-- In = '',
}
};
--[[--------------------------< T R I M >----------------------------------------------------------------------
strip leading and trailing white space from positional parameters.
]]
function trim( str )
if str == nil then
return '';
end
return str:match( "^%s*(.-)%s*$");
end
--[[--------------------------< C O R E >----------------------------------------------------------------------
Assembles the various parts provided by the template into a properly formatted bridging citation. Adds punctuation
and text; encloses the whole within a span with id and class attributes.
This function mimics the {{sfn}} and {{harv}} templates, but it does not display an author-date list, just an
author list. It is presumed that the dates of contributions are the same as the date of the enclosing work.
Even though not displayed, a date positional parameter is still required for the CITEREF anchor
]]
function core( args )
local span_open_tag; -- holds CITEREF and css
local contributors = ''; -- chapter or contribution authors
local source = ''; -- editor/author date list that forms a CITEREF link to a full citation; mimics harvnb output except year in parentheses
local result; -- the assemby of the above output
-- form the CITEREF anchor
span_open_tag = '<span id="CITEREF' .. table.concat ({args.last1, args.last2, args.last3, args.last4, args.year}) .. '" class="citation">'
-- form the contributors list; similar to {{sfn}} and {{harv}}, 1 to 4 names but no date and also allows first contributor given name
if args.first ~= '' then
args.first = ', ' .. args.first;
end
if args.last4 ~= '' and args.last3 ~= '' and args.last2 ~= '' and args.last1 ~= '' then
contributors = args.last1 .. args.first .. ' et al.';
elseif args.last3 ~= '' and args.last2 ~= '' and args.last1 ~= '' then
contributors = args.last1 .. args.first .. ', ' .. args.last2 .. ' & ' .. args.last3;
elseif args.last2 ~= '' and args.last1 ~= '' then
contributors = args.last1 .. args.first .. ' & ' .. args.last2;
elseif args.last1 ~= '' then
contributors = args.last1 .. args.first;
else
args.err_msg = args.err_msg .. ' author missing from contributor list.';
end
--form the source author-date list
if args.in4 ~= '' and args.in3 ~= '' and args.in2 ~= '' and args.in1 ~= '' then
source = args.in1 .. ' et al.';
elseif args.in3 ~= '' and args.in2 ~= '' and args.in1 ~= '' then
source = args.in1 .. ', ' .. args.in2 .. ' & ' .. args.in3;
elseif args.in2 ~= '' and args.in1 ~= '' then
source = args.in1 .. ' & ' .. args.in2;
elseif args.in1 ~= '' then
source = args.in1;
else
args.err_msg = args.err_msg .. ' author missing from source list.'
end
if '' ~= args.year then
source = source .. ' (' .. args.year .. ')';
else
args.err_msg = args.err_msg .. ' missing year.'; -- error message if year not provided
end
source = "[[#CITEREF" .. mw.uri.anchorEncode(table.concat ({args.in1, args.in2, args.in3, args.in4, args.year})) .. "|" .. source .. "]]";
--combine contribution with url to make external link
if args.url ~= '' then
args.contribution = '[' .. args.url .. ' ' .. args.contribution .. ']'; -- format external link
end
if args.separator ~= contributors:sub(-1) then
contributors = contributors .. args.separator; -- add separator if not same as last character in name list (|first=John S. or et al.)
end
--wrap error messages in span
args.err_msg = '<span style="font-size:100%" class="error">' .. args.err_msg .. '</span>';
-- and put it all together
result = span_open_tag .. contributors .. ' ' .. args.contribution .. args.separator .. ' In ' .. source .. args.postscript .. '</span>' .. args.err_msg;
return result;
end
--[[--------------------------< F . H A R V C >----------------------------------------------------------------
Entry point from {{harvc}} template. Fetches parent frame parameters, does a bit of simple error checking
]]
function f.harvc (frame)
local args = f.args_default;
pframe = frame:getParent();
args.contribution = pframe.args.c or -- chapter or contribution
pframe.args.chapter or
pframe.args.contribution or '';
args.first = pframe.args.first or pframe.args.first1 or ''; -- (optional) first author's given name; given names for other authors not supported
args.in1 = pframe.args['in'] or pframe.args.in1 or ''; -- source editor surnames; 'in' is a Lua reserved keyword
args.in2 = pframe.args.in2 or '';
args.in3 = pframe.args.in3 or '';
args.in4 = pframe.args.in4 or '';
args.last1 = pframe.args.last or pframe.args.last1 or ''; -- contribution author(s)
args.last2 = pframe.args.last2 or '';
args.last3 = pframe.args.last3 or '';
args.last4 = pframe.args.last4 or '';
args.postscript = pframe.args.ps or pframe.args.postscript or '';
if '' ~= args.postscript then
if 'none' == args.postscript:lower() then -- if |ps=none or |postscript=none then
args.postscript = ''; -- no postscript
end
else -- if |postscript= omitted or present but empty
args.postscript = '.'; -- use default postscript
end
args.separator = pframe.args.separator or '.'; -- element separator defaults to full stop
args.url = pframe.args.url or ''; -- url for chapter or contribution
args.year = pframe.args.year or '';
if '' == args.contribution then
args.err_msg = args.err_msg .. ' required contribution is missing.'; -- error message if source not provided
-- args.url=''; -- if no contribution set url to empty string so we don't link the error message
end
return core (args);
end
--[[
function f.sfn( frame )
local args = f.args_default;
pframe = frame:getParent();
args.postscript = pframe.args.postscript or pframe.args.ps or ".";
args.page = pframe.args.p or pframe.args.page or "";
args.pages = pframe.args.pp or pframe.args.pages or "";
args.location = pframe.args.loc or "";
args.ref = pframe.args.ref or pframe.args.Ref or "";
args.P1 = trim( pframe.args[1] ) or "";
args.P2 = trim( pframe.args[2] ) or "";
args.P3 = trim( pframe.args[3] ) or "";
args.P4 = trim( pframe.args[4] ) or "";
args.P5 = trim( pframe.args[5] ) or "";
local result = core( args );
local name = "FOOTNOTE" .. args.P1 .. args.P2 ..
args.P3 .. args.P4 .. args.P5 .. args.page .. args.pages .. args.location;
result = frame:extensionTag{ name = "ref", args = {name=name}, content=result };
return result;
end
]]
return f;
cxs2jst7mvowu8lklhdll2i0m9pew6m
801862
801861
2014-11-07T13:51:26Z
en>Trappist the monk
0
in source location;
801862
Scribunto
text/plain
f = {
args_default = {
err_msg = '',
page_sep = ", p. ",
pages_sep = ", pp. ",
}
};
--[[--------------------------< T R I M >----------------------------------------------------------------------
strip leading and trailing white space from positional parameters.
]]
function trim( str )
if str == nil then
return '';
end
return str:match( "^%s*(.-)%s*$");
end
--[[--------------------------< C O R E >----------------------------------------------------------------------
Assembles the various parts provided by the template into a properly formatted bridging citation. Adds punctuation
and text; encloses the whole within a span with id and class attributes.
This function mimics the {{sfn}} and {{harv}} templates, but it does not display an author-date list, just an
author list. It is presumed that the dates of contributions are the same as the date of the enclosing work.
Even though not displayed, a date positional parameter is still required for the CITEREF anchor
]]
function core( args )
local span_open_tag; -- holds CITEREF and css
local contributors = ''; -- chapter or contribution authors
local source = ''; -- editor/author date list that forms a CITEREF link to a full citation; mimics harvnb output except year in parentheses
local result; -- the assemby of the above output
-- form the CITEREF anchor
span_open_tag = '<span id="CITEREF' .. table.concat ({args.last1, args.last2, args.last3, args.last4, args.year}) .. '" class="citation">'
-- form the contributors list; similar to {{sfn}} and {{harv}}, 1 to 4 names but no date and also allows first contributor given name
if args.first ~= '' then
args.first = ', ' .. args.first;
end
if args.last4 ~= '' and args.last3 ~= '' and args.last2 ~= '' and args.last1 ~= '' then
contributors = args.last1 .. args.first .. ' et al.';
elseif args.last3 ~= '' and args.last2 ~= '' and args.last1 ~= '' then
contributors = args.last1 .. args.first .. ', ' .. args.last2 .. ' & ' .. args.last3;
elseif args.last2 ~= '' and args.last1 ~= '' then
contributors = args.last1 .. args.first .. ' & ' .. args.last2;
elseif args.last1 ~= '' then
contributors = args.last1 .. args.first;
else
args.err_msg = args.err_msg .. ' author missing from contributor list.';
end
--form the source author-date list
if args.in4 ~= '' and args.in3 ~= '' and args.in2 ~= '' and args.in1 ~= '' then
source = args.in1 .. ' et al.';
elseif args.in3 ~= '' and args.in2 ~= '' and args.in1 ~= '' then
source = args.in1 .. ', ' .. args.in2 .. ' & ' .. args.in3;
elseif args.in2 ~= '' and args.in1 ~= '' then
source = args.in1 .. ' & ' .. args.in2;
elseif args.in1 ~= '' then
source = args.in1;
else
args.err_msg = args.err_msg .. ' author missing from source list.'
end
if '' ~= args.year then
source = source .. ' (' .. args.year .. ')';
else
args.err_msg = args.err_msg .. ' missing year.'; -- error message if year not provided
end
source = "[[#CITEREF" .. mw.uri.anchorEncode(table.concat ({args.in1, args.in2, args.in3, args.in4, args.year})) .. "|" .. source .. "]]";
--combine contribution with url to make external link
if args.url ~= '' then
args.contribution = '[' .. args.url .. ' ' .. args.contribution .. ']'; -- format external link
end
if args.separator ~= contributors:sub(-1) then
contributors = contributors .. args.separator; -- add separator if not same as last character in name list (|first=John S. or et al.)
end
if args.p ~= '' then
args.p = args.page_sep .. args.p;
elseif args.pp ~= '' then
args.p = args.pages_sep .. args.pp;
end
if args.loc ~= '' then
args.loc = ', ' .. args.loc;
end
args.p = args.p .. args.loc;
--wrap error messages in span
args.err_msg = '<span style="font-size:100%" class="error">' .. args.err_msg .. '</span>';
-- and put it all together
result = span_open_tag .. contributors .. ' ' .. args.contribution .. args.separator .. ' In ' .. source .. args.p .. args.postscript .. '</span>' .. args.err_msg;
return result;
end
--[[--------------------------< F . H A R V C >----------------------------------------------------------------
Entry point from {{harvc}} template. Fetches parent frame parameters, does a bit of simple error checking
]]
function f.harvc (frame)
local args = f.args_default;
pframe = frame:getParent();
args.contribution = pframe.args.c or -- chapter or contribution
pframe.args.chapter or
pframe.args.contribution or '';
args.first = pframe.args.first or pframe.args.first1 or ''; -- (optional) first author's given name; given names for other authors not supported
args.in1 = pframe.args['in'] or pframe.args.in1 or ''; -- source editor surnames; 'in' is a Lua reserved keyword
args.in2 = pframe.args.in2 or '';
args.in3 = pframe.args.in3 or '';
args.in4 = pframe.args.in4 or '';
args.last1 = pframe.args.last or pframe.args.last1 or ''; -- contribution author(s)
args.last2 = pframe.args.last2 or '';
args.last3 = pframe.args.last3 or '';
args.last4 = pframe.args.last4 or '';
args.p = pframe.args.p or ''; -- source page number(s) or location
args.pp = pframe.args.pp or '';
args.loc = pframe.args.loc or '';
args.postscript = pframe.args.ps or pframe.args.postscript or '';
if '' ~= args.postscript then
if 'none' == args.postscript:lower() then -- if |ps=none or |postscript=none then
args.postscript = ''; -- no postscript
end
else -- if |postscript= omitted or present but empty
args.postscript = '.'; -- use default postscript
end
args.separator = pframe.args.separator or '.'; -- element separator defaults to full stop
args.url = pframe.args.url or ''; -- url for chapter or contribution
args.year = pframe.args.year or '';
if '' == args.contribution then
args.err_msg = args.err_msg .. ' required contribution is missing.'; -- error message if source not provided
-- args.url=''; -- if no contribution set url to empty string so we don't link the error message
end
return core (args);
end
--[[
function f.sfn( frame )
local args = f.args_default;
pframe = frame:getParent();
args.postscript = pframe.args.postscript or pframe.args.ps or ".";
args.page = pframe.args.p or pframe.args.page or "";
args.pages = pframe.args.pp or pframe.args.pages or "";
args.location = pframe.args.loc or "";
args.ref = pframe.args.ref or pframe.args.Ref or "";
args.P1 = trim( pframe.args[1] ) or "";
args.P2 = trim( pframe.args[2] ) or "";
args.P3 = trim( pframe.args[3] ) or "";
args.P4 = trim( pframe.args[4] ) or "";
args.P5 = trim( pframe.args[5] ) or "";
local result = core( args );
local name = "FOOTNOTE" .. args.P1 .. args.P2 ..
args.P3 .. args.P4 .. args.P5 .. args.page .. args.pages .. args.location;
result = frame:extensionTag{ name = "ref", args = {name=name}, content=result };
return result;
end
]]
return f;
3dqx9bv0xjogqcp2pboi9gw3p1ylgo4
801863
801862
2014-11-07T14:01:02Z
en>Trappist the monk
0
801863
Scribunto
text/plain
f = {
args_default = {
err_msg = '',
page_sep = ", p. ",
pages_sep = ", pp. ",
}
};
--[[--------------------------< T R I M >----------------------------------------------------------------------
strip leading and trailing white space from positional parameters.
]]
function trim( str )
if str == nil then
return '';
end
return str:match( "^%s*(.-)%s*$");
end
--[[--------------------------< C O R E >----------------------------------------------------------------------
Assembles the various parts provided by the template into a properly formatted bridging citation. Adds punctuation
and text; encloses the whole within a span with id and class attributes.
This function mimics the {{sfn}} and {{harv}} templates, but it does not display an author-date list, just an
author list. It is presumed that the dates of contributions are the same as the date of the enclosing work.
Even though not displayed, a date positional parameter is still required for the CITEREF anchor
]]
function core( args )
local span_open_tag; -- holds CITEREF and css
local contributors = ''; -- chapter or contribution authors
local source = ''; -- editor/author date list that forms a CITEREF link to a full citation; mimics harvnb output except year in parentheses
local result; -- the assemby of the above output
-- form the CITEREF anchor
span_open_tag = '<span id="CITEREF' .. table.concat ({args.last1, args.last2, args.last3, args.last4, args.year}) .. '" class="citation">'
-- form the contributors list; similar to {{sfn}} and {{harv}}, 1 to 4 names but no date and also allows first contributor given name
if args.first ~= '' then
args.first = ', ' .. args.first;
end
if args.last4 ~= '' and args.last3 ~= '' and args.last2 ~= '' and args.last1 ~= '' then
contributors = args.last1 .. args.first .. ' et al.';
elseif args.last3 ~= '' and args.last2 ~= '' and args.last1 ~= '' then
contributors = args.last1 .. args.first .. ', ' .. args.last2 .. ' & ' .. args.last3;
elseif args.last2 ~= '' and args.last1 ~= '' then
contributors = args.last1 .. args.first .. ' & ' .. args.last2;
elseif args.last1 ~= '' then
contributors = args.last1 .. args.first;
else
args.err_msg = args.err_msg .. ' author missing from contributor list.';
end
--form the source author-date list
if args.in4 ~= '' and args.in3 ~= '' and args.in2 ~= '' and args.in1 ~= '' then
source = args.in1 .. ' et al.';
elseif args.in3 ~= '' and args.in2 ~= '' and args.in1 ~= '' then
source = args.in1 .. ', ' .. args.in2 .. ' & ' .. args.in3;
elseif args.in2 ~= '' and args.in1 ~= '' then
source = args.in1 .. ' & ' .. args.in2;
elseif args.in1 ~= '' then
source = args.in1;
else
args.err_msg = args.err_msg .. ' author missing from source list.'
end
if '' ~= args.year then
source = source .. ' (' .. args.year .. ')';
else
args.err_msg = args.err_msg .. ' missing year.'; -- error message if year not provided
end
source = "[[#CITEREF" .. mw.uri.anchorEncode(table.concat ({args.in1, args.in2, args.in3, args.in4, args.year})) .. "|" .. source .. "]]";
--combine contribution with url to make external link
if args.url ~= '' then
args.contribution = '[' .. args.url .. ' ' .. args.contribution .. ']'; -- format external link
end
if args.separator ~= contributors:sub(-1) then
contributors = contributors .. args.separator; -- add separator if not same as last character in name list (|first=John S. or et al.)
end
if args.p ~= '' then
args.p = args.page_sep .. args.p;
elseif args.pp ~= '' then
args.p = args.pages_sep .. args.pp;
end
if args.loc ~= '' then
args.loc = ', ' .. args.loc;
end
args.p = args.p .. args.loc;
--wrap error messages in span
args.err_msg = '<span style="font-size:100%" class="error">' .. args.err_msg .. '</span>';
-- and put it all together
result = span_open_tag .. contributors .. ' "' .. args.contribution .. '"' .. args.separator .. ' In ' .. source .. args.p .. args.postscript .. '</span>' .. args.err_msg;
return result;
end
--[[--------------------------< F . H A R V C >----------------------------------------------------------------
Entry point from {{harvc}} template. Fetches parent frame parameters, does a bit of simple error checking
]]
function f.harvc (frame)
local args = f.args_default;
pframe = frame:getParent();
args.contribution = pframe.args.c or -- chapter or contribution
pframe.args.chapter or
pframe.args.contribution or '';
args.first = pframe.args.first or pframe.args.first1 or ''; -- (optional) first author's given name; given names for other authors not supported
args.in1 = pframe.args['in'] or pframe.args.in1 or ''; -- source editor surnames; 'in' is a Lua reserved keyword
args.in2 = pframe.args.in2 or '';
args.in3 = pframe.args.in3 or '';
args.in4 = pframe.args.in4 or '';
args.last1 = pframe.args.last or pframe.args.last1 or ''; -- contribution author(s)
args.last2 = pframe.args.last2 or '';
args.last3 = pframe.args.last3 or '';
args.last4 = pframe.args.last4 or '';
args.p = pframe.args.p or ''; -- source page number(s) or location
args.pp = pframe.args.pp or '';
args.loc = pframe.args.loc or '';
args.postscript = pframe.args.ps or pframe.args.postscript or '';
if '' ~= args.postscript then
if 'none' == args.postscript:lower() then -- if |ps=none or |postscript=none then
args.postscript = ''; -- no postscript
end
else -- if |postscript= omitted or present but empty
args.postscript = '.'; -- use default postscript
end
args.separator = pframe.args.separator or '.'; -- element separator defaults to full stop
args.url = pframe.args.url or ''; -- url for chapter or contribution
args.year = pframe.args.year or '';
if '' == args.contribution then
args.err_msg = args.err_msg .. ' required contribution is missing.'; -- error message if source not provided
-- args.url=''; -- if no contribution set url to empty string so we don't link the error message
end
return core (args);
end
--[[
function f.sfn( frame )
local args = f.args_default;
pframe = frame:getParent();
args.postscript = pframe.args.postscript or pframe.args.ps or ".";
args.page = pframe.args.p or pframe.args.page or "";
args.pages = pframe.args.pp or pframe.args.pages or "";
args.location = pframe.args.loc or "";
args.ref = pframe.args.ref or pframe.args.Ref or "";
args.P1 = trim( pframe.args[1] ) or "";
args.P2 = trim( pframe.args[2] ) or "";
args.P3 = trim( pframe.args[3] ) or "";
args.P4 = trim( pframe.args[4] ) or "";
args.P5 = trim( pframe.args[5] ) or "";
local result = core( args );
local name = "FOOTNOTE" .. args.P1 .. args.P2 ..
args.P3 .. args.P4 .. args.P5 .. args.page .. args.pages .. args.location;
result = frame:extensionTag{ name = "ref", args = {name=name}, content=result };
return result;
end
]]
return f;
kejueq7zd7gkpa33i3jedrlz27mrb52
801864
801863
2014-11-07T15:08:08Z
en>Trappist the monk
0
801864
Scribunto
text/plain
f = {
args_default = {
err_msg = '',
page_sep = ", p. ",
pages_sep = ", pp. ",
}
};
--[[--------------------------< T R I M >----------------------------------------------------------------------
strip leading and trailing white space from positional parameters.
]]
function trim( str )
if str == nil then
return '';
end
return str:match( "^%s*(.-)%s*$");
end
--[[--------------------------< C O R E >----------------------------------------------------------------------
Assembles the various parts provided by the template into a properly formatted bridging citation. Adds punctuation
and text; encloses the whole within a span with id and class attributes.
This function mimics the {{sfn}} and {{harv}} templates, but it does not display an author-date list, just an
author list. It is presumed that the dates of contributions are the same as the date of the enclosing work.
Even though not displayed, a date positional parameter is still required for the CITEREF anchor
]]
function core( args )
local span_open_tag; -- holds CITEREF and css
local contributors = ''; -- chapter or contribution authors
local source = ''; -- editor/author date list that forms a CITEREF link to a full citation; mimics harvnb output except year in parentheses
local result; -- the assemby of the above output
-- form the CITEREF anchor
span_open_tag = '<span id="CITEREF' .. table.concat ({args.last1, args.last2, args.last3, args.last4, args.year}) .. '" class="citation">'
-- form the contributors list; similar to {{sfn}} and {{harv}}, 1 to 4 names but no date and also allows first contributor given name
if args.first ~= '' then
args.first = ', ' .. args.first;
end
if args.last4 ~= '' and args.last3 ~= '' and args.last2 ~= '' and args.last1 ~= '' then
contributors = args.last1 .. args.first .. ' et al.';
elseif args.last3 ~= '' and args.last2 ~= '' and args.last1 ~= '' then
contributors = args.last1 .. args.first .. ', ' .. args.last2 .. ' & ' .. args.last3;
elseif args.last2 ~= '' and args.last1 ~= '' then
contributors = args.last1 .. args.first .. ' & ' .. args.last2;
elseif args.last1 ~= '' then
contributors = args.last1 .. args.first;
else
args.err_msg = args.err_msg .. ' author missing from contributor list.';
end
--form the source author-date list
if args.in4 ~= '' and args.in3 ~= '' and args.in2 ~= '' and args.in1 ~= '' then
source = args.in1 .. ' et al.';
elseif args.in3 ~= '' and args.in2 ~= '' and args.in1 ~= '' then
source = args.in1 .. ', ' .. args.in2 .. ' & ' .. args.in3;
elseif args.in2 ~= '' and args.in1 ~= '' then
source = args.in1 .. ' & ' .. args.in2;
elseif args.in1 ~= '' then
source = args.in1;
else
args.err_msg = args.err_msg .. ' author missing from source list.'
end
if '' ~= args.year then
source = source .. ' (' .. args.year .. ')';
else
args.err_msg = args.err_msg .. ' missing year.'; -- error message if year not provided
end
source = "[[#CITEREF" .. mw.uri.anchorEncode(table.concat ({args.in1, args.in2, args.in3, args.in4, args.year})) .. "|" .. source .. "]]";
--combine contribution with url to make external link
if args.url ~= '' then
args.contribution = '[' .. args.url .. ' ' .. args.contribution .. ']'; -- format external link
end
if args.separator ~= contributors:sub(-1) then
contributors = contributors .. args.separator; -- add separator if not same as last character in name list (|first=John S. or et al.)
end
if args.p ~= '' then
args.p = args.page_sep .. args.p;
elseif args.pp ~= '' then
args.p = args.pages_sep .. args.pp;
end
if args.loc ~= '' then
args.loc = ', ' .. args.loc;
end
args.p = args.p .. args.loc;
--wrap error messages in span
args.err_msg = '<span style="font-size:100%" class="error">' .. args.err_msg .. '</span>';
-- and put it all together
result = span_open_tag .. contributors .. ' "' .. args.contribution .. '"' .. args.separator .. ' In ' .. source .. args.p .. args.postscript .. '</span>' .. args.err_msg;
return result;
end
--[[--------------------------< F . H A R V C >----------------------------------------------------------------
Entry point from {{harvc}} template. Fetches parent frame parameters, does a bit of simple error checking
]]
function f.harvc (frame)
local args = f.args_default;
pframe = frame:getParent();
args.contribution = pframe.args.c or -- chapter or contribution
pframe.args.chapter or
pframe.args.contribution or '';
args.first = pframe.args.first or pframe.args.first1 or ''; -- (optional) first author's given name; given names for other authors not supported
args.in1 = pframe.args['in'] or pframe.args.in1 or ''; -- source editor surnames; 'in' is a Lua reserved keyword
args.in2 = pframe.args.in2 or '';
args.in3 = pframe.args.in3 or '';
args.in4 = pframe.args.in4 or '';
args.last1 = pframe.args.last or pframe.args.last1 or ''; -- contribution author(s)
args.last2 = pframe.args.last2 or '';
args.last3 = pframe.args.last3 or '';
args.last4 = pframe.args.last4 or '';
args.p = pframe.args.p or ''; -- source page number(s) or location
args.pp = pframe.args.pp or '';
args.loc = pframe.args.loc or '';
args.separator = pframe.args.separator; -- !! before postscript!! element separator defaults to full stop
args.postscript = pframe.args.ps or pframe.args.postscript;
if nil == args.postscript then
if nil == args.separator then
args.postscript = '.'; -- neither set so set to defaults
args.separator = '.';
elseif ',' == args.separator then
args.postscript = ''; -- CS2 and postscript not set; no terminal punctuation
else
args.postscript = '.'; -- separator not CS2 and postscript not set; use default terminal punctuation
end
else --postscript set
if 'none' == args.postscript:lower() then -- if |ps=none or |postscript=none then
args.postscript = ''; -- no postscript
end
end
if nil == args.separator then
args.separator = '.'; -- not set in template so set default
end
--[[
args.postscript = pframe.args.ps or pframe.args.postscript or '';
if '' ~= args.postscript then
if 'none' == args.postscript:lower() then -- if |ps=none or |postscript=none then
args.postscript = ''; -- no postscript
end
else -- if |postscript= omitted or present but empty
args.postscript = '.'; -- use default postscript
end
args.separator = pframe.args.separator or '.'; -- element separator defaults to full stop
]]
args.url = pframe.args.url or ''; -- url for chapter or contribution
args.year = pframe.args.year or '';
if '' == args.contribution then
args.err_msg = args.err_msg .. ' required contribution is missing.'; -- error message if source not provided
-- args.url=''; -- if no contribution set url to empty string so we don't link the error message
end
return core (args);
end
--[[
function f.sfn( frame )
local args = f.args_default;
pframe = frame:getParent();
args.postscript = pframe.args.postscript or pframe.args.ps or ".";
args.page = pframe.args.p or pframe.args.page or "";
args.pages = pframe.args.pp or pframe.args.pages or "";
args.location = pframe.args.loc or "";
args.ref = pframe.args.ref or pframe.args.Ref or "";
args.P1 = trim( pframe.args[1] ) or "";
args.P2 = trim( pframe.args[2] ) or "";
args.P3 = trim( pframe.args[3] ) or "";
args.P4 = trim( pframe.args[4] ) or "";
args.P5 = trim( pframe.args[5] ) or "";
local result = core( args );
local name = "FOOTNOTE" .. args.P1 .. args.P2 ..
args.P3 .. args.P4 .. args.P5 .. args.page .. args.pages .. args.location;
result = frame:extensionTag{ name = "ref", args = {name=name}, content=result };
return result;
end
]]
return f;
ouwhu3m9i14ibbbldza6mtd2lcst29y
801865
801864
2014-11-07T15:12:05Z
en>Trappist the monk
0
801865
Scribunto
text/plain
f = {
args_default = {
err_msg = '',
page_sep = ", p. ",
pages_sep = ", pp. ",
}
};
--[[--------------------------< T R I M >----------------------------------------------------------------------
strip leading and trailing white space from positional parameters.
]]
function trim( str )
if str == nil then
return '';
end
return str:match( "^%s*(.-)%s*$");
end
--[[--------------------------< C O R E >----------------------------------------------------------------------
Assembles the various parts provided by the template into a properly formatted bridging citation. Adds punctuation
and text; encloses the whole within a span with id and class attributes.
This function mimics the {{sfn}} and {{harv}} templates, but it does not display an author-date list, just an
author list. It is presumed that the dates of contributions are the same as the date of the enclosing work.
Even though not displayed, a date positional parameter is still required for the CITEREF anchor
]]
function core( args )
local span_open_tag; -- holds CITEREF and css
local contributors = ''; -- chapter or contribution authors
local source = ''; -- editor/author date list that forms a CITEREF link to a full citation; mimics harvnb output except year in parentheses
local result; -- the assemby of the above output
-- form the CITEREF anchor
span_open_tag = '<span id="CITEREF' .. table.concat ({args.last1, args.last2, args.last3, args.last4, args.year}) .. '" class="citation">'
-- form the contributors list; similar to {{sfn}} and {{harv}}, 1 to 4 names but no date and also allows first contributor given name
if args.first ~= '' then
args.first = ', ' .. args.first;
end
if args.last4 ~= '' and args.last3 ~= '' and args.last2 ~= '' and args.last1 ~= '' then
contributors = args.last1 .. args.first .. ' et al.';
elseif args.last3 ~= '' and args.last2 ~= '' and args.last1 ~= '' then
contributors = args.last1 .. args.first .. ', ' .. args.last2 .. ' & ' .. args.last3;
elseif args.last2 ~= '' and args.last1 ~= '' then
contributors = args.last1 .. args.first .. ' & ' .. args.last2;
elseif args.last1 ~= '' then
contributors = args.last1 .. args.first;
else
args.err_msg = args.err_msg .. ' author missing from contributor list.';
end
--form the source author-date list
if args.in4 ~= '' and args.in3 ~= '' and args.in2 ~= '' and args.in1 ~= '' then
source = args.in1 .. ' et al.';
elseif args.in3 ~= '' and args.in2 ~= '' and args.in1 ~= '' then
source = args.in1 .. ', ' .. args.in2 .. ' & ' .. args.in3;
elseif args.in2 ~= '' and args.in1 ~= '' then
source = args.in1 .. ' & ' .. args.in2;
elseif args.in1 ~= '' then
source = args.in1;
else
args.err_msg = args.err_msg .. ' author missing from source list.'
end
if '' ~= args.year then
source = source .. ' (' .. args.year .. ')';
else
args.err_msg = args.err_msg .. ' missing year.'; -- error message if year not provided
end
source = "[[#CITEREF" .. mw.uri.anchorEncode(table.concat ({args.in1, args.in2, args.in3, args.in4, args.year})) .. "|" .. source .. "]]";
--combine contribution with url to make external link
if args.url ~= '' then
args.contribution = '[' .. args.url .. ' ' .. args.contribution .. ']'; -- format external link
end
if args.separator ~= contributors:sub(-1) then
contributors = contributors .. args.separator; -- add separator if not same as last character in name list (|first=John S. or et al.)
end
if args.p ~= '' then
args.p = args.page_sep .. args.p;
elseif args.pp ~= '' then
args.p = args.pages_sep .. args.pp;
end
if args.loc ~= '' then
args.loc = ', ' .. args.loc;
end
args.p = args.p .. args.loc;
--wrap error messages in span
args.err_msg = '<span style="font-size:100%" class="error">' .. args.err_msg .. '</span>';
-- and put it all together
result = span_open_tag .. contributors .. ' "' .. args.contribution .. '"' .. args.separator .. ' In ' .. source .. args.p .. args.postscript .. '</span>' .. args.err_msg;
return result;
end
--[[--------------------------< F . H A R V C >----------------------------------------------------------------
Entry point from {{harvc}} template. Fetches parent frame parameters, does a bit of simple error checking
]]
function f.harvc (frame)
local args = f.args_default;
pframe = frame:getParent();
args.contribution = pframe.args.c or -- chapter or contribution
pframe.args.chapter or
pframe.args.contribution or '';
args.first = pframe.args.first or pframe.args.first1 or ''; -- (optional) first author's given name; given names for other authors not supported
args.in1 = pframe.args['in'] or pframe.args.in1 or ''; -- source editor surnames; 'in' is a Lua reserved keyword
args.in2 = pframe.args.in2 or '';
args.in3 = pframe.args.in3 or '';
args.in4 = pframe.args.in4 or '';
args.last1 = pframe.args.last or pframe.args.last1 or ''; -- contribution author(s)
args.last2 = pframe.args.last2 or '';
args.last3 = pframe.args.last3 or '';
args.last4 = pframe.args.last4 or '';
args.p = pframe.args.p or ''; -- source page number(s) or location
args.pp = pframe.args.pp or '';
args.loc = pframe.args.loc or '';
args.separator = pframe.args.separator; -- !! before postscript!! element separator defaults to full stop
args.postscript = pframe.args.ps or pframe.args.postscript;
if nil == args.postscript or '' == args.postscript then
if nil == args.separator or '' == args.separator then
args.postscript = '.'; -- neither set so set to defaults
args.separator = '.';
elseif ',' == args.separator then
args.postscript = ''; -- CS2 and postscript not set; no terminal punctuation
else
args.postscript = '.'; -- separator not CS2 and postscript not set; use default terminal punctuation
end
else --postscript set
if 'none' == args.postscript:lower() then -- if |ps=none or |postscript=none then
args.postscript = ''; -- no postscript
end
end
if nil == args.separator then
args.separator = '.'; -- not set in template so set default
end
--[[
args.postscript = pframe.args.ps or pframe.args.postscript or '';
if '' ~= args.postscript then
if 'none' == args.postscript:lower() then -- if |ps=none or |postscript=none then
args.postscript = ''; -- no postscript
end
else -- if |postscript= omitted or present but empty
args.postscript = '.'; -- use default postscript
end
args.separator = pframe.args.separator or '.'; -- element separator defaults to full stop
]]
args.url = pframe.args.url or ''; -- url for chapter or contribution
args.year = pframe.args.year or '';
if '' == args.contribution then
args.err_msg = args.err_msg .. ' required contribution is missing.'; -- error message if source not provided
-- args.url=''; -- if no contribution set url to empty string so we don't link the error message
end
return core (args);
end
--[[
function f.sfn( frame )
local args = f.args_default;
pframe = frame:getParent();
args.postscript = pframe.args.postscript or pframe.args.ps or ".";
args.page = pframe.args.p or pframe.args.page or "";
args.pages = pframe.args.pp or pframe.args.pages or "";
args.location = pframe.args.loc or "";
args.ref = pframe.args.ref or pframe.args.Ref or "";
args.P1 = trim( pframe.args[1] ) or "";
args.P2 = trim( pframe.args[2] ) or "";
args.P3 = trim( pframe.args[3] ) or "";
args.P4 = trim( pframe.args[4] ) or "";
args.P5 = trim( pframe.args[5] ) or "";
local result = core( args );
local name = "FOOTNOTE" .. args.P1 .. args.P2 ..
args.P3 .. args.P4 .. args.P5 .. args.page .. args.pages .. args.location;
result = frame:extensionTag{ name = "ref", args = {name=name}, content=result };
return result;
end
]]
return f;
8omzx1dd47ro27z3vnqp9x3td1hig2w
801866
801865
2014-11-07T15:18:02Z
en>Trappist the monk
0
801866
Scribunto
text/plain
f = {
args_default = {
err_msg = '',
page_sep = ", p. ",
pages_sep = ", pp. ",
}
};
--[[--------------------------< T R I M >----------------------------------------------------------------------
strip leading and trailing white space from positional parameters.
]]
function trim( str )
if str == nil then
return '';
end
return str:match( "^%s*(.-)%s*$");
end
--[[--------------------------< I S _ S E T >------------------------------------------------------------------
Whether variable is set or not
]]
function is_set( var )
return not (var == nil or var == '');
end
--[[--------------------------< C O R E >----------------------------------------------------------------------
Assembles the various parts provided by the template into a properly formatted bridging citation. Adds punctuation
and text; encloses the whole within a span with id and class attributes.
This function mimics the {{sfn}} and {{harv}} templates, but it does not display an author-date list, just an
author list. It is presumed that the dates of contributions are the same as the date of the enclosing work.
Even though not displayed, a date positional parameter is still required for the CITEREF anchor
]]
function core( args )
local span_open_tag; -- holds CITEREF and css
local contributors = ''; -- chapter or contribution authors
local source = ''; -- editor/author date list that forms a CITEREF link to a full citation; mimics harvnb output except year in parentheses
local result; -- the assemby of the above output
-- form the CITEREF anchor
span_open_tag = '<span id="CITEREF' .. table.concat ({args.last1, args.last2, args.last3, args.last4, args.year}) .. '" class="citation">'
-- form the contributors list; similar to {{sfn}} and {{harv}}, 1 to 4 names but no date and also allows first contributor given name
if args.first ~= '' then
args.first = ', ' .. args.first;
end
if args.last4 ~= '' and args.last3 ~= '' and args.last2 ~= '' and args.last1 ~= '' then
contributors = args.last1 .. args.first .. ' et al.';
elseif args.last3 ~= '' and args.last2 ~= '' and args.last1 ~= '' then
contributors = args.last1 .. args.first .. ', ' .. args.last2 .. ' & ' .. args.last3;
elseif args.last2 ~= '' and args.last1 ~= '' then
contributors = args.last1 .. args.first .. ' & ' .. args.last2;
elseif args.last1 ~= '' then
contributors = args.last1 .. args.first;
else
args.err_msg = args.err_msg .. ' author missing from contributor list.';
end
--form the source author-date list
if args.in4 ~= '' and args.in3 ~= '' and args.in2 ~= '' and args.in1 ~= '' then
source = args.in1 .. ' et al.';
elseif args.in3 ~= '' and args.in2 ~= '' and args.in1 ~= '' then
source = args.in1 .. ', ' .. args.in2 .. ' & ' .. args.in3;
elseif args.in2 ~= '' and args.in1 ~= '' then
source = args.in1 .. ' & ' .. args.in2;
elseif args.in1 ~= '' then
source = args.in1;
else
args.err_msg = args.err_msg .. ' author missing from source list.'
end
if '' ~= args.year then
source = source .. ' (' .. args.year .. ')';
else
args.err_msg = args.err_msg .. ' missing year.'; -- error message if year not provided
end
source = "[[#CITEREF" .. mw.uri.anchorEncode(table.concat ({args.in1, args.in2, args.in3, args.in4, args.year})) .. "|" .. source .. "]]";
--combine contribution with url to make external link
if args.url ~= '' then
args.contribution = '[' .. args.url .. ' ' .. args.contribution .. ']'; -- format external link
end
if args.separator ~= contributors:sub(-1) then
contributors = contributors .. args.separator; -- add separator if not same as last character in name list (|first=John S. or et al.)
end
if args.p ~= '' then
args.p = args.page_sep .. args.p;
elseif args.pp ~= '' then
args.p = args.pages_sep .. args.pp;
end
if args.loc ~= '' then
args.loc = ', ' .. args.loc;
end
args.p = args.p .. args.loc;
--wrap error messages in span
args.err_msg = '<span style="font-size:100%" class="error">' .. args.err_msg .. '</span>';
-- and put it all together
result = span_open_tag .. contributors .. ' "' .. args.contribution .. '"' .. args.separator .. ' In ' .. source .. args.p .. args.postscript .. '</span>' .. args.err_msg;
return result;
end
--[[--------------------------< F . H A R V C >----------------------------------------------------------------
Entry point from {{harvc}} template. Fetches parent frame parameters, does a bit of simple error checking
]]
function f.harvc (frame)
local args = f.args_default;
pframe = frame:getParent();
args.contribution = pframe.args.c or -- chapter or contribution
pframe.args.chapter or
pframe.args.contribution or '';
args.first = pframe.args.first or pframe.args.first1 or ''; -- (optional) first author's given name; given names for other authors not supported
args.in1 = pframe.args['in'] or pframe.args.in1 or ''; -- source editor surnames; 'in' is a Lua reserved keyword
args.in2 = pframe.args.in2 or '';
args.in3 = pframe.args.in3 or '';
args.in4 = pframe.args.in4 or '';
args.last1 = pframe.args.last or pframe.args.last1 or ''; -- contribution author(s)
args.last2 = pframe.args.last2 or '';
args.last3 = pframe.args.last3 or '';
args.last4 = pframe.args.last4 or '';
args.p = pframe.args.p or ''; -- source page number(s) or location
args.pp = pframe.args.pp or '';
args.loc = pframe.args.loc or '';
args.separator = pframe.args.separator; -- !! before postscript!! element separator defaults to full stop
args.postscript = pframe.args.ps or pframe.args.postscript;
if not is_set (args.postscript) then
if not is_set (args.separator) then
args.postscript = '.'; -- neither set so set to defaults
args.separator = '.';
elseif ',' == args.separator then
args.postscript = ''; -- CS2 and postscript not set; no terminal punctuation
else
args.postscript = '.'; -- separator not CS2 and postscript not set; use default terminal punctuation
end
else --postscript set
if 'none' == args.postscript:lower() then -- if |ps=none or |postscript=none then
args.postscript = ''; -- no postscript
end
end
if not is_set (args.separator) then
args.separator = '.'; -- not set in template so set default
end
--[[
args.postscript = pframe.args.ps or pframe.args.postscript or '';
if '' ~= args.postscript then
if 'none' == args.postscript:lower() then -- if |ps=none or |postscript=none then
args.postscript = ''; -- no postscript
end
else -- if |postscript= omitted or present but empty
args.postscript = '.'; -- use default postscript
end
args.separator = pframe.args.separator or '.'; -- element separator defaults to full stop
]]
args.url = pframe.args.url or ''; -- url for chapter or contribution
args.year = pframe.args.year or '';
if '' == args.contribution then
args.err_msg = args.err_msg .. ' required contribution is missing.'; -- error message if source not provided
-- args.url=''; -- if no contribution set url to empty string so we don't link the error message
end
return core (args);
end
--[[
function f.sfn( frame )
local args = f.args_default;
pframe = frame:getParent();
args.postscript = pframe.args.postscript or pframe.args.ps or ".";
args.page = pframe.args.p or pframe.args.page or "";
args.pages = pframe.args.pp or pframe.args.pages or "";
args.location = pframe.args.loc or "";
args.ref = pframe.args.ref or pframe.args.Ref or "";
args.P1 = trim( pframe.args[1] ) or "";
args.P2 = trim( pframe.args[2] ) or "";
args.P3 = trim( pframe.args[3] ) or "";
args.P4 = trim( pframe.args[4] ) or "";
args.P5 = trim( pframe.args[5] ) or "";
local result = core( args );
local name = "FOOTNOTE" .. args.P1 .. args.P2 ..
args.P3 .. args.P4 .. args.P5 .. args.page .. args.pages .. args.location;
result = frame:extensionTag{ name = "ref", args = {name=name}, content=result };
return result;
end
]]
return f;
54pfapkn2ngngb9xurq885oveq3fzgd
801867
801866
2014-11-07T15:44:33Z
en>Trappist the monk
0
801867
Scribunto
text/plain
f = {
args_default = {
err_msg = '',
page_sep = ", p. ",
pages_sep = ", pp. ",
}
};
--[[--------------------------< T R I M >----------------------------------------------------------------------
strip leading and trailing white space from positional parameters.
]]
function trim( str )
if str == nil then
return '';
end
return str:match( "^%s*(.-)%s*$");
end
--[[--------------------------< I S _ S E T >------------------------------------------------------------------
Whether variable is set or not
]]
function is_set( var )
return not (var == nil or var == '');
end
--[[--------------------------< C O R E >----------------------------------------------------------------------
Assembles the various parts provided by the template into a properly formatted bridging citation. Adds punctuation
and text; encloses the whole within a span with id and class attributes.
This function mimics the {{sfn}} and {{harv}} templates, but it does not display an author-date list, just an
author list. It is presumed that the dates of contributions are the same as the date of the enclosing work.
Even though not displayed, a date positional parameter is still required for the CITEREF anchor
]]
function core( args )
local span_open_tag; -- holds CITEREF and css
local contributors = ''; -- chapter or contribution authors
local source = ''; -- editor/author date list that forms a CITEREF link to a full citation; mimics harvnb output except year in parentheses
local in_text = ' In '; --
local result; -- the assemby of the above output
-- form the CITEREF anchor
span_open_tag = '<span id="CITEREF' .. table.concat ({args.last1, args.last2, args.last3, args.last4, args.year}) .. '" class="citation">'
-- form the contributors list; similar to {{sfn}} and {{harv}}, 1 to 4 names but no date and also allows first contributor given name
if args.first ~= '' then
args.first = ', ' .. args.first;
end
if args.last4 ~= '' and args.last3 ~= '' and args.last2 ~= '' and args.last1 ~= '' then
contributors = args.last1 .. args.first .. ' et al.';
elseif args.last3 ~= '' and args.last2 ~= '' and args.last1 ~= '' then
contributors = args.last1 .. args.first .. ', ' .. args.last2 .. ' & ' .. args.last3;
elseif args.last2 ~= '' and args.last1 ~= '' then
contributors = args.last1 .. args.first .. ' & ' .. args.last2;
elseif args.last1 ~= '' then
contributors = args.last1 .. args.first;
else
args.err_msg = args.err_msg .. ' author missing from contributor list.';
end
--form the source author-date list
if args.in4 ~= '' and args.in3 ~= '' and args.in2 ~= '' and args.in1 ~= '' then
source = args.in1 .. ' et al.';
elseif args.in3 ~= '' and args.in2 ~= '' and args.in1 ~= '' then
source = args.in1 .. ', ' .. args.in2 .. ' & ' .. args.in3;
elseif args.in2 ~= '' and args.in1 ~= '' then
source = args.in1 .. ' & ' .. args.in2;
elseif args.in1 ~= '' then
source = args.in1;
else
args.err_msg = args.err_msg .. ' author missing from source list.'
end
if '' ~= args.year then
source = source .. ' (' .. args.year .. ')';
else
args.err_msg = args.err_msg .. ' missing year.'; -- error message if year not provided
end
source = "[[#CITEREF" .. mw.uri.anchorEncode(table.concat ({args.in1, args.in2, args.in3, args.in4, args.year})) .. "|" .. source .. "]]";
--combine contribution with url to make external link
if args.url ~= '' then
args.contribution = '[' .. args.url .. ' ' .. args.contribution .. ']'; -- format external link
end
if args.separator ~= contributors:sub(-1) then
contributors = contributors .. args.separator; -- add separator if not same as last character in name list (|first=John S. or et al.)
end
if args.p ~= '' then
args.p = args.page_sep .. args.p;
elseif args.pp ~= '' then
args.p = args.pages_sep .. args.pp;
end
if args.loc ~= '' then
args.loc = ', ' .. args.loc;
end
args.p = args.p .. args.loc;
--wrap error messages in span
args.err_msg = '<span style="font-size:100%" class="error">' .. args.err_msg .. '</span>';
if ',' == args.separator then
in_text = in_text:lower(); -- CS2 style use lower case
end
-- and put it all together
result = span_open_tag .. contributors .. ' "' .. args.contribution .. '"' .. args.separator .. in_text .. source .. args.p .. args.postscript .. '</span>' .. args.err_msg;
return result;
end
--[[--------------------------< F . H A R V C >----------------------------------------------------------------
Entry point from {{harvc}} template. Fetches parent frame parameters, does a bit of simple error checking
]]
function f.harvc (frame)
local args = f.args_default;
pframe = frame:getParent();
args.contribution = pframe.args.c or -- chapter or contribution
pframe.args.chapter or
pframe.args.contribution or '';
args.first = pframe.args.first or pframe.args.first1 or ''; -- (optional) first author's given name; given names for other authors not supported
args.in1 = pframe.args['in'] or pframe.args.in1 or ''; -- source editor surnames; 'in' is a Lua reserved keyword
args.in2 = pframe.args.in2 or '';
args.in3 = pframe.args.in3 or '';
args.in4 = pframe.args.in4 or '';
args.last1 = pframe.args.last or pframe.args.last1 or ''; -- contribution author(s)
args.last2 = pframe.args.last2 or '';
args.last3 = pframe.args.last3 or '';
args.last4 = pframe.args.last4 or '';
args.p = pframe.args.p or ''; -- source page number(s) or location
args.pp = pframe.args.pp or '';
args.loc = pframe.args.loc or '';
args.separator = pframe.args.separator; -- !! before postscript!! element separator defaults to full stop
args.postscript = pframe.args.ps or pframe.args.postscript;
if not is_set (args.postscript) then
if not is_set (args.separator) then
args.postscript = '.'; -- neither set so set to defaults
args.separator = '.';
elseif ',' == args.separator then
args.postscript = ''; -- CS2 and postscript not set; no terminal punctuation
else
args.postscript = '.'; -- separator not CS2 and postscript not set; use default terminal punctuation
end
else --postscript set
if 'none' == args.postscript:lower() then -- if |ps=none or |postscript=none then
args.postscript = ''; -- no postscript
end
end
if not is_set (args.separator) then
args.separator = '.'; -- not set in template so set default
end
--[[
args.postscript = pframe.args.ps or pframe.args.postscript or '';
if '' ~= args.postscript then
if 'none' == args.postscript:lower() then -- if |ps=none or |postscript=none then
args.postscript = ''; -- no postscript
end
else -- if |postscript= omitted or present but empty
args.postscript = '.'; -- use default postscript
end
args.separator = pframe.args.separator or '.'; -- element separator defaults to full stop
]]
args.url = pframe.args.url or ''; -- url for chapter or contribution
args.year = pframe.args.year or '';
if '' == args.contribution then
args.err_msg = args.err_msg .. ' required contribution is missing.'; -- error message if source not provided
-- args.url=''; -- if no contribution set url to empty string so we don't link the error message
end
return core (args);
end
--[[
function f.sfn( frame )
local args = f.args_default;
pframe = frame:getParent();
args.postscript = pframe.args.postscript or pframe.args.ps or ".";
args.page = pframe.args.p or pframe.args.page or "";
args.pages = pframe.args.pp or pframe.args.pages or "";
args.location = pframe.args.loc or "";
args.ref = pframe.args.ref or pframe.args.Ref or "";
args.P1 = trim( pframe.args[1] ) or "";
args.P2 = trim( pframe.args[2] ) or "";
args.P3 = trim( pframe.args[3] ) or "";
args.P4 = trim( pframe.args[4] ) or "";
args.P5 = trim( pframe.args[5] ) or "";
local result = core( args );
local name = "FOOTNOTE" .. args.P1 .. args.P2 ..
args.P3 .. args.P4 .. args.P5 .. args.page .. args.pages .. args.location;
result = frame:extensionTag{ name = "ref", args = {name=name}, content=result };
return result;
end
]]
return f;
8p31mn3vuxcez7ztu9ezuroyqaptijz
801868
801867
2014-11-07T17:31:04Z
en>Trappist the monk
0
801868
Scribunto
text/plain
f = {
args_default = {
err_msg = '',
page_sep = ", p. ",
pages_sep = ", pp. ",
}
};
--[[--------------------------< T R I M >----------------------------------------------------------------------
strip leading and trailing white space from positional parameters.
]]
function trim( str )
if str == nil then
return '';
end
return str:match( "^%s*(.-)%s*$");
end
--[[--------------------------< I S _ S E T >------------------------------------------------------------------
Whether variable is set or not
]]
function is_set( var )
return not (var == nil or var == '');
end
--[[--------------------------< C O R E >----------------------------------------------------------------------
Assembles the various parts provided by the template into a properly formatted bridging citation. Adds punctuation
and text; encloses the whole within a span with id and class attributes.
This function mimics the {{sfn}} and {{harv}} templates, but it does not display an author-date list, just an
author list. It is presumed that the dates of contributions are the same as the date of the enclosing work.
Even though not displayed, a year parameter is still required for the CITEREF anchor
]]
function core( args )
local span_open_tag; -- holds CITEREF and css
local contributors = ''; -- chapter or contribution authors
local source = ''; -- editor/author date list that forms a CITEREF link to a full citation; mimics harvnb output except year in parentheses
local in_text = ' In '; --
local result; -- the assemby of the above output
-- form the CITEREF anchor
span_open_tag = '<span id="CITEREF' .. table.concat ({args.last1, args.last2, args.last3, args.last4, args.year}) .. '" class="citation">'
-- form the contributors list; similar to {{sfn}} and {{harv}}, 1 to 4 names but no date and also allows first contributor given name
if args.first ~= '' then
args.first = ', ' .. args.first;
end
if is_set (args.last4) and is_set (args.last3) and is_set (args.last2) and is_set (args.last1) then
contributors = args.last1 .. args.first .. ' et al.';
elseif is_set (args.last3) and is_set (args.last2) and is_set (args.last1) then
contributors = args.last1 .. args.first .. ', ' .. args.last2 .. ' & ' .. args.last3;
elseif is_set (args.last2) and is_set (args.last1) then
contributors = args.last1 .. args.first .. ' & ' .. args.last2;
elseif is_set (args.last1) then
contributors = args.last1 .. args.first;
else
args.err_msg = args.err_msg .. ' author missing from contributor list.';
end
--form the source author-date list
if is_set (args.in4) and is_set (args.in3) and is_set (args.in2) and is_set (args.in1) then
source = args.in1 .. ' et al.';
elseif is_set (args.in3) and is_set (args.in2) and is_set (args.in1) then
source = args.in1 .. ', ' .. args.in2 .. ' & ' .. args.in3;
elseif is_set (args.in2) and is_set (args.in1) then
source = args.in1 .. ' & ' .. args.in2;
elseif is_set (args.in1) then
source = args.in1;
else
args.err_msg = args.err_msg .. ' author missing from source list.'
end
if args.year:match('^[1-9]%d%d%d%l?') then -- four digits with possible disambiguator
source = source .. ' (' .. args.year .. ')';
else
args.err_msg = args.err_msg .. ' invalid or missing year.'; -- error message if year not provided or malformed
end
--assemble CITEREF wikilink
source = "[[#CITEREF" .. mw.uri.anchorEncode(table.concat ({args.in1, args.in2, args.in3, args.in4, args.year})) .. "|" .. source .. "]]";
--combine contribution with url to make external link
if args.url ~= '' then
args.contribution = '[' .. args.url .. ' ' .. args.contribution .. ']'; -- format external link
end
if args.separator ~= contributors:sub(-1) then
contributors = contributors .. args.separator; -- add separator if not same as last character in name list (|first=John S. or et al.)
end
-- pages and other insource location
if args.p ~= '' then
args.p = args.page_sep .. args.p;
elseif args.pp ~= '' then
args.p = args.pages_sep .. args.pp; -- args.p not set so use it to hold common insource location info
end
if args.loc ~= '' then
args.p = args.p .. ', ' .. args.loc; -- add arg.loc to args.p
end
--wrap error messages in span
args.err_msg = '<span style="font-size:100%" class="error">' .. args.err_msg .. '</span>';
if ',' == args.separator then
in_text = in_text:lower(); -- CS2 style use lower case
end
-- and put it all together
result = span_open_tag .. contributors .. ' "' .. args.contribution .. '"' .. args.separator .. in_text .. source .. args.p .. args.postscript .. '</span>' .. args.err_msg;
return result;
end
--[[--------------------------< F . H A R V C >----------------------------------------------------------------
Entry point from {{harvc}} template. Fetches parent frame parameters, does a bit of simple error checking
]]
function f.harvc (frame)
local args = f.args_default;
pframe = frame:getParent();
args.contribution = pframe.args.c or -- chapter or contribution
pframe.args.chapter or
pframe.args.contribution or '';
args.first = pframe.args.first or pframe.args.first1 or ''; -- (optional) first author's given name; given names for other authors not supported
args.in1 = pframe.args['in'] or pframe.args.in1 or ''; -- source editor surnames; 'in' is a Lua reserved keyword
args.in2 = pframe.args.in2 or '';
args.in3 = pframe.args.in3 or '';
args.in4 = pframe.args.in4 or '';
args.last1 = pframe.args.last or pframe.args.last1 or ''; -- contribution author(s)
args.last2 = pframe.args.last2 or '';
args.last3 = pframe.args.last3 or '';
args.last4 = pframe.args.last4 or '';
args.p = pframe.args.p or ''; -- source page number(s) or location
args.pp = pframe.args.pp or '';
args.loc = pframe.args.loc or '';
args.separator = pframe.args.separator; -- !! before postscript!! element separator defaults to full stop
args.postscript = pframe.args.ps or pframe.args.postscript;
if not is_set (args.postscript) then
if not is_set (args.separator) then
args.postscript = '.'; -- neither set so set to defaults
args.separator = '.';
elseif ',' == args.separator then
args.postscript = ''; -- CS2 and postscript not set; no terminal punctuation
else
args.postscript = '.'; -- separator not CS2 and postscript not set; use default terminal punctuation
end
else -- if here, postscript set
if 'none' == args.postscript:lower() then -- if |ps=none or |postscript=none then
args.postscript = ''; -- no postscript
end
end
if not is_set (args.separator) then
args.separator = '.'; -- not set in template and we didn't set it here so set to default
end
args.url = pframe.args.url or ''; -- url for chapter or contribution
args.year = pframe.args.year or '';
if not is_set (args.contribution) then
args.err_msg = args.err_msg .. ' required contribution is missing.'; -- error message if source not provided
args.contribution = url; -- if set it will give us linkable text
-- args.url=''; -- if no contribution set url to empty string so we don't link the error message
end
return core (args);
end
--[[
function f.sfn( frame )
local args = f.args_default;
pframe = frame:getParent();
args.postscript = pframe.args.postscript or pframe.args.ps or ".";
args.page = pframe.args.p or pframe.args.page or "";
args.pages = pframe.args.pp or pframe.args.pages or "";
args.location = pframe.args.loc or "";
args.ref = pframe.args.ref or pframe.args.Ref or "";
args.P1 = trim( pframe.args[1] ) or "";
args.P2 = trim( pframe.args[2] ) or "";
args.P3 = trim( pframe.args[3] ) or "";
args.P4 = trim( pframe.args[4] ) or "";
args.P5 = trim( pframe.args[5] ) or "";
local result = core( args );
local name = "FOOTNOTE" .. args.P1 .. args.P2 ..
args.P3 .. args.P4 .. args.P5 .. args.page .. args.pages .. args.location;
result = frame:extensionTag{ name = "ref", args = {name=name}, content=result };
return result;
end
]]
return f;
rhryu2kv8byo2chg8payjatt2m5l84i
801869
801868
2014-11-07T17:33:26Z
en>Trappist the monk
0
801869
Scribunto
text/plain
f = {
args_default = {
err_msg = '',
page_sep = ", p. ",
pages_sep = ", pp. ",
}
};
--[[--------------------------< T R I M >----------------------------------------------------------------------
strip leading and trailing white space from positional parameters.
]]
function trim( str )
if str == nil then
return '';
end
return str:match( "^%s*(.-)%s*$");
end
--[[--------------------------< I S _ S E T >------------------------------------------------------------------
Whether variable is set or not
]]
function is_set( var )
return not (var == nil or var == '');
end
--[[--------------------------< C O R E >----------------------------------------------------------------------
Assembles the various parts provided by the template into a properly formatted bridging citation. Adds punctuation
and text; encloses the whole within a span with id and class attributes.
This function mimics the {{sfn}} and {{harv}} templates, but it does not display an author-date list, just an
author list. It is presumed that the dates of contributions are the same as the date of the enclosing work.
Even though not displayed, a year parameter is still required for the CITEREF anchor
]]
function core( args )
local span_open_tag; -- holds CITEREF and css
local contributors = ''; -- chapter or contribution authors
local source = ''; -- editor/author date list that forms a CITEREF link to a full citation; mimics harvnb output except year in parentheses
local in_text = ' In '; --
local result; -- the assemby of the above output
-- form the CITEREF anchor
span_open_tag = '<span id="CITEREF' .. table.concat ({args.last1, args.last2, args.last3, args.last4, args.year}) .. '" class="citation">'
-- form the contributors list; similar to {{sfn}} and {{harv}}, 1 to 4 names but no date and also allows first contributor given name
if args.first ~= '' then
args.first = ', ' .. args.first;
end
if is_set (args.last4) and is_set (args.last3) and is_set (args.last2) and is_set (args.last1) then
contributors = args.last1 .. args.first .. ' et al.';
elseif is_set (args.last3) and is_set (args.last2) and is_set (args.last1) then
contributors = args.last1 .. args.first .. ', ' .. args.last2 .. ' & ' .. args.last3;
elseif is_set (args.last2) and is_set (args.last1) then
contributors = args.last1 .. args.first .. ' & ' .. args.last2;
elseif is_set (args.last1) then
contributors = args.last1 .. args.first;
else
args.err_msg = args.err_msg .. ' author missing from contributor list.';
end
--form the source author-date list
if is_set (args.in4) and is_set (args.in3) and is_set (args.in2) and is_set (args.in1) then
source = args.in1 .. ' et al.';
elseif is_set (args.in3) and is_set (args.in2) and is_set (args.in1) then
source = args.in1 .. ', ' .. args.in2 .. ' & ' .. args.in3;
elseif is_set (args.in2) and is_set (args.in1) then
source = args.in1 .. ' & ' .. args.in2;
elseif is_set (args.in1) then
source = args.in1;
else
args.err_msg = args.err_msg .. ' author missing from source list.'
end
if args.year:match('^[1-9]%d%d%d%l?') then -- four digits with possible disambiguator
source = source .. ' (' .. args.year .. ')';
else
args.err_msg = args.err_msg .. ' invalid or missing year.'; -- error message if year not provided or malformed
end
--assemble CITEREF wikilink
source = "[[#CITEREF" .. mw.uri.anchorEncode(table.concat ({args.in1, args.in2, args.in3, args.in4, args.year})) .. "|" .. source .. "]]";
--combine contribution with url to make external link
if args.url ~= '' then
args.contribution = '[' .. args.url .. ' ' .. args.contribution .. ']'; -- format external link
end
if args.separator ~= contributors:sub(-1) then
contributors = contributors .. args.separator; -- add separator if not same as last character in name list (|first=John S. or et al.)
end
-- pages and other insource location
if args.p ~= '' then
args.p = args.page_sep .. args.p;
elseif args.pp ~= '' then
args.p = args.pages_sep .. args.pp; -- args.p not set so use it to hold common insource location info
end
if args.loc ~= '' then
args.p = args.p .. ', ' .. args.loc; -- add arg.loc to args.p
end
--wrap error messages in span
args.err_msg = '<span style="font-size:100%" class="error">' .. args.err_msg .. '</span>';
if ',' == args.separator then
in_text = in_text:lower(); -- CS2 style use lower case
end
-- and put it all together
result = span_open_tag .. contributors .. ' "' .. args.contribution .. '"' .. args.separator .. in_text .. source .. args.p .. args.postscript .. '</span>' .. args.err_msg;
return result;
end
--[[--------------------------< F . H A R V C >----------------------------------------------------------------
Entry point from {{harvc}} template. Fetches parent frame parameters, does a bit of simple error checking
]]
function f.harvc (frame)
local args = f.args_default;
pframe = frame:getParent();
args.contribution = pframe.args.c or -- chapter or contribution
pframe.args.chapter or
pframe.args.contribution or '';
args.first = pframe.args.first or pframe.args.first1 or ''; -- (optional) first author's given name; given names for other authors not supported
args.in1 = pframe.args['in'] or pframe.args.in1 or ''; -- source editor surnames; 'in' is a Lua reserved keyword
args.in2 = pframe.args.in2 or '';
args.in3 = pframe.args.in3 or '';
args.in4 = pframe.args.in4 or '';
args.last1 = pframe.args.last or pframe.args.last1 or ''; -- contribution author(s)
args.last2 = pframe.args.last2 or '';
args.last3 = pframe.args.last3 or '';
args.last4 = pframe.args.last4 or '';
args.p = pframe.args.p or ''; -- source page number(s) or location
args.pp = pframe.args.pp or '';
args.loc = pframe.args.loc or '';
args.separator = pframe.args.separator; -- !! before postscript!! element separator defaults to full stop
args.postscript = pframe.args.ps or pframe.args.postscript;
if not is_set (args.postscript) then
if not is_set (args.separator) then
args.postscript = '.'; -- neither set so set to defaults
args.separator = '.';
elseif ',' == args.separator then
args.postscript = ''; -- CS2 and postscript not set; no terminal punctuation
else
args.postscript = '.'; -- separator not CS2 and postscript not set; use default terminal punctuation
end
else -- if here, postscript set
if 'none' == args.postscript:lower() then -- if |ps=none or |postscript=none then
args.postscript = ''; -- no postscript
end
end
if not is_set (args.separator) then
args.separator = '.'; -- not set in template and we didn't set it here so set to default
end
args.url = pframe.args.url or ''; -- url for chapter or contribution
args.year = pframe.args.year or '';
if not is_set (args.contribution) then
args.err_msg = args.err_msg .. ' required contribution is missing.'; -- error message if source not provided
args.contribution = args.url; -- if set it will give us linkable text
-- args.url=''; -- if no contribution set url to empty string so we don't link the error message
end
return core (args);
end
--[[
function f.sfn( frame )
local args = f.args_default;
pframe = frame:getParent();
args.postscript = pframe.args.postscript or pframe.args.ps or ".";
args.page = pframe.args.p or pframe.args.page or "";
args.pages = pframe.args.pp or pframe.args.pages or "";
args.location = pframe.args.loc or "";
args.ref = pframe.args.ref or pframe.args.Ref or "";
args.P1 = trim( pframe.args[1] ) or "";
args.P2 = trim( pframe.args[2] ) or "";
args.P3 = trim( pframe.args[3] ) or "";
args.P4 = trim( pframe.args[4] ) or "";
args.P5 = trim( pframe.args[5] ) or "";
local result = core( args );
local name = "FOOTNOTE" .. args.P1 .. args.P2 ..
args.P3 .. args.P4 .. args.P5 .. args.page .. args.pages .. args.location;
result = frame:extensionTag{ name = "ref", args = {name=name}, content=result };
return result;
end
]]
return f;
dqyg747nn3y5tcbgxmqgt0sjdvzteke
801870
801869
2014-11-08T11:33:25Z
en>Trappist the monk
0
801870
Scribunto
text/plain
f = {
args_default = {
err_msg = '',
page_sep = ", p. ",
pages_sep = ", pp. ",
}
};
--[[--------------------------< T R I M >----------------------------------------------------------------------
strip leading and trailing white space from positional parameters.
]]
function trim( str )
if str == nil then
return '';
end
return str:match( "^%s*(.-)%s*$");
end
--[[--------------------------< I S _ S E T >------------------------------------------------------------------
Whether variable is set or not
]]
function is_set( var )
return not (var == nil or var == '');
end
--[[--------------------------< C O R E >----------------------------------------------------------------------
Assembles the various parts provided by the template into a properly formatted bridging citation. Adds punctuation
and text; encloses the whole within a span with id and class attributes.
This function mimics the {{sfn}} and {{harv}} templates, but it does not display an author-date list, just an
author list. It is presumed that the dates of contributions are the same as the date of the enclosing work.
Even though not displayed, a year parameter is still required for the CITEREF anchor
]]
function core( args )
local span_open_tag; -- holds CITEREF and css
local contributors = ''; -- chapter or contribution authors
local source = ''; -- editor/author date list that forms a CITEREF link to a full citation; mimics harvnb output except year in parentheses
local in_text = ' In '; --
local result; -- the assemby of the above output
-- form the CITEREF anchor
span_open_tag = '<span id="CITEREF' .. table.concat ({args.last1, args.last2, args.last3, args.last4, args.year}) .. '" class="citation">'
-- form the contributors list; similar to {{sfn}} and {{harv}}, 1 to 4 names but no date and also allows first contributor given name
if args.first ~= '' then
args.first = ', ' .. args.first;
end
if is_set (args.last4) and is_set (args.last3) and is_set (args.last2) and is_set (args.last1) then
contributors = args.last1 .. args.first .. ' et al.';
elseif is_set (args.last3) and is_set (args.last2) and is_set (args.last1) then
contributors = args.last1 .. args.first .. ', ' .. args.last2 .. ' & ' .. args.last3;
elseif is_set (args.last2) and is_set (args.last1) then
contributors = args.last1 .. args.first .. ' & ' .. args.last2;
elseif is_set (args.last1) then
contributors = args.last1 .. args.first;
else
args.err_msg = args.err_msg .. ' author missing from contributor list.';
end
--form the source author-date list
if is_set (args.in4) and is_set (args.in3) and is_set (args.in2) and is_set (args.in1) then
source = args.in1 .. ' et al.';
elseif is_set (args.in3) and is_set (args.in2) and is_set (args.in1) then
source = args.in1 .. ', ' .. args.in2 .. ' & ' .. args.in3;
elseif is_set (args.in2) and is_set (args.in1) then
source = args.in1 .. ' & ' .. args.in2;
elseif is_set (args.in1) then
source = args.in1;
else
args.err_msg = args.err_msg .. ' author missing from source list.'
end
if args.year:match('^[1-9]%d%d%d?%l?') then -- four digits with possible disambiguator
source = source .. ' (' .. args.year .. ')';
else
args.err_msg = args.err_msg .. ' invalid or missing year.'; -- error message if year not provided or malformed
end
--assemble CITEREF wikilink
source = "[[#CITEREF" .. mw.uri.anchorEncode(table.concat ({args.in1, args.in2, args.in3, args.in4, args.year})) .. "|" .. source .. "]]";
--combine contribution with url to make external link
if args.url ~= '' then
args.contribution = '[' .. args.url .. ' ' .. args.contribution .. ']'; -- format external link
end
if args.separator ~= contributors:sub(-1) then
contributors = contributors .. args.separator; -- add separator if not same as last character in name list (|first=John S. or et al.)
end
-- pages and other insource location
if args.p ~= '' then
args.p = args.page_sep .. args.p;
elseif args.pp ~= '' then
args.p = args.pages_sep .. args.pp; -- args.p not set so use it to hold common insource location info
end
if args.loc ~= '' then
args.p = args.p .. ', ' .. args.loc; -- add arg.loc to args.p
end
--wrap error messages in span
args.err_msg = '<span style="font-size:100%" class="error">' .. args.err_msg .. '</span>';
if ',' == args.separator then
in_text = in_text:lower(); -- CS2 style use lower case
end
-- and put it all together
result = span_open_tag .. contributors .. ' "' .. args.contribution .. '"' .. args.separator .. in_text .. source .. args.p .. args.postscript .. '</span>' .. args.err_msg;
return result;
end
--[[--------------------------< F . H A R V C >----------------------------------------------------------------
Entry point from {{harvc}} template. Fetches parent frame parameters, does a bit of simple error checking
]]
function f.harvc (frame)
local args = f.args_default;
pframe = frame:getParent();
args.contribution = pframe.args.c or -- chapter or contribution
pframe.args.chapter or
pframe.args.contribution or '';
args.first = pframe.args.first or pframe.args.first1 or ''; -- (optional) first author's given name; given names for other authors not supported
args.in1 = pframe.args['in'] or pframe.args.in1 or ''; -- source editor surnames; 'in' is a Lua reserved keyword
args.in2 = pframe.args.in2 or '';
args.in3 = pframe.args.in3 or '';
args.in4 = pframe.args.in4 or '';
args.last1 = pframe.args.last or pframe.args.last1 or ''; -- contribution author(s)
args.last2 = pframe.args.last2 or '';
args.last3 = pframe.args.last3 or '';
args.last4 = pframe.args.last4 or '';
args.p = pframe.args.p or ''; -- source page number(s) or location
args.pp = pframe.args.pp or '';
args.loc = pframe.args.loc or '';
args.separator = pframe.args.separator; -- !! before postscript!! element separator defaults to full stop
args.postscript = pframe.args.ps or pframe.args.postscript;
if not is_set (args.postscript) then
if not is_set (args.separator) then
args.postscript = '.'; -- neither set so set to defaults
args.separator = '.';
elseif ',' == args.separator then
args.postscript = ''; -- CS2 and postscript not set; no terminal punctuation
else
args.postscript = '.'; -- separator not CS2 and postscript not set; use default terminal punctuation
end
else -- if here, postscript set
if 'none' == args.postscript:lower() then -- if |ps=none or |postscript=none then
args.postscript = ''; -- no postscript
end
end
if not is_set (args.separator) then
args.separator = '.'; -- not set in template and we didn't set it here so set to default
end
args.url = pframe.args.url or ''; -- url for chapter or contribution
args.year = pframe.args.year or '';
if not is_set (args.contribution) then
args.err_msg = args.err_msg .. ' required contribution is missing.'; -- error message if source not provided
args.contribution = args.url; -- if set it will give us linkable text
-- args.url=''; -- if no contribution set url to empty string so we don't link the error message
end
return core (args);
end
--[[
function f.sfn( frame )
local args = f.args_default;
pframe = frame:getParent();
args.postscript = pframe.args.postscript or pframe.args.ps or ".";
args.page = pframe.args.p or pframe.args.page or "";
args.pages = pframe.args.pp or pframe.args.pages or "";
args.location = pframe.args.loc or "";
args.ref = pframe.args.ref or pframe.args.Ref or "";
args.P1 = trim( pframe.args[1] ) or "";
args.P2 = trim( pframe.args[2] ) or "";
args.P3 = trim( pframe.args[3] ) or "";
args.P4 = trim( pframe.args[4] ) or "";
args.P5 = trim( pframe.args[5] ) or "";
local result = core( args );
local name = "FOOTNOTE" .. args.P1 .. args.P2 ..
args.P3 .. args.P4 .. args.P5 .. args.page .. args.pages .. args.location;
result = frame:extensionTag{ name = "ref", args = {name=name}, content=result };
return result;
end
]]
return f;
65kapnzf330opt68nlqsu349qdrjq4y
801871
801870
2014-11-08T11:41:21Z
en>Trappist the monk
0
no date: n.d. or nd;
801871
Scribunto
text/plain
f = {
args_default = {
err_msg = '',
page_sep = ", p. ",
pages_sep = ", pp. ",
}
};
--[[--------------------------< T R I M >----------------------------------------------------------------------
strip leading and trailing white space from positional parameters.
]]
function trim( str )
if str == nil then
return '';
end
return str:match( "^%s*(.-)%s*$");
end
--[[--------------------------< I S _ S E T >------------------------------------------------------------------
Whether variable is set or not
]]
function is_set( var )
return not (var == nil or var == '');
end
--[[--------------------------< C O R E >----------------------------------------------------------------------
Assembles the various parts provided by the template into a properly formatted bridging citation. Adds punctuation
and text; encloses the whole within a span with id and class attributes.
This function mimics the {{sfn}} and {{harv}} templates, but it does not display an author-date list, just an
author list. It is presumed that the dates of contributions are the same as the date of the enclosing work.
Even though not displayed, a year parameter is still required for the CITEREF anchor
]]
function core( args )
local span_open_tag; -- holds CITEREF and css
local contributors = ''; -- chapter or contribution authors
local source = ''; -- editor/author date list that forms a CITEREF link to a full citation; mimics harvnb output except year in parentheses
local in_text = ' In '; --
local result; -- the assemby of the above output
-- form the CITEREF anchor
span_open_tag = '<span id="CITEREF' .. table.concat ({args.last1, args.last2, args.last3, args.last4, args.year}) .. '" class="citation">'
-- form the contributors list; similar to {{sfn}} and {{harv}}, 1 to 4 names but no date and also allows first contributor given name
if args.first ~= '' then
args.first = ', ' .. args.first;
end
if is_set (args.last4) and is_set (args.last3) and is_set (args.last2) and is_set (args.last1) then
contributors = args.last1 .. args.first .. ' et al.';
elseif is_set (args.last3) and is_set (args.last2) and is_set (args.last1) then
contributors = args.last1 .. args.first .. ', ' .. args.last2 .. ' & ' .. args.last3;
elseif is_set (args.last2) and is_set (args.last1) then
contributors = args.last1 .. args.first .. ' & ' .. args.last2;
elseif is_set (args.last1) then
contributors = args.last1 .. args.first;
else
args.err_msg = args.err_msg .. ' author missing from contributor list.';
end
--form the source author-date list
if is_set (args.in4) and is_set (args.in3) and is_set (args.in2) and is_set (args.in1) then
source = args.in1 .. ' et al.';
elseif is_set (args.in3) and is_set (args.in2) and is_set (args.in1) then
source = args.in1 .. ', ' .. args.in2 .. ' & ' .. args.in3;
elseif is_set (args.in2) and is_set (args.in1) then
source = args.in1 .. ' & ' .. args.in2;
elseif is_set (args.in1) then
source = args.in1;
else
args.err_msg = args.err_msg .. ' author missing from source list.'
end
if args.year:match('^[1-9]%d%d%d?%l?$') or args.year:match('^n%.d%.%l?$') or args.year:match('^nd%l?$') then -- 3 or 4 digits, n.d., or nd and optional disambiguator
source = source .. ' (' .. args.year .. ')';
else
args.err_msg = args.err_msg .. ' invalid or missing year.'; -- error message if year not provided or malformed
end
--assemble CITEREF wikilink
source = "[[#CITEREF" .. mw.uri.anchorEncode(table.concat ({args.in1, args.in2, args.in3, args.in4, args.year})) .. "|" .. source .. "]]";
--combine contribution with url to make external link
if args.url ~= '' then
args.contribution = '[' .. args.url .. ' ' .. args.contribution .. ']'; -- format external link
end
if args.separator ~= contributors:sub(-1) then
contributors = contributors .. args.separator; -- add separator if not same as last character in name list (|first=John S. or et al.)
end
-- pages and other insource location
if args.p ~= '' then
args.p = args.page_sep .. args.p;
elseif args.pp ~= '' then
args.p = args.pages_sep .. args.pp; -- args.p not set so use it to hold common insource location info
end
if args.loc ~= '' then
args.p = args.p .. ', ' .. args.loc; -- add arg.loc to args.p
end
--wrap error messages in span
args.err_msg = '<span style="font-size:100%" class="error">' .. args.err_msg .. '</span>';
if ',' == args.separator then
in_text = in_text:lower(); -- CS2 style use lower case
end
-- and put it all together
result = span_open_tag .. contributors .. ' "' .. args.contribution .. '"' .. args.separator .. in_text .. source .. args.p .. args.postscript .. '</span>' .. args.err_msg;
return result;
end
--[[--------------------------< F . H A R V C >----------------------------------------------------------------
Entry point from {{harvc}} template. Fetches parent frame parameters, does a bit of simple error checking
]]
function f.harvc (frame)
local args = f.args_default;
pframe = frame:getParent();
args.contribution = pframe.args.c or -- chapter or contribution
pframe.args.chapter or
pframe.args.contribution or '';
args.first = pframe.args.first or pframe.args.first1 or ''; -- (optional) first author's given name; given names for other authors not supported
args.in1 = pframe.args['in'] or pframe.args.in1 or ''; -- source editor surnames; 'in' is a Lua reserved keyword
args.in2 = pframe.args.in2 or '';
args.in3 = pframe.args.in3 or '';
args.in4 = pframe.args.in4 or '';
args.last1 = pframe.args.last or pframe.args.last1 or ''; -- contribution author(s)
args.last2 = pframe.args.last2 or '';
args.last3 = pframe.args.last3 or '';
args.last4 = pframe.args.last4 or '';
args.p = pframe.args.p or ''; -- source page number(s) or location
args.pp = pframe.args.pp or '';
args.loc = pframe.args.loc or '';
args.separator = pframe.args.separator; -- !! before postscript!! element separator defaults to full stop
args.postscript = pframe.args.ps or pframe.args.postscript;
if not is_set (args.postscript) then
if not is_set (args.separator) then
args.postscript = '.'; -- neither set so set to defaults
args.separator = '.';
elseif ',' == args.separator then
args.postscript = ''; -- CS2 and postscript not set; no terminal punctuation
else
args.postscript = '.'; -- separator not CS2 and postscript not set; use default terminal punctuation
end
else -- if here, postscript set
if 'none' == args.postscript:lower() then -- if |ps=none or |postscript=none then
args.postscript = ''; -- no postscript
end
end
if not is_set (args.separator) then
args.separator = '.'; -- not set in template and we didn't set it here so set to default
end
args.url = pframe.args.url or ''; -- url for chapter or contribution
args.year = pframe.args.year or '';
if not is_set (args.contribution) then
args.err_msg = args.err_msg .. ' required contribution is missing.'; -- error message if source not provided
args.contribution = args.url; -- if set it will give us linkable text
-- args.url=''; -- if no contribution set url to empty string so we don't link the error message
end
return core (args);
end
--[[
function f.sfn( frame )
local args = f.args_default;
pframe = frame:getParent();
args.postscript = pframe.args.postscript or pframe.args.ps or ".";
args.page = pframe.args.p or pframe.args.page or "";
args.pages = pframe.args.pp or pframe.args.pages or "";
args.location = pframe.args.loc or "";
args.ref = pframe.args.ref or pframe.args.Ref or "";
args.P1 = trim( pframe.args[1] ) or "";
args.P2 = trim( pframe.args[2] ) or "";
args.P3 = trim( pframe.args[3] ) or "";
args.P4 = trim( pframe.args[4] ) or "";
args.P5 = trim( pframe.args[5] ) or "";
local result = core( args );
local name = "FOOTNOTE" .. args.P1 .. args.P2 ..
args.P3 .. args.P4 .. args.P5 .. args.page .. args.pages .. args.location;
result = frame:extensionTag{ name = "ref", args = {name=name}, content=result };
return result;
end
]]
return f;
81dylay7etfcgeboppfui6msw0vzo9o
801872
801871
2014-11-08T13:46:36Z
en>Trappist the monk
0
add id parameter;
801872
Scribunto
text/plain
f = {
args_default = {
err_msg = '',
page_sep = ", p. ",
pages_sep = ", pp. ",
}
};
--[[--------------------------< T R I M >----------------------------------------------------------------------
strip leading and trailing white space from positional parameters.
]]
function trim( str )
if str == nil then
return '';
end
return str:match( "^%s*(.-)%s*$");
end
--[[--------------------------< I S _ S E T >------------------------------------------------------------------
Whether variable is set or not
]]
function is_set( var )
return not (var == nil or var == '');
end
--[[--------------------------< C O R E >----------------------------------------------------------------------
Assembles the various parts provided by the template into a properly formatted bridging citation. Adds punctuation
and text; encloses the whole within a span with id and class attributes.
This function mimics the {{sfn}} and {{harv}} templates, but it does not display an author-date list, just an
author list. It is presumed that the dates of contributions are the same as the date of the enclosing work.
Even though not displayed, a year parameter is still required for the CITEREF anchor
]]
function core( args )
local span_open_tag; -- holds CITEREF and css
local contributors = ''; -- chapter or contribution authors
local source = ''; -- editor/author date list that forms a CITEREF link to a full citation; mimics harvnb output except year in parentheses
local in_text = ' In '; --
local result; -- the assemby of the above output
-- form the CITEREF anchor
if is_set (args.id) then
span_open_tag = '<span id="' .. args.id .. '" class="citation">'; -- for use when contributor name is same as source name
else
span_open_tag = '<span id="CITEREF' .. table.concat ({args.last1, args.last2, args.last3, args.last4, args.year}) .. '" class="citation">';
end
-- form the contributors list; similar to {{sfn}} and {{harv}}, 1 to 4 names but no date and also allows first contributor given name
if args.first ~= '' then
args.first = ', ' .. args.first;
end
if is_set (args.last4) and is_set (args.last3) and is_set (args.last2) and is_set (args.last1) then
contributors = args.last1 .. args.first .. ' et al.';
elseif is_set (args.last3) and is_set (args.last2) and is_set (args.last1) then
contributors = args.last1 .. args.first .. ', ' .. args.last2 .. ' & ' .. args.last3;
elseif is_set (args.last2) and is_set (args.last1) then
contributors = args.last1 .. args.first .. ' & ' .. args.last2;
elseif is_set (args.last1) then
contributors = args.last1 .. args.first;
else
args.err_msg = args.err_msg .. ' author missing from contributor list.';
end
--form the source author-date list
if is_set (args.in4) and is_set (args.in3) and is_set (args.in2) and is_set (args.in1) then
source = args.in1 .. ' et al.';
elseif is_set (args.in3) and is_set (args.in2) and is_set (args.in1) then
source = args.in1 .. ', ' .. args.in2 .. ' & ' .. args.in3;
elseif is_set (args.in2) and is_set (args.in1) then
source = args.in1 .. ' & ' .. args.in2;
elseif is_set (args.in1) then
source = args.in1;
else
args.err_msg = args.err_msg .. ' author missing from source list.'
end
if args.year:match('^[1-9]%d%d%d?%l?$') or args.year:match('^n%.d%.%l?$') or args.year:match('^nd%l?$') then -- 3 or 4 digits, n.d., or nd and optional disambiguator
source = source .. ' (' .. args.year .. ')';
else
args.err_msg = args.err_msg .. ' invalid or missing year.'; -- error message if year not provided or malformed
end
--assemble CITEREF wikilink
source = "[[#CITEREF" .. mw.uri.anchorEncode(table.concat ({args.in1, args.in2, args.in3, args.in4, args.year})) .. "|" .. source .. "]]";
--combine contribution with url to make external link
if args.url ~= '' then
args.contribution = '[' .. args.url .. ' ' .. args.contribution .. ']'; -- format external link
end
if args.separator ~= contributors:sub(-1) then
contributors = contributors .. args.separator; -- add separator if not same as last character in name list (|first=John S. or et al.)
end
-- pages and other insource location
if args.p ~= '' then
args.p = args.page_sep .. args.p;
elseif args.pp ~= '' then
args.p = args.pages_sep .. args.pp; -- args.p not set so use it to hold common insource location info
end
if args.loc ~= '' then
args.p = args.p .. ', ' .. args.loc; -- add arg.loc to args.p
end
--wrap error messages in span
args.err_msg = '<span style="font-size:100%" class="error">' .. args.err_msg .. '</span>';
if ',' == args.separator then
in_text = in_text:lower(); -- CS2 style use lower case
end
-- and put it all together
result = span_open_tag .. contributors .. ' "' .. args.contribution .. '"' .. args.separator .. in_text .. source .. args.p .. args.postscript .. '</span>' .. args.err_msg;
return result;
end
--[[--------------------------< F . H A R V C >----------------------------------------------------------------
Entry point from {{harvc}} template. Fetches parent frame parameters, does a bit of simple error checking
]]
function f.harvc (frame)
local args = f.args_default;
pframe = frame:getParent();
args.contribution = pframe.args.c or -- chapter or contribution
pframe.args.chapter or
pframe.args.contribution or '';
args.first = pframe.args.first or pframe.args.first1 or ''; -- (optional) first author's given name; given names for other authors not supported
args.id = pframe.args.id or '';
args.in1 = pframe.args['in'] or pframe.args.in1 or ''; -- source editor surnames; 'in' is a Lua reserved keyword
args.in2 = pframe.args.in2 or '';
args.in3 = pframe.args.in3 or '';
args.in4 = pframe.args.in4 or '';
args.last1 = pframe.args.last or pframe.args.last1 or ''; -- contribution author(s)
args.last2 = pframe.args.last2 or '';
args.last3 = pframe.args.last3 or '';
args.last4 = pframe.args.last4 or '';
args.p = pframe.args.p or ''; -- source page number(s) or location
args.pp = pframe.args.pp or '';
args.loc = pframe.args.loc or '';
args.separator = pframe.args.separator; -- !! before postscript!! element separator defaults to full stop
args.postscript = pframe.args.ps or pframe.args.postscript;
if not is_set (args.postscript) then
if not is_set (args.separator) then
args.postscript = '.'; -- neither set so set to defaults
args.separator = '.';
elseif ',' == args.separator then
args.postscript = ''; -- CS2 and postscript not set; no terminal punctuation
else
args.postscript = '.'; -- separator not CS2 and postscript not set; use default terminal punctuation
end
else -- if here, postscript set
if 'none' == args.postscript:lower() then -- if |ps=none or |postscript=none then
args.postscript = ''; -- no postscript
end
end
if not is_set (args.separator) then
args.separator = '.'; -- not set in template and we didn't set it here so set to default
end
args.url = pframe.args.url or ''; -- url for chapter or contribution
args.year = pframe.args.year or '';
if not is_set (args.contribution) then
args.err_msg = args.err_msg .. ' required contribution is missing.'; -- error message if source not provided
args.contribution = args.url; -- if set it will give us linkable text
end
return core (args);
end
--[[
function f.sfn( frame )
local args = f.args_default;
pframe = frame:getParent();
args.postscript = pframe.args.postscript or pframe.args.ps or ".";
args.page = pframe.args.p or pframe.args.page or "";
args.pages = pframe.args.pp or pframe.args.pages or "";
args.location = pframe.args.loc or "";
args.ref = pframe.args.ref or pframe.args.Ref or "";
args.P1 = trim( pframe.args[1] ) or "";
args.P2 = trim( pframe.args[2] ) or "";
args.P3 = trim( pframe.args[3] ) or "";
args.P4 = trim( pframe.args[4] ) or "";
args.P5 = trim( pframe.args[5] ) or "";
local result = core( args );
local name = "FOOTNOTE" .. args.P1 .. args.P2 ..
args.P3 .. args.P4 .. args.P5 .. args.page .. args.pages .. args.location;
result = frame:extensionTag{ name = "ref", args = {name=name}, content=result };
return result;
end
]]
return f;
4lntsqp218d8qo5wnbtexpshm5erk8g
801873
801872
2014-11-08T14:53:54Z
en>Trappist the monk
0
801873
Scribunto
text/plain
f = {
args_default = {
err_msg = '',
page_sep = ", p. ",
pages_sep = ", pp. ",
}
};
--[[--------------------------< T R I M >----------------------------------------------------------------------
strip leading and trailing white space from positional parameters.
]]
function trim( str )
if str == nil then
return '';
end
return str:match( "^%s*(.-)%s*$");
end
--[[--------------------------< I S _ S E T >------------------------------------------------------------------
Whether variable is set or not
]]
function is_set( var )
return not (var == nil or var == '');
end
--[[--------------------------< C O R E >----------------------------------------------------------------------
Assembles the various parts provided by the template into a properly formatted bridging citation. Adds punctuation
and text; encloses the whole within a span with id and class attributes.
This function mimics the {{sfn}} and {{harv}} templates, but it does not display an author-date list, just an
author list. It is presumed that the dates of contributions are the same as the date of the enclosing work.
Even though not displayed, a year parameter is still required for the CITEREF anchor
]]
function core( args )
local span_open_tag; -- holds CITEREF and css
local contributors = ''; -- chapter or contribution authors
local source = ''; -- editor/author date list that forms a CITEREF link to a full citation; mimics harvnb output except year in parentheses
local in_text = ' In '; --
local result; -- the assemby of the above output
-- form the CITEREF anchor
if is_set (args.id) then
span_open_tag = '<span id="' .. args.id .. '" class="citation">'; -- for use when contributor name is same as source name
else
span_open_tag = '<span id="CITEREF' .. table.concat ({args.last1, args.last2, args.last3, args.last4, args.year}) .. '" class="citation">';
end
-- form the contributors list; similar to {{sfn}} and {{harv}}, 1 to 4 names but no date and also allows first contributor given name
if args.first ~= '' then
args.first = ', ' .. args.first;
end
if is_set (args.last4) and is_set (args.last3) and is_set (args.last2) and is_set (args.last1) then
contributors = args.last1 .. args.first .. ' et al.';
elseif is_set (args.last3) and is_set (args.last2) and is_set (args.last1) then
contributors = args.last1 .. args.first .. ', ' .. args.last2 .. ' & ' .. args.last3;
elseif is_set (args.last2) and is_set (args.last1) then
contributors = args.last1 .. args.first .. ' & ' .. args.last2;
elseif is_set (args.last1) then
contributors = args.last1 .. args.first;
else
args.err_msg = args.err_msg .. ' author missing from contributor list.';
end
--form the source author-date list
if is_set (args.in4) and is_set (args.in3) and is_set (args.in2) and is_set (args.in1) then
source = args.in1 .. ' et al.';
elseif is_set (args.in3) and is_set (args.in2) and is_set (args.in1) then
source = args.in1 .. ', ' .. args.in2 .. ' & ' .. args.in3;
elseif is_set (args.in2) and is_set (args.in1) then
source = args.in1 .. ' & ' .. args.in2;
elseif is_set (args.in1) then
source = args.in1;
else
args.err_msg = args.err_msg .. ' author missing from source list.'
end
if args.year:match('^[1-9]%d%d%d?%l?$') or args.year:match('^n%.d%.%l?$') or args.year:match('^nd%l?$') then -- 3 or 4 digits, n.d., or nd and optional disambiguator
source = source .. ' (' .. args.year .. ')';
else
args.err_msg = args.err_msg .. ' invalid or missing year.'; -- error message if year not provided or malformed
end
--assemble CITEREF wikilink
source = "[[#CITEREF" .. mw.uri.anchorEncode(table.concat ({args.in1, args.in2, args.in3, args.in4, args.year})) .. "|" .. source .. "]]";
--combine contribution with url to make external link
if args.url ~= '' then
args.contribution = '[' .. args.url .. ' ' .. args.contribution .. ']'; -- format external link
end
if args.separator ~= contributors:sub(-1) then
contributors = contributors .. args.separator; -- add separator if not same as last character in name list (|first=John S. or et al.)
end
-- pages and other insource location
if args.p ~= '' then
args.p = args.page_sep .. args.p;
elseif args.pp ~= '' then
args.p = args.pages_sep .. args.pp; -- args.p not set so use it to hold common insource location info
end
if args.loc ~= '' then
args.p = args.p .. ', ' .. args.loc; -- add arg.loc to args.p
end
--wrap error messages in span
args.err_msg = '<span style="font-size:100%" class="error">' .. args.err_msg .. '</span>';
if ',' == args.separator then
in_text = in_text:lower(); -- CS2 style use lower case
end
-- and put it all together
result = span_open_tag .. contributors .. ' "' .. args.contribution .. '"' .. args.separator .. in_text .. source .. args.p .. args.postscript .. '</span>' .. args.err_msg;
return result;
end
--[[--------------------------< F . H A R V C >----------------------------------------------------------------
Entry point from {{harvc}} template. Fetches parent frame parameters, does a bit of simple error checking
]]
function f.harvc (frame)
local args = f.args_default;
pframe = frame:getParent();
args.contribution = pframe.args.c or -- chapter or contribution
pframe.args.chapter or
pframe.args.contribution or '';
args.first = pframe.args.first or pframe.args.first1 or ''; -- (optional) first author's given name; given names for other authors not supported
args.id = pframe.args.id or '';
args.in1 = pframe.args['in'] or pframe.args.in1 or ''; -- source editor surnames; 'in' is a Lua reserved keyword
args.in2 = pframe.args.in2 or '';
args.in3 = pframe.args.in3 or '';
args.in4 = pframe.args.in4 or '';
args.last1 = pframe.args.last or pframe.args.last1 or ''; -- contribution author(s)
args.last2 = pframe.args.last2 or '';
args.last3 = pframe.args.last3 or '';
args.last4 = pframe.args.last4 or '';
args.p = pframe.args.p or ''; -- source page number(s) or location
args.pp = pframe.args.pp or '';
args.loc = pframe.args.loc or '';
args.separator = pframe.args.separator; -- !! before postscript!! element separator defaults to full stop
args.postscript = pframe.args.ps or pframe.args.postscript;
if not is_set (args.postscript) then
if not is_set (args.separator) then
args.postscript = '.'; -- neither set so set to defaults
args.separator = '.';
elseif ',' == args.separator then
args.postscript = ''; -- CS2 and postscript not set; no terminal punctuation
else
args.postscript = '.'; -- separator not CS2 and postscript not set; use default terminal punctuation
end
else -- if here, postscript set
if 'none' == args.postscript:lower() then -- if |ps=none or |postscript=none then
args.postscript = ''; -- no postscript
end
end
if not is_set (args.separator) then
args.separator = '.'; -- not set in template and we didn't set it here so set to default
end
args.url = pframe.args.url or ''; -- url for chapter or contribution
args.year = pframe.args.year or '';
if not is_set (args.contribution) then
args.err_msg = args.err_msg .. ' required contribution is missing.'; -- error message if source not provided
args.contribution = args.url; -- if set it will give us linkable text
end
if args.last1 == args.in1 and
args.last2 == args.in2 and
args.last3 == args.in3 and
args.last4 == args.in4 and
not is_set (args.id) then
args.err_msg = args.err_msg .. ' required |id= parameter missing.'; -- error message if contributor and source are the same
end
return core (args);
end
--[[
function f.sfn( frame )
local args = f.args_default;
pframe = frame:getParent();
args.postscript = pframe.args.postscript or pframe.args.ps or ".";
args.page = pframe.args.p or pframe.args.page or "";
args.pages = pframe.args.pp or pframe.args.pages or "";
args.location = pframe.args.loc or "";
args.ref = pframe.args.ref or pframe.args.Ref or "";
args.P1 = trim( pframe.args[1] ) or "";
args.P2 = trim( pframe.args[2] ) or "";
args.P3 = trim( pframe.args[3] ) or "";
args.P4 = trim( pframe.args[4] ) or "";
args.P5 = trim( pframe.args[5] ) or "";
local result = core( args );
local name = "FOOTNOTE" .. args.P1 .. args.P2 ..
args.P3 .. args.P4 .. args.P5 .. args.page .. args.pages .. args.location;
result = frame:extensionTag{ name = "ref", args = {name=name}, content=result };
return result;
end
]]
return f;
moyibe0iub7kzscyj6m5wnmeixf4w8h
801874
801873
2014-11-08T14:55:09Z
en>Trappist the monk
0
801874
Scribunto
text/plain
f = {
args_default = {
err_msg = '',
page_sep = ", p. ",
pages_sep = ", pp. ",
}
};
--[[--------------------------< T R I M >----------------------------------------------------------------------
strip leading and trailing white space from positional parameters.
]]
function trim( str )
if str == nil then
return '';
end
return str:match( "^%s*(.-)%s*$");
end
--[[--------------------------< I S _ S E T >------------------------------------------------------------------
Whether variable is set or not
]]
function is_set( var )
return not (var == nil or var == '');
end
--[[--------------------------< C O R E >----------------------------------------------------------------------
Assembles the various parts provided by the template into a properly formatted bridging citation. Adds punctuation
and text; encloses the whole within a span with id and class attributes.
This function mimics the {{sfn}} and {{harv}} templates, but it does not display an author-date list, just an
author list. It is presumed that the dates of contributions are the same as the date of the enclosing work.
Even though not displayed, a year parameter is still required for the CITEREF anchor
]]
function core( args )
local span_open_tag; -- holds CITEREF and css
local contributors = ''; -- chapter or contribution authors
local source = ''; -- editor/author date list that forms a CITEREF link to a full citation; mimics harvnb output except year in parentheses
local in_text = ' In '; --
local result; -- the assemby of the above output
-- form the CITEREF anchor
if is_set (args.id) then
span_open_tag = '<span id="' .. args.id .. '" class="citation">'; -- for use when contributor name is same as source name
else
span_open_tag = '<span id="CITEREF' .. table.concat ({args.last1, args.last2, args.last3, args.last4, args.year}) .. '" class="citation">';
end
-- form the contributors list; similar to {{sfn}} and {{harv}}, 1 to 4 names but no date and also allows first contributor given name
if args.first ~= '' then
args.first = ', ' .. args.first;
end
if is_set (args.last4) and is_set (args.last3) and is_set (args.last2) and is_set (args.last1) then
contributors = args.last1 .. args.first .. ' et al.';
elseif is_set (args.last3) and is_set (args.last2) and is_set (args.last1) then
contributors = args.last1 .. args.first .. ', ' .. args.last2 .. ' & ' .. args.last3;
elseif is_set (args.last2) and is_set (args.last1) then
contributors = args.last1 .. args.first .. ' & ' .. args.last2;
elseif is_set (args.last1) then
contributors = args.last1 .. args.first;
else
args.err_msg = args.err_msg .. ' author missing from contributor list.';
end
--form the source author-date list
if is_set (args.in4) and is_set (args.in3) and is_set (args.in2) and is_set (args.in1) then
source = args.in1 .. ' et al.';
elseif is_set (args.in3) and is_set (args.in2) and is_set (args.in1) then
source = args.in1 .. ', ' .. args.in2 .. ' & ' .. args.in3;
elseif is_set (args.in2) and is_set (args.in1) then
source = args.in1 .. ' & ' .. args.in2;
elseif is_set (args.in1) then
source = args.in1;
else
args.err_msg = args.err_msg .. ' author missing from source list.'
end
if args.year:match('^[1-9]%d%d%d?%l?$') or args.year:match('^n%.d%.%l?$') or args.year:match('^nd%l?$') then -- 3 or 4 digits, n.d., or nd and optional disambiguator
source = source .. ' (' .. args.year .. ')';
else
args.err_msg = args.err_msg .. ' invalid or missing year.'; -- error message if year not provided or malformed
end
--assemble CITEREF wikilink
source = "[[#CITEREF" .. mw.uri.anchorEncode(table.concat ({args.in1, args.in2, args.in3, args.in4, args.year})) .. "|" .. source .. "]]";
--combine contribution with url to make external link
if args.url ~= '' then
args.contribution = '[' .. args.url .. ' ' .. args.contribution .. ']'; -- format external link
end
if args.separator ~= contributors:sub(-1) then
contributors = contributors .. args.separator; -- add separator if not same as last character in name list (|first=John S. or et al.)
end
-- pages and other insource location
if args.p ~= '' then
args.p = args.page_sep .. args.p;
elseif args.pp ~= '' then
args.p = args.pages_sep .. args.pp; -- args.p not set so use it to hold common insource location info
end
if args.loc ~= '' then
args.p = args.p .. ', ' .. args.loc; -- add arg.loc to args.p
end
--wrap error messages in span
args.err_msg = '<span style="font-size:100%" class="error">' .. args.err_msg .. '</span>';
if ',' == args.separator then
in_text = in_text:lower(); -- CS2 style use lower case
end
-- and put it all together
result = span_open_tag .. contributors .. ' "' .. args.contribution .. '"' .. args.separator .. in_text .. source .. args.p .. args.postscript .. '</span>' .. args.err_msg;
return result;
end
--[[--------------------------< F . H A R V C >----------------------------------------------------------------
Entry point from {{harvc}} template. Fetches parent frame parameters, does a bit of simple error checking
]]
function f.harvc (frame)
local args = f.args_default;
pframe = frame:getParent();
args.contribution = pframe.args.c or -- chapter or contribution
pframe.args.chapter or
pframe.args.contribution or '';
args.first = pframe.args.first or pframe.args.first1 or ''; -- (optional) first author's given name; given names for other authors not supported
args.id = pframe.args.id or '';
args.in1 = pframe.args['in'] or pframe.args.in1 or ''; -- source editor surnames; 'in' is a Lua reserved keyword
args.in2 = pframe.args.in2 or '';
args.in3 = pframe.args.in3 or '';
args.in4 = pframe.args.in4 or '';
args.last1 = pframe.args.last or pframe.args.last1 or ''; -- contribution author(s)
args.last2 = pframe.args.last2 or '';
args.last3 = pframe.args.last3 or '';
args.last4 = pframe.args.last4 or '';
args.p = pframe.args.p or ''; -- source page number(s) or location
args.pp = pframe.args.pp or '';
args.loc = pframe.args.loc or '';
args.separator = pframe.args.separator; -- !! before postscript!! element separator defaults to full stop
args.postscript = pframe.args.ps or pframe.args.postscript;
if not is_set (args.postscript) then
if not is_set (args.separator) then
args.postscript = '.'; -- neither set so set to defaults
args.separator = '.';
elseif ',' == args.separator then
args.postscript = ''; -- CS2 and postscript not set; no terminal punctuation
else
args.postscript = '.'; -- separator not CS2 and postscript not set; use default terminal punctuation
end
else -- if here, postscript set
if 'none' == args.postscript:lower() then -- if |ps=none or |postscript=none then
args.postscript = ''; -- no postscript
end
end
if not is_set (args.separator) then
args.separator = '.'; -- not set in template and we didn't set it here so set to default
end
args.url = pframe.args.url or ''; -- url for chapter or contribution
args.year = pframe.args.year or '';
if not is_set (args.contribution) then
args.err_msg = args.err_msg .. ' required contribution is missing.'; -- error message if source not provided
args.contribution = args.url; -- if set it will give us linkable text
end
if args.last1 == args.in1 and
args.last2 == args.in2 and
args.last3 == args.in3 and
args.last4 == args.in4 and
not is_set (args.id) then
args.err_msg = args.err_msg .. ' required |id= parameter missing.'; -- error message if contributor and source are the same
end
return core (args);
end
--[[
function f.sfn( frame )
local args = f.args_default;
pframe = frame:getParent();
args.postscript = pframe.args.postscript or pframe.args.ps or ".";
args.page = pframe.args.p or pframe.args.page or "";
args.pages = pframe.args.pp or pframe.args.pages or "";
args.location = pframe.args.loc or "";
args.ref = pframe.args.ref or pframe.args.Ref or "";
args.P1 = trim( pframe.args[1] ) or "";
args.P2 = trim( pframe.args[2] ) or "";
args.P3 = trim( pframe.args[3] ) or "";
args.P4 = trim( pframe.args[4] ) or "";
args.P5 = trim( pframe.args[5] ) or "";
local result = core( args );
local name = "FOOTNOTE" .. args.P1 .. args.P2 ..
args.P3 .. args.P4 .. args.P5 .. args.page .. args.pages .. args.location;
result = frame:extensionTag{ name = "ref", args = {name=name}, content=result };
return result;
end
]]
return f;
rsra0eom71loqup0srekdig3hyzq587
801875
801874
2014-11-09T01:15:34Z
en>Trappist the monk
0
801875
Scribunto
text/plain
f = {
args_default = {
err_msg = '',
page_sep = ", p. ",
pages_sep = ", pp. ",
}
};
--[[--------------------------< I S _ S E T >------------------------------------------------------------------
Whether variable is set or not. A varable is set when it is not nil and not empty.
]]
function is_set( var )
return not (var == nil or var == '');
end
-- if all items in list are set, return true, else false
function are_all_set(...)
local list = {...};
for _, var in pairs(list) do
if not is_set( var ) then
return false;
end
end
return true;
end
--[[--------------------------< C O R E >----------------------------------------------------------------------
Assembles the various parts provided by the template into a properly formatted bridging citation. Adds punctuation
and text; encloses the whole within a span with id and class attributes.
This creates a CITEREF anchor from |last1= through |last4= and |year=. It also creates a CITEREF link from |in1= through
|in4= and |year=. It is presumed that the dates of contributions are the same as the date of the enclosing work.
Even though not displayed, a year parameter is still required for the CITEREF anchor
]]
function core( args )
local span_open_tag; -- holds CITEREF and css
local contributors = ''; -- chapter or contribution authors
local source = ''; -- editor/author date list that forms a CITEREF link to a full citation; mimics harvnb output except year in parentheses
local in_text = ' In '; --
local result; -- the assemby of the above output
-- form the CITEREF anchor
if is_set (args.id) then
span_open_tag = '<span id="' .. args.id .. '" class="citation">'; -- for use when contributor name is same as source name
else
span_open_tag = '<span id="CITEREF' .. table.concat ({args.last1, args.last2, args.last3, args.last4, args.year}) .. '" class="citation">';
end
-- form the contributors list; similar to {{sfn}} and {{harv}}, 1 to 4 names but no date and also allows first contributor given name
if args.first ~= '' then
args.first = ', ' .. args.first;
end
-- if is_set (args.last4) and is_set (args.last3) and is_set (args.last2) and is_set (args.last1) then
if are_all_set ({args.last4, args.last3, args.last2, args.last1}) then
contributors = args.last1 .. args.first .. ' et al.';
elseif is_set (args.last3) and is_set (args.last2) and is_set (args.last1) then
contributors = args.last1 .. args.first .. ', ' .. args.last2 .. ' & ' .. args.last3;
elseif is_set (args.last2) and is_set (args.last1) then
contributors = args.last1 .. args.first .. ' & ' .. args.last2;
elseif is_set (args.last1) then
contributors = args.last1 .. args.first;
else
args.err_msg = args.err_msg .. ' author missing from contributor list.';
end
--form the source author-date list
if is_set (args.in4) and is_set (args.in3) and is_set (args.in2) and is_set (args.in1) then
source = args.in1 .. ' et al.';
elseif is_set (args.in3) and is_set (args.in2) and is_set (args.in1) then
source = args.in1 .. ', ' .. args.in2 .. ' & ' .. args.in3;
elseif is_set (args.in2) and is_set (args.in1) then
source = args.in1 .. ' & ' .. args.in2;
elseif is_set (args.in1) then
source = args.in1;
else
args.err_msg = args.err_msg .. ' author missing from source list.'
end
if args.year:match('^[1-9]%d%d%d?%l?$') or args.year:match('^n%.d%.%l?$') or args.year:match('^nd%l?$') then -- 3 or 4 digits, n.d., or nd and optional disambiguator
source = source .. ' (' .. args.year .. ')';
else
args.err_msg = args.err_msg .. ' invalid or missing year.'; -- error message if year not provided or malformed
end
--assemble CITEREF wikilink
source = "[[#CITEREF" .. mw.uri.anchorEncode(table.concat ({args.in1, args.in2, args.in3, args.in4, args.year})) .. "|" .. source .. "]]";
--combine contribution with url to make external link
if args.url ~= '' then
args.contribution = '[' .. args.url .. ' ' .. args.contribution .. ']'; -- format external link
end
if args.separator ~= contributors:sub(-1) then
contributors = contributors .. args.separator; -- add separator if not same as last character in name list (|first=John S. or et al.)
end
-- pages and other insource location
if args.p ~= '' then
args.p = args.page_sep .. args.p;
elseif args.pp ~= '' then
args.p = args.pages_sep .. args.pp; -- args.p not set so use it to hold common insource location info
end
if args.loc ~= '' then
args.p = args.p .. ', ' .. args.loc; -- add arg.loc to args.p
end
--wrap error messages in span
args.err_msg = '<span style="font-size:100%" class="error">' .. args.err_msg .. '</span>';
if ',' == args.separator then
in_text = in_text:lower(); -- CS2 style use lower case
end
-- and put it all together
result = span_open_tag .. contributors .. ' "' .. args.contribution .. '"' .. args.separator .. in_text .. source .. args.p .. args.postscript .. '</span>' .. args.err_msg;
return result;
end
--[[--------------------------< F . H A R V C >----------------------------------------------------------------
Entry point from {{harvc}} template. Fetches parent frame parameters, does a bit of simple error checking
]]
function f.harvc (frame)
local args = f.args_default;
pframe = frame:getParent();
args.contribution = pframe.args.c or -- chapter or contribution
pframe.args.chapter or
pframe.args.contribution or '';
args.first = pframe.args.first or pframe.args.first1 or ''; -- (optional) first author's given name; given names for other authors not supported
args.id = pframe.args.id or '';
args.in1 = pframe.args['in'] or pframe.args.in1 or ''; -- source editor surnames; 'in' is a Lua reserved keyword
args.in2 = pframe.args.in2 or '';
args.in3 = pframe.args.in3 or '';
args.in4 = pframe.args.in4 or '';
args.last1 = pframe.args.last or pframe.args.last1 or ''; -- contribution author(s)
args.last2 = pframe.args.last2 or '';
args.last3 = pframe.args.last3 or '';
args.last4 = pframe.args.last4 or '';
args.p = pframe.args.p or ''; -- source page number(s) or location
args.pp = pframe.args.pp or '';
args.loc = pframe.args.loc or '';
args.separator = pframe.args.separator; -- !! before postscript!! element separator defaults to full stop
args.postscript = pframe.args.ps or pframe.args.postscript;
if not is_set (args.postscript) then
if not is_set (args.separator) then
args.postscript = '.'; -- neither set so set to defaults
args.separator = '.';
elseif ',' == args.separator then
args.postscript = ''; -- CS2 and postscript not set; no terminal punctuation
else
args.postscript = '.'; -- separator not CS2 and postscript not set; use default terminal punctuation
end
else -- if here, postscript set
if 'none' == args.postscript:lower() then -- if |ps=none or |postscript=none then
args.postscript = ''; -- no postscript
end
end
if not is_set (args.separator) then
args.separator = '.'; -- not set in template and we didn't set it here so set to default
end
args.url = pframe.args.url or ''; -- url for chapter or contribution
args.year = pframe.args.year or '';
if not is_set (args.contribution) then
args.err_msg = args.err_msg .. ' required contribution is missing.'; -- error message if source not provided
args.contribution = args.url; -- if set it will give us linkable text
end
if args.last1 == args.in1 and
args.last2 == args.in2 and
args.last3 == args.in3 and
args.last4 == args.in4 and
not is_set (args.id) then
args.err_msg = args.err_msg .. ' required |id= parameter missing.'; -- error message if contributor and source are the same
end
return core (args);
end
--[[
function f.sfn( frame )
local args = f.args_default;
pframe = frame:getParent();
args.postscript = pframe.args.postscript or pframe.args.ps or ".";
args.page = pframe.args.p or pframe.args.page or "";
args.pages = pframe.args.pp or pframe.args.pages or "";
args.location = pframe.args.loc or "";
args.ref = pframe.args.ref or pframe.args.Ref or "";
args.P1 = trim( pframe.args[1] ) or "";
args.P2 = trim( pframe.args[2] ) or "";
args.P3 = trim( pframe.args[3] ) or "";
args.P4 = trim( pframe.args[4] ) or "";
args.P5 = trim( pframe.args[5] ) or "";
local result = core( args );
local name = "FOOTNOTE" .. args.P1 .. args.P2 ..
args.P3 .. args.P4 .. args.P5 .. args.page .. args.pages .. args.location;
result = frame:extensionTag{ name = "ref", args = {name=name}, content=result };
return result;
end
]]
return f;
s9xdgwbsqnpaxohoku8sdthe9lej025
801876
801875
2014-11-09T01:20:34Z
en>Trappist the monk
0
801876
Scribunto
text/plain
f = {
args_default = {
err_msg = '',
page_sep = ", p. ",
pages_sep = ", pp. ",
}
};
--[[--------------------------< I S _ S E T >------------------------------------------------------------------
Whether variable is set or not. A varable is set when it is not nil and not empty.
]]
function is_set( var )
return not (var == nil or var == '');
end
-- if all items in list are set, return true, else false
function are_all_set(...)
local list = {...};
for _, var in pairs(list) do
if not is_set( var ) then
return false;
end
end
return true;
end
--[[--------------------------< C O R E >----------------------------------------------------------------------
Assembles the various parts provided by the template into a properly formatted bridging citation. Adds punctuation
and text; encloses the whole within a span with id and class attributes.
This creates a CITEREF anchor from |last1= through |last4= and |year=. It also creates a CITEREF link from |in1= through
|in4= and |year=. It is presumed that the dates of contributions are the same as the date of the enclosing work.
Even though not displayed, a year parameter is still required for the CITEREF anchor
]]
function core( args )
local span_open_tag; -- holds CITEREF and css
local contributors = ''; -- chapter or contribution authors
local source = ''; -- editor/author date list that forms a CITEREF link to a full citation; mimics harvnb output except year in parentheses
local in_text = ' In '; --
local result; -- the assemby of the above output
-- form the CITEREF anchor
if is_set (args.id) then
span_open_tag = '<span id="' .. args.id .. '" class="citation">'; -- for use when contributor name is same as source name
else
span_open_tag = '<span id="CITEREF' .. table.concat ({args.last1, args.last2, args.last3, args.last4, args.year}) .. '" class="citation">';
end
-- form the contributors list; similar to {{sfn}} and {{harv}}, 1 to 4 names but no date and also allows first contributor given name
if args.first ~= '' then
args.first = ', ' .. args.first;
end
if is_set (args.last4) and is_set (args.last3) and is_set (args.last2) and is_set (args.last1) then
-- if are_all_set ({args.last4, args.last3, args.last2, args.last1}) then
contributors = args.last1 .. args.first .. ' et al.';
elseif is_set (args.last3) and is_set (args.last2) and is_set (args.last1) then
contributors = args.last1 .. args.first .. ', ' .. args.last2 .. ' & ' .. args.last3;
elseif is_set (args.last2) and is_set (args.last1) then
contributors = args.last1 .. args.first .. ' & ' .. args.last2;
elseif is_set (args.last1) then
contributors = args.last1 .. args.first;
else
args.err_msg = args.err_msg .. ' author missing from contributor list.';
end
--form the source author-date list
if is_set (args.in4) and is_set (args.in3) and is_set (args.in2) and is_set (args.in1) then
source = args.in1 .. ' et al.';
elseif is_set (args.in3) and is_set (args.in2) and is_set (args.in1) then
source = args.in1 .. ', ' .. args.in2 .. ' & ' .. args.in3;
elseif is_set (args.in2) and is_set (args.in1) then
source = args.in1 .. ' & ' .. args.in2;
elseif is_set (args.in1) then
source = args.in1;
else
args.err_msg = args.err_msg .. ' author missing from source list.'
end
if args.year:match('^[1-9]%d%d%d?%l?$') or args.year:match('^n%.d%.%l?$') or args.year:match('^nd%l?$') then -- 3 or 4 digits, n.d., or nd and optional disambiguator
source = source .. ' (' .. args.year .. ')';
else
args.err_msg = args.err_msg .. ' invalid or missing year.'; -- error message if year not provided or malformed
end
--assemble CITEREF wikilink
source = "[[#CITEREF" .. mw.uri.anchorEncode(table.concat ({args.in1, args.in2, args.in3, args.in4, args.year})) .. "|" .. source .. "]]";
--combine contribution with url to make external link
if args.url ~= '' then
args.contribution = '[' .. args.url .. ' ' .. args.contribution .. ']'; -- format external link
end
if args.separator ~= contributors:sub(-1) then
contributors = contributors .. args.separator; -- add separator if not same as last character in name list (|first=John S. or et al.)
end
-- pages and other insource location
if args.p ~= '' then
args.p = args.page_sep .. args.p;
elseif args.pp ~= '' then
args.p = args.pages_sep .. args.pp; -- args.p not set so use it to hold common insource location info
end
if args.loc ~= '' then
args.p = args.p .. ', ' .. args.loc; -- add arg.loc to args.p
end
--wrap error messages in span
args.err_msg = '<span style="font-size:100%" class="error">' .. args.err_msg .. '</span>';
if ',' == args.separator then
in_text = in_text:lower(); -- CS2 style use lower case
end
-- and put it all together
result = span_open_tag .. contributors .. ' "' .. args.contribution .. '"' .. args.separator .. in_text .. source .. args.p .. args.postscript .. '</span>' .. args.err_msg;
return result;
end
--[[--------------------------< F . H A R V C >----------------------------------------------------------------
Entry point from {{harvc}} template. Fetches parent frame parameters, does a bit of simple error checking
]]
function f.harvc (frame)
local args = f.args_default;
pframe = frame:getParent();
args.contribution = pframe.args.c or -- chapter or contribution
pframe.args.chapter or
pframe.args.contribution or '';
args.first = pframe.args.first or pframe.args.first1 or ''; -- (optional) first author's given name; given names for other authors not supported
args.id = pframe.args.id or '';
args.in1 = pframe.args['in'] or pframe.args.in1 or ''; -- source editor surnames; 'in' is a Lua reserved keyword
args.in2 = pframe.args.in2 or '';
args.in3 = pframe.args.in3 or '';
args.in4 = pframe.args.in4 or '';
args.last1 = pframe.args.last or pframe.args.last1 or ''; -- contribution author(s)
args.last2 = pframe.args.last2 or '';
args.last3 = pframe.args.last3 or '';
args.last4 = pframe.args.last4 or '';
args.p = pframe.args.p or ''; -- source page number(s) or location
args.pp = pframe.args.pp or '';
args.loc = pframe.args.loc or '';
args.separator = pframe.args.separator; -- !! before postscript!! element separator defaults to full stop
args.postscript = pframe.args.ps or pframe.args.postscript;
if not is_set (args.postscript) then
if not is_set (args.separator) then
args.postscript = '.'; -- neither set so set to defaults
args.separator = '.';
elseif ',' == args.separator then
args.postscript = ''; -- CS2 and postscript not set; no terminal punctuation
else
args.postscript = '.'; -- separator not CS2 and postscript not set; use default terminal punctuation
end
else -- if here, postscript set
if 'none' == args.postscript:lower() then -- if |ps=none or |postscript=none then
args.postscript = ''; -- no postscript
end
end
if not is_set (args.separator) then
args.separator = '.'; -- not set in template and we didn't set it here so set to default
end
args.url = pframe.args.url or ''; -- url for chapter or contribution
args.year = pframe.args.year or '';
if not is_set (args.contribution) then
args.err_msg = args.err_msg .. ' required contribution is missing.'; -- error message if source not provided
args.contribution = args.url; -- if set it will give us linkable text
end
if args.last1 == args.in1 and
args.last2 == args.in2 and
args.last3 == args.in3 and
args.last4 == args.in4 and
not is_set (args.id) then
args.err_msg = args.err_msg .. ' required |id= parameter missing.'; -- error message if contributor and source are the same
end
return core (args);
end
--[[
function f.sfn( frame )
local args = f.args_default;
pframe = frame:getParent();
args.postscript = pframe.args.postscript or pframe.args.ps or ".";
args.page = pframe.args.p or pframe.args.page or "";
args.pages = pframe.args.pp or pframe.args.pages or "";
args.location = pframe.args.loc or "";
args.ref = pframe.args.ref or pframe.args.Ref or "";
args.P1 = trim( pframe.args[1] ) or "";
args.P2 = trim( pframe.args[2] ) or "";
args.P3 = trim( pframe.args[3] ) or "";
args.P4 = trim( pframe.args[4] ) or "";
args.P5 = trim( pframe.args[5] ) or "";
local result = core( args );
local name = "FOOTNOTE" .. args.P1 .. args.P2 ..
args.P3 .. args.P4 .. args.P5 .. args.page .. args.pages .. args.location;
result = frame:extensionTag{ name = "ref", args = {name=name}, content=result };
return result;
end
]]
return f;
5uz5g7w3p0pev5vd5js1nqbr78pqse0
801877
801876
2014-11-09T01:37:22Z
en>Trappist the monk
0
801877
Scribunto
text/plain
f = {
args_default = {
err_msg = '',
page_sep = ", p. ",
pages_sep = ", pp. ",
}
};
--[[--------------------------< I S _ S E T >------------------------------------------------------------------
Whether variable is set or not. A varable is set when it is not nil and not empty.
]]
function is_set( var )
return not (var == nil or var == '');
end
-- if all items in list are set, return true, else false
function are_all_set(...)
local list = {...};
for _, var in pairs(list) do
if not is_set( var ) then
return false;
end
end
return true;
end
--[[--------------------------< C O R E >----------------------------------------------------------------------
Assembles the various parts provided by the template into a properly formatted bridging citation. Adds punctuation
and text; encloses the whole within a span with id and class attributes.
This creates a CITEREF anchor from |last1= through |last4= and |year=. It also creates a CITEREF link from |in1= through
|in4= and |year=. It is presumed that the dates of contributions are the same as the date of the enclosing work.
Even though not displayed, a year parameter is still required for the CITEREF anchor
]]
function core( args )
local span_open_tag; -- holds CITEREF and css
local contributors = ''; -- chapter or contribution authors
local source = ''; -- editor/author date list that forms a CITEREF link to a full citation; mimics harvnb output except year in parentheses
local in_text = ' In '; --
local result; -- the assemby of the above output
-- form the CITEREF anchor
if is_set (args.id) then
span_open_tag = '<span id="' .. args.id .. '" class="citation">'; -- for use when contributor name is same as source name
else
span_open_tag = '<span id="CITEREF' .. table.concat ({args.last1, args.last2, args.last3, args.last4, args.year}) .. '" class="citation">';
end
-- form the contributors list; similar to {{sfn}} and {{harv}}, 1 to 4 names but no date and also allows first contributor given name
if args.first ~= '' then
args.first = ', ' .. args.first;
end
-- if is_set (args.last4) and is_set (args.last3) and is_set (args.last2) and is_set (args.last1) then
if are_all_set ({args.last4, args.last3, args.last2, args.last1}) then
contributors = args.last1 .. args.first .. ' et al.';
elseif is_set (args.last3) and is_set (args.last2) and is_set (args.last1) then
contributors = args.last1 .. args.first .. ', ' .. args.last2 .. ' & ' .. args.last3;
elseif is_set (args.last2) and is_set (args.last1) then
contributors = args.last1 .. args.first .. ' & ' .. args.last2;
elseif is_set (args.last1) then
contributors = args.last1 .. args.first;
else
args.err_msg = args.err_msg .. ' author missing from contributor list.';
end
--form the source author-date list
if is_set (args.in4) and is_set (args.in3) and is_set (args.in2) and is_set (args.in1) then
source = args.in1 .. ' et al.';
elseif is_set (args.in3) and is_set (args.in2) and is_set (args.in1) then
source = args.in1 .. ', ' .. args.in2 .. ' & ' .. args.in3;
elseif is_set (args.in2) and is_set (args.in1) then
source = args.in1 .. ' & ' .. args.in2;
elseif is_set (args.in1) then
source = args.in1;
else
args.err_msg = args.err_msg .. ' author missing from source list.'
end
if args.year:match('^[1-9]%d%d%d?%l?$') or args.year:match('^n%.d%.%l?$') or args.year:match('^nd%l?$') then -- 3 or 4 digits, n.d., or nd and optional disambiguator
source = source .. ' (' .. args.year .. ')';
else
args.err_msg = args.err_msg .. ' invalid or missing year.'; -- error message if year not provided or malformed
end
--assemble CITEREF wikilink
source = "[[#CITEREF" .. mw.uri.anchorEncode(table.concat ({args.in1, args.in2, args.in3, args.in4, args.year})) .. "|" .. source .. "]]";
--combine contribution with url to make external link
if args.url ~= '' then
args.contribution = '[' .. args.url .. ' ' .. args.contribution .. ']'; -- format external link
end
if args.separator ~= contributors:sub(-1) then
contributors = contributors .. args.separator; -- add separator if not same as last character in name list (|first=John S. or et al.)
end
-- pages and other insource location
if args.p ~= '' then
args.p = args.page_sep .. args.p;
elseif args.pp ~= '' then
args.p = args.pages_sep .. args.pp; -- args.p not set so use it to hold common insource location info
end
if args.loc ~= '' then
args.p = args.p .. ', ' .. args.loc; -- add arg.loc to args.p
end
--wrap error messages in span
args.err_msg = '<span style="font-size:100%" class="error">' .. args.err_msg .. '</span>';
if ',' == args.separator then
in_text = in_text:lower(); -- CS2 style use lower case
end
-- and put it all together
result = span_open_tag .. contributors .. ' "' .. args.contribution .. '"' .. args.separator .. in_text .. source .. args.p .. args.postscript .. '</span>' .. args.err_msg;
return result;
end
--[[--------------------------< F . H A R V C >----------------------------------------------------------------
Entry point from {{harvc}} template. Fetches parent frame parameters, does a bit of simple error checking
]]
function f.harvc (frame)
local args = f.args_default;
pframe = frame:getParent();
args.contribution = pframe.args.c or -- chapter or contribution
pframe.args.chapter or
pframe.args.contribution or '';
args.first = pframe.args.first or pframe.args.first1 or ''; -- (optional) first author's given name; given names for other authors not supported
args.id = pframe.args.id or '';
args.in1 = pframe.args['in'] or pframe.args.in1 or ''; -- source editor surnames; 'in' is a Lua reserved keyword
args.in2 = pframe.args.in2 or '';
args.in3 = pframe.args.in3 or '';
args.in4 = pframe.args.in4 or '';
args.last1 = pframe.args.last or pframe.args.last1 or ''; -- contribution author(s)
args.last2 = pframe.args.last2 or '';
args.last3 = pframe.args.last3 or '';
args.last4 = pframe.args.last4 or '';
args.p = pframe.args.p or ''; -- source page number(s) or location
args.pp = pframe.args.pp or '';
args.loc = pframe.args.loc or '';
args.separator = pframe.args.separator; -- !! before postscript!! element separator defaults to full stop
args.postscript = pframe.args.ps or pframe.args.postscript;
if not is_set (args.postscript) then
if not is_set (args.separator) then
args.postscript = '.'; -- neither set so set to defaults
args.separator = '.';
elseif ',' == args.separator then
args.postscript = ''; -- CS2 and postscript not set; no terminal punctuation
else
args.postscript = '.'; -- separator not CS2 and postscript not set; use default terminal punctuation
end
else -- if here, postscript set
if 'none' == args.postscript:lower() then -- if |ps=none or |postscript=none then
args.postscript = ''; -- no postscript
end
end
if not is_set (args.separator) then
args.separator = '.'; -- not set in template and we didn't set it here so set to default
end
args.url = pframe.args.url or ''; -- url for chapter or contribution
args.year = pframe.args.year or '';
if not is_set (args.contribution) then
args.err_msg = args.err_msg .. ' required contribution is missing.'; -- error message if source not provided
args.contribution = args.url; -- if set it will give us linkable text
end
if args.last1 == args.in1 and
args.last2 == args.in2 and
args.last3 == args.in3 and
args.last4 == args.in4 and
not is_set (args.id) then
args.err_msg = args.err_msg .. ' required |id= parameter missing.'; -- error message if contributor and source are the same
end
return core (args);
end
--[[
function f.sfn( frame )
local args = f.args_default;
pframe = frame:getParent();
args.postscript = pframe.args.postscript or pframe.args.ps or ".";
args.page = pframe.args.p or pframe.args.page or "";
args.pages = pframe.args.pp or pframe.args.pages or "";
args.location = pframe.args.loc or "";
args.ref = pframe.args.ref or pframe.args.Ref or "";
args.P1 = trim( pframe.args[1] ) or "";
args.P2 = trim( pframe.args[2] ) or "";
args.P3 = trim( pframe.args[3] ) or "";
args.P4 = trim( pframe.args[4] ) or "";
args.P5 = trim( pframe.args[5] ) or "";
local result = core( args );
local name = "FOOTNOTE" .. args.P1 .. args.P2 ..
args.P3 .. args.P4 .. args.P5 .. args.page .. args.pages .. args.location;
result = frame:extensionTag{ name = "ref", args = {name=name}, content=result };
return result;
end
]]
return f;
s9xdgwbsqnpaxohoku8sdthe9lej025
801878
801877
2014-11-09T10:32:08Z
en>Trappist the monk
0
801878
Scribunto
text/plain
f = {
args_default = {
err_msg = '',
page_sep = ", p. ",
pages_sep = ", pp. ",
}
};
--[[--------------------------< I S _ S E T >------------------------------------------------------------------
Whether variable is set or not. A varable is set when it is not nil and not empty.
]]
function is_set( var )
return not (var == nil or var == '');
end
--[[--------------------------< C O R E >----------------------------------------------------------------------
Assembles the various parts provided by the template into a properly formatted bridging citation. Adds punctuation
and text; encloses the whole within a span with id and class attributes.
This creates a CITEREF anchor from |last1= through |last4= and |year=. It also creates a CITEREF link from |in1= through
|in4= and |year=. It is presumed that the dates of contributions are the same as the date of the enclosing work.
Even though not displayed, a year parameter is still required for the CITEREF anchor
]]
function core( args )
local span_open_tag; -- holds CITEREF and css
local contributors = ''; -- chapter or contribution authors
local source = ''; -- editor/author date list that forms a CITEREF link to a full citation; mimics harvnb output except year in parentheses
local in_text = ' In '; --
local result; -- the assemby of the above output
-- form the CITEREF anchor
if is_set (args.id) then
span_open_tag = '<span id="' .. args.id .. '" class="citation">'; -- for use when contributor name is same as source name
else
span_open_tag = '<span id="CITEREF' .. table.concat ({args.last1, args.last2, args.last3, args.last4, args.year}) .. '" class="citation">';
end
-- form the contributors list; similar to {{sfn}} and {{harv}}, 1 to 4 names but no date and also allows first contributor given name
if args.first ~= '' then
args.first = ', ' .. args.first;
end
if is_set (args.last4) and is_set (args.last3) and is_set (args.last2) and is_set (args.last1) then
contributors = args.last1 .. args.first .. ' et al.';
elseif not is_set (args.last4) and is_set (args.last3) and is_set (args.last2) and is_set (args.last1) then
contributors = args.last1 .. args.first .. ', ' .. args.last2 .. ' & ' .. args.last3;
elseif not is_set (args.last4) and not is_set (args.last3) and is_set (args.last2) and is_set (args.last1) then
contributors = args.last1 .. args.first .. ' & ' .. args.last2;
elseif not is_set (args.last4) and not is_set (args.last3) and not is_set (args.last2) and is_set (args.last1) then
contributors = args.last1 .. args.first;
else
args.err_msg = args.err_msg .. ' author missing from contributor list.';
end
--form the source author-date list
if is_set (args.in4) and is_set (args.in3) and is_set (args.in2) and is_set (args.in1) then
source = args.in1 .. ' et al.';
elseif is_set (args.in3) and is_set (args.in2) and is_set (args.in1) then
source = args.in1 .. ', ' .. args.in2 .. ' & ' .. args.in3;
elseif is_set (args.in2) and is_set (args.in1) then
source = args.in1 .. ' & ' .. args.in2;
elseif is_set (args.in1) then
source = args.in1;
else
args.err_msg = args.err_msg .. ' author missing from source list.'
end
if args.year:match('^[1-9]%d%d%d?%l?$') or args.year:match('^n%.d%.%l?$') or args.year:match('^nd%l?$') then -- 3 or 4 digits, n.d., or nd and optional disambiguator
source = source .. ' (' .. args.year .. ')';
else
args.err_msg = args.err_msg .. ' invalid or missing year.'; -- error message if year not provided or malformed
end
--assemble CITEREF wikilink
source = "[[#CITEREF" .. mw.uri.anchorEncode(table.concat ({args.in1, args.in2, args.in3, args.in4, args.year})) .. "|" .. source .. "]]";
--combine contribution with url to make external link
if args.url ~= '' then
args.contribution = '[' .. args.url .. ' ' .. args.contribution .. ']'; -- format external link
end
if args.separator ~= contributors:sub(-1) then
contributors = contributors .. args.separator; -- add separator if not same as last character in name list (|first=John S. or et al.)
end
-- pages and other insource location
if args.p ~= '' then
args.p = args.page_sep .. args.p;
elseif args.pp ~= '' then
args.p = args.pages_sep .. args.pp; -- args.p not set so use it to hold common insource location info
end
if args.loc ~= '' then
args.p = args.p .. ', ' .. args.loc; -- add arg.loc to args.p
end
--wrap error messages in span
args.err_msg = '<span style="font-size:100%" class="error">' .. args.err_msg .. '</span>';
if ',' == args.separator then
in_text = in_text:lower(); -- CS2 style use lower case
end
-- and put it all together
result = span_open_tag .. contributors .. ' "' .. args.contribution .. '"' .. args.separator .. in_text .. source .. args.p .. args.postscript .. '</span>' .. args.err_msg;
return result;
end
--[[--------------------------< F . H A R V C >----------------------------------------------------------------
Entry point from {{harvc}} template. Fetches parent frame parameters, does a bit of simple error checking
]]
function f.harvc (frame)
local args = f.args_default;
pframe = frame:getParent();
args.contribution = pframe.args.c or -- chapter or contribution
pframe.args.chapter or
pframe.args.contribution or '';
args.first = pframe.args.first or pframe.args.first1 or ''; -- (optional) first author's given name; given names for other authors not supported
args.id = pframe.args.id or '';
args.in1 = pframe.args['in'] or pframe.args.in1 or ''; -- source editor surnames; 'in' is a Lua reserved keyword
args.in2 = pframe.args.in2 or '';
args.in3 = pframe.args.in3 or '';
args.in4 = pframe.args.in4 or '';
args.last1 = pframe.args.last or pframe.args.last1 or ''; -- contribution author(s)
args.last2 = pframe.args.last2 or '';
args.last3 = pframe.args.last3 or '';
args.last4 = pframe.args.last4 or '';
args.p = pframe.args.p or ''; -- source page number(s) or location
args.pp = pframe.args.pp or '';
args.loc = pframe.args.loc or '';
args.separator = pframe.args.separator; -- !! before postscript!! element separator defaults to full stop
args.postscript = pframe.args.ps or pframe.args.postscript;
if not is_set (args.postscript) then
if not is_set (args.separator) then
args.postscript = '.'; -- neither set so set to defaults
args.separator = '.';
elseif ',' == args.separator then
args.postscript = ''; -- CS2 and postscript not set; no terminal punctuation
else
args.postscript = '.'; -- separator not CS2 and postscript not set; use default terminal punctuation
end
else -- if here, postscript set
if 'none' == args.postscript:lower() then -- if |ps=none or |postscript=none then
args.postscript = ''; -- no postscript
end
end
if not is_set (args.separator) then
args.separator = '.'; -- not set in template and we didn't set it here so set to default
end
args.url = pframe.args.url or ''; -- url for chapter or contribution
args.year = pframe.args.year or '';
if not is_set (args.contribution) then
args.err_msg = args.err_msg .. ' required contribution is missing.'; -- error message if source not provided
args.contribution = args.url; -- if set it will give us linkable text
end
if args.last1 == args.in1 and
args.last2 == args.in2 and
args.last3 == args.in3 and
args.last4 == args.in4 and
not is_set (args.id) then
args.err_msg = args.err_msg .. ' required |id= parameter missing.'; -- error message if contributor and source are the same
end
return core (args);
end
--[[
function f.sfn( frame )
local args = f.args_default;
pframe = frame:getParent();
args.postscript = pframe.args.postscript or pframe.args.ps or ".";
args.page = pframe.args.p or pframe.args.page or "";
args.pages = pframe.args.pp or pframe.args.pages or "";
args.location = pframe.args.loc or "";
args.ref = pframe.args.ref or pframe.args.Ref or "";
args.P1 = trim( pframe.args[1] ) or "";
args.P2 = trim( pframe.args[2] ) or "";
args.P3 = trim( pframe.args[3] ) or "";
args.P4 = trim( pframe.args[4] ) or "";
args.P5 = trim( pframe.args[5] ) or "";
local result = core( args );
local name = "FOOTNOTE" .. args.P1 .. args.P2 ..
args.P3 .. args.P4 .. args.P5 .. args.page .. args.pages .. args.location;
result = frame:extensionTag{ name = "ref", args = {name=name}, content=result };
return result;
end
]]
return f;
98qw78h4c5nvy9c03syzq21u46vaieu
801879
801878
2014-11-09T11:00:05Z
en>Trappist the monk
0
801879
Scribunto
text/plain
f = {
args_default = {
err_msg = '',
page_sep = ", p. ",
pages_sep = ", pp. ",
}
};
--[[--------------------------< I S _ S E T >------------------------------------------------------------------
Whether variable is set or not. A varable is set when it is not nil and not empty.
]]
function is_set( var )
return not (var == nil or var == '');
end
--[[--------------------------< C O R E >----------------------------------------------------------------------
Assembles the various parts provided by the template into a properly formatted bridging citation. Adds punctuation
and text; encloses the whole within a span with id and class attributes.
This creates a CITEREF anchor from |last1= through |last4= and |year=. It also creates a CITEREF link from |in1= through
|in4= and |year=. It is presumed that the dates of contributions are the same as the date of the enclosing work.
Even though not displayed, a year parameter is still required for the CITEREF anchor
]]
function core( args )
local span_open_tag; -- holds CITEREF and css
local contributors = ''; -- chapter or contribution authors
local source = ''; -- editor/author date list that forms a CITEREF link to a full citation; mimics harvnb output except year in parentheses
local in_text = ' In '; --
local result; -- the assemby of the above output
-- form the CITEREF anchor
if is_set (args.id) then
span_open_tag = '<span id="' .. args.id .. '" class="citation">'; -- for use when contributor name is same as source name
else
span_open_tag = '<span id="CITEREF' .. table.concat ({args.last1, args.last2, args.last3, args.last4, args.year}) .. '" class="citation">';
end
-- form the contributors list; similar to {{sfn}} and {{harv}}, 1 to 4 names but no date and also allows first contributor given name
if args.first ~= '' then
args.first = ', ' .. args.first;
end
if is_set (args.last4) and is_set (args.last3) and is_set (args.last2) and is_set (args.last1) then
contributors = args.last1 .. args.first .. ' et al.';
elseif not is_set (args.last4) and is_set (args.last3) and is_set (args.last2) and is_set (args.last1) then
contributors = args.last1 .. args.first .. ', ' .. args.last2 .. ' & ' .. args.last3;
elseif not is_set (args.last4) and not is_set (args.last3) and is_set (args.last2) and is_set (args.last1) then
contributors = args.last1 .. args.first .. ' & ' .. args.last2;
elseif not is_set (args.last4) and not is_set (args.last3) and not is_set (args.last2) and is_set (args.last1) then
contributors = args.last1 .. args.first;
else
args.err_msg = args.err_msg .. ' author missing from contributor list.';
end
--form the source author-date list
if is_set (args.in4) and is_set (args.in3) and is_set (args.in2) and is_set (args.in1) then
source = args.in1 .. ' et al.';
elseif not is_set (args.in4) and is_set (args.in3) and is_set (args.in2) and is_set (args.in1) then
source = args.in1 .. ', ' .. args.in2 .. ' & ' .. args.in3;
elseif not is_set (args.in4) and not is_set (args.in3) and is_set (args.in2) and is_set (args.in1) then
source = args.in1 .. ' & ' .. args.in2;
elseif not is_set (args.in4) and not is_set (args.in3) and not is_set (args.in2) and is_set (args.in1) then
source = args.in1;
else
args.err_msg = args.err_msg .. ' author missing from source list.'
end
if args.year:match('^[1-9]%d%d%d?%l?$') or args.year:match('^n%.d%.%l?$') or args.year:match('^nd%l?$') then -- 3 or 4 digits, n.d., or nd and optional disambiguator
source = source .. ' (' .. args.year .. ')';
else
args.err_msg = args.err_msg .. ' invalid or missing year.'; -- error message if year not provided or malformed
end
--assemble CITEREF wikilink
source = "[[#CITEREF" .. mw.uri.anchorEncode(table.concat ({args.in1, args.in2, args.in3, args.in4, args.year})) .. "|" .. source .. "]]";
--combine contribution with url to make external link
if args.url ~= '' then
args.contribution = '[' .. args.url .. ' ' .. args.contribution .. ']'; -- format external link
end
if args.separator ~= contributors:sub(-1) then
contributors = contributors .. args.separator; -- add separator if not same as last character in name list (|first=John S. or et al.)
end
-- pages and other insource location
if args.p ~= '' then
args.p = args.page_sep .. args.p;
elseif args.pp ~= '' then
args.p = args.pages_sep .. args.pp; -- args.p not set so use it to hold common insource location info
end
if args.loc ~= '' then
args.p = args.p .. ', ' .. args.loc; -- add arg.loc to args.p
end
--wrap error messages in span
args.err_msg = '<span style="font-size:100%" class="error">' .. args.err_msg .. '</span>';
if ',' == args.separator then
in_text = in_text:lower(); -- CS2 style use lower case
end
-- and put it all together
result = span_open_tag .. contributors .. ' "' .. args.contribution .. '"' .. args.separator .. in_text .. source .. args.p .. args.postscript .. '</span>' .. args.err_msg;
return result;
end
--[[--------------------------< F . H A R V C >----------------------------------------------------------------
Entry point from {{harvc}} template. Fetches parent frame parameters, does a bit of simple error checking
]]
function f.harvc (frame)
local args = f.args_default;
pframe = frame:getParent();
args.contribution = pframe.args.c or -- chapter or contribution
pframe.args.chapter or
pframe.args.contribution or '';
args.first = pframe.args.first or pframe.args.first1 or ''; -- (optional) first author's given name; given names for other authors not supported
args.id = pframe.args.id or '';
args.in1 = pframe.args['in'] or pframe.args.in1 or ''; -- source editor surnames; 'in' is a Lua reserved keyword
args.in2 = pframe.args.in2 or '';
args.in3 = pframe.args.in3 or '';
args.in4 = pframe.args.in4 or '';
args.last1 = pframe.args.last or pframe.args.last1 or ''; -- contribution author(s)
args.last2 = pframe.args.last2 or '';
args.last3 = pframe.args.last3 or '';
args.last4 = pframe.args.last4 or '';
args.p = pframe.args.p or ''; -- source page number(s) or location
args.pp = pframe.args.pp or '';
args.loc = pframe.args.loc or '';
args.separator = pframe.args.separator; -- !! before postscript!! element separator defaults to full stop
args.postscript = pframe.args.ps or pframe.args.postscript;
if not is_set (args.postscript) then
if not is_set (args.separator) then
args.postscript = '.'; -- neither set so set to defaults
args.separator = '.';
elseif ',' == args.separator then
args.postscript = ''; -- CS2 and postscript not set; no terminal punctuation
else
args.postscript = '.'; -- separator not CS2 and postscript not set; use default terminal punctuation
end
else -- if here, postscript set
if 'none' == args.postscript:lower() then -- if |ps=none or |postscript=none then
args.postscript = ''; -- no postscript
end
end
if not is_set (args.separator) then
args.separator = '.'; -- not set in template and we didn't set it here so set to default
end
args.url = pframe.args.url or ''; -- url for chapter or contribution
args.year = pframe.args.year or '';
if not is_set (args.contribution) then
args.err_msg = args.err_msg .. ' required contribution is missing.'; -- error message if source not provided
args.contribution = args.url; -- if set it will give us linkable text
end
if args.last1 == args.in1 and
args.last2 == args.in2 and
args.last3 == args.in3 and
args.last4 == args.in4 and
not is_set (args.id) then
args.err_msg = args.err_msg .. ' required |id= parameter missing.'; -- error message if contributor and source are the same
end
return core (args);
end
--[[
function f.sfn( frame )
local args = f.args_default;
pframe = frame:getParent();
args.postscript = pframe.args.postscript or pframe.args.ps or ".";
args.page = pframe.args.p or pframe.args.page or "";
args.pages = pframe.args.pp or pframe.args.pages or "";
args.location = pframe.args.loc or "";
args.ref = pframe.args.ref or pframe.args.Ref or "";
args.P1 = trim( pframe.args[1] ) or "";
args.P2 = trim( pframe.args[2] ) or "";
args.P3 = trim( pframe.args[3] ) or "";
args.P4 = trim( pframe.args[4] ) or "";
args.P5 = trim( pframe.args[5] ) or "";
local result = core( args );
local name = "FOOTNOTE" .. args.P1 .. args.P2 ..
args.P3 .. args.P4 .. args.P5 .. args.page .. args.pages .. args.location;
result = frame:extensionTag{ name = "ref", args = {name=name}, content=result };
return result;
end
]]
return f;
dfox8vrmcea2an10qmpzf07y5cfujqd
801880
801879
2014-11-09T12:23:38Z
en>Trappist the monk
0
801880
Scribunto
text/plain
f = {
args_default = {
err_msg = '',
page_sep = ", p. ",
pages_sep = ", pp. ",
}
};
--[[--------------------------< I S _ S E T >------------------------------------------------------------------
Whether variable is set or not. A varable is set when it is not nil and not empty.
]]
function is_set( var )
return not (var == nil or var == '');
end
--[[--------------------------< C O R E >----------------------------------------------------------------------
Assembles the various parts provided by the template into a properly formatted bridging citation. Adds punctuation
and text; encloses the whole within a span with id and class attributes.
This creates a CITEREF anchor from |last1= through |last4= and |year=. It also creates a CITEREF link from |in1= through
|in4= and |year=. It is presumed that the dates of contributions are the same as the date of the enclosing work.
Even though not displayed, a year parameter is still required for the CITEREF anchor
]]
function core( args )
local span_open_tag; -- holds CITEREF and css
local contributors = ''; -- chapter or contribution authors
local source = ''; -- editor/author date list that forms a CITEREF link to a full citation; mimics harvnb output except year in parentheses
local in_text = ' In '; --
local result; -- the assemby of the above output
-- form the CITEREF anchor
if is_set (args.id) then
span_open_tag = '<span id="' .. args.id .. '" class="citation">'; -- for use when contributor name is same as source name
else
span_open_tag = '<span id="CITEREF' .. table.concat ({args.last1, args.last2, args.last3, args.last4, args.year}) .. '" class="citation">';
end
-- form the contributors list; similar to {{sfn}} and {{harv}}, 1 to 4 names but no date and also allows first contributor given name
if args.first ~= '' then
args.first = ', ' .. args.first;
end
if is_set (args.last4) and is_set (args.last3) and is_set (args.last2) and is_set (args.last1) then
contributors = args.last1 .. args.first .. ' et al.';
elseif not is_set (args.last4) and is_set (args.last3) and is_set (args.last2) and is_set (args.last1) then
contributors = args.last1 .. args.first .. ', ' .. args.last2 .. ' & ' .. args.last3;
elseif not is_set (args.last4) and not is_set (args.last3) and is_set (args.last2) and is_set (args.last1) then
contributors = args.last1 .. args.first .. ' & ' .. args.last2;
elseif not is_set (args.last4) and not is_set (args.last3) and not is_set (args.last2) and is_set (args.last1) then
contributors = args.last1 .. args.first;
else
args.err_msg = args.err_msg .. ' author missing from contributor list.';
end
--form the source author-date list
if is_set (args.in4) and is_set (args.in3) and is_set (args.in2) and is_set (args.in1) then
source = args.in1 .. ' et al.';
elseif not is_set (args.in4) and is_set (args.in3) and is_set (args.in2) and is_set (args.in1) then
source = args.in1 .. ', ' .. args.in2 .. ' & ' .. args.in3;
elseif not is_set (args.in4) and not is_set (args.in3) and is_set (args.in2) and is_set (args.in1) then
source = args.in1 .. ' & ' .. args.in2;
elseif not is_set (args.in4) and not is_set (args.in3) and not is_set (args.in2) and is_set (args.in1) then
source = args.in1;
else
args.err_msg = args.err_msg .. ' author missing from source list.'
end
if args.year:match('^[1-9]%d%d%d?%l?$') or args.year:match('^n%.d%.%l?$') or args.year:match('^nd%l?$') then -- 3 or 4 digits, n.d., or nd and optional disambiguator
source = source .. ' (' .. args.year .. ')';
else
args.err_msg = args.err_msg .. ' invalid or missing year.'; -- error message if year not provided or malformed
end
--assemble CITEREF wikilink
source = "[[#CITEREF" .. mw.uri.anchorEncode(table.concat ({args.in1, args.in2, args.in3, args.in4, args.year})) .. "|" .. source .. "]]";
--combine contribution with url to make external link
if args.url ~= '' then
args.contribution = '[' .. args.url .. ' ' .. args.contribution .. ']'; -- format external link
end
if args.separator ~= contributors:sub(-1) then
contributors = contributors .. args.separator; -- add separator if not same as last character in name list (|first=John S. or et al.)
end
-- pages and other insource location
if args.p ~= '' then
args.p = args.page_sep .. args.p;
elseif args.pp ~= '' then
args.p = args.pages_sep .. args.pp; -- args.p not set so use it to hold common insource location info
end
if args.loc ~= '' then
args.p = args.p .. ', ' .. args.loc; -- add arg.loc to args.p
end
--wrap error messages in span
args.err_msg = '<span style="font-size:100%" class="error">' .. args.err_msg .. '</span>';
if ',' == args.separator then
in_text = in_text:lower(); -- CS2 style use lower case
end
-- and put it all together
result = span_open_tag .. contributors .. ' "' .. args.contribution .. '"' .. args.separator .. in_text .. source .. args.p .. args.postscript .. '</span>' .. args.err_msg;
return result;
end
--[[--------------------------< F . H A R V C >----------------------------------------------------------------
Entry point from {{harvc}} template. Fetches parent frame parameters, does a bit of simple error checking
]]
function f.harvc (frame)
local args = f.args_default;
pframe = frame:getParent();
args.contribution = pframe.args.c or -- chapter or contribution
pframe.args.chapter or
pframe.args.contribution or '';
args.first = pframe.args.first or pframe.args.first1 or ''; -- (optional) first author's given name; given names for other authors not supported
args.id = pframe.args.id or '';
args.in1 = pframe.args['in'] or pframe.args.in1 or ''; -- source editor surnames; 'in' is a Lua reserved keyword
args.in2 = pframe.args.in2 or '';
args.in3 = pframe.args.in3 or '';
args.in4 = pframe.args.in4 or '';
args.last1 = pframe.args.last or pframe.args.last1 or ''; -- contribution author(s)
args.last2 = pframe.args.last2 or '';
args.last3 = pframe.args.last3 or '';
args.last4 = pframe.args.last4 or '';
args.p = pframe.args.p or ''; -- source page number(s) or location
args.pp = pframe.args.pp or '';
args.loc = pframe.args.loc or '';
args.separator = pframe.args.sep or pframe.args.separator; -- !! before postscript!! element separator defaults to full stop
args.postscript = pframe.args.ps or pframe.args.postscript;
if not is_set (args.postscript) then
if not is_set (args.separator) then
args.postscript = '.'; -- neither set so set to defaults
args.separator = '.';
elseif ',' == args.separator then
args.postscript = ''; -- CS2 and postscript not set; no terminal punctuation
else
args.postscript = '.'; -- separator not CS2 and postscript not set; use default terminal punctuation
end
else -- if here, postscript set
if 'none' == args.postscript:lower() then -- if |ps=none or |postscript=none then
args.postscript = ''; -- no postscript
end
end
if not is_set (args.separator) then
args.separator = '.'; -- not set in template and we didn't set it here so set to default
end
args.url = pframe.args.url or ''; -- url for chapter or contribution
args.year = pframe.args.year or '';
if not is_set (args.contribution) then
args.err_msg = args.err_msg .. ' required contribution is missing.'; -- error message if source not provided
args.contribution = args.url; -- if set it will give us linkable text
end
if args.last1 == args.in1 and
args.last2 == args.in2 and
args.last3 == args.in3 and
args.last4 == args.in4 and
not is_set (args.id) then
args.err_msg = args.err_msg .. ' required |id= parameter missing.'; -- error message if contributor and source are the same
end
return core (args);
end
--[[
function f.sfn( frame )
local args = f.args_default;
pframe = frame:getParent();
args.postscript = pframe.args.postscript or pframe.args.ps or ".";
args.page = pframe.args.p or pframe.args.page or "";
args.pages = pframe.args.pp or pframe.args.pages or "";
args.location = pframe.args.loc or "";
args.ref = pframe.args.ref or pframe.args.Ref or "";
args.P1 = trim( pframe.args[1] ) or "";
args.P2 = trim( pframe.args[2] ) or "";
args.P3 = trim( pframe.args[3] ) or "";
args.P4 = trim( pframe.args[4] ) or "";
args.P5 = trim( pframe.args[5] ) or "";
local result = core( args );
local name = "FOOTNOTE" .. args.P1 .. args.P2 ..
args.P3 .. args.P4 .. args.P5 .. args.page .. args.pages .. args.location;
result = frame:extensionTag{ name = "ref", args = {name=name}, content=result };
return result;
end
]]
return f;
bdgi1fpgzxlp47cc0evfguujqedcs06
801881
801880
2015-04-23T12:27:14Z
en>Trappist the monk
0
Synch from sandbox;
801881
Scribunto
text/plain
local f = {};
--[[--------------------------< I S _ S E T >------------------------------------------------------------------
Whether variable is set or not. A varable is set when it is not nil and not empty.
]]
local function is_set( var )
return not (var == nil or var == '');
end
--[[--------------------------< M A K E _ N A M E >------------------------------------------------------------
Assembles last, first, link, or mask into a displayable contributor name.
]]
local function make_name (last, first, link, mask)
local name = last;
if is_set (first) then
name = name .. ', ' .. first; -- concatenate first onto last
end
if is_set (link) then
name = '[[' .. link .. '|' .. name .. ']]'; -- form a wikilink around the name
end
if is_set (mask) then -- mask this author
mask = tonumber (mask); -- because the value provided might not be a number
if is_set (mask) then
name = string.rep ('—', mask) -- make a string that number length of mdashes
end
end
return name;
end
--[[--------------------------< C O R E >----------------------------------------------------------------------
Assembles the various parts provided by the template into a properly formatted bridging citation. Adds punctuation
and text; encloses the whole within a span with id and class attributes.
This creates a CITEREF anchor from |last1= through |last4= and |year=. It also creates a CITEREF link from |in1= through
|in4= and |year=. It is presumed that the dates of contributions are the same as the date of the enclosing work.
Even though not displayed, a year parameter is still required for the CITEREF anchor
]]
local function core( args )
local span_open_tag; -- holds CITEREF and css
local contributors = ''; -- chapter or contribution authors
local source = ''; -- editor/author date list that forms a CITEREF link to a full citation; mimics harvnb output except year in parentheses
local in_text = ' In '; --
local result; -- the assemby of the above output
-- form the CITEREF anchor
if is_set (args.id) then
span_open_tag = '<span id="' .. args.id .. '" class="citation">'; -- for use when contributor name is same as source name
else
span_open_tag = '<span id="CITEREF' .. table.concat (args.citeref) .. args.year .. '" class="citation">';
end
--[[
form the contributors display list:
if |display-authors= is empty or omitted, display is similar to {{sfn}} and {{harv}}, 1 to 4 last names;
if |display-authors=all then displays all author names in last, first order (similar to CS1/2 authorlist);
if value assigned to |display-authors= is less than the number of author last names, displays the specified number of author names in last, first order followed by et al.
]]
if is_set (args.display_authors) then -- override default harv or sfn style contributor display
local i = 1;
local count;
local etal = false; -- when |display-authors= is same as number of authors in contributor list
if 'all' == args.display_authors:lower() then -- force all contributor first and last names to be displayed
count = #args.last; -- so set count accordingly
elseif 'etal' == args.display_authors:lower():gsub("[ '%.]", '') then -- the :gsub() portion makes 'etal' from a variety of 'et al.' spellings and stylings
count = #args.last; -- display all authors and ...
etal = true; -- ... append 'at al.'
else
count = tonumber (args.display_authors) or 0; -- 0 if can't be converted to a number
if 0 >= count then
args.err_msg = args.err_msg .. ' invalid |display-authors='; -- if zero, then emit error message
end
end
if count > #args.last then
count = #args.last; -- when |display-authors= is more than the number of authors, use the number of authors
end
if count < #args.last then -- when |display-authors= is less than the number of authors
etal = true; -- append 'at al.'
end
while i <= count do
if is_set (contributors) then
contributors = contributors .. '; ' .. make_name (args.last[i], args.first[i], args.link[i], args.mask[i]); -- the rest of the contributors
else
contributors = make_name (args.last[i], args.first[i], args.link[i], args.mask[i]); -- first contributor's name
end
i = i+1; -- bump the index
end
if true == etal then
contributors = contributors .. ' et al.';
end
else -- do default harv- or sfn-style contributor display
if 4 <= #args.last then -- four or more contributors (first followed by et al.)
contributors = args.last[1] .. ' et al.';
elseif 3 == #args.last then -- three (display them all)
contributors = args.last[1] .. ', ' .. args.last[2] .. ' & ' .. args.last[3];
elseif 2 == #args.last then -- two (first & second)
contributors = args.last[1] .. ' & ' .. args.last[2];
elseif 1 == #args.last then -- just one (first)
contributors = args.last[1];
else
args.err_msg = args.err_msg .. ' no authors in contributor list.'; -- this code used to find holes in the list; no more
end
end
--form the source author-date list
if is_set (args.in4) and is_set (args.in3) and is_set (args.in2) and is_set (args.in1) then
source = args.in1 .. ' et al.';
elseif not is_set (args.in4) and is_set (args.in3) and is_set (args.in2) and is_set (args.in1) then
source = args.in1 .. ', ' .. args.in2 .. ' & ' .. args.in3;
elseif not is_set (args.in4) and not is_set (args.in3) and is_set (args.in2) and is_set (args.in1) then
source = args.in1 .. ' & ' .. args.in2;
elseif not is_set (args.in4) and not is_set (args.in3) and not is_set (args.in2) and is_set (args.in1) then
source = args.in1;
else
args.err_msg = args.err_msg .. ' author missing from source list.'
end
if args.year:match('^[1-9]%d%d%d?%l?$') or args.year:match('^n%.d%.%l?$') or args.year:match('^nd%l?$') then -- 3 or 4 digits, n.d., or nd and optional disambiguator
source = source .. ' (' .. args.year .. ')';
else
args.err_msg = args.err_msg .. ' invalid or missing year.'; -- error message if year not provided or is imalformed
end
--assemble CITEREF wikilink
source = "[[#CITEREF" .. mw.uri.anchorEncode(table.concat ({args.in1, args.in2, args.in3, args.in4, args.year})) .. "|" .. source .. "]]";
--combine contribution with url to make external link
if args.url ~= '' then
args.contribution = '[' .. args.url .. ' ' .. args.contribution .. ']'; -- format external link
end
if args.sepc ~= contributors:sub(-1) and args.sepc .. ']]' ~= contributors:sub(-3) then
contributors = contributors .. args.sepc; -- add separator if not same as last character in name list (|first=John S. or et al.)
end
-- pages and other insource location
if args.p ~= '' then
args.p = args.page_sep .. args.p;
elseif args.pp ~= '' then
args.p = args.pages_sep .. args.pp; -- args.p not set so use it to hold common insource location info
end
if args.loc ~= '' then
args.p = args.p .. ', ' .. args.loc; -- add arg.loc to args.p
end
--wrap error messages in span and add help link
if is_set (args.err_msg) then
args.err_msg = '<span style="font-size:100%" class="error"> harvc:' .. args.err_msg .. ' ([[Template:Harvc|help]])</span>';
end
if ',' == args.sepc then
in_text = in_text:lower(); -- CS2 style use lower case
end
-- and put it all together
result = span_open_tag .. contributors .. ' "' .. args.contribution .. '"' .. args.sepc .. in_text .. source .. args.p .. args.ps .. '</span>' .. args.err_msg;
return result;
end
--[[--------------------------< F . H A R V C >----------------------------------------------------------------
Entry point from {{harvc}} template. Fetches parent frame parameters, does a bit of simple error checking
]]
function f.harvc (frame)
local args = {
err_msg = '',
page_sep = ", p. ",
pages_sep = ", pp. ",
sepc = '.',
ps = '.',
last = {},
first = {},
link = {},
mask = {},
citeref = {}
}
local pframe = frame:getParent();
args.contribution = pframe.args.c or -- chapter or contribution
pframe.args.chapter or
pframe.args.contribution or '';
args.id = pframe.args.id or '';
args.in1 = pframe.args['in'] or pframe.args.in1 or ''; -- source editor surnames; 'in' is a Lua reserved keyword
args.in2 = pframe.args.in2 or '';
args.in3 = pframe.args.in3 or '';
args.in4 = pframe.args.in4 or '';
args.display_authors = pframe.args['display-authors']; -- the number of contributor names to display; cs1/2 format includes first names
if is_set (pframe.args['last1']) or is_set (pframe.args['last']) then -- must have at least this to continue
args.last[1] = pframe.args.last or pframe.args.last1; -- get first contributor's last name
args.citeref[1] = args.last[1]; -- add it to the citeref
args.first[1] = pframe.args.first or pframe.args.first1; -- get first contributor's first name
args.link[1] = pframe.args['author-link'] or pframe.args['author-link1']; -- get first contributor's article link
args.mask[1] = pframe.args['author-mask'] or pframe.args['author-mask1']; -- get first contributor's article link
local i = 2; -- index for the rest of the names
while is_set (pframe.args['last'..i]) do -- loop through pfram.args and get the rest of the names
args.last[i] = pframe.args['last'..i]; -- last names
args.first[i] = pframe.args['first'..i]; -- first names
args.link[i] = pframe.args['author-link'..i]; -- first names
args.mask[i] = pframe.args['author-mask'..i]; -- first names
if 5 > i then
args.citeref[i] = args.last[i]; -- collect first four last names for CITEREF anchor
end
i = i + 1 -- bump the index
end
end
args.p = pframe.args.p or ''; -- source page number(s) or location
args.pp = pframe.args.pp or '';
args.loc = pframe.args.loc or '';
if 'cs2' == pframe.args.mode then
args.ps = ''; -- set postscript character to empty string, cs2 mode
args.sepc = ','; -- set seperator character to comma, cs2 mode
end
do -- to limit scope of local temp
local temp = pframe.args.ps or pframe.args.postscript;
if is_set (temp) then
if 'none' == temp:lower() then -- if |ps=none or |postscript=none then
args.ps = ''; -- no postscript
else
args.ps = temp; -- override default postscript
end
end
end -- end of scope limit
args.url = pframe.args.url or ''; -- url for chapter or contribution
args.year = pframe.args.year or ''; -- required
if not is_set (args.contribution) then
args.err_msg = args.err_msg .. ' required contribution is missing.'; -- error message if source not provided
args.contribution = args.url; -- if set it will give us linkable text
end
if args.last[1] == args.in1 and
args.last[2] == args.in2 and
args.last[3] == args.in3 and
args.last[4] == args.in4 and
not is_set (args.id) then
args.err_msg = args.err_msg .. ' required |id= parameter missing.'; -- error message if contributor and source are the same
end
return core (args);
end
return f;
bjscm8q13kov2snwo9x1e00wmwju4ea
801882
801881
2015-08-14T11:17:38Z
en>Trappist the monk
0
Synch from sandbox;
801882
Scribunto
text/plain
local f = {};
--[[--------------------------< I S _ S E T >------------------------------------------------------------------
Whether variable is set or not. A varable is set when it is not nil and not empty.
]]
local function is_set( var )
return not (var == nil or var == '');
end
--[[--------------------------< M A K E _ N A M E >------------------------------------------------------------
Assembles last, first, link, or mask into a displayable contributor name.
]]
local function make_name (last, first, link, mask)
local name = last;
if is_set (first) then
name = name .. ', ' .. first; -- concatenate first onto last
end
if is_set (link) then
name = '[[' .. link .. '|' .. name .. ']]'; -- form a wikilink around the name
end
if is_set (mask) then -- mask this author
mask = tonumber (mask); -- because the value provided might not be a number
if is_set (mask) then
name = string.rep ('—', mask) -- make a string that number length of mdashes
end
end
return name;
end
--[[--------------------------< C O R E >----------------------------------------------------------------------
Assembles the various parts provided by the template into a properly formatted bridging citation. Adds punctuation
and text; encloses the whole within a span with id and class attributes.
This creates a CITEREF anchor from |last1= through |last4= and |year=. It also creates a CITEREF link from |in1= through
|in4= and |year=. It is presumed that the dates of contributions are the same as the date of the enclosing work.
Even though not displayed, a year parameter is still required for the CITEREF anchor
]]
local function core( args )
local span_open_tag; -- holds CITEREF and css
local contributors = ''; -- chapter or contribution authors
local source = ''; -- editor/author date list that forms a CITEREF link to a full citation; mimics harvnb output except year in parentheses
local in_text = ' In '; --
local result; -- the assemby of the above output
-- form the CITEREF anchor
if is_set (args.id) then
span_open_tag = '<span id="' .. args.id .. '" class="citation">'; -- for use when contributor name is same as source name
else
span_open_tag = '<span id="CITEREF' .. table.concat (args.citeref) .. args.year .. '" class="citation">';
end
--[[
form the contributors display list:
if |name-list-format=harv, display is similar to {{sfn}} and {{harv}}, 1 to 4 last names;
if |display-authors= is empty or omitted, display is similar to cs1|2: display all names in last, first order
if |display-authors=etal then displays all author names in last, first order and append et al.
if value assigned to |display-authors= is less than the number of author last names, displays the specified number of author names in last, first order followed by et al.
]]
if 'harv' ~= args.name_list_format then -- default cs1|2 style contributor list
local i = 1;
local count;
local etal = false; -- when |display-authors= is same as number of authors in contributor list
if is_set (args.display_authors) then
if 'etal' == args.display_authors:lower():gsub("[ '%.]", '') then -- the :gsub() portion makes 'etal' from a variety of 'et al.' spellings and stylings
count = #args.last; -- display all authors and ...
etal = true; -- ... append 'et al.'
else
count = tonumber (args.display_authors) or 0; -- 0 if can't be converted to a number
if 0 >= count then
args.err_msg = args.err_msg .. ' invalid |display-authors='; -- if zero, then emit error message
end
end
if count > #args.last then
count = #args.last; -- when |display-authors= is more than the number of authors, use the number of authors
end
if count < #args.last then -- when |display-authors= is less than the number of authors
etal = true; -- append 'et al.'
end
else
count = #args.last; -- set count to display all of the authors
end
while i <= count do
if is_set (contributors) then
contributors = contributors .. '; ' .. make_name (args.last[i], args.first[i], args.link[i], args.mask[i]); -- the rest of the contributors
else
contributors = make_name (args.last[i], args.first[i], args.link[i], args.mask[i]); -- first contributor's name
end
i = i+1; -- bump the index
end
if true == etal then
contributors = contributors .. ' et al.'; -- append et al.
elseif 'yes' == args.last_author_amp then
contributors = contributors:gsub('; ([^;]+)$', ' & %1') -- replace last separator with ' & '
end
else -- do default harv- or sfn-style contributor display
if 4 <= #args.last then -- four or more contributors (first followed by et al.)
contributors = args.last[1] .. ' et al.';
elseif 3 == #args.last then -- three (display them all)
contributors = args.last[1] .. ', ' .. args.last[2] .. ' & ' .. args.last[3];
elseif 2 == #args.last then -- two (first & second)
contributors = args.last[1] .. ' & ' .. args.last[2];
elseif 1 == #args.last then -- just one (first)
contributors = args.last[1];
else
args.err_msg = args.err_msg .. ' no authors in contributor list.'; -- this code used to find holes in the list; no more
end
end
--form the source author-date list
if is_set (args.in4) and is_set (args.in3) and is_set (args.in2) and is_set (args.in1) then
source = args.in1 .. ' et al.';
elseif not is_set (args.in4) and is_set (args.in3) and is_set (args.in2) and is_set (args.in1) then
source = args.in1 .. ', ' .. args.in2 .. ' & ' .. args.in3;
elseif not is_set (args.in4) and not is_set (args.in3) and is_set (args.in2) and is_set (args.in1) then
source = args.in1 .. ' & ' .. args.in2;
elseif not is_set (args.in4) and not is_set (args.in3) and not is_set (args.in2) and is_set (args.in1) then
source = args.in1;
else
args.err_msg = args.err_msg .. ' author missing from source list.'
end
if args.year:match('^[1-9]%d%d%d?%l?$') or args.year:match('^n%.d%.%l?$') or args.year:match('^nd%l?$') then -- 3 or 4 digits, n.d., or nd and optional disambiguator
source = source .. ' (' .. args.year .. ')';
else
args.err_msg = args.err_msg .. ' invalid or missing year.'; -- error message if year not provided or is imalformed
end
--assemble CITEREF wikilink
source = "[[#CITEREF" .. mw.uri.anchorEncode(table.concat ({args.in1, args.in2, args.in3, args.in4, args.year})) .. "|" .. source .. "]]";
--combine contribution with url to make external link
if args.url ~= '' then
args.contribution = '[' .. args.url .. ' ' .. args.contribution .. ']'; -- format external link
end
if args.sepc ~= contributors:sub(-1) and args.sepc .. ']]' ~= contributors:sub(-3) then
contributors = contributors .. args.sepc; -- add separator if not same as last character in name list (|first=John S. or et al.)
end
-- pages and other insource location
if args.p ~= '' then
args.p = args.page_sep .. args.p;
elseif args.pp ~= '' then
args.p = args.pages_sep .. args.pp; -- args.p not set so use it to hold common insource location info
end
if args.loc ~= '' then
args.p = args.p .. ', ' .. args.loc; -- add arg.loc to args.p
end
--wrap error messages in span and add help link
if is_set (args.err_msg) then
args.err_msg = '<span style="font-size:100%" class="error"> harvc:' .. args.err_msg .. ' ([[Template:Harvc|help]])</span>';
end
if ',' == args.sepc then
in_text = in_text:lower(); -- CS2 style use lower case
end
-- and put it all together
result = span_open_tag .. contributors .. ' "' .. args.contribution .. '"' .. args.sepc .. in_text .. source .. args.p .. args.ps .. '</span>' .. args.err_msg;
return result;
end
--[[--------------------------< F . H A R V C >----------------------------------------------------------------
Entry point from {{harvc}} template. Fetches parent frame parameters, does a bit of simple error checking
]]
function f.harvc (frame)
local args = {
err_msg = '',
page_sep = ", p. ",
pages_sep = ", pp. ",
sepc = '.',
ps = '.',
last = {},
first = {},
link = {},
mask = {},
citeref = {}
}
local pframe = frame:getParent();
args.contribution = pframe.args.c or -- chapter or contribution
pframe.args.chapter or
pframe.args.contribution or '';
args.id = pframe.args.id or '';
args.in1 = pframe.args['in'] or pframe.args.in1 or ''; -- source editor surnames; 'in' is a Lua reserved keyword
args.in2 = pframe.args.in2 or '';
args.in3 = pframe.args.in3 or '';
args.in4 = pframe.args.in4 or '';
args.display_authors = pframe.args['display-authors']; -- the number of contributor names to display; cs1/2 format includes first names
args.name_list_format = pframe.args['name-list-format']; -- when set to 'harv' display contributor list in sfn or harv style
args.last_author_amp = pframe.args['last-author-amp'] or -- yes only; |last-author-amp=no does not work (though it does in CS1|2)
pframe.args['lastauthoramp'] or '';
args.last_author_amp:lower(); -- make it case agnostic
if is_set (pframe.args['last1']) or is_set (pframe.args['last']) then -- must have at least this to continue
args.last[1] = pframe.args.last or pframe.args.last1; -- get first contributor's last name
args.citeref[1] = args.last[1]; -- add it to the citeref
args.first[1] = pframe.args.first or pframe.args.first1; -- get first contributor's first name
args.link[1] = pframe.args['author-link'] or pframe.args['author-link1']; -- get first contributor's article link
args.mask[1] = pframe.args['author-mask'] or pframe.args['author-mask1']; -- get first contributor's article link
local i = 2; -- index for the rest of the names
while is_set (pframe.args['last'..i]) do -- loop through pfram.args and get the rest of the names
args.last[i] = pframe.args['last'..i]; -- last names
args.first[i] = pframe.args['first'..i]; -- first names
args.link[i] = pframe.args['author-link'..i]; -- first names
args.mask[i] = pframe.args['author-mask'..i]; -- first names
if 5 > i then
args.citeref[i] = args.last[i]; -- collect first four last names for CITEREF anchor
end
i = i + 1 -- bump the index
end
end
args.p = pframe.args.p or ''; -- source page number(s) or location
args.pp = pframe.args.pp or '';
args.loc = pframe.args.loc or '';
if 'cs2' == pframe.args.mode then
args.ps = ''; -- set postscript character to empty string, cs2 mode
args.sepc = ','; -- set seperator character to comma, cs2 mode
end
do -- to limit scope of local temp
local temp = pframe.args.ps or pframe.args.postscript;
if is_set (temp) then
if 'none' == temp:lower() then -- if |ps=none or |postscript=none then
args.ps = ''; -- no postscript
else
args.ps = temp; -- override default postscript
end
end
end -- end of scope limit
args.url = pframe.args.url or ''; -- url for chapter or contribution
args.year = pframe.args.year or ''; -- required
if not is_set (args.contribution) then
args.err_msg = args.err_msg .. ' required contribution is missing.'; -- error message if source not provided
args.contribution = args.url; -- if set it will give us linkable text
end
if args.last[1] == args.in1 and
args.last[2] == args.in2 and
args.last[3] == args.in3 and
args.last[4] == args.in4 and
not is_set (args.id) then
args.err_msg = args.err_msg .. ' required |id= parameter missing.'; -- error message if contributor and source are the same
end
return core (args);
end
return f;
9wl1h4obcudk2o9mkpcdho2lyc7h5x2
801883
801882
2015-12-04T11:46:27Z
en>Trappist the monk
0
801883
Scribunto
text/plain
local f = {};
--[[--------------------------< I S _ S E T >------------------------------------------------------------------
Whether variable is set or not. A varable is set when it is not nil and not empty.
]]
local function is_set( var )
return not (var == nil or var == '');
end
--[[--------------------------< M A K E _ N A M E >------------------------------------------------------------
Assembles last, first, link, or mask into a displayable contributor name.
]]
local function make_name (last, first, link, mask)
local name = last;
if is_set (first) then
name = name .. ', ' .. first; -- concatenate first onto last
end
if is_set (link) then
name = '[[' .. link .. '|' .. name .. ']]'; -- form a wikilink around the name
end
if is_set (mask) then -- mask this author
mask = tonumber (mask); -- because the value provided might not be a number
if is_set (mask) then
name = string.rep ('—', mask) -- make a string that number length of mdashes
end
end
return name;
end
--[[--------------------------< C O R E >----------------------------------------------------------------------
Assembles the various parts provided by the template into a properly formatted bridging citation. Adds punctuation
and text; encloses the whole within a span with id and class attributes.
This creates a CITEREF anchor from |last1= through |last4= and |year=. It also creates a CITEREF link from |in1= through
|in4= and |year=. It is presumed that the dates of contributions are the same as the date of the enclosing work.
Even though not displayed, a year parameter is still required for the CITEREF anchor
]]
local function core( args )
local span_open_tag; -- holds CITEREF and css
local contributors = ''; -- chapter or contribution authors
local source = ''; -- editor/author date list that forms a CITEREF link to a full citation; mimics harvnb output except year in parentheses
local in_text = ' In '; --
local result; -- the assemby of the above output
-- form the CITEREF anchor
if is_set (args.id) then
span_open_tag = '<span id="' .. args.id .. '" class="citation">'; -- for use when contributor name is same as source name
else
span_open_tag = '<span id="CITEREF' .. table.concat (args.citeref) .. args.year .. '" class="citation">';
end
--[[
form the contributors display list:
if |name-list-format=harv, display is similar to {{sfn}} and {{harv}}, 1 to 4 last names;
if |display-authors= is empty or omitted, display is similar to cs1|2: display all names in last, first order
if |display-authors=etal then displays all author names in last, first order and append et al.
if value assigned to |display-authors= is less than the number of author last names, displays the specified number of author names in last, first order followed by et al.
]]
if 'harv' ~= args.name_list_format then -- default cs1|2 style contributor list
local i = 1;
local count;
local etal = false; -- when |display-authors= is same as number of authors in contributor list
if is_set (args.display_authors) then
if 'etal' == args.display_authors:lower():gsub("[ '%.]", '') then -- the :gsub() portion makes 'etal' from a variety of 'et al.' spellings and stylings
count = #args.last; -- display all authors and ...
etal = true; -- ... append 'et al.'
else
count = tonumber (args.display_authors) or 0; -- 0 if can't be converted to a number
if 0 >= count then
args.err_msg = args.err_msg .. ' invalid |display-authors='; -- if zero, then emit error message
end
end
if count > #args.last then
count = #args.last; -- when |display-authors= is more than the number of authors, use the number of authors
end
if count < #args.last then -- when |display-authors= is less than the number of authors
etal = true; -- append 'et al.'
end
else
count = #args.last; -- set count to display all of the authors
end
while i <= count do
if is_set (contributors) then
contributors = contributors .. '; ' .. make_name (args.last[i], args.first[i], args.link[i], args.mask[i]); -- the rest of the contributors
else
contributors = make_name (args.last[i], args.first[i], args.link[i], args.mask[i]); -- first contributor's name
end
i = i+1; -- bump the index
end
if true == etal then
contributors = contributors .. ' et al.'; -- append et al.
elseif 'yes' == args.last_author_amp then
contributors = contributors:gsub('; ([^;]+)$', ' & %1') -- replace last separator with ' & '
end
else -- do default harv- or sfn-style contributor display
if 4 <= #args.last then -- four or more contributors (first followed by et al.)
contributors = args.last[1] .. ' et al.';
elseif 3 == #args.last then -- three (display them all)
contributors = args.last[1] .. ', ' .. args.last[2] .. ' & ' .. args.last[3];
elseif 2 == #args.last then -- two (first & second)
contributors = args.last[1] .. ' & ' .. args.last[2];
elseif 1 == #args.last then -- just one (first)
contributors = args.last[1];
else
args.err_msg = args.err_msg .. ' no authors in contributor list.'; -- this code used to find holes in the list; no more
end
end
--form the source author-date list
if is_set (args.in4) and is_set (args.in3) and is_set (args.in2) and is_set (args.in1) then
source = args.in1 .. ' et al.';
elseif not is_set (args.in4) and is_set (args.in3) and is_set (args.in2) and is_set (args.in1) then
source = args.in1 .. ', ' .. args.in2 .. ' & ' .. args.in3;
elseif not is_set (args.in4) and not is_set (args.in3) and is_set (args.in2) and is_set (args.in1) then
source = args.in1 .. ' & ' .. args.in2;
elseif not is_set (args.in4) and not is_set (args.in3) and not is_set (args.in2) and is_set (args.in1) then
source = args.in1;
else
args.err_msg = args.err_msg .. ' author missing from source list.'
end
if args.year:match('^[1-9]%d%d%d?%l?$') or args.year:match('^n%.d%.%l?$') or args.year:match('^nd%l?$') then -- 3 or 4 digits, n.d., or nd and optional disambiguator
source = source .. ' (' .. args.year .. ')';
else
args.err_msg = args.err_msg .. ' invalid or missing year.'; -- error message if year not provided or is imalformed
end
--assemble CITEREF wikilink
source = "[[#CITEREF" .. mw.uri.anchorEncode(table.concat ({args.in1, args.in2, args.in3, args.in4, args.year})) .. "|" .. source .. "]]";
--combine contribution with url to make external link
if args.url ~= '' then
args.contribution = '[' .. args.url .. ' ' .. args.contribution .. ']'; -- format external link
end
if args.sepc ~= contributors:sub(-1) and args.sepc .. ']]' ~= contributors:sub(-3) then
contributors = contributors .. args.sepc; -- add separator if not same as last character in name list (|first=John S. or et al.)
end
-- pages and other insource location
if args.p ~= '' then
args.p = args.page_sep .. args.p;
elseif args.pp ~= '' then
args.p = args.pages_sep .. args.pp; -- args.p not set so use it to hold common insource location info
end
if args.loc ~= '' then
args.p = args.p .. ', ' .. args.loc; -- add arg.loc to args.p
end
--wrap error messages in span and add help link
if is_set (args.err_msg) then
args.err_msg = '<span style="font-size:100%" class="error"> harvc:' .. args.err_msg .. ' ([[Template:Harvc|help]])</span>';
end
if ',' == args.sepc then
in_text = in_text:lower(); -- CS2 style use lower case
end
-- and put it all together
result = span_open_tag .. contributors .. ' "' .. args.contribution .. '"' .. args.sepc .. in_text .. source .. args.p .. args.ps .. '</span>' .. args.err_msg;
return result;
end
--[[--------------------------< F . H A R V C >----------------------------------------------------------------
Entry point from {{harvc}} template. Fetches parent frame parameters, does a bit of simple error checking
]]
function f.harvc (frame)
local args = {
err_msg = '',
page_sep = ", p. ",
pages_sep = ", pp. ",
sepc = '.',
ps = '.',
last = {},
first = {},
link = {},
mask = {},
citeref = {}
}
local pframe = frame:getParent();
args.contribution = pframe.args.c or -- chapter or contribution
pframe.args.chapter or
pframe.args.contribution or '';
args.id = pframe.args.id or '';
args.in1 = pframe.args['in'] or pframe.args.in1 or ''; -- source editor surnames; 'in' is a Lua reserved keyword
args.in2 = pframe.args.in2 or '';
args.in3 = pframe.args.in3 or '';
args.in4 = pframe.args.in4 or '';
args.display_authors = pframe.args['display-authors']; -- the number of contributor names to display; cs1/2 format includes first names
args.name_list_format = pframe.args['name-list-format']; -- when set to 'harv' display contributor list in sfn or harv style
args.last_author_amp = pframe.args['last-author-amp'] or -- yes only; |last-author-amp=no does not work (though it does in CS1|2)
pframe.args['lastauthoramp'] or '';
args.last_author_amp:lower(); -- make it case agnostic
if is_set (pframe.args['last1']) or is_set (pframe.args['last']) then -- must have at least this to continue
args.last[1] = pframe.args.last or pframe.args.last1; -- get first contributor's last name
args.citeref[1] = args.last[1]; -- add it to the citeref
args.first[1] = pframe.args.first or pframe.args.first1; -- get first contributor's first name
args.link[1] = pframe.args['author-link'] or pframe.args['author-link1']; -- get first contributor's article link
args.mask[1] = pframe.args['author-mask'] or pframe.args['author-mask1']; -- get first contributor's article link
local i = 2; -- index for the rest of the names
while is_set (pframe.args['last'..i]) do -- loop through pfram.args and get the rest of the names
args.last[i] = pframe.args['last'..i]; -- last names
args.first[i] = pframe.args['first'..i]; -- first names
args.link[i] = pframe.args['author-link'..i]; -- first names
args.mask[i] = pframe.args['author-mask'..i]; -- first names
if 5 > i then
args.citeref[i] = args.last[i]; -- collect first four last names for CITEREF anchor
end
i = i + 1 -- bump the index
end
end
args.p = pframe.args.p or ''; -- source page number(s) or location
args.pp = pframe.args.pp or '';
args.loc = pframe.args.loc or '';
if 'cs2' == pframe.args.mode then
args.ps = ''; -- set postscript character to empty string, cs2 mode
args.sepc = ','; -- set seperator character to comma, cs2 mode
end
do -- to limit scope of local temp
local temp = pframe.args.ps or pframe.args.postscript;
if is_set (temp) then
if 'none' == temp:lower() then -- if |ps=none or |postscript=none then
args.ps = ''; -- no postscript
else
args.ps = temp; -- override default postscript
end
end
end -- end of scope limit
args.url = pframe.args.url or -- url for chapter or contribution
pframe.args['chapter-url'] or
pframe.args['contribution-url'] or '';
args.year = pframe.args.year or ''; -- required
if not is_set (args.contribution) then
args.err_msg = args.err_msg .. ' required contribution is missing.'; -- error message if source not provided
args.contribution = args.url; -- if set it will give us linkable text
end
if args.last[1] == args.in1 and
args.last[2] == args.in2 and
args.last[3] == args.in3 and
args.last[4] == args.in4 and
not is_set (args.id) then
args.err_msg = args.err_msg .. ' required |id= parameter missing.'; -- error message if contributor and source are the same
end
return core (args);
end
return f;
fey5zey7w1eiis79725wp7wn8c07p9f
801884
801883
2019-08-28T22:52:29Z
en>Trappist the monk
0
sync from sandbox;
801884
Scribunto
text/plain
require('Module:No globals')
local code_open_tag = '<code style="color: inherit; background: inherit; border: inherit; padding: inherit;">';
--[[--------------------------< I S _ S E T >------------------------------------------------------------------
Whether variable is set or not. A varable is set when it is not nil and not empty.
]]
local function is_set( var )
return not (var == nil or var == '');
end
--[[--------------------------< C H E C K _ Y E A R S >--------------------------------------------------------
evaluates params to see if they are one of these forms with or without lowercase letter disambiguator (same as in
Module:Footnotes):
YYYY
n.d.
nd
c. YYYY
YYYY–YYYY (separator is endash)
when anchor_year present, year portion must be same as year param and must have disambiguator
returns empty string when params have correct form; error message else
]]
local function check_years (year, anchor_year)
local y, ay;
if not is_set (year) then -- year is required so return error message when not set
return ' missing ' .. code_open_tag .. '|year=</code>.';
end
local patterns = { -- allowed year patterns from Module:Footnotes (captures added here)
'^(%d%d%d%d?)%l?$', -- YYY or YYYY
'^(n%.d%.)%l?$', -- n.d.
'^(nd)%l?$', -- nd
'^(c%. %d%d%d%d?)%l?$', -- c. YYY or c. YYYY
'^(%d%d%d%d–%d%d%d%d)%l?$' -- YYYY–YYYY
}
for _, pattern in ipairs (patterns) do -- spin through the patterns
y = year:match (pattern); -- y is the year portion
if y then
break; -- when y is set, we found a match so done
end
end
if not y then
return ' invalid ' .. code_open_tag .. '|year=</code>.'; -- y not set, so year is malformed
end
if is_set (anchor_year) then -- anchor_year is optional
for _, pattern in ipairs (patterns) do -- spin through the patterns
ay = anchor_year:match (pattern); -- ay is the year portion
if ay then
break; -- when ay is set, we found a match so done
end
end
if not ay then
return ' invalid ' .. code_open_tag .. '|anchor-year</code>.'; -- ay not set, so anchor_year is malformed
end
if not anchor_year:match ('%l$') then
return ' ' .. code_open_tag .. '|anchor-year=</code> missing dab.'; -- anchor_year must end with a disambiguator letter
end
if y ~= ay then
return ' ' .. code_open_tag .. '|year=</code> / ' .. code_open_tag .. '|anchor-year=</code> mismatch.'; -- 'year' portions of year and anchor_year must be the same
end
end
return ''; -- both years are good; empty string for concatenation
end
--[[--------------------------< M A K E _ N A M E >------------------------------------------------------------
Assembles last, first, link, or mask into a displayable contributor name.
]]
local function make_name (last, first, link, mask)
local name = last;
if is_set (first) then
name = name .. ', ' .. first; -- concatenate first onto last
end
if is_set (link) then
name = '[[' .. link .. '|' .. name .. ']]'; -- form a wikilink around the name
end
if is_set (mask) then -- mask this author
mask = tonumber (mask); -- because the value provided might not be a number
if is_set (mask) then
name = string.rep ('—', mask) -- make a string that number length of mdashes
end
end
return name;
end
--[[--------------------------< C O R E >----------------------------------------------------------------------
Assembles the various parts provided by the template into a properly formatted bridging citation. Adds punctuation
and text; encloses the whole within a span with id and class attributes.
This creates a CITEREF anchor from |last1= through |last4= and |year=. It also creates a CITEREF link from |in1= through
|in4= and |year=. It is presumed that the dates of contributions are the same as the date of the enclosing work.
Even though not displayed, a year parameter is still required for the CITEREF anchor
]]
local function core( args )
local span_open_tag; -- holds CITEREF and css
local contributors = ''; -- chapter or contribution authors
local source = ''; -- editor/author date list that forms a CITEREF link to a full citation
local in_text = ' In ';
local result; -- the assemby of the above output
-- form the CITEREF anchor
if is_set (args.id) then
span_open_tag = '<span id="' .. args.id .. '" class="citation">'; -- for use when contributor name is same as source name
else
span_open_tag = '<span id="CITEREF' .. table.concat (args.citeref) .. (is_set (args['anchor-year']) and args['anchor-year'] or args.year) .. '" class="citation">';
end
--[[
form the contributors display list:
if |name-list-format=harv, display is similar to {{sfn}} and {{harv}}, 1 to 4 last names;
if |display-authors= is empty or omitted, display is similar to cs1|2: display all names in last, first order
if |display-authors=etal then displays all author names in last, first order and append et al.
if value assigned to |display-authors= is less than the number of author last names, displays the specified number of author names in last, first order followed by et al.
]]
if 'harv' ~= args.name_list_format then -- default cs1|2 style contributor list
local i = 1;
local count;
local etal = false; -- when |display-authors= is same as number of authors in contributor list
if is_set (args.display_authors) then
if 'etal' == args.display_authors:lower():gsub("[ '%.]", '') then -- the :gsub() portion makes 'etal' from a variety of 'et al.' spellings and stylings
count = #args.last; -- display all authors and ...
etal = true; -- ... append 'et al.'
else
count = tonumber (args.display_authors) or 0; -- 0 if can't be converted to a number
if 0 >= count then
args.err_msg = args.err_msg .. ' invalid ' .. code_open_tag .. '|display-authors=</code>'; -- if zero, then emit error message
end
end
if count > #args.last then
count = #args.last; -- when |display-authors= is more than the number of authors, use the number of authors
end
if count < #args.last then -- when |display-authors= is less than the number of authors
etal = true; -- append 'et al.'
end
else
count = #args.last; -- set count to display all of the authors
end
while i <= count do
if is_set (contributors) then
contributors = contributors .. '; ' .. make_name (args.last[i], args.first[i], args.link[i], args.mask[i]); -- the rest of the contributors
else
contributors = make_name (args.last[i], args.first[i], args.link[i], args.mask[i]); -- first contributor's name
end
i = i+1; -- bump the index
end
if true == etal then
contributors = contributors .. ' et al.'; -- append et al.
elseif 'yes' == args.last_author_amp then
contributors = contributors:gsub('; ([^;]+)$', ' & %1') -- replace last separator with ' & '
end
else -- do default harv- or sfn-style contributor display
if 4 <= #args.last then -- four or more contributors (first followed by et al.)
contributors = args.last[1] .. ' et al.';
elseif 3 == #args.last then -- three (display them all)
contributors = args.last[1] .. ', ' .. args.last[2] .. ' & ' .. args.last[3];
elseif 2 == #args.last then -- two (first & second)
contributors = args.last[1] .. ' & ' .. args.last[2];
elseif 1 == #args.last then -- just one (first)
contributors = args.last[1];
else
args.err_msg = args.err_msg .. ' no authors in contributor list.'; -- this code used to find holes in the list; no more
end
end
--form the source author-date list
if is_set (args.in4) and is_set (args.in3) and is_set (args.in2) and is_set (args.in1) then
source = args.in1 .. ' et al.';
elseif not is_set (args.in4) and is_set (args.in3) and is_set (args.in2) and is_set (args.in1) then
source = args.in1 .. ', ' .. args.in2 .. ' & ' .. args.in3;
elseif not is_set (args.in4) and not is_set (args.in3) and is_set (args.in2) and is_set (args.in1) then
source = args.in1 .. ' & ' .. args.in2;
elseif not is_set (args.in4) and not is_set (args.in3) and not is_set (args.in2) and is_set (args.in1) then
source = args.in1;
else
args.err_msg = args.err_msg .. ' author missing from source list.'
end
source = source .. ' ' .. args.open .. args.year .. args.close; -- add the year with or without brackets
--assemble CITEREF wikilink
source = "[[#CITEREF" .. mw.uri.anchorEncode(table.concat ({args.in1, args.in2, args.in3, args.in4, args.year})) .. "|" .. source .. "]]";
--combine contribution with url to make external link
if args.url ~= '' then
args.contribution = '[' .. args.url .. ' ' .. args.contribution .. ']'; -- format external link
end
if is_set (args['anchor-year']) then
contributors = contributors .. ' (' .. args['anchor-year'] .. ')' .. args.sepc;
elseif args.sepc ~= contributors:sub(-1) and args.sepc .. ']]' ~= contributors:sub(-3) then
contributors = contributors .. args.sepc; -- add separator if not same as last character in name list (|first=John S. or et al.)
end
-- pages and other insource location
if args.p ~= '' then
args.p = args.page_sep .. args.p;
elseif args.pp ~= '' then
args.p = args.pages_sep .. args.pp; -- args.p not set so use it to hold common insource location info
end
if args.loc ~= '' then
args.p = args.p .. ', ' .. args.loc; -- add arg.loc to args.p
end
--wrap error messages in span and add help link
if is_set (args.err_msg) then
args.err_msg = '<span style="font-size:100%" class="error"> harvc:' .. args.err_msg .. ' ([[Template:Harvc|help]])</span>';
end
if ',' == args.sepc then
in_text = in_text:lower(); -- CS2 style use lower case
end
-- and put it all together
result = span_open_tag .. contributors .. ' "' .. args.contribution .. '"' .. args.sepc .. in_text .. source .. args.p .. args.ps .. '</span>' .. args.err_msg;
return result;
end
--[[--------------------------< H A R V C >--------------------------------------------------------------------
Entry point from {{harvc}} template. Fetches parent frame parameters, does a bit of simple error checking
]]
local function harvc (frame)
local args = {
err_msg = '',
page_sep = ", p. ",
pages_sep = ", pp. ",
sepc = '.',
ps = '.',
open = '(', -- year brackets for source year
close = ')',
last = {},
first = {},
link = {},
mask = {},
citeref = {}
}
local pframe = frame:getParent();
args.contribution = pframe.args.c or -- chapter or contribution
pframe.args.chapter or
pframe.args.contribution or '';
args.id = pframe.args.id or '';
args.in1 = pframe.args['in'] or pframe.args.in1 or ''; -- source editor surnames; 'in' is a Lua reserved keyword
args.in2 = pframe.args.in2 or '';
args.in3 = pframe.args.in3 or '';
args.in4 = pframe.args.in4 or '';
args.display_authors = pframe.args['display-authors']; -- the number of contributor names to display; cs1|2 format includes first names
args.name_list_format = pframe.args['name-list-format']; -- when set to 'harv' display contributor list in sfn or harv style
args.last_author_amp = pframe.args['last-author-amp'] or -- yes only; |last-author-amp=no does not work (though it does in cs1|2)
pframe.args['lastauthoramp'] or '';
args.last_author_amp = args.last_author_amp:lower(); -- make it case agnostic
if is_set (pframe.args.last) or is_set (pframe.args.last1) or
is_set (pframe.args.author) or is_set (pframe.args.author1) then -- must have at least this to continue
args.last[1] = pframe.args.last or pframe.args.last1 or pframe.args.author or pframe.args.author1; -- get first contributor's last name
args.citeref[1] = args.last[1]; -- add it to the citeref
args.first[1] = pframe.args.first or pframe.args.first1; -- get first contributor's first name
args.link[1] = pframe.args['author-link'] or pframe.args['author-link1']; -- get first contributor's article link
args.mask[1] = pframe.args['author-mask'] or pframe.args['author-mask1']; -- get first contributor's article link
local i = 2; -- index for the rest of the names
while is_set (pframe.args['last'..i]) or is_set (pframe.args['author'..i]) do -- loop through pframe.args and get the rest of the names
args.last[i] = pframe.args['last'..i] or pframe.args['author'..i]; -- last names
args.first[i] = pframe.args['first'..i]; -- first names
args.link[i] = pframe.args['author-link'..i]; -- links
args.mask[i] = pframe.args['author-mask'..i]; -- masks
if 5 > i then
args.citeref[i] = args.last[i]; -- collect first four last names for CITEREF anchor
end
i = i + 1 -- bump the index
end
end
args.p = pframe.args.p or ''; -- source page number(s) or location
args.pp = pframe.args.pp or '';
args.loc = pframe.args.loc or '';
if 'cs2' == pframe.args.mode then
args.ps = ''; -- set postscript character to empty string, cs2 mode
args.sepc = ','; -- set seperator character to comma, cs2 mode
end
do -- to limit scope of local temp
local temp = pframe.args.ps or pframe.args.postscript;
if is_set (temp) then
if 'none' == temp:lower() then -- if |ps=none or |postscript=none then
args.ps = ''; -- no postscript
else
args.ps = temp; -- override default postscript
end
end
end -- end of scope limit
if 'yes' == pframe.args.nb then -- if no brackets around year in link to cs1|2 template
args.open = ''; -- unset these
args.close = '';
end
args.url = pframe.args.url or -- url for chapter or contribution
pframe.args['chapter-url'] or
pframe.args['contribution-url'] or '';
args.year = pframe.args.year or ''; -- required
args['anchor-year'] = pframe.args['anchor-year'] or '';
args.err_msg = args.err_msg .. check_years (args.year, args['anchor-year']);
if not is_set (args.contribution) then
args.err_msg = args.err_msg .. ' required contribution is missing.'; -- error message if source not provided
args.contribution = args.url; -- if set it will give us linkable text
end
if args.last[1] == args.in1 and
args.last[2] == args.in2 and
args.last[3] == args.in3 and
args.last[4] == args.in4 and
not is_set (args.id) then
args.err_msg = args.err_msg .. ' required ' .. code_open_tag .. '|id=</code> parameter missing.'; -- error message if contributor and source are the same
end
return core (args);
end
--[[--------------------------< E X P O R T E D F U N C T I O N S >------------------------------------------
]]
return {
harvc = harvc
};
4q0ahnmlhh9ef4ex4s82sbrebpdzsiv
801885
801884
2019-09-13T10:55:54Z
en>Trappist the monk
0
sync from sandbox;
801885
Scribunto
text/plain
require('Module:No globals')
local code_open_tag = '<code style="color: inherit; background: inherit; border: inherit; padding: inherit;">';
--[[--------------------------< I S _ S E T >------------------------------------------------------------------
Whether variable is set or not. A varable is set when it is not nil and not empty.
]]
local function is_set( var )
return not (var == nil or var == '');
end
--[[--------------------------< C H E C K _ Y E A R S >--------------------------------------------------------
evaluates params to see if they are one of these forms with or without lowercase letter disambiguator (same as in
Module:Footnotes):
YYYY
n.d.
nd
c. YYYY
YYYY–YYYY (separator is endash)
when anchor_year present, year portion must be same as year param and must have disambiguator
returns empty string when params have correct form; error message else
]]
local function check_years (year, anchor_year)
local y, ay;
if not is_set (year) then -- year is required so return error message when not set
return ' missing ' .. code_open_tag .. '|year=</code>.';
end
local patterns = { -- allowed year patterns from Module:Footnotes (captures added here)
'^(%d%d%d%d?)%l?$', -- YYY or YYYY
'^(n%.d%.)%l?$', -- n.d.
'^(nd)%l?$', -- nd
'^(c%. %d%d%d%d?)%l?$', -- c. YYY or c. YYYY
'^(%d%d%d%d–%d%d%d%d)%l?$' -- YYYY–YYYY
}
for _, pattern in ipairs (patterns) do -- spin through the patterns
y = year:match (pattern); -- y is the year portion
if y then
break; -- when y is set, we found a match so done
end
end
if not y then
return ' invalid ' .. code_open_tag .. '|year=</code>.'; -- y not set, so year is malformed
end
if is_set (anchor_year) then -- anchor_year is optional
for _, pattern in ipairs (patterns) do -- spin through the patterns
ay = anchor_year:match (pattern); -- ay is the year portion
if ay then
break; -- when ay is set, we found a match so done
end
end
if not ay then
return ' invalid ' .. code_open_tag .. '|anchor-year</code>.'; -- ay not set, so anchor_year is malformed
end
if not anchor_year:match ('%l$') then
return ' ' .. code_open_tag .. '|anchor-year=</code> missing dab.'; -- anchor_year must end with a disambiguator letter
end
if y ~= ay then
return ' ' .. code_open_tag .. '|year=</code> / ' .. code_open_tag .. '|anchor-year=</code> mismatch.'; -- 'year' portions of year and anchor_year must be the same
end
end
return ''; -- both years are good; empty string for concatenation
end
--[[--------------------------< M A K E _ N A M E >------------------------------------------------------------
Assembles last, first, link, or mask into a displayable contributor name.
]]
local function make_name (last, first, link, mask)
local name = last;
if is_set (first) then
name = name .. ', ' .. first; -- concatenate first onto last
end
if is_set (link) then
name = '[[' .. link .. '|' .. name .. ']]'; -- form a wikilink around the name
end
if is_set (mask) then -- mask this author
if tonumber(mask) then
name = string.rep ('—', mask) -- make a string that number length of mdashes
else
name = mask; -- mask is not a number so use the mask text
end
end
return name;
end
--[[--------------------------< C O R E >----------------------------------------------------------------------
Assembles the various parts provided by the template into a properly formatted bridging citation. Adds punctuation
and text; encloses the whole within a span with id and class attributes.
This creates a CITEREF anchor from |last1= through |last4= and |year=. It also creates a CITEREF link from |in1= through
|in4= and |year=. It is presumed that the dates of contributions are the same as the date of the enclosing work.
Even though not displayed, a year parameter is still required for the CITEREF anchor
]]
local function core( args )
local span_open_tag; -- holds CITEREF and css
local contributors = ''; -- chapter or contribution authors
local source = ''; -- editor/author date list that forms a CITEREF link to a full citation
local in_text = ' In ';
local result; -- the assemby of the above output
-- form the CITEREF anchor
if is_set (args.id) then
span_open_tag = '<span id="' .. args.id .. '" class="citation">'; -- for use when contributor name is same as source name
else
span_open_tag = '<span id="CITEREF' .. table.concat (args.citeref) .. (is_set (args['anchor-year']) and args['anchor-year'] or args.year) .. '" class="citation">';
end
--[[
form the contributors display list:
if |name-list-format=harv, display is similar to {{sfn}} and {{harv}}, 1 to 4 last names;
if |display-authors= is empty or omitted, display is similar to cs1|2: display all names in last, first order
if |display-authors=etal then displays all author names in last, first order and append et al.
if value assigned to |display-authors= is less than the number of author last names, displays the specified number of author names in last, first order followed by et al.
]]
if 'harv' ~= args.name_list_format then -- default cs1|2 style contributor list
local i = 1;
local count;
local etal = false; -- when |display-authors= is same as number of authors in contributor list
if is_set (args.display_authors) then
if 'etal' == args.display_authors:lower():gsub("[ '%.]", '') then -- the :gsub() portion makes 'etal' from a variety of 'et al.' spellings and stylings
count = #args.last; -- display all authors and ...
etal = true; -- ... append 'et al.'
else
count = tonumber (args.display_authors) or 0; -- 0 if can't be converted to a number
if 0 >= count then
args.err_msg = args.err_msg .. ' invalid ' .. code_open_tag .. '|display-authors=</code>'; -- if zero, then emit error message
end
end
if count > #args.last then
count = #args.last; -- when |display-authors= is more than the number of authors, use the number of authors
end
if count < #args.last then -- when |display-authors= is less than the number of authors
etal = true; -- append 'et al.'
end
else
count = #args.last; -- set count to display all of the authors
end
while i <= count do
if is_set (contributors) then
contributors = contributors .. '; ' .. make_name (args.last[i], args.first[i], args.link[i], args.mask[i]); -- the rest of the contributors
else
contributors = make_name (args.last[i], args.first[i], args.link[i], args.mask[i]); -- first contributor's name
end
i = i+1; -- bump the index
end
if true == etal then
contributors = contributors .. ' et al.'; -- append et al.
elseif 'yes' == args.last_author_amp then
contributors = contributors:gsub('; ([^;]+)$', ' & %1') -- replace last separator with ' & '
end
else -- do default harv- or sfn-style contributor display
if 4 <= #args.last then -- four or more contributors (first followed by et al.)
contributors = args.last[1] .. ' et al.';
elseif 3 == #args.last then -- three (display them all)
contributors = args.last[1] .. ', ' .. args.last[2] .. ' & ' .. args.last[3];
elseif 2 == #args.last then -- two (first & second)
contributors = args.last[1] .. ' & ' .. args.last[2];
elseif 1 == #args.last then -- just one (first)
contributors = args.last[1];
else
args.err_msg = args.err_msg .. ' no authors in contributor list.'; -- this code used to find holes in the list; no more
end
end
--form the source author-date list
if is_set (args.in4) and is_set (args.in3) and is_set (args.in2) and is_set (args.in1) then
source = args.in1 .. ' et al.';
elseif not is_set (args.in4) and is_set (args.in3) and is_set (args.in2) and is_set (args.in1) then
source = args.in1 .. ', ' .. args.in2 .. ' & ' .. args.in3;
elseif not is_set (args.in4) and not is_set (args.in3) and is_set (args.in2) and is_set (args.in1) then
source = args.in1 .. ' & ' .. args.in2;
elseif not is_set (args.in4) and not is_set (args.in3) and not is_set (args.in2) and is_set (args.in1) then
source = args.in1;
else
args.err_msg = args.err_msg .. ' author missing from source list.'
end
source = source .. ' ' .. args.open .. args.year .. args.close; -- add the year with or without brackets
--assemble CITEREF wikilink
source = "[[#CITEREF" .. mw.uri.anchorEncode(table.concat ({args.in1, args.in2, args.in3, args.in4, args.year})) .. "|" .. source .. "]]";
--combine contribution with url to make external link
if args.url ~= '' then
args.contribution = '[' .. args.url .. ' ' .. args.contribution .. ']'; -- format external link
end
if is_set (args['anchor-year']) then
contributors = contributors .. ' (' .. args['anchor-year'] .. ')' .. args.sepc;
elseif args.sepc ~= contributors:sub(-1) and args.sepc .. ']]' ~= contributors:sub(-3) then
contributors = contributors .. args.sepc; -- add separator if not same as last character in name list (|first=John S. or et al.)
end
-- pages and other insource location
if args.p ~= '' then
args.p = args.page_sep .. args.p;
elseif args.pp ~= '' then
args.p = args.pages_sep .. args.pp; -- args.p not set so use it to hold common insource location info
end
if args.loc ~= '' then
args.p = args.p .. ', ' .. args.loc; -- add arg.loc to args.p
end
--wrap error messages in span and add help link
if is_set (args.err_msg) then
args.err_msg = '<span style="font-size:100%" class="error"> harvc:' .. args.err_msg .. ' ([[Template:Harvc|help]])</span>';
end
if ',' == args.sepc then
in_text = in_text:lower(); -- CS2 style use lower case
end
-- and put it all together
result = span_open_tag .. contributors .. ' "' .. args.contribution .. '"' .. args.sepc .. in_text .. source .. args.p .. args.ps .. '</span>' .. args.err_msg;
return result;
end
--[[--------------------------< H A R V C >--------------------------------------------------------------------
Entry point from {{harvc}} template. Fetches parent frame parameters, does a bit of simple error checking
]]
local function harvc (frame)
local args = {
err_msg = '',
page_sep = ", p. ",
pages_sep = ", pp. ",
sepc = '.',
ps = '.',
open = '(', -- year brackets for source year
close = ')',
last = {},
first = {},
link = {},
mask = {},
citeref = {}
}
local pframe = frame:getParent();
args.contribution = pframe.args.c or -- chapter or contribution
pframe.args.chapter or
pframe.args.contribution or '';
args.id = pframe.args.id or '';
args.in1 = pframe.args['in'] or pframe.args.in1 or ''; -- source editor surnames; 'in' is a Lua reserved keyword
args.in2 = pframe.args.in2 or '';
args.in3 = pframe.args.in3 or '';
args.in4 = pframe.args.in4 or '';
args.display_authors = pframe.args['display-authors']; -- the number of contributor names to display; cs1|2 format includes first names
args.name_list_format = pframe.args['name-list-format']; -- when set to 'harv' display contributor list in sfn or harv style
args.last_author_amp = pframe.args['last-author-amp'] or -- yes only; |last-author-amp=no does not work (though it does in cs1|2)
pframe.args['lastauthoramp'] or '';
args.last_author_amp = args.last_author_amp:lower(); -- make it case agnostic
if is_set (pframe.args.last) or is_set (pframe.args.last1) or
is_set (pframe.args.author) or is_set (pframe.args.author1) then -- must have at least this to continue
args.last[1] = pframe.args.last or pframe.args.last1 or pframe.args.author or pframe.args.author1; -- get first contributor's last name
args.citeref[1] = args.last[1]; -- add it to the citeref
args.first[1] = pframe.args.first or pframe.args.first1; -- get first contributor's first name
args.link[1] = pframe.args['author-link'] or pframe.args['author-link1']; -- get first contributor's article link
args.mask[1] = pframe.args['author-mask'] or pframe.args['author-mask1']; -- get first contributor's article link
local i = 2; -- index for the rest of the names
while is_set (pframe.args['last'..i]) or is_set (pframe.args['author'..i]) do -- loop through pframe.args and get the rest of the names
args.last[i] = pframe.args['last'..i] or pframe.args['author'..i]; -- last names
args.first[i] = pframe.args['first'..i]; -- first names
args.link[i] = pframe.args['author-link'..i]; -- links
args.mask[i] = pframe.args['author-mask'..i]; -- masks
if 5 > i then
args.citeref[i] = args.last[i]; -- collect first four last names for CITEREF anchor
end
i = i + 1 -- bump the index
end
end
args.p = pframe.args.p or ''; -- source page number(s) or location
args.pp = pframe.args.pp or '';
args.loc = pframe.args.loc or '';
if 'cs2' == pframe.args.mode then
args.ps = ''; -- set postscript character to empty string, cs2 mode
args.sepc = ','; -- set seperator character to comma, cs2 mode
end
do -- to limit scope of local temp
local temp = pframe.args.ps or pframe.args.postscript;
if is_set (temp) then
if 'none' == temp:lower() then -- if |ps=none or |postscript=none then
args.ps = ''; -- no postscript
else
args.ps = temp; -- override default postscript
end
end
end -- end of scope limit
if 'yes' == pframe.args.nb then -- if no brackets around year in link to cs1|2 template
args.open = ''; -- unset these
args.close = '';
end
args.url = pframe.args.url or -- url for chapter or contribution
pframe.args['chapter-url'] or
pframe.args['contribution-url'] or '';
args.year = pframe.args.year or ''; -- required
args['anchor-year'] = pframe.args['anchor-year'] or '';
args.err_msg = args.err_msg .. check_years (args.year, args['anchor-year']);
if not is_set (args.contribution) then
args.err_msg = args.err_msg .. ' required contribution is missing.'; -- error message if source not provided
args.contribution = args.url; -- if set it will give us linkable text
end
if args.last[1] == args.in1 and
args.last[2] == args.in2 and
args.last[3] == args.in3 and
args.last[4] == args.in4 and
not is_set (args.id) then
args.err_msg = args.err_msg .. ' required ' .. code_open_tag .. '|id=</code> parameter missing.'; -- error message if contributor and source are the same
end
return core (args);
end
--[[--------------------------< E X P O R T E D F U N C T I O N S >------------------------------------------
]]
return {
harvc = harvc
};
isqsy0v32zkgwkdy7jd7h4xps9ojdsl
801886
801885
2019-10-07T14:15:38Z
en>Trappist the monk
0
sync from sandbox;
801886
Scribunto
text/plain
require('Module:No globals')
local code_open_tag = '<code style="color: inherit; background: inherit; border: inherit; padding: inherit;">';
local lock_icons = { --icon classes are defined in Module:Citation/CS1/styles.css
-- ['free'] = {'cs1-lock-free', 'Freely accessible'}, -- not supported for urls
['registration'] = {'cs1-lock-registration', 'Free registration required'},
['limited'] = {'cs1-lock-limited', 'Free access subject to limited trial, subscription normally required'},
['subscription'] = {'cs1-lock-subscription', 'Paid subscription required'},
}
--[[--------------------------< I S _ S E T >------------------------------------------------------------------
Whether variable is set or not. A varable is set when it is not nil and not empty.
]]
local function is_set( var )
return not (var == nil or var == '');
end
--[[--------------------------< C H E C K _ Y E A R S >--------------------------------------------------------
evaluates params to see if they are one of these forms with or without lowercase letter disambiguator (same as in
Module:Footnotes):
YYYY
n.d.
nd
c. YYYY
YYYY–YYYY (separator is endash)
when anchor_year present, year portion must be same as year param and must have disambiguator
returns empty string when params have correct form; error message else
]]
local function check_years (year, anchor_year)
local y, ay;
if not is_set (year) then -- year is required so return error message when not set
return ' missing ' .. code_open_tag .. '|year=</code>.';
end
local patterns = { -- allowed year patterns from Module:Footnotes (captures added here)
'^(%d%d%d%d?)%l?$', -- YYY or YYYY
'^(n%.d%.)%l?$', -- n.d.
'^(nd)%l?$', -- nd
'^(c%. %d%d%d%d?)%l?$', -- c. YYY or c. YYYY
'^(%d%d%d%d–%d%d%d%d)%l?$' -- YYYY–YYYY
}
for _, pattern in ipairs (patterns) do -- spin through the patterns
y = year:match (pattern); -- y is the year portion
if y then
break; -- when y is set, we found a match so done
end
end
if not y then
return ' invalid ' .. code_open_tag .. '|year=</code>.'; -- y not set, so year is malformed
end
if is_set (anchor_year) then -- anchor_year is optional
for _, pattern in ipairs (patterns) do -- spin through the patterns
ay = anchor_year:match (pattern); -- ay is the year portion
if ay then
break; -- when ay is set, we found a match so done
end
end
if not ay then
return ' invalid ' .. code_open_tag .. '|anchor-year</code>.'; -- ay not set, so anchor_year is malformed
end
if not anchor_year:match ('%l$') then
return ' ' .. code_open_tag .. '|anchor-year=</code> missing dab.'; -- anchor_year must end with a disambiguator letter
end
if y ~= ay then
return ' ' .. code_open_tag .. '|year=</code> / ' .. code_open_tag .. '|anchor-year=</code> mismatch.'; -- 'year' portions of year and anchor_year must be the same
end
end
return ''; -- both years are good; empty string for concatenation
end
--[[--------------------------< M A K E _ N A M E >------------------------------------------------------------
Assembles last, first, link, or mask into a displayable contributor name.
]]
local function make_name (last, first, link, mask)
local name = last;
if is_set (first) then
name = name .. ', ' .. first; -- concatenate first onto last
end
if is_set (link) then
name = '[[' .. link .. '|' .. name .. ']]'; -- form a wikilink around the name
end
if is_set (mask) then -- mask this author
if tonumber(mask) then
name = string.rep ('—', mask) -- make a string that number length of mdashes
else
name = mask; -- mask is not a number so use the mask text
end
end
return name;
end
--[[--------------------------< C O R E >----------------------------------------------------------------------
Assembles the various parts provided by the template into a properly formatted bridging citation. Adds punctuation
and text; encloses the whole within a span with id and class attributes.
This creates a CITEREF anchor from |last1= through |last4= and |year=. It also creates a CITEREF link from |in1= through
|in4= and |year=. It is presumed that the dates of contributions are the same as the date of the enclosing work.
Even though not displayed, a year parameter is still required for the CITEREF anchor
]]
local function core( args )
local span_open_tag; -- holds CITEREF and css
local contributors = ''; -- chapter or contribution authors
local source = ''; -- editor/author date list that forms a CITEREF link to a full citation
local in_text = ' In ';
local result; -- the assemby of the above output
-- form the CITEREF anchor
if is_set (args.id) then
span_open_tag = '<span id="' .. args.id .. '" class="citation">'; -- for use when contributor name is same as source name
else
span_open_tag = '<span id="CITEREF' .. table.concat (args.citeref) .. (is_set (args['anchor-year']) and args['anchor-year'] or args.year) .. '" class="citation">';
end
--[[
form the contributors display list:
if |name-list-format=harv, display is similar to {{sfn}} and {{harv}}, 1 to 4 last names;
if |display-authors= is empty or omitted, display is similar to cs1|2: display all names in last, first order
if |display-authors=etal then displays all author names in last, first order and append et al.
if value assigned to |display-authors= is less than the number of author last names, displays the specified number of author names in last, first order followed by et al.
]]
if 'harv' ~= args.name_list_format then -- default cs1|2 style contributor list
local i = 1;
local count;
local etal = false; -- when |display-authors= is same as number of authors in contributor list
if is_set (args.display_authors) then
if 'etal' == args.display_authors:lower():gsub("[ '%.]", '') then -- the :gsub() portion makes 'etal' from a variety of 'et al.' spellings and stylings
count = #args.last; -- display all authors and ...
etal = true; -- ... append 'et al.'
else
count = tonumber (args.display_authors) or 0; -- 0 if can't be converted to a number
if 0 >= count then
args.err_msg = args.err_msg .. ' invalid ' .. code_open_tag .. '|display-authors=</code>'; -- if zero, then emit error message
end
end
if count > #args.last then
count = #args.last; -- when |display-authors= is more than the number of authors, use the number of authors
end
if count < #args.last then -- when |display-authors= is less than the number of authors
etal = true; -- append 'et al.'
end
else
count = #args.last; -- set count to display all of the authors
end
while i <= count do
if is_set (contributors) then
contributors = contributors .. '; ' .. make_name (args.last[i], args.first[i], args.link[i], args.mask[i]); -- the rest of the contributors
else
contributors = make_name (args.last[i], args.first[i], args.link[i], args.mask[i]); -- first contributor's name
end
i = i+1; -- bump the index
end
if true == etal then
contributors = contributors .. ' et al.'; -- append et al.
elseif 'yes' == args.last_author_amp then
contributors = contributors:gsub('; ([^;]+)$', ' & %1') -- replace last separator with ' & '
end
else -- do default harv- or sfn-style contributor display
if 4 <= #args.last then -- four or more contributors (first followed by et al.)
contributors = args.last[1] .. ' et al.';
elseif 3 == #args.last then -- three (display them all)
contributors = args.last[1] .. ', ' .. args.last[2] .. ' & ' .. args.last[3];
elseif 2 == #args.last then -- two (first & second)
contributors = args.last[1] .. ' & ' .. args.last[2];
elseif 1 == #args.last then -- just one (first)
contributors = args.last[1];
else
args.err_msg = args.err_msg .. ' no authors in contributor list.'; -- this code used to find holes in the list; no more
end
end
--form the source author-date list
if is_set (args.in4) and is_set (args.in3) and is_set (args.in2) and is_set (args.in1) then
source = args.in1 .. ' et al.';
elseif not is_set (args.in4) and is_set (args.in3) and is_set (args.in2) and is_set (args.in1) then
source = args.in1 .. ', ' .. args.in2 .. ' & ' .. args.in3;
elseif not is_set (args.in4) and not is_set (args.in3) and is_set (args.in2) and is_set (args.in1) then
source = args.in1 .. ' & ' .. args.in2;
elseif not is_set (args.in4) and not is_set (args.in3) and not is_set (args.in2) and is_set (args.in1) then
source = args.in1;
else
args.err_msg = args.err_msg .. ' author missing from source list.'
end
source = source .. ' ' .. args.open .. args.year .. args.close; -- add the year with or without brackets
--assemble CITEREF wikilink
source = "[[#CITEREF" .. mw.uri.anchorEncode(table.concat ({args.in1, args.in2, args.in3, args.in4, args.year})) .. "|" .. source .. "]]";
--combine contribution with url to make external link
if args.url ~= '' then
args.contribution = '[' .. args.url .. ' ' .. args.contribution .. ']'; -- format external link
if args['url-access'] then
if lock_icons[args['url-access']] then
args.contribution = table.concat ({ -- add access icon markup to this item
'<span class="', -- open the opening span tag; icon classes are defined in Module:Citation/CS1/styles.css
lock_icons[args['url-access']][1], -- add the appropriate lock icon class
'" title="', -- and the title attribute
lock_icons[args['url-access']][2], -- for an appropriate tool tip
'">', -- close the opening span tag
args.contribution,
'</span>', -- and close the span
});
end
end
end
if is_set (args['anchor-year']) then
contributors = contributors .. ' (' .. args['anchor-year'] .. ')' .. args.sepc;
elseif args.sepc ~= contributors:sub(-1) and args.sepc .. ']]' ~= contributors:sub(-3) then
contributors = contributors .. args.sepc; -- add separator if not same as last character in name list (|first=John S. or et al.)
end
-- pages and other insource location
if args.p ~= '' then
args.p = args.page_sep .. args.p;
elseif args.pp ~= '' then
args.p = args.pages_sep .. args.pp; -- args.p not set so use it to hold common insource location info
end
if args.loc ~= '' then
args.p = args.p .. ', ' .. args.loc; -- add arg.loc to args.p
end
--wrap error messages in span and add help link
if is_set (args.err_msg) then
args.err_msg = '<span style="font-size:100%" class="error"> harvc:' .. args.err_msg .. ' ([[Template:Harvc|help]])</span>';
end
if ',' == args.sepc then
in_text = in_text:lower(); -- CS2 style use lower case
end
-- and put it all together
result = span_open_tag .. contributors .. ' "' .. args.contribution .. '"' .. args.sepc .. in_text .. source .. args.p .. args.ps .. '</span>' .. args.err_msg;
return result;
end
--[[--------------------------< H A R V C >--------------------------------------------------------------------
Entry point from {{harvc}} template. Fetches parent frame parameters, does a bit of simple error checking
]]
local function harvc (frame)
local args = {
err_msg = '',
page_sep = ", p. ",
pages_sep = ", pp. ",
sepc = '.',
ps = '.',
open = '(', -- year brackets for source year
close = ')',
last = {},
first = {},
link = {},
mask = {},
citeref = {}
}
local pframe = frame:getParent();
args.contribution = pframe.args.c or -- chapter or contribution
pframe.args.chapter or
pframe.args.contribution or '';
args.id = pframe.args.id or '';
args.in1 = pframe.args['in'] or pframe.args.in1 or ''; -- source editor surnames; 'in' is a Lua reserved keyword
args.in2 = pframe.args.in2 or '';
args.in3 = pframe.args.in3 or '';
args.in4 = pframe.args.in4 or '';
args.display_authors = pframe.args['display-authors']; -- the number of contributor names to display; cs1|2 format includes first names
args.name_list_format = pframe.args['name-list-format']; -- when set to 'harv' display contributor list in sfn or harv style
args.last_author_amp = pframe.args['last-author-amp'] or -- yes only; |last-author-amp=no does not work (though it does in cs1|2)
pframe.args['lastauthoramp'] or '';
args.last_author_amp = args.last_author_amp:lower(); -- make it case agnostic
if is_set (pframe.args.last) or is_set (pframe.args.last1) or
is_set (pframe.args.author) or is_set (pframe.args.author1) then -- must have at least this to continue
args.last[1] = pframe.args.last or pframe.args.last1 or pframe.args.author or pframe.args.author1; -- get first contributor's last name
args.citeref[1] = args.last[1]; -- add it to the citeref
args.first[1] = pframe.args.first or pframe.args.first1; -- get first contributor's first name
args.link[1] = pframe.args['author-link'] or pframe.args['author-link1']; -- get first contributor's article link
args.mask[1] = pframe.args['author-mask'] or pframe.args['author-mask1']; -- get first contributor's article link
local i = 2; -- index for the rest of the names
while is_set (pframe.args['last'..i]) or is_set (pframe.args['author'..i]) do -- loop through pframe.args and get the rest of the names
args.last[i] = pframe.args['last'..i] or pframe.args['author'..i]; -- last names
args.first[i] = pframe.args['first'..i]; -- first names
args.link[i] = pframe.args['author-link'..i]; -- links
args.mask[i] = pframe.args['author-mask'..i]; -- masks
if 5 > i then
args.citeref[i] = args.last[i]; -- collect first four last names for CITEREF anchor
end
i = i + 1 -- bump the index
end
end
args.p = pframe.args.p or ''; -- source page number(s) or location
args.pp = pframe.args.pp or '';
args.loc = pframe.args.loc or '';
if 'cs2' == pframe.args.mode then
args.ps = ''; -- set postscript character to empty string, cs2 mode
args.sepc = ','; -- set seperator character to comma, cs2 mode
end
do -- to limit scope of local temp
local temp = pframe.args.ps or pframe.args.postscript;
if is_set (temp) then
if 'none' == temp:lower() then -- if |ps=none or |postscript=none then
args.ps = ''; -- no postscript
else
args.ps = temp; -- override default postscript
end
end
end -- end of scope limit
if 'yes' == pframe.args.nb then -- if no brackets around year in link to cs1|2 template
args.open = ''; -- unset these
args.close = '';
end
args.url = pframe.args.url or -- url for chapter or contribution
pframe.args['chapter-url'] or
pframe.args['contribution-url'] or '';
args['url-access'] = pframe.args['url-access'];
args.year = pframe.args.year or ''; -- required
args['anchor-year'] = pframe.args['anchor-year'] or '';
args.err_msg = args.err_msg .. check_years (args.year, args['anchor-year']);
if not is_set (args.contribution) then
args.err_msg = args.err_msg .. ' required contribution is missing.'; -- error message if source not provided
args.contribution = args.url; -- if set it will give us linkable text
end
if args.last[1] == args.in1 and
args.last[2] == args.in2 and
args.last[3] == args.in3 and
args.last[4] == args.in4 and
not is_set (args.id) then
args.err_msg = args.err_msg .. ' required ' .. code_open_tag .. '|id=</code> parameter missing.'; -- error message if contributor and source are the same
end
return table.concat ({core (args), frame:extensionTag ('templatestyles', '', {src='Module:Citation/CS1/styles.css'})});
-- return table.concat ({core (args), frame:extensionTag ('templatestyles', '', {src=styles})});
end
--[[--------------------------< E X P O R T E D F U N C T I O N S >------------------------------------------
]]
return {
harvc = harvc
};
10696qqkhfuv9spvw93xoscnvai4mgv
801887
801886
2019-10-11T11:49:11Z
en>Trappist the monk
0
support for YYYY–YY;
801887
Scribunto
text/plain
require('Module:No globals')
local code_open_tag = '<code style="color: inherit; background: inherit; border: inherit; padding: inherit;">';
local lock_icons = { --icon classes are defined in Module:Citation/CS1/styles.css
-- ['free'] = {'cs1-lock-free', 'Freely accessible'}, -- not supported for urls
['registration'] = {'cs1-lock-registration', 'Free registration required'},
['limited'] = {'cs1-lock-limited', 'Free access subject to limited trial, subscription normally required'},
['subscription'] = {'cs1-lock-subscription', 'Paid subscription required'},
}
--[[--------------------------< I S _ S E T >------------------------------------------------------------------
Whether variable is set or not. A varable is set when it is not nil and not empty.
]]
local function is_set( var )
return not (var == nil or var == '');
end
--[[--------------------------< C H E C K _ Y E A R S >--------------------------------------------------------
evaluates params to see if they are one of these forms with or without lowercase letter disambiguator (same as in
Module:Footnotes):
YYYY
n.d.
nd
c. YYYY
YYYY–YYYY (separator is endash)
YYYY–YY (separator is endash)
when anchor_year present, year portion must be same as year param and must have disambiguator
returns empty string when params have correct form; error message else
]]
local function check_years (year, anchor_year)
local y, ay;
if not is_set (year) then -- year is required so return error message when not set
return ' missing ' .. code_open_tag .. '|year=</code>.';
end
local patterns = { -- allowed year patterns from Module:Footnotes (captures added here)
'^(%d%d%d%d?)%l?$', -- YYY or YYYY
'^(n%.d%.)%l?$', -- n.d.
'^(nd)%l?$', -- nd
'^(c%. %d%d%d%d?)%l?$', -- c. YYY or c. YYYY
'^(%d%d%d%d–%d%d%d%d)%l?$', -- YYYY–YYYY
'^(%d%d%d%d–%d%d)%l?$' -- YYYY–YY
}
for _, pattern in ipairs (patterns) do -- spin through the patterns
y = year:match (pattern); -- y is the year portion
if y then
break; -- when y is set, we found a match so done
end
end
if not y then
return ' invalid ' .. code_open_tag .. '|year=</code>.'; -- y not set, so year is malformed
end
if is_set (anchor_year) then -- anchor_year is optional
for _, pattern in ipairs (patterns) do -- spin through the patterns
ay = anchor_year:match (pattern); -- ay is the year portion
if ay then
break; -- when ay is set, we found a match so done
end
end
if not ay then
return ' invalid ' .. code_open_tag .. '|anchor-year</code>.'; -- ay not set, so anchor_year is malformed
end
if not anchor_year:match ('%l$') then
return ' ' .. code_open_tag .. '|anchor-year=</code> missing dab.'; -- anchor_year must end with a disambiguator letter
end
if y ~= ay then
return ' ' .. code_open_tag .. '|year=</code> / ' .. code_open_tag .. '|anchor-year=</code> mismatch.'; -- 'year' portions of year and anchor_year must be the same
end
end
return ''; -- both years are good; empty string for concatenation
end
--[[--------------------------< M A K E _ N A M E >------------------------------------------------------------
Assembles last, first, link, or mask into a displayable contributor name.
]]
local function make_name (last, first, link, mask)
local name = last;
if is_set (first) then
name = name .. ', ' .. first; -- concatenate first onto last
end
if is_set (link) then
name = '[[' .. link .. '|' .. name .. ']]'; -- form a wikilink around the name
end
if is_set (mask) then -- mask this author
if tonumber(mask) then
name = string.rep ('—', mask) -- make a string that number length of mdashes
else
name = mask; -- mask is not a number so use the mask text
end
end
return name;
end
--[[--------------------------< C O R E >----------------------------------------------------------------------
Assembles the various parts provided by the template into a properly formatted bridging citation. Adds punctuation
and text; encloses the whole within a span with id and class attributes.
This creates a CITEREF anchor from |last1= through |last4= and |year=. It also creates a CITEREF link from |in1= through
|in4= and |year=. It is presumed that the dates of contributions are the same as the date of the enclosing work.
Even though not displayed, a year parameter is still required for the CITEREF anchor
]]
local function core( args )
local span_open_tag; -- holds CITEREF and css
local contributors = ''; -- chapter or contribution authors
local source = ''; -- editor/author date list that forms a CITEREF link to a full citation
local in_text = ' In ';
local result; -- the assemby of the above output
-- form the CITEREF anchor
if is_set (args.id) then
span_open_tag = '<span id="' .. args.id .. '" class="citation">'; -- for use when contributor name is same as source name
else
span_open_tag = '<span id="CITEREF' .. table.concat (args.citeref) .. (is_set (args['anchor-year']) and args['anchor-year'] or args.year) .. '" class="citation">';
end
--[[
form the contributors display list:
if |name-list-format=harv, display is similar to {{sfn}} and {{harv}}, 1 to 4 last names;
if |display-authors= is empty or omitted, display is similar to cs1|2: display all names in last, first order
if |display-authors=etal then displays all author names in last, first order and append et al.
if value assigned to |display-authors= is less than the number of author last names, displays the specified number of author names in last, first order followed by et al.
]]
if 'harv' ~= args.name_list_format then -- default cs1|2 style contributor list
local i = 1;
local count;
local etal = false; -- when |display-authors= is same as number of authors in contributor list
if is_set (args.display_authors) then
if 'etal' == args.display_authors:lower():gsub("[ '%.]", '') then -- the :gsub() portion makes 'etal' from a variety of 'et al.' spellings and stylings
count = #args.last; -- display all authors and ...
etal = true; -- ... append 'et al.'
else
count = tonumber (args.display_authors) or 0; -- 0 if can't be converted to a number
if 0 >= count then
args.err_msg = args.err_msg .. ' invalid ' .. code_open_tag .. '|display-authors=</code>'; -- if zero, then emit error message
end
end
if count > #args.last then
count = #args.last; -- when |display-authors= is more than the number of authors, use the number of authors
end
if count < #args.last then -- when |display-authors= is less than the number of authors
etal = true; -- append 'et al.'
end
else
count = #args.last; -- set count to display all of the authors
end
while i <= count do
if is_set (contributors) then
contributors = contributors .. '; ' .. make_name (args.last[i], args.first[i], args.link[i], args.mask[i]); -- the rest of the contributors
else
contributors = make_name (args.last[i], args.first[i], args.link[i], args.mask[i]); -- first contributor's name
end
i = i+1; -- bump the index
end
if true == etal then
contributors = contributors .. ' et al.'; -- append et al.
elseif 'yes' == args.last_author_amp then
contributors = contributors:gsub('; ([^;]+)$', ' & %1') -- replace last separator with ' & '
end
else -- do default harv- or sfn-style contributor display
if 4 <= #args.last then -- four or more contributors (first followed by et al.)
contributors = args.last[1] .. ' et al.';
elseif 3 == #args.last then -- three (display them all)
contributors = args.last[1] .. ', ' .. args.last[2] .. ' & ' .. args.last[3];
elseif 2 == #args.last then -- two (first & second)
contributors = args.last[1] .. ' & ' .. args.last[2];
elseif 1 == #args.last then -- just one (first)
contributors = args.last[1];
else
args.err_msg = args.err_msg .. ' no authors in contributor list.'; -- this code used to find holes in the list; no more
end
end
--form the source author-date list
if is_set (args.in4) and is_set (args.in3) and is_set (args.in2) and is_set (args.in1) then
source = args.in1 .. ' et al.';
elseif not is_set (args.in4) and is_set (args.in3) and is_set (args.in2) and is_set (args.in1) then
source = args.in1 .. ', ' .. args.in2 .. ' & ' .. args.in3;
elseif not is_set (args.in4) and not is_set (args.in3) and is_set (args.in2) and is_set (args.in1) then
source = args.in1 .. ' & ' .. args.in2;
elseif not is_set (args.in4) and not is_set (args.in3) and not is_set (args.in2) and is_set (args.in1) then
source = args.in1;
else
args.err_msg = args.err_msg .. ' author missing from source list.'
end
source = source .. ' ' .. args.open .. args.year .. args.close; -- add the year with or without brackets
--assemble CITEREF wikilink
source = "[[#CITEREF" .. mw.uri.anchorEncode(table.concat ({args.in1, args.in2, args.in3, args.in4, args.year})) .. "|" .. source .. "]]";
--combine contribution with url to make external link
if args.url ~= '' then
args.contribution = '[' .. args.url .. ' ' .. args.contribution .. ']'; -- format external link
if args['url-access'] then
if lock_icons[args['url-access']] then
args.contribution = table.concat ({ -- add access icon markup to this item
'<span class="', -- open the opening span tag; icon classes are defined in Module:Citation/CS1/styles.css
lock_icons[args['url-access']][1], -- add the appropriate lock icon class
'" title="', -- and the title attribute
lock_icons[args['url-access']][2], -- for an appropriate tool tip
'">', -- close the opening span tag
args.contribution,
'</span>', -- and close the span
});
end
end
end
if is_set (args['anchor-year']) then
contributors = contributors .. ' (' .. args['anchor-year'] .. ')' .. args.sepc;
elseif args.sepc ~= contributors:sub(-1) and args.sepc .. ']]' ~= contributors:sub(-3) then
contributors = contributors .. args.sepc; -- add separator if not same as last character in name list (|first=John S. or et al.)
end
-- pages and other insource location
if args.p ~= '' then
args.p = args.page_sep .. args.p;
elseif args.pp ~= '' then
args.p = args.pages_sep .. args.pp; -- args.p not set so use it to hold common insource location info
end
if args.loc ~= '' then
args.p = args.p .. ', ' .. args.loc; -- add arg.loc to args.p
end
--wrap error messages in span and add help link
if is_set (args.err_msg) then
args.err_msg = '<span style="font-size:100%" class="error"> harvc:' .. args.err_msg .. ' ([[Template:Harvc|help]])</span>';
end
if ',' == args.sepc then
in_text = in_text:lower(); -- CS2 style use lower case
end
-- and put it all together
result = span_open_tag .. contributors .. ' "' .. args.contribution .. '"' .. args.sepc .. in_text .. source .. args.p .. args.ps .. '</span>' .. args.err_msg;
return result;
end
--[[--------------------------< H A R V C >--------------------------------------------------------------------
Entry point from {{harvc}} template. Fetches parent frame parameters, does a bit of simple error checking
]]
local function harvc (frame)
local args = {
err_msg = '',
page_sep = ", p. ",
pages_sep = ", pp. ",
sepc = '.',
ps = '.',
open = '(', -- year brackets for source year
close = ')',
last = {},
first = {},
link = {},
mask = {},
citeref = {}
}
local pframe = frame:getParent();
args.contribution = pframe.args.c or -- chapter or contribution
pframe.args.chapter or
pframe.args.contribution or '';
args.id = pframe.args.id or '';
args.in1 = pframe.args['in'] or pframe.args.in1 or ''; -- source editor surnames; 'in' is a Lua reserved keyword
args.in2 = pframe.args.in2 or '';
args.in3 = pframe.args.in3 or '';
args.in4 = pframe.args.in4 or '';
args.display_authors = pframe.args['display-authors']; -- the number of contributor names to display; cs1|2 format includes first names
args.name_list_format = pframe.args['name-list-format']; -- when set to 'harv' display contributor list in sfn or harv style
args.last_author_amp = pframe.args['last-author-amp'] or -- yes only; |last-author-amp=no does not work (though it does in cs1|2)
pframe.args['lastauthoramp'] or '';
args.last_author_amp = args.last_author_amp:lower(); -- make it case agnostic
if is_set (pframe.args.last) or is_set (pframe.args.last1) or
is_set (pframe.args.author) or is_set (pframe.args.author1) then -- must have at least this to continue
args.last[1] = pframe.args.last or pframe.args.last1 or pframe.args.author or pframe.args.author1; -- get first contributor's last name
args.citeref[1] = args.last[1]; -- add it to the citeref
args.first[1] = pframe.args.first or pframe.args.first1; -- get first contributor's first name
args.link[1] = pframe.args['author-link'] or pframe.args['author-link1']; -- get first contributor's article link
args.mask[1] = pframe.args['author-mask'] or pframe.args['author-mask1']; -- get first contributor's article link
local i = 2; -- index for the rest of the names
while is_set (pframe.args['last'..i]) or is_set (pframe.args['author'..i]) do -- loop through pframe.args and get the rest of the names
args.last[i] = pframe.args['last'..i] or pframe.args['author'..i]; -- last names
args.first[i] = pframe.args['first'..i]; -- first names
args.link[i] = pframe.args['author-link'..i]; -- links
args.mask[i] = pframe.args['author-mask'..i]; -- masks
if 5 > i then
args.citeref[i] = args.last[i]; -- collect first four last names for CITEREF anchor
end
i = i + 1 -- bump the index
end
end
args.p = pframe.args.p or ''; -- source page number(s) or location
args.pp = pframe.args.pp or '';
args.loc = pframe.args.loc or '';
if 'cs2' == pframe.args.mode then
args.ps = ''; -- set postscript character to empty string, cs2 mode
args.sepc = ','; -- set seperator character to comma, cs2 mode
end
do -- to limit scope of local temp
local temp = pframe.args.ps or pframe.args.postscript;
if is_set (temp) then
if 'none' == temp:lower() then -- if |ps=none or |postscript=none then
args.ps = ''; -- no postscript
else
args.ps = temp; -- override default postscript
end
end
end -- end of scope limit
if 'yes' == pframe.args.nb then -- if no brackets around year in link to cs1|2 template
args.open = ''; -- unset these
args.close = '';
end
args.url = pframe.args.url or -- url for chapter or contribution
pframe.args['chapter-url'] or
pframe.args['contribution-url'] or '';
args['url-access'] = pframe.args['url-access'];
args.year = pframe.args.year or ''; -- required
args['anchor-year'] = pframe.args['anchor-year'] or '';
args.err_msg = args.err_msg .. check_years (args.year, args['anchor-year']);
if not is_set (args.contribution) then
args.err_msg = args.err_msg .. ' required contribution is missing.'; -- error message if source not provided
args.contribution = args.url; -- if set it will give us linkable text
end
if args.last[1] == args.in1 and
args.last[2] == args.in2 and
args.last[3] == args.in3 and
args.last[4] == args.in4 and
not is_set (args.id) then
args.err_msg = args.err_msg .. ' required ' .. code_open_tag .. '|id=</code> parameter missing.'; -- error message if contributor and source are the same
end
return table.concat ({core (args), frame:extensionTag ('templatestyles', '', {src='Module:Citation/CS1/styles.css'})});
-- return table.concat ({core (args), frame:extensionTag ('templatestyles', '', {src=styles})});
end
--[[--------------------------< E X P O R T E D F U N C T I O N S >------------------------------------------
]]
return {
harvc = harvc
};
f018a68r9mx6vr95j28y55m8sa6oduz
801888
801887
2020-03-23T13:20:54Z
en>Trappist the monk
0
sync from sandbox; harv link error checking;
801888
Scribunto
text/plain
require('Module:No globals')
local citerefs = mw.loadData ('Module:Sandbox/trappist_the_monk/harv_link_test').citerefs;
local code_open_tag = '<code class="cs1-code">'; -- cs1-code class defined in Module:Citation/CS1/styles.css
local lock_icons = { --icon classes are defined in Module:Citation/CS1/styles.css
['registration'] = {'cs1-lock-registration', 'Free registration required'},
['limited'] = {'cs1-lock-limited', 'Free access subject to limited trial, subscription normally required'},
['subscription'] = {'cs1-lock-subscription', 'Paid subscription required'},
}
--[[--------------------------< T A R G E T _ C H E C K >------------------------------------------------------
look for citeref (name-list and year) in citerefs
the 'no target' error may be suppressed with |ignore-err=yes when target cannot be found because target is inside a template that wraps
a citation template; 'multiple targets' error may not be suppressed
]]
local function target_check (citeref, ignore)
local number = citerefs[citeref]; -- nil when citeref not in list; else a number
local msg;
local category;
if not number then
if ignore then
return ''; -- if ignore is true then no message, no category
end
msg = 'no target: ' .. citeref; -- target not found in this article
elseif 1 < number then
msg = 'multiple targets: ' .. citeref; -- more than one target in this article
end
category = 0 == mw.title.getCurrentTitle().namespace and '[[Category:Harv and Sfn template errors]]' or ''; -- only categorize in article space
--TODO: use this version until initial testing begins with the live module
-- return msg and ' <span class="error harv-error" style="display: inline; font-size:100%">Harv error: ' .. msg .. ' ([[:Category:Harv and Sfn template errors|help]])</span>' .. category or '';
--TODO: use this version when initial testing begins with the live module
return msg and ' <span class="error harv-error" style="display: none; font-size:100%">Harv error: ' .. msg .. ' ([[:Category:Harv and Sfn template errors|help]])</span>' .. category or '';
end
--[[--------------------------< I S _ S E T >------------------------------------------------------------------
Whether variable is set or not. A varable is set when it is not nil and not empty.
]]
local function is_set( var )
return not (var == nil or var == '');
end
--[[--------------------------< C H E C K _ Y E A R S >--------------------------------------------------------
evaluates params to see if they are one of these forms with or without lowercase letter disambiguator (same as in
Module:Footnotes):
YYYY
n.d.
nd
c. YYYY
YYYY–YYYY (separator is endash)
YYYY–YY (separator is endash)
when anchor_year present, year portion must be same as year param and must have disambiguator
returns empty string when params have correct form; error message else
]]
local function check_years (year, anchor_year)
local y, ay;
if not is_set (year) then -- year is required so return error message when not set
return ' missing ' .. code_open_tag .. '|year=</code>.';
end
local patterns = { -- allowed year patterns from Module:Footnotes (captures added here)
'^(%d%d%d%d?)%l?$', -- YYY or YYYY
'^(n%.d%.)%l?$', -- n.d.
'^(nd)%l?$', -- nd
'^(c%. %d%d%d%d?)%l?$', -- c. YYY or c. YYYY
'^(%d%d%d%d–%d%d%d%d)%l?$', -- YYYY–YYYY
'^(%d%d%d%d–%d%d)%l?$' -- YYYY–YY
}
for _, pattern in ipairs (patterns) do -- spin through the patterns
y = year:match (pattern); -- y is the year portion
if y then
break; -- when y is set, we found a match so done
end
end
if not y then
return ' invalid ' .. code_open_tag .. '|year=</code>.'; -- y not set, so year is malformed
end
if is_set (anchor_year) then -- anchor_year is optional
for _, pattern in ipairs (patterns) do -- spin through the patterns
ay = anchor_year:match (pattern); -- ay is the year portion
if ay then
break; -- when ay is set, we found a match so done
end
end
if not ay then
return ' invalid ' .. code_open_tag .. '|anchor-year</code>.'; -- ay not set, so anchor_year is malformed
end
if not anchor_year:match ('%l$') then
return ' ' .. code_open_tag .. '|anchor-year=</code> missing dab.'; -- anchor_year must end with a disambiguator letter
end
if y ~= ay then
return ' ' .. code_open_tag .. '|year=</code> / ' .. code_open_tag .. '|anchor-year=</code> mismatch.'; -- 'year' portions of year and anchor_year must be the same
end
end
return ''; -- both years are good; empty string for concatenation
end
--[[--------------------------< M A K E _ N A M E >------------------------------------------------------------
Assembles last, first, link, or mask into a displayable contributor name.
]]
local function make_name (last, first, link, mask)
local name = last;
if is_set (first) then
name = name .. ', ' .. first; -- concatenate first onto last
end
if is_set (link) then
name = '[[' .. link .. '|' .. name .. ']]'; -- form a wikilink around the name
end
if is_set (mask) then -- mask this author
if tonumber(mask) then
name = string.rep ('—', mask) -- make a string that number length of mdashes
else
name = mask; -- mask is not a number so use the mask text
end
end
return name;
end
--[[--------------------------< C O R E >----------------------------------------------------------------------
Assembles the various parts provided by the template into a properly formatted bridging citation. Adds punctuation
and text; encloses the whole within a span with id and class attributes.
This creates a CITEREF anchor from |last1= through |last4= and |year=. It also creates a CITEREF link from |in1= through
|in4= and |year=. It is presumed that the dates of contributions are the same as the date of the enclosing work.
Even though not displayed, a year parameter is still required for the CITEREF anchor
]]
local function core( args )
local span_open_tag; -- holds CITEREF and css
local contributors = ''; -- chapter or contribution authors
local source = ''; -- editor/author date list that forms a CITEREF link to a full citation
local in_text = ' In ';
local result; -- the assemby of the above output
-- form the CITEREF anchor
if is_set (args.id) then
args.id = mw.uri.anchorEncode (args.id)
span_open_tag = '<span id="' .. args.id .. '" class="citation">'; -- for use when contributor name is same as source name
else
local citeref = 'CITEREF' .. table.concat (args.citeref) .. (is_set (args['anchor-year']) and args['anchor-year'] or args.year);
citeref = mw.uri.anchorEncode (citeref);
span_open_tag = '<span id="' .. citeref .. '" class="citation">';
end
--[[
form the contributors display list:
if |name-list-format=harv, display is similar to {{sfn}} and {{harv}}, 1 to 4 last names;
if |display-authors= is empty or omitted, display is similar to cs1|2: display all names in last, first order
if |display-authors=etal then displays all author names in last, first order and append et al.
if value assigned to |display-authors= is less than the number of author last names, displays the specified number of author names in last, first order followed by et al.
]]
if 'harv' ~= args.name_list_format then -- default cs1|2 style contributor list
local i = 1;
local count;
local etal = false; -- when |display-authors= is same as number of authors in contributor list
if is_set (args.display_authors) then
if 'etal' == args.display_authors:lower():gsub("[ '%.]", '') then -- the :gsub() portion makes 'etal' from a variety of 'et al.' spellings and stylings
count = #args.last; -- display all authors and ...
etal = true; -- ... append 'et al.'
else
count = tonumber (args.display_authors) or 0; -- 0 if can't be converted to a number
if 0 >= count then
args.err_msg = args.err_msg .. ' invalid ' .. code_open_tag .. '|display-authors=</code>'; -- if zero, then emit error message
end
end
if count > #args.last then
count = #args.last; -- when |display-authors= is more than the number of authors, use the number of authors
end
if count < #args.last then -- when |display-authors= is less than the number of authors
etal = true; -- append 'et al.'
end
else
count = #args.last; -- set count to display all of the authors
end
while i <= count do
if is_set (contributors) then
contributors = contributors .. '; ' .. make_name (args.last[i], args.first[i], args.link[i], args.mask[i]); -- the rest of the contributors
else
contributors = make_name (args.last[i], args.first[i], args.link[i], args.mask[i]); -- first contributor's name
end
i = i+1; -- bump the index
end
if true == etal then
contributors = contributors .. ' et al.'; -- append et al.
elseif 'yes' == args.last_author_amp then
contributors = contributors:gsub('; ([^;]+)$', ' & %1') -- replace last separator with ' & '
end
else -- do default harv- or sfn-style contributor display
if 4 <= #args.last then -- four or more contributors (first followed by et al.)
contributors = args.last[1] .. ' et al.';
elseif 3 == #args.last then -- three (display them all)
contributors = args.last[1] .. ', ' .. args.last[2] .. ' & ' .. args.last[3];
elseif 2 == #args.last then -- two (first & second)
contributors = args.last[1] .. ' & ' .. args.last[2];
elseif 1 == #args.last then -- just one (first)
contributors = args.last[1];
else
args.err_msg = args.err_msg .. ' no authors in contributor list.'; -- this code used to find holes in the list; no more
end
end
--form the source author-date list
if is_set (args.in4) and is_set (args.in3) and is_set (args.in2) and is_set (args.in1) then
source = args.in1 .. ' et al.';
elseif not is_set (args.in4) and is_set (args.in3) and is_set (args.in2) and is_set (args.in1) then
source = args.in1 .. ', ' .. args.in2 .. ' & ' .. args.in3;
elseif not is_set (args.in4) and not is_set (args.in3) and is_set (args.in2) and is_set (args.in1) then
source = args.in1 .. ' & ' .. args.in2;
elseif not is_set (args.in4) and not is_set (args.in3) and not is_set (args.in2) and is_set (args.in1) then
source = args.in1;
else
args.err_msg = args.err_msg .. ' author missing from source list.'
end
source = source .. ' ' .. args.open .. args.year .. args.close; -- add the year with or without brackets
--assemble CITEREF wikilink
local name_date;
local target_err_msg;
if '' ~= args.ref then
name_date = mw.uri.anchorEncode (args.ref)
else
name_date = mw.uri.anchorEncode(table.concat ({'CITEREF', args.in1, args.in2, args.in3, args.in4, args.year}));
end
target_err_msg = target_check (name_date, args.ignore); -- see if there is a target for this name_date
source = '[[#' .. name_date .. "|" .. source .. "]]";
--combine contribution with url to make external link
if args.url ~= '' then
args.contribution = '[' .. args.url .. ' ' .. args.contribution .. ']'; -- format external link
if args['url-access'] then
if lock_icons[args['url-access']] then
args.contribution = table.concat ({ -- add access icon markup to this item
'<span class="', -- open the opening span tag; icon classes are defined in Module:Citation/CS1/styles.css
lock_icons[args['url-access']][1], -- add the appropriate lock icon class
'" title="', -- and the title attribute
lock_icons[args['url-access']][2], -- for an appropriate tool tip
'">', -- close the opening span tag
args.contribution,
'</span>', -- and close the span
});
end
end
end
if is_set (args['anchor-year']) then
contributors = contributors .. ' (' .. args['anchor-year'] .. ')' .. args.sepc;
elseif args.sepc ~= contributors:sub(-1) and args.sepc .. ']]' ~= contributors:sub(-3) then
contributors = contributors .. args.sepc; -- add separator if not same as last character in name list (|first=John S. or et al.)
end
-- pages and other insource location
if args.p ~= '' then
args.p = args.page_sep .. args.p;
elseif args.pp ~= '' then
args.p = args.pages_sep .. args.pp; -- args.p not set so use it to hold common insource location info
end
if args.loc ~= '' then
args.p = args.p .. ', ' .. args.loc; -- add arg.loc to args.p
end
--wrap error messages in span and add help link
if is_set (args.err_msg) then
args.err_msg = '<span style="font-size:100%" class="error"> harvc:' .. args.err_msg .. ' ([[Template:Harvc|help]])</span>';
end
if ',' == args.sepc then
in_text = in_text:lower(); -- CS2 style use lower case
end
-- and put it all together
result = span_open_tag .. contributors .. ' "' .. args.contribution .. '"' .. args.sepc .. in_text .. source .. args.p .. args.ps .. args.err_msg .. target_err_msg .. '</span>';
return result;
end
--[[--------------------------< H A R V C >--------------------------------------------------------------------
Entry point from {{harvc}} template. Fetches parent frame parameters, does a bit of simple error checking
]]
local function harvc (frame)
local args = {
err_msg = '',
page_sep = ", p. ",
pages_sep = ", pp. ",
sepc = '.',
ps = '.',
open = '(', -- year brackets for source year
close = ')',
last = {},
first = {},
link = {},
mask = {},
citeref = {}
}
local pframe = frame:getParent();
args.contribution = pframe.args.c or -- chapter or contribution
pframe.args.chapter or
pframe.args.contribution or '';
args.id = pframe.args.id or '';
args.in1 = pframe.args['in'] or pframe.args.in1 or ''; -- source editor surnames; 'in' is a Lua reserved keyword
args.in2 = pframe.args.in2 or '';
args.in3 = pframe.args.in3 or '';
args.in4 = pframe.args.in4 or '';
args.display_authors = pframe.args['display-authors']; -- the number of contributor names to display; cs1|2 format includes first names
args.name_list_format = pframe.args['name-list-format']; -- when set to 'harv' display contributor list in sfn or harv style
args.last_author_amp = pframe.args['last-author-amp'] or -- yes only; |last-author-amp=no does not work (though it does in cs1|2)
pframe.args['lastauthoramp'] or '';
args.last_author_amp = args.last_author_amp:lower(); -- make it case agnostic
if is_set (pframe.args.last) or is_set (pframe.args.last1) or
is_set (pframe.args.author) or is_set (pframe.args.author1) then -- must have at least this to continue
args.last[1] = pframe.args.last or pframe.args.last1 or pframe.args.author or pframe.args.author1; -- get first contributor's last name
args.citeref[1] = args.last[1]; -- add it to the citeref
args.first[1] = pframe.args.first or pframe.args.first1; -- get first contributor's first name
args.link[1] = pframe.args['author-link'] or pframe.args['author-link1']; -- get first contributor's article link
args.mask[1] = pframe.args['author-mask'] or pframe.args['author-mask1']; -- get first contributor's article link
local i = 2; -- index for the rest of the names
while is_set (pframe.args['last'..i]) or is_set (pframe.args['author'..i]) do -- loop through pframe.args and get the rest of the names
args.last[i] = pframe.args['last'..i] or pframe.args['author'..i]; -- last names
args.first[i] = pframe.args['first'..i]; -- first names
args.link[i] = pframe.args['author-link'..i]; -- links
args.mask[i] = pframe.args['author-mask'..i]; -- masks
if 5 > i then
args.citeref[i] = args.last[i]; -- collect first four last names for CITEREF anchor
end
i = i + 1 -- bump the index
end
end
args.p = pframe.args.p or ''; -- source page number(s) or location
args.pp = pframe.args.pp or '';
args.loc = pframe.args.loc or '';
args.ref = pframe.args.ref or pframe.args.Ref or ''; -- used to match |ref=<text> in cs1|2 source template
args.ignore = 'yes' == pframe.args['ignore-err']; -- suppress false-positive 'no target' errors
if 'cs2' == pframe.args.mode then
args.ps = ''; -- set postscript character to empty string, cs2 mode
args.sepc = ','; -- set seperator character to comma, cs2 mode
end
do -- to limit scope of local temp
local temp = pframe.args.ps or pframe.args.postscript;
if is_set (temp) then
if 'none' == temp:lower() then -- if |ps=none or |postscript=none then
args.ps = ''; -- no postscript
else
args.ps = temp; -- override default postscript
end
end
end -- end of scope limit
if 'yes' == pframe.args.nb then -- if no brackets around year in link to cs1|2 template
args.open = ''; -- unset these
args.close = '';
end
args.url = pframe.args.url or -- url for chapter or contribution
pframe.args['chapter-url'] or
pframe.args['contribution-url'] or '';
args['url-access'] = pframe.args['url-access'];
args.year = pframe.args.year or ''; -- required
args['anchor-year'] = pframe.args['anchor-year'] or '';
args.err_msg = args.err_msg .. check_years (args.year, args['anchor-year']);
if not is_set (args.contribution) then
args.err_msg = args.err_msg .. ' required contribution is missing.'; -- error message if source not provided
args.contribution = args.url; -- if set it will give us linkable text
end
if args.last[1] == args.in1 and
args.last[2] == args.in2 and
args.last[3] == args.in3 and
args.last[4] == args.in4 and
not is_set (args.id) then
args.err_msg = args.err_msg .. ' required ' .. code_open_tag .. '|id=</code> parameter missing.'; -- error message if contributor and source are the same
end
return table.concat ({core (args), frame:extensionTag ('templatestyles', '', {src='Module:Citation/CS1/styles.css'})});
end
--[[--------------------------< E X P O R T E D F U N C T I O N S >------------------------------------------
]]
return {
harvc = harvc
};
e7qm62uag8xvm9sz6f6ya8v0i90fq9m
801889
801888
2020-03-26T14:37:54Z
en>Trappist the monk
0
801889
Scribunto
text/plain
require('Module:No globals')
local citerefs = mw.loadData ('Module:Sandbox/trappist_the_monk/harv_link_test').citerefs;
local code_open_tag = '<code class="cs1-code">'; -- cs1-code class defined in Module:Citation/CS1/styles.css
local lock_icons = { --icon classes are defined in Module:Citation/CS1/styles.css
['registration'] = {'cs1-lock-registration', 'Free registration required'},
['limited'] = {'cs1-lock-limited', 'Free access subject to limited trial, subscription normally required'},
['subscription'] = {'cs1-lock-subscription', 'Paid subscription required'},
}
--[[--------------------------< T A R G E T _ C H E C K >------------------------------------------------------
look for citeref (name-list and year) in citerefs
the 'no target' error may be suppressed with |ignore-err=yes when target cannot be found because target is inside a template that wraps
a citation template; 'multiple targets' error may not be suppressed
]]
local function target_check (citeref, ignore)
local number = citerefs[citeref]; -- nil when citeref not in list; else a number
local msg;
local category;
if not number then
if ignore then
return ''; -- if ignore is true then no message, no category
end
msg = 'no target: ' .. citeref; -- target not found in this article
elseif 1 < number then
msg = 'multiple targets (' .. number .. '×): ' .. citeref; -- more than one target in this article
end
category = 0 == mw.title.getCurrentTitle().namespace and '[[Category:Harv and Sfn template errors]]' or ''; -- only categorize in article space
--TODO: use this version until initial testing begins with the live module
-- return msg and ' <span class="error harv-error" style="display: inline; font-size:100%">Harv error: ' .. msg .. ' ([[:Category:Harv and Sfn template errors|help]])</span>' .. category or '';
--TODO: use this version when initial testing begins with the live module
return msg and ' <span class="error harv-error" style="display: none; font-size:100%">Harv error: ' .. msg .. ' ([[:Category:Harv and Sfn template errors|help]])</span>' .. category or '';
end
--[[--------------------------< I S _ S E T >------------------------------------------------------------------
Whether variable is set or not. A varable is set when it is not nil and not empty.
]]
local function is_set( var )
return not (var == nil or var == '');
end
--[[--------------------------< C H E C K _ Y E A R S >--------------------------------------------------------
evaluates params to see if they are one of these forms with or without lowercase letter disambiguator (same as in
Module:Footnotes):
YYYY
n.d.
nd
c. YYYY
YYYY–YYYY (separator is endash)
YYYY–YY (separator is endash)
when anchor_year present, year portion must be same as year param and must have disambiguator
returns empty string when params have correct form; error message else
]]
local function check_years (year, anchor_year)
local y, ay;
if not is_set (year) then -- year is required so return error message when not set
return ' missing ' .. code_open_tag .. '|year=</code>.';
end
local patterns = { -- allowed year patterns from Module:Footnotes (captures added here)
'^(%d%d%d%d?)%l?$', -- YYY or YYYY
'^(n%.d%.)%l?$', -- n.d.
'^(nd)%l?$', -- nd
'^(c%. %d%d%d%d?)%l?$', -- c. YYY or c. YYYY
'^(%d%d%d%d–%d%d%d%d)%l?$', -- YYYY–YYYY
'^(%d%d%d%d–%d%d)%l?$' -- YYYY–YY
}
for _, pattern in ipairs (patterns) do -- spin through the patterns
y = year:match (pattern); -- y is the year portion
if y then
break; -- when y is set, we found a match so done
end
end
if not y then
return ' invalid ' .. code_open_tag .. '|year=</code>.'; -- y not set, so year is malformed
end
if is_set (anchor_year) then -- anchor_year is optional
for _, pattern in ipairs (patterns) do -- spin through the patterns
ay = anchor_year:match (pattern); -- ay is the year portion
if ay then
break; -- when ay is set, we found a match so done
end
end
if not ay then
return ' invalid ' .. code_open_tag .. '|anchor-year</code>.'; -- ay not set, so anchor_year is malformed
end
if not anchor_year:match ('%l$') then
return ' ' .. code_open_tag .. '|anchor-year=</code> missing dab.'; -- anchor_year must end with a disambiguator letter
end
if y ~= ay then
return ' ' .. code_open_tag .. '|year=</code> / ' .. code_open_tag .. '|anchor-year=</code> mismatch.'; -- 'year' portions of year and anchor_year must be the same
end
end
return ''; -- both years are good; empty string for concatenation
end
--[[--------------------------< M A K E _ N A M E >------------------------------------------------------------
Assembles last, first, link, or mask into a displayable contributor name.
]]
local function make_name (last, first, link, mask)
local name = last;
if is_set (first) then
name = name .. ', ' .. first; -- concatenate first onto last
end
if is_set (link) then
name = '[[' .. link .. '|' .. name .. ']]'; -- form a wikilink around the name
end
if is_set (mask) then -- mask this author
if tonumber(mask) then
name = string.rep ('—', mask) -- make a string that number length of mdashes
else
name = mask; -- mask is not a number so use the mask text
end
end
return name;
end
--[[--------------------------< C O R E >----------------------------------------------------------------------
Assembles the various parts provided by the template into a properly formatted bridging citation. Adds punctuation
and text; encloses the whole within a span with id and class attributes.
This creates a CITEREF anchor from |last1= through |last4= and |year=. It also creates a CITEREF link from |in1= through
|in4= and |year=. It is presumed that the dates of contributions are the same as the date of the enclosing work.
Even though not displayed, a year parameter is still required for the CITEREF anchor
]]
local function core( args )
local span_open_tag; -- holds CITEREF and css
local contributors = ''; -- chapter or contribution authors
local source = ''; -- editor/author date list that forms a CITEREF link to a full citation
local in_text = ' In ';
local result; -- the assemby of the above output
-- form the CITEREF anchor
if is_set (args.id) then
args.id = mw.uri.anchorEncode (args.id)
span_open_tag = '<span id="' .. args.id .. '" class="citation">'; -- for use when contributor name is same as source name
else
local citeref = 'CITEREF' .. table.concat (args.citeref) .. (is_set (args['anchor-year']) and args['anchor-year'] or args.year);
citeref = mw.uri.anchorEncode (citeref);
span_open_tag = '<span id="' .. citeref .. '" class="citation">';
end
--[[
form the contributors display list:
if |name-list-format=harv, display is similar to {{sfn}} and {{harv}}, 1 to 4 last names;
if |display-authors= is empty or omitted, display is similar to cs1|2: display all names in last, first order
if |display-authors=etal then displays all author names in last, first order and append et al.
if value assigned to |display-authors= is less than the number of author last names, displays the specified number of author names in last, first order followed by et al.
]]
if 'harv' ~= args.name_list_format then -- default cs1|2 style contributor list
local i = 1;
local count;
local etal = false; -- when |display-authors= is same as number of authors in contributor list
if is_set (args.display_authors) then
if 'etal' == args.display_authors:lower():gsub("[ '%.]", '') then -- the :gsub() portion makes 'etal' from a variety of 'et al.' spellings and stylings
count = #args.last; -- display all authors and ...
etal = true; -- ... append 'et al.'
else
count = tonumber (args.display_authors) or 0; -- 0 if can't be converted to a number
if 0 >= count then
args.err_msg = args.err_msg .. ' invalid ' .. code_open_tag .. '|display-authors=</code>'; -- if zero, then emit error message
end
end
if count > #args.last then
count = #args.last; -- when |display-authors= is more than the number of authors, use the number of authors
end
if count < #args.last then -- when |display-authors= is less than the number of authors
etal = true; -- append 'et al.'
end
else
count = #args.last; -- set count to display all of the authors
end
while i <= count do
if is_set (contributors) then
contributors = contributors .. '; ' .. make_name (args.last[i], args.first[i], args.link[i], args.mask[i]); -- the rest of the contributors
else
contributors = make_name (args.last[i], args.first[i], args.link[i], args.mask[i]); -- first contributor's name
end
i = i+1; -- bump the index
end
if true == etal then
contributors = contributors .. ' et al.'; -- append et al.
elseif 'yes' == args.last_author_amp then
contributors = contributors:gsub('; ([^;]+)$', ' & %1') -- replace last separator with ' & '
end
else -- do default harv- or sfn-style contributor display
if 4 <= #args.last then -- four or more contributors (first followed by et al.)
contributors = args.last[1] .. ' et al.';
elseif 3 == #args.last then -- three (display them all)
contributors = args.last[1] .. ', ' .. args.last[2] .. ' & ' .. args.last[3];
elseif 2 == #args.last then -- two (first & second)
contributors = args.last[1] .. ' & ' .. args.last[2];
elseif 1 == #args.last then -- just one (first)
contributors = args.last[1];
else
args.err_msg = args.err_msg .. ' no authors in contributor list.'; -- this code used to find holes in the list; no more
end
end
--form the source author-date list
if is_set (args.in4) and is_set (args.in3) and is_set (args.in2) and is_set (args.in1) then
source = args.in1 .. ' et al.';
elseif not is_set (args.in4) and is_set (args.in3) and is_set (args.in2) and is_set (args.in1) then
source = args.in1 .. ', ' .. args.in2 .. ' & ' .. args.in3;
elseif not is_set (args.in4) and not is_set (args.in3) and is_set (args.in2) and is_set (args.in1) then
source = args.in1 .. ' & ' .. args.in2;
elseif not is_set (args.in4) and not is_set (args.in3) and not is_set (args.in2) and is_set (args.in1) then
source = args.in1;
else
args.err_msg = args.err_msg .. ' author missing from source list.'
end
source = source .. ' ' .. args.open .. args.year .. args.close; -- add the year with or without brackets
--assemble CITEREF wikilink
local name_date;
local target_err_msg;
if '' ~= args.ref then
name_date = mw.uri.anchorEncode (args.ref)
else
name_date = mw.uri.anchorEncode(table.concat ({'CITEREF', args.in1, args.in2, args.in3, args.in4, args.year}));
end
target_err_msg = target_check (name_date, args.ignore); -- see if there is a target for this name_date
source = '[[#' .. name_date .. "|" .. source .. "]]";
--combine contribution with url to make external link
if args.url ~= '' then
args.contribution = '[' .. args.url .. ' ' .. args.contribution .. ']'; -- format external link
if args['url-access'] then
if lock_icons[args['url-access']] then
args.contribution = table.concat ({ -- add access icon markup to this item
'<span class="', -- open the opening span tag; icon classes are defined in Module:Citation/CS1/styles.css
lock_icons[args['url-access']][1], -- add the appropriate lock icon class
'" title="', -- and the title attribute
lock_icons[args['url-access']][2], -- for an appropriate tool tip
'">', -- close the opening span tag
args.contribution,
'</span>', -- and close the span
});
end
end
end
if is_set (args['anchor-year']) then
contributors = contributors .. ' (' .. args['anchor-year'] .. ')' .. args.sepc;
elseif args.sepc ~= contributors:sub(-1) and args.sepc .. ']]' ~= contributors:sub(-3) then
contributors = contributors .. args.sepc; -- add separator if not same as last character in name list (|first=John S. or et al.)
end
-- pages and other insource location
if args.p ~= '' then
args.p = args.page_sep .. args.p;
elseif args.pp ~= '' then
args.p = args.pages_sep .. args.pp; -- args.p not set so use it to hold common insource location info
end
if args.loc ~= '' then
args.p = args.p .. ', ' .. args.loc; -- add arg.loc to args.p
end
--wrap error messages in span and add help link
if is_set (args.err_msg) then
args.err_msg = '<span style="font-size:100%" class="error"> harvc:' .. args.err_msg .. ' ([[Template:Harvc|help]])</span>';
end
if ',' == args.sepc then
in_text = in_text:lower(); -- CS2 style use lower case
end
-- and put it all together
result = span_open_tag .. contributors .. ' "' .. args.contribution .. '"' .. args.sepc .. in_text .. source .. args.p .. args.ps .. args.err_msg .. target_err_msg .. '</span>';
return result;
end
--[[--------------------------< H A R V C >--------------------------------------------------------------------
Entry point from {{harvc}} template. Fetches parent frame parameters, does a bit of simple error checking
]]
local function harvc (frame)
local args = {
err_msg = '',
page_sep = ", p. ",
pages_sep = ", pp. ",
sepc = '.',
ps = '.',
open = '(', -- year brackets for source year
close = ')',
last = {},
first = {},
link = {},
mask = {},
citeref = {}
}
local pframe = frame:getParent();
args.contribution = pframe.args.c or -- chapter or contribution
pframe.args.chapter or
pframe.args.contribution or '';
args.id = pframe.args.id or '';
args.in1 = pframe.args['in'] or pframe.args.in1 or ''; -- source editor surnames; 'in' is a Lua reserved keyword
args.in2 = pframe.args.in2 or '';
args.in3 = pframe.args.in3 or '';
args.in4 = pframe.args.in4 or '';
args.display_authors = pframe.args['display-authors']; -- the number of contributor names to display; cs1|2 format includes first names
args.name_list_format = pframe.args['name-list-format']; -- when set to 'harv' display contributor list in sfn or harv style
args.last_author_amp = pframe.args['last-author-amp'] or -- yes only; |last-author-amp=no does not work (though it does in cs1|2)
pframe.args['lastauthoramp'] or '';
args.last_author_amp = args.last_author_amp:lower(); -- make it case agnostic
if is_set (pframe.args.last) or is_set (pframe.args.last1) or
is_set (pframe.args.author) or is_set (pframe.args.author1) then -- must have at least this to continue
args.last[1] = pframe.args.last or pframe.args.last1 or pframe.args.author or pframe.args.author1; -- get first contributor's last name
args.citeref[1] = args.last[1]; -- add it to the citeref
args.first[1] = pframe.args.first or pframe.args.first1; -- get first contributor's first name
args.link[1] = pframe.args['author-link'] or pframe.args['author-link1']; -- get first contributor's article link
args.mask[1] = pframe.args['author-mask'] or pframe.args['author-mask1']; -- get first contributor's article link
local i = 2; -- index for the rest of the names
while is_set (pframe.args['last'..i]) or is_set (pframe.args['author'..i]) do -- loop through pframe.args and get the rest of the names
args.last[i] = pframe.args['last'..i] or pframe.args['author'..i]; -- last names
args.first[i] = pframe.args['first'..i]; -- first names
args.link[i] = pframe.args['author-link'..i]; -- links
args.mask[i] = pframe.args['author-mask'..i]; -- masks
if 5 > i then
args.citeref[i] = args.last[i]; -- collect first four last names for CITEREF anchor
end
i = i + 1 -- bump the index
end
end
args.p = pframe.args.p or ''; -- source page number(s) or location
args.pp = pframe.args.pp or '';
args.loc = pframe.args.loc or '';
args.ref = pframe.args.ref or pframe.args.Ref or ''; -- used to match |ref=<text> in cs1|2 source template
args.ignore = 'yes' == pframe.args['ignore-err']; -- suppress false-positive 'no target' errors
if 'cs2' == pframe.args.mode then
args.ps = ''; -- set postscript character to empty string, cs2 mode
args.sepc = ','; -- set seperator character to comma, cs2 mode
end
do -- to limit scope of local temp
local temp = pframe.args.ps or pframe.args.postscript;
if is_set (temp) then
if 'none' == temp:lower() then -- if |ps=none or |postscript=none then
args.ps = ''; -- no postscript
else
args.ps = temp; -- override default postscript
end
end
end -- end of scope limit
if 'yes' == pframe.args.nb then -- if no brackets around year in link to cs1|2 template
args.open = ''; -- unset these
args.close = '';
end
args.url = pframe.args.url or -- url for chapter or contribution
pframe.args['chapter-url'] or
pframe.args['contribution-url'] or '';
args['url-access'] = pframe.args['url-access'];
args.year = pframe.args.year or ''; -- required
args['anchor-year'] = pframe.args['anchor-year'] or '';
args.err_msg = args.err_msg .. check_years (args.year, args['anchor-year']);
if not is_set (args.contribution) then
args.err_msg = args.err_msg .. ' required contribution is missing.'; -- error message if source not provided
args.contribution = args.url; -- if set it will give us linkable text
end
if args.last[1] == args.in1 and
args.last[2] == args.in2 and
args.last[3] == args.in3 and
args.last[4] == args.in4 and
not is_set (args.id) then
args.err_msg = args.err_msg .. ' required ' .. code_open_tag .. '|id=</code> parameter missing.'; -- error message if contributor and source are the same
end
return table.concat ({core (args), frame:extensionTag ('templatestyles', '', {src='Module:Citation/CS1/styles.css'})});
end
--[[--------------------------< E X P O R T E D F U N C T I O N S >------------------------------------------
]]
return {
harvc = harvc
};
mlbb6qbtxhcys0z3a1xmz1m1mr6rkxc
801890
801889
2020-03-27T14:22:02Z
en>Trappist the monk
0
801890
Scribunto
text/plain
require('Module:No globals')
local anchor_id_list = mw.loadData ('Module:Sandbox/trappist_the_monk/harv_link_test').citerefs;
local code_open_tag = '<code class="cs1-code">'; -- cs1-code class defined in Module:Citation/CS1/styles.css
local lock_icons = { --icon classes are defined in Module:Citation/CS1/styles.css
['registration'] = {'cs1-lock-registration', 'Free registration required'},
['limited'] = {'cs1-lock-limited', 'Free access subject to limited trial, subscription normally required'},
['subscription'] = {'cs1-lock-subscription', 'Paid subscription required'},
}
--[[--------------------------< T A R G E T _ C H E C K >------------------------------------------------------
look for anchor_id (CITEREF name-list and year or text from |ref=) in anchor_id_list
the 'no target' error may be suppressed with |ignore-err=yes when target cannot be found because target is inside
a template that wraps another template; 'multiple targets' error may not be suppressed
]]
local function target_check (anchor_id, ignore)
local number = anchor_id_list[anchor_id]; -- nil when anchor_id not in list; else a number
local msg;
local category;
if not number then
if ignore then
return ''; -- if ignore is true then no message, no category
end
msg = 'no target: ' .. anchor_id; -- anchor_id not found in this article
elseif 1 < number then
msg = 'multiple targets (' .. number .. '×): ' .. anchor_id; -- more than one anchor_id in this article
end
category = 0 == mw.title.getCurrentTitle().namespace and '[[Category:Harv and Sfn template errors]]' or ''; -- only categorize in article space
--TODO: use this version after initial testing
-- return msg and ' <span class="error harv-error" style="display: inline; font-size:100%">Harvc error: ' .. msg .. ' ([[:Category:Harv and Sfn template errors|help]])</span>' .. category or '';
--use this version during initial testing of the live module
return msg and ' <span class="error harv-error" style="display: none; font-size:100%">Harvc error: ' .. msg .. ' ([[:Category:Harv and Sfn template errors|help]])</span>' .. category or '';
end
--[[--------------------------< I S _ S E T >------------------------------------------------------------------
Whether variable is set or not. A varable is set when it is not nil and not empty.
]]
local function is_set( var )
return not (var == nil or var == '');
end
--[[--------------------------< C H E C K _ Y E A R S >--------------------------------------------------------
evaluates params to see if they are one of these forms with or without lowercase letter disambiguator (same as in
Module:Footnotes):
YYYY
n.d.
nd
c. YYYY
YYYY–YYYY (separator is endash)
YYYY–YY (separator is endash)
when anchor_year present, year portion must be same as year param and must have disambiguator
returns empty string when params have correct form; error message else
]]
local function check_years (year, anchor_year)
local y, ay;
if not is_set (year) then -- year is required so return error message when not set
return ' missing ' .. code_open_tag .. '|year=</code>.';
end
local patterns = { -- allowed year patterns from Module:Footnotes (captures added here)
'^(%d%d%d%d?)%l?$', -- YYY or YYYY
'^(n%.d%.)%l?$', -- n.d.
'^(nd)%l?$', -- nd
'^(c%. %d%d%d%d?)%l?$', -- c. YYY or c. YYYY
'^(%d%d%d%d–%d%d%d%d)%l?$', -- YYYY–YYYY
'^(%d%d%d%d–%d%d)%l?$' -- YYYY–YY
}
for _, pattern in ipairs (patterns) do -- spin through the patterns
y = year:match (pattern); -- y is the year portion
if y then
break; -- when y is set, we found a match so done
end
end
if not y then
return ' invalid ' .. code_open_tag .. '|year=</code>.'; -- y not set, so year is malformed
end
if is_set (anchor_year) then -- anchor_year is optional
for _, pattern in ipairs (patterns) do -- spin through the patterns
ay = anchor_year:match (pattern); -- ay is the year portion
if ay then
break; -- when ay is set, we found a match so done
end
end
if not ay then
return ' invalid ' .. code_open_tag .. '|anchor-year</code>.'; -- ay not set, so anchor_year is malformed
end
if not anchor_year:match ('%l$') then
return ' ' .. code_open_tag .. '|anchor-year=</code> missing dab.'; -- anchor_year must end with a disambiguator letter
end
if y ~= ay then
return ' ' .. code_open_tag .. '|year=</code> / ' .. code_open_tag .. '|anchor-year=</code> mismatch.'; -- 'year' portions of year and anchor_year must be the same
end
end
return ''; -- both years are good; empty string for concatenation
end
--[[--------------------------< M A K E _ N A M E >------------------------------------------------------------
Assembles last, first, link, or mask into a displayable contributor name.
]]
local function make_name (last, first, link, mask)
local name = last;
if is_set (first) then
name = name .. ', ' .. first; -- concatenate first onto last
end
if is_set (link) then
name = '[[' .. link .. '|' .. name .. ']]'; -- form a wikilink around the name
end
if is_set (mask) then -- mask this author
if tonumber(mask) then
name = string.rep ('—', mask) -- make a string that number length of mdashes
else
name = mask; -- mask is not a number so use the mask text
end
end
return name;
end
--[[--------------------------< C O R E >----------------------------------------------------------------------
Assembles the various parts provided by the template into a properly formatted bridging citation. Adds punctuation
and text; encloses the whole within a span with id and class attributes.
This creates a CITEREF anchor from |last1= through |last4= and |year=. It also creates a CITEREF link from |in1= through
|in4= and |year=. It is presumed that the dates of contributions are the same as the date of the enclosing work.
Even though not displayed, a year parameter is still required for the CITEREF anchor
]]
local function core( args )
local span_open_tag; -- holds CITEREF and css
local contributors = ''; -- chapter or contribution authors
local source = ''; -- editor/author date list that forms a CITEREF link to a full citation
local in_text = ' In ';
local result; -- the assemby of the above output
-- form the CITEREF anchor
if is_set (args.id) then
args.id = mw.uri.anchorEncode (args.id)
span_open_tag = '<span id="' .. args.id .. '" class="citation">'; -- for use when contributor name is same as source name
else
local citeref = 'CITEREF' .. table.concat (args.citeref) .. (is_set (args['anchor-year']) and args['anchor-year'] or args.year);
citeref = mw.uri.anchorEncode (citeref);
span_open_tag = '<span id="' .. citeref .. '" class="citation">';
end
--[[
form the contributors display list:
if |name-list-format=harv, display is similar to {{sfn}} and {{harv}}, 1 to 4 last names;
if |display-authors= is empty or omitted, display is similar to cs1|2: display all names in last, first order
if |display-authors=etal then displays all author names in last, first order and append et al.
if value assigned to |display-authors= is less than the number of author last names, displays the specified number of author names in last, first order followed by et al.
]]
if 'harv' ~= args.name_list_format then -- default cs1|2 style contributor list
local i = 1;
local count;
local etal = false; -- when |display-authors= is same as number of authors in contributor list
if is_set (args.display_authors) then
if 'etal' == args.display_authors:lower():gsub("[ '%.]", '') then -- the :gsub() portion makes 'etal' from a variety of 'et al.' spellings and stylings
count = #args.last; -- display all authors and ...
etal = true; -- ... append 'et al.'
else
count = tonumber (args.display_authors) or 0; -- 0 if can't be converted to a number
if 0 >= count then
args.err_msg = args.err_msg .. ' invalid ' .. code_open_tag .. '|display-authors=</code>'; -- if zero, then emit error message
end
end
if count > #args.last then
count = #args.last; -- when |display-authors= is more than the number of authors, use the number of authors
end
if count < #args.last then -- when |display-authors= is less than the number of authors
etal = true; -- append 'et al.'
end
else
count = #args.last; -- set count to display all of the authors
end
while i <= count do
if is_set (contributors) then
contributors = contributors .. '; ' .. make_name (args.last[i], args.first[i], args.link[i], args.mask[i]); -- the rest of the contributors
else
contributors = make_name (args.last[i], args.first[i], args.link[i], args.mask[i]); -- first contributor's name
end
i = i+1; -- bump the index
end
if true == etal then
contributors = contributors .. ' et al.'; -- append et al.
elseif 'yes' == args.last_author_amp then
contributors = contributors:gsub('; ([^;]+)$', ' & %1') -- replace last separator with ' & '
end
else -- do default harv- or sfn-style contributor display
if 4 <= #args.last then -- four or more contributors (first followed by et al.)
contributors = args.last[1] .. ' et al.';
elseif 3 == #args.last then -- three (display them all)
contributors = args.last[1] .. ', ' .. args.last[2] .. ' & ' .. args.last[3];
elseif 2 == #args.last then -- two (first & second)
contributors = args.last[1] .. ' & ' .. args.last[2];
elseif 1 == #args.last then -- just one (first)
contributors = args.last[1];
else
args.err_msg = args.err_msg .. ' no authors in contributor list.'; -- this code used to find holes in the list; no more
end
end
--form the source author-date list
if is_set (args.in4) and is_set (args.in3) and is_set (args.in2) and is_set (args.in1) then
source = args.in1 .. ' et al.';
elseif not is_set (args.in4) and is_set (args.in3) and is_set (args.in2) and is_set (args.in1) then
source = args.in1 .. ', ' .. args.in2 .. ' & ' .. args.in3;
elseif not is_set (args.in4) and not is_set (args.in3) and is_set (args.in2) and is_set (args.in1) then
source = args.in1 .. ' & ' .. args.in2;
elseif not is_set (args.in4) and not is_set (args.in3) and not is_set (args.in2) and is_set (args.in1) then
source = args.in1;
else
args.err_msg = args.err_msg .. ' author missing from source list.'
end
source = source .. ' ' .. args.open .. args.year .. args.close; -- add the year with or without brackets
--assemble CITEREF wikilink
local anchor_id;
local target_err_msg;
if '' ~= args.ref then
anchor_id = mw.uri.anchorEncode (args.ref)
else
anchor_id = mw.uri.anchorEncode(table.concat ({'CITEREF', args.in1, args.in2, args.in3, args.in4, args.year}));
end
target_err_msg = target_check (anchor_id, args.ignore); -- see if there is a target for this anchor_id
source = '[[#' .. anchor_id .. "|" .. source .. "]]";
--combine contribution with url to make external link
if args.url ~= '' then
args.contribution = '[' .. args.url .. ' ' .. args.contribution .. ']'; -- format external link
if args['url-access'] then
if lock_icons[args['url-access']] then
args.contribution = table.concat ({ -- add access icon markup to this item
'<span class="', -- open the opening span tag; icon classes are defined in Module:Citation/CS1/styles.css
lock_icons[args['url-access']][1], -- add the appropriate lock icon class
'" title="', -- and the title attribute
lock_icons[args['url-access']][2], -- for an appropriate tool tip
'">', -- close the opening span tag
args.contribution,
'</span>', -- and close the span
});
end
end
end
if is_set (args['anchor-year']) then
contributors = contributors .. ' (' .. args['anchor-year'] .. ')' .. args.sepc;
elseif args.sepc ~= contributors:sub(-1) and args.sepc .. ']]' ~= contributors:sub(-3) then
contributors = contributors .. args.sepc; -- add separator if not same as last character in name list (|first=John S. or et al.)
end
-- pages and other insource location
if args.p ~= '' then
args.p = args.page_sep .. args.p;
elseif args.pp ~= '' then
args.p = args.pages_sep .. args.pp; -- args.p not set so use it to hold common insource location info
end
if args.loc ~= '' then
args.p = args.p .. ', ' .. args.loc; -- add arg.loc to args.p
end
--wrap error messages in span and add help link
if is_set (args.err_msg) then
args.err_msg = '<span style="font-size:100%" class="error"> harvc:' .. args.err_msg .. ' ([[Template:Harvc|help]])</span>';
end
if ',' == args.sepc then
in_text = in_text:lower(); -- CS2 style use lower case
end
-- and put it all together
result = span_open_tag .. contributors .. ' "' .. args.contribution .. '"' .. args.sepc .. in_text .. source .. args.p .. args.ps .. args.err_msg .. target_err_msg .. '</span>';
return result;
end
--[[--------------------------< H A R V C >--------------------------------------------------------------------
Entry point from {{harvc}} template. Fetches parent frame parameters, does a bit of simple error checking
]]
local function harvc (frame)
local args = {
err_msg = '',
page_sep = ", p. ",
pages_sep = ", pp. ",
sepc = '.',
ps = '.',
open = '(', -- year brackets for source year
close = ')',
last = {},
first = {},
link = {},
mask = {},
citeref = {}
}
local pframe = frame:getParent();
args.contribution = pframe.args.c or -- chapter or contribution
pframe.args.chapter or
pframe.args.contribution or '';
args.id = pframe.args.id or '';
args.in1 = pframe.args['in'] or pframe.args.in1 or ''; -- source editor surnames; 'in' is a Lua reserved keyword
args.in2 = pframe.args.in2 or '';
args.in3 = pframe.args.in3 or '';
args.in4 = pframe.args.in4 or '';
args.display_authors = pframe.args['display-authors']; -- the number of contributor names to display; cs1|2 format includes first names
args.name_list_format = pframe.args['name-list-format']; -- when set to 'harv' display contributor list in sfn or harv style
args.last_author_amp = pframe.args['last-author-amp'] or -- yes only; |last-author-amp=no does not work (though it does in cs1|2)
pframe.args['lastauthoramp'] or '';
args.last_author_amp = args.last_author_amp:lower(); -- make it case agnostic
if is_set (pframe.args.last) or is_set (pframe.args.last1) or
is_set (pframe.args.author) or is_set (pframe.args.author1) then -- must have at least this to continue
args.last[1] = pframe.args.last or pframe.args.last1 or pframe.args.author or pframe.args.author1; -- get first contributor's last name
args.citeref[1] = args.last[1]; -- add it to the citeref
args.first[1] = pframe.args.first or pframe.args.first1; -- get first contributor's first name
args.link[1] = pframe.args['author-link'] or pframe.args['author-link1']; -- get first contributor's article link
args.mask[1] = pframe.args['author-mask'] or pframe.args['author-mask1']; -- get first contributor's article link
local i = 2; -- index for the rest of the names
while is_set (pframe.args['last'..i]) or is_set (pframe.args['author'..i]) do -- loop through pframe.args and get the rest of the names
args.last[i] = pframe.args['last'..i] or pframe.args['author'..i]; -- last names
args.first[i] = pframe.args['first'..i]; -- first names
args.link[i] = pframe.args['author-link'..i]; -- links
args.mask[i] = pframe.args['author-mask'..i]; -- masks
if 5 > i then
args.citeref[i] = args.last[i]; -- collect first four last names for CITEREF anchor
end
i = i + 1 -- bump the index
end
end
args.p = pframe.args.p or ''; -- source page number(s) or location
args.pp = pframe.args.pp or '';
args.loc = pframe.args.loc or '';
args.ref = pframe.args.ref or pframe.args.Ref or ''; -- used to match |ref=<text> in cs1|2 source template
args.ignore = 'yes' == pframe.args['ignore-err']; -- suppress false-positive 'no target' errors
if 'cs2' == pframe.args.mode then
args.ps = ''; -- set postscript character to empty string, cs2 mode
args.sepc = ','; -- set seperator character to comma, cs2 mode
end
do -- to limit scope of local temp
local temp = pframe.args.ps or pframe.args.postscript;
if is_set (temp) then
if 'none' == temp:lower() then -- if |ps=none or |postscript=none then
args.ps = ''; -- no postscript
else
args.ps = temp; -- override default postscript
end
end
end -- end of scope limit
if 'yes' == pframe.args.nb then -- if no brackets around year in link to cs1|2 template
args.open = ''; -- unset these
args.close = '';
end
args.url = pframe.args.url or -- url for chapter or contribution
pframe.args['chapter-url'] or
pframe.args['contribution-url'] or '';
args['url-access'] = pframe.args['url-access'];
args.year = pframe.args.year or ''; -- required
args['anchor-year'] = pframe.args['anchor-year'] or '';
args.err_msg = args.err_msg .. check_years (args.year, args['anchor-year']);
if not is_set (args.contribution) then
args.err_msg = args.err_msg .. ' required contribution is missing.'; -- error message if source not provided
args.contribution = args.url; -- if set it will give us linkable text
end
if args.last[1] == args.in1 and
args.last[2] == args.in2 and
args.last[3] == args.in3 and
args.last[4] == args.in4 and
not is_set (args.id) then
args.err_msg = args.err_msg .. ' required ' .. code_open_tag .. '|id=</code> parameter missing.'; -- error message if contributor and source are the same
end
return table.concat ({core (args), frame:extensionTag ('templatestyles', '', {src='Module:Citation/CS1/styles.css'})});
end
--[[--------------------------< E X P O R T E D F U N C T I O N S >------------------------------------------
]]
return {
harvc = harvc
};
k3c8vfp1457ifkkimonf5vcnxndsf41
801891
801890
2020-03-27T14:35:07Z
en>Trappist the monk
0
data module moved;
801891
Scribunto
text/plain
require('Module:No globals')
local anchor_id_list = mw.loadData ('Module:Footnotes/anchor_id_list').citerefs;
local code_open_tag = '<code class="cs1-code">'; -- cs1-code class defined in Module:Citation/CS1/styles.css
local lock_icons = { --icon classes are defined in Module:Citation/CS1/styles.css
['registration'] = {'cs1-lock-registration', 'Free registration required'},
['limited'] = {'cs1-lock-limited', 'Free access subject to limited trial, subscription normally required'},
['subscription'] = {'cs1-lock-subscription', 'Paid subscription required'},
}
--[[--------------------------< T A R G E T _ C H E C K >------------------------------------------------------
look for anchor_id (CITEREF name-list and year or text from |ref=) in anchor_id_list
the 'no target' error may be suppressed with |ignore-err=yes when target cannot be found because target is inside
a template that wraps another template; 'multiple targets' error may not be suppressed
]]
local function target_check (anchor_id, ignore)
local number = anchor_id_list[anchor_id]; -- nil when anchor_id not in list; else a number
local msg;
local category;
if not number then
if ignore then
return ''; -- if ignore is true then no message, no category
end
msg = 'no target: ' .. anchor_id; -- anchor_id not found in this article
elseif 1 < number then
msg = 'multiple targets (' .. number .. '×): ' .. anchor_id; -- more than one anchor_id in this article
end
category = 0 == mw.title.getCurrentTitle().namespace and '[[Category:Harv and Sfn template errors]]' or ''; -- only categorize in article space
--TODO: use this version after initial testing
-- return msg and ' <span class="error harv-error" style="display: inline; font-size:100%">Harvc error: ' .. msg .. ' ([[:Category:Harv and Sfn template errors|help]])</span>' .. category or '';
--use this version during initial testing of the live module
return msg and ' <span class="error harv-error" style="display: none; font-size:100%">Harvc error: ' .. msg .. ' ([[:Category:Harv and Sfn template errors|help]])</span>' .. category or '';
end
--[[--------------------------< I S _ S E T >------------------------------------------------------------------
Whether variable is set or not. A varable is set when it is not nil and not empty.
]]
local function is_set( var )
return not (var == nil or var == '');
end
--[[--------------------------< C H E C K _ Y E A R S >--------------------------------------------------------
evaluates params to see if they are one of these forms with or without lowercase letter disambiguator (same as in
Module:Footnotes):
YYYY
n.d.
nd
c. YYYY
YYYY–YYYY (separator is endash)
YYYY–YY (separator is endash)
when anchor_year present, year portion must be same as year param and must have disambiguator
returns empty string when params have correct form; error message else
]]
local function check_years (year, anchor_year)
local y, ay;
if not is_set (year) then -- year is required so return error message when not set
return ' missing ' .. code_open_tag .. '|year=</code>.';
end
local patterns = { -- allowed year patterns from Module:Footnotes (captures added here)
'^(%d%d%d%d?)%l?$', -- YYY or YYYY
'^(n%.d%.)%l?$', -- n.d.
'^(nd)%l?$', -- nd
'^(c%. %d%d%d%d?)%l?$', -- c. YYY or c. YYYY
'^(%d%d%d%d–%d%d%d%d)%l?$', -- YYYY–YYYY
'^(%d%d%d%d–%d%d)%l?$' -- YYYY–YY
}
for _, pattern in ipairs (patterns) do -- spin through the patterns
y = year:match (pattern); -- y is the year portion
if y then
break; -- when y is set, we found a match so done
end
end
if not y then
return ' invalid ' .. code_open_tag .. '|year=</code>.'; -- y not set, so year is malformed
end
if is_set (anchor_year) then -- anchor_year is optional
for _, pattern in ipairs (patterns) do -- spin through the patterns
ay = anchor_year:match (pattern); -- ay is the year portion
if ay then
break; -- when ay is set, we found a match so done
end
end
if not ay then
return ' invalid ' .. code_open_tag .. '|anchor-year</code>.'; -- ay not set, so anchor_year is malformed
end
if not anchor_year:match ('%l$') then
return ' ' .. code_open_tag .. '|anchor-year=</code> missing dab.'; -- anchor_year must end with a disambiguator letter
end
if y ~= ay then
return ' ' .. code_open_tag .. '|year=</code> / ' .. code_open_tag .. '|anchor-year=</code> mismatch.'; -- 'year' portions of year and anchor_year must be the same
end
end
return ''; -- both years are good; empty string for concatenation
end
--[[--------------------------< M A K E _ N A M E >------------------------------------------------------------
Assembles last, first, link, or mask into a displayable contributor name.
]]
local function make_name (last, first, link, mask)
local name = last;
if is_set (first) then
name = name .. ', ' .. first; -- concatenate first onto last
end
if is_set (link) then
name = '[[' .. link .. '|' .. name .. ']]'; -- form a wikilink around the name
end
if is_set (mask) then -- mask this author
if tonumber(mask) then
name = string.rep ('—', mask) -- make a string that number length of mdashes
else
name = mask; -- mask is not a number so use the mask text
end
end
return name;
end
--[[--------------------------< C O R E >----------------------------------------------------------------------
Assembles the various parts provided by the template into a properly formatted bridging citation. Adds punctuation
and text; encloses the whole within a span with id and class attributes.
This creates a CITEREF anchor from |last1= through |last4= and |year=. It also creates a CITEREF link from |in1= through
|in4= and |year=. It is presumed that the dates of contributions are the same as the date of the enclosing work.
Even though not displayed, a year parameter is still required for the CITEREF anchor
]]
local function core( args )
local span_open_tag; -- holds CITEREF and css
local contributors = ''; -- chapter or contribution authors
local source = ''; -- editor/author date list that forms a CITEREF link to a full citation
local in_text = ' In ';
local result; -- the assemby of the above output
-- form the CITEREF anchor
if is_set (args.id) then
args.id = mw.uri.anchorEncode (args.id)
span_open_tag = '<span id="' .. args.id .. '" class="citation">'; -- for use when contributor name is same as source name
else
local citeref = 'CITEREF' .. table.concat (args.citeref) .. (is_set (args['anchor-year']) and args['anchor-year'] or args.year);
citeref = mw.uri.anchorEncode (citeref);
span_open_tag = '<span id="' .. citeref .. '" class="citation">';
end
--[[
form the contributors display list:
if |name-list-format=harv, display is similar to {{sfn}} and {{harv}}, 1 to 4 last names;
if |display-authors= is empty or omitted, display is similar to cs1|2: display all names in last, first order
if |display-authors=etal then displays all author names in last, first order and append et al.
if value assigned to |display-authors= is less than the number of author last names, displays the specified number of author names in last, first order followed by et al.
]]
if 'harv' ~= args.name_list_format then -- default cs1|2 style contributor list
local i = 1;
local count;
local etal = false; -- when |display-authors= is same as number of authors in contributor list
if is_set (args.display_authors) then
if 'etal' == args.display_authors:lower():gsub("[ '%.]", '') then -- the :gsub() portion makes 'etal' from a variety of 'et al.' spellings and stylings
count = #args.last; -- display all authors and ...
etal = true; -- ... append 'et al.'
else
count = tonumber (args.display_authors) or 0; -- 0 if can't be converted to a number
if 0 >= count then
args.err_msg = args.err_msg .. ' invalid ' .. code_open_tag .. '|display-authors=</code>'; -- if zero, then emit error message
end
end
if count > #args.last then
count = #args.last; -- when |display-authors= is more than the number of authors, use the number of authors
end
if count < #args.last then -- when |display-authors= is less than the number of authors
etal = true; -- append 'et al.'
end
else
count = #args.last; -- set count to display all of the authors
end
while i <= count do
if is_set (contributors) then
contributors = contributors .. '; ' .. make_name (args.last[i], args.first[i], args.link[i], args.mask[i]); -- the rest of the contributors
else
contributors = make_name (args.last[i], args.first[i], args.link[i], args.mask[i]); -- first contributor's name
end
i = i+1; -- bump the index
end
if true == etal then
contributors = contributors .. ' et al.'; -- append et al.
elseif 'yes' == args.last_author_amp then
contributors = contributors:gsub('; ([^;]+)$', ' & %1') -- replace last separator with ' & '
end
else -- do default harv- or sfn-style contributor display
if 4 <= #args.last then -- four or more contributors (first followed by et al.)
contributors = args.last[1] .. ' et al.';
elseif 3 == #args.last then -- three (display them all)
contributors = args.last[1] .. ', ' .. args.last[2] .. ' & ' .. args.last[3];
elseif 2 == #args.last then -- two (first & second)
contributors = args.last[1] .. ' & ' .. args.last[2];
elseif 1 == #args.last then -- just one (first)
contributors = args.last[1];
else
args.err_msg = args.err_msg .. ' no authors in contributor list.'; -- this code used to find holes in the list; no more
end
end
--form the source author-date list
if is_set (args.in4) and is_set (args.in3) and is_set (args.in2) and is_set (args.in1) then
source = args.in1 .. ' et al.';
elseif not is_set (args.in4) and is_set (args.in3) and is_set (args.in2) and is_set (args.in1) then
source = args.in1 .. ', ' .. args.in2 .. ' & ' .. args.in3;
elseif not is_set (args.in4) and not is_set (args.in3) and is_set (args.in2) and is_set (args.in1) then
source = args.in1 .. ' & ' .. args.in2;
elseif not is_set (args.in4) and not is_set (args.in3) and not is_set (args.in2) and is_set (args.in1) then
source = args.in1;
else
args.err_msg = args.err_msg .. ' author missing from source list.'
end
source = source .. ' ' .. args.open .. args.year .. args.close; -- add the year with or without brackets
--assemble CITEREF wikilink
local anchor_id;
local target_err_msg;
if '' ~= args.ref then
anchor_id = mw.uri.anchorEncode (args.ref)
else
anchor_id = mw.uri.anchorEncode(table.concat ({'CITEREF', args.in1, args.in2, args.in3, args.in4, args.year}));
end
target_err_msg = target_check (anchor_id, args.ignore); -- see if there is a target for this anchor_id
source = '[[#' .. anchor_id .. "|" .. source .. "]]";
--combine contribution with url to make external link
if args.url ~= '' then
args.contribution = '[' .. args.url .. ' ' .. args.contribution .. ']'; -- format external link
if args['url-access'] then
if lock_icons[args['url-access']] then
args.contribution = table.concat ({ -- add access icon markup to this item
'<span class="', -- open the opening span tag; icon classes are defined in Module:Citation/CS1/styles.css
lock_icons[args['url-access']][1], -- add the appropriate lock icon class
'" title="', -- and the title attribute
lock_icons[args['url-access']][2], -- for an appropriate tool tip
'">', -- close the opening span tag
args.contribution,
'</span>', -- and close the span
});
end
end
end
if is_set (args['anchor-year']) then
contributors = contributors .. ' (' .. args['anchor-year'] .. ')' .. args.sepc;
elseif args.sepc ~= contributors:sub(-1) and args.sepc .. ']]' ~= contributors:sub(-3) then
contributors = contributors .. args.sepc; -- add separator if not same as last character in name list (|first=John S. or et al.)
end
-- pages and other insource location
if args.p ~= '' then
args.p = args.page_sep .. args.p;
elseif args.pp ~= '' then
args.p = args.pages_sep .. args.pp; -- args.p not set so use it to hold common insource location info
end
if args.loc ~= '' then
args.p = args.p .. ', ' .. args.loc; -- add arg.loc to args.p
end
--wrap error messages in span and add help link
if is_set (args.err_msg) then
args.err_msg = '<span style="font-size:100%" class="error"> harvc:' .. args.err_msg .. ' ([[Template:Harvc|help]])</span>';
end
if ',' == args.sepc then
in_text = in_text:lower(); -- CS2 style use lower case
end
-- and put it all together
result = span_open_tag .. contributors .. ' "' .. args.contribution .. '"' .. args.sepc .. in_text .. source .. args.p .. args.ps .. args.err_msg .. target_err_msg .. '</span>';
return result;
end
--[[--------------------------< H A R V C >--------------------------------------------------------------------
Entry point from {{harvc}} template. Fetches parent frame parameters, does a bit of simple error checking
]]
local function harvc (frame)
local args = {
err_msg = '',
page_sep = ", p. ",
pages_sep = ", pp. ",
sepc = '.',
ps = '.',
open = '(', -- year brackets for source year
close = ')',
last = {},
first = {},
link = {},
mask = {},
citeref = {}
}
local pframe = frame:getParent();
args.contribution = pframe.args.c or -- chapter or contribution
pframe.args.chapter or
pframe.args.contribution or '';
args.id = pframe.args.id or '';
args.in1 = pframe.args['in'] or pframe.args.in1 or ''; -- source editor surnames; 'in' is a Lua reserved keyword
args.in2 = pframe.args.in2 or '';
args.in3 = pframe.args.in3 or '';
args.in4 = pframe.args.in4 or '';
args.display_authors = pframe.args['display-authors']; -- the number of contributor names to display; cs1|2 format includes first names
args.name_list_format = pframe.args['name-list-format']; -- when set to 'harv' display contributor list in sfn or harv style
args.last_author_amp = pframe.args['last-author-amp'] or -- yes only; |last-author-amp=no does not work (though it does in cs1|2)
pframe.args['lastauthoramp'] or '';
args.last_author_amp = args.last_author_amp:lower(); -- make it case agnostic
if is_set (pframe.args.last) or is_set (pframe.args.last1) or
is_set (pframe.args.author) or is_set (pframe.args.author1) then -- must have at least this to continue
args.last[1] = pframe.args.last or pframe.args.last1 or pframe.args.author or pframe.args.author1; -- get first contributor's last name
args.citeref[1] = args.last[1]; -- add it to the citeref
args.first[1] = pframe.args.first or pframe.args.first1; -- get first contributor's first name
args.link[1] = pframe.args['author-link'] or pframe.args['author-link1']; -- get first contributor's article link
args.mask[1] = pframe.args['author-mask'] or pframe.args['author-mask1']; -- get first contributor's article link
local i = 2; -- index for the rest of the names
while is_set (pframe.args['last'..i]) or is_set (pframe.args['author'..i]) do -- loop through pframe.args and get the rest of the names
args.last[i] = pframe.args['last'..i] or pframe.args['author'..i]; -- last names
args.first[i] = pframe.args['first'..i]; -- first names
args.link[i] = pframe.args['author-link'..i]; -- links
args.mask[i] = pframe.args['author-mask'..i]; -- masks
if 5 > i then
args.citeref[i] = args.last[i]; -- collect first four last names for CITEREF anchor
end
i = i + 1 -- bump the index
end
end
args.p = pframe.args.p or ''; -- source page number(s) or location
args.pp = pframe.args.pp or '';
args.loc = pframe.args.loc or '';
args.ref = pframe.args.ref or pframe.args.Ref or ''; -- used to match |ref=<text> in cs1|2 source template
args.ignore = 'yes' == pframe.args['ignore-err']; -- suppress false-positive 'no target' errors
if 'cs2' == pframe.args.mode then
args.ps = ''; -- set postscript character to empty string, cs2 mode
args.sepc = ','; -- set seperator character to comma, cs2 mode
end
do -- to limit scope of local temp
local temp = pframe.args.ps or pframe.args.postscript;
if is_set (temp) then
if 'none' == temp:lower() then -- if |ps=none or |postscript=none then
args.ps = ''; -- no postscript
else
args.ps = temp; -- override default postscript
end
end
end -- end of scope limit
if 'yes' == pframe.args.nb then -- if no brackets around year in link to cs1|2 template
args.open = ''; -- unset these
args.close = '';
end
args.url = pframe.args.url or -- url for chapter or contribution
pframe.args['chapter-url'] or
pframe.args['contribution-url'] or '';
args['url-access'] = pframe.args['url-access'];
args.year = pframe.args.year or ''; -- required
args['anchor-year'] = pframe.args['anchor-year'] or '';
args.err_msg = args.err_msg .. check_years (args.year, args['anchor-year']);
if not is_set (args.contribution) then
args.err_msg = args.err_msg .. ' required contribution is missing.'; -- error message if source not provided
args.contribution = args.url; -- if set it will give us linkable text
end
if args.last[1] == args.in1 and
args.last[2] == args.in2 and
args.last[3] == args.in3 and
args.last[4] == args.in4 and
not is_set (args.id) then
args.err_msg = args.err_msg .. ' required ' .. code_open_tag .. '|id=</code> parameter missing.'; -- error message if contributor and source are the same
end
return table.concat ({core (args), frame:extensionTag ('templatestyles', '', {src='Module:Citation/CS1/styles.css'})});
end
--[[--------------------------< E X P O R T E D F U N C T I O N S >------------------------------------------
]]
return {
harvc = harvc
};
tet3rs2i6ixtujqob6eaaxqg8c872nv
801892
801891
2020-03-27T15:24:48Z
en>Trappist the monk
0
renaming;
801892
Scribunto
text/plain
require('Module:No globals')
local anchor_id_list = mw.loadData ('Module:Footnotes/anchor_id_list').anchor_id_list;
local code_open_tag = '<code class="cs1-code">'; -- cs1-code class defined in Module:Citation/CS1/styles.css
local lock_icons = { --icon classes are defined in Module:Citation/CS1/styles.css
['registration'] = {'cs1-lock-registration', 'Free registration required'},
['limited'] = {'cs1-lock-limited', 'Free access subject to limited trial, subscription normally required'},
['subscription'] = {'cs1-lock-subscription', 'Paid subscription required'},
}
--[[--------------------------< T A R G E T _ C H E C K >------------------------------------------------------
look for anchor_id (CITEREF name-list and year or text from |ref=) in anchor_id_list
the 'no target' error may be suppressed with |ignore-err=yes when target cannot be found because target is inside
a template that wraps another template; 'multiple targets' error may not be suppressed
]]
local function target_check (anchor_id, ignore)
local number = anchor_id_list[anchor_id]; -- nil when anchor_id not in list; else a number
local msg;
local category;
if not number then
if ignore then
return ''; -- if ignore is true then no message, no category
end
msg = 'no target: ' .. anchor_id; -- anchor_id not found in this article
elseif 1 < number then
msg = 'multiple targets (' .. number .. '×): ' .. anchor_id; -- more than one anchor_id in this article
end
category = 0 == mw.title.getCurrentTitle().namespace and '[[Category:Harv and Sfn template errors]]' or ''; -- only categorize in article space
--TODO: use this version after initial testing
-- return msg and ' <span class="error harv-error" style="display: inline; font-size:100%">Harvc error: ' .. msg .. ' ([[:Category:Harv and Sfn template errors|help]])</span>' .. category or '';
--use this version during initial testing of the live module
return msg and ' <span class="error harv-error" style="display: none; font-size:100%">Harvc error: ' .. msg .. ' ([[:Category:Harv and Sfn template errors|help]])</span>' .. category or '';
end
--[[--------------------------< I S _ S E T >------------------------------------------------------------------
Whether variable is set or not. A varable is set when it is not nil and not empty.
]]
local function is_set( var )
return not (var == nil or var == '');
end
--[[--------------------------< C H E C K _ Y E A R S >--------------------------------------------------------
evaluates params to see if they are one of these forms with or without lowercase letter disambiguator (same as in
Module:Footnotes):
YYYY
n.d.
nd
c. YYYY
YYYY–YYYY (separator is endash)
YYYY–YY (separator is endash)
when anchor_year present, year portion must be same as year param and must have disambiguator
returns empty string when params have correct form; error message else
]]
local function check_years (year, anchor_year)
local y, ay;
if not is_set (year) then -- year is required so return error message when not set
return ' missing ' .. code_open_tag .. '|year=</code>.';
end
local patterns = { -- allowed year patterns from Module:Footnotes (captures added here)
'^(%d%d%d%d?)%l?$', -- YYY or YYYY
'^(n%.d%.)%l?$', -- n.d.
'^(nd)%l?$', -- nd
'^(c%. %d%d%d%d?)%l?$', -- c. YYY or c. YYYY
'^(%d%d%d%d–%d%d%d%d)%l?$', -- YYYY–YYYY
'^(%d%d%d%d–%d%d)%l?$' -- YYYY–YY
}
for _, pattern in ipairs (patterns) do -- spin through the patterns
y = year:match (pattern); -- y is the year portion
if y then
break; -- when y is set, we found a match so done
end
end
if not y then
return ' invalid ' .. code_open_tag .. '|year=</code>.'; -- y not set, so year is malformed
end
if is_set (anchor_year) then -- anchor_year is optional
for _, pattern in ipairs (patterns) do -- spin through the patterns
ay = anchor_year:match (pattern); -- ay is the year portion
if ay then
break; -- when ay is set, we found a match so done
end
end
if not ay then
return ' invalid ' .. code_open_tag .. '|anchor-year</code>.'; -- ay not set, so anchor_year is malformed
end
if not anchor_year:match ('%l$') then
return ' ' .. code_open_tag .. '|anchor-year=</code> missing dab.'; -- anchor_year must end with a disambiguator letter
end
if y ~= ay then
return ' ' .. code_open_tag .. '|year=</code> / ' .. code_open_tag .. '|anchor-year=</code> mismatch.'; -- 'year' portions of year and anchor_year must be the same
end
end
return ''; -- both years are good; empty string for concatenation
end
--[[--------------------------< M A K E _ N A M E >------------------------------------------------------------
Assembles last, first, link, or mask into a displayable contributor name.
]]
local function make_name (last, first, link, mask)
local name = last;
if is_set (first) then
name = name .. ', ' .. first; -- concatenate first onto last
end
if is_set (link) then
name = '[[' .. link .. '|' .. name .. ']]'; -- form a wikilink around the name
end
if is_set (mask) then -- mask this author
if tonumber(mask) then
name = string.rep ('—', mask) -- make a string that number length of mdashes
else
name = mask; -- mask is not a number so use the mask text
end
end
return name;
end
--[[--------------------------< C O R E >----------------------------------------------------------------------
Assembles the various parts provided by the template into a properly formatted bridging citation. Adds punctuation
and text; encloses the whole within a span with id and class attributes.
This creates a CITEREF anchor from |last1= through |last4= and |year=. It also creates a CITEREF link from |in1= through
|in4= and |year=. It is presumed that the dates of contributions are the same as the date of the enclosing work.
Even though not displayed, a year parameter is still required for the CITEREF anchor
]]
local function core( args )
local span_open_tag; -- holds CITEREF and css
local contributors = ''; -- chapter or contribution authors
local source = ''; -- editor/author date list that forms a CITEREF link to a full citation
local in_text = ' In ';
local result; -- the assemby of the above output
-- form the CITEREF anchor
if is_set (args.id) then
args.id = mw.uri.anchorEncode (args.id)
span_open_tag = '<span id="' .. args.id .. '" class="citation">'; -- for use when contributor name is same as source name
else
local citeref = 'CITEREF' .. table.concat (args.citeref) .. (is_set (args['anchor-year']) and args['anchor-year'] or args.year);
citeref = mw.uri.anchorEncode (citeref);
span_open_tag = '<span id="' .. citeref .. '" class="citation">';
end
--[[
form the contributors display list:
if |name-list-format=harv, display is similar to {{sfn}} and {{harv}}, 1 to 4 last names;
if |display-authors= is empty or omitted, display is similar to cs1|2: display all names in last, first order
if |display-authors=etal then displays all author names in last, first order and append et al.
if value assigned to |display-authors= is less than the number of author last names, displays the specified number of author names in last, first order followed by et al.
]]
if 'harv' ~= args.name_list_format then -- default cs1|2 style contributor list
local i = 1;
local count;
local etal = false; -- when |display-authors= is same as number of authors in contributor list
if is_set (args.display_authors) then
if 'etal' == args.display_authors:lower():gsub("[ '%.]", '') then -- the :gsub() portion makes 'etal' from a variety of 'et al.' spellings and stylings
count = #args.last; -- display all authors and ...
etal = true; -- ... append 'et al.'
else
count = tonumber (args.display_authors) or 0; -- 0 if can't be converted to a number
if 0 >= count then
args.err_msg = args.err_msg .. ' invalid ' .. code_open_tag .. '|display-authors=</code>'; -- if zero, then emit error message
end
end
if count > #args.last then
count = #args.last; -- when |display-authors= is more than the number of authors, use the number of authors
end
if count < #args.last then -- when |display-authors= is less than the number of authors
etal = true; -- append 'et al.'
end
else
count = #args.last; -- set count to display all of the authors
end
while i <= count do
if is_set (contributors) then
contributors = contributors .. '; ' .. make_name (args.last[i], args.first[i], args.link[i], args.mask[i]); -- the rest of the contributors
else
contributors = make_name (args.last[i], args.first[i], args.link[i], args.mask[i]); -- first contributor's name
end
i = i+1; -- bump the index
end
if true == etal then
contributors = contributors .. ' et al.'; -- append et al.
elseif 'yes' == args.last_author_amp then
contributors = contributors:gsub('; ([^;]+)$', ' & %1') -- replace last separator with ' & '
end
else -- do default harv- or sfn-style contributor display
if 4 <= #args.last then -- four or more contributors (first followed by et al.)
contributors = args.last[1] .. ' et al.';
elseif 3 == #args.last then -- three (display them all)
contributors = args.last[1] .. ', ' .. args.last[2] .. ' & ' .. args.last[3];
elseif 2 == #args.last then -- two (first & second)
contributors = args.last[1] .. ' & ' .. args.last[2];
elseif 1 == #args.last then -- just one (first)
contributors = args.last[1];
else
args.err_msg = args.err_msg .. ' no authors in contributor list.'; -- this code used to find holes in the list; no more
end
end
--form the source author-date list
if is_set (args.in4) and is_set (args.in3) and is_set (args.in2) and is_set (args.in1) then
source = args.in1 .. ' et al.';
elseif not is_set (args.in4) and is_set (args.in3) and is_set (args.in2) and is_set (args.in1) then
source = args.in1 .. ', ' .. args.in2 .. ' & ' .. args.in3;
elseif not is_set (args.in4) and not is_set (args.in3) and is_set (args.in2) and is_set (args.in1) then
source = args.in1 .. ' & ' .. args.in2;
elseif not is_set (args.in4) and not is_set (args.in3) and not is_set (args.in2) and is_set (args.in1) then
source = args.in1;
else
args.err_msg = args.err_msg .. ' author missing from source list.'
end
source = source .. ' ' .. args.open .. args.year .. args.close; -- add the year with or without brackets
--assemble CITEREF wikilink
local anchor_id;
local target_err_msg;
if '' ~= args.ref then
anchor_id = mw.uri.anchorEncode (args.ref)
else
anchor_id = mw.uri.anchorEncode(table.concat ({'CITEREF', args.in1, args.in2, args.in3, args.in4, args.year}));
end
target_err_msg = target_check (anchor_id, args.ignore); -- see if there is a target for this anchor_id
source = '[[#' .. anchor_id .. "|" .. source .. "]]";
--combine contribution with url to make external link
if args.url ~= '' then
args.contribution = '[' .. args.url .. ' ' .. args.contribution .. ']'; -- format external link
if args['url-access'] then
if lock_icons[args['url-access']] then
args.contribution = table.concat ({ -- add access icon markup to this item
'<span class="', -- open the opening span tag; icon classes are defined in Module:Citation/CS1/styles.css
lock_icons[args['url-access']][1], -- add the appropriate lock icon class
'" title="', -- and the title attribute
lock_icons[args['url-access']][2], -- for an appropriate tool tip
'">', -- close the opening span tag
args.contribution,
'</span>', -- and close the span
});
end
end
end
if is_set (args['anchor-year']) then
contributors = contributors .. ' (' .. args['anchor-year'] .. ')' .. args.sepc;
elseif args.sepc ~= contributors:sub(-1) and args.sepc .. ']]' ~= contributors:sub(-3) then
contributors = contributors .. args.sepc; -- add separator if not same as last character in name list (|first=John S. or et al.)
end
-- pages and other insource location
if args.p ~= '' then
args.p = args.page_sep .. args.p;
elseif args.pp ~= '' then
args.p = args.pages_sep .. args.pp; -- args.p not set so use it to hold common insource location info
end
if args.loc ~= '' then
args.p = args.p .. ', ' .. args.loc; -- add arg.loc to args.p
end
--wrap error messages in span and add help link
if is_set (args.err_msg) then
args.err_msg = '<span style="font-size:100%" class="error"> harvc:' .. args.err_msg .. ' ([[Template:Harvc|help]])</span>';
end
if ',' == args.sepc then
in_text = in_text:lower(); -- CS2 style use lower case
end
-- and put it all together
result = span_open_tag .. contributors .. ' "' .. args.contribution .. '"' .. args.sepc .. in_text .. source .. args.p .. args.ps .. args.err_msg .. target_err_msg .. '</span>';
return result;
end
--[[--------------------------< H A R V C >--------------------------------------------------------------------
Entry point from {{harvc}} template. Fetches parent frame parameters, does a bit of simple error checking
]]
local function harvc (frame)
local args = {
err_msg = '',
page_sep = ", p. ",
pages_sep = ", pp. ",
sepc = '.',
ps = '.',
open = '(', -- year brackets for source year
close = ')',
last = {},
first = {},
link = {},
mask = {},
citeref = {}
}
local pframe = frame:getParent();
args.contribution = pframe.args.c or -- chapter or contribution
pframe.args.chapter or
pframe.args.contribution or '';
args.id = pframe.args.id or '';
args.in1 = pframe.args['in'] or pframe.args.in1 or ''; -- source editor surnames; 'in' is a Lua reserved keyword
args.in2 = pframe.args.in2 or '';
args.in3 = pframe.args.in3 or '';
args.in4 = pframe.args.in4 or '';
args.display_authors = pframe.args['display-authors']; -- the number of contributor names to display; cs1|2 format includes first names
args.name_list_format = pframe.args['name-list-format']; -- when set to 'harv' display contributor list in sfn or harv style
args.last_author_amp = pframe.args['last-author-amp'] or -- yes only; |last-author-amp=no does not work (though it does in cs1|2)
pframe.args['lastauthoramp'] or '';
args.last_author_amp = args.last_author_amp:lower(); -- make it case agnostic
if is_set (pframe.args.last) or is_set (pframe.args.last1) or
is_set (pframe.args.author) or is_set (pframe.args.author1) then -- must have at least this to continue
args.last[1] = pframe.args.last or pframe.args.last1 or pframe.args.author or pframe.args.author1; -- get first contributor's last name
args.citeref[1] = args.last[1]; -- add it to the citeref
args.first[1] = pframe.args.first or pframe.args.first1; -- get first contributor's first name
args.link[1] = pframe.args['author-link'] or pframe.args['author-link1']; -- get first contributor's article link
args.mask[1] = pframe.args['author-mask'] or pframe.args['author-mask1']; -- get first contributor's article link
local i = 2; -- index for the rest of the names
while is_set (pframe.args['last'..i]) or is_set (pframe.args['author'..i]) do -- loop through pframe.args and get the rest of the names
args.last[i] = pframe.args['last'..i] or pframe.args['author'..i]; -- last names
args.first[i] = pframe.args['first'..i]; -- first names
args.link[i] = pframe.args['author-link'..i]; -- links
args.mask[i] = pframe.args['author-mask'..i]; -- masks
if 5 > i then
args.citeref[i] = args.last[i]; -- collect first four last names for CITEREF anchor
end
i = i + 1 -- bump the index
end
end
args.p = pframe.args.p or ''; -- source page number(s) or location
args.pp = pframe.args.pp or '';
args.loc = pframe.args.loc or '';
args.ref = pframe.args.ref or pframe.args.Ref or ''; -- used to match |ref=<text> in cs1|2 source template
args.ignore = 'yes' == pframe.args['ignore-err']; -- suppress false-positive 'no target' errors
if 'cs2' == pframe.args.mode then
args.ps = ''; -- set postscript character to empty string, cs2 mode
args.sepc = ','; -- set seperator character to comma, cs2 mode
end
do -- to limit scope of local temp
local temp = pframe.args.ps or pframe.args.postscript;
if is_set (temp) then
if 'none' == temp:lower() then -- if |ps=none or |postscript=none then
args.ps = ''; -- no postscript
else
args.ps = temp; -- override default postscript
end
end
end -- end of scope limit
if 'yes' == pframe.args.nb then -- if no brackets around year in link to cs1|2 template
args.open = ''; -- unset these
args.close = '';
end
args.url = pframe.args.url or -- url for chapter or contribution
pframe.args['chapter-url'] or
pframe.args['contribution-url'] or '';
args['url-access'] = pframe.args['url-access'];
args.year = pframe.args.year or ''; -- required
args['anchor-year'] = pframe.args['anchor-year'] or '';
args.err_msg = args.err_msg .. check_years (args.year, args['anchor-year']);
if not is_set (args.contribution) then
args.err_msg = args.err_msg .. ' required contribution is missing.'; -- error message if source not provided
args.contribution = args.url; -- if set it will give us linkable text
end
if args.last[1] == args.in1 and
args.last[2] == args.in2 and
args.last[3] == args.in3 and
args.last[4] == args.in4 and
not is_set (args.id) then
args.err_msg = args.err_msg .. ' required ' .. code_open_tag .. '|id=</code> parameter missing.'; -- error message if contributor and source are the same
end
return table.concat ({core (args), frame:extensionTag ('templatestyles', '', {src='Module:Citation/CS1/styles.css'})});
end
--[[--------------------------< E X P O R T E D F U N C T I O N S >------------------------------------------
]]
return {
harvc = harvc
};
1ypxaq5ebh91frs8i4iuma4e0nu8otw
801893
801892
2020-03-27T17:13:36Z
en>Trappist the monk
0
801893
Scribunto
text/plain
require('Module:No globals')
local anchor_id_list = mw.loadData ('Module:Footnotes/anchor_id_list').anchor_id_list;
local code_open_tag = '<code class="cs1-code">'; -- cs1-code class defined in Module:Citation/CS1/styles.css
local lock_icons = { --icon classes are defined in Module:Citation/CS1/styles.css
['registration'] = {'cs1-lock-registration', 'Free registration required'},
['limited'] = {'cs1-lock-limited', 'Free access subject to limited trial, subscription normally required'},
['subscription'] = {'cs1-lock-subscription', 'Paid subscription required'},
}
--[[--------------------------< T A R G E T _ C H E C K >------------------------------------------------------
look for anchor_id (CITEREF name-list and year or text from |ref=) in anchor_id_list
the 'no target' error may be suppressed with |ignore-err=yes when target cannot be found because target is inside
a template that wraps another template; 'multiple targets' error may not be suppressed
]]
local function target_check (anchor_id, ignore)
local number = anchor_id_list[anchor_id]; -- nil when anchor_id not in list; else a number
local msg;
local category;
if not number then
if ignore then
return ''; -- if ignore is true then no message, no category
end
msg = 'no target: ' .. anchor_id; -- anchor_id not found in this article
elseif 1 < number then
msg = 'multiple targets (' .. number .. '×): ' .. anchor_id; -- more than one anchor_id in this article
end
category = 0 == mw.title.getCurrentTitle().namespace and '[[Category:Harv and Sfn template errors]]' or ''; -- only categorize in article space
--use this version to show error messages
return msg and ' <span class="error harv-error" style="display: inline; font-size:100%">Harvc error: ' .. msg .. ' ([[:Category:Harv and Sfn template errors|help]])</span>' .. category or '';
--use this version to hide error messages
-- return msg and ' <span class="error harv-error" style="display: none; font-size:100%">Harvc error: ' .. msg .. ' ([[:Category:Harv and Sfn template errors|help]])</span>' .. category or '';
end
--[[--------------------------< I S _ S E T >------------------------------------------------------------------
Whether variable is set or not. A varable is set when it is not nil and not empty.
]]
local function is_set( var )
return not (var == nil or var == '');
end
--[[--------------------------< C H E C K _ Y E A R S >--------------------------------------------------------
evaluates params to see if they are one of these forms with or without lowercase letter disambiguator (same as in
Module:Footnotes):
YYYY
n.d.
nd
c. YYYY
YYYY–YYYY (separator is endash)
YYYY–YY (separator is endash)
when anchor_year present, year portion must be same as year param and must have disambiguator
returns empty string when params have correct form; error message else
]]
local function check_years (year, anchor_year)
local y, ay;
if not is_set (year) then -- year is required so return error message when not set
return ' missing ' .. code_open_tag .. '|year=</code>.';
end
local patterns = { -- allowed year patterns from Module:Footnotes (captures added here)
'^(%d%d%d%d?)%l?$', -- YYY or YYYY
'^(n%.d%.)%l?$', -- n.d.
'^(nd)%l?$', -- nd
'^(c%. %d%d%d%d?)%l?$', -- c. YYY or c. YYYY
'^(%d%d%d%d–%d%d%d%d)%l?$', -- YYYY–YYYY
'^(%d%d%d%d–%d%d)%l?$' -- YYYY–YY
}
for _, pattern in ipairs (patterns) do -- spin through the patterns
y = year:match (pattern); -- y is the year portion
if y then
break; -- when y is set, we found a match so done
end
end
if not y then
return ' invalid ' .. code_open_tag .. '|year=</code>.'; -- y not set, so year is malformed
end
if is_set (anchor_year) then -- anchor_year is optional
for _, pattern in ipairs (patterns) do -- spin through the patterns
ay = anchor_year:match (pattern); -- ay is the year portion
if ay then
break; -- when ay is set, we found a match so done
end
end
if not ay then
return ' invalid ' .. code_open_tag .. '|anchor-year</code>.'; -- ay not set, so anchor_year is malformed
end
if not anchor_year:match ('%l$') then
return ' ' .. code_open_tag .. '|anchor-year=</code> missing dab.'; -- anchor_year must end with a disambiguator letter
end
if y ~= ay then
return ' ' .. code_open_tag .. '|year=</code> / ' .. code_open_tag .. '|anchor-year=</code> mismatch.'; -- 'year' portions of year and anchor_year must be the same
end
end
return ''; -- both years are good; empty string for concatenation
end
--[[--------------------------< M A K E _ N A M E >------------------------------------------------------------
Assembles last, first, link, or mask into a displayable contributor name.
]]
local function make_name (last, first, link, mask)
local name = last;
if is_set (first) then
name = name .. ', ' .. first; -- concatenate first onto last
end
if is_set (link) then
name = '[[' .. link .. '|' .. name .. ']]'; -- form a wikilink around the name
end
if is_set (mask) then -- mask this author
if tonumber(mask) then
name = string.rep ('—', mask) -- make a string that number length of mdashes
else
name = mask; -- mask is not a number so use the mask text
end
end
return name;
end
--[[--------------------------< C O R E >----------------------------------------------------------------------
Assembles the various parts provided by the template into a properly formatted bridging citation. Adds punctuation
and text; encloses the whole within a span with id and class attributes.
This creates a CITEREF anchor from |last1= through |last4= and |year=. It also creates a CITEREF link from |in1= through
|in4= and |year=. It is presumed that the dates of contributions are the same as the date of the enclosing work.
Even though not displayed, a year parameter is still required for the CITEREF anchor
]]
local function core( args )
local span_open_tag; -- holds CITEREF and css
local contributors = ''; -- chapter or contribution authors
local source = ''; -- editor/author date list that forms a CITEREF link to a full citation
local in_text = ' In ';
local result; -- the assemby of the above output
-- form the CITEREF anchor
if is_set (args.id) then
args.id = mw.uri.anchorEncode (args.id)
span_open_tag = '<span id="' .. args.id .. '" class="citation">'; -- for use when contributor name is same as source name
else
local citeref = 'CITEREF' .. table.concat (args.citeref) .. (is_set (args['anchor-year']) and args['anchor-year'] or args.year);
citeref = mw.uri.anchorEncode (citeref);
span_open_tag = '<span id="' .. citeref .. '" class="citation">';
end
--[[
form the contributors display list:
if |name-list-format=harv, display is similar to {{sfn}} and {{harv}}, 1 to 4 last names;
if |display-authors= is empty or omitted, display is similar to cs1|2: display all names in last, first order
if |display-authors=etal then displays all author names in last, first order and append et al.
if value assigned to |display-authors= is less than the number of author last names, displays the specified number of author names in last, first order followed by et al.
]]
if 'harv' ~= args.name_list_format then -- default cs1|2 style contributor list
local i = 1;
local count;
local etal = false; -- when |display-authors= is same as number of authors in contributor list
if is_set (args.display_authors) then
if 'etal' == args.display_authors:lower():gsub("[ '%.]", '') then -- the :gsub() portion makes 'etal' from a variety of 'et al.' spellings and stylings
count = #args.last; -- display all authors and ...
etal = true; -- ... append 'et al.'
else
count = tonumber (args.display_authors) or 0; -- 0 if can't be converted to a number
if 0 >= count then
args.err_msg = args.err_msg .. ' invalid ' .. code_open_tag .. '|display-authors=</code>'; -- if zero, then emit error message
end
end
if count > #args.last then
count = #args.last; -- when |display-authors= is more than the number of authors, use the number of authors
end
if count < #args.last then -- when |display-authors= is less than the number of authors
etal = true; -- append 'et al.'
end
else
count = #args.last; -- set count to display all of the authors
end
while i <= count do
if is_set (contributors) then
contributors = contributors .. '; ' .. make_name (args.last[i], args.first[i], args.link[i], args.mask[i]); -- the rest of the contributors
else
contributors = make_name (args.last[i], args.first[i], args.link[i], args.mask[i]); -- first contributor's name
end
i = i+1; -- bump the index
end
if true == etal then
contributors = contributors .. ' et al.'; -- append et al.
elseif 'yes' == args.last_author_amp then
contributors = contributors:gsub('; ([^;]+)$', ' & %1') -- replace last separator with ' & '
end
else -- do default harv- or sfn-style contributor display
if 4 <= #args.last then -- four or more contributors (first followed by et al.)
contributors = args.last[1] .. ' et al.';
elseif 3 == #args.last then -- three (display them all)
contributors = args.last[1] .. ', ' .. args.last[2] .. ' & ' .. args.last[3];
elseif 2 == #args.last then -- two (first & second)
contributors = args.last[1] .. ' & ' .. args.last[2];
elseif 1 == #args.last then -- just one (first)
contributors = args.last[1];
else
args.err_msg = args.err_msg .. ' no authors in contributor list.'; -- this code used to find holes in the list; no more
end
end
--form the source author-date list
if is_set (args.in4) and is_set (args.in3) and is_set (args.in2) and is_set (args.in1) then
source = args.in1 .. ' et al.';
elseif not is_set (args.in4) and is_set (args.in3) and is_set (args.in2) and is_set (args.in1) then
source = args.in1 .. ', ' .. args.in2 .. ' & ' .. args.in3;
elseif not is_set (args.in4) and not is_set (args.in3) and is_set (args.in2) and is_set (args.in1) then
source = args.in1 .. ' & ' .. args.in2;
elseif not is_set (args.in4) and not is_set (args.in3) and not is_set (args.in2) and is_set (args.in1) then
source = args.in1;
else
args.err_msg = args.err_msg .. ' author missing from source list.'
end
source = source .. ' ' .. args.open .. args.year .. args.close; -- add the year with or without brackets
--assemble CITEREF wikilink
local anchor_id;
local target_err_msg;
if '' ~= args.ref then
anchor_id = mw.uri.anchorEncode (args.ref)
else
anchor_id = mw.uri.anchorEncode(table.concat ({'CITEREF', args.in1, args.in2, args.in3, args.in4, args.year}));
end
target_err_msg = target_check (anchor_id, args.ignore); -- see if there is a target for this anchor_id
source = '[[#' .. anchor_id .. "|" .. source .. "]]";
--combine contribution with url to make external link
if args.url ~= '' then
args.contribution = '[' .. args.url .. ' ' .. args.contribution .. ']'; -- format external link
if args['url-access'] then
if lock_icons[args['url-access']] then
args.contribution = table.concat ({ -- add access icon markup to this item
'<span class="', -- open the opening span tag; icon classes are defined in Module:Citation/CS1/styles.css
lock_icons[args['url-access']][1], -- add the appropriate lock icon class
'" title="', -- and the title attribute
lock_icons[args['url-access']][2], -- for an appropriate tool tip
'">', -- close the opening span tag
args.contribution,
'</span>', -- and close the span
});
end
end
end
if is_set (args['anchor-year']) then
contributors = contributors .. ' (' .. args['anchor-year'] .. ')' .. args.sepc;
elseif args.sepc ~= contributors:sub(-1) and args.sepc .. ']]' ~= contributors:sub(-3) then
contributors = contributors .. args.sepc; -- add separator if not same as last character in name list (|first=John S. or et al.)
end
-- pages and other insource location
if args.p ~= '' then
args.p = args.page_sep .. args.p;
elseif args.pp ~= '' then
args.p = args.pages_sep .. args.pp; -- args.p not set so use it to hold common insource location info
end
if args.loc ~= '' then
args.p = args.p .. ', ' .. args.loc; -- add arg.loc to args.p
end
--wrap error messages in span and add help link
if is_set (args.err_msg) then
args.err_msg = '<span style="font-size:100%" class="error"> harvc:' .. args.err_msg .. ' ([[Template:Harvc|help]])</span>';
end
if ',' == args.sepc then
in_text = in_text:lower(); -- CS2 style use lower case
end
-- and put it all together
result = span_open_tag .. contributors .. ' "' .. args.contribution .. '"' .. args.sepc .. in_text .. source .. args.p .. args.ps .. args.err_msg .. target_err_msg .. '</span>';
return result;
end
--[[--------------------------< H A R V C >--------------------------------------------------------------------
Entry point from {{harvc}} template. Fetches parent frame parameters, does a bit of simple error checking
]]
local function harvc (frame)
local args = {
err_msg = '',
page_sep = ", p. ",
pages_sep = ", pp. ",
sepc = '.',
ps = '.',
open = '(', -- year brackets for source year
close = ')',
last = {},
first = {},
link = {},
mask = {},
citeref = {}
}
local pframe = frame:getParent();
args.contribution = pframe.args.c or -- chapter or contribution
pframe.args.chapter or
pframe.args.contribution or '';
args.id = pframe.args.id or '';
args.in1 = pframe.args['in'] or pframe.args.in1 or ''; -- source editor surnames; 'in' is a Lua reserved keyword
args.in2 = pframe.args.in2 or '';
args.in3 = pframe.args.in3 or '';
args.in4 = pframe.args.in4 or '';
args.display_authors = pframe.args['display-authors']; -- the number of contributor names to display; cs1|2 format includes first names
args.name_list_format = pframe.args['name-list-format']; -- when set to 'harv' display contributor list in sfn or harv style
args.last_author_amp = pframe.args['last-author-amp'] or -- yes only; |last-author-amp=no does not work (though it does in cs1|2)
pframe.args['lastauthoramp'] or '';
args.last_author_amp = args.last_author_amp:lower(); -- make it case agnostic
if is_set (pframe.args.last) or is_set (pframe.args.last1) or
is_set (pframe.args.author) or is_set (pframe.args.author1) then -- must have at least this to continue
args.last[1] = pframe.args.last or pframe.args.last1 or pframe.args.author or pframe.args.author1; -- get first contributor's last name
args.citeref[1] = args.last[1]; -- add it to the citeref
args.first[1] = pframe.args.first or pframe.args.first1; -- get first contributor's first name
args.link[1] = pframe.args['author-link'] or pframe.args['author-link1']; -- get first contributor's article link
args.mask[1] = pframe.args['author-mask'] or pframe.args['author-mask1']; -- get first contributor's article link
local i = 2; -- index for the rest of the names
while is_set (pframe.args['last'..i]) or is_set (pframe.args['author'..i]) do -- loop through pframe.args and get the rest of the names
args.last[i] = pframe.args['last'..i] or pframe.args['author'..i]; -- last names
args.first[i] = pframe.args['first'..i]; -- first names
args.link[i] = pframe.args['author-link'..i]; -- links
args.mask[i] = pframe.args['author-mask'..i]; -- masks
if 5 > i then
args.citeref[i] = args.last[i]; -- collect first four last names for CITEREF anchor
end
i = i + 1 -- bump the index
end
end
args.p = pframe.args.p or ''; -- source page number(s) or location
args.pp = pframe.args.pp or '';
args.loc = pframe.args.loc or '';
args.ref = pframe.args.ref or pframe.args.Ref or ''; -- used to match |ref=<text> in cs1|2 source template
args.ignore = 'yes' == pframe.args['ignore-err']; -- suppress false-positive 'no target' errors
if 'cs2' == pframe.args.mode then
args.ps = ''; -- set postscript character to empty string, cs2 mode
args.sepc = ','; -- set seperator character to comma, cs2 mode
end
do -- to limit scope of local temp
local temp = pframe.args.ps or pframe.args.postscript;
if is_set (temp) then
if 'none' == temp:lower() then -- if |ps=none or |postscript=none then
args.ps = ''; -- no postscript
else
args.ps = temp; -- override default postscript
end
end
end -- end of scope limit
if 'yes' == pframe.args.nb then -- if no brackets around year in link to cs1|2 template
args.open = ''; -- unset these
args.close = '';
end
args.url = pframe.args.url or -- url for chapter or contribution
pframe.args['chapter-url'] or
pframe.args['contribution-url'] or '';
args['url-access'] = pframe.args['url-access'];
args.year = pframe.args.year or ''; -- required
args['anchor-year'] = pframe.args['anchor-year'] or '';
args.err_msg = args.err_msg .. check_years (args.year, args['anchor-year']);
if not is_set (args.contribution) then
args.err_msg = args.err_msg .. ' required contribution is missing.'; -- error message if source not provided
args.contribution = args.url; -- if set it will give us linkable text
end
if args.last[1] == args.in1 and
args.last[2] == args.in2 and
args.last[3] == args.in3 and
args.last[4] == args.in4 and
not is_set (args.id) then
args.err_msg = args.err_msg .. ' required ' .. code_open_tag .. '|id=</code> parameter missing.'; -- error message if contributor and source are the same
end
return table.concat ({core (args), frame:extensionTag ('templatestyles', '', {src='Module:Citation/CS1/styles.css'})});
end
--[[--------------------------< E X P O R T E D F U N C T I O N S >------------------------------------------
]]
return {
harvc = harvc
};
f16x0c8mom9l1bx70m0meggvxvp8u5o
801894
801893
2020-06-07T13:55:45Z
en>Trappist the monk
0
no reason to require a dab with |anchor-year=;
801894
Scribunto
text/plain
require('Module:No globals')
local anchor_id_list = mw.loadData ('Module:Footnotes/anchor_id_list').anchor_id_list;
local code_open_tag = '<code class="cs1-code">'; -- cs1-code class defined in Module:Citation/CS1/styles.css
local lock_icons = { --icon classes are defined in Module:Citation/CS1/styles.css
['registration'] = {'cs1-lock-registration', 'Free registration required'},
['limited'] = {'cs1-lock-limited', 'Free access subject to limited trial, subscription normally required'},
['subscription'] = {'cs1-lock-subscription', 'Paid subscription required'},
}
--[[--------------------------< T A R G E T _ C H E C K >------------------------------------------------------
look for anchor_id (CITEREF name-list and year or text from |ref=) in anchor_id_list
the 'no target' error may be suppressed with |ignore-err=yes when target cannot be found because target is inside
a template that wraps another template; 'multiple targets' error may not be suppressed
]]
local function target_check (anchor_id, ignore)
local number = anchor_id_list[anchor_id]; -- nil when anchor_id not in list; else a number
local msg;
local category;
if not number then
if ignore then
return ''; -- if ignore is true then no message, no category
end
msg = 'no target: ' .. anchor_id; -- anchor_id not found in this article
elseif 1 < number then
msg = 'multiple targets (' .. number .. '×): ' .. anchor_id; -- more than one anchor_id in this article
end
category = 0 == mw.title.getCurrentTitle().namespace and '[[Category:Harv and Sfn template errors]]' or ''; -- only categorize in article space
--use this version to show error messages
return msg and ' <span class="error harv-error" style="display: inline; font-size:100%">Harvc error: ' .. msg .. ' ([[:Category:Harv and Sfn template errors|help]])</span>' .. category or '';
--use this version to hide error messages
-- return msg and ' <span class="error harv-error" style="display: none; font-size:100%">Harvc error: ' .. msg .. ' ([[:Category:Harv and Sfn template errors|help]])</span>' .. category or '';
end
--[[--------------------------< I S _ S E T >------------------------------------------------------------------
Whether variable is set or not. A varable is set when it is not nil and not empty.
]]
local function is_set( var )
return not (var == nil or var == '');
end
--[[--------------------------< C H E C K _ Y E A R S >--------------------------------------------------------
evaluates params to see if they are one of these forms with or without lowercase letter disambiguator (same as in
Module:Footnotes):
YYYY
n.d.
nd
c. YYYY
YYYY–YYYY (separator is endash)
YYYY–YY (separator is endash)
when anchor_year present, year portion must be same as year param and must have disambiguator
returns empty string when params have correct form; error message else
]]
local function check_years (year, anchor_year)
local y, ay;
if not is_set (year) then -- year is required so return error message when not set
return ' missing ' .. code_open_tag .. '|year=</code>.';
end
local patterns = { -- allowed year patterns from Module:Footnotes (captures added here)
'^(%d%d%d%d?)%l?$', -- YYY or YYYY
'^(n%.d%.)%l?$', -- n.d.
'^(nd)%l?$', -- nd
'^(c%. %d%d%d%d?)%l?$', -- c. YYY or c. YYYY
'^(%d%d%d%d–%d%d%d%d)%l?$', -- YYYY–YYYY
'^(%d%d%d%d–%d%d)%l?$' -- YYYY–YY
}
for _, pattern in ipairs (patterns) do -- spin through the patterns
y = year:match (pattern); -- y is the year portion
if y then
break; -- when y is set, we found a match so done
end
end
if not y then
return ' invalid ' .. code_open_tag .. '|year=</code>.'; -- y not set, so year is malformed
end
if is_set (anchor_year) then -- anchor_year is optional
for _, pattern in ipairs (patterns) do -- spin through the patterns
ay = anchor_year:match (pattern); -- ay is the year portion
if ay then
break; -- when ay is set, we found a match so done
end
end
if not ay then
return ' invalid ' .. code_open_tag .. '|anchor-year</code>.'; -- ay not set, so anchor_year is malformed
end
-- if not anchor_year:match ('%l$') then
-- return ' ' .. code_open_tag .. '|anchor-year=</code> missing dab.'; -- anchor_year must end with a disambiguator letter
-- end
if y ~= ay then
return ' ' .. code_open_tag .. '|year=</code> / ' .. code_open_tag .. '|anchor-year=</code> mismatch.'; -- 'year' portions of year and anchor_year must be the same
end
end
return ''; -- both years are good; empty string for concatenation
end
--[[--------------------------< M A K E _ N A M E >------------------------------------------------------------
Assembles last, first, link, or mask into a displayable contributor name.
]]
local function make_name (last, first, link, mask)
local name = last;
if is_set (first) then
name = name .. ', ' .. first; -- concatenate first onto last
end
if is_set (link) then
name = '[[' .. link .. '|' .. name .. ']]'; -- form a wikilink around the name
end
if is_set (mask) then -- mask this author
if tonumber(mask) then
name = string.rep ('—', mask) -- make a string that number length of mdashes
else
name = mask; -- mask is not a number so use the mask text
end
end
return name;
end
--[[--------------------------< C O R E >----------------------------------------------------------------------
Assembles the various parts provided by the template into a properly formatted bridging citation. Adds punctuation
and text; encloses the whole within a span with id and class attributes.
This creates a CITEREF anchor from |last1= through |last4= and |year=. It also creates a CITEREF link from |in1= through
|in4= and |year=. It is presumed that the dates of contributions are the same as the date of the enclosing work.
Even though not displayed, a year parameter is still required for the CITEREF anchor
]]
local function core( args )
local span_open_tag; -- holds CITEREF and css
local contributors = ''; -- chapter or contribution authors
local source = ''; -- editor/author date list that forms a CITEREF link to a full citation
local in_text = ' In ';
local result; -- the assemby of the above output
-- form the CITEREF anchor
if is_set (args.id) then
args.id = mw.uri.anchorEncode (args.id)
span_open_tag = '<span id="' .. args.id .. '" class="citation">'; -- for use when contributor name is same as source name
else
local citeref = 'CITEREF' .. table.concat (args.citeref) .. (is_set (args['anchor-year']) and args['anchor-year'] or args.year);
citeref = mw.uri.anchorEncode (citeref);
span_open_tag = '<span id="' .. citeref .. '" class="citation">';
end
--[[
form the contributors display list:
if |name-list-format=harv, display is similar to {{sfn}} and {{harv}}, 1 to 4 last names;
if |display-authors= is empty or omitted, display is similar to cs1|2: display all names in last, first order
if |display-authors=etal then displays all author names in last, first order and append et al.
if value assigned to |display-authors= is less than the number of author last names, displays the specified number of author names in last, first order followed by et al.
]]
if 'harv' ~= args.name_list_format then -- default cs1|2 style contributor list
local i = 1;
local count;
local etal = false; -- when |display-authors= is same as number of authors in contributor list
if is_set (args.display_authors) then
if 'etal' == args.display_authors:lower():gsub("[ '%.]", '') then -- the :gsub() portion makes 'etal' from a variety of 'et al.' spellings and stylings
count = #args.last; -- display all authors and ...
etal = true; -- ... append 'et al.'
else
count = tonumber (args.display_authors) or 0; -- 0 if can't be converted to a number
if 0 >= count then
args.err_msg = args.err_msg .. ' invalid ' .. code_open_tag .. '|display-authors=</code>'; -- if zero, then emit error message
end
end
if count > #args.last then
count = #args.last; -- when |display-authors= is more than the number of authors, use the number of authors
end
if count < #args.last then -- when |display-authors= is less than the number of authors
etal = true; -- append 'et al.'
end
else
count = #args.last; -- set count to display all of the authors
end
while i <= count do
if is_set (contributors) then
contributors = contributors .. '; ' .. make_name (args.last[i], args.first[i], args.link[i], args.mask[i]); -- the rest of the contributors
else
contributors = make_name (args.last[i], args.first[i], args.link[i], args.mask[i]); -- first contributor's name
end
i = i+1; -- bump the index
end
if true == etal then
contributors = contributors .. ' et al.'; -- append et al.
elseif 'yes' == args.last_author_amp then
contributors = contributors:gsub('; ([^;]+)$', ' & %1') -- replace last separator with ' & '
end
else -- do default harv- or sfn-style contributor display
if 4 <= #args.last then -- four or more contributors (first followed by et al.)
contributors = args.last[1] .. ' et al.';
elseif 3 == #args.last then -- three (display them all)
contributors = args.last[1] .. ', ' .. args.last[2] .. ' & ' .. args.last[3];
elseif 2 == #args.last then -- two (first & second)
contributors = args.last[1] .. ' & ' .. args.last[2];
elseif 1 == #args.last then -- just one (first)
contributors = args.last[1];
else
args.err_msg = args.err_msg .. ' no authors in contributor list.'; -- this code used to find holes in the list; no more
end
end
--form the source author-date list
if is_set (args.in4) and is_set (args.in3) and is_set (args.in2) and is_set (args.in1) then
source = args.in1 .. ' et al.';
elseif not is_set (args.in4) and is_set (args.in3) and is_set (args.in2) and is_set (args.in1) then
source = args.in1 .. ', ' .. args.in2 .. ' & ' .. args.in3;
elseif not is_set (args.in4) and not is_set (args.in3) and is_set (args.in2) and is_set (args.in1) then
source = args.in1 .. ' & ' .. args.in2;
elseif not is_set (args.in4) and not is_set (args.in3) and not is_set (args.in2) and is_set (args.in1) then
source = args.in1;
else
args.err_msg = args.err_msg .. ' author missing from source list.'
end
source = source .. ' ' .. args.open .. args.year .. args.close; -- add the year with or without brackets
--assemble CITEREF wikilink
local anchor_id;
local target_err_msg;
if '' ~= args.ref then
anchor_id = mw.uri.anchorEncode (args.ref)
else
anchor_id = mw.uri.anchorEncode(table.concat ({'CITEREF', args.in1, args.in2, args.in3, args.in4, args.year}));
end
target_err_msg = target_check (anchor_id, args.ignore); -- see if there is a target for this anchor_id
source = '[[#' .. anchor_id .. "|" .. source .. "]]";
--combine contribution with url to make external link
if args.url ~= '' then
args.contribution = '[' .. args.url .. ' ' .. args.contribution .. ']'; -- format external link
if args['url-access'] then
if lock_icons[args['url-access']] then
args.contribution = table.concat ({ -- add access icon markup to this item
'<span class="', -- open the opening span tag; icon classes are defined in Module:Citation/CS1/styles.css
lock_icons[args['url-access']][1], -- add the appropriate lock icon class
'" title="', -- and the title attribute
lock_icons[args['url-access']][2], -- for an appropriate tool tip
'">', -- close the opening span tag
args.contribution,
'</span>', -- and close the span
});
end
end
end
if is_set (args['anchor-year']) then
contributors = contributors .. ' (' .. args['anchor-year'] .. ')' .. args.sepc;
elseif args.sepc ~= contributors:sub(-1) and args.sepc .. ']]' ~= contributors:sub(-3) then
contributors = contributors .. args.sepc; -- add separator if not same as last character in name list (|first=John S. or et al.)
end
-- pages and other insource location
if args.p ~= '' then
args.p = args.page_sep .. args.p;
elseif args.pp ~= '' then
args.p = args.pages_sep .. args.pp; -- args.p not set so use it to hold common insource location info
end
if args.loc ~= '' then
args.p = args.p .. ', ' .. args.loc; -- add arg.loc to args.p
end
--wrap error messages in span and add help link
if is_set (args.err_msg) then
args.err_msg = '<span style="font-size:100%" class="error"> harvc:' .. args.err_msg .. ' ([[Template:Harvc|help]])</span>';
end
if ',' == args.sepc then
in_text = in_text:lower(); -- CS2 style use lower case
end
-- and put it all together
result = span_open_tag .. contributors .. ' "' .. args.contribution .. '"' .. args.sepc .. in_text .. source .. args.p .. args.ps .. args.err_msg .. target_err_msg .. '</span>';
return result;
end
--[[--------------------------< H A R V C >--------------------------------------------------------------------
Entry point from {{harvc}} template. Fetches parent frame parameters, does a bit of simple error checking
]]
local function harvc (frame)
local args = {
err_msg = '',
page_sep = ", p. ",
pages_sep = ", pp. ",
sepc = '.',
ps = '.',
open = '(', -- year brackets for source year
close = ')',
last = {},
first = {},
link = {},
mask = {},
citeref = {}
}
local pframe = frame:getParent();
args.contribution = pframe.args.c or -- chapter or contribution
pframe.args.chapter or
pframe.args.contribution or '';
args.id = pframe.args.id or '';
args.in1 = pframe.args['in'] or pframe.args.in1 or ''; -- source editor surnames; 'in' is a Lua reserved keyword
args.in2 = pframe.args.in2 or '';
args.in3 = pframe.args.in3 or '';
args.in4 = pframe.args.in4 or '';
args.display_authors = pframe.args['display-authors']; -- the number of contributor names to display; cs1|2 format includes first names
args.name_list_format = pframe.args['name-list-format']; -- when set to 'harv' display contributor list in sfn or harv style
args.last_author_amp = pframe.args['last-author-amp'] or -- yes only; |last-author-amp=no does not work (though it does in cs1|2)
pframe.args['lastauthoramp'] or '';
args.last_author_amp = args.last_author_amp:lower(); -- make it case agnostic
if is_set (pframe.args.last) or is_set (pframe.args.last1) or
is_set (pframe.args.author) or is_set (pframe.args.author1) then -- must have at least this to continue
args.last[1] = pframe.args.last or pframe.args.last1 or pframe.args.author or pframe.args.author1; -- get first contributor's last name
args.citeref[1] = args.last[1]; -- add it to the citeref
args.first[1] = pframe.args.first or pframe.args.first1; -- get first contributor's first name
args.link[1] = pframe.args['author-link'] or pframe.args['author-link1']; -- get first contributor's article link
args.mask[1] = pframe.args['author-mask'] or pframe.args['author-mask1']; -- get first contributor's article link
local i = 2; -- index for the rest of the names
while is_set (pframe.args['last'..i]) or is_set (pframe.args['author'..i]) do -- loop through pframe.args and get the rest of the names
args.last[i] = pframe.args['last'..i] or pframe.args['author'..i]; -- last names
args.first[i] = pframe.args['first'..i]; -- first names
args.link[i] = pframe.args['author-link'..i]; -- links
args.mask[i] = pframe.args['author-mask'..i]; -- masks
if 5 > i then
args.citeref[i] = args.last[i]; -- collect first four last names for CITEREF anchor
end
i = i + 1 -- bump the index
end
end
args.p = pframe.args.p or ''; -- source page number(s) or location
args.pp = pframe.args.pp or '';
args.loc = pframe.args.loc or '';
args.ref = pframe.args.ref or pframe.args.Ref or ''; -- used to match |ref=<text> in cs1|2 source template
args.ignore = 'yes' == pframe.args['ignore-err']; -- suppress false-positive 'no target' errors
if 'cs2' == pframe.args.mode then
args.ps = ''; -- set postscript character to empty string, cs2 mode
args.sepc = ','; -- set seperator character to comma, cs2 mode
end
do -- to limit scope of local temp
local temp = pframe.args.ps or pframe.args.postscript;
if is_set (temp) then
if 'none' == temp:lower() then -- if |ps=none or |postscript=none then
args.ps = ''; -- no postscript
else
args.ps = temp; -- override default postscript
end
end
end -- end of scope limit
if 'yes' == pframe.args.nb then -- if no brackets around year in link to cs1|2 template
args.open = ''; -- unset these
args.close = '';
end
args.url = pframe.args.url or -- url for chapter or contribution
pframe.args['chapter-url'] or
pframe.args['contribution-url'] or '';
args['url-access'] = pframe.args['url-access'];
args.year = pframe.args.year or ''; -- required
args['anchor-year'] = pframe.args['anchor-year'] or '';
args.err_msg = args.err_msg .. check_years (args.year, args['anchor-year']);
if not is_set (args.contribution) then
args.err_msg = args.err_msg .. ' required contribution is missing.'; -- error message if source not provided
args.contribution = args.url; -- if set it will give us linkable text
end
if args.last[1] == args.in1 and
args.last[2] == args.in2 and
args.last[3] == args.in3 and
args.last[4] == args.in4 and
not is_set (args.id) then
args.err_msg = args.err_msg .. ' required ' .. code_open_tag .. '|id=</code> parameter missing.'; -- error message if contributor and source are the same
end
return table.concat ({core (args), frame:extensionTag ('templatestyles', '', {src='Module:Citation/CS1/styles.css'})});
end
--[[--------------------------< E X P O R T E D F U N C T I O N S >------------------------------------------
]]
return {
harvc = harvc
};
0d2sc1hhxhmmktkv2n4enz6he37hcdg
801895
801894
2020-10-24T15:39:55Z
en>Trappist the monk
0
name-list-format → name-list-style;
801895
Scribunto
text/plain
require('Module:No globals')
local anchor_id_list = mw.loadData ('Module:Footnotes/anchor_id_list').anchor_id_list;
local code_open_tag = '<code class="cs1-code">'; -- cs1-code class defined in Module:Citation/CS1/styles.css
local lock_icons = { --icon classes are defined in Module:Citation/CS1/styles.css
['registration'] = {'cs1-lock-registration', 'Free registration required'},
['limited'] = {'cs1-lock-limited', 'Free access subject to limited trial, subscription normally required'},
['subscription'] = {'cs1-lock-subscription', 'Paid subscription required'},
}
--[[--------------------------< T A R G E T _ C H E C K >------------------------------------------------------
look for anchor_id (CITEREF name-list and year or text from |ref=) in anchor_id_list
the 'no target' error may be suppressed with |ignore-err=yes when target cannot be found because target is inside
a template that wraps another template; 'multiple targets' error may not be suppressed
]]
local function target_check (anchor_id, ignore)
local number = anchor_id_list[anchor_id]; -- nil when anchor_id not in list; else a number
local msg;
local category;
if not number then
if ignore then
return ''; -- if ignore is true then no message, no category
end
msg = 'no target: ' .. anchor_id; -- anchor_id not found in this article
elseif 1 < number then
msg = 'multiple targets (' .. number .. '×): ' .. anchor_id; -- more than one anchor_id in this article
end
category = 0 == mw.title.getCurrentTitle().namespace and '[[Category:Harv and Sfn template errors]]' or ''; -- only categorize in article space
--use this version to show error messages
return msg and ' <span class="error harv-error" style="display: inline; font-size:100%">Harvc error: ' .. msg .. ' ([[:Category:Harv and Sfn template errors|help]])</span>' .. category or '';
--use this version to hide error messages
-- return msg and ' <span class="error harv-error" style="display: none; font-size:100%">Harvc error: ' .. msg .. ' ([[:Category:Harv and Sfn template errors|help]])</span>' .. category or '';
end
--[[--------------------------< I S _ S E T >------------------------------------------------------------------
Whether variable is set or not. A varable is set when it is not nil and not empty.
]]
local function is_set( var )
return not (var == nil or var == '');
end
--[[--------------------------< C H E C K _ Y E A R S >--------------------------------------------------------
evaluates params to see if they are one of these forms with or without lowercase letter disambiguator (same as in
Module:Footnotes):
YYYY
n.d.
nd
c. YYYY
YYYY–YYYY (separator is endash)
YYYY–YY (separator is endash)
when anchor_year present, year portion must be same as year param and must have disambiguator
returns empty string when params have correct form; error message else
]]
local function check_years (year, anchor_year)
local y, ay;
if not is_set (year) then -- year is required so return error message when not set
return ' missing ' .. code_open_tag .. '|year=</code>.';
end
local patterns = { -- allowed year patterns from Module:Footnotes (captures added here)
'^(%d%d%d%d?)%l?$', -- YYY or YYYY
'^(n%.d%.)%l?$', -- n.d.
'^(nd)%l?$', -- nd
'^(c%. %d%d%d%d?)%l?$', -- c. YYY or c. YYYY
'^(%d%d%d%d–%d%d%d%d)%l?$', -- YYYY–YYYY
'^(%d%d%d%d–%d%d)%l?$' -- YYYY–YY
}
for _, pattern in ipairs (patterns) do -- spin through the patterns
y = year:match (pattern); -- y is the year portion
if y then
break; -- when y is set, we found a match so done
end
end
if not y then
return ' invalid ' .. code_open_tag .. '|year=</code>.'; -- y not set, so year is malformed
end
if is_set (anchor_year) then -- anchor_year is optional
for _, pattern in ipairs (patterns) do -- spin through the patterns
ay = anchor_year:match (pattern); -- ay is the year portion
if ay then
break; -- when ay is set, we found a match so done
end
end
if not ay then
return ' invalid ' .. code_open_tag .. '|anchor-year</code>.'; -- ay not set, so anchor_year is malformed
end
-- if not anchor_year:match ('%l$') then
-- return ' ' .. code_open_tag .. '|anchor-year=</code> missing dab.'; -- anchor_year must end with a disambiguator letter
-- end
if y ~= ay then
return ' ' .. code_open_tag .. '|year=</code> / ' .. code_open_tag .. '|anchor-year=</code> mismatch.'; -- 'year' portions of year and anchor_year must be the same
end
end
return ''; -- both years are good; empty string for concatenation
end
--[[--------------------------< M A K E _ N A M E >------------------------------------------------------------
Assembles last, first, link, or mask into a displayable contributor name.
]]
local function make_name (last, first, link, mask)
local name = last;
if is_set (first) then
name = name .. ', ' .. first; -- concatenate first onto last
end
if is_set (link) then
name = '[[' .. link .. '|' .. name .. ']]'; -- form a wikilink around the name
end
if is_set (mask) then -- mask this author
if tonumber(mask) then
name = string.rep ('—', mask) -- make a string that number length of mdashes
else
name = mask; -- mask is not a number so use the mask text
end
end
return name;
end
--[[--------------------------< C O R E >----------------------------------------------------------------------
Assembles the various parts provided by the template into a properly formatted bridging citation. Adds punctuation
and text; encloses the whole within a span with id and class attributes.
This creates a CITEREF anchor from |last1= through |last4= and |year=. It also creates a CITEREF link from |in1= through
|in4= and |year=. It is presumed that the dates of contributions are the same as the date of the enclosing work.
Even though not displayed, a year parameter is still required for the CITEREF anchor
]]
local function core( args )
local span_open_tag; -- holds CITEREF and css
local contributors = ''; -- chapter or contribution authors
local source = ''; -- editor/author date list that forms a CITEREF link to a full citation
local in_text = ' In ';
local result; -- the assemby of the above output
-- form the CITEREF anchor
if is_set (args.id) then
args.id = mw.uri.anchorEncode (args.id)
span_open_tag = '<span id="' .. args.id .. '" class="citation">'; -- for use when contributor name is same as source name
else
local citeref = 'CITEREF' .. table.concat (args.citeref) .. (is_set (args['anchor-year']) and args['anchor-year'] or args.year);
citeref = mw.uri.anchorEncode (citeref);
span_open_tag = '<span id="' .. citeref .. '" class="citation">';
end
--[[
form the contributors display list:
if |name-list-style=harv, display is similar to {{sfn}} and {{harv}}, 1 to 4 last names;
if |display-authors= is empty or omitted, display is similar to cs1|2: display all names in last, first order
if |display-authors=etal then displays all author names in last, first order and append et al.
if value assigned to |display-authors= is less than the number of author last names, displays the specified number of author names in last, first order followed by et al.
]]
if 'harv' ~= args.name_list_style then -- default cs1|2 style contributor list
local i = 1;
local count;
local etal = false; -- when |display-authors= is same as number of authors in contributor list
if is_set (args.display_authors) then
if 'etal' == args.display_authors:lower():gsub("[ '%.]", '') then -- the :gsub() portion makes 'etal' from a variety of 'et al.' spellings and stylings
count = #args.last; -- display all authors and ...
etal = true; -- ... append 'et al.'
else
count = tonumber (args.display_authors) or 0; -- 0 if can't be converted to a number
if 0 >= count then
args.err_msg = args.err_msg .. ' invalid ' .. code_open_tag .. '|display-authors=</code>'; -- if zero, then emit error message
end
end
if count > #args.last then
count = #args.last; -- when |display-authors= is more than the number of authors, use the number of authors
end
if count < #args.last then -- when |display-authors= is less than the number of authors
etal = true; -- append 'et al.'
end
else
count = #args.last; -- set count to display all of the authors
end
while i <= count do
if is_set (contributors) then
contributors = contributors .. '; ' .. make_name (args.last[i], args.first[i], args.link[i], args.mask[i]); -- the rest of the contributors
else
contributors = make_name (args.last[i], args.first[i], args.link[i], args.mask[i]); -- first contributor's name
end
i = i+1; -- bump the index
end
if true == etal then
contributors = contributors .. ' et al.'; -- append et al.
elseif 'yes' == args.last_author_amp then
contributors = contributors:gsub('; ([^;]+)$', ' & %1') -- replace last separator with ' & '
end
else -- do default harv- or sfn-style contributor display
if 4 <= #args.last then -- four or more contributors (first followed by et al.)
contributors = args.last[1] .. ' et al.';
elseif 3 == #args.last then -- three (display them all)
contributors = args.last[1] .. ', ' .. args.last[2] .. ' & ' .. args.last[3];
elseif 2 == #args.last then -- two (first & second)
contributors = args.last[1] .. ' & ' .. args.last[2];
elseif 1 == #args.last then -- just one (first)
contributors = args.last[1];
else
args.err_msg = args.err_msg .. ' no authors in contributor list.'; -- this code used to find holes in the list; no more
end
end
--form the source author-date list
if is_set (args.in4) and is_set (args.in3) and is_set (args.in2) and is_set (args.in1) then
source = args.in1 .. ' et al.';
elseif not is_set (args.in4) and is_set (args.in3) and is_set (args.in2) and is_set (args.in1) then
source = args.in1 .. ', ' .. args.in2 .. ' & ' .. args.in3;
elseif not is_set (args.in4) and not is_set (args.in3) and is_set (args.in2) and is_set (args.in1) then
source = args.in1 .. ' & ' .. args.in2;
elseif not is_set (args.in4) and not is_set (args.in3) and not is_set (args.in2) and is_set (args.in1) then
source = args.in1;
else
args.err_msg = args.err_msg .. ' author missing from source list.'
end
source = source .. ' ' .. args.open .. args.year .. args.close; -- add the year with or without brackets
--assemble CITEREF wikilink
local anchor_id;
local target_err_msg;
if '' ~= args.ref then
anchor_id = mw.uri.anchorEncode (args.ref)
else
anchor_id = mw.uri.anchorEncode(table.concat ({'CITEREF', args.in1, args.in2, args.in3, args.in4, args.year}));
end
target_err_msg = target_check (anchor_id, args.ignore); -- see if there is a target for this anchor_id
source = '[[#' .. anchor_id .. "|" .. source .. "]]";
--combine contribution with url to make external link
if args.url ~= '' then
args.contribution = '[' .. args.url .. ' ' .. args.contribution .. ']'; -- format external link
if args['url-access'] then
if lock_icons[args['url-access']] then
args.contribution = table.concat ({ -- add access icon markup to this item
'<span class="', -- open the opening span tag; icon classes are defined in Module:Citation/CS1/styles.css
lock_icons[args['url-access']][1], -- add the appropriate lock icon class
'" title="', -- and the title attribute
lock_icons[args['url-access']][2], -- for an appropriate tool tip
'">', -- close the opening span tag
args.contribution,
'</span>', -- and close the span
});
end
end
end
if is_set (args['anchor-year']) then
contributors = contributors .. ' (' .. args['anchor-year'] .. ')' .. args.sepc;
elseif args.sepc ~= contributors:sub(-1) and args.sepc .. ']]' ~= contributors:sub(-3) then
contributors = contributors .. args.sepc; -- add separator if not same as last character in name list (|first=John S. or et al.)
end
-- pages and other insource location
if args.p ~= '' then
args.p = args.page_sep .. args.p;
elseif args.pp ~= '' then
args.p = args.pages_sep .. args.pp; -- args.p not set so use it to hold common insource location info
end
if args.loc ~= '' then
args.p = args.p .. ', ' .. args.loc; -- add arg.loc to args.p
end
--wrap error messages in span and add help link
if is_set (args.err_msg) then
args.err_msg = '<span style="font-size:100%" class="error"> harvc:' .. args.err_msg .. ' ([[Template:Harvc|help]])</span>';
end
if ',' == args.sepc then
in_text = in_text:lower(); -- CS2 style use lower case
end
-- and put it all together
result = span_open_tag .. contributors .. ' "' .. args.contribution .. '"' .. args.sepc .. in_text .. source .. args.p .. args.ps .. args.err_msg .. target_err_msg .. '</span>';
return result;
end
--[[--------------------------< H A R V C >--------------------------------------------------------------------
Entry point from {{harvc}} template. Fetches parent frame parameters, does a bit of simple error checking
]]
local function harvc (frame)
local args = {
err_msg = '',
page_sep = ", p. ",
pages_sep = ", pp. ",
sepc = '.',
ps = '.',
open = '(', -- year brackets for source year
close = ')',
last = {},
first = {},
link = {},
mask = {},
citeref = {}
}
local pframe = frame:getParent();
args.contribution = pframe.args.c or -- chapter or contribution
pframe.args.chapter or
pframe.args.contribution or '';
args.id = pframe.args.id or '';
args.in1 = pframe.args['in'] or pframe.args.in1 or ''; -- source editor surnames; 'in' is a Lua reserved keyword
args.in2 = pframe.args.in2 or '';
args.in3 = pframe.args.in3 or '';
args.in4 = pframe.args.in4 or '';
args.display_authors = pframe.args['display-authors']; -- the number of contributor names to display; cs1|2 format includes first names
args.name_list_style = pframe.args['name-list-style'] or -- when set to 'harv' display contributor list in sfn or harv style
pframe.args['name-list-format']; -- TODO: remove name-list-format
args.last_author_amp = pframe.args['last-author-amp'] or -- yes only; |last-author-amp=no does not work (though it does in cs1|2)
pframe.args['lastauthoramp'] or '';
args.last_author_amp = args.last_author_amp:lower(); -- make it case agnostic
if is_set (pframe.args.last) or is_set (pframe.args.last1) or
is_set (pframe.args.author) or is_set (pframe.args.author1) then -- must have at least this to continue
args.last[1] = pframe.args.last or pframe.args.last1 or pframe.args.author or pframe.args.author1; -- get first contributor's last name
args.citeref[1] = args.last[1]; -- add it to the citeref
args.first[1] = pframe.args.first or pframe.args.first1; -- get first contributor's first name
args.link[1] = pframe.args['author-link'] or pframe.args['author-link1']; -- get first contributor's article link
args.mask[1] = pframe.args['author-mask'] or pframe.args['author-mask1']; -- get first contributor's article link
local i = 2; -- index for the rest of the names
while is_set (pframe.args['last'..i]) or is_set (pframe.args['author'..i]) do -- loop through pframe.args and get the rest of the names
args.last[i] = pframe.args['last'..i] or pframe.args['author'..i]; -- last names
args.first[i] = pframe.args['first'..i]; -- first names
args.link[i] = pframe.args['author-link'..i]; -- links
args.mask[i] = pframe.args['author-mask'..i]; -- masks
if 5 > i then
args.citeref[i] = args.last[i]; -- collect first four last names for CITEREF anchor
end
i = i + 1 -- bump the index
end
end
args.p = pframe.args.p or ''; -- source page number(s) or location
args.pp = pframe.args.pp or '';
args.loc = pframe.args.loc or '';
args.ref = pframe.args.ref or pframe.args.Ref or ''; -- used to match |ref=<text> in cs1|2 source template
args.ignore = 'yes' == pframe.args['ignore-err']; -- suppress false-positive 'no target' errors
if 'cs2' == pframe.args.mode then
args.ps = ''; -- set postscript character to empty string, cs2 mode
args.sepc = ','; -- set seperator character to comma, cs2 mode
end
do -- to limit scope of local temp
local temp = pframe.args.ps or pframe.args.postscript;
if is_set (temp) then
if 'none' == temp:lower() then -- if |ps=none or |postscript=none then
args.ps = ''; -- no postscript
else
args.ps = temp; -- override default postscript
end
end
end -- end of scope limit
if 'yes' == pframe.args.nb then -- if no brackets around year in link to cs1|2 template
args.open = ''; -- unset these
args.close = '';
end
args.url = pframe.args.url or -- url for chapter or contribution
pframe.args['chapter-url'] or
pframe.args['contribution-url'] or '';
args['url-access'] = pframe.args['url-access'];
args.year = pframe.args.year or ''; -- required
args['anchor-year'] = pframe.args['anchor-year'] or '';
args.err_msg = args.err_msg .. check_years (args.year, args['anchor-year']);
if not is_set (args.contribution) then
args.err_msg = args.err_msg .. ' required contribution is missing.'; -- error message if source not provided
args.contribution = args.url; -- if set it will give us linkable text
end
if args.last[1] == args.in1 and
args.last[2] == args.in2 and
args.last[3] == args.in3 and
args.last[4] == args.in4 and
not is_set (args.id) then
args.err_msg = args.err_msg .. ' required ' .. code_open_tag .. '|id=</code> parameter missing.'; -- error message if contributor and source are the same
end
return table.concat ({core (args), frame:extensionTag ('templatestyles', '', {src='Module:Citation/CS1/styles.css'})});
end
--[[--------------------------< E X P O R T E D F U N C T I O N S >------------------------------------------
]]
return {
harvc = harvc
};
ixwo0nbi3mquv0z8ux9ysszvc38msle
801896
801895
2020-10-24T17:24:13Z
en>Trappist the monk
0
|last-author-amp=yes → |name-list-style=amp;
801896
Scribunto
text/plain
require('Module:No globals')
local anchor_id_list = mw.loadData ('Module:Footnotes/anchor_id_list').anchor_id_list;
local code_open_tag = '<code class="cs1-code">'; -- cs1-code class defined in Module:Citation/CS1/styles.css
local lock_icons = { --icon classes are defined in Module:Citation/CS1/styles.css
['registration'] = {'cs1-lock-registration', 'Free registration required'},
['limited'] = {'cs1-lock-limited', 'Free access subject to limited trial, subscription normally required'},
['subscription'] = {'cs1-lock-subscription', 'Paid subscription required'},
}
--[[--------------------------< T A R G E T _ C H E C K >------------------------------------------------------
look for anchor_id (CITEREF name-list and year or text from |ref=) in anchor_id_list
the 'no target' error may be suppressed with |ignore-err=yes when target cannot be found because target is inside
a template that wraps another template; 'multiple targets' error may not be suppressed
]]
local function target_check (anchor_id, ignore)
local number = anchor_id_list[anchor_id]; -- nil when anchor_id not in list; else a number
local msg;
local category;
if not number then
if ignore then
return ''; -- if ignore is true then no message, no category
end
msg = 'no target: ' .. anchor_id; -- anchor_id not found in this article
elseif 1 < number then
msg = 'multiple targets (' .. number .. '×): ' .. anchor_id; -- more than one anchor_id in this article
end
category = 0 == mw.title.getCurrentTitle().namespace and '[[Category:Harv and Sfn template errors]]' or ''; -- only categorize in article space
--use this version to show error messages
return msg and ' <span class="error harv-error" style="display: inline; font-size:100%">Harvc error: ' .. msg .. ' ([[:Category:Harv and Sfn template errors|help]])</span>' .. category or '';
--use this version to hide error messages
-- return msg and ' <span class="error harv-error" style="display: none; font-size:100%">Harvc error: ' .. msg .. ' ([[:Category:Harv and Sfn template errors|help]])</span>' .. category or '';
end
--[[--------------------------< I S _ S E T >------------------------------------------------------------------
Whether variable is set or not. A varable is set when it is not nil and not empty.
]]
local function is_set( var )
return not (var == nil or var == '');
end
--[[--------------------------< C H E C K _ Y E A R S >--------------------------------------------------------
evaluates params to see if they are one of these forms with or without lowercase letter disambiguator (same as in
Module:Footnotes):
YYYY
n.d.
nd
c. YYYY
YYYY–YYYY (separator is endash)
YYYY–YY (separator is endash)
when anchor_year present, year portion must be same as year param and must have disambiguator
returns empty string when params have correct form; error message else
]]
local function check_years (year, anchor_year)
local y, ay;
if not is_set (year) then -- year is required so return error message when not set
return ' missing ' .. code_open_tag .. '|year=</code>.';
end
local patterns = { -- allowed year patterns from Module:Footnotes (captures added here)
'^(%d%d%d%d?)%l?$', -- YYY or YYYY
'^(n%.d%.)%l?$', -- n.d.
'^(nd)%l?$', -- nd
'^(c%. %d%d%d%d?)%l?$', -- c. YYY or c. YYYY
'^(%d%d%d%d–%d%d%d%d)%l?$', -- YYYY–YYYY
'^(%d%d%d%d–%d%d)%l?$' -- YYYY–YY
}
for _, pattern in ipairs (patterns) do -- spin through the patterns
y = year:match (pattern); -- y is the year portion
if y then
break; -- when y is set, we found a match so done
end
end
if not y then
return ' invalid ' .. code_open_tag .. '|year=</code>.'; -- y not set, so year is malformed
end
if is_set (anchor_year) then -- anchor_year is optional
for _, pattern in ipairs (patterns) do -- spin through the patterns
ay = anchor_year:match (pattern); -- ay is the year portion
if ay then
break; -- when ay is set, we found a match so done
end
end
if not ay then
return ' invalid ' .. code_open_tag .. '|anchor-year</code>.'; -- ay not set, so anchor_year is malformed
end
-- if not anchor_year:match ('%l$') then
-- return ' ' .. code_open_tag .. '|anchor-year=</code> missing dab.'; -- anchor_year must end with a disambiguator letter
-- end
if y ~= ay then
return ' ' .. code_open_tag .. '|year=</code> / ' .. code_open_tag .. '|anchor-year=</code> mismatch.'; -- 'year' portions of year and anchor_year must be the same
end
end
return ''; -- both years are good; empty string for concatenation
end
--[[--------------------------< M A K E _ N A M E >------------------------------------------------------------
Assembles last, first, link, or mask into a displayable contributor name.
]]
local function make_name (last, first, link, mask)
local name = last;
if is_set (first) then
name = name .. ', ' .. first; -- concatenate first onto last
end
if is_set (link) then
name = '[[' .. link .. '|' .. name .. ']]'; -- form a wikilink around the name
end
if is_set (mask) then -- mask this author
if tonumber(mask) then
name = string.rep ('—', mask) -- make a string that number length of mdashes
else
name = mask; -- mask is not a number so use the mask text
end
end
return name;
end
--[[--------------------------< C O R E >----------------------------------------------------------------------
Assembles the various parts provided by the template into a properly formatted bridging citation. Adds punctuation
and text; encloses the whole within a span with id and class attributes.
This creates a CITEREF anchor from |last1= through |last4= and |year=. It also creates a CITEREF link from |in1= through
|in4= and |year=. It is presumed that the dates of contributions are the same as the date of the enclosing work.
Even though not displayed, a year parameter is still required for the CITEREF anchor
]]
local function core( args )
local span_open_tag; -- holds CITEREF and css
local contributors = ''; -- chapter or contribution authors
local source = ''; -- editor/author date list that forms a CITEREF link to a full citation
local in_text = ' In ';
local result; -- the assemby of the above output
-- form the CITEREF anchor
if is_set (args.id) then
args.id = mw.uri.anchorEncode (args.id)
span_open_tag = '<span id="' .. args.id .. '" class="citation">'; -- for use when contributor name is same as source name
else
local citeref = 'CITEREF' .. table.concat (args.citeref) .. (is_set (args['anchor-year']) and args['anchor-year'] or args.year);
citeref = mw.uri.anchorEncode (citeref);
span_open_tag = '<span id="' .. citeref .. '" class="citation">';
end
--[[
form the contributors display list:
if |name-list-style=harv, display is similar to {{sfn}} and {{harv}}, 1 to 4 last names;
if |display-authors= is empty or omitted, display is similar to cs1|2: display all names in last, first order
if |display-authors=etal then displays all author names in last, first order and append et al.
if value assigned to |display-authors= is less than the number of author last names, displays the specified number of author names in last, first order followed by et al.
]]
if 'harv' ~= args.name_list_style then -- default cs1|2 style contributor list
local i = 1;
local count;
local etal = false; -- when |display-authors= is same as number of authors in contributor list
if is_set (args.display_authors) then
if 'etal' == args.display_authors:lower():gsub("[ '%.]", '') then -- the :gsub() portion makes 'etal' from a variety of 'et al.' spellings and stylings
count = #args.last; -- display all authors and ...
etal = true; -- ... append 'et al.'
else
count = tonumber (args.display_authors) or 0; -- 0 if can't be converted to a number
if 0 >= count then
args.err_msg = args.err_msg .. ' invalid ' .. code_open_tag .. '|display-authors=</code>'; -- if zero, then emit error message
end
end
if count > #args.last then
count = #args.last; -- when |display-authors= is more than the number of authors, use the number of authors
end
if count < #args.last then -- when |display-authors= is less than the number of authors
etal = true; -- append 'et al.'
end
else
count = #args.last; -- set count to display all of the authors
end
while i <= count do
if is_set (contributors) then
contributors = contributors .. '; ' .. make_name (args.last[i], args.first[i], args.link[i], args.mask[i]); -- the rest of the contributors
else
contributors = make_name (args.last[i], args.first[i], args.link[i], args.mask[i]); -- first contributor's name
end
i = i+1; -- bump the index
end
if true == etal then
contributors = contributors .. ' et al.'; -- append et al.
elseif 'amp' == args.name_list_style then
contributors = contributors:gsub('; ([^;]+)$', ' & %1') -- replace last separator with ' & '
end
else -- do default harv- or sfn-style contributor display
if 4 <= #args.last then -- four or more contributors (first followed by et al.)
contributors = args.last[1] .. ' et al.';
elseif 3 == #args.last then -- three (display them all)
contributors = args.last[1] .. ', ' .. args.last[2] .. ' & ' .. args.last[3];
elseif 2 == #args.last then -- two (first & second)
contributors = args.last[1] .. ' & ' .. args.last[2];
elseif 1 == #args.last then -- just one (first)
contributors = args.last[1];
else
args.err_msg = args.err_msg .. ' no authors in contributor list.'; -- this code used to find holes in the list; no more
end
end
--form the source author-date list
if is_set (args.in4) and is_set (args.in3) and is_set (args.in2) and is_set (args.in1) then
source = args.in1 .. ' et al.';
elseif not is_set (args.in4) and is_set (args.in3) and is_set (args.in2) and is_set (args.in1) then
source = args.in1 .. ', ' .. args.in2 .. ' & ' .. args.in3;
elseif not is_set (args.in4) and not is_set (args.in3) and is_set (args.in2) and is_set (args.in1) then
source = args.in1 .. ' & ' .. args.in2;
elseif not is_set (args.in4) and not is_set (args.in3) and not is_set (args.in2) and is_set (args.in1) then
source = args.in1;
else
args.err_msg = args.err_msg .. ' author missing from source list.'
end
source = source .. ' ' .. args.open .. args.year .. args.close; -- add the year with or without brackets
--assemble CITEREF wikilink
local anchor_id;
local target_err_msg;
if '' ~= args.ref then
anchor_id = mw.uri.anchorEncode (args.ref)
else
anchor_id = mw.uri.anchorEncode(table.concat ({'CITEREF', args.in1, args.in2, args.in3, args.in4, args.year}));
end
target_err_msg = target_check (anchor_id, args.ignore); -- see if there is a target for this anchor_id
source = '[[#' .. anchor_id .. "|" .. source .. "]]";
--combine contribution with url to make external link
if args.url ~= '' then
args.contribution = '[' .. args.url .. ' ' .. args.contribution .. ']'; -- format external link
if args['url-access'] then
if lock_icons[args['url-access']] then
args.contribution = table.concat ({ -- add access icon markup to this item
'<span class="', -- open the opening span tag; icon classes are defined in Module:Citation/CS1/styles.css
lock_icons[args['url-access']][1], -- add the appropriate lock icon class
'" title="', -- and the title attribute
lock_icons[args['url-access']][2], -- for an appropriate tool tip
'">', -- close the opening span tag
args.contribution,
'</span>', -- and close the span
});
end
end
end
if is_set (args['anchor-year']) then
contributors = contributors .. ' (' .. args['anchor-year'] .. ')' .. args.sepc;
elseif args.sepc ~= contributors:sub(-1) and args.sepc .. ']]' ~= contributors:sub(-3) then
contributors = contributors .. args.sepc; -- add separator if not same as last character in name list (|first=John S. or et al.)
end
-- pages and other insource location
if args.p ~= '' then
args.p = args.page_sep .. args.p;
elseif args.pp ~= '' then
args.p = args.pages_sep .. args.pp; -- args.p not set so use it to hold common insource location info
end
if args.loc ~= '' then
args.p = args.p .. ', ' .. args.loc; -- add arg.loc to args.p
end
--wrap error messages in span and add help link
if is_set (args.err_msg) then
args.err_msg = '<span style="font-size:100%" class="error"> harvc:' .. args.err_msg .. ' ([[Template:Harvc|help]])</span>';
end
if ',' == args.sepc then
in_text = in_text:lower(); -- CS2 style use lower case
end
-- and put it all together
result = span_open_tag .. contributors .. ' "' .. args.contribution .. '"' .. args.sepc .. in_text .. source .. args.p .. args.ps .. args.err_msg .. target_err_msg .. '</span>';
return result;
end
--[[--------------------------< H A R V C >--------------------------------------------------------------------
Entry point from {{harvc}} template. Fetches parent frame parameters, does a bit of simple error checking
]]
local function harvc (frame)
local args = {
err_msg = '',
page_sep = ", p. ",
pages_sep = ", pp. ",
sepc = '.',
ps = '.',
open = '(', -- year brackets for source year
close = ')',
last = {},
first = {},
link = {},
mask = {},
citeref = {}
}
local pframe = frame:getParent();
args.contribution = pframe.args.c or -- chapter or contribution
pframe.args.chapter or
pframe.args.contribution or '';
args.id = pframe.args.id or '';
args.in1 = pframe.args['in'] or pframe.args.in1 or ''; -- source editor surnames; 'in' is a Lua reserved keyword
args.in2 = pframe.args.in2 or '';
args.in3 = pframe.args.in3 or '';
args.in4 = pframe.args.in4 or '';
args.display_authors = pframe.args['display-authors']; -- the number of contributor names to display; cs1|2 format includes first names
args.name_list_style = pframe.args['name-list-style'] or -- when set to 'harv' display contributor list in sfn or harv style
pframe.args['name-list-format']; -- TODO: remove name-list-format
args.name_list_style = args.name_list_style:lower(); -- make it case agnostic
if is_set (pframe.args.last) or is_set (pframe.args.last1) or
is_set (pframe.args.author) or is_set (pframe.args.author1) then -- must have at least this to continue
args.last[1] = pframe.args.last or pframe.args.last1 or pframe.args.author or pframe.args.author1; -- get first contributor's last name
args.citeref[1] = args.last[1]; -- add it to the citeref
args.first[1] = pframe.args.first or pframe.args.first1; -- get first contributor's first name
args.link[1] = pframe.args['author-link'] or pframe.args['author-link1']; -- get first contributor's article link
args.mask[1] = pframe.args['author-mask'] or pframe.args['author-mask1']; -- get first contributor's article link
local i = 2; -- index for the rest of the names
while is_set (pframe.args['last'..i]) or is_set (pframe.args['author'..i]) do -- loop through pframe.args and get the rest of the names
args.last[i] = pframe.args['last'..i] or pframe.args['author'..i]; -- last names
args.first[i] = pframe.args['first'..i]; -- first names
args.link[i] = pframe.args['author-link'..i]; -- links
args.mask[i] = pframe.args['author-mask'..i]; -- masks
if 5 > i then
args.citeref[i] = args.last[i]; -- collect first four last names for CITEREF anchor
end
i = i + 1 -- bump the index
end
end
args.p = pframe.args.p or ''; -- source page number(s) or location
args.pp = pframe.args.pp or '';
args.loc = pframe.args.loc or '';
args.ref = pframe.args.ref or pframe.args.Ref or ''; -- used to match |ref=<text> in cs1|2 source template
args.ignore = 'yes' == pframe.args['ignore-err']; -- suppress false-positive 'no target' errors
if 'cs2' == pframe.args.mode then
args.ps = ''; -- set postscript character to empty string, cs2 mode
args.sepc = ','; -- set seperator character to comma, cs2 mode
end
do -- to limit scope of local temp
local temp = pframe.args.ps or pframe.args.postscript;
if is_set (temp) then
if 'none' == temp:lower() then -- if |ps=none or |postscript=none then
args.ps = ''; -- no postscript
else
args.ps = temp; -- override default postscript
end
end
end -- end of scope limit
if 'yes' == pframe.args.nb then -- if no brackets around year in link to cs1|2 template
args.open = ''; -- unset these
args.close = '';
end
args.url = pframe.args.url or -- url for chapter or contribution
pframe.args['chapter-url'] or
pframe.args['contribution-url'] or '';
args['url-access'] = pframe.args['url-access'];
args.year = pframe.args.year or ''; -- required
args['anchor-year'] = pframe.args['anchor-year'] or '';
args.err_msg = args.err_msg .. check_years (args.year, args['anchor-year']);
if not is_set (args.contribution) then
args.err_msg = args.err_msg .. ' required contribution is missing.'; -- error message if source not provided
args.contribution = args.url; -- if set it will give us linkable text
end
if args.last[1] == args.in1 and
args.last[2] == args.in2 and
args.last[3] == args.in3 and
args.last[4] == args.in4 and
not is_set (args.id) then
args.err_msg = args.err_msg .. ' required ' .. code_open_tag .. '|id=</code> parameter missing.'; -- error message if contributor and source are the same
end
return table.concat ({core (args), frame:extensionTag ('templatestyles', '', {src='Module:Citation/CS1/styles.css'})});
end
--[[--------------------------< E X P O R T E D F U N C T I O N S >------------------------------------------
]]
return {
harvc = harvc
};
1dufohtn9cpjw29cyqc2p7422prgwbn
801897
801896
2020-10-24T18:17:30Z
en>Trappist the monk
0
801897
Scribunto
text/plain
require('Module:No globals')
local anchor_id_list = mw.loadData ('Module:Footnotes/anchor_id_list').anchor_id_list;
local code_open_tag = '<code class="cs1-code">'; -- cs1-code class defined in Module:Citation/CS1/styles.css
local lock_icons = { --icon classes are defined in Module:Citation/CS1/styles.css
['registration'] = {'cs1-lock-registration', 'Free registration required'},
['limited'] = {'cs1-lock-limited', 'Free access subject to limited trial, subscription normally required'},
['subscription'] = {'cs1-lock-subscription', 'Paid subscription required'},
}
--[[--------------------------< T A R G E T _ C H E C K >------------------------------------------------------
look for anchor_id (CITEREF name-list and year or text from |ref=) in anchor_id_list
the 'no target' error may be suppressed with |ignore-err=yes when target cannot be found because target is inside
a template that wraps another template; 'multiple targets' error may not be suppressed
]]
local function target_check (anchor_id, ignore)
local number = anchor_id_list[anchor_id]; -- nil when anchor_id not in list; else a number
local msg;
local category;
if not number then
if ignore then
return ''; -- if ignore is true then no message, no category
end
msg = 'no target: ' .. anchor_id; -- anchor_id not found in this article
elseif 1 < number then
msg = 'multiple targets (' .. number .. '×): ' .. anchor_id; -- more than one anchor_id in this article
end
category = 0 == mw.title.getCurrentTitle().namespace and '[[Category:Harv and Sfn template errors]]' or ''; -- only categorize in article space
--use this version to show error messages
return msg and ' <span class="error harv-error" style="display: inline; font-size:100%">Harvc error: ' .. msg .. ' ([[:Category:Harv and Sfn template errors|help]])</span>' .. category or '';
--use this version to hide error messages
-- return msg and ' <span class="error harv-error" style="display: none; font-size:100%">Harvc error: ' .. msg .. ' ([[:Category:Harv and Sfn template errors|help]])</span>' .. category or '';
end
--[[--------------------------< I S _ S E T >------------------------------------------------------------------
Whether variable is set or not. A varable is set when it is not nil and not empty.
]]
local function is_set( var )
return not (var == nil or var == '');
end
--[[--------------------------< C H E C K _ Y E A R S >--------------------------------------------------------
evaluates params to see if they are one of these forms with or without lowercase letter disambiguator (same as in
Module:Footnotes):
YYYY
n.d.
nd
c. YYYY
YYYY–YYYY (separator is endash)
YYYY–YY (separator is endash)
when anchor_year present, year portion must be same as year param and must have disambiguator
returns empty string when params have correct form; error message else
]]
local function check_years (year, anchor_year)
local y, ay;
if not is_set (year) then -- year is required so return error message when not set
return ' missing ' .. code_open_tag .. '|year=</code>.';
end
local patterns = { -- allowed year patterns from Module:Footnotes (captures added here)
'^(%d%d%d%d?)%l?$', -- YYY or YYYY
'^(n%.d%.)%l?$', -- n.d.
'^(nd)%l?$', -- nd
'^(c%. %d%d%d%d?)%l?$', -- c. YYY or c. YYYY
'^(%d%d%d%d–%d%d%d%d)%l?$', -- YYYY–YYYY
'^(%d%d%d%d–%d%d)%l?$' -- YYYY–YY
}
for _, pattern in ipairs (patterns) do -- spin through the patterns
y = year:match (pattern); -- y is the year portion
if y then
break; -- when y is set, we found a match so done
end
end
if not y then
return ' invalid ' .. code_open_tag .. '|year=</code>.'; -- y not set, so year is malformed
end
if is_set (anchor_year) then -- anchor_year is optional
for _, pattern in ipairs (patterns) do -- spin through the patterns
ay = anchor_year:match (pattern); -- ay is the year portion
if ay then
break; -- when ay is set, we found a match so done
end
end
if not ay then
return ' invalid ' .. code_open_tag .. '|anchor-year</code>.'; -- ay not set, so anchor_year is malformed
end
-- if not anchor_year:match ('%l$') then
-- return ' ' .. code_open_tag .. '|anchor-year=</code> missing dab.'; -- anchor_year must end with a disambiguator letter
-- end
if y ~= ay then
return ' ' .. code_open_tag .. '|year=</code> / ' .. code_open_tag .. '|anchor-year=</code> mismatch.'; -- 'year' portions of year and anchor_year must be the same
end
end
return ''; -- both years are good; empty string for concatenation
end
--[[--------------------------< M A K E _ N A M E >------------------------------------------------------------
Assembles last, first, link, or mask into a displayable contributor name.
]]
local function make_name (last, first, link, mask)
local name = last;
if is_set (first) then
name = name .. ', ' .. first; -- concatenate first onto last
end
if is_set (link) then
name = '[[' .. link .. '|' .. name .. ']]'; -- form a wikilink around the name
end
if is_set (mask) then -- mask this author
if tonumber(mask) then
name = string.rep ('—', mask) -- make a string that number length of mdashes
else
name = mask; -- mask is not a number so use the mask text
end
end
return name;
end
--[[--------------------------< C O R E >----------------------------------------------------------------------
Assembles the various parts provided by the template into a properly formatted bridging citation. Adds punctuation
and text; encloses the whole within a span with id and class attributes.
This creates a CITEREF anchor from |last1= through |last4= and |year=. It also creates a CITEREF link from |in1= through
|in4= and |year=. It is presumed that the dates of contributions are the same as the date of the enclosing work.
Even though not displayed, a year parameter is still required for the CITEREF anchor
]]
local function core( args )
local span_open_tag; -- holds CITEREF and css
local contributors = ''; -- chapter or contribution authors
local source = ''; -- editor/author date list that forms a CITEREF link to a full citation
local in_text = ' In ';
local result; -- the assemby of the above output
-- form the CITEREF anchor
if is_set (args.id) then
args.id = mw.uri.anchorEncode (args.id)
span_open_tag = '<span id="' .. args.id .. '" class="citation">'; -- for use when contributor name is same as source name
else
local citeref = 'CITEREF' .. table.concat (args.citeref) .. (is_set (args['anchor-year']) and args['anchor-year'] or args.year);
citeref = mw.uri.anchorEncode (citeref);
span_open_tag = '<span id="' .. citeref .. '" class="citation">';
end
--[[
form the contributors display list:
if |name-list-style=harv, display is similar to {{sfn}} and {{harv}}, 1 to 4 last names;
if |display-authors= is empty or omitted, display is similar to cs1|2: display all names in last, first order
if |display-authors=etal then displays all author names in last, first order and append et al.
if value assigned to |display-authors= is less than the number of author last names, displays the specified number of author names in last, first order followed by et al.
]]
if 'harv' ~= args.name_list_style then -- default cs1|2 style contributor list
local i = 1;
local count;
local etal = false; -- when |display-authors= is same as number of authors in contributor list
if is_set (args.display_authors) then
if 'etal' == args.display_authors:lower():gsub("[ '%.]", '') then -- the :gsub() portion makes 'etal' from a variety of 'et al.' spellings and stylings
count = #args.last; -- display all authors and ...
etal = true; -- ... append 'et al.'
else
count = tonumber (args.display_authors) or 0; -- 0 if can't be converted to a number
if 0 >= count then
args.err_msg = args.err_msg .. ' invalid ' .. code_open_tag .. '|display-authors=</code>'; -- if zero, then emit error message
end
end
if count > #args.last then
count = #args.last; -- when |display-authors= is more than the number of authors, use the number of authors
end
if count < #args.last then -- when |display-authors= is less than the number of authors
etal = true; -- append 'et al.'
end
else
count = #args.last; -- set count to display all of the authors
end
while i <= count do
if is_set (contributors) then
contributors = contributors .. '; ' .. make_name (args.last[i], args.first[i], args.link[i], args.mask[i]); -- the rest of the contributors
else
contributors = make_name (args.last[i], args.first[i], args.link[i], args.mask[i]); -- first contributor's name
end
i = i+1; -- bump the index
end
if true == etal then
contributors = contributors .. ' et al.'; -- append et al.
elseif 'amp' == args.name_list_style then
contributors = contributors:gsub('; ([^;]+)$', ' & %1') -- replace last separator with ' & '
end
else -- do default harv- or sfn-style contributor display
if 4 <= #args.last then -- four or more contributors (first followed by et al.)
contributors = args.last[1] .. ' et al.';
elseif 3 == #args.last then -- three (display them all)
contributors = args.last[1] .. ', ' .. args.last[2] .. ' & ' .. args.last[3];
elseif 2 == #args.last then -- two (first & second)
contributors = args.last[1] .. ' & ' .. args.last[2];
elseif 1 == #args.last then -- just one (first)
contributors = args.last[1];
else
args.err_msg = args.err_msg .. ' no authors in contributor list.'; -- this code used to find holes in the list; no more
end
end
--form the source author-date list
if is_set (args.in4) and is_set (args.in3) and is_set (args.in2) and is_set (args.in1) then
source = args.in1 .. ' et al.';
elseif not is_set (args.in4) and is_set (args.in3) and is_set (args.in2) and is_set (args.in1) then
source = args.in1 .. ', ' .. args.in2 .. ' & ' .. args.in3;
elseif not is_set (args.in4) and not is_set (args.in3) and is_set (args.in2) and is_set (args.in1) then
source = args.in1 .. ' & ' .. args.in2;
elseif not is_set (args.in4) and not is_set (args.in3) and not is_set (args.in2) and is_set (args.in1) then
source = args.in1;
else
args.err_msg = args.err_msg .. ' author missing from source list.'
end
source = source .. ' ' .. args.open .. args.year .. args.close; -- add the year with or without brackets
--assemble CITEREF wikilink
local anchor_id;
local target_err_msg;
if '' ~= args.ref then
anchor_id = mw.uri.anchorEncode (args.ref)
else
anchor_id = mw.uri.anchorEncode(table.concat ({'CITEREF', args.in1, args.in2, args.in3, args.in4, args.year}));
end
target_err_msg = target_check (anchor_id, args.ignore); -- see if there is a target for this anchor_id
source = '[[#' .. anchor_id .. "|" .. source .. "]]";
--combine contribution with url to make external link
if args.url ~= '' then
args.contribution = '[' .. args.url .. ' ' .. args.contribution .. ']'; -- format external link
if args['url-access'] then
if lock_icons[args['url-access']] then
args.contribution = table.concat ({ -- add access icon markup to this item
'<span class="', -- open the opening span tag; icon classes are defined in Module:Citation/CS1/styles.css
lock_icons[args['url-access']][1], -- add the appropriate lock icon class
'" title="', -- and the title attribute
lock_icons[args['url-access']][2], -- for an appropriate tool tip
'">', -- close the opening span tag
args.contribution,
'</span>', -- and close the span
});
end
end
end
if is_set (args['anchor-year']) then
contributors = contributors .. ' (' .. args['anchor-year'] .. ')' .. args.sepc;
elseif args.sepc ~= contributors:sub(-1) and args.sepc .. ']]' ~= contributors:sub(-3) then
contributors = contributors .. args.sepc; -- add separator if not same as last character in name list (|first=John S. or et al.)
end
-- pages and other insource location
if args.p ~= '' then
args.p = args.page_sep .. args.p;
elseif args.pp ~= '' then
args.p = args.pages_sep .. args.pp; -- args.p not set so use it to hold common insource location info
end
if args.loc ~= '' then
args.p = args.p .. ', ' .. args.loc; -- add arg.loc to args.p
end
--wrap error messages in span and add help link
if is_set (args.err_msg) then
args.err_msg = '<span style="font-size:100%" class="error"> harvc:' .. args.err_msg .. ' ([[Template:Harvc|help]])</span>';
end
if ',' == args.sepc then
in_text = in_text:lower(); -- CS2 style use lower case
end
-- and put it all together
result = span_open_tag .. contributors .. ' "' .. args.contribution .. '"' .. args.sepc .. in_text .. source .. args.p .. args.ps .. args.err_msg .. target_err_msg .. '</span>';
return result;
end
--[[--------------------------< H A R V C >--------------------------------------------------------------------
Entry point from {{harvc}} template. Fetches parent frame parameters, does a bit of simple error checking
]]
local function harvc (frame)
local args = {
err_msg = '',
page_sep = ", p. ",
pages_sep = ", pp. ",
sepc = '.',
ps = '.',
open = '(', -- year brackets for source year
close = ')',
last = {},
first = {},
link = {},
mask = {},
citeref = {}
}
local pframe = frame:getParent();
args.contribution = pframe.args.c or -- chapter or contribution
pframe.args.chapter or
pframe.args.contribution or '';
args.id = pframe.args.id or '';
args.in1 = pframe.args['in'] or pframe.args.in1 or ''; -- source editor surnames; 'in' is a Lua reserved keyword
args.in2 = pframe.args.in2 or '';
args.in3 = pframe.args.in3 or '';
args.in4 = pframe.args.in4 or '';
args.display_authors = pframe.args['display-authors']; -- the number of contributor names to display; cs1|2 format includes first names
args.name_list_style = pframe.args['name-list-style'] or -- when set to 'harv' display contributor list in sfn or harv style
pframe.args['name-list-format'] or ''; -- TODO: remove name-list-format
args.name_list_style = args.name_list_style:lower(); -- make it case agnostic
if is_set (pframe.args.last) or is_set (pframe.args.last1) or
is_set (pframe.args.author) or is_set (pframe.args.author1) then -- must have at least this to continue
args.last[1] = pframe.args.last or pframe.args.last1 or pframe.args.author or pframe.args.author1; -- get first contributor's last name
args.citeref[1] = args.last[1]; -- add it to the citeref
args.first[1] = pframe.args.first or pframe.args.first1; -- get first contributor's first name
args.link[1] = pframe.args['author-link'] or pframe.args['author-link1']; -- get first contributor's article link
args.mask[1] = pframe.args['author-mask'] or pframe.args['author-mask1']; -- get first contributor's article link
local i = 2; -- index for the rest of the names
while is_set (pframe.args['last'..i]) or is_set (pframe.args['author'..i]) do -- loop through pframe.args and get the rest of the names
args.last[i] = pframe.args['last'..i] or pframe.args['author'..i]; -- last names
args.first[i] = pframe.args['first'..i]; -- first names
args.link[i] = pframe.args['author-link'..i]; -- links
args.mask[i] = pframe.args['author-mask'..i]; -- masks
if 5 > i then
args.citeref[i] = args.last[i]; -- collect first four last names for CITEREF anchor
end
i = i + 1 -- bump the index
end
end
args.p = pframe.args.p or ''; -- source page number(s) or location
args.pp = pframe.args.pp or '';
args.loc = pframe.args.loc or '';
args.ref = pframe.args.ref or pframe.args.Ref or ''; -- used to match |ref=<text> in cs1|2 source template
args.ignore = 'yes' == pframe.args['ignore-err']; -- suppress false-positive 'no target' errors
if 'cs2' == pframe.args.mode then
args.ps = ''; -- set postscript character to empty string, cs2 mode
args.sepc = ','; -- set seperator character to comma, cs2 mode
end
do -- to limit scope of local temp
local temp = pframe.args.ps or pframe.args.postscript;
if is_set (temp) then
if 'none' == temp:lower() then -- if |ps=none or |postscript=none then
args.ps = ''; -- no postscript
else
args.ps = temp; -- override default postscript
end
end
end -- end of scope limit
if 'yes' == pframe.args.nb then -- if no brackets around year in link to cs1|2 template
args.open = ''; -- unset these
args.close = '';
end
args.url = pframe.args.url or -- url for chapter or contribution
pframe.args['chapter-url'] or
pframe.args['contribution-url'] or '';
args['url-access'] = pframe.args['url-access'];
args.year = pframe.args.year or ''; -- required
args['anchor-year'] = pframe.args['anchor-year'] or '';
args.err_msg = args.err_msg .. check_years (args.year, args['anchor-year']);
if not is_set (args.contribution) then
args.err_msg = args.err_msg .. ' required contribution is missing.'; -- error message if source not provided
args.contribution = args.url; -- if set it will give us linkable text
end
if args.last[1] == args.in1 and
args.last[2] == args.in2 and
args.last[3] == args.in3 and
args.last[4] == args.in4 and
not is_set (args.id) then
args.err_msg = args.err_msg .. ' required ' .. code_open_tag .. '|id=</code> parameter missing.'; -- error message if contributor and source are the same
end
return table.concat ({core (args), frame:extensionTag ('templatestyles', '', {src='Module:Citation/CS1/styles.css'})});
end
--[[--------------------------< E X P O R T E D F U N C T I O N S >------------------------------------------
]]
return {
harvc = harvc
};
7jpqvih0o8lom94vzop2wz2vmm9djqs
801898
801897
2021-01-16T02:43:15Z
en>Matthiaspaul
0
removed name-list-format (no uses in mainspace any more)
801898
Scribunto
text/plain
require('Module:No globals')
local anchor_id_list = mw.loadData ('Module:Footnotes/anchor_id_list').anchor_id_list;
local code_open_tag = '<code class="cs1-code">'; -- cs1-code class defined in Module:Citation/CS1/styles.css
local lock_icons = { --icon classes are defined in Module:Citation/CS1/styles.css
['registration'] = {'cs1-lock-registration', 'Free registration required'},
['limited'] = {'cs1-lock-limited', 'Free access subject to limited trial, subscription normally required'},
['subscription'] = {'cs1-lock-subscription', 'Paid subscription required'},
}
--[[--------------------------< T A R G E T _ C H E C K >------------------------------------------------------
look for anchor_id (CITEREF name-list and year or text from |ref=) in anchor_id_list
the 'no target' error may be suppressed with |ignore-err=yes when target cannot be found because target is inside
a template that wraps another template; 'multiple targets' error may not be suppressed
]]
local function target_check (anchor_id, ignore)
local number = anchor_id_list[anchor_id]; -- nil when anchor_id not in list; else a number
local msg;
local category;
if not number then
if ignore then
return ''; -- if ignore is true then no message, no category
end
msg = 'no target: ' .. anchor_id; -- anchor_id not found in this article
elseif 1 < number then
msg = 'multiple targets (' .. number .. '×): ' .. anchor_id; -- more than one anchor_id in this article
end
category = 0 == mw.title.getCurrentTitle().namespace and '[[Category:Harv and Sfn template errors]]' or ''; -- only categorize in article space
--use this version to show error messages
return msg and ' <span class="error harv-error" style="display: inline; font-size:100%">Harvc error: ' .. msg .. ' ([[:Category:Harv and Sfn template errors|help]])</span>' .. category or '';
--use this version to hide error messages
-- return msg and ' <span class="error harv-error" style="display: none; font-size:100%">Harvc error: ' .. msg .. ' ([[:Category:Harv and Sfn template errors|help]])</span>' .. category or '';
end
--[[--------------------------< I S _ S E T >------------------------------------------------------------------
Whether variable is set or not. A varable is set when it is not nil and not empty.
]]
local function is_set( var )
return not (var == nil or var == '');
end
--[[--------------------------< C H E C K _ Y E A R S >--------------------------------------------------------
evaluates params to see if they are one of these forms with or without lowercase letter disambiguator (same as in
Module:Footnotes):
YYYY
n.d.
nd
c. YYYY
YYYY–YYYY (separator is endash)
YYYY–YY (separator is endash)
when anchor_year present, year portion must be same as year param and must have disambiguator
returns empty string when params have correct form; error message else
]]
local function check_years (year, anchor_year)
local y, ay;
if not is_set (year) then -- year is required so return error message when not set
return ' missing ' .. code_open_tag .. '|year=</code>.';
end
local patterns = { -- allowed year patterns from Module:Footnotes (captures added here)
'^(%d%d%d%d?)%l?$', -- YYY or YYYY
'^(n%.d%.)%l?$', -- n.d.
'^(nd)%l?$', -- nd
'^(c%. %d%d%d%d?)%l?$', -- c. YYY or c. YYYY
'^(%d%d%d%d–%d%d%d%d)%l?$', -- YYYY–YYYY
'^(%d%d%d%d–%d%d)%l?$' -- YYYY–YY
}
for _, pattern in ipairs (patterns) do -- spin through the patterns
y = year:match (pattern); -- y is the year portion
if y then
break; -- when y is set, we found a match so done
end
end
if not y then
return ' invalid ' .. code_open_tag .. '|year=</code>.'; -- y not set, so year is malformed
end
if is_set (anchor_year) then -- anchor_year is optional
for _, pattern in ipairs (patterns) do -- spin through the patterns
ay = anchor_year:match (pattern); -- ay is the year portion
if ay then
break; -- when ay is set, we found a match so done
end
end
if not ay then
return ' invalid ' .. code_open_tag .. '|anchor-year</code>.'; -- ay not set, so anchor_year is malformed
end
-- if not anchor_year:match ('%l$') then
-- return ' ' .. code_open_tag .. '|anchor-year=</code> missing dab.'; -- anchor_year must end with a disambiguator letter
-- end
if y ~= ay then
return ' ' .. code_open_tag .. '|year=</code> / ' .. code_open_tag .. '|anchor-year=</code> mismatch.'; -- 'year' portions of year and anchor_year must be the same
end
end
return ''; -- both years are good; empty string for concatenation
end
--[[--------------------------< M A K E _ N A M E >------------------------------------------------------------
Assembles last, first, link, or mask into a displayable contributor name.
]]
local function make_name (last, first, link, mask)
local name = last;
if is_set (first) then
name = name .. ', ' .. first; -- concatenate first onto last
end
if is_set (link) then
name = '[[' .. link .. '|' .. name .. ']]'; -- form a wikilink around the name
end
if is_set (mask) then -- mask this author
if tonumber(mask) then
name = string.rep ('—', mask) -- make a string that number length of mdashes
else
name = mask; -- mask is not a number so use the mask text
end
end
return name;
end
--[[--------------------------< C O R E >----------------------------------------------------------------------
Assembles the various parts provided by the template into a properly formatted bridging citation. Adds punctuation
and text; encloses the whole within a span with id and class attributes.
This creates a CITEREF anchor from |last1= through |last4= and |year=. It also creates a CITEREF link from |in1= through
|in4= and |year=. It is presumed that the dates of contributions are the same as the date of the enclosing work.
Even though not displayed, a year parameter is still required for the CITEREF anchor
]]
local function core( args )
local span_open_tag; -- holds CITEREF and css
local contributors = ''; -- chapter or contribution authors
local source = ''; -- editor/author date list that forms a CITEREF link to a full citation
local in_text = ' In ';
local result; -- the assemby of the above output
-- form the CITEREF anchor
if is_set (args.id) then
args.id = mw.uri.anchorEncode (args.id)
span_open_tag = '<span id="' .. args.id .. '" class="citation">'; -- for use when contributor name is same as source name
else
local citeref = 'CITEREF' .. table.concat (args.citeref) .. (is_set (args['anchor-year']) and args['anchor-year'] or args.year);
citeref = mw.uri.anchorEncode (citeref);
span_open_tag = '<span id="' .. citeref .. '" class="citation">';
end
--[[
form the contributors display list:
if |name-list-style=harv, display is similar to {{sfn}} and {{harv}}, 1 to 4 last names;
if |display-authors= is empty or omitted, display is similar to cs1|2: display all names in last, first order
if |display-authors=etal then displays all author names in last, first order and append et al.
if value assigned to |display-authors= is less than the number of author last names, displays the specified number of author names in last, first order followed by et al.
]]
if 'harv' ~= args.name_list_style then -- default cs1|2 style contributor list
local i = 1;
local count;
local etal = false; -- when |display-authors= is same as number of authors in contributor list
if is_set (args.display_authors) then
if 'etal' == args.display_authors:lower():gsub("[ '%.]", '') then -- the :gsub() portion makes 'etal' from a variety of 'et al.' spellings and stylings
count = #args.last; -- display all authors and ...
etal = true; -- ... append 'et al.'
else
count = tonumber (args.display_authors) or 0; -- 0 if can't be converted to a number
if 0 >= count then
args.err_msg = args.err_msg .. ' invalid ' .. code_open_tag .. '|display-authors=</code>'; -- if zero, then emit error message
end
end
if count > #args.last then
count = #args.last; -- when |display-authors= is more than the number of authors, use the number of authors
end
if count < #args.last then -- when |display-authors= is less than the number of authors
etal = true; -- append 'et al.'
end
else
count = #args.last; -- set count to display all of the authors
end
while i <= count do
if is_set (contributors) then
contributors = contributors .. '; ' .. make_name (args.last[i], args.first[i], args.link[i], args.mask[i]); -- the rest of the contributors
else
contributors = make_name (args.last[i], args.first[i], args.link[i], args.mask[i]); -- first contributor's name
end
i = i+1; -- bump the index
end
if true == etal then
contributors = contributors .. ' et al.'; -- append et al.
elseif 'amp' == args.name_list_style then
contributors = contributors:gsub('; ([^;]+)$', ' & %1') -- replace last separator with ' & '
end
else -- do default harv- or sfn-style contributor display
if 4 <= #args.last then -- four or more contributors (first followed by et al.)
contributors = args.last[1] .. ' et al.';
elseif 3 == #args.last then -- three (display them all)
contributors = args.last[1] .. ', ' .. args.last[2] .. ' & ' .. args.last[3];
elseif 2 == #args.last then -- two (first & second)
contributors = args.last[1] .. ' & ' .. args.last[2];
elseif 1 == #args.last then -- just one (first)
contributors = args.last[1];
else
args.err_msg = args.err_msg .. ' no authors in contributor list.'; -- this code used to find holes in the list; no more
end
end
--form the source author-date list
if is_set (args.in4) and is_set (args.in3) and is_set (args.in2) and is_set (args.in1) then
source = args.in1 .. ' et al.';
elseif not is_set (args.in4) and is_set (args.in3) and is_set (args.in2) and is_set (args.in1) then
source = args.in1 .. ', ' .. args.in2 .. ' & ' .. args.in3;
elseif not is_set (args.in4) and not is_set (args.in3) and is_set (args.in2) and is_set (args.in1) then
source = args.in1 .. ' & ' .. args.in2;
elseif not is_set (args.in4) and not is_set (args.in3) and not is_set (args.in2) and is_set (args.in1) then
source = args.in1;
else
args.err_msg = args.err_msg .. ' author missing from source list.'
end
source = source .. ' ' .. args.open .. args.year .. args.close; -- add the year with or without brackets
--assemble CITEREF wikilink
local anchor_id;
local target_err_msg;
if '' ~= args.ref then
anchor_id = mw.uri.anchorEncode (args.ref)
else
anchor_id = mw.uri.anchorEncode(table.concat ({'CITEREF', args.in1, args.in2, args.in3, args.in4, args.year}));
end
target_err_msg = target_check (anchor_id, args.ignore); -- see if there is a target for this anchor_id
source = '[[#' .. anchor_id .. "|" .. source .. "]]";
--combine contribution with url to make external link
if args.url ~= '' then
args.contribution = '[' .. args.url .. ' ' .. args.contribution .. ']'; -- format external link
if args['url-access'] then
if lock_icons[args['url-access']] then
args.contribution = table.concat ({ -- add access icon markup to this item
'<span class="', -- open the opening span tag; icon classes are defined in Module:Citation/CS1/styles.css
lock_icons[args['url-access']][1], -- add the appropriate lock icon class
'" title="', -- and the title attribute
lock_icons[args['url-access']][2], -- for an appropriate tool tip
'">', -- close the opening span tag
args.contribution,
'</span>', -- and close the span
});
end
end
end
if is_set (args['anchor-year']) then
contributors = contributors .. ' (' .. args['anchor-year'] .. ')' .. args.sepc;
elseif args.sepc ~= contributors:sub(-1) and args.sepc .. ']]' ~= contributors:sub(-3) then
contributors = contributors .. args.sepc; -- add separator if not same as last character in name list (|first=John S. or et al.)
end
-- pages and other insource location
if args.p ~= '' then
args.p = args.page_sep .. args.p;
elseif args.pp ~= '' then
args.p = args.pages_sep .. args.pp; -- args.p not set so use it to hold common insource location info
end
if args.loc ~= '' then
args.p = args.p .. ', ' .. args.loc; -- add arg.loc to args.p
end
--wrap error messages in span and add help link
if is_set (args.err_msg) then
args.err_msg = '<span style="font-size:100%" class="error"> harvc:' .. args.err_msg .. ' ([[Template:Harvc|help]])</span>';
end
if ',' == args.sepc then
in_text = in_text:lower(); -- CS2 style use lower case
end
-- and put it all together
result = span_open_tag .. contributors .. ' "' .. args.contribution .. '"' .. args.sepc .. in_text .. source .. args.p .. args.ps .. args.err_msg .. target_err_msg .. '</span>';
return result;
end
--[[--------------------------< H A R V C >--------------------------------------------------------------------
Entry point from {{harvc}} template. Fetches parent frame parameters, does a bit of simple error checking
]]
local function harvc (frame)
local args = {
err_msg = '',
page_sep = ", p. ",
pages_sep = ", pp. ",
sepc = '.',
ps = '.',
open = '(', -- year brackets for source year
close = ')',
last = {},
first = {},
link = {},
mask = {},
citeref = {}
}
local pframe = frame:getParent();
args.contribution = pframe.args.c or -- chapter or contribution
pframe.args.chapter or
pframe.args.contribution or '';
args.id = pframe.args.id or '';
args.in1 = pframe.args['in'] or pframe.args.in1 or ''; -- source editor surnames; 'in' is a Lua reserved keyword
args.in2 = pframe.args.in2 or '';
args.in3 = pframe.args.in3 or '';
args.in4 = pframe.args.in4 or '';
args.display_authors = pframe.args['display-authors']; -- the number of contributor names to display; cs1|2 format includes first names
args.name_list_style = pframe.args['name-list-style'] or ''; -- when set to 'harv' display contributor list in sfn or harv style
args.name_list_style = args.name_list_style:lower(); -- make it case agnostic
if is_set (pframe.args.last) or is_set (pframe.args.last1) or
is_set (pframe.args.author) or is_set (pframe.args.author1) then -- must have at least this to continue
args.last[1] = pframe.args.last or pframe.args.last1 or pframe.args.author or pframe.args.author1; -- get first contributor's last name
args.citeref[1] = args.last[1]; -- add it to the citeref
args.first[1] = pframe.args.first or pframe.args.first1; -- get first contributor's first name
args.link[1] = pframe.args['author-link'] or pframe.args['author-link1']; -- get first contributor's article link
args.mask[1] = pframe.args['author-mask'] or pframe.args['author-mask1']; -- get first contributor's article link
local i = 2; -- index for the rest of the names
while is_set (pframe.args['last'..i]) or is_set (pframe.args['author'..i]) do -- loop through pframe.args and get the rest of the names
args.last[i] = pframe.args['last'..i] or pframe.args['author'..i]; -- last names
args.first[i] = pframe.args['first'..i]; -- first names
args.link[i] = pframe.args['author-link'..i]; -- links
args.mask[i] = pframe.args['author-mask'..i]; -- masks
if 5 > i then
args.citeref[i] = args.last[i]; -- collect first four last names for CITEREF anchor
end
i = i + 1 -- bump the index
end
end
args.p = pframe.args.p or ''; -- source page number(s) or location
args.pp = pframe.args.pp or '';
args.loc = pframe.args.loc or '';
args.ref = pframe.args.ref or pframe.args.Ref or ''; -- used to match |ref=<text> in cs1|2 source template
args.ignore = 'yes' == pframe.args['ignore-err']; -- suppress false-positive 'no target' errors
if 'cs2' == pframe.args.mode then
args.ps = ''; -- set postscript character to empty string, cs2 mode
args.sepc = ','; -- set seperator character to comma, cs2 mode
end
do -- to limit scope of local temp
local temp = pframe.args.ps or pframe.args.postscript;
if is_set (temp) then
if 'none' == temp:lower() then -- if |ps=none or |postscript=none then
args.ps = ''; -- no postscript
else
args.ps = temp; -- override default postscript
end
end
end -- end of scope limit
if 'yes' == pframe.args.nb then -- if no brackets around year in link to cs1|2 template
args.open = ''; -- unset these
args.close = '';
end
args.url = pframe.args.url or -- url for chapter or contribution
pframe.args['chapter-url'] or
pframe.args['contribution-url'] or '';
args['url-access'] = pframe.args['url-access'];
args.year = pframe.args.year or ''; -- required
args['anchor-year'] = pframe.args['anchor-year'] or '';
args.err_msg = args.err_msg .. check_years (args.year, args['anchor-year']);
if not is_set (args.contribution) then
args.err_msg = args.err_msg .. ' required contribution is missing.'; -- error message if source not provided
args.contribution = args.url; -- if set it will give us linkable text
end
if args.last[1] == args.in1 and
args.last[2] == args.in2 and
args.last[3] == args.in3 and
args.last[4] == args.in4 and
not is_set (args.id) then
args.err_msg = args.err_msg .. ' required ' .. code_open_tag .. '|id=</code> parameter missing.'; -- error message if contributor and source are the same
end
return table.concat ({core (args), frame:extensionTag ('templatestyles', '', {src='Module:Citation/CS1/styles.css'})});
end
--[[--------------------------< E X P O R T E D F U N C T I O N S >------------------------------------------
]]
return {
harvc = harvc
};
1d8h07mcfzeecz8fkwp351vflbshjjy
801899
801898
2021-04-05T11:07:44Z
en>Trappist the monk
0
801899
Scribunto
text/plain
require('Module:No globals')
local anchor_id_list = mw.loadData ('Module:Footnotes/anchor_id_list').anchor_id_list;
local code_open_tag = '<code class="cs1-code">'; -- cs1-code class defined in Module:Citation/CS1/styles.css
local lock_icons = { --icon classes are defined in Module:Citation/CS1/styles.css
['registration'] = {'cs1-lock-registration', 'Free registration required'},
['limited'] = {'cs1-lock-limited', 'Free access subject to limited trial, subscription normally required'},
['subscription'] = {'cs1-lock-subscription', 'Paid subscription required'},
}
--[[--------------------------< T A R G E T _ C H E C K >------------------------------------------------------
look for anchor_id (CITEREF name-list and year or text from |ref=) in anchor_id_list
the 'no target' error may be suppressed with |ignore-err=yes when target cannot be found because target is inside
a template that wraps another template; 'multiple targets' error may not be suppressed
]]
local function target_check (anchor_id, ignore)
local number = anchor_id_list[anchor_id]; -- nil when anchor_id not in list; else a number
local msg;
local category;
if not number then
if ignore then
return ''; -- if ignore is true then no message, no category
end
msg = 'no target: ' .. anchor_id; -- anchor_id not found in this article
elseif 1 < number then
msg = 'multiple targets (' .. number .. '×): ' .. anchor_id; -- more than one anchor_id in this article
end
category = 0 == mw.title.getCurrentTitle().namespace and '[[Category:Harv and Sfn template errors]]' or ''; -- only categorize in article space
--use this version to show error messages
return msg and ' <span class="error harv-error" style="display: inline; font-size:100%">Harvc error: ' .. msg .. ' ([[:Category:Harv and Sfn template errors|help]])</span>' .. category or '';
--use this version to hide error messages
-- return msg and ' <span class="error harv-error" style="display: none; font-size:100%">Harvc error: ' .. msg .. ' ([[:Category:Harv and Sfn template errors|help]])</span>' .. category or '';
end
--[[--------------------------< I S _ S E T >------------------------------------------------------------------
Whether variable is set or not. A varable is set when it is not nil and not empty.
]]
local function is_set( var )
return not (var == nil or var == '');
end
--[[--------------------------< C H E C K _ Y E A R S >--------------------------------------------------------
evaluates params to see if they are one of these forms with or without lowercase letter disambiguator (same as in
Module:Footnotes):
YYYY
n.d.
nd
c. YYYY
YYYY–YYYY (separator is endash)
YYYY–YY (separator is endash)
when anchor_year present, year portion must be same as year param and must have disambiguator
returns empty string when params have correct form; error message else
]]
local function check_years (year, anchor_year)
local y, ay;
if not is_set (year) then -- year is required so return error message when not set
return ' missing ' .. code_open_tag .. '|year=</code>.';
end
local patterns = { -- allowed year patterns from Module:Footnotes (captures added here)
'^(%d%d%d%d?)%l?$', -- YYY or YYYY
'^(n%.d%.)%l?$', -- n.d.
'^(nd)%l?$', -- nd
'^(c%. %d%d%d%d?)%l?$', -- c. YYY or c. YYYY
'^(%d%d%d%d–%d%d%d%d)%l?$', -- YYYY–YYYY
'^(%d%d%d%d–%d%d)%l?$' -- YYYY–YY
}
for _, pattern in ipairs (patterns) do -- spin through the patterns
y = year:match (pattern); -- y is the year portion
if y then
break; -- when y is set, we found a match so done
end
end
if not y then
return ' invalid ' .. code_open_tag .. '|year=</code>.'; -- y not set, so year is malformed
end
if is_set (anchor_year) then -- anchor_year is optional
for _, pattern in ipairs (patterns) do -- spin through the patterns
ay = anchor_year:match (pattern); -- ay is the year portion
if ay then
break; -- when ay is set, we found a match so done
end
end
if not ay then
return ' invalid ' .. code_open_tag .. '|anchor-year</code>.'; -- ay not set, so anchor_year is malformed
end
-- if not anchor_year:match ('%l$') then
-- return ' ' .. code_open_tag .. '|anchor-year=</code> missing dab.'; -- anchor_year must end with a disambiguator letter
-- end
if y ~= ay then
return ' ' .. code_open_tag .. '|year=</code> / ' .. code_open_tag .. '|anchor-year=</code> mismatch.'; -- 'year' portions of year and anchor_year must be the same
end
end
return ''; -- both years are good; empty string for concatenation
end
--[[--------------------------< M A K E _ N A M E >------------------------------------------------------------
Assembles last, first, link, or mask into a displayable contributor name.
]]
local function make_name (last, first, link, mask)
local name = last;
if is_set (first) then
name = name .. ', ' .. first; -- concatenate first onto last
end
if is_set (link) then
name = '[[' .. link .. '|' .. name .. ']]'; -- form a wikilink around the name
end
if is_set (mask) then -- mask this author
if tonumber(mask) then
name = string.rep ('—', mask) -- make a string that number length of mdashes
else
name = mask; -- mask is not a number so use the mask text
end
end
return name;
end
--[[--------------------------< C O R E >----------------------------------------------------------------------
Assembles the various parts provided by the template into a properly formatted bridging citation. Adds punctuation
and text; encloses the whole within a span with id and class attributes.
This creates a CITEREF anchor from |last1= through |last4= and |year=. It also creates a CITEREF link from |in1= through
|in4= and |year=. It is presumed that the dates of contributions are the same as the date of the enclosing work.
Even though not displayed, a year parameter is still required for the CITEREF anchor
]]
local function core( args )
local span_open_tag; -- holds CITEREF and css
local contributors = ''; -- chapter or contribution authors
local source = ''; -- editor/author date list that forms a CITEREF link to a full citation
local in_text = ' In ';
local result; -- the assemby of the above output
-- form the CITEREF anchor
if is_set (args.id) then
args.id = mw.uri.anchorEncode (args.id)
span_open_tag = '<span id="' .. args.id .. '" class="citation">'; -- for use when contributor name is same as source name
else
local citeref = 'CITEREF' .. table.concat (args.citeref) .. (is_set (args['anchor-year']) and args['anchor-year'] or args.year);
citeref = mw.uri.anchorEncode (citeref);
span_open_tag = '<span id="' .. citeref .. '" class="citation">';
end
--[[
form the contributors display list:
if |name-list-style=harv, display is similar to {{sfn}} and {{harv}}, 1 to 4 last names;
if |display-authors= is empty or omitted, display is similar to cs1|2: display all names in last, first order
if |display-authors=etal then displays all author names in last, first order and append et al.
if value assigned to |display-authors= is less than the number of author last names, displays the specified number of author names in last, first order followed by et al.
]]
if 'harv' ~= args.name_list_style then -- default cs1|2 style contributor list
local i = 1;
local count;
local etal = false; -- when |display-authors= is same as number of authors in contributor list
if is_set (args.display_authors) then
if 'etal' == args.display_authors:lower():gsub("[ '%.]", '') then -- the :gsub() portion makes 'etal' from a variety of 'et al.' spellings and stylings
count = #args.last; -- display all authors and ...
etal = true; -- ... append 'et al.'
else
count = tonumber (args.display_authors) or 0; -- 0 if can't be converted to a number
if 0 >= count then
args.err_msg = args.err_msg .. ' invalid ' .. code_open_tag .. '|display-authors=</code>'; -- if zero, then emit error message
end
end
if count > #args.last then
count = #args.last; -- when |display-authors= is more than the number of authors, use the number of authors
end
if count < #args.last then -- when |display-authors= is less than the number of authors
etal = true; -- append 'et al.'
end
else
count = #args.last; -- set count to display all of the authors
end
while i <= count do
if is_set (contributors) then
contributors = contributors .. '; ' .. make_name (args.last[i], args.first[i], args.link[i], args.mask[i]); -- the rest of the contributors
else
contributors = make_name (args.last[i], args.first[i], args.link[i], args.mask[i]); -- first contributor's name
end
i = i+1; -- bump the index
end
if true == etal then
contributors = contributors .. ' et al.'; -- append et al.
elseif 'amp' == args.name_list_style then
contributors = contributors:gsub('; ([^;]+)$', ' & %1') -- replace last separator with ' & '
end
else -- do default harv- or sfn-style contributor display
if 4 <= #args.last then -- four or more contributors (first followed by et al.)
contributors = args.last[1] .. ' et al.';
elseif 3 == #args.last then -- three (display them all)
contributors = args.last[1] .. ', ' .. args.last[2] .. ' & ' .. args.last[3];
elseif 2 == #args.last then -- two (first & second)
contributors = args.last[1] .. ' & ' .. args.last[2];
elseif 1 == #args.last then -- just one (first)
contributors = args.last[1];
else
args.err_msg = args.err_msg .. ' no authors in contributor list.'; -- this code used to find holes in the list; no more
end
end
--form the source author-date list
if is_set (args.in4) and is_set (args.in3) and is_set (args.in2) and is_set (args.in1) then
source = args.in1 .. ' et al.';
elseif not is_set (args.in4) and is_set (args.in3) and is_set (args.in2) and is_set (args.in1) then
source = args.in1 .. ', ' .. args.in2 .. ' & ' .. args.in3;
elseif not is_set (args.in4) and not is_set (args.in3) and is_set (args.in2) and is_set (args.in1) then
source = args.in1 .. ' & ' .. args.in2;
elseif not is_set (args.in4) and not is_set (args.in3) and not is_set (args.in2) and is_set (args.in1) then
source = args.in1;
else
args.err_msg = args.err_msg .. ' author missing from source list.'
end
source = source .. ' ' .. args.open .. args.year .. args.close; -- add the year with or without brackets
--assemble CITEREF wikilink
local anchor_id;
local target_err_msg;
if '' ~= args.ref then
anchor_id = mw.uri.anchorEncode (args.ref)
else
anchor_id = mw.uri.anchorEncode(table.concat ({'CITEREF', args.in1, args.in2, args.in3, args.in4, args.year}));
end
target_err_msg = target_check (anchor_id, args.ignore); -- see if there is a target for this anchor_id
source = '[[#' .. anchor_id .. "|" .. source .. "]]";
--combine contribution with url to make external link
if args.url ~= '' then
args.contribution = '[' .. args.url .. ' ' .. args.contribution .. ']'; -- format external link
if args['url-access'] then
if lock_icons[args['url-access']] then
args.contribution = table.concat ({ -- add access icon markup to this item
'<span class="', -- open the opening span tag; icon classes are defined in Module:Citation/CS1/styles.css
lock_icons[args['url-access']][1], -- add the appropriate lock icon class
'" title="', -- and the title attribute
lock_icons[args['url-access']][2], -- for an appropriate tool tip
'">', -- close the opening span tag
args.contribution,
'</span>', -- and close the span
});
end
end
end
if is_set (args['anchor-year']) then
contributors = contributors .. ' (' .. args['anchor-year'] .. ')' .. args.sepc;
elseif args.sepc ~= contributors:sub(-1) and args.sepc .. ']]' ~= contributors:sub(-3) then
contributors = contributors .. args.sepc; -- add separator if not same as last character in name list (|first=John S. or et al.)
end
-- pages and other insource location
if args.p ~= '' then
args.p = args.page_sep .. args.p;
elseif args.pp ~= '' then
args.p = args.pages_sep .. args.pp; -- args.p not set so use it to hold common insource location info
end
if args.loc ~= '' then
args.p = args.p .. ', ' .. args.loc; -- add arg.loc to args.p
end
--wrap error messages in span and add help link
if is_set (args.err_msg) then
args.err_msg = '<span style="font-size:100%" class="error"> harvc:' .. args.err_msg .. ' ([[Template:Harvc|help]])</span>';
end
if ',' == args.sepc then
in_text = in_text:lower(); -- CS2 style use lower case
end
-- and put it all together
result = span_open_tag .. contributors .. ' "' .. args.contribution .. '"' .. args.sepc .. in_text .. source .. args.p .. args.ps .. args.err_msg .. target_err_msg .. '</span>';
return result;
end
--[[--------------------------< H A R V C >--------------------------------------------------------------------
Entry point from {{harvc}} template. Fetches parent frame parameters, does a bit of simple error checking
]]
local function harvc (frame)
local args = {
err_msg = '',
page_sep = ", p. ",
pages_sep = ", pp. ",
sepc = '.',
ps = '.',
open = '(', -- year brackets for source year
close = ')',
last = {},
first = {},
link = {},
mask = {},
citeref = {}
}
local pframe = frame:getParent();
args.contribution = pframe.args.c or -- chapter or contribution
pframe.args.chapter or
pframe.args.contribution or '';
args.id = pframe.args.id or '';
args.in1 = pframe.args['in'] or pframe.args.in1 or ''; -- source editor surnames; 'in' is a Lua reserved keyword
args.in2 = pframe.args.in2 or '';
args.in3 = pframe.args.in3 or '';
args.in4 = pframe.args.in4 or '';
args.display_authors = pframe.args['display-authors']; -- the number of contributor names to display; cs1|2 format includes first names
args.name_list_style = pframe.args['name-list-style'] or ''; -- when set to 'harv' display contributor list in sfn or harv style
args.name_list_style = args.name_list_style:lower(); -- make it case agnostic
if is_set (pframe.args.last) or is_set (pframe.args.last1) or
is_set (pframe.args.author) or is_set (pframe.args.author1) then -- must have at least this to continue
args.last[1] = pframe.args.last or pframe.args.last1 or pframe.args.author or pframe.args.author1; -- get first contributor's last name
args.citeref[1] = args.last[1]; -- add it to the citeref
args.first[1] = pframe.args.first or pframe.args.first1; -- get first contributor's first name
args.link[1] = pframe.args['author-link'] or pframe.args['author-link1']; -- get first contributor's article link
args.mask[1] = pframe.args['author-mask'] or pframe.args['author-mask1']; -- get first contributor's article link
local i = 2; -- index for the rest of the names
while is_set (pframe.args['last'..i]) or is_set (pframe.args['author'..i]) do -- loop through pframe.args and get the rest of the names
args.last[i] = pframe.args['last'..i] or pframe.args['author'..i]; -- last names
args.first[i] = pframe.args['first'..i]; -- first names
args.link[i] = pframe.args['author-link'..i]; -- links
args.mask[i] = pframe.args['author-mask'..i]; -- masks
if 5 > i then
args.citeref[i] = args.last[i]; -- collect first four last names for CITEREF anchor
end
i = i + 1 -- bump the index
end
end
args.p = pframe.args.p or pframe.args.page or ''; -- source page number(s) or location
args.pp = pframe.args.pp or pframe.args.pages or '';
args.loc = pframe.args.loc or '';
args.ref = pframe.args.ref or pframe.args.Ref or ''; -- used to match |ref=<text> in cs1|2 source template
args.ignore = 'yes' == pframe.args['ignore-err']; -- suppress false-positive 'no target' errors
if 'cs2' == pframe.args.mode then
args.ps = ''; -- set postscript character to empty string, cs2 mode
args.sepc = ','; -- set seperator character to comma, cs2 mode
end
do -- to limit scope of local temp
local temp = pframe.args.ps or pframe.args.postscript;
if is_set (temp) then
if 'none' == temp:lower() then -- if |ps=none or |postscript=none then
args.ps = ''; -- no postscript
else
args.ps = temp; -- override default postscript
end
end
end -- end of scope limit
if 'yes' == pframe.args.nb then -- if no brackets around year in link to cs1|2 template
args.open = ''; -- unset these
args.close = '';
end
args.url = pframe.args.url or -- url for chapter or contribution
pframe.args['chapter-url'] or
pframe.args['contribution-url'] or '';
args['url-access'] = pframe.args['url-access'];
args.year = pframe.args.year or ''; -- required
args['anchor-year'] = pframe.args['anchor-year'] or '';
args.err_msg = args.err_msg .. check_years (args.year, args['anchor-year']);
if not is_set (args.contribution) then
args.err_msg = args.err_msg .. ' required contribution is missing.'; -- error message if source not provided
args.contribution = args.url; -- if set it will give us linkable text
end
if args.last[1] == args.in1 and
args.last[2] == args.in2 and
args.last[3] == args.in3 and
args.last[4] == args.in4 and
not is_set (args.id) then
args.err_msg = args.err_msg .. ' required ' .. code_open_tag .. '|id=</code> parameter missing.'; -- error message if contributor and source are the same
end
return table.concat ({core (args), frame:extensionTag ('templatestyles', '', {src='Module:Citation/CS1/styles.css'})});
end
--[[--------------------------< E X P O R T E D F U N C T I O N S >------------------------------------------
]]
return {
harvc = harvc
};
1lr7filfj0unt2i24nqw3zhw19793u1
801900
801899
2021-08-31T03:32:40Z
en>Izno
0
use the generic name for id, swap positions of styles and output
801900
Scribunto
text/plain
require('Module:No globals')
local anchor_id_list = mw.loadData ('Module:Footnotes/anchor_id_list').anchor_id_list;
local code_open_tag = '<code class="cs1-code">'; -- cs1-code class defined in Module:Citation/CS1/styles.css
local lock_icons = { --icon classes are defined in Module:Citation/CS1/styles.css
['registration'] = {'id-lock-registration', 'Free registration required'},
['limited'] = {'id-lock-limited', 'Free access subject to limited trial, subscription normally required'},
['subscription'] = {'id-lock-subscription', 'Paid subscription required'},
}
--[[--------------------------< T A R G E T _ C H E C K >------------------------------------------------------
look for anchor_id (CITEREF name-list and year or text from |ref=) in anchor_id_list
the 'no target' error may be suppressed with |ignore-err=yes when target cannot be found because target is inside
a template that wraps another template; 'multiple targets' error may not be suppressed
]]
local function target_check (anchor_id, ignore)
local number = anchor_id_list[anchor_id]; -- nil when anchor_id not in list; else a number
local msg;
local category;
if not number then
if ignore then
return ''; -- if ignore is true then no message, no category
end
msg = 'no target: ' .. anchor_id; -- anchor_id not found in this article
elseif 1 < number then
msg = 'multiple targets (' .. number .. '×): ' .. anchor_id; -- more than one anchor_id in this article
end
category = 0 == mw.title.getCurrentTitle().namespace and '[[Category:Harv and Sfn template errors]]' or ''; -- only categorize in article space
--use this version to show error messages
return msg and ' <span class="error harv-error" style="display: inline; font-size:100%">Harvc error: ' .. msg .. ' ([[:Category:Harv and Sfn template errors|help]])</span>' .. category or '';
--use this version to hide error messages
-- return msg and ' <span class="error harv-error" style="display: none; font-size:100%">Harvc error: ' .. msg .. ' ([[:Category:Harv and Sfn template errors|help]])</span>' .. category or '';
end
--[[--------------------------< I S _ S E T >------------------------------------------------------------------
Whether variable is set or not. A varable is set when it is not nil and not empty.
]]
local function is_set( var )
return not (var == nil or var == '');
end
--[[--------------------------< C H E C K _ Y E A R S >--------------------------------------------------------
evaluates params to see if they are one of these forms with or without lowercase letter disambiguator (same as in
Module:Footnotes):
YYYY
n.d.
nd
c. YYYY
YYYY–YYYY (separator is endash)
YYYY–YY (separator is endash)
when anchor_year present, year portion must be same as year param and must have disambiguator
returns empty string when params have correct form; error message else
]]
local function check_years (year, anchor_year)
local y, ay;
if not is_set (year) then -- year is required so return error message when not set
return ' missing ' .. code_open_tag .. '|year=</code>.';
end
local patterns = { -- allowed year patterns from Module:Footnotes (captures added here)
'^(%d%d%d%d?)%l?$', -- YYY or YYYY
'^(n%.d%.)%l?$', -- n.d.
'^(nd)%l?$', -- nd
'^(c%. %d%d%d%d?)%l?$', -- c. YYY or c. YYYY
'^(%d%d%d%d–%d%d%d%d)%l?$', -- YYYY–YYYY
'^(%d%d%d%d–%d%d)%l?$' -- YYYY–YY
}
for _, pattern in ipairs (patterns) do -- spin through the patterns
y = year:match (pattern); -- y is the year portion
if y then
break; -- when y is set, we found a match so done
end
end
if not y then
return ' invalid ' .. code_open_tag .. '|year=</code>.'; -- y not set, so year is malformed
end
if is_set (anchor_year) then -- anchor_year is optional
for _, pattern in ipairs (patterns) do -- spin through the patterns
ay = anchor_year:match (pattern); -- ay is the year portion
if ay then
break; -- when ay is set, we found a match so done
end
end
if not ay then
return ' invalid ' .. code_open_tag .. '|anchor-year</code>.'; -- ay not set, so anchor_year is malformed
end
-- if not anchor_year:match ('%l$') then
-- return ' ' .. code_open_tag .. '|anchor-year=</code> missing dab.'; -- anchor_year must end with a disambiguator letter
-- end
if y ~= ay then
return ' ' .. code_open_tag .. '|year=</code> / ' .. code_open_tag .. '|anchor-year=</code> mismatch.'; -- 'year' portions of year and anchor_year must be the same
end
end
return ''; -- both years are good; empty string for concatenation
end
--[[--------------------------< M A K E _ N A M E >------------------------------------------------------------
Assembles last, first, link, or mask into a displayable contributor name.
]]
local function make_name (last, first, link, mask)
local name = last;
if is_set (first) then
name = name .. ', ' .. first; -- concatenate first onto last
end
if is_set (link) then
name = '[[' .. link .. '|' .. name .. ']]'; -- form a wikilink around the name
end
if is_set (mask) then -- mask this author
if tonumber(mask) then
name = string.rep ('—', mask) -- make a string that number length of mdashes
else
name = mask; -- mask is not a number so use the mask text
end
end
return name;
end
--[[--------------------------< C O R E >----------------------------------------------------------------------
Assembles the various parts provided by the template into a properly formatted bridging citation. Adds punctuation
and text; encloses the whole within a span with id and class attributes.
This creates a CITEREF anchor from |last1= through |last4= and |year=. It also creates a CITEREF link from |in1= through
|in4= and |year=. It is presumed that the dates of contributions are the same as the date of the enclosing work.
Even though not displayed, a year parameter is still required for the CITEREF anchor
]]
local function core( args )
local span_open_tag; -- holds CITEREF and css
local contributors = ''; -- chapter or contribution authors
local source = ''; -- editor/author date list that forms a CITEREF link to a full citation
local in_text = ' In ';
local result; -- the assemby of the above output
-- form the CITEREF anchor
if is_set (args.id) then
args.id = mw.uri.anchorEncode (args.id)
span_open_tag = '<span id="' .. args.id .. '" class="citation">'; -- for use when contributor name is same as source name
else
local citeref = 'CITEREF' .. table.concat (args.citeref) .. (is_set (args['anchor-year']) and args['anchor-year'] or args.year);
citeref = mw.uri.anchorEncode (citeref);
span_open_tag = '<span id="' .. citeref .. '" class="citation">';
end
--[[
form the contributors display list:
if |name-list-style=harv, display is similar to {{sfn}} and {{harv}}, 1 to 4 last names;
if |display-authors= is empty or omitted, display is similar to cs1|2: display all names in last, first order
if |display-authors=etal then displays all author names in last, first order and append et al.
if value assigned to |display-authors= is less than the number of author last names, displays the specified number of author names in last, first order followed by et al.
]]
if 'harv' ~= args.name_list_style then -- default cs1|2 style contributor list
local i = 1;
local count;
local etal = false; -- when |display-authors= is same as number of authors in contributor list
if is_set (args.display_authors) then
if 'etal' == args.display_authors:lower():gsub("[ '%.]", '') then -- the :gsub() portion makes 'etal' from a variety of 'et al.' spellings and stylings
count = #args.last; -- display all authors and ...
etal = true; -- ... append 'et al.'
else
count = tonumber (args.display_authors) or 0; -- 0 if can't be converted to a number
if 0 >= count then
args.err_msg = args.err_msg .. ' invalid ' .. code_open_tag .. '|display-authors=</code>'; -- if zero, then emit error message
end
end
if count > #args.last then
count = #args.last; -- when |display-authors= is more than the number of authors, use the number of authors
end
if count < #args.last then -- when |display-authors= is less than the number of authors
etal = true; -- append 'et al.'
end
else
count = #args.last; -- set count to display all of the authors
end
while i <= count do
if is_set (contributors) then
contributors = contributors .. '; ' .. make_name (args.last[i], args.first[i], args.link[i], args.mask[i]); -- the rest of the contributors
else
contributors = make_name (args.last[i], args.first[i], args.link[i], args.mask[i]); -- first contributor's name
end
i = i+1; -- bump the index
end
if true == etal then
contributors = contributors .. ' et al.'; -- append et al.
elseif 'amp' == args.name_list_style then
contributors = contributors:gsub('; ([^;]+)$', ' & %1') -- replace last separator with ' & '
end
else -- do default harv- or sfn-style contributor display
if 4 <= #args.last then -- four or more contributors (first followed by et al.)
contributors = args.last[1] .. ' et al.';
elseif 3 == #args.last then -- three (display them all)
contributors = args.last[1] .. ', ' .. args.last[2] .. ' & ' .. args.last[3];
elseif 2 == #args.last then -- two (first & second)
contributors = args.last[1] .. ' & ' .. args.last[2];
elseif 1 == #args.last then -- just one (first)
contributors = args.last[1];
else
args.err_msg = args.err_msg .. ' no authors in contributor list.'; -- this code used to find holes in the list; no more
end
end
--form the source author-date list
if is_set (args.in4) and is_set (args.in3) and is_set (args.in2) and is_set (args.in1) then
source = args.in1 .. ' et al.';
elseif not is_set (args.in4) and is_set (args.in3) and is_set (args.in2) and is_set (args.in1) then
source = args.in1 .. ', ' .. args.in2 .. ' & ' .. args.in3;
elseif not is_set (args.in4) and not is_set (args.in3) and is_set (args.in2) and is_set (args.in1) then
source = args.in1 .. ' & ' .. args.in2;
elseif not is_set (args.in4) and not is_set (args.in3) and not is_set (args.in2) and is_set (args.in1) then
source = args.in1;
else
args.err_msg = args.err_msg .. ' author missing from source list.'
end
source = source .. ' ' .. args.open .. args.year .. args.close; -- add the year with or without brackets
--assemble CITEREF wikilink
local anchor_id;
local target_err_msg;
if '' ~= args.ref then
anchor_id = mw.uri.anchorEncode (args.ref)
else
anchor_id = mw.uri.anchorEncode(table.concat ({'CITEREF', args.in1, args.in2, args.in3, args.in4, args.year}));
end
target_err_msg = target_check (anchor_id, args.ignore); -- see if there is a target for this anchor_id
source = '[[#' .. anchor_id .. "|" .. source .. "]]";
--combine contribution with url to make external link
if args.url ~= '' then
args.contribution = '[' .. args.url .. ' ' .. args.contribution .. ']'; -- format external link
if args['url-access'] then
if lock_icons[args['url-access']] then
args.contribution = table.concat ({ -- add access icon markup to this item
'<span class="', -- open the opening span tag; icon classes are defined in Module:Citation/CS1/styles.css
lock_icons[args['url-access']][1], -- add the appropriate lock icon class
'" title="', -- and the title attribute
lock_icons[args['url-access']][2], -- for an appropriate tool tip
'">', -- close the opening span tag
args.contribution,
'</span>', -- and close the span
});
end
end
end
if is_set (args['anchor-year']) then
contributors = contributors .. ' (' .. args['anchor-year'] .. ')' .. args.sepc;
elseif args.sepc ~= contributors:sub(-1) and args.sepc .. ']]' ~= contributors:sub(-3) then
contributors = contributors .. args.sepc; -- add separator if not same as last character in name list (|first=John S. or et al.)
end
-- pages and other insource location
if args.p ~= '' then
args.p = args.page_sep .. args.p;
elseif args.pp ~= '' then
args.p = args.pages_sep .. args.pp; -- args.p not set so use it to hold common insource location info
end
if args.loc ~= '' then
args.p = args.p .. ', ' .. args.loc; -- add arg.loc to args.p
end
--wrap error messages in span and add help link
if is_set (args.err_msg) then
args.err_msg = '<span style="font-size:100%" class="error"> harvc:' .. args.err_msg .. ' ([[Template:Harvc|help]])</span>';
end
if ',' == args.sepc then
in_text = in_text:lower(); -- CS2 style use lower case
end
-- and put it all together
result = span_open_tag .. contributors .. ' "' .. args.contribution .. '"' .. args.sepc .. in_text .. source .. args.p .. args.ps .. args.err_msg .. target_err_msg .. '</span>';
return result;
end
--[[--------------------------< H A R V C >--------------------------------------------------------------------
Entry point from {{harvc}} template. Fetches parent frame parameters, does a bit of simple error checking
]]
local function harvc (frame)
local args = {
err_msg = '',
page_sep = ", p. ",
pages_sep = ", pp. ",
sepc = '.',
ps = '.',
open = '(', -- year brackets for source year
close = ')',
last = {},
first = {},
link = {},
mask = {},
citeref = {}
}
local pframe = frame:getParent();
args.contribution = pframe.args.c or -- chapter or contribution
pframe.args.chapter or
pframe.args.contribution or '';
args.id = pframe.args.id or '';
args.in1 = pframe.args['in'] or pframe.args.in1 or ''; -- source editor surnames; 'in' is a Lua reserved keyword
args.in2 = pframe.args.in2 or '';
args.in3 = pframe.args.in3 or '';
args.in4 = pframe.args.in4 or '';
args.display_authors = pframe.args['display-authors']; -- the number of contributor names to display; cs1|2 format includes first names
args.name_list_style = pframe.args['name-list-style'] or ''; -- when set to 'harv' display contributor list in sfn or harv style
args.name_list_style = args.name_list_style:lower(); -- make it case agnostic
if is_set (pframe.args.last) or is_set (pframe.args.last1) or
is_set (pframe.args.author) or is_set (pframe.args.author1) then -- must have at least this to continue
args.last[1] = pframe.args.last or pframe.args.last1 or pframe.args.author or pframe.args.author1; -- get first contributor's last name
args.citeref[1] = args.last[1]; -- add it to the citeref
args.first[1] = pframe.args.first or pframe.args.first1; -- get first contributor's first name
args.link[1] = pframe.args['author-link'] or pframe.args['author-link1']; -- get first contributor's article link
args.mask[1] = pframe.args['author-mask'] or pframe.args['author-mask1']; -- get first contributor's article link
local i = 2; -- index for the rest of the names
while is_set (pframe.args['last'..i]) or is_set (pframe.args['author'..i]) do -- loop through pframe.args and get the rest of the names
args.last[i] = pframe.args['last'..i] or pframe.args['author'..i]; -- last names
args.first[i] = pframe.args['first'..i]; -- first names
args.link[i] = pframe.args['author-link'..i]; -- links
args.mask[i] = pframe.args['author-mask'..i]; -- masks
if 5 > i then
args.citeref[i] = args.last[i]; -- collect first four last names for CITEREF anchor
end
i = i + 1 -- bump the index
end
end
args.p = pframe.args.p or pframe.args.page or ''; -- source page number(s) or location
args.pp = pframe.args.pp or pframe.args.pages or '';
args.loc = pframe.args.loc or '';
args.ref = pframe.args.ref or pframe.args.Ref or ''; -- used to match |ref=<text> in cs1|2 source template
args.ignore = 'yes' == pframe.args['ignore-err']; -- suppress false-positive 'no target' errors
if 'cs2' == pframe.args.mode then
args.ps = ''; -- set postscript character to empty string, cs2 mode
args.sepc = ','; -- set seperator character to comma, cs2 mode
end
do -- to limit scope of local temp
local temp = pframe.args.ps or pframe.args.postscript;
if is_set (temp) then
if 'none' == temp:lower() then -- if |ps=none or |postscript=none then
args.ps = ''; -- no postscript
else
args.ps = temp; -- override default postscript
end
end
end -- end of scope limit
if 'yes' == pframe.args.nb then -- if no brackets around year in link to cs1|2 template
args.open = ''; -- unset these
args.close = '';
end
args.url = pframe.args.url or -- url for chapter or contribution
pframe.args['chapter-url'] or
pframe.args['contribution-url'] or '';
args['url-access'] = pframe.args['url-access'];
args.year = pframe.args.year or ''; -- required
args['anchor-year'] = pframe.args['anchor-year'] or '';
args.err_msg = args.err_msg .. check_years (args.year, args['anchor-year']);
if not is_set (args.contribution) then
args.err_msg = args.err_msg .. ' required contribution is missing.'; -- error message if source not provided
args.contribution = args.url; -- if set it will give us linkable text
end
if args.last[1] == args.in1 and
args.last[2] == args.in2 and
args.last[3] == args.in3 and
args.last[4] == args.in4 and
not is_set (args.id) then
args.err_msg = args.err_msg .. ' required ' .. code_open_tag .. '|id=</code> parameter missing.'; -- error message if contributor and source are the same
end
return table.concat ({frame:extensionTag ('templatestyles', '', {src='Module:Citation/CS1/styles.css'}), core (args)});
end
--[[--------------------------< E X P O R T E D F U N C T I O N S >------------------------------------------
]]
return {
harvc = harvc
};
7y9hqh842jjlaq9kij2at2lfzcxbobs
801901
801900
2021-12-10T18:53:03Z
en>Trappist the monk
0
801901
Scribunto
text/plain
require('Module:No globals')
local anchor_id_list = mw.loadData ('Module:Footnotes/anchor_id_list').anchor_id_list;
local code_open_tag = '<code class="cs1-code">'; -- cs1-code class defined in Module:Citation/CS1/styles.css
local lock_icons = { --icon classes are defined in Module:Citation/CS1/styles.css
['registration'] = {'id-lock-registration', 'Free registration required'},
['limited'] = {'id-lock-limited', 'Free access subject to limited trial, subscription normally required'},
['subscription'] = {'id-lock-subscription', 'Paid subscription required'},
}
--[[--------------------------< T A R G E T _ C H E C K >------------------------------------------------------
look for anchor_id (CITEREF name-list and year or text from |ref=) in anchor_id_list
the 'no target' error may be suppressed with |ignore-err=yes when target cannot be found because target is inside
a template that wraps another template; 'multiple targets' error may not be suppressed
]]
local function target_check (anchor_id, ignore)
local number = anchor_id_list[anchor_id]; -- nil when anchor_id not in list; else a number
local msg;
local category;
if not number then
if ignore then
return ''; -- if ignore is true then no message, no category
end
msg = 'no target: ' .. anchor_id; -- anchor_id not found in this article
elseif 1 < number then
msg = 'multiple targets (' .. number .. '×): ' .. anchor_id; -- more than one anchor_id in this article
end
category = 0 == mw.title.getCurrentTitle().namespace and '[[Category:Harv and Sfn template errors]]' or ''; -- only categorize in article space
--use this version to show error messages
return msg and ' <span class="error harv-error" style="display: inline; font-size:100%">Harvc error: ' .. msg .. ' ([[:Category:Harv and Sfn template errors|help]])</span>' .. category or '';
--use this version to hide error messages
-- return msg and ' <span class="error harv-error" style="display: none; font-size:100%">Harvc error: ' .. msg .. ' ([[:Category:Harv and Sfn template errors|help]])</span>' .. category or '';
end
--[[--------------------------< I S _ S E T >------------------------------------------------------------------
Whether variable is set or not. A varable is set when it is not nil and not empty.
]]
local function is_set( var )
return not (var == nil or var == '');
end
--[[--------------------------< C H E C K _ Y E A R S >--------------------------------------------------------
evaluates params to see if they are one of these forms with or without lowercase letter disambiguator (same as in
Module:Footnotes):
YYYY
n.d.
nd
c. YYYY
YYYY–YYYY (separator is endash)
YYYY–YY (separator is endash)
when anchor_year present, year portion must be same as year param and must have disambiguator
returns empty string when params have correct form; error message else
]]
local function check_years (year, anchor_year)
local y, ay;
if not is_set (year) then -- year is required so return error message when not set
return ' missing ' .. code_open_tag .. '|year=</code>.';
end
local patterns = { -- allowed year patterns from Module:Footnotes (captures added here)
'^(%d%d%d%d?)%l?$', -- YYY or YYYY
'^(n%.d%.)%l?$', -- n.d.
'^(nd)%l?$', -- nd
'^(c%. %d%d%d%d?)%l?$', -- c. YYY or c. YYYY
'^(%d%d%d%d–%d%d%d%d)%l?$', -- YYYY–YYYY
'^(%d%d%d%d–%d%d)%l?$' -- YYYY–YY
}
for _, pattern in ipairs (patterns) do -- spin through the patterns
y = year:match (pattern); -- y is the year portion
if y then
break; -- when y is set, we found a match so done
end
end
if not y then
return ' invalid ' .. code_open_tag .. '|year=</code>.'; -- y not set, so year is malformed
end
if is_set (anchor_year) then -- anchor_year is optional
for _, pattern in ipairs (patterns) do -- spin through the patterns
ay = anchor_year:match (pattern); -- ay is the year portion
if ay then
break; -- when ay is set, we found a match so done
end
end
if not ay then
return ' invalid ' .. code_open_tag .. '|anchor-year</code>.'; -- ay not set, so anchor_year is malformed
end
-- if not anchor_year:match ('%l$') then
-- return ' ' .. code_open_tag .. '|anchor-year=</code> missing dab.'; -- anchor_year must end with a disambiguator letter
-- end
if y ~= ay then
return ' ' .. code_open_tag .. '|year=</code> / ' .. code_open_tag .. '|anchor-year=</code> mismatch.'; -- 'year' portions of year and anchor_year must be the same
end
end
return ''; -- both years are good; empty string for concatenation
end
--[[--------------------------< M A K E _ N A M E >------------------------------------------------------------
Assembles last, first, link, or mask into a displayable contributor name.
]]
local function make_name (last, first, link, mask)
local name = last;
if is_set (first) then
name = name .. ', ' .. first; -- concatenate first onto last
end
if is_set (link) then
name = '[[' .. link .. '|' .. name .. ']]'; -- form a wikilink around the name
end
if is_set (mask) then -- mask this author
if tonumber(mask) then
name = string.rep ('—', mask) -- make a string that number length of mdashes
else
name = mask; -- mask is not a number so use the mask text
end
end
return name;
end
--[[--------------------------< C O R E >----------------------------------------------------------------------
Assembles the various parts provided by the template into a properly formatted bridging citation. Adds punctuation
and text; encloses the whole within a span with id and class attributes.
This creates a CITEREF anchor from |last1= through |last4= and |year=. It also creates a CITEREF link from |in1= through
|in4= and |year=. It is presumed that the dates of contributions are the same as the date of the enclosing work.
Even though not displayed, a year parameter is still required for the CITEREF anchor
]]
local function core( args )
local span_open_tag; -- holds CITEREF and css
local contributors = ''; -- chapter or contribution authors
local source = ''; -- editor/author date list that forms a CITEREF link to a full citation
local in_text = ' In ';
-- form the CITEREF anchor
if is_set (args.id) then
args.id = mw.uri.anchorEncode (args.id)
span_open_tag = '<span id="' .. args.id .. '" class="citation">'; -- for use when contributor name is same as source name
else
local citeref = 'CITEREF' .. table.concat (args.citeref) .. (is_set (args['anchor-year']) and args['anchor-year'] or args.year);
citeref = mw.uri.anchorEncode (citeref);
span_open_tag = '<span id="' .. citeref .. '" class="citation">';
end
--[[
form the contributors display list:
if |name-list-style=harv, display is similar to {{sfn}} and {{harv}}, 1 to 4 last names;
if |display-authors= is empty or omitted, display is similar to cs1|2: display all names in last, first order
if |display-authors=etal then displays all author names in last, first order and append et al.
if value assigned to |display-authors= is less than the number of author last names, displays the specified number of author names in last, first order followed by et al.
]]
if 'harv' ~= args.name_list_style then -- default cs1|2 style contributor list
local i = 1;
local count;
local etal = false; -- when |display-authors= is same as number of authors in contributor list
if is_set (args.display_authors) then
if 'etal' == args.display_authors:lower():gsub("[ '%.]", '') then -- the :gsub() portion makes 'etal' from a variety of 'et al.' spellings and stylings
count = #args.last; -- display all authors and ...
etal = true; -- ... append 'et al.'
else
count = tonumber (args.display_authors) or 0; -- 0 if can't be converted to a number
if 0 >= count then
args.err_msg = args.err_msg .. ' invalid ' .. code_open_tag .. '|display-authors=</code>'; -- if zero, then emit error message
end
end
if count > #args.last then
count = #args.last; -- when |display-authors= is more than the number of authors, use the number of authors
end
if count < #args.last then -- when |display-authors= is less than the number of authors
etal = true; -- append 'et al.'
end
else
count = #args.last; -- set count to display all of the authors
end
while i <= count do
if is_set (contributors) then
contributors = contributors .. '; ' .. make_name (args.last[i], args.first[i], args.link[i], args.mask[i]); -- the rest of the contributors
else
contributors = make_name (args.last[i], args.first[i], args.link[i], args.mask[i]); -- first contributor's name
end
i = i+1; -- bump the index
end
if true == etal then
contributors = contributors .. ' et al.'; -- append et al.
elseif 'amp' == args.name_list_style then
contributors = contributors:gsub('; ([^;]+)$', ' & %1') -- replace last separator with ' & '
end
else -- do default harv- or sfn-style contributor display
if 4 <= #args.last then -- four or more contributors (first followed by et al.)
contributors = args.last[1] .. ' et al.';
elseif 3 == #args.last then -- three (display them all)
contributors = args.last[1] .. ', ' .. args.last[2] .. ' & ' .. args.last[3];
elseif 2 == #args.last then -- two (first & second)
contributors = args.last[1] .. ' & ' .. args.last[2];
elseif 1 == #args.last then -- just one (first)
contributors = args.last[1];
else
args.err_msg = args.err_msg .. ' no authors in contributor list.'; -- this code used to find holes in the list; no more
end
end
--form the source author-date list
if is_set (args.in4) and is_set (args.in3) and is_set (args.in2) and is_set (args.in1) then
source = args.in1 .. ' et al.';
elseif not is_set (args.in4) and is_set (args.in3) and is_set (args.in2) and is_set (args.in1) then
source = args.in1 .. ', ' .. args.in2 .. ' & ' .. args.in3;
elseif not is_set (args.in4) and not is_set (args.in3) and is_set (args.in2) and is_set (args.in1) then
source = args.in1 .. ' & ' .. args.in2;
elseif not is_set (args.in4) and not is_set (args.in3) and not is_set (args.in2) and is_set (args.in1) then
source = args.in1;
else
args.err_msg = args.err_msg .. ' author missing from source list.'
end
source = source .. ' ' .. args.open .. args.year .. args.close; -- add the year with or without brackets
--assemble CITEREF wikilink
local anchor_id;
local target_err_msg;
if '' ~= args.ref then
anchor_id = mw.uri.anchorEncode (args.ref)
else
anchor_id = mw.uri.anchorEncode(table.concat ({'CITEREF', args.in1, args.in2, args.in3, args.in4, args.year}));
end
target_err_msg = target_check (anchor_id, args.ignore); -- see if there is a target for this anchor_id
source = '[[#' .. anchor_id .. "|" .. source .. "]]";
-- special case for afterword, foreword, introduction, preface
local no_quotes = ({['afterword']=true, ['foreword']=true, ['introduction']=true, ['preface']=true})[args.contribution:lower()];
--combine contribution with url to make external link
if args.url ~= '' then
args.contribution = '[' .. args.url .. ' ' .. args.contribution .. ']'; -- format external link
if args['url-access'] then
if lock_icons[args['url-access']] then
args.contribution = table.concat ({ -- add access icon markup to this item
'<span class="', -- open the opening span tag; icon classes are defined in Module:Citation/CS1/styles.css
lock_icons[args['url-access']][1], -- add the appropriate lock icon class
'" title="', -- and the title attribute
lock_icons[args['url-access']][2], -- for an appropriate tool tip
'">', -- close the opening span tag
args.contribution,
'</span>', -- and close the span
});
end
end
end
if is_set (args['anchor-year']) then
contributors = contributors .. ' (' .. args['anchor-year'] .. ')' .. args.sepc;
elseif args.sepc ~= contributors:sub(-1) and args.sepc .. ']]' ~= contributors:sub(-3) then
contributors = contributors .. args.sepc; -- add separator if not same as last character in name list (|first=John S. or et al.)
end
-- pages and other insource location
if args.p ~= '' then
args.p = args.page_sep .. args.p;
elseif args.pp ~= '' then
args.p = args.pages_sep .. args.pp; -- args.p not set so use it to hold common insource location info
end
if args.loc ~= '' then
args.p = args.p .. ', ' .. args.loc; -- add arg.loc to args.p
end
--wrap error messages in span and add help link
if is_set (args.err_msg) then
args.err_msg = '<span style="font-size:100%" class="error"> harvc:' .. args.err_msg .. ' ([[Template:Harvc|help]])</span>';
end
if ',' == args.sepc then
in_text = in_text:lower(); -- CS2 style use lower case
end
-- and put it all together
local result = {}; -- the assemby of the above output
table.insert (result, span_open_tag);
table.insert (result, contributors);
table.insert (result, no_quotes and ' ' or ' "'); -- foreword, afterword, introduction, preface contributions are not quoted; all other contributions are
table.insert (result, args.contribution);
table.insert (result, no_quotes and '' or '"'); -- foreword, afterword, introduction, preface contributions are not quoted; all other contributions are
table.insert (result, args.sepc);
table.insert (result, in_text);
table.insert (result, source);
table.insert (result, args.p);
table.insert (result, args.ps);
table.insert (result, args.err_msg);
table.insert (result, target_err_msg);
table.insert (result, '</span>');
return table.concat (result); -- make a string and done
end
--[[--------------------------< H A R V C >--------------------------------------------------------------------
Entry point from {{harvc}} template. Fetches parent frame parameters, does a bit of simple error checking
]]
local function harvc (frame)
local args = {
err_msg = '',
page_sep = ", p. ",
pages_sep = ", pp. ",
sepc = '.',
ps = '.',
open = '(', -- year brackets for source year
close = ')',
last = {},
first = {},
link = {},
mask = {},
citeref = {}
}
local pframe = frame:getParent();
args.contribution = pframe.args.c or -- chapter or contribution
pframe.args.chapter or
pframe.args.contribution or '';
args.id = pframe.args.id or '';
args.in1 = pframe.args['in'] or pframe.args.in1 or ''; -- source editor surnames; 'in' is a Lua reserved keyword
args.in2 = pframe.args.in2 or '';
args.in3 = pframe.args.in3 or '';
args.in4 = pframe.args.in4 or '';
args.display_authors = pframe.args['display-authors']; -- the number of contributor names to display; cs1|2 format includes first names
args.name_list_style = pframe.args['name-list-style'] or ''; -- when set to 'harv' display contributor list in sfn or harv style
args.name_list_style = args.name_list_style:lower(); -- make it case agnostic
if is_set (pframe.args.last) or is_set (pframe.args.last1) or
is_set (pframe.args.author) or is_set (pframe.args.author1) then -- must have at least this to continue
args.last[1] = pframe.args.last or pframe.args.last1 or pframe.args.author or pframe.args.author1; -- get first contributor's last name
args.citeref[1] = args.last[1]; -- add it to the citeref
args.first[1] = pframe.args.first or pframe.args.first1; -- get first contributor's first name
args.link[1] = pframe.args['author-link'] or pframe.args['author-link1']; -- get first contributor's article link
args.mask[1] = pframe.args['author-mask'] or pframe.args['author-mask1']; -- get first contributor's article link
local i = 2; -- index for the rest of the names
while is_set (pframe.args['last'..i]) or is_set (pframe.args['author'..i]) do -- loop through pframe.args and get the rest of the names
args.last[i] = pframe.args['last'..i] or pframe.args['author'..i]; -- last names
args.first[i] = pframe.args['first'..i]; -- first names
args.link[i] = pframe.args['author-link'..i]; -- links
args.mask[i] = pframe.args['author-mask'..i]; -- masks
if 5 > i then
args.citeref[i] = args.last[i]; -- collect first four last names for CITEREF anchor
end
i = i + 1 -- bump the index
end
end
args.p = pframe.args.p or pframe.args.page or ''; -- source page number(s) or location
args.pp = pframe.args.pp or pframe.args.pages or '';
args.loc = pframe.args.loc or '';
args.ref = pframe.args.ref or pframe.args.Ref or ''; -- used to match |ref=<text> in cs1|2 source template
args.ignore = 'yes' == pframe.args['ignore-err']; -- suppress false-positive 'no target' errors
if 'cs2' == pframe.args.mode then
args.ps = ''; -- set postscript character to empty string, cs2 mode
args.sepc = ','; -- set seperator character to comma, cs2 mode
end
do -- to limit scope of local temp
local temp = pframe.args.ps or pframe.args.postscript;
if is_set (temp) then
if 'none' == temp:lower() then -- if |ps=none or |postscript=none then
args.ps = ''; -- no postscript
else
args.ps = temp; -- override default postscript
end
end
end -- end of scope limit
if 'yes' == pframe.args.nb then -- if no brackets around year in link to cs1|2 template
args.open = ''; -- unset these
args.close = '';
end
args.url = pframe.args.url or -- url for chapter or contribution
pframe.args['chapter-url'] or
pframe.args['contribution-url'] or '';
args['url-access'] = pframe.args['url-access'];
args.year = pframe.args.year or ''; -- required
args['anchor-year'] = pframe.args['anchor-year'] or '';
args.err_msg = args.err_msg .. check_years (args.year, args['anchor-year']);
if not is_set (args.contribution) then
args.err_msg = args.err_msg .. ' required contribution is missing.'; -- error message if source not provided
args.contribution = args.url; -- if set it will give us linkable text
end
if args.last[1] == args.in1 and
args.last[2] == args.in2 and
args.last[3] == args.in3 and
args.last[4] == args.in4 and
not is_set (args.id) then
args.err_msg = args.err_msg .. ' required ' .. code_open_tag .. '|id=</code> parameter missing.'; -- error message if contributor and source are the same
end
return table.concat ({frame:extensionTag ('templatestyles', '', {src='Module:Citation/CS1/styles.css'}), core (args)});
end
--[[--------------------------< E X P O R T E D F U N C T I O N S >------------------------------------------
]]
return {
harvc = harvc
};
8ovx7rqavc7kczyf7gwcltfpsxk4dad
801902
801901
2022-01-15T17:59:58Z
en>MusikBot II
0
Protected "[[Module:Harvc]]": [[Wikipedia:High-risk templates|High-risk template or module]]: 251 transclusions ([[User:MusikBot II/TemplateProtector|more info]]) ([Edit=Require autoconfirmed or confirmed access] (indefinite))
801901
Scribunto
text/plain
require('Module:No globals')
local anchor_id_list = mw.loadData ('Module:Footnotes/anchor_id_list').anchor_id_list;
local code_open_tag = '<code class="cs1-code">'; -- cs1-code class defined in Module:Citation/CS1/styles.css
local lock_icons = { --icon classes are defined in Module:Citation/CS1/styles.css
['registration'] = {'id-lock-registration', 'Free registration required'},
['limited'] = {'id-lock-limited', 'Free access subject to limited trial, subscription normally required'},
['subscription'] = {'id-lock-subscription', 'Paid subscription required'},
}
--[[--------------------------< T A R G E T _ C H E C K >------------------------------------------------------
look for anchor_id (CITEREF name-list and year or text from |ref=) in anchor_id_list
the 'no target' error may be suppressed with |ignore-err=yes when target cannot be found because target is inside
a template that wraps another template; 'multiple targets' error may not be suppressed
]]
local function target_check (anchor_id, ignore)
local number = anchor_id_list[anchor_id]; -- nil when anchor_id not in list; else a number
local msg;
local category;
if not number then
if ignore then
return ''; -- if ignore is true then no message, no category
end
msg = 'no target: ' .. anchor_id; -- anchor_id not found in this article
elseif 1 < number then
msg = 'multiple targets (' .. number .. '×): ' .. anchor_id; -- more than one anchor_id in this article
end
category = 0 == mw.title.getCurrentTitle().namespace and '[[Category:Harv and Sfn template errors]]' or ''; -- only categorize in article space
--use this version to show error messages
return msg and ' <span class="error harv-error" style="display: inline; font-size:100%">Harvc error: ' .. msg .. ' ([[:Category:Harv and Sfn template errors|help]])</span>' .. category or '';
--use this version to hide error messages
-- return msg and ' <span class="error harv-error" style="display: none; font-size:100%">Harvc error: ' .. msg .. ' ([[:Category:Harv and Sfn template errors|help]])</span>' .. category or '';
end
--[[--------------------------< I S _ S E T >------------------------------------------------------------------
Whether variable is set or not. A varable is set when it is not nil and not empty.
]]
local function is_set( var )
return not (var == nil or var == '');
end
--[[--------------------------< C H E C K _ Y E A R S >--------------------------------------------------------
evaluates params to see if they are one of these forms with or without lowercase letter disambiguator (same as in
Module:Footnotes):
YYYY
n.d.
nd
c. YYYY
YYYY–YYYY (separator is endash)
YYYY–YY (separator is endash)
when anchor_year present, year portion must be same as year param and must have disambiguator
returns empty string when params have correct form; error message else
]]
local function check_years (year, anchor_year)
local y, ay;
if not is_set (year) then -- year is required so return error message when not set
return ' missing ' .. code_open_tag .. '|year=</code>.';
end
local patterns = { -- allowed year patterns from Module:Footnotes (captures added here)
'^(%d%d%d%d?)%l?$', -- YYY or YYYY
'^(n%.d%.)%l?$', -- n.d.
'^(nd)%l?$', -- nd
'^(c%. %d%d%d%d?)%l?$', -- c. YYY or c. YYYY
'^(%d%d%d%d–%d%d%d%d)%l?$', -- YYYY–YYYY
'^(%d%d%d%d–%d%d)%l?$' -- YYYY–YY
}
for _, pattern in ipairs (patterns) do -- spin through the patterns
y = year:match (pattern); -- y is the year portion
if y then
break; -- when y is set, we found a match so done
end
end
if not y then
return ' invalid ' .. code_open_tag .. '|year=</code>.'; -- y not set, so year is malformed
end
if is_set (anchor_year) then -- anchor_year is optional
for _, pattern in ipairs (patterns) do -- spin through the patterns
ay = anchor_year:match (pattern); -- ay is the year portion
if ay then
break; -- when ay is set, we found a match so done
end
end
if not ay then
return ' invalid ' .. code_open_tag .. '|anchor-year</code>.'; -- ay not set, so anchor_year is malformed
end
-- if not anchor_year:match ('%l$') then
-- return ' ' .. code_open_tag .. '|anchor-year=</code> missing dab.'; -- anchor_year must end with a disambiguator letter
-- end
if y ~= ay then
return ' ' .. code_open_tag .. '|year=</code> / ' .. code_open_tag .. '|anchor-year=</code> mismatch.'; -- 'year' portions of year and anchor_year must be the same
end
end
return ''; -- both years are good; empty string for concatenation
end
--[[--------------------------< M A K E _ N A M E >------------------------------------------------------------
Assembles last, first, link, or mask into a displayable contributor name.
]]
local function make_name (last, first, link, mask)
local name = last;
if is_set (first) then
name = name .. ', ' .. first; -- concatenate first onto last
end
if is_set (link) then
name = '[[' .. link .. '|' .. name .. ']]'; -- form a wikilink around the name
end
if is_set (mask) then -- mask this author
if tonumber(mask) then
name = string.rep ('—', mask) -- make a string that number length of mdashes
else
name = mask; -- mask is not a number so use the mask text
end
end
return name;
end
--[[--------------------------< C O R E >----------------------------------------------------------------------
Assembles the various parts provided by the template into a properly formatted bridging citation. Adds punctuation
and text; encloses the whole within a span with id and class attributes.
This creates a CITEREF anchor from |last1= through |last4= and |year=. It also creates a CITEREF link from |in1= through
|in4= and |year=. It is presumed that the dates of contributions are the same as the date of the enclosing work.
Even though not displayed, a year parameter is still required for the CITEREF anchor
]]
local function core( args )
local span_open_tag; -- holds CITEREF and css
local contributors = ''; -- chapter or contribution authors
local source = ''; -- editor/author date list that forms a CITEREF link to a full citation
local in_text = ' In ';
-- form the CITEREF anchor
if is_set (args.id) then
args.id = mw.uri.anchorEncode (args.id)
span_open_tag = '<span id="' .. args.id .. '" class="citation">'; -- for use when contributor name is same as source name
else
local citeref = 'CITEREF' .. table.concat (args.citeref) .. (is_set (args['anchor-year']) and args['anchor-year'] or args.year);
citeref = mw.uri.anchorEncode (citeref);
span_open_tag = '<span id="' .. citeref .. '" class="citation">';
end
--[[
form the contributors display list:
if |name-list-style=harv, display is similar to {{sfn}} and {{harv}}, 1 to 4 last names;
if |display-authors= is empty or omitted, display is similar to cs1|2: display all names in last, first order
if |display-authors=etal then displays all author names in last, first order and append et al.
if value assigned to |display-authors= is less than the number of author last names, displays the specified number of author names in last, first order followed by et al.
]]
if 'harv' ~= args.name_list_style then -- default cs1|2 style contributor list
local i = 1;
local count;
local etal = false; -- when |display-authors= is same as number of authors in contributor list
if is_set (args.display_authors) then
if 'etal' == args.display_authors:lower():gsub("[ '%.]", '') then -- the :gsub() portion makes 'etal' from a variety of 'et al.' spellings and stylings
count = #args.last; -- display all authors and ...
etal = true; -- ... append 'et al.'
else
count = tonumber (args.display_authors) or 0; -- 0 if can't be converted to a number
if 0 >= count then
args.err_msg = args.err_msg .. ' invalid ' .. code_open_tag .. '|display-authors=</code>'; -- if zero, then emit error message
end
end
if count > #args.last then
count = #args.last; -- when |display-authors= is more than the number of authors, use the number of authors
end
if count < #args.last then -- when |display-authors= is less than the number of authors
etal = true; -- append 'et al.'
end
else
count = #args.last; -- set count to display all of the authors
end
while i <= count do
if is_set (contributors) then
contributors = contributors .. '; ' .. make_name (args.last[i], args.first[i], args.link[i], args.mask[i]); -- the rest of the contributors
else
contributors = make_name (args.last[i], args.first[i], args.link[i], args.mask[i]); -- first contributor's name
end
i = i+1; -- bump the index
end
if true == etal then
contributors = contributors .. ' et al.'; -- append et al.
elseif 'amp' == args.name_list_style then
contributors = contributors:gsub('; ([^;]+)$', ' & %1') -- replace last separator with ' & '
end
else -- do default harv- or sfn-style contributor display
if 4 <= #args.last then -- four or more contributors (first followed by et al.)
contributors = args.last[1] .. ' et al.';
elseif 3 == #args.last then -- three (display them all)
contributors = args.last[1] .. ', ' .. args.last[2] .. ' & ' .. args.last[3];
elseif 2 == #args.last then -- two (first & second)
contributors = args.last[1] .. ' & ' .. args.last[2];
elseif 1 == #args.last then -- just one (first)
contributors = args.last[1];
else
args.err_msg = args.err_msg .. ' no authors in contributor list.'; -- this code used to find holes in the list; no more
end
end
--form the source author-date list
if is_set (args.in4) and is_set (args.in3) and is_set (args.in2) and is_set (args.in1) then
source = args.in1 .. ' et al.';
elseif not is_set (args.in4) and is_set (args.in3) and is_set (args.in2) and is_set (args.in1) then
source = args.in1 .. ', ' .. args.in2 .. ' & ' .. args.in3;
elseif not is_set (args.in4) and not is_set (args.in3) and is_set (args.in2) and is_set (args.in1) then
source = args.in1 .. ' & ' .. args.in2;
elseif not is_set (args.in4) and not is_set (args.in3) and not is_set (args.in2) and is_set (args.in1) then
source = args.in1;
else
args.err_msg = args.err_msg .. ' author missing from source list.'
end
source = source .. ' ' .. args.open .. args.year .. args.close; -- add the year with or without brackets
--assemble CITEREF wikilink
local anchor_id;
local target_err_msg;
if '' ~= args.ref then
anchor_id = mw.uri.anchorEncode (args.ref)
else
anchor_id = mw.uri.anchorEncode(table.concat ({'CITEREF', args.in1, args.in2, args.in3, args.in4, args.year}));
end
target_err_msg = target_check (anchor_id, args.ignore); -- see if there is a target for this anchor_id
source = '[[#' .. anchor_id .. "|" .. source .. "]]";
-- special case for afterword, foreword, introduction, preface
local no_quotes = ({['afterword']=true, ['foreword']=true, ['introduction']=true, ['preface']=true})[args.contribution:lower()];
--combine contribution with url to make external link
if args.url ~= '' then
args.contribution = '[' .. args.url .. ' ' .. args.contribution .. ']'; -- format external link
if args['url-access'] then
if lock_icons[args['url-access']] then
args.contribution = table.concat ({ -- add access icon markup to this item
'<span class="', -- open the opening span tag; icon classes are defined in Module:Citation/CS1/styles.css
lock_icons[args['url-access']][1], -- add the appropriate lock icon class
'" title="', -- and the title attribute
lock_icons[args['url-access']][2], -- for an appropriate tool tip
'">', -- close the opening span tag
args.contribution,
'</span>', -- and close the span
});
end
end
end
if is_set (args['anchor-year']) then
contributors = contributors .. ' (' .. args['anchor-year'] .. ')' .. args.sepc;
elseif args.sepc ~= contributors:sub(-1) and args.sepc .. ']]' ~= contributors:sub(-3) then
contributors = contributors .. args.sepc; -- add separator if not same as last character in name list (|first=John S. or et al.)
end
-- pages and other insource location
if args.p ~= '' then
args.p = args.page_sep .. args.p;
elseif args.pp ~= '' then
args.p = args.pages_sep .. args.pp; -- args.p not set so use it to hold common insource location info
end
if args.loc ~= '' then
args.p = args.p .. ', ' .. args.loc; -- add arg.loc to args.p
end
--wrap error messages in span and add help link
if is_set (args.err_msg) then
args.err_msg = '<span style="font-size:100%" class="error"> harvc:' .. args.err_msg .. ' ([[Template:Harvc|help]])</span>';
end
if ',' == args.sepc then
in_text = in_text:lower(); -- CS2 style use lower case
end
-- and put it all together
local result = {}; -- the assemby of the above output
table.insert (result, span_open_tag);
table.insert (result, contributors);
table.insert (result, no_quotes and ' ' or ' "'); -- foreword, afterword, introduction, preface contributions are not quoted; all other contributions are
table.insert (result, args.contribution);
table.insert (result, no_quotes and '' or '"'); -- foreword, afterword, introduction, preface contributions are not quoted; all other contributions are
table.insert (result, args.sepc);
table.insert (result, in_text);
table.insert (result, source);
table.insert (result, args.p);
table.insert (result, args.ps);
table.insert (result, args.err_msg);
table.insert (result, target_err_msg);
table.insert (result, '</span>');
return table.concat (result); -- make a string and done
end
--[[--------------------------< H A R V C >--------------------------------------------------------------------
Entry point from {{harvc}} template. Fetches parent frame parameters, does a bit of simple error checking
]]
local function harvc (frame)
local args = {
err_msg = '',
page_sep = ", p. ",
pages_sep = ", pp. ",
sepc = '.',
ps = '.',
open = '(', -- year brackets for source year
close = ')',
last = {},
first = {},
link = {},
mask = {},
citeref = {}
}
local pframe = frame:getParent();
args.contribution = pframe.args.c or -- chapter or contribution
pframe.args.chapter or
pframe.args.contribution or '';
args.id = pframe.args.id or '';
args.in1 = pframe.args['in'] or pframe.args.in1 or ''; -- source editor surnames; 'in' is a Lua reserved keyword
args.in2 = pframe.args.in2 or '';
args.in3 = pframe.args.in3 or '';
args.in4 = pframe.args.in4 or '';
args.display_authors = pframe.args['display-authors']; -- the number of contributor names to display; cs1|2 format includes first names
args.name_list_style = pframe.args['name-list-style'] or ''; -- when set to 'harv' display contributor list in sfn or harv style
args.name_list_style = args.name_list_style:lower(); -- make it case agnostic
if is_set (pframe.args.last) or is_set (pframe.args.last1) or
is_set (pframe.args.author) or is_set (pframe.args.author1) then -- must have at least this to continue
args.last[1] = pframe.args.last or pframe.args.last1 or pframe.args.author or pframe.args.author1; -- get first contributor's last name
args.citeref[1] = args.last[1]; -- add it to the citeref
args.first[1] = pframe.args.first or pframe.args.first1; -- get first contributor's first name
args.link[1] = pframe.args['author-link'] or pframe.args['author-link1']; -- get first contributor's article link
args.mask[1] = pframe.args['author-mask'] or pframe.args['author-mask1']; -- get first contributor's article link
local i = 2; -- index for the rest of the names
while is_set (pframe.args['last'..i]) or is_set (pframe.args['author'..i]) do -- loop through pframe.args and get the rest of the names
args.last[i] = pframe.args['last'..i] or pframe.args['author'..i]; -- last names
args.first[i] = pframe.args['first'..i]; -- first names
args.link[i] = pframe.args['author-link'..i]; -- links
args.mask[i] = pframe.args['author-mask'..i]; -- masks
if 5 > i then
args.citeref[i] = args.last[i]; -- collect first four last names for CITEREF anchor
end
i = i + 1 -- bump the index
end
end
args.p = pframe.args.p or pframe.args.page or ''; -- source page number(s) or location
args.pp = pframe.args.pp or pframe.args.pages or '';
args.loc = pframe.args.loc or '';
args.ref = pframe.args.ref or pframe.args.Ref or ''; -- used to match |ref=<text> in cs1|2 source template
args.ignore = 'yes' == pframe.args['ignore-err']; -- suppress false-positive 'no target' errors
if 'cs2' == pframe.args.mode then
args.ps = ''; -- set postscript character to empty string, cs2 mode
args.sepc = ','; -- set seperator character to comma, cs2 mode
end
do -- to limit scope of local temp
local temp = pframe.args.ps or pframe.args.postscript;
if is_set (temp) then
if 'none' == temp:lower() then -- if |ps=none or |postscript=none then
args.ps = ''; -- no postscript
else
args.ps = temp; -- override default postscript
end
end
end -- end of scope limit
if 'yes' == pframe.args.nb then -- if no brackets around year in link to cs1|2 template
args.open = ''; -- unset these
args.close = '';
end
args.url = pframe.args.url or -- url for chapter or contribution
pframe.args['chapter-url'] or
pframe.args['contribution-url'] or '';
args['url-access'] = pframe.args['url-access'];
args.year = pframe.args.year or ''; -- required
args['anchor-year'] = pframe.args['anchor-year'] or '';
args.err_msg = args.err_msg .. check_years (args.year, args['anchor-year']);
if not is_set (args.contribution) then
args.err_msg = args.err_msg .. ' required contribution is missing.'; -- error message if source not provided
args.contribution = args.url; -- if set it will give us linkable text
end
if args.last[1] == args.in1 and
args.last[2] == args.in2 and
args.last[3] == args.in3 and
args.last[4] == args.in4 and
not is_set (args.id) then
args.err_msg = args.err_msg .. ' required ' .. code_open_tag .. '|id=</code> parameter missing.'; -- error message if contributor and source are the same
end
return table.concat ({frame:extensionTag ('templatestyles', '', {src='Module:Citation/CS1/styles.css'}), core (args)});
end
--[[--------------------------< E X P O R T E D F U N C T I O N S >------------------------------------------
]]
return {
harvc = harvc
};
8ovx7rqavc7kczyf7gwcltfpsxk4dad
801903
801902
2022-05-22T15:32:19Z
en>Trappist the monk
0
801903
Scribunto
text/plain
require('Module:No globals')
local anchor_id_list = mw.loadData ('Module:Footnotes/anchor_id_list').anchor_id_list;
local code_open_tag = '<code class="cs1-code">'; -- cs1-code class defined in Module:Citation/CS1/styles.css
local lock_icons = { --icon classes are defined in Module:Citation/CS1/styles.css
['registration'] = {'id-lock-registration', 'Free registration required'},
['limited'] = {'id-lock-limited', 'Free access subject to limited trial, subscription normally required'},
['subscription'] = {'id-lock-subscription', 'Paid subscription required'},
}
--[[--------------------------< T A R G E T _ C H E C K >------------------------------------------------------
look for anchor_id (CITEREF name-list and year or text from |ref=) in anchor_id_list
the 'no target' error may be suppressed with |ignore-err=yes when target cannot be found because target is inside
a template that wraps another template; 'multiple targets' error may not be suppressed
]]
local function target_check (anchor_id, ignore)
local number = anchor_id_list[anchor_id]; -- nil when anchor_id not in list; else a number
local msg;
local category;
if not number then
if ignore then
return ''; -- if ignore is true then no message, no category
end
msg = 'no target: ' .. anchor_id; -- anchor_id not found in this article
category = '[[Category:Harv and Sfn no-target errors]]';
elseif 1 < number then
msg = 'multiple targets (' .. number .. '×): ' .. anchor_id; -- more than one anchor_id in this article
category = '[[Category:Harv and Sfn multiple-target errors]]';
end
category = 0 == mw.title.getCurrentTitle().namespace and category or ''; -- only categorize in article space
--use this version to show error messages
return msg and ' <span class="error harv-error" style="display: inline; font-size:100%">Harvc error: ' .. msg .. ' ([[:Category:Harv and Sfn template errors|help]])</span>' .. category or '';
--use this version to hide error messages
-- return msg and ' <span class="error harv-error" style="display: none; font-size:100%">Harvc error: ' .. msg .. ' ([[:Category:Harv and Sfn template errors|help]])</span>' .. category or '';
end
--[[--------------------------< I S _ S E T >------------------------------------------------------------------
Whether variable is set or not. A varable is set when it is not nil and not empty.
]]
local function is_set( var )
return not (var == nil or var == '');
end
--[[--------------------------< C H E C K _ Y E A R S >--------------------------------------------------------
evaluates params to see if they are one of these forms with or without lowercase letter disambiguator (same as in
Module:Footnotes):
YYYY
n.d.
nd
c. YYYY
YYYY–YYYY (separator is endash)
YYYY–YY (separator is endash)
when anchor_year present, year portion must be same as year param and must have disambiguator
returns empty string when params have correct form; error message else
]]
local function check_years (year, anchor_year)
local y, ay;
if not is_set (year) then -- year is required so return error message when not set
return ' missing ' .. code_open_tag .. '|year=</code>.';
end
local patterns = { -- allowed year patterns from Module:Footnotes (captures added here)
'^(%d%d%d%d?)%l?$', -- YYY or YYYY
'^(n%.d%.)%l?$', -- n.d.
'^(nd)%l?$', -- nd
'^(c%. %d%d%d%d?)%l?$', -- c. YYY or c. YYYY
'^(%d%d%d%d–%d%d%d%d)%l?$', -- YYYY–YYYY
'^(%d%d%d%d–%d%d)%l?$' -- YYYY–YY
}
for _, pattern in ipairs (patterns) do -- spin through the patterns
y = year:match (pattern); -- y is the year portion
if y then
break; -- when y is set, we found a match so done
end
end
if not y then
return ' invalid ' .. code_open_tag .. '|year=</code>.'; -- y not set, so year is malformed
end
if is_set (anchor_year) then -- anchor_year is optional
for _, pattern in ipairs (patterns) do -- spin through the patterns
ay = anchor_year:match (pattern); -- ay is the year portion
if ay then
break; -- when ay is set, we found a match so done
end
end
if not ay then
return ' invalid ' .. code_open_tag .. '|anchor-year</code>.'; -- ay not set, so anchor_year is malformed
end
-- if not anchor_year:match ('%l$') then
-- return ' ' .. code_open_tag .. '|anchor-year=</code> missing dab.'; -- anchor_year must end with a disambiguator letter
-- end
if y ~= ay then
return ' ' .. code_open_tag .. '|year=</code> / ' .. code_open_tag .. '|anchor-year=</code> mismatch.'; -- 'year' portions of year and anchor_year must be the same
end
end
return ''; -- both years are good; empty string for concatenation
end
--[[--------------------------< M A K E _ N A M E >------------------------------------------------------------
Assembles last, first, link, or mask into a displayable contributor name.
]]
local function make_name (last, first, link, mask)
local name = last;
if is_set (first) then
name = name .. ', ' .. first; -- concatenate first onto last
end
if is_set (link) then
name = '[[' .. link .. '|' .. name .. ']]'; -- form a wikilink around the name
end
if is_set (mask) then -- mask this author
if tonumber(mask) then
name = string.rep ('—', mask) -- make a string that number length of mdashes
else
name = mask; -- mask is not a number so use the mask text
end
end
return name;
end
--[[--------------------------< C O R E >----------------------------------------------------------------------
Assembles the various parts provided by the template into a properly formatted bridging citation. Adds punctuation
and text; encloses the whole within a span with id and class attributes.
This creates a CITEREF anchor from |last1= through |last4= and |year=. It also creates a CITEREF link from |in1= through
|in4= and |year=. It is presumed that the dates of contributions are the same as the date of the enclosing work.
Even though not displayed, a year parameter is still required for the CITEREF anchor
]]
local function core( args )
local span_open_tag; -- holds CITEREF and css
local contributors = ''; -- chapter or contribution authors
local source = ''; -- editor/author date list that forms a CITEREF link to a full citation
local in_text = ' In ';
-- form the CITEREF anchor
if is_set (args.id) then
args.id = mw.uri.anchorEncode (args.id)
span_open_tag = '<span id="' .. args.id .. '" class="citation">'; -- for use when contributor name is same as source name
else
local citeref = 'CITEREF' .. table.concat (args.citeref) .. (is_set (args['anchor-year']) and args['anchor-year'] or args.year);
citeref = mw.uri.anchorEncode (citeref);
span_open_tag = '<span id="' .. citeref .. '" class="citation">';
end
--[[
form the contributors display list:
if |name-list-style=harv, display is similar to {{sfn}} and {{harv}}, 1 to 4 last names;
if |display-authors= is empty or omitted, display is similar to cs1|2: display all names in last, first order
if |display-authors=etal then displays all author names in last, first order and append et al.
if value assigned to |display-authors= is less than the number of author last names, displays the specified number of author names in last, first order followed by et al.
]]
if 'harv' ~= args.name_list_style then -- default cs1|2 style contributor list
local i = 1;
local count;
local etal = false; -- when |display-authors= is same as number of authors in contributor list
if is_set (args.display_authors) then
if 'etal' == args.display_authors:lower():gsub("[ '%.]", '') then -- the :gsub() portion makes 'etal' from a variety of 'et al.' spellings and stylings
count = #args.last; -- display all authors and ...
etal = true; -- ... append 'et al.'
else
count = tonumber (args.display_authors) or 0; -- 0 if can't be converted to a number
if 0 >= count then
args.err_msg = args.err_msg .. ' invalid ' .. code_open_tag .. '|display-authors=</code>'; -- if zero, then emit error message
end
end
if count > #args.last then
count = #args.last; -- when |display-authors= is more than the number of authors, use the number of authors
end
if count < #args.last then -- when |display-authors= is less than the number of authors
etal = true; -- append 'et al.'
end
else
count = #args.last; -- set count to display all of the authors
end
while i <= count do
if is_set (contributors) then
contributors = contributors .. '; ' .. make_name (args.last[i], args.first[i], args.link[i], args.mask[i]); -- the rest of the contributors
else
contributors = make_name (args.last[i], args.first[i], args.link[i], args.mask[i]); -- first contributor's name
end
i = i+1; -- bump the index
end
if true == etal then
contributors = contributors .. ' et al.'; -- append et al.
elseif 'amp' == args.name_list_style then
contributors = contributors:gsub('; ([^;]+)$', ' & %1') -- replace last separator with ' & '
end
else -- do default harv- or sfn-style contributor display
if 4 <= #args.last then -- four or more contributors (first followed by et al.)
contributors = args.last[1] .. ' et al.';
elseif 3 == #args.last then -- three (display them all)
contributors = args.last[1] .. ', ' .. args.last[2] .. ' & ' .. args.last[3];
elseif 2 == #args.last then -- two (first & second)
contributors = args.last[1] .. ' & ' .. args.last[2];
elseif 1 == #args.last then -- just one (first)
contributors = args.last[1];
else
args.err_msg = args.err_msg .. ' no authors in contributor list.'; -- this code used to find holes in the list; no more
end
end
--form the source author-date list
if is_set (args.in4) and is_set (args.in3) and is_set (args.in2) and is_set (args.in1) then
source = args.in1 .. ' et al.';
elseif not is_set (args.in4) and is_set (args.in3) and is_set (args.in2) and is_set (args.in1) then
source = args.in1 .. ', ' .. args.in2 .. ' & ' .. args.in3;
elseif not is_set (args.in4) and not is_set (args.in3) and is_set (args.in2) and is_set (args.in1) then
source = args.in1 .. ' & ' .. args.in2;
elseif not is_set (args.in4) and not is_set (args.in3) and not is_set (args.in2) and is_set (args.in1) then
source = args.in1;
else
args.err_msg = args.err_msg .. ' author missing from source list.'
end
source = source .. ' ' .. args.open .. args.year .. args.close; -- add the year with or without brackets
--assemble CITEREF wikilink
local anchor_id;
local target_err_msg;
if '' ~= args.ref then
anchor_id = mw.uri.anchorEncode (args.ref)
else
anchor_id = mw.uri.anchorEncode(table.concat ({'CITEREF', args.in1, args.in2, args.in3, args.in4, args.year}));
end
target_err_msg = target_check (anchor_id, args.ignore); -- see if there is a target for this anchor_id
source = '[[#' .. anchor_id .. "|" .. source .. "]]";
-- special case for afterword, foreword, introduction, preface
local no_quotes = ({['afterword']=true, ['foreword']=true, ['introduction']=true, ['preface']=true})[args.contribution:lower()];
--combine contribution with url to make external link
if args.url ~= '' then
args.contribution = '[' .. args.url .. ' ' .. args.contribution .. ']'; -- format external link
if args['url-access'] then
if lock_icons[args['url-access']] then
args.contribution = table.concat ({ -- add access icon markup to this item
'<span class="', -- open the opening span tag; icon classes are defined in Module:Citation/CS1/styles.css
lock_icons[args['url-access']][1], -- add the appropriate lock icon class
'" title="', -- and the title attribute
lock_icons[args['url-access']][2], -- for an appropriate tool tip
'">', -- close the opening span tag
args.contribution,
'</span>', -- and close the span
});
end
end
end
if is_set (args['anchor-year']) then
contributors = contributors .. ' (' .. args['anchor-year'] .. ')' .. args.sepc;
elseif args.sepc ~= contributors:sub(-1) and args.sepc .. ']]' ~= contributors:sub(-3) then
contributors = contributors .. args.sepc; -- add separator if not same as last character in name list (|first=John S. or et al.)
end
-- pages and other insource location
if args.p ~= '' then
args.p = args.page_sep .. args.p;
elseif args.pp ~= '' then
args.p = args.pages_sep .. args.pp; -- args.p not set so use it to hold common insource location info
end
if args.loc ~= '' then
args.p = args.p .. ', ' .. args.loc; -- add arg.loc to args.p
end
--wrap error messages in span and add help link
if is_set (args.err_msg) then
args.err_msg = '<span style="font-size:100%" class="error"> harvc:' .. args.err_msg .. ' ([[Template:Harvc|help]])</span>';
end
if ',' == args.sepc then
in_text = in_text:lower(); -- CS2 style use lower case
end
-- and put it all together
local result = {}; -- the assemby of the above output
table.insert (result, span_open_tag);
table.insert (result, contributors);
table.insert (result, no_quotes and ' ' or ' "'); -- foreword, afterword, introduction, preface contributions are not quoted; all other contributions are
table.insert (result, args.contribution);
table.insert (result, no_quotes and '' or '"'); -- foreword, afterword, introduction, preface contributions are not quoted; all other contributions are
table.insert (result, args.sepc);
table.insert (result, in_text);
table.insert (result, source);
table.insert (result, args.p);
table.insert (result, args.ps);
table.insert (result, args.err_msg);
table.insert (result, target_err_msg);
table.insert (result, '</span>');
return table.concat (result); -- make a string and done
end
--[[--------------------------< H A R V C >--------------------------------------------------------------------
Entry point from {{harvc}} template. Fetches parent frame parameters, does a bit of simple error checking
]]
local function harvc (frame)
local args = {
err_msg = '',
page_sep = ", p. ",
pages_sep = ", pp. ",
sepc = '.',
ps = '.',
open = '(', -- year brackets for source year
close = ')',
last = {},
first = {},
link = {},
mask = {},
citeref = {}
}
local pframe = frame:getParent();
args.contribution = pframe.args.c or -- chapter or contribution
pframe.args.chapter or
pframe.args.contribution or '';
args.id = pframe.args.id or '';
args.in1 = pframe.args['in'] or pframe.args.in1 or ''; -- source editor surnames; 'in' is a Lua reserved keyword
args.in2 = pframe.args.in2 or '';
args.in3 = pframe.args.in3 or '';
args.in4 = pframe.args.in4 or '';
args.display_authors = pframe.args['display-authors']; -- the number of contributor names to display; cs1|2 format includes first names
args.name_list_style = pframe.args['name-list-style'] or ''; -- when set to 'harv' display contributor list in sfn or harv style
args.name_list_style = args.name_list_style:lower(); -- make it case agnostic
if is_set (pframe.args.last) or is_set (pframe.args.last1) or
is_set (pframe.args.author) or is_set (pframe.args.author1) then -- must have at least this to continue
args.last[1] = pframe.args.last or pframe.args.last1 or pframe.args.author or pframe.args.author1; -- get first contributor's last name
args.citeref[1] = args.last[1]; -- add it to the citeref
args.first[1] = pframe.args.first or pframe.args.first1; -- get first contributor's first name
args.link[1] = pframe.args['author-link'] or pframe.args['author-link1']; -- get first contributor's article link
args.mask[1] = pframe.args['author-mask'] or pframe.args['author-mask1']; -- get first contributor's article link
local i = 2; -- index for the rest of the names
while is_set (pframe.args['last'..i]) or is_set (pframe.args['author'..i]) do -- loop through pframe.args and get the rest of the names
args.last[i] = pframe.args['last'..i] or pframe.args['author'..i]; -- last names
args.first[i] = pframe.args['first'..i]; -- first names
args.link[i] = pframe.args['author-link'..i]; -- links
args.mask[i] = pframe.args['author-mask'..i]; -- masks
if 5 > i then
args.citeref[i] = args.last[i]; -- collect first four last names for CITEREF anchor
end
i = i + 1 -- bump the index
end
end
args.p = pframe.args.p or pframe.args.page or ''; -- source page number(s) or location
args.pp = pframe.args.pp or pframe.args.pages or '';
args.loc = pframe.args.loc or '';
args.ref = pframe.args.ref or pframe.args.Ref or ''; -- used to match |ref=<text> in cs1|2 source template
args.ignore = 'yes' == pframe.args['ignore-err']; -- suppress false-positive 'no target' errors
if 'cs2' == pframe.args.mode then
args.ps = ''; -- set postscript character to empty string, cs2 mode
args.sepc = ','; -- set seperator character to comma, cs2 mode
end
do -- to limit scope of local temp
local temp = pframe.args.ps or pframe.args.postscript;
if is_set (temp) then
if 'none' == temp:lower() then -- if |ps=none or |postscript=none then
args.ps = ''; -- no postscript
else
args.ps = temp; -- override default postscript
end
end
end -- end of scope limit
if 'yes' == pframe.args.nb then -- if no brackets around year in link to cs1|2 template
args.open = ''; -- unset these
args.close = '';
end
args.url = pframe.args.url or -- url for chapter or contribution
pframe.args['chapter-url'] or
pframe.args['contribution-url'] or '';
args['url-access'] = pframe.args['url-access'];
args.year = pframe.args.year or ''; -- required
args['anchor-year'] = pframe.args['anchor-year'] or '';
args.err_msg = args.err_msg .. check_years (args.year, args['anchor-year']);
if not is_set (args.contribution) then
args.err_msg = args.err_msg .. ' required contribution is missing.'; -- error message if source not provided
args.contribution = args.url; -- if set it will give us linkable text
end
if args.last[1] == args.in1 and
args.last[2] == args.in2 and
args.last[3] == args.in3 and
args.last[4] == args.in4 and
not is_set (args.id) then
args.err_msg = args.err_msg .. ' required ' .. code_open_tag .. '|id=</code> parameter missing.'; -- error message if contributor and source are the same
end
return table.concat ({frame:extensionTag ('templatestyles', '', {src='Module:Citation/CS1/styles.css'}), core (args)});
end
--[[--------------------------< E X P O R T E D F U N C T I O N S >------------------------------------------
]]
return {
harvc = harvc
};
0yxbtc6p7s4e5830crf1i078m974sci
801904
801903
2022-10-21T21:19:12Z
en>WOSlinker
0
use require('strict') instead of require('Module:No globals')
801904
Scribunto
text/plain
require('strict')
local anchor_id_list = mw.loadData ('Module:Footnotes/anchor_id_list').anchor_id_list;
local code_open_tag = '<code class="cs1-code">'; -- cs1-code class defined in Module:Citation/CS1/styles.css
local lock_icons = { --icon classes are defined in Module:Citation/CS1/styles.css
['registration'] = {'id-lock-registration', 'Free registration required'},
['limited'] = {'id-lock-limited', 'Free access subject to limited trial, subscription normally required'},
['subscription'] = {'id-lock-subscription', 'Paid subscription required'},
}
--[[--------------------------< T A R G E T _ C H E C K >------------------------------------------------------
look for anchor_id (CITEREF name-list and year or text from |ref=) in anchor_id_list
the 'no target' error may be suppressed with |ignore-err=yes when target cannot be found because target is inside
a template that wraps another template; 'multiple targets' error may not be suppressed
]]
local function target_check (anchor_id, ignore)
local number = anchor_id_list[anchor_id]; -- nil when anchor_id not in list; else a number
local msg;
local category;
if not number then
if ignore then
return ''; -- if ignore is true then no message, no category
end
msg = 'no target: ' .. anchor_id; -- anchor_id not found in this article
category = '[[Category:Harv and Sfn no-target errors]]';
elseif 1 < number then
msg = 'multiple targets (' .. number .. '×): ' .. anchor_id; -- more than one anchor_id in this article
category = '[[Category:Harv and Sfn multiple-target errors]]';
end
category = 0 == mw.title.getCurrentTitle().namespace and category or ''; -- only categorize in article space
--use this version to show error messages
return msg and ' <span class="error harv-error" style="display: inline; font-size:100%">Harvc error: ' .. msg .. ' ([[:Category:Harv and Sfn template errors|help]])</span>' .. category or '';
--use this version to hide error messages
-- return msg and ' <span class="error harv-error" style="display: none; font-size:100%">Harvc error: ' .. msg .. ' ([[:Category:Harv and Sfn template errors|help]])</span>' .. category or '';
end
--[[--------------------------< I S _ S E T >------------------------------------------------------------------
Whether variable is set or not. A varable is set when it is not nil and not empty.
]]
local function is_set( var )
return not (var == nil or var == '');
end
--[[--------------------------< C H E C K _ Y E A R S >--------------------------------------------------------
evaluates params to see if they are one of these forms with or without lowercase letter disambiguator (same as in
Module:Footnotes):
YYYY
n.d.
nd
c. YYYY
YYYY–YYYY (separator is endash)
YYYY–YY (separator is endash)
when anchor_year present, year portion must be same as year param and must have disambiguator
returns empty string when params have correct form; error message else
]]
local function check_years (year, anchor_year)
local y, ay;
if not is_set (year) then -- year is required so return error message when not set
return ' missing ' .. code_open_tag .. '|year=</code>.';
end
local patterns = { -- allowed year patterns from Module:Footnotes (captures added here)
'^(%d%d%d%d?)%l?$', -- YYY or YYYY
'^(n%.d%.)%l?$', -- n.d.
'^(nd)%l?$', -- nd
'^(c%. %d%d%d%d?)%l?$', -- c. YYY or c. YYYY
'^(%d%d%d%d–%d%d%d%d)%l?$', -- YYYY–YYYY
'^(%d%d%d%d–%d%d)%l?$' -- YYYY–YY
}
for _, pattern in ipairs (patterns) do -- spin through the patterns
y = year:match (pattern); -- y is the year portion
if y then
break; -- when y is set, we found a match so done
end
end
if not y then
return ' invalid ' .. code_open_tag .. '|year=</code>.'; -- y not set, so year is malformed
end
if is_set (anchor_year) then -- anchor_year is optional
for _, pattern in ipairs (patterns) do -- spin through the patterns
ay = anchor_year:match (pattern); -- ay is the year portion
if ay then
break; -- when ay is set, we found a match so done
end
end
if not ay then
return ' invalid ' .. code_open_tag .. '|anchor-year</code>.'; -- ay not set, so anchor_year is malformed
end
-- if not anchor_year:match ('%l$') then
-- return ' ' .. code_open_tag .. '|anchor-year=</code> missing dab.'; -- anchor_year must end with a disambiguator letter
-- end
if y ~= ay then
return ' ' .. code_open_tag .. '|year=</code> / ' .. code_open_tag .. '|anchor-year=</code> mismatch.'; -- 'year' portions of year and anchor_year must be the same
end
end
return ''; -- both years are good; empty string for concatenation
end
--[[--------------------------< M A K E _ N A M E >------------------------------------------------------------
Assembles last, first, link, or mask into a displayable contributor name.
]]
local function make_name (last, first, link, mask)
local name = last;
if is_set (first) then
name = name .. ', ' .. first; -- concatenate first onto last
end
if is_set (link) then
name = '[[' .. link .. '|' .. name .. ']]'; -- form a wikilink around the name
end
if is_set (mask) then -- mask this author
if tonumber(mask) then
name = string.rep ('—', mask) -- make a string that number length of mdashes
else
name = mask; -- mask is not a number so use the mask text
end
end
return name;
end
--[[--------------------------< C O R E >----------------------------------------------------------------------
Assembles the various parts provided by the template into a properly formatted bridging citation. Adds punctuation
and text; encloses the whole within a span with id and class attributes.
This creates a CITEREF anchor from |last1= through |last4= and |year=. It also creates a CITEREF link from |in1= through
|in4= and |year=. It is presumed that the dates of contributions are the same as the date of the enclosing work.
Even though not displayed, a year parameter is still required for the CITEREF anchor
]]
local function core( args )
local span_open_tag; -- holds CITEREF and css
local contributors = ''; -- chapter or contribution authors
local source = ''; -- editor/author date list that forms a CITEREF link to a full citation
local in_text = ' In ';
-- form the CITEREF anchor
if is_set (args.id) then
args.id = mw.uri.anchorEncode (args.id)
span_open_tag = '<span id="' .. args.id .. '" class="citation">'; -- for use when contributor name is same as source name
else
local citeref = 'CITEREF' .. table.concat (args.citeref) .. (is_set (args['anchor-year']) and args['anchor-year'] or args.year);
citeref = mw.uri.anchorEncode (citeref);
span_open_tag = '<span id="' .. citeref .. '" class="citation">';
end
--[[
form the contributors display list:
if |name-list-style=harv, display is similar to {{sfn}} and {{harv}}, 1 to 4 last names;
if |display-authors= is empty or omitted, display is similar to cs1|2: display all names in last, first order
if |display-authors=etal then displays all author names in last, first order and append et al.
if value assigned to |display-authors= is less than the number of author last names, displays the specified number of author names in last, first order followed by et al.
]]
if 'harv' ~= args.name_list_style then -- default cs1|2 style contributor list
local i = 1;
local count;
local etal = false; -- when |display-authors= is same as number of authors in contributor list
if is_set (args.display_authors) then
if 'etal' == args.display_authors:lower():gsub("[ '%.]", '') then -- the :gsub() portion makes 'etal' from a variety of 'et al.' spellings and stylings
count = #args.last; -- display all authors and ...
etal = true; -- ... append 'et al.'
else
count = tonumber (args.display_authors) or 0; -- 0 if can't be converted to a number
if 0 >= count then
args.err_msg = args.err_msg .. ' invalid ' .. code_open_tag .. '|display-authors=</code>'; -- if zero, then emit error message
end
end
if count > #args.last then
count = #args.last; -- when |display-authors= is more than the number of authors, use the number of authors
end
if count < #args.last then -- when |display-authors= is less than the number of authors
etal = true; -- append 'et al.'
end
else
count = #args.last; -- set count to display all of the authors
end
while i <= count do
if is_set (contributors) then
contributors = contributors .. '; ' .. make_name (args.last[i], args.first[i], args.link[i], args.mask[i]); -- the rest of the contributors
else
contributors = make_name (args.last[i], args.first[i], args.link[i], args.mask[i]); -- first contributor's name
end
i = i+1; -- bump the index
end
if true == etal then
contributors = contributors .. ' et al.'; -- append et al.
elseif 'amp' == args.name_list_style then
contributors = contributors:gsub('; ([^;]+)$', ' & %1') -- replace last separator with ' & '
end
else -- do default harv- or sfn-style contributor display
if 4 <= #args.last then -- four or more contributors (first followed by et al.)
contributors = args.last[1] .. ' et al.';
elseif 3 == #args.last then -- three (display them all)
contributors = args.last[1] .. ', ' .. args.last[2] .. ' & ' .. args.last[3];
elseif 2 == #args.last then -- two (first & second)
contributors = args.last[1] .. ' & ' .. args.last[2];
elseif 1 == #args.last then -- just one (first)
contributors = args.last[1];
else
args.err_msg = args.err_msg .. ' no authors in contributor list.'; -- this code used to find holes in the list; no more
end
end
--form the source author-date list
if is_set (args.in4) and is_set (args.in3) and is_set (args.in2) and is_set (args.in1) then
source = args.in1 .. ' et al.';
elseif not is_set (args.in4) and is_set (args.in3) and is_set (args.in2) and is_set (args.in1) then
source = args.in1 .. ', ' .. args.in2 .. ' & ' .. args.in3;
elseif not is_set (args.in4) and not is_set (args.in3) and is_set (args.in2) and is_set (args.in1) then
source = args.in1 .. ' & ' .. args.in2;
elseif not is_set (args.in4) and not is_set (args.in3) and not is_set (args.in2) and is_set (args.in1) then
source = args.in1;
else
args.err_msg = args.err_msg .. ' author missing from source list.'
end
source = source .. ' ' .. args.open .. args.year .. args.close; -- add the year with or without brackets
--assemble CITEREF wikilink
local anchor_id;
local target_err_msg;
if '' ~= args.ref then
anchor_id = mw.uri.anchorEncode (args.ref)
else
anchor_id = mw.uri.anchorEncode(table.concat ({'CITEREF', args.in1, args.in2, args.in3, args.in4, args.year}));
end
target_err_msg = target_check (anchor_id, args.ignore); -- see if there is a target for this anchor_id
source = '[[#' .. anchor_id .. "|" .. source .. "]]";
-- special case for afterword, foreword, introduction, preface
local no_quotes = ({['afterword']=true, ['foreword']=true, ['introduction']=true, ['preface']=true})[args.contribution:lower()];
--combine contribution with url to make external link
if args.url ~= '' then
args.contribution = '[' .. args.url .. ' ' .. args.contribution .. ']'; -- format external link
if args['url-access'] then
if lock_icons[args['url-access']] then
args.contribution = table.concat ({ -- add access icon markup to this item
'<span class="', -- open the opening span tag; icon classes are defined in Module:Citation/CS1/styles.css
lock_icons[args['url-access']][1], -- add the appropriate lock icon class
'" title="', -- and the title attribute
lock_icons[args['url-access']][2], -- for an appropriate tool tip
'">', -- close the opening span tag
args.contribution,
'</span>', -- and close the span
});
end
end
end
if is_set (args['anchor-year']) then
contributors = contributors .. ' (' .. args['anchor-year'] .. ')' .. args.sepc;
elseif args.sepc ~= contributors:sub(-1) and args.sepc .. ']]' ~= contributors:sub(-3) then
contributors = contributors .. args.sepc; -- add separator if not same as last character in name list (|first=John S. or et al.)
end
-- pages and other insource location
if args.p ~= '' then
args.p = args.page_sep .. args.p;
elseif args.pp ~= '' then
args.p = args.pages_sep .. args.pp; -- args.p not set so use it to hold common insource location info
end
if args.loc ~= '' then
args.p = args.p .. ', ' .. args.loc; -- add arg.loc to args.p
end
--wrap error messages in span and add help link
if is_set (args.err_msg) then
args.err_msg = '<span style="font-size:100%" class="error"> harvc:' .. args.err_msg .. ' ([[Template:Harvc|help]])</span>';
end
if ',' == args.sepc then
in_text = in_text:lower(); -- CS2 style use lower case
end
-- and put it all together
local result = {}; -- the assemby of the above output
table.insert (result, span_open_tag);
table.insert (result, contributors);
table.insert (result, no_quotes and ' ' or ' "'); -- foreword, afterword, introduction, preface contributions are not quoted; all other contributions are
table.insert (result, args.contribution);
table.insert (result, no_quotes and '' or '"'); -- foreword, afterword, introduction, preface contributions are not quoted; all other contributions are
table.insert (result, args.sepc);
table.insert (result, in_text);
table.insert (result, source);
table.insert (result, args.p);
table.insert (result, args.ps);
table.insert (result, args.err_msg);
table.insert (result, target_err_msg);
table.insert (result, '</span>');
return table.concat (result); -- make a string and done
end
--[[--------------------------< H A R V C >--------------------------------------------------------------------
Entry point from {{harvc}} template. Fetches parent frame parameters, does a bit of simple error checking
]]
local function harvc (frame)
local args = {
err_msg = '',
page_sep = ", p. ",
pages_sep = ", pp. ",
sepc = '.',
ps = '.',
open = '(', -- year brackets for source year
close = ')',
last = {},
first = {},
link = {},
mask = {},
citeref = {}
}
local pframe = frame:getParent();
args.contribution = pframe.args.c or -- chapter or contribution
pframe.args.chapter or
pframe.args.contribution or '';
args.id = pframe.args.id or '';
args.in1 = pframe.args['in'] or pframe.args.in1 or ''; -- source editor surnames; 'in' is a Lua reserved keyword
args.in2 = pframe.args.in2 or '';
args.in3 = pframe.args.in3 or '';
args.in4 = pframe.args.in4 or '';
args.display_authors = pframe.args['display-authors']; -- the number of contributor names to display; cs1|2 format includes first names
args.name_list_style = pframe.args['name-list-style'] or ''; -- when set to 'harv' display contributor list in sfn or harv style
args.name_list_style = args.name_list_style:lower(); -- make it case agnostic
if is_set (pframe.args.last) or is_set (pframe.args.last1) or
is_set (pframe.args.author) or is_set (pframe.args.author1) then -- must have at least this to continue
args.last[1] = pframe.args.last or pframe.args.last1 or pframe.args.author or pframe.args.author1; -- get first contributor's last name
args.citeref[1] = args.last[1]; -- add it to the citeref
args.first[1] = pframe.args.first or pframe.args.first1; -- get first contributor's first name
args.link[1] = pframe.args['author-link'] or pframe.args['author-link1']; -- get first contributor's article link
args.mask[1] = pframe.args['author-mask'] or pframe.args['author-mask1']; -- get first contributor's article link
local i = 2; -- index for the rest of the names
while is_set (pframe.args['last'..i]) or is_set (pframe.args['author'..i]) do -- loop through pframe.args and get the rest of the names
args.last[i] = pframe.args['last'..i] or pframe.args['author'..i]; -- last names
args.first[i] = pframe.args['first'..i]; -- first names
args.link[i] = pframe.args['author-link'..i]; -- links
args.mask[i] = pframe.args['author-mask'..i]; -- masks
if 5 > i then
args.citeref[i] = args.last[i]; -- collect first four last names for CITEREF anchor
end
i = i + 1 -- bump the index
end
end
args.p = pframe.args.p or pframe.args.page or ''; -- source page number(s) or location
args.pp = pframe.args.pp or pframe.args.pages or '';
args.loc = pframe.args.loc or '';
args.ref = pframe.args.ref or pframe.args.Ref or ''; -- used to match |ref=<text> in cs1|2 source template
args.ignore = 'yes' == pframe.args['ignore-err']; -- suppress false-positive 'no target' errors
if 'cs2' == pframe.args.mode then
args.ps = ''; -- set postscript character to empty string, cs2 mode
args.sepc = ','; -- set seperator character to comma, cs2 mode
end
do -- to limit scope of local temp
local temp = pframe.args.ps or pframe.args.postscript;
if is_set (temp) then
if 'none' == temp:lower() then -- if |ps=none or |postscript=none then
args.ps = ''; -- no postscript
else
args.ps = temp; -- override default postscript
end
end
end -- end of scope limit
if 'yes' == pframe.args.nb then -- if no brackets around year in link to cs1|2 template
args.open = ''; -- unset these
args.close = '';
end
args.url = pframe.args.url or -- url for chapter or contribution
pframe.args['chapter-url'] or
pframe.args['contribution-url'] or '';
args['url-access'] = pframe.args['url-access'];
args.year = pframe.args.year or ''; -- required
args['anchor-year'] = pframe.args['anchor-year'] or '';
args.err_msg = args.err_msg .. check_years (args.year, args['anchor-year']);
if not is_set (args.contribution) then
args.err_msg = args.err_msg .. ' required contribution is missing.'; -- error message if source not provided
args.contribution = args.url; -- if set it will give us linkable text
end
if args.last[1] == args.in1 and
args.last[2] == args.in2 and
args.last[3] == args.in3 and
args.last[4] == args.in4 and
not is_set (args.id) then
args.err_msg = args.err_msg .. ' required ' .. code_open_tag .. '|id=</code> parameter missing.'; -- error message if contributor and source are the same
end
return table.concat ({frame:extensionTag ('templatestyles', '', {src='Module:Citation/CS1/styles.css'}), core (args)});
end
--[[--------------------------< E X P O R T E D F U N C T I O N S >------------------------------------------
]]
return {
harvc = harvc
};
bjpt24bimlaqvuh3zqr410w2dkh1eg1
801905
801904
2023-09-07T16:44:01Z
en>Trappist the monk
0
801905
Scribunto
text/plain
require('strict')
local anchor_id_list = mw.loadData ('Module:Footnotes/anchor_id_list').anchor_id_list;
local code_open_tag = '<code class="cs1-code">'; -- cs1-code class defined in Module:Citation/CS1/styles.css
local lock_icons = { --icon classes are defined in Module:Citation/CS1/styles.css
['registration'] = {'id-lock-registration', 'Free registration required'},
['limited'] = {'id-lock-limited', 'Free access subject to limited trial, subscription normally required'},
['subscription'] = {'id-lock-subscription', 'Paid subscription required'},
}
--[[--------------------------< T A R G E T _ C H E C K >------------------------------------------------------
look for anchor_id (CITEREF name-list and year or text from |ref=) in anchor_id_list
the 'no target' error may be suppressed with |ignore-err=yes when target cannot be found because target is inside
a template that wraps another template; 'multiple targets' error may not be suppressed
]]
local function target_check (anchor_id, ignore)
local number = anchor_id_list[anchor_id]; -- nil when anchor_id not in list; else a number
local msg;
local category;
if not number then
if ignore then
return ''; -- if ignore is true then no message, no category
end
msg = 'no target: ' .. anchor_id; -- anchor_id not found in this article
category = '[[Category:Harv and Sfn no-target errors]]';
elseif 1 < number then
msg = 'multiple targets (' .. number .. '×): ' .. anchor_id; -- more than one anchor_id in this article
category = '[[Category:Harv and Sfn multiple-target errors]]';
end
category = 0 == mw.title.getCurrentTitle().namespace and category or ''; -- only categorize in article space
--use this version to show error messages
return msg and ' <span class="error harv-error" style="display: inline; font-size:100%">Harvc error: ' .. msg .. ' ([[:Category:Harv and Sfn template errors|help]])</span>' .. category or '';
--use this version to hide error messages
-- return msg and ' <span class="error harv-error" style="display: none; font-size:100%">Harvc error: ' .. msg .. ' ([[:Category:Harv and Sfn template errors|help]])</span>' .. category or '';
end
--[[--------------------------< I S _ S E T >------------------------------------------------------------------
Whether variable is set or not. A varable is set when it is not nil and not empty.
]]
local function is_set( var )
return not (var == nil or var == '');
end
--[[--------------------------< C H E C K _ Y E A R S >--------------------------------------------------------
evaluates params to see if they are one of these forms with or without lowercase letter disambiguator (same as in
Module:Footnotes):
YYYY
n.d.
nd
c. YYYY
YYYY–YYYY (separator is endash)
YYYY–YY (separator is endash)
when anchor_year present, year portion must be same as year param and must have disambiguator
returns empty string when params have correct form; error message else
]]
local function check_years (year, anchor_year)
local y, ay;
if not is_set (year) then -- year is required so return error message when not set
return ' missing ' .. code_open_tag .. '|year=</code>.';
end
local patterns = { -- allowed year patterns from Module:Footnotes (captures added here)
'^(%d%d%d%d?)%l?$', -- YYY or YYYY
'^(n%.d%.)%l?$', -- n.d.
'^(nd)%l?$', -- nd
'^(c%. %d%d%d%d?)%l?$', -- c. YYY or c. YYYY
'^(%d%d%d%d–%d%d%d%d)%l?$', -- YYYY–YYYY
'^(%d%d%d%d–%d%d)%l?$' -- YYYY–YY
}
for _, pattern in ipairs (patterns) do -- spin through the patterns
y = year:match (pattern); -- y is the year portion
if y then
break; -- when y is set, we found a match so done
end
end
if not y then
return ' invalid ' .. code_open_tag .. '|year=</code>.'; -- y not set, so year is malformed
end
if is_set (anchor_year) then -- anchor_year is optional
for _, pattern in ipairs (patterns) do -- spin through the patterns
ay = anchor_year:match (pattern); -- ay is the year portion
if ay then
break; -- when ay is set, we found a match so done
end
end
if not ay then
return ' invalid ' .. code_open_tag .. '|anchor-year</code>.'; -- ay not set, so anchor_year is malformed
end
-- if not anchor_year:match ('%l$') then
-- return ' ' .. code_open_tag .. '|anchor-year=</code> missing dab.'; -- anchor_year must end with a disambiguator letter
-- end
if y ~= ay then
return ' ' .. code_open_tag .. '|year=</code> / ' .. code_open_tag .. '|anchor-year=</code> mismatch.'; -- 'year' portions of year and anchor_year must be the same
end
end
return ''; -- both years are good; empty string for concatenation
end
--[[--------------------------< M A K E _ N A M E >------------------------------------------------------------
Assembles last, first, link, or mask into a displayable contributor name.
]]
local function make_name (last, first, link, mask)
local name = last;
if is_set (first) then
name = name .. ', ' .. first; -- concatenate first onto last
end
if is_set (link) then
name = '[[' .. link .. '|' .. name .. ']]'; -- form a wikilink around the name
end
if is_set (mask) then -- mask this author
if tonumber(mask) then
name = string.rep ('—', mask) -- make a string that number length of mdashes
else
name = mask; -- mask is not a number so use the mask text
end
end
return name;
end
--[[--------------------------< C O R E >----------------------------------------------------------------------
Assembles the various parts provided by the template into a properly formatted bridging citation. Adds punctuation
and text; encloses the whole within a span with id and class attributes.
This creates a CITEREF anchor from |last1= through |last4= and |year=. It also creates a CITEREF link from |in1= through
|in4= and |year=. It is presumed that the dates of contributions are the same as the date of the enclosing work.
Even though not displayed, a year parameter is still required for the CITEREF anchor
]]
local function core( args )
local span_open_tag; -- holds CITEREF and css
local contributors = ''; -- chapter or contribution authors
local source = ''; -- editor/author date list that forms a CITEREF link to a full citation
local in_text = ' In ';
-- form the CITEREF anchor
if is_set (args.id) then
args.id = mw.uri.anchorEncode (args.id)
span_open_tag = '<span id="' .. args.id .. '" class="citation">'; -- for use when contributor name is same as source name
else
local citeref = 'CITEREF' .. table.concat (args.citeref) .. (is_set (args['anchor-year']) and args['anchor-year'] or args.year);
citeref = mw.uri.anchorEncode (citeref);
span_open_tag = '<span id="' .. citeref .. '" class="citation">';
end
--[[
form the contributors display list:
if |name-list-style=harv, display is similar to {{sfn}} and {{harv}}, 1 to 4 last names;
if |display-authors= is empty or omitted, display is similar to cs1|2: display all names in last, first order
if |display-authors=etal then displays all author names in last, first order and append et al.
if value assigned to |display-authors= is less than the number of author last names, displays the specified number of author names in last, first order followed by et al.
]]
if 'harv' ~= args.name_list_style then -- default cs1|2 style contributor list
local i = 1;
local count;
local etal = false; -- when |display-authors= is same as number of authors in contributor list
if is_set (args.display_authors) then
if 'etal' == args.display_authors:lower():gsub("[ '%.]", '') then -- the :gsub() portion makes 'etal' from a variety of 'et al.' spellings and stylings
count = #args.last; -- display all authors and ...
etal = true; -- ... append 'et al.'
else
count = tonumber (args.display_authors) or 0; -- 0 if can't be converted to a number
if 0 >= count then
args.err_msg = args.err_msg .. ' invalid ' .. code_open_tag .. '|display-authors=</code>'; -- if zero, then emit error message
end
end
if count > #args.last then
count = #args.last; -- when |display-authors= is more than the number of authors, use the number of authors
end
if count < #args.last then -- when |display-authors= is less than the number of authors
etal = true; -- append 'et al.'
end
else
count = #args.last; -- set count to display all of the authors
end
while i <= count do
if is_set (contributors) then
contributors = contributors .. '; ' .. make_name (args.last[i], args.first[i], args.link[i], args.mask[i]); -- the rest of the contributors
else
contributors = make_name (args.last[i], args.first[i], args.link[i], args.mask[i]); -- first contributor's name
end
i = i+1; -- bump the index
end
if true == etal then
contributors = contributors .. ' et al.'; -- append et al.
elseif 'amp' == args.name_list_style then
contributors = contributors:gsub('; ([^;]+)$', ' & %1') -- replace last separator with ' & '
end
else -- do default harv- or sfn-style contributor display
if 4 <= #args.last then -- four or more contributors (first followed by et al.)
contributors = args.last[1] .. ' et al.';
elseif 3 == #args.last then -- three (display them all)
contributors = args.last[1] .. ', ' .. args.last[2] .. ' & ' .. args.last[3];
elseif 2 == #args.last then -- two (first & second)
contributors = args.last[1] .. ' & ' .. args.last[2];
elseif 1 == #args.last then -- just one (first)
contributors = args.last[1];
else
args.err_msg = args.err_msg .. ' no authors in contributor list.'; -- this code used to find holes in the list; no more
end
end
--form the source author-date list
if is_set (args.in4) and is_set (args.in3) and is_set (args.in2) and is_set (args.in1) then
source = args.in1 .. ' et al.';
elseif not is_set (args.in4) and is_set (args.in3) and is_set (args.in2) and is_set (args.in1) then
source = args.in1 .. ', ' .. args.in2 .. ' & ' .. args.in3;
elseif not is_set (args.in4) and not is_set (args.in3) and is_set (args.in2) and is_set (args.in1) then
source = args.in1 .. ' & ' .. args.in2;
elseif not is_set (args.in4) and not is_set (args.in3) and not is_set (args.in2) and is_set (args.in1) then
source = args.in1;
else
args.err_msg = args.err_msg .. ' author missing from source list.'
end
source = source .. ' ' .. args.open .. args.year .. args.close; -- add the year with or without brackets
--assemble CITEREF wikilink
local anchor_id;
local target_err_msg;
if '' ~= args.ref then
anchor_id = mw.uri.anchorEncode (args.ref)
else
anchor_id = mw.uri.anchorEncode(table.concat ({'CITEREF', args.in1, args.in2, args.in3, args.in4, args.year}));
end
target_err_msg = target_check (anchor_id, args.ignore); -- see if there is a target for this anchor_id
source = '[[#' .. anchor_id .. "|" .. source .. "]]";
-- special case for afterword, foreword, introduction, preface
local no_quotes = ({['afterword']=true, ['foreword']=true, ['introduction']=true, ['preface']=true})[args.contribution:lower()];
--combine contribution with url to make external link
if args.url ~= '' then
args.contribution = '[' .. args.url .. ' ' .. args.contribution .. ']'; -- format external link
if args['url-access'] then
if lock_icons[args['url-access']] then
args.contribution = table.concat ({ -- add access icon markup to this item
'<span class="', -- open the opening span tag; icon classes are defined in Module:Citation/CS1/styles.css
lock_icons[args['url-access']][1], -- add the appropriate lock icon class
'" title="', -- and the title attribute
lock_icons[args['url-access']][2], -- for an appropriate tool tip
'">', -- close the opening span tag
args.contribution,
'</span>', -- and close the span
});
end
end
end
if is_set (args['anchor-year']) then
contributors = contributors .. ' (' .. args['anchor-year'] .. ')' .. args.sepc;
elseif args.sepc ~= contributors:sub(-1) and args.sepc .. ']]' ~= contributors:sub(-3) then
contributors = contributors .. args.sepc; -- add separator if not same as last character in name list (|first=John S. or et al.)
end
-- pages and other insource location
if args.p ~= '' then
args.p = args.page_sep .. args.p;
elseif args.pp ~= '' then
args.p = args.pages_sep .. args.pp; -- args.p not set so use it to hold common insource location info
end
if args.loc ~= '' then
args.p = args.p .. ', ' .. args.loc; -- add arg.loc to args.p
end
--wrap error messages in span and add help link
if is_set (args.err_msg) then
args.err_msg = '<span style="font-size:100%" class="error"> harvc:' .. args.err_msg .. ' ([[Template:Harvc|help]])</span>';
end
if ',' == args.sepc then
in_text = in_text:lower(); -- CS2 style use lower case
end
-- and put it all together
local result = {}; -- the assemby of the above output
table.insert (result, span_open_tag);
table.insert (result, contributors);
table.insert (result, no_quotes and ' ' or ' "'); -- foreword, afterword, introduction, preface contributions are not quoted; all other contributions are
table.insert (result, args.contribution);
table.insert (result, no_quotes and '' or '"'); -- foreword, afterword, introduction, preface contributions are not quoted; all other contributions are
table.insert (result, args.sepc);
table.insert (result, in_text);
table.insert (result, source);
table.insert (result, args.p);
table.insert (result, args.ps);
table.insert (result, args.err_msg);
table.insert (result, target_err_msg);
table.insert (result, '</span>');
return table.concat (result); -- make a string and done
end
--[[--------------------------< H A R V C >--------------------------------------------------------------------
Entry point from {{harvc}} template. Fetches parent frame parameters, does a bit of simple error checking
]]
local function harvc (frame)
local args = {
err_msg = '',
page_sep = ", p. ",
pages_sep = ", pp. ",
sepc = '.',
ps = '.',
open = '(', -- year brackets for source year
close = ')',
last = {},
first = {},
link = {},
mask = {},
citeref = {}
}
local pframe = frame:getParent();
args.contribution = pframe.args.c or -- chapter or contribution
pframe.args.chapter or
pframe.args.contribution or '';
args.id = pframe.args.id or '';
args.in1 = pframe.args['in'] or pframe.args.in1 or ''; -- source editor surnames; 'in' is a Lua reserved keyword
args.in2 = pframe.args.in2 or '';
args.in3 = pframe.args.in3 or '';
args.in4 = pframe.args.in4 or '';
args.display_authors = pframe.args['display-authors']; -- the number of contributor names to display; cs1|2 format includes first names
args.name_list_style = pframe.args['name-list-style'] or ''; -- when set to 'harv' display contributor list in sfn or harv style
args.name_list_style = args.name_list_style:lower(); -- make it case agnostic
if is_set (pframe.args.last) or is_set (pframe.args.last1) or
is_set (pframe.args.author) or is_set (pframe.args.author1) then -- must have at least this to continue
args.last[1] = pframe.args.last or pframe.args.last1 or pframe.args.author or pframe.args.author1; -- get first contributor's last name
args.citeref[1] = args.last[1]; -- add it to the citeref
args.first[1] = pframe.args.first or pframe.args.first1; -- get first contributor's first name
args.link[1] = pframe.args['author-link'] or pframe.args['author-link1']; -- get first contributor's article link
args.mask[1] = pframe.args['author-mask'] or pframe.args['author-mask1']; -- get first contributor's article link
local i = 2; -- index for the rest of the names
while is_set (pframe.args['last'..i]) or is_set (pframe.args['author'..i]) do -- loop through pframe.args and get the rest of the names
args.last[i] = pframe.args['last'..i] or pframe.args['author'..i]; -- last names
args.first[i] = pframe.args['first'..i]; -- first names
args.link[i] = pframe.args['author-link'..i]; -- links
args.mask[i] = pframe.args['author-mask'..i]; -- masks
if 5 > i then
args.citeref[i] = args.last[i]; -- collect first four last names for CITEREF anchor
end
i = i + 1 -- bump the index
end
end
if 0 == #args.last then -- |last= is required
args.err_msg = args.err_msg .. ' no authors in contributor list.';
end
args.p = pframe.args.p or pframe.args.page or ''; -- source page number(s) or location
args.pp = pframe.args.pp or pframe.args.pages or '';
args.loc = pframe.args.loc or '';
args.ref = pframe.args.ref or pframe.args.Ref or ''; -- used to match |ref=<text> in cs1|2 source template
args.ignore = 'yes' == pframe.args['ignore-err']; -- suppress false-positive 'no target' errors
if 'cs2' == pframe.args.mode then
args.ps = ''; -- set postscript character to empty string, cs2 mode
args.sepc = ','; -- set seperator character to comma, cs2 mode
end
do -- to limit scope of local temp
local temp = pframe.args.ps or pframe.args.postscript;
if is_set (temp) then
if 'none' == temp:lower() then -- if |ps=none or |postscript=none then
args.ps = ''; -- no postscript
else
args.ps = temp; -- override default postscript
end
end
end -- end of scope limit
if 'yes' == pframe.args.nb then -- if no brackets around year in link to cs1|2 template
args.open = ''; -- unset these
args.close = '';
end
args.url = pframe.args.url or -- url for chapter or contribution
pframe.args['chapter-url'] or
pframe.args['contribution-url'] or '';
args['url-access'] = pframe.args['url-access'];
args.year = pframe.args.year or ''; -- required
args['anchor-year'] = pframe.args['anchor-year'] or '';
args.err_msg = args.err_msg .. check_years (args.year, args['anchor-year']);
if not is_set (args.contribution) then
args.err_msg = args.err_msg .. ' required contribution is missing.'; -- error message if source not provided
args.contribution = args.url; -- if set it will give us linkable text
end
if args.last[1] == args.in1 and
args.last[2] == args.in2 and
args.last[3] == args.in3 and
args.last[4] == args.in4 and
not is_set (args.id) then
args.err_msg = args.err_msg .. ' required ' .. code_open_tag .. '|id=</code> parameter missing.'; -- error message if contributor and source are the same
end
return table.concat ({frame:extensionTag ('templatestyles', '', {src='Module:Citation/CS1/styles.css'}), core (args)});
end
--[[--------------------------< E X P O R T E D F U N C T I O N S >------------------------------------------
]]
return {
harvc = harvc
};
aom31cjk5da6hxfbz27f3hj2bjf4bnz
801906
801905
2024-12-18T20:25:49Z
en>Shonebrooks
0
I corrected the spelling of "variable." [[WP:TYPO]]
801906
Scribunto
text/plain
require('strict')
local anchor_id_list = mw.loadData ('Module:Footnotes/anchor_id_list').anchor_id_list;
local code_open_tag = '<code class="cs1-code">'; -- cs1-code class defined in Module:Citation/CS1/styles.css
local lock_icons = { --icon classes are defined in Module:Citation/CS1/styles.css
['registration'] = {'id-lock-registration', 'Free registration required'},
['limited'] = {'id-lock-limited', 'Free access subject to limited trial, subscription normally required'},
['subscription'] = {'id-lock-subscription', 'Paid subscription required'},
}
--[[--------------------------< T A R G E T _ C H E C K >------------------------------------------------------
look for anchor_id (CITEREF name-list and year or text from |ref=) in anchor_id_list
the 'no target' error may be suppressed with |ignore-err=yes when target cannot be found because target is inside
a template that wraps another template; 'multiple targets' error may not be suppressed
]]
local function target_check (anchor_id, ignore)
local number = anchor_id_list[anchor_id]; -- nil when anchor_id not in list; else a number
local msg;
local category;
if not number then
if ignore then
return ''; -- if ignore is true then no message, no category
end
msg = 'no target: ' .. anchor_id; -- anchor_id not found in this article
category = '[[Category:Harv and Sfn no-target errors]]';
elseif 1 < number then
msg = 'multiple targets (' .. number .. '×): ' .. anchor_id; -- more than one anchor_id in this article
category = '[[Category:Harv and Sfn multiple-target errors]]';
end
category = 0 == mw.title.getCurrentTitle().namespace and category or ''; -- only categorize in article space
--use this version to show error messages
return msg and ' <span class="error harv-error" style="display: inline; font-size:100%">Harvc error: ' .. msg .. ' ([[:Category:Harv and Sfn template errors|help]])</span>' .. category or '';
--use this version to hide error messages
-- return msg and ' <span class="error harv-error" style="display: none; font-size:100%">Harvc error: ' .. msg .. ' ([[:Category:Harv and Sfn template errors|help]])</span>' .. category or '';
end
--[[--------------------------< I S _ S E T >------------------------------------------------------------------
Whether variable is set or not. A variable is set when it is not nil and not empty.
]]
local function is_set( var )
return not (var == nil or var == '');
end
--[[--------------------------< C H E C K _ Y E A R S >--------------------------------------------------------
evaluates params to see if they are one of these forms with or without lowercase letter disambiguator (same as in
Module:Footnotes):
YYYY
n.d.
nd
c. YYYY
YYYY–YYYY (separator is endash)
YYYY–YY (separator is endash)
when anchor_year present, year portion must be same as year param and must have disambiguator
returns empty string when params have correct form; error message else
]]
local function check_years (year, anchor_year)
local y, ay;
if not is_set (year) then -- year is required so return error message when not set
return ' missing ' .. code_open_tag .. '|year=</code>.';
end
local patterns = { -- allowed year patterns from Module:Footnotes (captures added here)
'^(%d%d%d%d?)%l?$', -- YYY or YYYY
'^(n%.d%.)%l?$', -- n.d.
'^(nd)%l?$', -- nd
'^(c%. %d%d%d%d?)%l?$', -- c. YYY or c. YYYY
'^(%d%d%d%d–%d%d%d%d)%l?$', -- YYYY–YYYY
'^(%d%d%d%d–%d%d)%l?$' -- YYYY–YY
}
for _, pattern in ipairs (patterns) do -- spin through the patterns
y = year:match (pattern); -- y is the year portion
if y then
break; -- when y is set, we found a match so done
end
end
if not y then
return ' invalid ' .. code_open_tag .. '|year=</code>.'; -- y not set, so year is malformed
end
if is_set (anchor_year) then -- anchor_year is optional
for _, pattern in ipairs (patterns) do -- spin through the patterns
ay = anchor_year:match (pattern); -- ay is the year portion
if ay then
break; -- when ay is set, we found a match so done
end
end
if not ay then
return ' invalid ' .. code_open_tag .. '|anchor-year</code>.'; -- ay not set, so anchor_year is malformed
end
-- if not anchor_year:match ('%l$') then
-- return ' ' .. code_open_tag .. '|anchor-year=</code> missing dab.'; -- anchor_year must end with a disambiguator letter
-- end
if y ~= ay then
return ' ' .. code_open_tag .. '|year=</code> / ' .. code_open_tag .. '|anchor-year=</code> mismatch.'; -- 'year' portions of year and anchor_year must be the same
end
end
return ''; -- both years are good; empty string for concatenation
end
--[[--------------------------< M A K E _ N A M E >------------------------------------------------------------
Assembles last, first, link, or mask into a displayable contributor name.
]]
local function make_name (last, first, link, mask)
local name = last;
if is_set (first) then
name = name .. ', ' .. first; -- concatenate first onto last
end
if is_set (link) then
name = '[[' .. link .. '|' .. name .. ']]'; -- form a wikilink around the name
end
if is_set (mask) then -- mask this author
if tonumber(mask) then
name = string.rep ('—', mask) -- make a string that number length of mdashes
else
name = mask; -- mask is not a number so use the mask text
end
end
return name;
end
--[[--------------------------< C O R E >----------------------------------------------------------------------
Assembles the various parts provided by the template into a properly formatted bridging citation. Adds punctuation
and text; encloses the whole within a span with id and class attributes.
This creates a CITEREF anchor from |last1= through |last4= and |year=. It also creates a CITEREF link from |in1= through
|in4= and |year=. It is presumed that the dates of contributions are the same as the date of the enclosing work.
Even though not displayed, a year parameter is still required for the CITEREF anchor
]]
local function core( args )
local span_open_tag; -- holds CITEREF and css
local contributors = ''; -- chapter or contribution authors
local source = ''; -- editor/author date list that forms a CITEREF link to a full citation
local in_text = ' In ';
-- form the CITEREF anchor
if is_set (args.id) then
args.id = mw.uri.anchorEncode (args.id)
span_open_tag = '<span id="' .. args.id .. '" class="citation">'; -- for use when contributor name is same as source name
else
local citeref = 'CITEREF' .. table.concat (args.citeref) .. (is_set (args['anchor-year']) and args['anchor-year'] or args.year);
citeref = mw.uri.anchorEncode (citeref);
span_open_tag = '<span id="' .. citeref .. '" class="citation">';
end
--[[
form the contributors display list:
if |name-list-style=harv, display is similar to {{sfn}} and {{harv}}, 1 to 4 last names;
if |display-authors= is empty or omitted, display is similar to cs1|2: display all names in last, first order
if |display-authors=etal then displays all author names in last, first order and append et al.
if value assigned to |display-authors= is less than the number of author last names, displays the specified number of author names in last, first order followed by et al.
]]
if 'harv' ~= args.name_list_style then -- default cs1|2 style contributor list
local i = 1;
local count;
local etal = false; -- when |display-authors= is same as number of authors in contributor list
if is_set (args.display_authors) then
if 'etal' == args.display_authors:lower():gsub("[ '%.]", '') then -- the :gsub() portion makes 'etal' from a variety of 'et al.' spellings and stylings
count = #args.last; -- display all authors and ...
etal = true; -- ... append 'et al.'
else
count = tonumber (args.display_authors) or 0; -- 0 if can't be converted to a number
if 0 >= count then
args.err_msg = args.err_msg .. ' invalid ' .. code_open_tag .. '|display-authors=</code>'; -- if zero, then emit error message
end
end
if count > #args.last then
count = #args.last; -- when |display-authors= is more than the number of authors, use the number of authors
end
if count < #args.last then -- when |display-authors= is less than the number of authors
etal = true; -- append 'et al.'
end
else
count = #args.last; -- set count to display all of the authors
end
while i <= count do
if is_set (contributors) then
contributors = contributors .. '; ' .. make_name (args.last[i], args.first[i], args.link[i], args.mask[i]); -- the rest of the contributors
else
contributors = make_name (args.last[i], args.first[i], args.link[i], args.mask[i]); -- first contributor's name
end
i = i+1; -- bump the index
end
if true == etal then
contributors = contributors .. ' et al.'; -- append et al.
elseif 'amp' == args.name_list_style then
contributors = contributors:gsub('; ([^;]+)$', ' & %1') -- replace last separator with ' & '
end
else -- do default harv- or sfn-style contributor display
if 4 <= #args.last then -- four or more contributors (first followed by et al.)
contributors = args.last[1] .. ' et al.';
elseif 3 == #args.last then -- three (display them all)
contributors = args.last[1] .. ', ' .. args.last[2] .. ' & ' .. args.last[3];
elseif 2 == #args.last then -- two (first & second)
contributors = args.last[1] .. ' & ' .. args.last[2];
elseif 1 == #args.last then -- just one (first)
contributors = args.last[1];
else
args.err_msg = args.err_msg .. ' no authors in contributor list.'; -- this code used to find holes in the list; no more
end
end
--form the source author-date list
if is_set (args.in4) and is_set (args.in3) and is_set (args.in2) and is_set (args.in1) then
source = args.in1 .. ' et al.';
elseif not is_set (args.in4) and is_set (args.in3) and is_set (args.in2) and is_set (args.in1) then
source = args.in1 .. ', ' .. args.in2 .. ' & ' .. args.in3;
elseif not is_set (args.in4) and not is_set (args.in3) and is_set (args.in2) and is_set (args.in1) then
source = args.in1 .. ' & ' .. args.in2;
elseif not is_set (args.in4) and not is_set (args.in3) and not is_set (args.in2) and is_set (args.in1) then
source = args.in1;
else
args.err_msg = args.err_msg .. ' author missing from source list.'
end
source = source .. ' ' .. args.open .. args.year .. args.close; -- add the year with or without brackets
--assemble CITEREF wikilink
local anchor_id;
local target_err_msg;
if '' ~= args.ref then
anchor_id = mw.uri.anchorEncode (args.ref)
else
anchor_id = mw.uri.anchorEncode(table.concat ({'CITEREF', args.in1, args.in2, args.in3, args.in4, args.year}));
end
target_err_msg = target_check (anchor_id, args.ignore); -- see if there is a target for this anchor_id
source = '[[#' .. anchor_id .. "|" .. source .. "]]";
-- special case for afterword, foreword, introduction, preface
local no_quotes = ({['afterword']=true, ['foreword']=true, ['introduction']=true, ['preface']=true})[args.contribution:lower()];
--combine contribution with url to make external link
if args.url ~= '' then
args.contribution = '[' .. args.url .. ' ' .. args.contribution .. ']'; -- format external link
if args['url-access'] then
if lock_icons[args['url-access']] then
args.contribution = table.concat ({ -- add access icon markup to this item
'<span class="', -- open the opening span tag; icon classes are defined in Module:Citation/CS1/styles.css
lock_icons[args['url-access']][1], -- add the appropriate lock icon class
'" title="', -- and the title attribute
lock_icons[args['url-access']][2], -- for an appropriate tool tip
'">', -- close the opening span tag
args.contribution,
'</span>', -- and close the span
});
end
end
end
if is_set (args['anchor-year']) then
contributors = contributors .. ' (' .. args['anchor-year'] .. ')' .. args.sepc;
elseif args.sepc ~= contributors:sub(-1) and args.sepc .. ']]' ~= contributors:sub(-3) then
contributors = contributors .. args.sepc; -- add separator if not same as last character in name list (|first=John S. or et al.)
end
-- pages and other insource location
if args.p ~= '' then
args.p = args.page_sep .. args.p;
elseif args.pp ~= '' then
args.p = args.pages_sep .. args.pp; -- args.p not set so use it to hold common insource location info
end
if args.loc ~= '' then
args.p = args.p .. ', ' .. args.loc; -- add arg.loc to args.p
end
--wrap error messages in span and add help link
if is_set (args.err_msg) then
args.err_msg = '<span style="font-size:100%" class="error"> harvc:' .. args.err_msg .. ' ([[Template:Harvc|help]])</span>';
end
if ',' == args.sepc then
in_text = in_text:lower(); -- CS2 style use lower case
end
-- and put it all together
local result = {}; -- the assemby of the above output
table.insert (result, span_open_tag);
table.insert (result, contributors);
table.insert (result, no_quotes and ' ' or ' "'); -- foreword, afterword, introduction, preface contributions are not quoted; all other contributions are
table.insert (result, args.contribution);
table.insert (result, no_quotes and '' or '"'); -- foreword, afterword, introduction, preface contributions are not quoted; all other contributions are
table.insert (result, args.sepc);
table.insert (result, in_text);
table.insert (result, source);
table.insert (result, args.p);
table.insert (result, args.ps);
table.insert (result, args.err_msg);
table.insert (result, target_err_msg);
table.insert (result, '</span>');
return table.concat (result); -- make a string and done
end
--[[--------------------------< H A R V C >--------------------------------------------------------------------
Entry point from {{harvc}} template. Fetches parent frame parameters, does a bit of simple error checking
]]
local function harvc (frame)
local args = {
err_msg = '',
page_sep = ", p. ",
pages_sep = ", pp. ",
sepc = '.',
ps = '.',
open = '(', -- year brackets for source year
close = ')',
last = {},
first = {},
link = {},
mask = {},
citeref = {}
}
local pframe = frame:getParent();
args.contribution = pframe.args.c or -- chapter or contribution
pframe.args.chapter or
pframe.args.contribution or '';
args.id = pframe.args.id or '';
args.in1 = pframe.args['in'] or pframe.args.in1 or ''; -- source editor surnames; 'in' is a Lua reserved keyword
args.in2 = pframe.args.in2 or '';
args.in3 = pframe.args.in3 or '';
args.in4 = pframe.args.in4 or '';
args.display_authors = pframe.args['display-authors']; -- the number of contributor names to display; cs1|2 format includes first names
args.name_list_style = pframe.args['name-list-style'] or ''; -- when set to 'harv' display contributor list in sfn or harv style
args.name_list_style = args.name_list_style:lower(); -- make it case agnostic
if is_set (pframe.args.last) or is_set (pframe.args.last1) or
is_set (pframe.args.author) or is_set (pframe.args.author1) then -- must have at least this to continue
args.last[1] = pframe.args.last or pframe.args.last1 or pframe.args.author or pframe.args.author1; -- get first contributor's last name
args.citeref[1] = args.last[1]; -- add it to the citeref
args.first[1] = pframe.args.first or pframe.args.first1; -- get first contributor's first name
args.link[1] = pframe.args['author-link'] or pframe.args['author-link1']; -- get first contributor's article link
args.mask[1] = pframe.args['author-mask'] or pframe.args['author-mask1']; -- get first contributor's article link
local i = 2; -- index for the rest of the names
while is_set (pframe.args['last'..i]) or is_set (pframe.args['author'..i]) do -- loop through pframe.args and get the rest of the names
args.last[i] = pframe.args['last'..i] or pframe.args['author'..i]; -- last names
args.first[i] = pframe.args['first'..i]; -- first names
args.link[i] = pframe.args['author-link'..i]; -- links
args.mask[i] = pframe.args['author-mask'..i]; -- masks
if 5 > i then
args.citeref[i] = args.last[i]; -- collect first four last names for CITEREF anchor
end
i = i + 1 -- bump the index
end
end
if 0 == #args.last then -- |last= is required
args.err_msg = args.err_msg .. ' no authors in contributor list.';
end
args.p = pframe.args.p or pframe.args.page or ''; -- source page number(s) or location
args.pp = pframe.args.pp or pframe.args.pages or '';
args.loc = pframe.args.loc or '';
args.ref = pframe.args.ref or pframe.args.Ref or ''; -- used to match |ref=<text> in cs1|2 source template
args.ignore = 'yes' == pframe.args['ignore-err']; -- suppress false-positive 'no target' errors
if 'cs2' == pframe.args.mode then
args.ps = ''; -- set postscript character to empty string, cs2 mode
args.sepc = ','; -- set seperator character to comma, cs2 mode
end
do -- to limit scope of local temp
local temp = pframe.args.ps or pframe.args.postscript;
if is_set (temp) then
if 'none' == temp:lower() then -- if |ps=none or |postscript=none then
args.ps = ''; -- no postscript
else
args.ps = temp; -- override default postscript
end
end
end -- end of scope limit
if 'yes' == pframe.args.nb then -- if no brackets around year in link to cs1|2 template
args.open = ''; -- unset these
args.close = '';
end
args.url = pframe.args.url or -- url for chapter or contribution
pframe.args['chapter-url'] or
pframe.args['contribution-url'] or '';
args['url-access'] = pframe.args['url-access'];
args.year = pframe.args.year or ''; -- required
args['anchor-year'] = pframe.args['anchor-year'] or '';
args.err_msg = args.err_msg .. check_years (args.year, args['anchor-year']);
if not is_set (args.contribution) then
args.err_msg = args.err_msg .. ' required contribution is missing.'; -- error message if source not provided
args.contribution = args.url; -- if set it will give us linkable text
end
if args.last[1] == args.in1 and
args.last[2] == args.in2 and
args.last[3] == args.in3 and
args.last[4] == args.in4 and
not is_set (args.id) then
args.err_msg = args.err_msg .. ' required ' .. code_open_tag .. '|id=</code> parameter missing.'; -- error message if contributor and source are the same
end
return table.concat ({frame:extensionTag ('templatestyles', '', {src='Module:Citation/CS1/styles.css'}), core (args)});
end
--[[--------------------------< E X P O R T E D F U N C T I O N S >------------------------------------------
]]
return {
harvc = harvc
};
conbhdo9qxkt8kffhtdtnfo9z74gk91
801907
801906
2025-01-26T16:13:50Z
en>Hike395
0
replace target_check() with call to target_check() in [[Module:Footnotes]], which has full wrapper/whitelist functionality
801907
Scribunto
text/plain
require('strict')
local code_open_tag = '<code class="cs1-code">'; -- cs1-code class defined in Module:Citation/CS1/styles.css
local lock_icons = { --icon classes are defined in Module:Citation/CS1/styles.css
['registration'] = {'id-lock-registration', 'Free registration required'},
['limited'] = {'id-lock-limited', 'Free access subject to limited trial, subscription normally required'},
['subscription'] = {'id-lock-subscription', 'Paid subscription required'},
}
--[[--------------------------< T A R G E T _ C H E C K >------------------------------------------------------
check to see if target of harvc exists in the page somewhere. Uses the target check mechanism from Module:Footnotes
setting |ignore-errors=yes in {{harvc}} will override this check
]]
local function target_check (anchor_id, ignore)
local whitelist_check = require('Module:Footnotes').target_check
local args = {ignore=ignore, template='Harvc', show=true}
return whitelist_check(anchor_id, args)
end
--[[--------------------------< I S _ S E T >------------------------------------------------------------------
Whether variable is set or not. A variable is set when it is not nil and not empty.
]]
local function is_set( var )
return not (var == nil or var == '');
end
--[[--------------------------< C H E C K _ Y E A R S >--------------------------------------------------------
evaluates params to see if they are one of these forms with or without lowercase letter disambiguator (same as in
Module:Footnotes):
YYYY
n.d.
nd
c. YYYY
YYYY–YYYY (separator is endash)
YYYY–YY (separator is endash)
when anchor_year present, year portion must be same as year param and must have disambiguator
returns empty string when params have correct form; error message else
]]
local function check_years (year, anchor_year)
local y, ay;
if not is_set (year) then -- year is required so return error message when not set
return ' missing ' .. code_open_tag .. '|year=</code>.';
end
local patterns = { -- allowed year patterns from Module:Footnotes (captures added here)
'^(%d%d%d%d?)%l?$', -- YYY or YYYY
'^(n%.d%.)%l?$', -- n.d.
'^(nd)%l?$', -- nd
'^(c%. %d%d%d%d?)%l?$', -- c. YYY or c. YYYY
'^(%d%d%d%d–%d%d%d%d)%l?$', -- YYYY–YYYY
'^(%d%d%d%d–%d%d)%l?$' -- YYYY–YY
}
for _, pattern in ipairs (patterns) do -- spin through the patterns
y = year:match (pattern); -- y is the year portion
if y then
break; -- when y is set, we found a match so done
end
end
if not y then
return ' invalid ' .. code_open_tag .. '|year=</code>.'; -- y not set, so year is malformed
end
if is_set (anchor_year) then -- anchor_year is optional
for _, pattern in ipairs (patterns) do -- spin through the patterns
ay = anchor_year:match (pattern); -- ay is the year portion
if ay then
break; -- when ay is set, we found a match so done
end
end
if not ay then
return ' invalid ' .. code_open_tag .. '|anchor-year</code>.'; -- ay not set, so anchor_year is malformed
end
-- if not anchor_year:match ('%l$') then
-- return ' ' .. code_open_tag .. '|anchor-year=</code> missing dab.'; -- anchor_year must end with a disambiguator letter
-- end
if y ~= ay then
return ' ' .. code_open_tag .. '|year=</code> / ' .. code_open_tag .. '|anchor-year=</code> mismatch.'; -- 'year' portions of year and anchor_year must be the same
end
end
return ''; -- both years are good; empty string for concatenation
end
--[[--------------------------< M A K E _ N A M E >------------------------------------------------------------
Assembles last, first, link, or mask into a displayable contributor name.
]]
local function make_name (last, first, link, mask)
local name = last;
if is_set (first) then
name = name .. ', ' .. first; -- concatenate first onto last
end
if is_set (link) then
name = '[[' .. link .. '|' .. name .. ']]'; -- form a wikilink around the name
end
if is_set (mask) then -- mask this author
if tonumber(mask) then
name = string.rep ('—', mask) -- make a string that number length of mdashes
else
name = mask; -- mask is not a number so use the mask text
end
end
return name;
end
--[[--------------------------< C O R E >----------------------------------------------------------------------
Assembles the various parts provided by the template into a properly formatted bridging citation. Adds punctuation
and text; encloses the whole within a span with id and class attributes.
This creates a CITEREF anchor from |last1= through |last4= and |year=. It also creates a CITEREF link from |in1= through
|in4= and |year=. It is presumed that the dates of contributions are the same as the date of the enclosing work.
Even though not displayed, a year parameter is still required for the CITEREF anchor
]]
local function core( args )
local span_open_tag; -- holds CITEREF and css
local contributors = ''; -- chapter or contribution authors
local source = ''; -- editor/author date list that forms a CITEREF link to a full citation
local in_text = ' In ';
-- form the CITEREF anchor
if is_set (args.id) then
args.id = mw.uri.anchorEncode (args.id)
span_open_tag = '<span id="' .. args.id .. '" class="citation">'; -- for use when contributor name is same as source name
else
local citeref = 'CITEREF' .. table.concat (args.citeref) .. (is_set (args['anchor-year']) and args['anchor-year'] or args.year);
citeref = mw.uri.anchorEncode (citeref);
span_open_tag = '<span id="' .. citeref .. '" class="citation">';
end
--[[
form the contributors display list:
if |name-list-style=harv, display is similar to {{sfn}} and {{harv}}, 1 to 4 last names;
if |display-authors= is empty or omitted, display is similar to cs1|2: display all names in last, first order
if |display-authors=etal then displays all author names in last, first order and append et al.
if value assigned to |display-authors= is less than the number of author last names, displays the specified number of author names in last, first order followed by et al.
]]
if 'harv' ~= args.name_list_style then -- default cs1|2 style contributor list
local i = 1;
local count;
local etal = false; -- when |display-authors= is same as number of authors in contributor list
if is_set (args.display_authors) then
if 'etal' == args.display_authors:lower():gsub("[ '%.]", '') then -- the :gsub() portion makes 'etal' from a variety of 'et al.' spellings and stylings
count = #args.last; -- display all authors and ...
etal = true; -- ... append 'et al.'
else
count = tonumber (args.display_authors) or 0; -- 0 if can't be converted to a number
if 0 >= count then
args.err_msg = args.err_msg .. ' invalid ' .. code_open_tag .. '|display-authors=</code>'; -- if zero, then emit error message
end
end
if count > #args.last then
count = #args.last; -- when |display-authors= is more than the number of authors, use the number of authors
end
if count < #args.last then -- when |display-authors= is less than the number of authors
etal = true; -- append 'et al.'
end
else
count = #args.last; -- set count to display all of the authors
end
while i <= count do
if is_set (contributors) then
contributors = contributors .. '; ' .. make_name (args.last[i], args.first[i], args.link[i], args.mask[i]); -- the rest of the contributors
else
contributors = make_name (args.last[i], args.first[i], args.link[i], args.mask[i]); -- first contributor's name
end
i = i+1; -- bump the index
end
if true == etal then
contributors = contributors .. ' et al.'; -- append et al.
elseif 'amp' == args.name_list_style then
contributors = contributors:gsub('; ([^;]+)$', ' & %1') -- replace last separator with ' & '
end
else -- do default harv- or sfn-style contributor display
if 4 <= #args.last then -- four or more contributors (first followed by et al.)
contributors = args.last[1] .. ' et al.';
elseif 3 == #args.last then -- three (display them all)
contributors = args.last[1] .. ', ' .. args.last[2] .. ' & ' .. args.last[3];
elseif 2 == #args.last then -- two (first & second)
contributors = args.last[1] .. ' & ' .. args.last[2];
elseif 1 == #args.last then -- just one (first)
contributors = args.last[1];
else
args.err_msg = args.err_msg .. ' no authors in contributor list.'; -- this code used to find holes in the list; no more
end
end
--form the source author-date list
if is_set (args.in4) and is_set (args.in3) and is_set (args.in2) and is_set (args.in1) then
source = args.in1 .. ' et al.';
elseif not is_set (args.in4) and is_set (args.in3) and is_set (args.in2) and is_set (args.in1) then
source = args.in1 .. ', ' .. args.in2 .. ' & ' .. args.in3;
elseif not is_set (args.in4) and not is_set (args.in3) and is_set (args.in2) and is_set (args.in1) then
source = args.in1 .. ' & ' .. args.in2;
elseif not is_set (args.in4) and not is_set (args.in3) and not is_set (args.in2) and is_set (args.in1) then
source = args.in1;
else
args.err_msg = args.err_msg .. ' author missing from source list.'
end
source = source .. ' ' .. args.open .. args.year .. args.close; -- add the year with or without brackets
--assemble CITEREF wikilink
local anchor_id;
local target_err_msg;
if '' ~= args.ref then
anchor_id = mw.uri.anchorEncode (args.ref)
else
anchor_id = mw.uri.anchorEncode(table.concat ({'CITEREF', args.in1, args.in2, args.in3, args.in4, args.year}));
end
target_err_msg = target_check (anchor_id, args.ignore); -- see if there is a target for this anchor_id
source = '[[#' .. anchor_id .. "|" .. source .. "]]";
-- special case for afterword, foreword, introduction, preface
local no_quotes = ({['afterword']=true, ['foreword']=true, ['introduction']=true, ['preface']=true})[args.contribution:lower()];
--combine contribution with url to make external link
if args.url ~= '' then
args.contribution = '[' .. args.url .. ' ' .. args.contribution .. ']'; -- format external link
if args['url-access'] then
if lock_icons[args['url-access']] then
args.contribution = table.concat ({ -- add access icon markup to this item
'<span class="', -- open the opening span tag; icon classes are defined in Module:Citation/CS1/styles.css
lock_icons[args['url-access']][1], -- add the appropriate lock icon class
'" title="', -- and the title attribute
lock_icons[args['url-access']][2], -- for an appropriate tool tip
'">', -- close the opening span tag
args.contribution,
'</span>', -- and close the span
});
end
end
end
if is_set (args['anchor-year']) then
contributors = contributors .. ' (' .. args['anchor-year'] .. ')' .. args.sepc;
elseif args.sepc ~= contributors:sub(-1) and args.sepc .. ']]' ~= contributors:sub(-3) then
contributors = contributors .. args.sepc; -- add separator if not same as last character in name list (|first=John S. or et al.)
end
-- pages and other insource location
if args.p ~= '' then
args.p = args.page_sep .. args.p;
elseif args.pp ~= '' then
args.p = args.pages_sep .. args.pp; -- args.p not set so use it to hold common insource location info
end
if args.loc ~= '' then
args.p = args.p .. ', ' .. args.loc; -- add arg.loc to args.p
end
--wrap error messages in span and add help link
if is_set (args.err_msg) then
args.err_msg = '<span style="font-size:100%" class="error"> harvc:' .. args.err_msg .. ' ([[Template:Harvc|help]])</span>';
end
if ',' == args.sepc then
in_text = in_text:lower(); -- CS2 style use lower case
end
-- and put it all together
local result = {}; -- the assemby of the above output
table.insert (result, span_open_tag);
table.insert (result, contributors);
table.insert (result, no_quotes and ' ' or ' "'); -- foreword, afterword, introduction, preface contributions are not quoted; all other contributions are
table.insert (result, args.contribution);
table.insert (result, no_quotes and '' or '"'); -- foreword, afterword, introduction, preface contributions are not quoted; all other contributions are
table.insert (result, args.sepc);
table.insert (result, in_text);
table.insert (result, source);
table.insert (result, args.p);
table.insert (result, args.ps);
table.insert (result, args.err_msg);
if not is_set(args.err_msg) then
table.insert (result, target_err_msg)
end
table.insert (result, '</span>');
return table.concat (result); -- make a string and done
end
--[[--------------------------< H A R V C >--------------------------------------------------------------------
Entry point from {{harvc}} template. Fetches parent frame parameters, does a bit of simple error checking
]]
local function harvc (frame)
local args = {
err_msg = '',
page_sep = ", p. ",
pages_sep = ", pp. ",
sepc = '.',
ps = '.',
open = '(', -- year brackets for source year
close = ')',
last = {},
first = {},
link = {},
mask = {},
citeref = {}
}
local pframe = frame:getParent();
args.contribution = pframe.args.c or -- chapter or contribution
pframe.args.chapter or
pframe.args.contribution or '';
args.id = pframe.args.id or '';
args.in1 = pframe.args['in'] or pframe.args.in1 or ''; -- source editor surnames; 'in' is a Lua reserved keyword
args.in2 = pframe.args.in2 or '';
args.in3 = pframe.args.in3 or '';
args.in4 = pframe.args.in4 or '';
args.display_authors = pframe.args['display-authors']; -- the number of contributor names to display; cs1|2 format includes first names
args.name_list_style = pframe.args['name-list-style'] or ''; -- when set to 'harv' display contributor list in sfn or harv style
args.name_list_style = args.name_list_style:lower(); -- make it case agnostic
if is_set (pframe.args.last) or is_set (pframe.args.last1) or
is_set (pframe.args.author) or is_set (pframe.args.author1) then -- must have at least this to continue
args.last[1] = pframe.args.last or pframe.args.last1 or pframe.args.author or pframe.args.author1; -- get first contributor's last name
args.citeref[1] = args.last[1]; -- add it to the citeref
args.first[1] = pframe.args.first or pframe.args.first1; -- get first contributor's first name
args.link[1] = pframe.args['author-link'] or pframe.args['author-link1']; -- get first contributor's article link
args.mask[1] = pframe.args['author-mask'] or pframe.args['author-mask1']; -- get first contributor's article link
local i = 2; -- index for the rest of the names
while is_set (pframe.args['last'..i]) or is_set (pframe.args['author'..i]) do -- loop through pframe.args and get the rest of the names
args.last[i] = pframe.args['last'..i] or pframe.args['author'..i]; -- last names
args.first[i] = pframe.args['first'..i]; -- first names
args.link[i] = pframe.args['author-link'..i]; -- links
args.mask[i] = pframe.args['author-mask'..i]; -- masks
if 5 > i then
args.citeref[i] = args.last[i]; -- collect first four last names for CITEREF anchor
end
i = i + 1 -- bump the index
end
end
if 0 == #args.last then -- |last= is required
args.err_msg = args.err_msg .. ' no authors in contributor list.';
end
args.p = pframe.args.p or pframe.args.page or ''; -- source page number(s) or location
args.pp = pframe.args.pp or pframe.args.pages or '';
args.loc = pframe.args.loc or '';
args.ref = pframe.args.ref or pframe.args.Ref or ''; -- used to match |ref=<text> in cs1|2 source template
args.ignore = 'yes' == pframe.args['ignore-err']; -- suppress false-positive 'no target' errors
if 'cs2' == pframe.args.mode then
args.ps = ''; -- set postscript character to empty string, cs2 mode
args.sepc = ','; -- set seperator character to comma, cs2 mode
end
do -- to limit scope of local temp
local temp = pframe.args.ps or pframe.args.postscript;
if is_set (temp) then
if 'none' == temp:lower() then -- if |ps=none or |postscript=none then
args.ps = ''; -- no postscript
else
args.ps = temp; -- override default postscript
end
end
end -- end of scope limit
if 'yes' == pframe.args.nb then -- if no brackets around year in link to cs1|2 template
args.open = ''; -- unset these
args.close = '';
end
args.url = pframe.args.url or -- url for chapter or contribution
pframe.args['chapter-url'] or
pframe.args['contribution-url'] or '';
args['url-access'] = pframe.args['url-access'];
args.year = pframe.args.year or ''; -- required
args['anchor-year'] = pframe.args['anchor-year'] or '';
args.err_msg = args.err_msg .. check_years (args.year, args['anchor-year']);
if not is_set (args.contribution) then
args.err_msg = args.err_msg .. ' required contribution is missing.'; -- error message if source not provided
args.contribution = args.url; -- if set it will give us linkable text
end
if args.last[1] == args.in1 and
args.last[2] == args.in2 and
args.last[3] == args.in3 and
args.last[4] == args.in4 and
not is_set (args.id) then
args.err_msg = args.err_msg .. ' required ' .. code_open_tag .. '|id=</code> parameter missing.'; -- error message if contributor and source are the same
end
return table.concat ({frame:extensionTag ('templatestyles', '', {src='Module:Citation/CS1/styles.css'}), core (args)});
end
--[[--------------------------< E X P O R T E D F U N C T I O N S >------------------------------------------
]]
return {
harvc = harvc
};
gax2zw56jpkvdwud2rx8nj8o9q366xt
801908
801907
2026-07-24T20:07:08Z
SM7
3953
80 revisions imported from [[:en:Module:Harvc]]
801907
Scribunto
text/plain
require('strict')
local code_open_tag = '<code class="cs1-code">'; -- cs1-code class defined in Module:Citation/CS1/styles.css
local lock_icons = { --icon classes are defined in Module:Citation/CS1/styles.css
['registration'] = {'id-lock-registration', 'Free registration required'},
['limited'] = {'id-lock-limited', 'Free access subject to limited trial, subscription normally required'},
['subscription'] = {'id-lock-subscription', 'Paid subscription required'},
}
--[[--------------------------< T A R G E T _ C H E C K >------------------------------------------------------
check to see if target of harvc exists in the page somewhere. Uses the target check mechanism from Module:Footnotes
setting |ignore-errors=yes in {{harvc}} will override this check
]]
local function target_check (anchor_id, ignore)
local whitelist_check = require('Module:Footnotes').target_check
local args = {ignore=ignore, template='Harvc', show=true}
return whitelist_check(anchor_id, args)
end
--[[--------------------------< I S _ S E T >------------------------------------------------------------------
Whether variable is set or not. A variable is set when it is not nil and not empty.
]]
local function is_set( var )
return not (var == nil or var == '');
end
--[[--------------------------< C H E C K _ Y E A R S >--------------------------------------------------------
evaluates params to see if they are one of these forms with or without lowercase letter disambiguator (same as in
Module:Footnotes):
YYYY
n.d.
nd
c. YYYY
YYYY–YYYY (separator is endash)
YYYY–YY (separator is endash)
when anchor_year present, year portion must be same as year param and must have disambiguator
returns empty string when params have correct form; error message else
]]
local function check_years (year, anchor_year)
local y, ay;
if not is_set (year) then -- year is required so return error message when not set
return ' missing ' .. code_open_tag .. '|year=</code>.';
end
local patterns = { -- allowed year patterns from Module:Footnotes (captures added here)
'^(%d%d%d%d?)%l?$', -- YYY or YYYY
'^(n%.d%.)%l?$', -- n.d.
'^(nd)%l?$', -- nd
'^(c%. %d%d%d%d?)%l?$', -- c. YYY or c. YYYY
'^(%d%d%d%d–%d%d%d%d)%l?$', -- YYYY–YYYY
'^(%d%d%d%d–%d%d)%l?$' -- YYYY–YY
}
for _, pattern in ipairs (patterns) do -- spin through the patterns
y = year:match (pattern); -- y is the year portion
if y then
break; -- when y is set, we found a match so done
end
end
if not y then
return ' invalid ' .. code_open_tag .. '|year=</code>.'; -- y not set, so year is malformed
end
if is_set (anchor_year) then -- anchor_year is optional
for _, pattern in ipairs (patterns) do -- spin through the patterns
ay = anchor_year:match (pattern); -- ay is the year portion
if ay then
break; -- when ay is set, we found a match so done
end
end
if not ay then
return ' invalid ' .. code_open_tag .. '|anchor-year</code>.'; -- ay not set, so anchor_year is malformed
end
-- if not anchor_year:match ('%l$') then
-- return ' ' .. code_open_tag .. '|anchor-year=</code> missing dab.'; -- anchor_year must end with a disambiguator letter
-- end
if y ~= ay then
return ' ' .. code_open_tag .. '|year=</code> / ' .. code_open_tag .. '|anchor-year=</code> mismatch.'; -- 'year' portions of year and anchor_year must be the same
end
end
return ''; -- both years are good; empty string for concatenation
end
--[[--------------------------< M A K E _ N A M E >------------------------------------------------------------
Assembles last, first, link, or mask into a displayable contributor name.
]]
local function make_name (last, first, link, mask)
local name = last;
if is_set (first) then
name = name .. ', ' .. first; -- concatenate first onto last
end
if is_set (link) then
name = '[[' .. link .. '|' .. name .. ']]'; -- form a wikilink around the name
end
if is_set (mask) then -- mask this author
if tonumber(mask) then
name = string.rep ('—', mask) -- make a string that number length of mdashes
else
name = mask; -- mask is not a number so use the mask text
end
end
return name;
end
--[[--------------------------< C O R E >----------------------------------------------------------------------
Assembles the various parts provided by the template into a properly formatted bridging citation. Adds punctuation
and text; encloses the whole within a span with id and class attributes.
This creates a CITEREF anchor from |last1= through |last4= and |year=. It also creates a CITEREF link from |in1= through
|in4= and |year=. It is presumed that the dates of contributions are the same as the date of the enclosing work.
Even though not displayed, a year parameter is still required for the CITEREF anchor
]]
local function core( args )
local span_open_tag; -- holds CITEREF and css
local contributors = ''; -- chapter or contribution authors
local source = ''; -- editor/author date list that forms a CITEREF link to a full citation
local in_text = ' In ';
-- form the CITEREF anchor
if is_set (args.id) then
args.id = mw.uri.anchorEncode (args.id)
span_open_tag = '<span id="' .. args.id .. '" class="citation">'; -- for use when contributor name is same as source name
else
local citeref = 'CITEREF' .. table.concat (args.citeref) .. (is_set (args['anchor-year']) and args['anchor-year'] or args.year);
citeref = mw.uri.anchorEncode (citeref);
span_open_tag = '<span id="' .. citeref .. '" class="citation">';
end
--[[
form the contributors display list:
if |name-list-style=harv, display is similar to {{sfn}} and {{harv}}, 1 to 4 last names;
if |display-authors= is empty or omitted, display is similar to cs1|2: display all names in last, first order
if |display-authors=etal then displays all author names in last, first order and append et al.
if value assigned to |display-authors= is less than the number of author last names, displays the specified number of author names in last, first order followed by et al.
]]
if 'harv' ~= args.name_list_style then -- default cs1|2 style contributor list
local i = 1;
local count;
local etal = false; -- when |display-authors= is same as number of authors in contributor list
if is_set (args.display_authors) then
if 'etal' == args.display_authors:lower():gsub("[ '%.]", '') then -- the :gsub() portion makes 'etal' from a variety of 'et al.' spellings and stylings
count = #args.last; -- display all authors and ...
etal = true; -- ... append 'et al.'
else
count = tonumber (args.display_authors) or 0; -- 0 if can't be converted to a number
if 0 >= count then
args.err_msg = args.err_msg .. ' invalid ' .. code_open_tag .. '|display-authors=</code>'; -- if zero, then emit error message
end
end
if count > #args.last then
count = #args.last; -- when |display-authors= is more than the number of authors, use the number of authors
end
if count < #args.last then -- when |display-authors= is less than the number of authors
etal = true; -- append 'et al.'
end
else
count = #args.last; -- set count to display all of the authors
end
while i <= count do
if is_set (contributors) then
contributors = contributors .. '; ' .. make_name (args.last[i], args.first[i], args.link[i], args.mask[i]); -- the rest of the contributors
else
contributors = make_name (args.last[i], args.first[i], args.link[i], args.mask[i]); -- first contributor's name
end
i = i+1; -- bump the index
end
if true == etal then
contributors = contributors .. ' et al.'; -- append et al.
elseif 'amp' == args.name_list_style then
contributors = contributors:gsub('; ([^;]+)$', ' & %1') -- replace last separator with ' & '
end
else -- do default harv- or sfn-style contributor display
if 4 <= #args.last then -- four or more contributors (first followed by et al.)
contributors = args.last[1] .. ' et al.';
elseif 3 == #args.last then -- three (display them all)
contributors = args.last[1] .. ', ' .. args.last[2] .. ' & ' .. args.last[3];
elseif 2 == #args.last then -- two (first & second)
contributors = args.last[1] .. ' & ' .. args.last[2];
elseif 1 == #args.last then -- just one (first)
contributors = args.last[1];
else
args.err_msg = args.err_msg .. ' no authors in contributor list.'; -- this code used to find holes in the list; no more
end
end
--form the source author-date list
if is_set (args.in4) and is_set (args.in3) and is_set (args.in2) and is_set (args.in1) then
source = args.in1 .. ' et al.';
elseif not is_set (args.in4) and is_set (args.in3) and is_set (args.in2) and is_set (args.in1) then
source = args.in1 .. ', ' .. args.in2 .. ' & ' .. args.in3;
elseif not is_set (args.in4) and not is_set (args.in3) and is_set (args.in2) and is_set (args.in1) then
source = args.in1 .. ' & ' .. args.in2;
elseif not is_set (args.in4) and not is_set (args.in3) and not is_set (args.in2) and is_set (args.in1) then
source = args.in1;
else
args.err_msg = args.err_msg .. ' author missing from source list.'
end
source = source .. ' ' .. args.open .. args.year .. args.close; -- add the year with or without brackets
--assemble CITEREF wikilink
local anchor_id;
local target_err_msg;
if '' ~= args.ref then
anchor_id = mw.uri.anchorEncode (args.ref)
else
anchor_id = mw.uri.anchorEncode(table.concat ({'CITEREF', args.in1, args.in2, args.in3, args.in4, args.year}));
end
target_err_msg = target_check (anchor_id, args.ignore); -- see if there is a target for this anchor_id
source = '[[#' .. anchor_id .. "|" .. source .. "]]";
-- special case for afterword, foreword, introduction, preface
local no_quotes = ({['afterword']=true, ['foreword']=true, ['introduction']=true, ['preface']=true})[args.contribution:lower()];
--combine contribution with url to make external link
if args.url ~= '' then
args.contribution = '[' .. args.url .. ' ' .. args.contribution .. ']'; -- format external link
if args['url-access'] then
if lock_icons[args['url-access']] then
args.contribution = table.concat ({ -- add access icon markup to this item
'<span class="', -- open the opening span tag; icon classes are defined in Module:Citation/CS1/styles.css
lock_icons[args['url-access']][1], -- add the appropriate lock icon class
'" title="', -- and the title attribute
lock_icons[args['url-access']][2], -- for an appropriate tool tip
'">', -- close the opening span tag
args.contribution,
'</span>', -- and close the span
});
end
end
end
if is_set (args['anchor-year']) then
contributors = contributors .. ' (' .. args['anchor-year'] .. ')' .. args.sepc;
elseif args.sepc ~= contributors:sub(-1) and args.sepc .. ']]' ~= contributors:sub(-3) then
contributors = contributors .. args.sepc; -- add separator if not same as last character in name list (|first=John S. or et al.)
end
-- pages and other insource location
if args.p ~= '' then
args.p = args.page_sep .. args.p;
elseif args.pp ~= '' then
args.p = args.pages_sep .. args.pp; -- args.p not set so use it to hold common insource location info
end
if args.loc ~= '' then
args.p = args.p .. ', ' .. args.loc; -- add arg.loc to args.p
end
--wrap error messages in span and add help link
if is_set (args.err_msg) then
args.err_msg = '<span style="font-size:100%" class="error"> harvc:' .. args.err_msg .. ' ([[Template:Harvc|help]])</span>';
end
if ',' == args.sepc then
in_text = in_text:lower(); -- CS2 style use lower case
end
-- and put it all together
local result = {}; -- the assemby of the above output
table.insert (result, span_open_tag);
table.insert (result, contributors);
table.insert (result, no_quotes and ' ' or ' "'); -- foreword, afterword, introduction, preface contributions are not quoted; all other contributions are
table.insert (result, args.contribution);
table.insert (result, no_quotes and '' or '"'); -- foreword, afterword, introduction, preface contributions are not quoted; all other contributions are
table.insert (result, args.sepc);
table.insert (result, in_text);
table.insert (result, source);
table.insert (result, args.p);
table.insert (result, args.ps);
table.insert (result, args.err_msg);
if not is_set(args.err_msg) then
table.insert (result, target_err_msg)
end
table.insert (result, '</span>');
return table.concat (result); -- make a string and done
end
--[[--------------------------< H A R V C >--------------------------------------------------------------------
Entry point from {{harvc}} template. Fetches parent frame parameters, does a bit of simple error checking
]]
local function harvc (frame)
local args = {
err_msg = '',
page_sep = ", p. ",
pages_sep = ", pp. ",
sepc = '.',
ps = '.',
open = '(', -- year brackets for source year
close = ')',
last = {},
first = {},
link = {},
mask = {},
citeref = {}
}
local pframe = frame:getParent();
args.contribution = pframe.args.c or -- chapter or contribution
pframe.args.chapter or
pframe.args.contribution or '';
args.id = pframe.args.id or '';
args.in1 = pframe.args['in'] or pframe.args.in1 or ''; -- source editor surnames; 'in' is a Lua reserved keyword
args.in2 = pframe.args.in2 or '';
args.in3 = pframe.args.in3 or '';
args.in4 = pframe.args.in4 or '';
args.display_authors = pframe.args['display-authors']; -- the number of contributor names to display; cs1|2 format includes first names
args.name_list_style = pframe.args['name-list-style'] or ''; -- when set to 'harv' display contributor list in sfn or harv style
args.name_list_style = args.name_list_style:lower(); -- make it case agnostic
if is_set (pframe.args.last) or is_set (pframe.args.last1) or
is_set (pframe.args.author) or is_set (pframe.args.author1) then -- must have at least this to continue
args.last[1] = pframe.args.last or pframe.args.last1 or pframe.args.author or pframe.args.author1; -- get first contributor's last name
args.citeref[1] = args.last[1]; -- add it to the citeref
args.first[1] = pframe.args.first or pframe.args.first1; -- get first contributor's first name
args.link[1] = pframe.args['author-link'] or pframe.args['author-link1']; -- get first contributor's article link
args.mask[1] = pframe.args['author-mask'] or pframe.args['author-mask1']; -- get first contributor's article link
local i = 2; -- index for the rest of the names
while is_set (pframe.args['last'..i]) or is_set (pframe.args['author'..i]) do -- loop through pframe.args and get the rest of the names
args.last[i] = pframe.args['last'..i] or pframe.args['author'..i]; -- last names
args.first[i] = pframe.args['first'..i]; -- first names
args.link[i] = pframe.args['author-link'..i]; -- links
args.mask[i] = pframe.args['author-mask'..i]; -- masks
if 5 > i then
args.citeref[i] = args.last[i]; -- collect first four last names for CITEREF anchor
end
i = i + 1 -- bump the index
end
end
if 0 == #args.last then -- |last= is required
args.err_msg = args.err_msg .. ' no authors in contributor list.';
end
args.p = pframe.args.p or pframe.args.page or ''; -- source page number(s) or location
args.pp = pframe.args.pp or pframe.args.pages or '';
args.loc = pframe.args.loc or '';
args.ref = pframe.args.ref or pframe.args.Ref or ''; -- used to match |ref=<text> in cs1|2 source template
args.ignore = 'yes' == pframe.args['ignore-err']; -- suppress false-positive 'no target' errors
if 'cs2' == pframe.args.mode then
args.ps = ''; -- set postscript character to empty string, cs2 mode
args.sepc = ','; -- set seperator character to comma, cs2 mode
end
do -- to limit scope of local temp
local temp = pframe.args.ps or pframe.args.postscript;
if is_set (temp) then
if 'none' == temp:lower() then -- if |ps=none or |postscript=none then
args.ps = ''; -- no postscript
else
args.ps = temp; -- override default postscript
end
end
end -- end of scope limit
if 'yes' == pframe.args.nb then -- if no brackets around year in link to cs1|2 template
args.open = ''; -- unset these
args.close = '';
end
args.url = pframe.args.url or -- url for chapter or contribution
pframe.args['chapter-url'] or
pframe.args['contribution-url'] or '';
args['url-access'] = pframe.args['url-access'];
args.year = pframe.args.year or ''; -- required
args['anchor-year'] = pframe.args['anchor-year'] or '';
args.err_msg = args.err_msg .. check_years (args.year, args['anchor-year']);
if not is_set (args.contribution) then
args.err_msg = args.err_msg .. ' required contribution is missing.'; -- error message if source not provided
args.contribution = args.url; -- if set it will give us linkable text
end
if args.last[1] == args.in1 and
args.last[2] == args.in2 and
args.last[3] == args.in3 and
args.last[4] == args.in4 and
not is_set (args.id) then
args.err_msg = args.err_msg .. ' required ' .. code_open_tag .. '|id=</code> parameter missing.'; -- error message if contributor and source are the same
end
return table.concat ({frame:extensionTag ('templatestyles', '', {src='Module:Citation/CS1/styles.css'}), core (args)});
end
--[[--------------------------< E X P O R T E D F U N C T I O N S >------------------------------------------
]]
return {
harvc = harvc
};
gax2zw56jpkvdwud2rx8nj8o9q366xt
.xyz
0
101281
801909
2026-07-24T20:11:00Z
SM7
3953
नया आधार लेख / अंग्रेजी विकिपीडिया से अनुबाद कइ के
801909
wikitext
text/x-wiki
'''.xyz''' एगो टॉप-लेवल डोमेन (टीएलडी) ह, जेकर प्रस्ताव आईकैन के नया जेनेरिक टॉप-लेवल डोमेन (जीटीएलडी) कार्यक्रम के तहत रखल गइल रहे। एह डोमेन के नाम [[लैटिन लिखाई|लैटिन लिपि]] के वर्णमाला के आखिरी तीन गो अक्षर "[[एक्स]]", "[[वाई]]" आ "[[ज़ेड]]" से बनल बा। एह डोमेन के रजिस्ट्री के संचालन एक्सवाईज़ेड डॉट कॉम आ सेंट्रलनिक करेला, जबकि एकर स्थापना उद्यमी डेनियल नेगारी कइले रहलें।
.xyz डोमेन 2 जून 2014 से आम लोग खातिर उपलब्ध भइल। ओकरा बाद ई टेक्निकल स्टार्टअप, कंटेंट बनावे वाला लोग आ [[वेब3]] प्रोजेक्ट सभ के बीच बहुते पॉपुलर भ गइल।
{{इंटरनेट-आधार}}
stmvrnuik6zdrl806941go7gjxukujg
801910
801909
2026-07-24T20:12:01Z
SM7
3953
[[विकिपीडिया:हॉट-कैट|हॉट-कैट]] द्वारा [[श्रेणी:टॉप-लेवल डोमेन]] जोड़ल गइल
801910
wikitext
text/x-wiki
'''.xyz''' एगो टॉप-लेवल डोमेन (टीएलडी) ह, जेकर प्रस्ताव आईकैन के नया जेनेरिक टॉप-लेवल डोमेन (जीटीएलडी) कार्यक्रम के तहत रखल गइल रहे। एह डोमेन के नाम [[लैटिन लिखाई|लैटिन लिपि]] के वर्णमाला के आखिरी तीन गो अक्षर "[[एक्स]]", "[[वाई]]" आ "[[ज़ेड]]" से बनल बा। एह डोमेन के रजिस्ट्री के संचालन एक्सवाईज़ेड डॉट कॉम आ सेंट्रलनिक करेला, जबकि एकर स्थापना उद्यमी डेनियल नेगारी कइले रहलें।
.xyz डोमेन 2 जून 2014 से आम लोग खातिर उपलब्ध भइल। ओकरा बाद ई टेक्निकल स्टार्टअप, कंटेंट बनावे वाला लोग आ [[वेब3]] प्रोजेक्ट सभ के बीच बहुते पॉपुलर भ गइल।
{{इंटरनेट-आधार}}
[[श्रेणी:टॉप-लेवल डोमेन]]
le6t9c8hhi5uckd8j5q6q13y43w91nm
प्रयोगकर्ता वार्ता:Taiwania Justo
3
101282
801913
2026-07-25T04:16:29Z
SHB2000
26156
SHB2000 पन्ना [[प्रयोगकर्ता वार्ता:Taiwania Justo]] के [[प्रयोगकर्ता वार्ता:Sekidoki]] पर स्थानांतरण कइलें: प्रयोगकर्ता के नाँव बदलाव के दौरान पन्ना "[[Special:CentralAuth/Taiwania Justo|Taiwania Justo]]" से "[[Special:CentralAuth/Sekidoki|Sekidoki]]" पर ऑटोमेटिक रूप से स्थानांतरित भइल।
801913
wikitext
text/x-wiki
#REDIRECT [[प्रयोगकर्ता वार्ता:Sekidoki]]
1wuwy4su8leoq2vucvu1j7qqtdxpst6
लामिन यमाल
0
101283
801915
2026-07-25T10:39:49Z
SM7
3953
नया आधार लेख / अंग्रेजी विकिपीडिया से अनुबाद कइ के
801915
wikitext
text/x-wiki
'''लामिन यमाल नसरोई एबाना''' (जनम: 13 जुलाई 2007), जे '''लामिन यमाल'''{{efn|"लामिन" के मतलब "भरोसेमंद" हवे आ "यमाल" (भा जमाल) के मतलब "सुंदरता भा आकर्षण होला।<ref name="जनसत्ता">{{cite news |title=फुटपाथ पर खाना तलाशने से करोड़ों कमाने तक..., यामाल के नाम और संघर्ष की दिल छू लेने वाली कहानी |url=https://www.jansatta.com/khel/fifa-world-cup-2026-spain-lamine-yamal-name-story-struggle-family-304-celebration-semi-final/4619233/ |access-date=25 जुलाई 2026 |work=[[जनसत्ता]] |date=15 जुलाई 2026 |language=hi}}</ref>}} के नाम से जानल जालें, एगो स्पेनी प्रोफेशनल फुटबॉलर बाड़ें। ऊ ला लीगा क्लब बार्सिलोना आ स्पेन के नेशनल फुटबॉल टीम खातिर दाहिना विंगर के रूप में खेलेलें। ऊ दुनिया के सबसे बेहतरीन फुटबॉलर सभ में गिनल जालें आ अपना बेहतरीन ड्रिब्लिंग आ प्लेमेकिंग क्षमता खातिर मशहूर बाड़ें।
यमाल बार्सिलोना के युवा अकादमी ला मासिया के विद्यार्थी रहलें। 2023–24 सत्र में ऊ क्लब के पहिला टीम में शामिल भइलें। 17 बरिस के उमिर में ऊ बैलन डी'ओर खातिर नामांकित होखे वाला सबसे कम उमिर के खिलाड़ी बनलें। 2024 आ 2025 में ऊ दुनिया के सबसे बेहतरीन युवा खिलाड़ी के दीहल जाए वाला कोपा ट्रॉफी जीतलें। मुख्य कोच हान्सी फ्लिक के नेतृत्व में यामाल बार्सिलोना के प्रमुख खिलाड़ी बनके उभरलें। उनकर योगदान से क्लब 2024–25 सत्र में घरेलू ट्रेबल जीतलस, जवना में ला लीगा, कोपा डेल रे आ सुपरकोपा दे एस्पान्या शामिल रहल। 18 बरिस के उमिर में यामाल 2025 के बैलन डी'ओर में उपविजेता रहलें। 2025–26 सत्र में बार्सिलोना लगातार दूसर बेर ला लीगा खिताब जीतलस, आ यामाल के ला लीगा प्लेयर ऑफ द सीजन चुनल गइल।
यामाल स्पेन खातिर अलग-अलग युवा स्तर पर अंतरराष्ट्रीय फुटबॉल खेल चुकल बाड़ें। 2023 में ऊ वरिष्ठ राष्ट्रीय टीम खातिर पहिल बेर खेललें आ 16 बरिस के उमिर में स्पेन के प्रतिनिधित्व करे वाला सबसे कम उमिर के खिलाड़ी बनलें। 2024 में ऊ यूईएफए यूरोपीय चैम्पियनशिप में गोल करे वाला सबसे कम उमिर के खिलाड़ी बनलें। एह प्रतियोगिता में स्पेन अपना इतिहास के चउथा खिताब जीतलस, आ यामाल के यंग प्लेयर अवॉर्ड से सम्मानित कइल गइल। 2026 में फीफा विश्व कप में अपना पहिला मुकाबला खेले के दौरान ऊ अपना करियर के पहिला विश्व कप खिताब भी जीतलें।
== नोट ==
{{notelist|group=नोट}}
== संदर्भ ==
{{Reflist|29em}}
[[श्रेणी:जियत लोग]]
{{खेल-जीवनी-आधार}}
swz4b860993s7f959hp8vrih4cjct13
801916
801915
2026-07-25T10:41:09Z
SM7
3953
ज्ञानसंदूक जोड़ल गइल
801916
wikitext
text/x-wiki
{{Infobox football biography
| image = Lamine Yamal France v Spain 7.24.26-142.jpg
| caption = 2026 में [[स्पेन राष्ट्रीय फुटबॉल टीम|स्पेन]] के साथ यामाल
| full_name = {{nowrap|लामिन यामाल नस्राउई एबाना}}
| birth_date = {{Birth date and age|2007|7|13|df=y}}
| birth_place = [[एस्प्लुगेस दे योब्रेगात]], स्पेन
| height = 1.78 मीटर<ref>{{cite web |url=https://www.fcbarcelona.com/en/football/first-team/players/129404/lamine-yamal-nasraoui-ebana |title=Lamine Yamal |publisher=FC Barcelona |access-date=16 July 2026 |archive-date=14 July 2026 |archive-url=https://web.archive.org/web/20260714220610/https://www.fcbarcelona.com/en/football/first-team/players/129404/lamine-yamal-nasraoui-ebana |url-status=live }}</ref>
| position = [[विंगर (एसोसिएशन फुटबॉल)|विंगर]]
| currentclub = [[एफसी बार्सिलोना|बार्सिलोना]]
}}
'''लामिन यमाल नसरोई एबाना''' (जनम: 13 जुलाई 2007), जे '''लामिन यमाल'''{{efn|"लामिन" के मतलब "भरोसेमंद" हवे आ "यमाल" (भा जमाल) के मतलब "सुंदरता भा आकर्षण होला।<ref name="जनसत्ता">{{cite news |title=फुटपाथ पर खाना तलाशने से करोड़ों कमाने तक..., यामाल के नाम और संघर्ष की दिल छू लेने वाली कहानी |url=https://www.jansatta.com/khel/fifa-world-cup-2026-spain-lamine-yamal-name-story-struggle-family-304-celebration-semi-final/4619233/ |access-date=25 जुलाई 2026 |work=[[जनसत्ता]] |date=15 जुलाई 2026 |language=hi}}</ref>}} के नाम से जानल जालें, एगो स्पेनी प्रोफेशनल फुटबॉलर बाड़ें। ऊ ला लीगा क्लब बार्सिलोना आ स्पेन के नेशनल फुटबॉल टीम खातिर दाहिना विंगर के रूप में खेलेलें। ऊ दुनिया के सबसे बेहतरीन फुटबॉलर सभ में गिनल जालें आ अपना बेहतरीन ड्रिब्लिंग आ प्लेमेकिंग क्षमता खातिर मशहूर बाड़ें।
यमाल बार्सिलोना के युवा अकादमी ला मासिया के विद्यार्थी रहलें। 2023–24 सत्र में ऊ क्लब के पहिला टीम में शामिल भइलें। 17 बरिस के उमिर में ऊ बैलन डी'ओर खातिर नामांकित होखे वाला सबसे कम उमिर के खिलाड़ी बनलें। 2024 आ 2025 में ऊ दुनिया के सबसे बेहतरीन युवा खिलाड़ी के दीहल जाए वाला कोपा ट्रॉफी जीतलें। मुख्य कोच हान्सी फ्लिक के नेतृत्व में यामाल बार्सिलोना के प्रमुख खिलाड़ी बनके उभरलें। उनकर योगदान से क्लब 2024–25 सत्र में घरेलू ट्रेबल जीतलस, जवना में ला लीगा, कोपा डेल रे आ सुपरकोपा दे एस्पान्या शामिल रहल। 18 बरिस के उमिर में यामाल 2025 के बैलन डी'ओर में उपविजेता रहलें। 2025–26 सत्र में बार्सिलोना लगातार दूसर बेर ला लीगा खिताब जीतलस, आ यामाल के ला लीगा प्लेयर ऑफ द सीजन चुनल गइल।
यामाल स्पेन खातिर अलग-अलग युवा स्तर पर अंतरराष्ट्रीय फुटबॉल खेल चुकल बाड़ें। 2023 में ऊ वरिष्ठ राष्ट्रीय टीम खातिर पहिल बेर खेललें आ 16 बरिस के उमिर में स्पेन के प्रतिनिधित्व करे वाला सबसे कम उमिर के खिलाड़ी बनलें। 2024 में ऊ यूईएफए यूरोपीय चैम्पियनशिप में गोल करे वाला सबसे कम उमिर के खिलाड़ी बनलें। एह प्रतियोगिता में स्पेन अपना इतिहास के चउथा खिताब जीतलस, आ यामाल के यंग प्लेयर अवॉर्ड से सम्मानित कइल गइल। 2026 में फीफा विश्व कप में अपना पहिला मुकाबला खेले के दौरान ऊ अपना करियर के पहिला विश्व कप खिताब भी जीतलें।
== नोट ==
{{notelist|group=नोट}}
== संदर्भ ==
{{Reflist|29em}}
[[श्रेणी:जियत लोग]]
{{खेल-जीवनी-आधार}}
gto5az4fsyfs061gkgeu0xj4920b26n