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

edit

Single 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:

 capt


attrib

Multi-part images

edit

The 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:

mouse-over

A

B
 capt

A) caption1 B) caption2


attrib

Cross-referencing elsewhere in page

edit

Figures 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

edit

A template for formatting figures for WikiJournals

Template parameters

This template prefers block formatting of parameters.

ParameterDescriptionTypeStatus
Figure numbernumber 1

The series number of this figure within the article

Default
?
Example
1
Numberrequired
Image filenameimage image1 name 2

Filename of image (omitting "File:")

Example
example.jpg
Filerequired
Captioncaption caption1 3

Text to describe the image

Example
Descriptive text
Stringrequired
Attributionattribution copyright 4

Name or image creator and license

Example
Jane Smith, CC BY-4.0
Stringsuggested
Alignmentalign float

Horizontal position on page (left, right or center)

Default
left
Example
left
Stringoptional
Paddingpadding pad

spacing around the image and caption

Default
10px 10px 15px 0px
Example
10px 10px 15px 0px
Unknownoptional
Widthwidth size width1 size1

width of image

Example
250px
Unknownoptional
Directiondirection

Direction of panels in a multi-part image

Default
horizontal
Example
horizontal or vertical
Unknownoptional
Image filename 2image2

Filename of second image (omitting "File:")

Example
example.jpg
Fileoptional
width2width2

no description

Unknownoptional
size2size2

no description

Unknownoptional
image3image3

no description

Unknownoptional
width3width3

no description

Unknownoptional
size3size3

no description

Unknownoptional
image4image4

no description

Unknownoptional
width4width4

no description

Unknownoptional
size4size4

no description

Unknownoptional
image5image5

no description

Unknownoptional
width5width5

no description

Unknownoptional
size5size5

no description

Unknownoptional
image6image6

no description

Unknownoptional
width6width6

no description

Unknownoptional
size6size6

no description

Unknownoptional
image7image7

no description

Unknownoptional
width7width7

no description

Unknownoptional
size7size7

no description

Unknownoptional
image8image8

no description

Unknownoptional
width8width8

no description

Unknownoptional
size8size8

no description

Unknownoptional
image1image1

no description

Unknownoptional
Alternative textalt alt1

no description

Unknownoptional
alt1alt1

no description

Unknownoptional
linklink

no description

Unknownoptional
top1top1

no description

Unknownoptional
left1left1

no description

Unknownoptional
color1color1

no description

Unknownoptional
colour1colour1

no description

Unknownoptional
alt2alt2

no description

Unknownoptional
top2top2

no description

Unknownoptional
left2left2

no description

Unknownoptional
color2color2

no description

Unknownoptional
colour2colour2

no description

Unknownoptional
alt3alt3

no description

Unknownoptional
top3top3

no description

Unknownoptional
left3left3

no description

Unknownoptional
color3color3

no description

Unknownoptional
colour3colour3

no description

Unknownoptional
alt4alt4

no description

Unknownoptional
top4top4

no description

Unknownoptional
left4left4

no description

Unknownoptional
color4color4

no description

Unknownoptional
colour4colour4

no description

Unknownoptional
alt5alt5

no description

Unknownoptional
top5top5

no description

Unknownoptional
left5left5

no description

Unknownoptional
color5color5

no description

Unknownoptional
colour5colour5

no description

Unknownoptional
alt6alt6

no description

Unknownoptional
top6top6

no description

Unknownoptional
left6left6

no description

Unknownoptional
color6color6

no description

Unknownoptional
colour6colour6

no description

Unknownoptional
alt7alt7

no description

Unknownoptional
top7top7

no description

Unknownoptional
left7left7

no description

Unknownoptional
color7color7

no description

Unknownoptional
colour7colour7

no description

Unknownoptional
alt8alt8

no description

Unknownoptional
top8top8

no description

Unknownoptional
left8left8

no description

Unknownoptional
color8color8

no description

Unknownoptional
colour8colour8

no description

Unknownoptional
Headerheader

Header above image

Unknownoptional
Footerfooter

Footer below caption

Unknownoptional
caption1caption1

no description

Unknownoptional
caption2caption2

no description

Unknownoptional
caption3caption3

no description

Unknownoptional
caption4caption4

no description

Unknownoptional
caption5caption5

no description

Unknownoptional
caption6caption6

no description

Unknownoptional
caption7caption7

no description

Unknownoptional
caption8caption8

no description

Unknownoptional