Predefinição:FreedImg/span
Essa predefinição utiliza TemplateStylesEN: |
- 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.
Usage
editar- Always please use the shortcut to FreedImg/span, {{FIS}}, 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, {{FI}}, instead.
Parameters
editar{{FIS | parameter | alternate name | default value | notes | }} |
---|---|---|---|---|---|
cclass | floatnone | ||||
width | 100% | ||||
height | auto | ||||
margin-right | auto | ||||
margin-left | auto | ||||
float | «none» | adding then setting float to left or right overrides the default alignment; centered. | |||
clear | «none» | ||||
cstyle | «none» | Trailing semicolon always added if cstyle specified. | |||
type | «none» |
| |||
file | if type ∈ {user,score,math} | Must be specified (syntax error if not) when type is «none» | |||
link | «none» | Only effective when type is «none» | |||
alt | «none» | Only effective when type is «none» | |||
page | «none» | Only effective when type is «none» | |||
imgclass | «none» | Only effective when type is «none»; when present this CSS class is applied in addition to "freedImg" to <img> | |||
caption | «none» | ||||
tdisplay | block | Only applied if caption present. | |||
talign | center | Only applied if caption present. | |||
tstyle | «none» | Only applied if caption present; when tstyle is also present a trailing semicolon is always added. | |||
tmright | 0.00em | Only applied if caption present. | |||
tmleft | 0.00em | Only applied if caption present. | |||
indent | 0.00em | Only applied if caption present. |
- for the Image itself
- file: The file name (without the "File:" prefix) (optional; if lacking, a caption-only block is created.)
- alt: Image alt-text, ie. for mouse-over text box or for use with a screenreader for the visually impaired (optional)
- link: link redirect for image (default no redirect)
- page: Select individual image page within a multi-page file (PDF/DJVU etc.; 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])
- cstyle: Any special overall styles to apply to primary container (default: no extra CSS).
- 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).
- tmleft,indent: Any special text-flow (e.g. hanging indent etc.) control to apply to caption (if present).
Examples
editarExample 1: Simple inline image
editarWhen 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
Example 2: Simple inline image, with caption
editartext before{{FIS | file = Iceberg.jpg | width = 100px | caption = An iceberg }}text after
text beforeAn icebergtext after
Example 3: Musical Score
editartext before{{FIS | type = user | width = 50% | file = <score>{ \clef bass \time 3/4 g,4 (b,4 [d4 f4 a4]) r4 \bar "|." }</score> }}text aftertext beforetext after
Example 4: Mathematical Equation
editarN.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.)
text before{{FIS | type = math | width = 25% | file = <math>sin x = {e^{ix} - e^{-ix} \over 2i}</math> }}text after
text beforetext after
Example 5: Floating centred image
editarThis 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, float must be set to "left" or "right", and the width, margin-left and margin-right 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!] An Iceberg. Plaintiff alleges that she participated in a group training program conducted by Lifespring in Philadelphia, Pennsylvania during April 1981.under 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 6: Single page of a multi-page document
editar{{FIS | file = Character of Renaissance Architecture.djvu | width = 15% | alt = Plate III: Cvpola Di S Pietro | link = Character of Renaissance Architecture | page = 91 }}
See also
editar- {{FreedImg}}: block-based equivalent. Note: this template always breaks a paragraph.
A documentação acima é transcluída de Predefinição:FreedImg/span/doc. (editar | histórico) Editores podem experimentar nas páginas de teste (criar | espelhar) e de exemplos para testes (criar) desta predefinição. Por favor adicione categorias à subpágina /doc. Subpáginas desta predefinição. |