User:Ucucha/HarvErrors

From Wikipedia, the free encyclopedia

Harvard citation templates like {{Sfn}} are prone to problems with their automatically generated links (see for an extreme example). User:Ucucha/HarvErrors.js (based on User:Svick/HarvErrors.js) checks these links for validity and displays an error message for incorrect links. In addition, it checks for citations that are set up to receive links, but do not have any pointing to them.

For example, the following code produces an incorrect link and a citation without anything pointing to it:

Text{{Sfn|Smith|2011|p=9}}

{{reflist}}
==References==
*{{cite book|last=Smith|first=John|year=2010|title=A Book|publisher=A Publisher}}

With the script installed, this looks as follows (if you already have the script installed, you will see duplicate messages):

Text[1]

  1. Smith 2011, p. 9.

References

  • Smith, John (2010). A Book. A Publisher.

Text[1]

  1. ^ Smith 2011, p. 9. Harv error: link from CITEREFSmith2011 doesn't point to any citation.

References

  • Smith, John (2010). A Book. A Publisher. Harv warning: There is no link pointing to this citation. The anchor is named CITEREFSmith2010.

Installation and customization

Fixing problems

Related Articles

Wikiwand AI