Template:R/ref: Difference between revisions
From Vigyanwiki
Template>Matthiaspaul (update from sandbox) |
Template>Matthiaspaul (fix for embedded stripmarkers exposed in quote / trans-quote due to reference nesting) |
||
Line 7: | Line 7: | ||
-->{{#if:{{{link-id|}}}|<span id="{{anchorencode:{{{link-id|}}}}}" class="citation<!-- wikicite cite-r -->">}}{{#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 -->">}}{{#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: ### | ### Optional second call to append data to reference: ### | ||
-->{{#if:{{{annotation|}}}|{{#tag:ref|{{#switch:{{{annotation|}}}|p|page|pages={{#if:{{{pages|}}}{{{page|}}}{{{location|}}}|‌{{#if:{{{content-id|}}}|<span id="{{anchorencode:{{{content-id|}}}}}">}}{{{leadin|}}}{{{pages|}}}{{{page|}}}{{{location|}}}{{#if:{{{content-id|}}}|</span>}}}}|quote|q=‌{{#switch:{{{quote-page|}}}|=|p|page|pages={{#if:{{{pages|}}}{{{page|}}}{{{location|}}}|{{{leadin|}}}{{{pages|}}}{{{page|}}}{{{location|}}}: }}|{{{leadin|}}}{{{quote-page|}}}: }}<q {{#if:{{{content-id|}}}|id="{{anchorencode:{{{content-id|}}}}}"}} {{#if:{{{quote-cite|}}}|cite="#{{anchorencode:{{{quote-cite|}}}}}"}} {{#if:{{{quote-language|}}}|lang="{{{quote-language|}}}"}}><bdi>{{#invoke:String|replace|{{trim quotes|s={{{quote|}}}}}|"|"}}</bdi></q>{{#if:{{{trans-quote|}}}| [<bdi>{{#invoke:String|replace|{{trim quotes|s={{{trans-quote|}}}}}|"|"}}</bdi>]}}|{{#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|}}}|{{#tag:ref|{{#switch:{{{annotation|}}}|p|page|pages={{#if:{{{pages|}}}{{{page|}}}{{{location|}}}|‌{{#if:{{{content-id|}}}|<span id="{{anchorencode:{{{content-id|}}}}}">}}{{{leadin|}}}{{{pages|}}}{{{page|}}}{{{location|}}}{{#if:{{{content-id|}}}|</span>}}}}|quote|q=‌{{#switch:{{{quote-page|}}}|=|p|page|pages={{#if:{{{pages|}}}{{{page|}}}{{{location|}}}|{{{leadin|}}}{{{pages|}}}{{{page|}}}{{{location|}}}: }}|{{{leadin|}}}{{{quote-page|}}}: }}<q {{#if:{{{content-id|}}}|id="{{anchorencode:{{{content-id|}}}}}"}} {{#if:{{{quote-cite|}}}|cite="#{{anchorencode:{{{quote-cite|}}}}}"}} {{#if:{{{quote-language|}}}|lang="{{{quote-language|}}}"}}><bdi><!--EXPOSES_EMBEDDED_STRIPMARKERS_BUT_NOT_NECESSARY_INSIDE_Q_TAG{{#invoke:String|replace|-->{{trim quotes|s={{{quote|}}}}}<!--|"|"}}--></bdi></q>{{#if:{{{trans-quote|}}}| [<bdi><!--{{#invoke:String|replace|-->{{trim quotes|s={{{trans-quote|}}}}}<!--|"|"}}--></bdi>]}}|{{#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: ### | ||
-->{{#if:{{{pages|}}}{{{page|}}}{{{location|}}}|<sup class="reference {{#switch:{{{wrap|}}}|f|forced=|no}}wrap"><!-- <nowiki> -->:<!-- </nowiki> --><span {{#if:{{{quote|}}}|class="tooltip tooltip-dashed" style="border-bottom: 1px dashed;"}} title="Page / location: {{#invoke:String|replace|{{#invoke:Plain text|main|1={{#if:{{{quote|}}}|{{#switch:{{{quote-page|}}}||p|page|pages={{{pages|}}}{{{page|}}}{{{location|}}}|{{{quote-page|}}}}}|{{{pages|}}}{{{page|}}}{{{location|}}}}}|encode=false}}|"|"}}{{#if:{{{quote|}}}| Quotation: "{{#invoke:String|replace|{{#invoke:Plain text|main|1={{trim quotes|s={{{quote|}}}}}|encode=false}}|"|"}}"{{#if:{{{trans-quote|}}}| Translation: "{{#invoke:String|replace|{{#invoke:Plain text|main|1={{trim quotes|s={{{trans-quote|}}}}}|encode=false}}|"|"}}"}}}}"><!-- {{#invoke:String2|hyphen2dash|1=-->{{{pages|}}}{{{page|}}}{{{location|}}}<!--}}--></span></sup>}}<!-- | -->{{#if:{{{pages|}}}{{{page|}}}{{{location|}}}|<sup class="reference {{#switch:{{{wrap|}}}|f|forced=|no}}wrap"><!-- <nowiki> -->:<!-- </nowiki> --><span {{#if:{{{quote|}}}|class="tooltip tooltip-dashed" style="border-bottom: 1px dashed;"}} title="Page / location: {{#invoke:String|replace|{{#invoke:Plain text|main|1={{#if:{{{quote|}}}|{{#switch:{{{quote-page|}}}||p|page|pages={{{pages|}}}{{{page|}}}{{{location|}}}|{{{quote-page|}}}}}|{{{pages|}}}{{{page|}}}{{{location|}}}}}|encode=false}}|"|"}}{{#if:{{{quote|}}}| Quotation: "{{#invoke:String|replace|{{#invoke:Plain text|main|1={{trim quotes|s={{{quote|}}}}}|encode=false}}|"|"}}"{{#if:{{{trans-quote|}}}| Translation: "{{#invoke:String|replace|{{#invoke:Plain text|main|1={{trim quotes|s={{{trans-quote|}}}}}|encode=false}}|"|"}}"}}}}"><!-- {{#invoke:String2|hyphen2dash|1=-->{{{pages|}}}{{{page|}}}{{{location|}}}<!--}}--></span></sup>}}<!-- |
Revision as of 01:56, 4 September 2021
Template documentation
[create]