Template:Image label begin/doc: Difference between revisions
m (grammar) |
(+<div> with <code><nowiki>s for sake of smaller windows/screens) |
||
Line 57: | Line 57: | ||
<includeonly>;</includeonly><noinclude>===</noinclude>How to use<noinclude>===</noinclude> |
<includeonly>;</includeonly><noinclude>===</noinclude>How to use<noinclude>===</noinclude> |
||
Consider this example for [[Template:Australia Labelled Map]]: |
Consider this example for [[Template:Australia Labelled Map]]: |
||
<div style="margin-right:0.5em; margin-left:0.5em; background:#f9f9f9; overflow:auto;"> |
|||
{{Image label begin|width=<span style="color: red;">{{{width|400}}}</span>|image=<span style="color: green;">Australia location map recolored.png</span>|float=<span style="color: purple;">{{{float|none}}}</span>}} |
|||
<code style="font-size:95%; white-space:nowrap;"><!-- |
|||
{{Image label small|scale=<span style="color: red;">{{{width|400}}}</span>|x=<span style="color: brown;">0.260</span>|y=<span style="color: brown;">0.3450</span>|text=<span style="color: blue;">[[Western Australia|Western Australia]]</span>}} |
|||
--><nowiki>{{Image label begin</nowiki> <!-- |
|||
{{Image label small|scale=<span style="color: red;">{{{width|400}}}</span>|x=<span style="color: brown;">0.480</span>|y=<span style="color: brown;">0.2000</span>|text=<span style="color: blue;">[[Northern Territory|Northern Territory]]</span>}} |
|||
-->|width={{color|red|<nowiki>{{{width|400}}}</nowiki>}} <!-- |
|||
{{Image label small|scale=<span style="color: red;">{{{width|400}}}</span>|x=<span style="color: brown;">0.505</span>|y=<span style="color: brown;">0.4025</span>|text=<span style="color: blue;">[[South Australia|South Australia]]</span>}} |
|||
-->|image={{color|green|Australia location map recolored.png}} <!-- |
|||
... |
|||
-->|float={{color|purple|<nowiki>{{{float|none}}}</nowiki>}}<!-- |
|||
⚫ | |||
-->}}<br/><!-- |
|||
--><nowiki>{{Image label small</nowiki> <!-- |
|||
-->|scale={{color|red|<nowiki>{{{width|400}}}</nowiki>}} <!-- |
|||
-->|x={{color|brown|0.260}} |y={{color|brown|0.3450}} <!-- |
|||
-->|text={{color|blue|<nowiki>[[Western Australia]]</nowiki>}}<!-- |
|||
-->}}<br/><!-- |
|||
--><nowiki>{{Image label small</nowiki> <!-- |
|||
-->|scale={{color|red|<nowiki>{{{width|400}}}</nowiki>}} <!-- |
|||
-->|x={{color|brown|0.480}} |y={{color|brown|0.2000}} <!-- |
|||
-->|text={{color|blue|<nowiki>[[Northern Territory]]</nowiki>}}<!-- |
|||
-->}}<br/><!-- |
|||
--><nowiki>{{Image label small</nowiki> <!-- |
|||
-->|scale={{color|red|<nowiki>{{{width|400}}}</nowiki>}} <!-- |
|||
-->|x={{color|brown|0.505}} |y={{color|brown|0.4025}} <!-- |
|||
-->|text={{color|blue|<nowiki>[[South Australia]]</nowiki>}}<!-- |
|||
-->}}<br/><!-- |
|||
-->...<br/><!-- |
|||
⚫ | |||
</code> |
|||
</div> |
|||
<div style="float: |
<div style="float:right;">__TOC__</div> |
||
⚫ | |||
⚫ | |||
In this example, '''all widths must be set to the same number''' of 400 as the default width. |
In this example, '''all widths must be set to the same number''' of 400 as the default width. |
||
They must all be the same number of 400 for the template to be <u>functionally scalable</u>. |
They must all be the same number of 400 for the template to be <u>functionally scalable</u>. |
Revision as of 14:49, 31 August 2008
There are far too many labelled image templates with widths and scales of -1 or are inconsistent. Please don't do that. Keep both widths and scales greater than zero and exactly the same in each template. For example, if width is 300, then all the scales must also be 300. Thanks. |
This template is a self-reference and so is part of the Wikipedia project rather than the encyclopaedic content.
This template will automatically categorise the current template into: Category:Labelled image map templates.
This Template:Wpd's documentation is [[:Template:WPDWikipedia:Template doc page pattern| transcluded]] from en:Template:Image label begin/doc [edit].
How to use
Consider this example for Template:Australia Labelled Map:
{{Image label begin |width={{{width|400}}} |image=Australia location map recolored.png |float={{{float|none}}}}}
{{Image label small |scale={{{width|400}}} |x=0.260 |y=0.3450 |text=[[Western Australia]]}}
{{Image label small |scale={{{width|400}}} |x=0.480 |y=0.2000 |text=[[Northern Territory]]}}
{{Image label small |scale={{{width|400}}} |x=0.505 |y=0.4025 |text=[[South Australia]]}}
...
{{Image label end}}
- Width/Scale
In this example, all widths must be set to the same number of 400 as the default width. They must all be the same number of 400 for the template to be functionally scalable. This means they can be displayed at a different size by supplying a width parameter to the template when in use. For example, {{Australia Labelled Map|width=500}} will display the labelled image as a larger one of 500 pixels in width instead of 400.
To change the default size, put the wiki markup in Notepad, and search and replace "{{{width|400}}}" with "{{{width|500}}}".
For earthly geographic maps, conforming to these specifications can allow easier conversion to for any other purposes such as for the use of {{Location map+}}.
X/Y
X and Y values are always between 0 and 1. They represent the percentages of the width and height respectively where the label will be placed. The exact point is the top-left corner of the image label.
x=0 |y=0 will place the top-left corner of the label at the top-left of the image x=0 |y=1 will place the top-left corner of the label at the bottom-left of the image x=1 |y=1 will place the top-left corner of the label at the bottom-right of the image x=1 |y=0 will place the top-left corner of the label at the top-right of the image x=0.5|y=0.5 will place the top-left corner of the label at the centre of the image
Image
The title of the wiki page of the image without the "Image:" prefix.
Text
The text label to display as wiki markup.
Float
Three options:
{{{float|none}}} makes the image sit on its own line of the page by default {{{float|left}}} makes the image pushed to the left of the page by default {{{float|right}}} makes the image pushed to the right of the page by default
Template set
- {{Image label begin|image=Example.png|width=400|float=right}}
- {{Image label|x=0.25|y=0.75|scale=400|text=[[Wikipedia]]}}
- {{Image label small|x=0.25|y=0.75|scale=400|text=[[Wikipedia]]}}
- {{Image label end}}
Tool
- Labelled Image Editor
- Labelled Image Editor 2 - Coming Soon -- Zondor 07:38, 24 October 2007 (UTC)