Template:Fig/doc
This is a documentation subpage for Template:Fig. It may contain usage information, categories and other content that is not part of the original template 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.
- See Template:Fig/sandbox for an implementation automated figure numbers just using the usual
[[File:wikipedia-logo.png|thumb|caption]]
formatting, via defining templatestylestemplatestyles in a styles page. Sadly this breaks cross-referencing figures by number and the unnamed template parameters would need to all be corrected but would greatly ease automating, VE-compatibility and import/export with other wikis.
Usage
editSingle images
edit{{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) }}
Can also be abbreviated as: {{fig|1|wikipedia-logo.png|capt|attrib|size=100px}}
to produce:
Multi-part images
editThe template is also fully compatible with multipart figures. It uses the same syntax as {{mulitple image}}
. Figures are labelled as parts A, B, C, etc and all captions are listed at the bottom.
{{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) }}
For example {{fig|2|image1=wikipedia-logo.png|image2=wikipedia-logo.png|caption=capt|caption1=caption1|caption2=caption2|alt1=mouse-over|attribution=attrib|size=100px}}
produces:
Cross-referencing elsewhere in page
editFigures can be linked to by using [[#Fig 1]]
. This works with "Figure" "Fig", "Fig." and "Image", with or without a space before the number.
See also
editA template for formatting figures for WikiJournals
Parameter | Description | Type | Status | |
---|---|---|---|---|
Figure number | number 1 | The series number of this figure within the article
| Number | required |
Image filename | image image1 name 2 | Filename of image (omitting "File:")
| File | required |
Caption | caption caption1 3 | Text to describe the image
| String | required |
Attribution | attribution copyright 4 | Name or image creator and license
| String | suggested |
Alignment | align float | Horizontal position on page (left, right or center)
| String | optional |
Padding | padding pad | spacing around the image and caption
| Unknown | optional |
Width | width size width1 size1 | width of image
| Unknown | optional |
Direction | direction | Direction of panels in a multi-part image
| Unknown | optional |
Image filename 2 | image2 | Filename of second image (omitting "File:")
| File | optional |
width2 | width2 | no description | Unknown | optional |
size2 | size2 | no description | Unknown | optional |
image3 | image3 | no description | Unknown | optional |
width3 | width3 | no description | Unknown | optional |
size3 | size3 | no description | Unknown | optional |
image4 | image4 | no description | Unknown | optional |
width4 | width4 | no description | Unknown | optional |
size4 | size4 | no description | Unknown | optional |
image5 | image5 | no description | Unknown | optional |
width5 | width5 | no description | Unknown | optional |
size5 | size5 | no description | Unknown | optional |
image6 | image6 | no description | Unknown | optional |
width6 | width6 | no description | Unknown | optional |
size6 | size6 | no description | Unknown | optional |
image7 | image7 | no description | Unknown | optional |
width7 | width7 | no description | Unknown | optional |
size7 | size7 | no description | Unknown | optional |
image8 | image8 | no description | Unknown | optional |
width8 | width8 | no description | Unknown | optional |
size8 | size8 | no description | Unknown | optional |
image1 | image1 | no description | Unknown | optional |
Alternative text | alt alt1 | no description | Unknown | optional |
alt1 | alt1 | no description | Unknown | optional |
link | link | no description | Unknown | optional |
top1 | top1 | no description | Unknown | optional |
left1 | left1 | no description | Unknown | optional |
color1 | color1 | no description | Unknown | optional |
colour1 | colour1 | no description | Unknown | optional |
alt2 | alt2 | no description | Unknown | optional |
top2 | top2 | no description | Unknown | optional |
left2 | left2 | no description | Unknown | optional |
color2 | color2 | no description | Unknown | optional |
colour2 | colour2 | no description | Unknown | optional |
alt3 | alt3 | no description | Unknown | optional |
top3 | top3 | no description | Unknown | optional |
left3 | left3 | no description | Unknown | optional |
color3 | color3 | no description | Unknown | optional |
colour3 | colour3 | no description | Unknown | optional |
alt4 | alt4 | no description | Unknown | optional |
top4 | top4 | no description | Unknown | optional |
left4 | left4 | no description | Unknown | optional |
color4 | color4 | no description | Unknown | optional |
colour4 | colour4 | no description | Unknown | optional |
alt5 | alt5 | no description | Unknown | optional |
top5 | top5 | no description | Unknown | optional |
left5 | left5 | no description | Unknown | optional |
color5 | color5 | no description | Unknown | optional |
colour5 | colour5 | no description | Unknown | optional |
alt6 | alt6 | no description | Unknown | optional |
top6 | top6 | no description | Unknown | optional |
left6 | left6 | no description | Unknown | optional |
color6 | color6 | no description | Unknown | optional |
colour6 | colour6 | no description | Unknown | optional |
alt7 | alt7 | no description | Unknown | optional |
top7 | top7 | no description | Unknown | optional |
left7 | left7 | no description | Unknown | optional |
color7 | color7 | no description | Unknown | optional |
colour7 | colour7 | no description | Unknown | optional |
alt8 | alt8 | no description | Unknown | optional |
top8 | top8 | no description | Unknown | optional |
left8 | left8 | no description | Unknown | optional |
color8 | color8 | no description | Unknown | optional |
colour8 | colour8 | no description | Unknown | optional |
Header | header | Header above image | Unknown | optional |
Footer | footer | Footer below caption | Unknown | optional |
caption1 | caption1 | no description | Unknown | optional |
caption2 | caption2 | no description | Unknown | optional |
caption3 | caption3 | no description | Unknown | optional |
caption4 | caption4 | no description | Unknown | optional |
caption5 | caption5 | no description | Unknown | optional |
caption6 | caption6 | no description | Unknown | optional |
caption7 | caption7 | no description | Unknown | optional |
caption8 | caption8 | no description | Unknown | optional |