Template:Rp: Difference between revisions

Safer nicotine wiki Tobacco Harm Reduction
Jump to navigation Jump to search
(convert to hyphens to en-dashes in certain cases per TPER)
 
m (1 revision imported)
 
(6 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{#if: {{{needed|}}}
{{#if:{{{needed|}}}|{{page needed|date={{{date|}}}|reason={{{reason|}}}}}|{{r/superscript
|{{page needed|date={{{date|}}} }}
|prefix={{#switch:{{{style|}}}|AMA|Ama|ama=(|: }}
|<sup class="reference" style="white-space:nowrap;">{{#if: {{{page|}}}
|suffix={{#switch:{{{style|}}}|AMA|Ama|ama=)|&hairsp;}}
|(<span {{#if:{{{q|{{{quote|}}}}}}|style="border-bottom: 1px dashed;" title='"{{#tag:nowiki|{{#invoke:String|replace|{{trim quotes|s={{{q|{{{quote}}}}}}}}|"|&quot;}}}}"'}}>{{#if: {{{nopp|}}}||p}}{{{page}}}</span>)
|pp={{#switch:{{{style|}}}|AMA|Ama|ama={{#if:{{{no-pp|{{{nopp|}}}}}}||{{#if:{{{pages|{{{pp|}}}}}}|pp|{{#if:{{{page|{{{p|}}}}}}|p}}}}}}}}<!-- p/pp is only used in superscript label, therefore it does not contain any qp params -->
|{{#if: {{{pages|}}}
|leadin={{#switch:{{{quotation-pages|{{{quote-pages|{{{qpp|{{{quotation-page|{{{quote-page|{{{qp|{{{quotation-location|{{{quote-location|{{{quote-loc|{{{quote-at|}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}|pages|pp|page|p={{#if:{{{pages|{{{pp|}}}}}}|Pages|{{#if:{{{page|{{{p|}}}}}}|Page|{{#if:{{{location|{{{loc|{{{at|}}}}}}}}}|Location|Page&nbsp;/ location}}}}}}|{{#if:{{{quotation-pages|{{{quote-pages|{{{qpp|}}}}}}}}}|Pages|{{#if:{{{quotation-page|{{{quote-page|{{{qp|}}}}}}}}}|Page|{{#if:{{{quotation-location|{{{quote-location|{{{quote-loc|{{{quote-at|}}}}}}}}}}}}|Location|{{#if:{{{pages|{{{pp|}}}}}}|Pages|{{#if:{{{page|{{{p|}}}}}}|Page|{{#if:{{{location|{{{loc|{{{at|}}}}}}}}}|Location|Page&nbsp;/ location}}}}}}}}}}}}}}<!-- leadin is only used in tooltip -->
  |(<span {{#if:{{{q|{{{quote|}}}}}}|style="border-bottom: 1px dashed;" title='"{{#tag:nowiki|{{#invoke:String|replace|{{trim quotes|s={{{q|{{{quote}}}}}}}}|"|&quot;}}}}"'}}>{{#if: {{{nopp|}}}||pp}}{{{pages}}}</span>)
|where={{R/where|plural={{#invoke:String2|hyphen2dash|{{{pages|{{{pp|{{{1|}}}}}}}}}}}|singular={{{page|{{{p|}}}}}}|location={{{location|{{{loc|{{{at|}}}}}}}}}|spacing=&#32;}}<!-- where must not include qp params -->
  |{{#if: {{{at|}}}
|sup-where={{R/where|plural={{#invoke:String2|hyphen2dash|{{{pages|{{{pp|{{{1|}}}}}}}}}|&hairsp;}}|singular={{{page|{{{p|}}}}}}|location={{{location|{{{loc|{{{at|}}}}}}}}}|spacing=&hairsp;}}<!-- sup-where same as where, but with improved list spacing for superscript -->
      |(<span {{#if:{{{q|{{{quote|}}}}}}|style="border-bottom: 1px dashed;" title='"{{#tag:nowiki|{{#invoke:String|replace|{{trim quotes|s={{{q|{{{quote}}}}}}}}|"|&quot;}}}}"'}}>{{{at}}}</span>)
|quote-where={{#switch:{{{quotation-pages|{{{quote-pages|{{{qpp|{{{quotation-page|{{{quote-page|{{{qp|{{{quotation-location|{{{quote-location|{{{quote-loc|{{{quote-at|}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}|pages|pp|page|p={{R/where|plural={{#invoke:String2|hyphen2dash|{{{pages|{{{pp|{{{1|}}}}}}}}}}}|singular={{{page|{{{p|}}}}}}|location={{{location|{{{loc|{{{at|}}}}}}}}}|spacing=&#32;}}|{{R/where|plural={{#invoke:String2|hyphen2dash|{{{quotation-pages|{{{quote-pages|{{{qpp|}}}}}}}}}}}|singular={{{quotation-page|{{{quote-page|{{{qp|}}}}}}}}}|location={{{quotation-location|{{{quote-location|{{{quote-loc|{{{quote-at|}}}}}}}}}}}}|spacing=&#32;}}}}<!-- quote-where must not contain normal in-source-location params -->
      |<nowiki>:</nowiki><span {{#if:{{{q|{{{quote|}}}}}}|style="border-bottom: 1px dashed;" title='"{{#tag:nowiki|{{#invoke:String|replace|{{trim quotes|s={{{q|{{{quote}}}}}}}}|"|&quot;}}}}"'}}>{{trim|
|quote={{{quotation|{{{quote|{{{q|}}}}}}}}}
        {{#invoke:String|replace|
|language={{{quotation-language|{{{quote-language|{{{quotation-lang|{{{quote-lang|{{{ql|{{{language|{{{lang|{{{l|}}}}}}}}}}}}}}}}}}}}}}}}
          {{#invoke:String|replace|
|translation={{{translation-quotation|{{{trans-quotation|{{{translation-quote|{{{trans-quote|{{{tq|{{{translation|{{{trans|{{{t|{{{xlat|}}}}}}}}}}}}}}}}}}}}}}}}}}}
            {{#invoke:String|replace|{{{1|}}}|(%d+)%-(%d+)|%1&ndash;%2|plain=false}} <!-- Match all ranges of numbers e.g. 1-2 -->
|wrap={{{wrap|}}}
          |(%d+)%-%s*$|%1&ndash;|plain=false}} <!-- Match all like "1-" which only have whitespace after and then end of parameter -->
}}{{#switch:{{{wrap|}}}|yes|y|forced|f=&#8203;}}}}<noinclude><!--
        |(%d+)%-,([%s][^%s]+)|%1&ndash;%2|plain=false}} <!-- Match all like "2-, 10" but never "1-," -->
Note: Please do not change the parameter names "at", "page", "p", "pages", "pp", "quote-page", "quote-pages", "trans-quote" , "no-pp" and "nopp" as they are also used by CS1/CS2 citation templates, "loc" is also used by SFN templates. -->
      }}</span>
{{documentation}}
    }}
  }}
}}</sup>
}}<noinclude><!--
  Note: Please do not change the parameter names "at", "page", "pages"
        and "nopp" as they are also used by [[Template:Citation]].
-->
{{Documentation}}
</noinclude>
</noinclude>

Latest revision as of 18:24, 2 January 2022