Template:R/ref: Difference between revisions

From Vigyanwiki
< Template:R
Template>Matthiaspaul
(let quote cite attribute point to link-id instead of quote-cite if quote-cite has not been given)
Template>Matthiaspaul
(incorporated full hyphen2dash support for pages and quote-pages)
Line 7: Line 7:
-->{{#if:{{{link-id|}}}|<span id="{{anchorencode:{{{link-id|}}}}}" class="citation<!-- wikicite cite-r -->">}}{{#if:{{{direction|}}}|{{#tag:ref|{{#if:{{{annotation|}}}||{{#if:{{{content-id|}}}|<span<!-- or <cite...> --> id="{{anchorencode:{{{content-id|}}}}}" class="citation<!-- wikicite cite-r -->">}}{{{reference|}}}{{#if:{{{content-id|}}}|</span><!-- or </cite> -->}}{{{postscript|}}}}}|name={{{1|}}}|group={{{2|}}}|dir={{{direction|}}}}}|{{#tag:ref|{{#if:{{{annotation|}}}||{{#if:{{{content-id|}}}|<span<!-- or <cite...> --> id="{{anchorencode:{{{content-id|}}}}}" class="citation<!-- wikicite cite-r -->">}}{{{reference|}}}{{#if:{{{content-id|}}}|</span><!-- or </cite> -->}}{{{postscript|}}}}}|name={{{1|}}}|group={{{2|}}}}}}}{{#if:{{{link-id|}}}|</span>}}<!--
-->{{#if:{{{link-id|}}}|<span id="{{anchorencode:{{{link-id|}}}}}" class="citation<!-- wikicite cite-r -->">}}{{#if:{{{direction|}}}|{{#tag:ref|{{#if:{{{annotation|}}}||{{#if:{{{content-id|}}}|<span<!-- or <cite...> --> id="{{anchorencode:{{{content-id|}}}}}" class="citation<!-- wikicite cite-r -->">}}{{{reference|}}}{{#if:{{{content-id|}}}|</span><!-- or </cite> -->}}{{{postscript|}}}}}|name={{{1|}}}|group={{{2|}}}|dir={{{direction|}}}}}|{{#tag:ref|{{#if:{{{annotation|}}}||{{#if:{{{content-id|}}}|<span<!-- or <cite...> --> id="{{anchorencode:{{{content-id|}}}}}" class="citation<!-- wikicite cite-r -->">}}{{{reference|}}}{{#if:{{{content-id|}}}|</span><!-- or </cite> -->}}{{{postscript|}}}}}|name={{{1|}}}|group={{{2|}}}}}}}{{#if:{{{link-id|}}}|</span>}}<!--
### Optional second call to append data to reference (variants identical except for dir): ###
### Optional second call to append data to reference (variants identical except for dir): ###
-->{{#if:{{{annotation|}}}|{{#if:{{{direction|}}}|{{#tag:ref|{{#switch:{{{annotation|}}}|p|pp|page|pages={{#if:{{{pages|}}}{{{page|}}}{{{location|}}}|&#8204;{{#if:{{{content-id|}}}|<span id="{{anchorencode:{{{content-id|}}}}}">}}{{{leadin|}}}{{{pages|}}}{{{page|}}}{{{location|}}}{{#if:{{{content-id|}}}|</span>}}}}|quote|q=&#8204;{{#switch:{{{quote-page|}}}|=|p|pp|page|pages={{#if:{{{pages|}}}{{{page|}}}{{{location|}}}|{{{leadin|}}}{{{pages|}}}{{{page|}}}{{{location|}}}:&#32;}}|{{{leadin|}}}{{{quote-page|}}}:&#32;}}<q {{#if:{{{content-id|}}}|id="{{anchorencode:{{{content-id|}}}}}"}} {{#if:{{{quote-cite|{{{link-id|}}}}}}|cite="#{{anchorencode:{{{quote-cite|{{{link-id|}}}}}}}}"}} {{#if:{{{quote-language|}}}|lang="{{{quote-language|}}}"}}><bdi>{{trim quotes|s={{{quote|}}}}}</bdi></q>{{#if:{{{trans-quote|}}}|&#32;&#91;<bdi>{{trim quotes|s={{{trans-quote|}}}}}</bdi>&#93;}}|{{#if:{{{content-id|}}}|<span<!-- or <cite...> --> id="{{anchorencode:{{{content-id|}}}}}" class="citation<!-- wikicite cite-r -->">}}{{{leadin|}}}{{{annotation|}}}{{#if:{{{content-id|}}}|</span><!-- or </cite> -->}}}}{{{postscript|}}}|follow={{{1|}}}|group={{{2|}}}|dir={{{direction|}}}}}|{{#tag:ref|{{#switch:{{{annotation|}}}|p|pp|page|pages={{#if:{{{pages|}}}{{{page|}}}{{{location|}}}|&#8204;{{#if:{{{content-id|}}}|<span id="{{anchorencode:{{{content-id|}}}}}">}}{{{leadin|}}}{{{pages|}}}{{{page|}}}{{{location|}}}{{#if:{{{content-id|}}}|</span>}}}}|quote|q=&#8204;{{#switch:{{{quote-page|}}}|=|p|pp|page|pages={{#if:{{{pages|}}}{{{page|}}}{{{location|}}}|{{{leadin|}}}{{{pages|}}}{{{page|}}}{{{location|}}}:&#32;}}|{{{leadin|}}}{{{quote-page|}}}:&#32;}}<q {{#if:{{{content-id|}}}|id="{{anchorencode:{{{content-id|}}}}}"}} {{#if:{{{quote-cite|{{{link-id|}}}}}}|cite="#{{anchorencode:{{{quote-cite|{{{link-id|}}}}}}}}"}} {{#if:{{{quote-language|}}}|lang="{{{quote-language|}}}"}}><bdi>{{trim quotes|s={{{quote|}}}}}</bdi></q>{{#if:{{{trans-quote|}}}|&#32;&#91;<bdi>{{trim quotes|s={{{trans-quote|}}}}}</bdi>&#93;}}|{{#if:{{{content-id|}}}|<span<!-- or <cite...> --> id="{{anchorencode:{{{content-id|}}}}}" class="citation<!-- wikicite cite-r -->">}}{{{leadin|}}}{{{annotation|}}}{{#if:{{{content-id|}}}|</span><!-- or </cite> -->}}}}{{{postscript|}}}|follow={{{1|}}}|group={{{2|}}}}}}}}}<!--
-->{{#if:{{{annotation|}}}|{{#if:{{{direction|}}}|{{#tag:ref|{{#switch:{{{annotation|}}}|p|pp|page|pages={{#if:{{{pages|}}}{{{page|}}}{{{location|}}}|&#8204;{{#if:{{{content-id|}}}|<span id="{{anchorencode:{{{content-id|}}}}}">}}{{{leadin|}}}{{#invoke:String2|hyphen2dash|{{{pages|}}}}}{{{page|}}}{{{location|}}}{{#if:{{{content-id|}}}|</span>}}}}|quote|q=&#8204;{{#switch:{{{quote-page|{{{quote-pages|}}}}}}|=|p|pp|page|pages={{#if:{{{pages|}}}{{{page|}}}{{{location|}}}|{{{leadin|}}}{{#invoke:String2|hyphen2dash|{{{pages|}}}}}{{{page|}}}{{{location|}}}:&#32;}}|{{{leadin|}}}{{{quote-page|{{#invoke:String2|hyphen2dash|{{{quote-pages|}}}}}}}}:&#32;}}<q {{#if:{{{content-id|}}}|id="{{anchorencode:{{{content-id|}}}}}"}} {{#if:{{{quote-cite|{{{link-id|}}}}}}|cite="#{{anchorencode:{{{quote-cite|{{{link-id|}}}}}}}}"}} {{#if:{{{quote-language|}}}|lang="{{{quote-language|}}}"}}><bdi>{{trim quotes|s={{{quote|}}}}}</bdi></q>{{#if:{{{trans-quote|}}}|&#32;&#91;<bdi>{{trim quotes|s={{{trans-quote|}}}}}</bdi>&#93;}}|{{#if:{{{content-id|}}}|<span<!-- or <cite...> --> id="{{anchorencode:{{{content-id|}}}}}" class="citation<!-- wikicite cite-r -->">}}{{{leadin|}}}{{{annotation|}}}{{#if:{{{content-id|}}}|</span><!-- or </cite> -->}}}}{{{postscript|}}}|follow={{{1|}}}|group={{{2|}}}|dir={{{direction|}}}}}|{{#tag:ref|{{#switch:{{{annotation|}}}|p|pp|page|pages={{#if:{{{pages|}}}{{{page|}}}{{{location|}}}|&#8204;{{#if:{{{content-id|}}}|<span id="{{anchorencode:{{{content-id|}}}}}">}}{{{leadin|}}}{{#invoke:String2|hyphen2dash|{{{pages|}}}}}{{{page|}}}{{{location|}}}{{#if:{{{content-id|}}}|</span>}}}}|quote|q=&#8204;{{#switch:{{{quote-page|{{{quote-pages|}}}}}}|=|p|pp|page|pages={{#if:{{{pages|}}}{{{page|}}}{{{location|}}}|{{{leadin|}}}{{#invoke:String2|hyphen2dash|{{{pages|}}}}}{{{page|}}}{{{location|}}}:&#32;}}|{{{leadin|}}}{{{quote-page|{{#invoke:String2|hyphen2dash|{{{quote-pages|}}}}}}}}:&#32;}}<q {{#if:{{{content-id|}}}|id="{{anchorencode:{{{content-id|}}}}}"}} {{#if:{{{quote-cite|{{{link-id|}}}}}}|cite="#{{anchorencode:{{{quote-cite|{{{link-id|}}}}}}}}"}} {{#if:{{{quote-language|}}}|lang="{{{quote-language|}}}"}}><bdi>{{trim quotes|s={{{quote|}}}}}</bdi></q>{{#if:{{{trans-quote|}}}|&#32;&#91;<bdi>{{trim quotes|s={{{trans-quote|}}}}}</bdi>&#93;}}|{{#if:{{{content-id|}}}|<span<!-- or <cite...> --> id="{{anchorencode:{{{content-id|}}}}}" class="citation<!-- wikicite cite-r -->">}}{{{leadin|}}}{{{annotation|}}}{{#if:{{{content-id|}}}|</span><!-- or </cite> -->}}}}{{{postscript|}}}|follow={{{1|}}}|group={{{2|}}}}}}}}}<!--
### Superscript pages and tooltip for help, pages, quotes: ###
### Superscript pages and tooltip for help, pages, quotes: ###
-->{{r/superscript
-->{{r/superscript

Revision as of 02:45, 12 September 2021

Template documentation