Module talk:Footnotes/anchor id list

This talk page has been usurped to be a testcases page for development. To talk about this module, please do so at Module talk:Footnotes.


There has always been a problem with the {{harv}} and {{sfn}} families of templates: except that every link that is created by these templates is tested at creation, editors don't know if the link works. A remedy for that has been user-scripts like User:Ucucha/HarvErrors. But, not all editors use that script so broken harv links can go undetected for a long time. At the moment, there is prospective bot that would mark broken-link harv templates by adding {{broken footnote}} after the broken-link harv template.

I have another possible solution. I have created a lua module that extracts reference linking data from cs1|2 and vcite templates. I have modified Module:Footnotes/sandbox to use the extracted data to determine if:

the harv template does not have a matching citation template
more than one citation template matches the harv template

when either of these conditions exists, the harv template emits an error message.

harv errors
template rendering
{{Harvard citation no brackets/sandbox|Black|Black|Brown|2020}} Black, Black & Brown 2020
{{Harvard citation no brackets/sandbox|Black|Black|Red|2020}} Black, Black & Red 2020 harvnb error: multiple targets (2×): CITEREFBlackBlackRed2020 (help)
citation templates
{{cite book |title=Title |last=Black |last2=Black |last3=Brown |date=2020}} Black; Black; Brown (2020). Title.
{{cite journal |journal=Journal |title=Title |last=Black |last2=Black |last3=Red |date=2020 |ref=harv}} Black; Black; Red (2020). "Title". Journal. {{cite journal}}: Invalid |ref=harv (help)
{{citation |title=Title |editor-last=Black |editor-last2=Black |editor-last3=Red |date=2020}} Black; Black; Red, eds. (2020), Title

The sandbox module collects various items from the citation templates in the article's wikitext and assembles them into a list of CITEREF anchors that each harv template can inspect:

  • when |ref=harv either explicitly (cs1) or implicitly (cs2), the sandbox module builds a CITEREF from the cs1|2 parameters:
    name sources: |contributor=, |author=, |vauthors=, |editor= and |veditors=, and their aliases (where they exist)
    date sources: |year=, |date=, |publicationdate=, and |publication-date= (in that order).
  • when |ref={{sfnref}} or |ref={{harvid}}, the sandbox module builds a CITEREF from parameters in those templates and adds the result to the list.
  • when |ref=CITEREF<name-date>, the sandbox module adds that text (absent the CITEREF prefix) to the list.
  • when |ref=<anchor-identifier-text>, the sandbox module adds that text to the list – to match a harv template's identical |ref=<anchor-identifier-text>
  • when |ref= is empty or omitted and |mode=cs2, the sandbox module acts as if |ref=harv
  • when |ref=none, the sandbox module skips the citation because CITEREF anchor creation specifically suppressed in cs1|2

