Predefinição:FreedImg/doc

Fonte: testwiki
Saltar para a navegação Saltar para a pesquisa

Predefinição:Documentation subpage Predefinição:Uses TemplateStyles

  • Use this image container template to display CENTERED images.
  • Resizes the container dynamically and provides additional image related features.
  • When used to display an offset image, the surrounding text is broken into a new paragraph.

Usage

  • Always please use the shortcut to FreedImg, Predefinição:Tl, rather than the long template name.
{{FI
 | type         =
 | file         =
 | width        =
 | cclass       =
 | cstyle       =
 | float        =
 | margin-left  =
 | margin-right =
 | clear        =
 | caption      =
 | tmleft       =
 | indent       =
 | tstyle       =
 | talign       =
 | alt          =
 | link         =
 | page         =
}}

For true inline usage, please see FreedImg/span, Predefinição:Tl, instead.

Parameters

for the Image itself
when the (Predefinição:Parameter=user ) is present & set
  • Images generated by certain wikicode extensions (e.g. the default <math> User preference, <score>, etc.) may be entered in the named Predefinição:Parameter parameter instead.
Parameters by code inspection as at 15th Dec. 2014 revision:
Predefinição:T/r| Predefinição:((FI parameter alternate name default value notes Predefinição:T/r| Predefinição:))
cclass floatnone
width 100%
margin-right auto
margin-left auto
float «none»
clear «none»
cstyle «none» Trailing semicolon always added if Predefinição:Parameter specified.
type «none»
  • user:
  • score:
  • math:
  • «none»:
file
if type ∈ {user,score,math}
N.B. Predefinição:Parameter is optional (FIS feature only!)
height «none» (FIS feature only!) If specified image clipping also enabled (i.e. really effectively maximum height)
link «none» Only effective when Predefinição:Parameter is «none»
alt «none» Only effective when Predefinição:Parameter is «none»
page «none» Only effective when Predefinição:Parameter is «none»
imgclass «none» Only effective when Predefinição:Parameter is «none»; when present this CSS class is applied in addition to "freedImg" to <img>
imgstyle «none» Trailing semicolon always added if Predefinição:Parameter specified.
caption «none»
tdisplay block Only applied if Predefinição:Parameter present.
sdisplay inline-block Only applied if Predefinição:Parameter present. There appears to be an anomaly with the rendering engine of (at least) FireFox 34.0 affecting the inheritance of container widths. Other browsers tested as working acceptably using defaults; but F/F may need this parameter to be overridden (both "inline" and "block" work. See testcases.
talign center Only applied if Predefinição:Parameter present.
tstyle «none» Only applied if Predefinição:Parameter present; when Predefinição:Parameter is also present a trailing semicolon is always added.
tmright 0.00em Only applied if Predefinição:Parameter present.
tmleft 0.00em Only applied if Predefinição:Parameter present.
indent 0.00em Only applied if Predefinição:Parameter present.


Primary DIV container
Image element
Image Caption

Examples

Basic example: centred image

{{FI
 | file     = Iceberg.jpg
 | width    = 20%
 | link     = w:Iceberg{{!}}Iceberg article at Wikipedia
 | alt      = WS Iceberg
}}

Predefinição:FI

Musical score

{{FI
 | type  = score
 | width = 50%
 | file  = <score>{ \clef bass \time 3/4 g,4 (b,4 [d4 f4 a4]) r4 \bar "|." }</score>
}}

Predefinição:FI

Mathematical Equation

Predefinição:Smaller

{{FI
 | type  = math
 | width = 25%
 | file  = <math>sin x = {e^{ix} - e^{-ix} \over 2i} </math>
}}

Predefinição:FI

Page of a multipage document

{{FI
 | file     = Character of Renaissance Architecture.djvu
 | width    = 20%
 | link     = Character of Renaissance Architecture
 | alt      = Plate III: Cvpola Di S Pietro
 | page     = 91
}}

Predefinição:FI

Adding classes to the image (e.g. rotation)

Predefinição:T/c2|
{{FI
 | file     = Iceberg.jpg
 | width    = 20%
 | link     = w:Iceberg{{!}}Iceberg article at Wikipedia
 | alt      = WS Iceberg
 | imgclass = rot270
 | caption  = Gravity right
}}
Predefinição:T/c2|
{{FI
 | file     = Iceberg.jpg
 | width    = 40%
 | link     = w:Iceberg{{!}}Iceberg article at Wikipedia
 | alt      = WS Iceberg
 | imgclass = rot90
 | caption  = Gravity left
}}
Predefinição:T/c2|Predefinição:FI Predefinição:Ts| Predefinição:T/c2|Predefinição:FI
Predefinição:T/r2Predefinição:Ts| Predefinição:T/c|Predefinição:FI Predefinição:T/r2Predefinição:Ts|
Predefinição:T/cPredefinição:Ts|
{{FI
 | file     = Iceberg.jpg
 | width    = 40%
 | link     = w:Iceberg{{!}}Iceberg article at Wikipedia
 | alt      = WS Iceberg
 | imgclass = rot180
 | caption  = Gravity up
}}

Extra CSS styles

{{FI
 | file     = Iceberg.jpg
 | width    = 10%
 | imgstyle = outline: solid 3px blue;
 | caption  = An iceberg
 | tstyle   = background-color: yellow; font-family:serif;
 | cstyle   = border: dashed 1px red; padding: 10px;
}}

Predefinição:FI


See also