Template:Citation Style documentation/ref2
From FamiLAB Wiki
- ref: the citation's HTML anchor identifier. When set,
|{{#if:ref|ref=}}ID
generates an anchor with the given ID (theid
attribute in the citation's{{#switch:o
|c|close = |s|single |o|open |p|pair = <cite{{#if:id="ID"| id="ID"}} }}{{#switch:o |c|close = |s|single = /> |o|open = > |p|pair = {{#ifeq:cite|!--||>}}... }}{{#switch:o |s|single |o|open = |c|close |p|pair = {{#ifeq:cite|!--|-->|</cite>}} }} HTML tag). Setting|{{#if:ref|ref=}}ID
identifies the template as a target and allows wikilinking to full references, especially useful with short-form citations like shortened notes and parenthetical referencing. Defaults to the special value|{{#if:ref|ref=}}harv
which generates an anchor identifier suitable for use with {{[[{{#if:|{{{SISTER}}}Template|Template}}:sfn|sfn]]{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||...}}}} and {{[[{{#if:|{{{SISTER}}}Template|Template}}:harv|harv]]{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||...}}}} templates. When|{{#if:mode|mode=}}cs1
defaults to|{{#if:ref|ref=}}
. See Template:Citation/doc § Anchors for Harvard referencing templates.