Template:FigureRef: Difference between revisions

From Electrical Installation Guide
(creation)
 
m (Protected "Template:FigureRef" ([Edit=Allow only administrators] (indefinite) [Move=Allow only administrators] (indefinite)))
 
(9 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{mediawiki:figure-acronym}} {{#if: {{{3|}}}|<span class="FigRef">{{{1|}}}</span>, <span class="FigRef">{{{2|xxx}}}</span> {{mediawiki:eig_and}} <span class="FigRef">{{{3|xxx}}}</span><!--
'''{{mediawiki:figure}}''' {{#if: {{{3|}}}|<span class="FigRef">{{{1|}}}</span>, <span class="FigRef">{{{2|xxx}}}</span> {{mediawiki:eig-and}} <span class="FigRef">{{{3|xxx}}}</span><!--
-------------------------------------------->|{{#if: {{{2|}}}|<span class="FigRef">{{{1|}}}</span> {{mediawiki:eig_and}} <span class="FigRef">{{{2|xxx}}}</span><!--
-------------------------------------------->|{{#if: {{{2|}}}|<span class="FigRef">{{{1|}}}</span> {{mediawiki:eig-and}} <span class="FigRef">{{{2|xxx}}}</span><!--
------------------------------------------------------------>|<span class="FigRef">{{{1|missing figure ref!!}}}</span><!--
------------------------------------------------------------>|<span class="FigRef">{{{1|<span style="color: red">Ref??</span>}}}</span><!--
--------------------------------------------->}}<!--
--------------------------------------------->}}<!--
---------------------------->}}<noinclude>
---------------------------->}}<noinclude>




[[Category:Utility templates|{{PAGENAME}}]]
[[Category:eig-other-templates|{{PAGENAME}}]]




Line 18: Line 18:
This template can have 1, 2 or 3 arguments:
This template can have 1, 2 or 3 arguments:


<nowiki>
<nowiki>{{FigureRef|A11}}</nowiki>         ==>  figure A11
* {{FigureRef|A11}}          ==>  figure A11
<nowiki>{{FigureRef|A11|A12}}</nowiki>     ==>  figure A11 and A12
* {{FigureRef|A11|A12}}      ==>  figure A11 and A12
<nowiki>{{FigureRef|A11|A12|A13}}</nowiki> ==>  figure A11, A12 and A13
* {{FigureRef|A11|A12|A13}}  ==>  figure A11, A12 and A13
</nowiki>


</noinclude>
</noinclude>

Latest revision as of 22:33, 22 December 2019

Figure Ref??


Description

This template is used to add a reference to a figure, like "Fig. A11":

  • it includes a span element of class="FigRef" around the figure reference (A11)
  • the acronym used for "Fig." in local language is coming from system message mediawiki:figure-acronym (to be created / localized in new wikis)
  • the word to use for "and" in local language is coming from system message mediawiki:eig_and (to be created / localized in new wikis)

This template can have 1, 2 or 3 arguments:

{{FigureRef|A11}}          ==>  figure A11
{{FigureRef|A11|A12}}      ==>  figure A11 and A12
{{FigureRef|A11|A12|A13}}  ==>  figure A11, A12 and A13