Jump to content

User:Viewer2/templates/FI/doc

From Wikisource

 DRAFT

Usage

[edit]
  • Always please use the shortcut to FreedImg, {{FI}}, rather than the long template name.
{{FI
 | type         =
 | file         =
 | width        =
 | cclass       =
 | float        =
 | margin-left  =
 | margin-right =
 | clear        =
 | caption      =
 | mleft        =
 | indent       =
 | tstyle       =
 | talign       =
 | alt          =
 | link         =
}}

Parameters

[edit]
for the Image itself
  • file: The file name (without the "File:" prefix) (mandatory parameter)
    • alt: Image alt-text, ie. for mouse-over text box or for use with a screenreader for the visually impaired (optional)
    • link: Override the default image link with an internal/external URL of your choosing (optional)
when ( type=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 file parameter instead.
Primary DIV container
  • width: The width of the primary container, by percentage (present, variable, default 100%)
  • cclass: The class for the primary container, (present, variable, default floatnone [a null undefined classname just for placeholder purposes])
  • float: The alignment of the primary container (not present; must be added, options are "left" or "right"; otherwise remains centered).
  • clear: The margin(s) of the primary container to be cleared (not present; must be added, options are "left", "right" or "both").
  • margin-left,margin-right : Any special margins to be applied to the primary container (defaults appropriate for centered result).
Image Caption
  • caption: The image caption (not present; must be added).
  • tstyle,talign: Any special text style or alignment to apply to caption block (if present).
  • mleft,indent: Any special text-flow (e.g. hanging indent etc.) control to apply to caption (if present).

Examples

[edit]
1. File:Iceberg.jpg, (full resolution: ‎573 × 833 pixels, file size: 87 KB, MIME type: image/jpeg)
{{FI
 | file     = Iceberg.jpg
 | width    = 20%
 | link     = w:Iceberg{{!}}Iceberg article at Wikipedia
 | alt      = WS Iceberg
}}
WS Iceberg


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


3. Mathematical Equation[1]:
{{FI
 | type  = user
 | width = 25%
 | file  = <math>\sin x = {e^{ix} - e^{-ix} \over 2i} </math>
}}



  1. N.B. This only works if the user's Preferences are set to the default (i.e. Preference/Appearance/Math is "Always render PNG". Choice "MathJax" causes any formulæ to be rendered entirely in text, completely bypassing any effect {{FreedImg}} may have.)