Template:FreedImg/span/doc

From testwiki
Jump to navigation Jump to search

Template:Documentation subpage Template:Uses TemplateStyles Template:Lua

  • Use this image container template to display INLINE OFFSET images.
  • Resizes the container dynamically and provides additional image related features.
  • When used to display an offset image, the surrounding text flows around the container.

Template:Dhr

Usage

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

For true block element usage, please see FreedImg, Template:Tl, instead.

Parameters

For the Image itself
  • Template:Parameter: The file name (without the "File:" prefix) (optional; if lacking, a caption-only block is created.)
  • Template:Parameter: request this size of image from the server, rather than computing a guess. This can help to reduce file size, for example, when you know the image will be used in a narrow container.
  • Images generated by certain wikicode extensions (e.g. the default <math> User preference, <score>, etc.) may be entered in the named Template:Parameter parameter instead.
Primary DIV container
  • Template:Parameter: The width of the primary container, by percentage (present, variable, default 100%)
  • Template:Parameter: The class for the primary container, (present, variable, default floatnone [a null undefined classname just for placeholder purposes])
  • Template:Parameter: Any special overall styles to apply to primary container (default: no extra CSS).
  • Template:Parameter: The alignment of the primary container (not present; must be added, options are "left" or "right"; otherwise remains centered).
  • Template:Parameter: The margin(s) of the primary container to be cleared (not present; must be added, options are "left", "right" or "both").
  • Template:Parameter,Template:Parameter : Any special margins to be applied to the primary container (defaults appropriate for centered result).
Image Caption

Examples

Example 1: Simple inline image

When used with default parameters, the image is inlined into the surrounding paragraph.

text before{{FIS
 | file     = Iceberg.jpg
 | width    = 100px
 | alt      = WS Iceberg
 | link     = w:Iceberg{{!}}Iceberg article at Wikipedia
}}text after

text beforeTemplate:FIStext after

Example 2: Simple inline image, with caption

text before{{FIS
 | file     = Iceberg.jpg
 | width    = 100px
 | caption  = An iceberg
}}text after

text beforeTemplate:FIStext after


Example 3: Mathematical Equation

Template:Smaller

text before {{FIS
 | type  = math
 | file  = <math>sin x = {e^{ix} - e^{-ix} \over 2i}</math>
}} text after

text before Template:FIS text after

Example 4: Floating centred image

This is a very common use of the template: to provide an image that "floats" in the centre of the page, but does not cause a hard paragraph break at the image location.

For this to work, Template:Parameter must be set to "left" or "right", and the Template:Parameter, Template:Parameter and Template:Parameter must sum to 100%, otherwise this template will not take up a full width, and some surrounding text may creep into the same line (as in example 1).

{{FIS
 | file     = Iceberg.jpg
 | width    = 20%
 | margin-right=40%
 | margin-left=40%
 | float    = right
 | alt      = WS Iceberg
 | link     = w:Iceberg
 | caption  = {{Sc|An Iceberg. Plaintiff alleges that she participated in a group training program conducted by Lifespring in Philadelphia, Pennsylvania during April 1981.}}
}}

Plaintiff alleges that she participated in a group training program conducted by Lifespring in Philadelphia, Pennsylvania during April 1981. She contends that she was subjected to psychological manipulation resulting in psychological and emotional injuries. She contends that Lifespring, [FIS here!] Template:FISunder whose auspices the program was conducted, is liable to her essentially in tort. She further contends that Hanley is individually liable to her because he controlled the training offered by Lifespring. She contends that he was personally involved in the development and operation of the training program. Service of the complaint was made upon Hanley by registered mail. He states in an affidavit that he lacks any personal contact with Pennsylvania other than through his affiliation with Lifespring in his corporate capacity. Plaintiff argues that such contact is sufficient.

Example 5: Single page of a multi-page document

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

Template:FIS

See also

  • Template:Tl: block-based equivalent. Note: this template always breaks a paragraph.