Alas, there is a flaw. Because the sandbox module reads article wikitext, and because wrapper templates often set cs1|2 parameter values inside the template, so the sandbox module emits a false error message for wrapped templates ({{cite EB1911}} wraps {{cite encyclopedia}}:

false harv errors
template rendering
{{Harvard citation no brackets/sandbox|Chisholm|1911}} Chisholm 1911
citation templates
{{Cite EB1911|wstitle=Alfred the Great|ref=harv}} Chisholm, Hugh, ed. (1911). "Alfred the Great" . Encyclopædia Britannica (11th ed.). Cambridge University Press. {{cite encyclopedia}}: Invalid |ref=harv (help)

So that false error messages don't linger in an article, I have added |ignore-err= to the harv templates so that false error messages may be suppressed ({{cite DNB}} wraps {{cite encyclopedia}}:

suppressing false harv errors
template rendering
{{Harvard citation no brackets/sandbox|Power|1901}} Power 1901
{{Harvard citation no brackets/sandbox|Power|1901|ignore-err=yes}} Power 1901
citation templates
{{Cite DNB|first=D'Arcy|last=Power|pages=331–332|supplement=1|volume=1|wstitle=Bucknill, John Charles |ref=harv}} Power, D'Arcy (1901). "Bucknill, John Charles" . In Lee, Sidney (ed.). Dictionary of National Biography (1st supplement). Vol. 1. London: Smith, Elder & Co. pp. 331–332. {{cite encyclopedia}}: Invalid |ref=harv (help)

author-name parameters

edit
author-name parameters
template rendering
{{Harvard citation no brackets/sandbox|Black|Black|Orange|2020}} Black, Black & Orange 2020
{{Harvard citation no brackets/sandbox|Black|Black|Yellow|2020}} Black, Black & Yellow 2020
{{Harvard citation no brackets/sandbox|Black|Black|Green|2020}} Black, Black & Green 2020
{{Harvard citation no brackets/sandbox|Black|2020}} Black 2020
{{Harvard citation no brackets/sandbox|Black|Black|2020}} Black & Black 2020
{{Harvard citation no brackets/sandbox|Black|Black|Green|Black|2020}} Black et al. 2020
{{Harvard citation no brackets/sandbox|Black|Black|Green|Brown|2020}} Black et al. 2020
{{Harvard citation no brackets/sandbox|Brown|2020}} Brown 2020
{{Harvard citation no brackets/sandbox|Red|Black|2020}} Red & Black 2020
{{Harvard citation no brackets/sandbox|Orange|Black|Black|2020}} Orange, Black & Black 2020
{{Harvard citation no brackets/sandbox|Yellow|Black|Black|Black|2020}} Yellow et al. 2020
{{Harvard citation no brackets/sandbox|Green|Black|Black|Brown|2020}} Green et al. 2020
authorn-last parameters
{{Cite book |author1-last=Black |author2-last=Black |author3-last=Orange |title=Title |date=2020 |ref=harv}} Black; Black; Orange (2020). Title. {{cite book}}: Invalid |ref=harv (help)
author-lastn parameters
{{Cite book |author-last1=Black |author-last2=Black |author-last3=Yellow |title=Title |date=2020 |ref=harv}} Black; Black; Yellow (2020). Title. {{cite book}}: Invalid |ref=harv (help)
misc less used author-name parameters
{{Cite book |surname=Black |subject2=Black |host3=Green |title=Title |date=2020 |ref=harv}} Black; Black; Green (2020). Title. {{cite book}}: Invalid |ref=harv (help)
one author-name parameters
{{Cite book |last=Black |title=Title |date=2020 |ref=harv}} Black (2020). Title. {{cite book}}: Invalid |ref=harv (help)
two author-name parameters
{{Cite book |last=Black |last2=Black |title=Title |date=2020 |ref=harv}} Black; Black (2020). Title. {{cite book}}: Invalid |ref=harv (help)
four author-name parameters
{{Cite book |last=Black |last2=Black |last3=Green |last4=Black |title=Title |date=2020 |ref=harv}} Black; Black; Green; Black (2020). Title. {{cite book}}: Invalid |ref=harv (help)
five author-name parameters
{{Cite book |last=Black |last2=Black |last3=Green |last4=Brown |last5=Black |title=Title |date=2020 |ref=harv}} Black; Black; Green; Brown; Black (2020). Title. {{cite book}}: Invalid |ref=harv (help)
one vauthors-name
{{Cite book |vauthors=Brown |title=Title |date=2020 |ref=harv}} Brown (2020). Title. {{cite book}}: Invalid |ref=harv (help)
two vauthors-name
{{Cite book |vauthors=Red, Black |title=Title |date=2020 |ref=harv}} Red, Black (2020). Title. {{cite book}}: Invalid |ref=harv (help)
three vauthors-name
{{Cite book |vauthors=Orange,Black,Black |title=Title |date=2020 |ref=harv}} Orange, Black, Black (2020). Title. {{cite book}}: Invalid |ref=harv (help)
four vauthors-name
{{Cite book |vauthors=Yellow,Black,Black,Black |title=Title |date=2020 |ref=harv}} Yellow, Black, Black, Black (2020). Title. {{cite book}}: Invalid |ref=harv (help)
five vauthors-name
{{Cite book |vauthors=Green,Black,Black,Brown,Black |title=Title |date=2020 |ref=harv}} Green, Black, Black, Brown, Black (2020). Title. {{cite book}}: Invalid |ref=harv (help)

editor-name parameters

edit
editor-name parameters
template rendering
{{Harvard citation no brackets/sandbox|Black|Brown|Orange|2020}} Black, Brown & Orange 2020
{{Harvard citation no brackets/sandbox|Black|Brown|Yellow|2020}} Black, Brown & Yellow 2020
{{Harvard citation no brackets/sandbox|Black|Brown|Green|2020}} Black, Brown & Green 2020
{{Harvard citation no brackets/sandbox|Red|2020}} Red 2020
{{Harvard citation no brackets/sandbox|Black|Brown|2020}} Black & Brown 2020
{{Harvard citation no brackets/sandbox|Black|Brown|Green|Black|2020}} Black et al. 2020
{{Harvard citation no brackets/sandbox|Black|Brown|Green|Brown|2020}} Black et al. 2020
{{Harvard citation no brackets/sandbox|Orange|2020}} Orange 2020
{{Harvard citation no brackets/sandbox|Red|Brown|2020}} Red & Brown 2020
{{Harvard citation no brackets/sandbox|Orange|Brown|Black|2020}} Orange, Brown & Black 2020
{{Harvard citation no brackets/sandbox|Yellow|Brown|Black|Black|2020}} Yellow et al. 2020
{{Harvard citation no brackets/sandbox|Green|Brown|Black|Brown|2020}} Green et al. 2020
editorn-last parameters
{{Cite book |editor1-last=Black |editor2-last=Brown |editor3-last=Orange |title=Title |date=2020 |ref=harv}} Black; Brown; Orange, eds. (2020). Title. {{cite book}}: Invalid |ref=harv (help)
editor-lastn parameters
{{Cite book |editor-last1=Black |editor-last2=Brown |editor-last3=Yellow |title=Title |date=2020 |ref=harv}} Black; Brown; Yellow, eds. (2020). Title. {{cite book}}: Invalid |ref=harv (help)
misc editor-name parameters
{{Cite book |editor-surname=Black |editor2=Brown |editor3-surname=Green |title=Title |date=2020 |ref=harv}} Black; Brown; Green, eds. (2020). Title. {{cite book}}: Invalid |ref=harv (help)
one editor-name parameter
{{Cite book |editor-last=Red |title=Title |date=2020 |ref=harv}} Red (2020). Title. {{cite book}}: Invalid |ref=harv (help)
two editor-name parameters
{{Cite book |editor-last=Black |editor-last2=Brown |title=Title |date=2020 |ref=harv}} Black; Brown, eds. (2020). Title. {{cite book}}: Invalid |ref=harv (help)
four editor-name parameters
{{Cite book |editor-last=Black |editor-last2=Brown |editor-last3=Green |editor-last4=Black |title=Title |date=2020 |ref=harv}} Black; Brown; Green; Black, eds. (2020). Title. {{cite book}}: Invalid |ref=harv (help)
five editor-name parameters
{{Cite book |editor-last=Black |editor-last2=Brown |editor-last3=Green |editor-last4=Brown |editor-last5=Black |title=Title |date=2020 |ref=harv}} Black; Brown; Green; Brown; Black, eds. (2020). Title. {{cite book}}: Invalid |ref=harv (help)
one veditors-name
{{Cite book |veditors=Orange |title=Title |date=2020 |ref=harv}} Orange, ed. (2020). Title. {{cite book}}: Invalid |ref=harv (help)
two veditors-name
{{Cite book |veditors=Red, Brown |title=Title |date=2020 |ref=harv}} Red, Brown, eds. (2020). Title. {{cite book}}: Invalid |ref=harv (help)
three veditors-name
{{Cite book |veditors=Orange,Brown ,Black |title=Title |date=2020 |ref=harv}} Orange, Brown, Black, eds. (2020). Title. {{cite book}}: Invalid |ref=harv (help)
four veditors-name
{{Cite book |veditors=Yellow,Brown ,Black,Black |title=Title |date=2020 |ref=harv}} Yellow, Brown, Black, Black, eds. (2020). Title. {{cite book}}: Invalid |ref=harv (help)
five veditors-name
{{Cite book |veditors=Green,Brown ,Black,Brown,Black |title=Title |date=2020 |ref=harv}} Green, Brown, Black, Brown, Black, eds. (2020). Title. {{cite book}}: Invalid |ref=harv (help)

contributor-name parameters

edit
contributor-name parameters
template rendering
{{Harvard citation no brackets/sandbox|Green|2020}} Green 2020
{{Harvard citation no brackets/sandbox|Green|Red|2020}} Green & Red 2020
{{Harvard citation no brackets/sandbox|Green|Red|Black|2020}} Green, Red & Black 2020
{{Harvard citation no brackets/sandbox|Green|Red|Black|Black|2020}} Green et al. 2020
{{Harvard citation no brackets/sandbox|Green|Red|Black|Brown|2020}} Green et al. 2020
contributorn-last parameters
{{Cite book |contributor1-last=Green |contribution=Preface |author=Author |title=Title |date=2020 |ref=harv}} Green (2020). Preface. Title. By Author. {{cite book}}: |author= has generic name (help); Invalid |ref=harv (help)
contributor-lastn parameters
{{Cite book |contributor-last=Green |contributor-last2=Red |contribution=Preface |author=Author |title=Title |date=2020 |ref=harv}} Green; Red (2020). Preface. Title. By Author. {{cite book}}: |author= has generic name (help); Invalid |ref=harv (help)
contributor-surname parameters
{{Cite book |contributor-surname=Green |contributor2-surname=Red |contributor-surname3=Black |contribution=Preface |author=Author |title=Title |date=2020 |ref=harv}} Green; Red; Black (2020). Preface. Title. By Author. {{cite book}}: |author= has generic name (help); Invalid |ref=harv (help)
four contributor-name parameters
{{Cite book |contributor=Green |contributor2=Red |contributor3=Black |contributor4=Black |contribution=Preface |author=Author |title=Title |date=2020 |ref=harv}} Green; Red; Black; Black (2020). Preface. Title. By Author. {{cite book}}: |author= has generic name (help); Invalid |ref=harv (help)
five contributor-name parameters
{{Cite book |contributor1=Green |contributor2=Red |contributor3=Black |contributor4=Brown |contributor5=Black |contribution=Preface |author=Author |title=Title |date=2020 |ref=harv}} Green; Red; Black; Brown; Black (2020). Preface. Title. By Author. {{cite book}}: |author= has generic name (help); Invalid |ref=harv (help)

ref={{sfnref}}

edit
|ref={{sfnref}} and |ref={{harvid}}
template rendering
{{Harvard citation no brackets/sandbox|Blue|2020}} Blue 2020
{{Harvard citation no brackets/sandbox|Blue|Red|2020}} Blue & Red 2020
{{Harvard citation no brackets/sandbox|Blue|Red|Black|2020}} Blue, Red & Black 2020
{{Harvard citation no brackets/sandbox|Blue|Red|Black|Black|2020}} Blue et al. 2020
{{Harvard citation no brackets/sandbox|''Magazine Title''|2020}} Magazine Title 2020
{{harvid}}
{{Cite book |title=Title |ref={{harvid|Blue|2020}}}} Title.
{{harvid}}
{{Cite book |title=Title |ref={{harvid|Blue|Red|2020}}}} Title.
{{sfnref}}
{{Cite book |title=Title |ref={{sfnref|Blue|Red|Black|2020}}}} Title.
{{SfnRef}}
{{Cite book |title=Title |ref={{SfnRef|Blue|Red|Black|Black|2020}}}} Title.
{{SfnRef}} – magazine title
{{Cite book |title=Title |ref={{SfnRef|''Magazine Title''|2020}}}} Title.

|ref=CITEREF...

edit
|ref=CITEREF...
template rendering
{{Harvard citation no brackets/sandbox|custom citeref text}} custom citeref text
cite book with |ref=CITEREF...
{{Cite book |title=Title |ref=CITEREFcustom citeref text}} Title.

|ref=custom text in {{harvnb}}

edit
|ref=custom text in {{harvnb}}
template rendering
{{Harvard citation no brackets/sandbox|Violet|2020|ref=1337+S3CRE7+C0D3}} Violet 2020
|ref=1337+S3CRE7+C0D3
{{Cite book |title=Title |ref=1337+S3CRE7+C0D3}} Title.

single date parameters

edit
single date parameters
template rendering
{{Harvard citation no brackets/sandbox|Violet|Black|2020}} VioletBlack 2020
{{Harvard citation no brackets/sandbox|Violet|Brown|2020}} Violet & Brown 2020
{{Harvard citation no brackets/sandbox|Violet|Red|2020}} Violet & Red 2020
{{Harvard citation no brackets/sandbox|Violet|Orange|2020}} Violet & Orange 2020
|year=
{{Cite book |year=2020 |last=Violet |last2=Black |title=Title |ref=harv}} Violet; Black (2020). Title. {{cite book}}: Invalid |ref=harv (help)
|date=
{{Cite book |date=2020 |last=Violet |last2=Brown |title=Title |ref=harv}} Violet; Brown (2020). Title. {{cite book}}: Invalid |ref=harv (help)
|publication-date=
{{Cite book |publication-date=2020 |last=Violet |last2=Red |title=Title |ref=harv}} Violet; Red (2020). Title. {{cite book}}: Invalid |ref=harv (help)
|publicationdate=
{{Cite book |publicationdate=2020 |last=Violet |last2=Orange |title=Title |ref=harv}} Violet; Orange (2020). Title. {{cite book}}: Invalid |ref=harv (help); Unknown parameter |publicationdate= ignored (|publication-date= suggested) (help)

multiple date parameters

edit
multiple date parameters
template rendering
{{Harvard citation no brackets/sandbox|Violet|Yellow|2020}} Violet & Yellow 2020
{{Harvard citation no brackets/sandbox|Violet|Green|2020}} Violet & Green 2020
{{Harvard citation no brackets/sandbox|Violet|Blue|2020}} Violet & Blue 2020
{{Harvard citation no brackets/sandbox|Violet|Violet|2020}} Violet & Violet 2020
|year= and |date=
{{Cite book |year=2020 |date=2020 |last=Violet |last2=Yellow |title=Title |ref=harv}} Violet; Yellow (2020). Title. {{cite book}}: Invalid |ref=harv (help)CS1 maint: date and year (link)
|year= and |publication-date=
{{Cite book |year=2020 |publication-date=2000 |last=Violet |last2=Green|title=Title |ref=harv}} Violet; Green (2020). Title (published 2000). {{cite book}}: Invalid |ref=harv (help)
|date= and |publication-date=
{{Cite book |date=2020 |publication-date=2000 |last=Violet |last2=Blue |title=Title |ref=harv}} Violet; Blue (2020). Title (published 2000). {{cite book}}: Invalid |ref=harv (help)
|year= and |date= and |publicationdate=
{{Cite book |year=2020 |date=2020 |publicationdate=2000 |last=Violet |last2=Violet |title=Title |ref=harv}} Violet; Violet (2020). Title (published 2000). {{cite book}}: Invalid |ref=harv (help); Unknown parameter |publicationdate= ignored (|publication-date= suggested) (help)CS1 maint: date and year (link)

date formats

edit
date formats
template rendering
{{Harvard citation no brackets/sandbox|Gray|Black|2010–2020}} Gray & Black 2010–2020
{{Harvard citation no brackets/sandbox|Gray|Black|1998–99}} Gray & Black 1998–99
{{Harvard citation no brackets/sandbox|Gray|Brown|2020}} Gray & Brown 2020
{{Harvard citation no brackets/sandbox|Gray|Red|Black|2020}} Gray, Red & Black 2020
{{Harvard citation no brackets/sandbox|Gray|Red|Brown|2020}} Gray, Red & Brown 2020
{{Harvard citation no brackets/sandbox|Gray|Orange|Black|n.d.}} Gray, Orange & Black n.d.
{{Harvard citation no brackets/sandbox|Gray|Orange|Brown|nd}} Gray, Orange & Brown nd
{{Harvard citation no brackets/sandbox|Gray|Yellow|c. 2020}} Gray & Yellow c. 2020
YYYY–YYYY
{{Cite book |date=2010–2020 |last=Gray |last2=Black |title=Title |ref=harv}} Gray; Black (2010–2020). Title. {{cite book}}: Invalid |ref=harv (help)
YYYY–YY
{{Cite book |date=1998–99 |last=Gray |last2=Black |title=Title |ref=harv}} Gray; Black (1998–99). Title. {{cite book}}: Invalid |ref=harv (help)
YYYY-MM-DD
{{Cite book |date=2020-03-05 |last=Gray |last2=Brown |title=Title |ref=harv}} Gray; Brown (2020-03-05). Title. {{cite book}}: Invalid |ref=harv (help)
dmy
{{Cite book |date=5 March 2020 |last=Gray |last2=Red |last3=Black |title=Title |ref=harv}} Gray; Red; Black (5 March 2020). Title. {{cite book}}: Invalid |ref=harv (help)
mdy
{{Cite book |date=5 March 2020 |last=Gray |last2=Red |last3=Brown |title=Title |ref=harv}} Gray; Red; Brown (5 March 2020). Title. {{cite book}}: Invalid |ref=harv (help)
n.d.
{{Cite book |date=n.d. |last=Gray |last2=Orange |last3=Black |title=Title |ref=harv}} Gray; Orange; Black (n.d.). Title. {{cite book}}: Invalid |ref=harv (help)
nd
{{Cite book |date=nd |last=Gray |last2=Orange |last3=Brown |title=Title |ref=harv}} Gray; Orange; Brown (nd). Title. {{cite book}}: Invalid |ref=harv (help)
c. YYYY
{{Cite book |date=c. 2020 |last=Gray |last2=Yellow |title=Title |ref=harv}} Gray; Yellow (c. 2020). Title. {{cite book}}: Invalid |ref=harv (help)

date formats with CITEREF disambiguation

edit
date formats with CITEREF disambiguation
template rendering
{{Harvard citation no brackets/sandbox|Gray|Black|2010–2020a}} Gray & Black 2010–2020a
{{Harvard citation no brackets/sandbox|Gray|Black|1998–99a}} Gray & Black 1998–99a
{{Harvard citation no brackets/sandbox|Gray|Red|Black|2020a}} Gray, Red & Black 2020a
{{Harvard citation no brackets/sandbox|Gray|Red|Brown|2020a}} Gray, Red & Brown 2020a
{{Harvard citation no brackets/sandbox|Gray|Orange|Black|n.d.a}} Gray, Orange & Black n.d.a
{{Harvard citation no brackets/sandbox|Gray|Orange|Brown|nda}} Gray, Orange & Brown nda
{{Harvard citation no brackets/sandbox|Gray|Yellow|c. 2020a}} Gray & Yellow c. 2020a
YYYY–YYYY
{{Cite book |date=2010–2020a |last=Gray |last2=Black |title=Title |ref=harv}} Gray; Black (2010–2020a). Title. {{cite book}}: Invalid |ref=harv (help)
YYYY–YY
{{Cite book |date=1998–99a |last=Gray |last2=Black |title=Title |ref=harv}} Gray; Black (1998–99a). Title. {{cite book}}: Invalid |ref=harv (help)
dmy
{{Cite book |date=5 March 2020a |last=Gray |last2=Red |last3=Black |title=Title |ref=harv}} Gray; Red; Black (5 March 2020a). Title. {{cite book}}: Invalid |ref=harv (help)
mdy
{{Cite book |date=5 March 2020a |last=Gray |last2=Red |last3=Brown |title=Title |ref=harv}} Gray; Red; Brown (5 March 2020a). Title. {{cite book}}: Invalid |ref=harv (help)
n.d.
{{Cite book |date=n.d.a |last=Gray |last2=Orange |last3=Black |title=Title |ref=harv}} Gray; Orange; Black (n.d.a). Title. {{cite book}}: Invalid |ref=harv (help)
nd
{{Cite book |date=nda |last=Gray |last2=Orange |last3=Brown |title=Title |ref=harv}} Gray; Orange; Brown (nda). Title. {{cite book}}: Invalid |ref=harv (help)
c. YYYY
{{Cite book |date=c. 2020a |last=Gray |last2=Yellow |title=Title |ref=harv}} Gray; Yellow (c. 2020a). Title. {{cite book}}: Invalid |ref=harv (help)

date from {{date}}

edit
date from {{date}}
template rendering
{{Harvard citation no brackets/sandbox|Gray|Green|2020}} Gray & Green 2020
{{Harvard citation no brackets/sandbox|Gray|Blue|2020}} Gray & Blue 2020
{{Harvard citation no brackets/sandbox|Gray|Violet|2020}} Gray & Violet 2020
{{Harvard citation no brackets/sandbox|Gray|Gray|2020}} Gray & Gray 2020
{{Harvard citation no brackets/sandbox|Gray|White|2020}} Gray & White 2020
dmy
{{Cite book |date={{date|5 March 2020}} |last=Gray |last2=Green |title=Title |ref=harv}} Gray; Green (5 March 2020). Title. {{cite book}}: Invalid |ref=harv (help)
dmy → ymd
{{Cite book |date={{DATEtoMOS|5 Mar 2020|ISO}} |last=Gray |last2=Blue |title=Title |ref=harv}} Gray; Blue (2020-03-05). Title. {{cite book}}: Invalid |ref=harv (help)
mdy
{{Cite book |date={{FormatDate|March 5, 2020|MDY}} |last=Gray |last2=Violet |title=Title |ref=harv}} Gray; Violet (March 5, 2020). Title. {{cite book}}: Invalid |ref=harv (help)
mdy → dmy
{{Cite book |date={{ISOtodmymdy|Mar 5, 2020|DMY}} |last=Gray |last2=Gray |title=Title |ref=harv}} Gray; Gray (5 March 2020). Title. {{cite book}}: Invalid |ref=harv (help)
ymd
{{Cite book |date={{ISOtoMOS|2020-03-05}} |last=Gray |last2=White |title=Title |ref=harv}} Gray; White (5 March 2020). Title. {{cite book}}: Invalid |ref=harv (help)

vcite templates

edit
vcite templates
template rendering
{{Harvard citation no brackets/sandbox|White|Black|2020|ref=WhiteBlack2020}} White & Black 2020
{{Harvard citation no brackets/sandbox|White|Brown|2020}} White & Brown 2020
{{Harvard citation no brackets/sandbox|White|Red|2020|ref=WhiteRed2020}} White & Red 2020
{{Harvard citation no brackets/sandbox|White|Yellow|2020}} White & Yellow 2020
using |ref=
{{vcite book |year=2020 |author=White, Black |title=Title |ref=WhiteBlack2020}} White, Black. Title. 2020.
using |harvid= (makes CITEREF...)
{{vancite book |year=2020 |author=White, Brown |title=Title |harvid=WhiteBrown2020}} White, Brown. Title. 2020.
using |ref= and |harvid=
{{vcite book |year=2020 |author=White, Red |title=Title |ref=WhiteRef2020 |harvid=WhiteOrange2020}} White, Red. Title. 2020.
using |ref={{sfnref}}
{{vcite book |year=2020 |author=White, Black |title=Title |ref={{sfnref|White|Yellow|2020}}}} White, Black. Title. 2020.

harvc

edit
harvc
template rendering
{{Harvard citation no brackets/sandbox|George|Read|Johnson|Ferber|1957}} George et al. 1957
{{Harvard citation no brackets/sandbox|Stefferud|1957|ref=CITEREFStefferud preface}} Stefferud 1957
{{harvc}} templates
{{harvc/sandbox |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}} George, Ernest J.; Read; Johnson; Ferber. "Shelterbelts and Windbreaks". In Stefferud (1957).
{{harvc/sandbox |last=Stefferud |first=A.|year=1957 |id=CITEREFStefferud preface |c=Preface |url=//archive.org/stream/yoa1957#page/n7/mode/1up |in=Stefferud}} Stefferud, A. "Preface". In Stefferud (1957).
cs1|2 templates
{{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}} Stefferud, Alfred, ed. (1957). Soil: The Yearbook of Agriculture 1957. United States Department of Agriculture. OCLC 704186906. {{cite book}}: Invalid |ref=harv (help)
harvc with |anchor-year=
template rendering
{{Harvard citation no brackets/sandbox|Hunt |1995a}} Hunt 1995a
{{Harvard citation no brackets/sandbox|Hunt |1995b}} Hunt 1995b
{{harvc}} templates
{{harvc/sandbox |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}} Hunt, David (1995a), "Appendix I Names and synonyms of the species, subspecies and interspecific hybrids", in McMillan & Horobin 1995
{{harvc/sandbox |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}} Hunt, David (1995b), "Appendix III Excerpts from a Brazilian diary", in McMillan & Horobin 1995
cs1|2 template
{{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}} McMillan, A. J. S.; Horobin, J. F. (1995), Christmas Cacti: The Genus Schlumbergera and Its Hybrids (p/b ed.), Sherbourne, Dorset, UK: David Hunt, ISBN 978-0-9517234-6-3

wikicite

edit
{{wikicite}}
template rendering
{{Harvard citation no brackets/sandbox|Bailey|1979|ref=Reference-idBailey1979}} Bailey 1979
{{Harvard citation no brackets/sandbox|Anon.|n.d.(a)}} Anon. & n.d.(a)
{{Harvard citation no brackets/sandbox|Atwood|2003|ref=Reference-{{sfnref|Atwood|2003}}}} Atwood 2003
{{Harvard citation no brackets/sandbox|Atwood|2003}} Atwood 2003
|id=
{{wikicite|id=idBailey1979|reference=Bailey, John W. ''Pacifying the Plains: General Alfred Terry and the Decline of the Sioux, 1866–1890.'' Westport, Conn.: [[Greenwood Press]], 1979.}} Bailey, John W. Pacifying the Plains: General Alfred Terry and the Decline of the Sioux, 1866–1890. Westport, Conn.: Greenwood Press, 1979.
|ref=
{{wikicite|ref={{sfnref|Anon.|n.d.(a)}}|reference=Anon. n.d.(a) "[http://www.english-heritage.org.uk/discover/blue-plaques/search/bartok-bela-1881-1945 Bartók, Béla (1881–1945) Plaque erected in 1997 by English Heritage at 7 Sydney Place, South Kensington, London SW7 3NL, Royal Borough of Kensington and Chelsea]". English Heritage website (Accessed 19 October 2012).}} Anon. n.d.(a) "Bartók, Béla (1881–1945) Plaque erected in 1997 by English Heritage at 7 Sydney Place, South Kensington, London SW7 3NL, Royal Borough of Kensington and Chelsea". English Heritage website (Accessed 19 October 2012).
|id=sfnref
{{wikicite | id = {{sfnref|Atwood|2003}} | reference = Atwood, Margaret (2003). ''Oryx and Crake'', Toronto: McClelland & Stewart. {{ISBN|978-0-7710-0868-9}}. }} Atwood, Margaret (2003). Oryx and Crake, Toronto: McClelland & Stewart. ISBN 978-0-7710-0868-9.
|ref=sfnref
{{wikicite | ref = {{sfnref|Atwood|2003}} | reference = Atwood, Margaret (2003). ''Oryx and Crake'', Toronto: McClelland & Stewart. {{ISBN|978-0-7710-0868-9}}. }} Atwood, Margaret (2003). Oryx and Crake, Toronto: McClelland & Stewart. ISBN 978-0-7710-0868-9.

anchor

edit
{{anchor}}
template rendering
{{Harvard citation no brackets/sandbox|Blue|Yellow|2018}} Blue & Yellow 2018
{{Harvard citation no brackets/sandbox|plain text|ref=plain text}} plain text
{{Harvard citation no brackets/sandbox|CITEREF|citeref|2030|ref=CITEREFciteref2030}}}} CITEREF & citeref 2030
{{Harvard citation no brackets/sandbox|Yellow|Blue|2019}} Yellow & Blue 2019
multiple anchors
{{anchor|{{sfnref|Blue|Yellow|2018}}|plain text|CITEREFciteref2030|{{sfnref|Yellow|Blue|2019}}}} anchors are here

miscellaneous tests

edit

For these tests, consult the lua logs section of the debug console. To see that, edit this page and click Show preview. At the bottom, click Parser profiling data and then click show under Lua logs.

sfn whitelist

edit

This section has this template:

{{sfn whitelist|CITEREFBrand1968|CITEREFFine1994|CITEREFGeanakoplos1959|CITEREFVan_Tricht2011}}

These four anchor IDs should appear in the article_whitelist table in the lua logs section of the debug console.

parser functions

edit

This section has this template:

{{#language:nv|en}} → Navajo

parser functions should not appear in the template_list table in the lua logs section of the debug console.

dynamic whitelisting

edit
dynamic whitelisting
template rendering
{{Harvard citation no brackets/sandbox|Adamson|Mitchell|1911|p=135}} Adamson & Mitchell 1911, p. 135
{{Harvard citation no brackets/sandbox|Jones|Bryant|1911}} Jones & Bryant 1911
simple citations
{{EB1911 |mode=cs2 |last=Adamson |first=Robert |author-link=Robert Adamson (philosopher) |last2=Mitchell |first2=John Malcolm |wstitle=Bacon, Francis |volume=3 |pages=135–152 }}   This article incorporates text from a publication now in the public domainAdamson, Robert; Mitchell, John Malcolm (1911), "Bacon, Francis", in Chisholm, Hugh (ed.), Encyclopædia Britannica, vol. 3 (11th ed.), Cambridge University Press, pp. 135–152
{{cite EB1911 |wstitle=Caesar, Gaius Julius |volume=4 |pages=938–943 |first1=Henry Stuart |last1=Jones |first2=Margaret |last2=Bryant |short=1}} Jones, Henry Stuart; Bryant, Margaret (1911). "Caesar, Gaius Julius" . Encyclopædia Britannica. Vol. 4 (11th ed.). pp. 938–943.
cite catholic encyclopedia uses |volume=
{{Harvard citation no brackets/sandbox|Fanning|1907}} Fanning 1907
{{Harvard citation no brackets/sandbox|Fanning|1908}} Fanning 1908
{{Harvard citation no brackets/sandbox|Fanning, William Henry Windsor|1913}} Fanning, William Henry Windsor 1913
{{Harvard citation no brackets/sandbox|Herbermann|1913}} Herbermann 1913
volume citations
{{Cite CE1913|wstitle =Baptism |first=William Henry Windsor |last=Fanning|volume=2|ref=harv}} Fanning, William Henry Windsor (1907). "Baptism" . In Herbermann, Charles (ed.). Catholic Encyclopedia. Vol. 2. New York: Robert Appleton Company. {{cite encyclopedia}}: Invalid |ref=harv (help)
{{Catholic|last=Fanning|first=William H. W.|wstitle=Conservator|volume=4|ref=harv}}   This article incorporates text from a publication now in the public domainFanning, William H. W. (1908). "Conservator". In Herbermann, Charles (ed.). Catholic Encyclopedia. Vol. 4. New York: Robert Appleton Company. {{cite encyclopedia}}: Invalid |ref=harv (help)
{{cathEncy|wstitle=Vicar of Christ|author=Fanning, William Henry Windsor}} Fanning, William Henry Windsor (1913). "Vicar of Christ" . In Herbermann, Charles (ed.). Catholic Encyclopedia. New York: Robert Appleton Company.
{{Cite CE1913 | wstitle = Ecclesiastical Heraldry}} Herbermann, Charles, ed. (1913). "Ecclesiastical Heraldry" . Catholic Encyclopedia. New York: Robert Appleton Company.
cite EB9 uses |volume= allows roman numerals
{{Harvard citation no brackets/sandbox|Adamson|1878}} Adamson 1878
{{Harvard citation no brackets/sandbox|Baynes|1878}} Baynes 1878
volume citations
{{cite EB9 |last=Adamson |first=Robert |authorlink=Robert Adamson (philosopher) |wstitle=Henry St John, Viscount Bolingbroke |volume=4 |pages=4–7}} Adamson, Robert (1878). "Henry St John, Viscount Bolingbroke" . In Baynes, T. S. (ed.). Encyclopædia Britannica. Vol. 4 (9th ed.). New York: Charles Scribner's Sons. pp. 4–7.
{{eb9 |wstitle=Henry St John, Viscount Bolingbroke |volume=IV |pages=4–7}} Baynes, T. S., ed. (1878). "Henry St John, Viscount Bolingbroke" . Encyclopædia Britannica. Vol. IV (9th ed.). New York: Charles Scribner's Sons. pp. 4–7.