Changes

Jump to: navigation, search

Template:Fig/doc

2,502 bytes added, 04:36, 10 January 2019
Usage: crossrefrencing
{{Documentation subpage}}
<!-- Categories and interwikis go at the bottom of this page. -->

This template is used to format figures in the ''[[WikiJournal of Medicine]]''. In particular, attribution has to be listed for figures not generated by the corresponding authors.

== Usage ==
=== Single images===
<pre>
{{fig
|number = figure number (for supplementary figures use S1, S2 etc.)
|image = example.jpg
|caption = description and legend of figure
|attribution = author (name or username) and copyright/lisencing information (CC-BY-SA, public domain etc.)
|align = horizontal position (left, right or centre, default = left)
|size = width (default = 250px)
|pad = padding (default = 10px 10px 15px 0px)
}}
</pre>

Can also be abbreviated as: <code><nowiki>{{fig|1|wikipedia-logo.png|capt|attrib|size=100px}}</nowiki></code> to produce:
{{fig|1|wikipedia-logo.png|capt|attrib|size=100px}}{{-}}

=== Multi-part images ===

The template is also fully compatible with multipart figures. It uses the same syntax as <code><nowiki>{{</nowiki>[[Wikipedia:template:mulitple image|mulitple image]]<nowiki>}}</nowiki></code>. Figures are labelled as parts A, B, C, etc and all captions are listed at the bottom.
<pre>
{{fig
|... = same as for single image version
|direction = vertical or horizontal (default = vertical)
|image1 = example.jpg
|caption1 = description and legend of figure
|alt1 = mouse-over text
|size1 = width (default = 250px)
|color1 = colour of multi-part text, so can be set to white for dark images (default = black)
|top1 = top offset of multi-part text (default = 5px)
|left1 = left offset of multi-part text (default = 5px)
}}
</pre>

For example <code><nowiki>{{fig|2|image1=wikipedia-logo.png|image2=wikipedia-logo.png|caption=capt|caption1=caption1|caption2=caption2|alt1=mouse-over|attribution=attrib|size=100px}}</nowiki></code> produces:
{{fig|2|image1=wikipedia-logo.png|image2=wikipedia-logo.png|caption=capt|caption1=caption1|caption2=caption2|alt1=mouse-over|attribution=attrib|size=100px}}{{-}}

==Cross-referencing elsewhere in page==
Figures can be linked to by using <code><nowiki>[[#Fig 1]]</nowiki></code>. This works with "Figure" "Fig", "Fig." and "Image", with or without a space before the number.

== See also ==

<includeonly>
<!-- Categories and interwikis go here: -->
[[Category:design templates]]
[[Category:WikiJournal formatting templates]]
</includeonly>

Navigation menu