قالب:Annotated image/doc
هذه صفحة توثيق فرعية لـ قالب:Annotated image. تتضمن معلومات الاستعمال، التصنيفات وأي محتوى آخر ليس من محتويات الأصل لصفحة القالب. |
Usage
For examples see Template:Annotated image/doc/Samples.
All parameters have names - there are no nameless "numbered" parameters.
Two of the parameters, image and imagemap, are mutually exclusive - use one of them but not both.
In most cases you will need only the required parameters - the rest are there in case you want additional formatting options.
Name | Allowed values | Default value | Function & notes |
---|---|---|---|
caption | wikitext | (required) | Caption of the image, goes in the usual place for image captions. |
image | valid image file name; SVG images are allowed | (see note) | You must specify image or imagemap but not both. |
imagemap | valid (X)HTML imagemap | (see note) | You must specify image or imagemap but not both. |
width | positive integer | (optional) | Total width (in pixels) of the box containing the image and annotations. Must be at least as large as the image's displayed width (which you can set by using image-width). |
height | positive integer | (optional) | Total height (in pixels) of the box containing the image and annotations. Must be at least as large as the image's displayed height. If you change the displayed width of the image by specifying image-width, you will have to work out the image's displayed height and then add any "margins" you need for annotations. |
image-left | positive integer | (required) | X-coordinate of the image's top left corner (in pixels), relative to the top left corner of the box containing the image and annotations. |
image-top | positive integer | (required) | Y-coordinate of the image's top left corner (in pixels), relative to the top left corner of the box containing the image and annotations. |
image-width | positive integer | (required) | Width of the image (in pixels). |
annotations | at least 1 instance of Template:Annotation | (required) | Annotations for the image. |
float | right left none |
right | Makes the template's output float to the right or left of the text.. |
outer-css | any valid CSS | (optional, no default value) | Additional CSS for the outermost box. Cannot over-ride any other parameters that you specify for the outer box. It's best to use this only as a last resort. |
image-bg-color | any valid CSS color | white | Background of the box in whichi the image is displayed. You might want to set a dark background if the image is dark and you want to use a light color for the annotations. |
image-css | any valid CSS | (optional, no default value) | Additional CSS for the image (or rather, the invisible box that contains it). Cannot over-ride any other parameters that you specify for the image's box. It's best to use this only as a last resort. |
annot-text-align | left right center |
left | Sets a default text-alignment for all the contained annotations. You can over-ride this for individual annotations if you wish. |
annot-background-color | any valid CSS color | transparent | Sets a default background-color for all the contained annotations. You can over-ride this for individual annotations if you wish. |
annot-font-family | any valid CSS font-family | (optional, no default value) | Sets a default font-family for all the contained annotations. You can over-ride this for individual annotations if you wish. |
annot-font-size | positive integer | (optional, no default value) | Sets a default font-size (in pixels) for all the contained annotations. You can over-ride this for individual annotations if you wish. |
annot-font-weight | any valid CSS font-weight | (optional, no default value) | Sets a default font-weight for all the contained annotations. You can over-ride this for individual annotations if you wish. |
annot-font-style | any valid CSS font-style (e.g. italic) | (optional, no default value) | Sets a default font-style for all the contained annotations. You can over-ride this for individual annotations if you wish. |
annot-line-height | any valid CSS line-height | (optional, no default value) | Sets a default line-height (line spacing) for all the contained annotations. You can over-ride this for individual annotations if you wish. Only useful for multi-line annotations. |
annot-font-family | any valid CSS font-family | (optional, no default value) | Sets a default font-family for all the contained annotations. You can over-ride this for individual annotations if you wish. |
annot-color | any valid CSS color | (optional, no default value) | Sets a default color for all the contained annotations. You can over-ride this for individual annotations if you wish. |
Example
Template:Annotated image/Extinction
See also
- Template:Annotation, for creating the annotations
- Template:Image label, an alternative