Template:Fig

From Wikiversity
Jump to navigation Jump to search

Wikipedia-logo.png

Figure {{{number}}} | This is an example caption.
copyright/licensing/attribution info

Template documentation[view] [edit] [history] [purge]

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 using template:countup for automatic figure numbering. Sadly this breaks cross-referencing figures by number and the unnamed template parameters would need to all be corrected.

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:

Wikipedia-logo.png

Figure 1 | 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

Wikipedia-logo.png

B

Figure 2 | 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