Template:Image label begin/doc: Difference between revisions

From TEPwiki, Urth's Encyclopedia
Jump to navigation Jump to search
Content added Content deleted
No edit summary
(Cleanup a bit)
Line 1: Line 1:
<!-- Explicit new line here -->
<!-- Explicit new line here -->
{{Documentation subpage}}
<div style="float:right; margin-right: 5px; "><span class="plainlinksneverexpand">[[:Template:{{PAGENAME}}|Template:{{ucfirst:{{PAGENAME}}}}]]&#160;<tt>(</tt><small>[{{fullurl:Template:{{PAGENAME}}|action=edit}} edit]&#160;[[:Template talk:{{PAGENAME}}|talk]]&#160;[{{fullurl:Special:Whatlinkshere/Template:{{PAGENAME}}|limit=500}} links]&#160;[{{fullurl:Template:{{PAGENAME}}|action=history}} history]</small><tt>)</tt></span></div>{{-}}<br>
:::<code>''This [[Wikipedia:Template|template]]'s documentation is [[Wikipedia:Template doc page pattern|transcluded]] from [[:en:Template:Image label begin/doc]]'' [<span class="plainlinks">[{{fullurl:Template:Image_label_begin/doc|action=edit}} edit]</span>].</code>
<includeonly>[[Category:Labelled image map templates|{{PAGENAME}}]]</includeonly>
<includeonly>[[Category:Labelled image map templates|{{PAGENAME}}]]</includeonly>
{{notice|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.}}
{{notice|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.<!-- See http://en.wikipedia.org/w/index.php?title=Template_talk%3ALanarkshire_and_Ayrshire_Railway_Map&diff=165876967&oldid=165872467 -->}}
{{tmbox|text= For a simpler and more general alternative to this template, see {{[[Template:annotated image|annotated image]]}}<br />For a different style, simpler, and more general alternative, see {{[[Template:overlay|overlay]]}}.}}
<center><div style="text-align: center; border: 1px dashed black; width: 50px;">[http://en.wikipedia.org/w/index.php?title=Template_talk%3ALanarkshire_and_Ayrshire_Railway_Map&diff=165876967&oldid=165872467 Fix]</div></center>

:'''''For a simpler and more general alternative to this template, see {{[[Template:annotated image|annotated image]]}}.'''''
:'''''For a different style, simpler, and more general alternative, see {{[[Template:overlay|overlay]]}}.'''''


This [[Wikipedia:Template|template]] is a [[Wikipedia:Avoid self-references|self-reference]] and so is part of the Wikipedia project rather than the encyclopaedic content.
This [[Wikipedia:Template|template]] is a [[Wikipedia:Avoid self-references|self-reference]] and so is part of the Wikipedia project rather than the encyclopaedic content.
Line 19: Line 19:
Line height style in div distorts label locations
Line height style in div distorts label locations
-->
-->
{{usage div}}<div style="float:right; margin-right: 5px; "><span class="plainlinksneverexpand">[[:Template:{{PAGENAME}}|Template:{{ucfirst:{{PAGENAME}}}}]]&#160;<tt>(</tt><small>[{{fullurl:Template:{{PAGENAME}}|action=edit}} edit]&#160;[[:Template talk:{{PAGENAME}}|talk]]&#160;[{{fullurl:Special:Whatlinkshere/Template:{{PAGENAME}}|limit=500}} links]&#160;[{{fullurl:Template:{{PAGENAME}}|action=history}} history]</small><tt>)</tt></span></div>{{-}}<br>
:::<code>''This [[Wikipedia:Template|template]]'s documentation is [[Wikipedia:Template doc page pattern|transcluded]] from [[:en:Template:Image label begin/doc]]'' [<span class="plainlinks">[{{fullurl:Template:Image_label_begin/doc|action=edit}} edit]</span>].</code>

<noinclude>
{{#if:
|<!-- reconstruction of original Template:Template doc page pattern (now the redirected to " Template:Documentation subpage") template... ca mid-November 2007 -->
<table class="messagebox" style="line-height:1.1em;" style=" background:#f9f9b7;">
<tr> <td rowspan="3" style="width:60px;text-align:center;" > [[Image:Edit-paste.svg|40px]]</td>
<td> This is the [[Wikipedia:Template documentation|template documentation]]<!--
--> page for [[{{NAMESPACE}}:{{BASEPAGENAME}}]].</td></tr>
<tr><td><small>This page may not be intended to be viewed directly. <br/
>Links using [[Help:Variable|variable]]s may appear broken; do not replace these with [[hardcoded]] page names or URLs.</small></td></tr>
</table>{{#if:x|<!-- skip --->|[[Category:Template documentation|{{PAGENAME}}]]
}}<!-- Please retain the above original template...

There are templates formulated to [[WP:DPP]] that need this.

Of course, if you all want to start updating all the interwiki exported templates, go on making things more incompatible... queries to User:Fabartus.

--->
|{{#ifeq: {{lc:{{SUBPAGENAME}}}} | doc
| <!-- doc page -->
{{
#ifeq: show | show
| <div class="messagebox" id="template_doc_page_viewed_directly" style="padding-left:1ex;">'''This is a [[Wikipedia:Template documentation|documentation]] [[Wikipedia:Subpages|subpage]] for [[{{SUBJECTSPACE}}:{{BASEPAGENAME}}]]''' <small>(see that page for the {{ #if: {{SUBJECTSPACE}} | {{lc:{{SUBJECTSPACE}}}} | article }} itself)</small>.<br />It contains usage information, [[Wikipedia:Categories|categories]] and other content that is not part of the original {{ #if: {{SUBJECTSPACE}} |{{lc:{{SUBJECTSPACE}}}} page|article}}. </div>
}}{{DEFAULTSORT:{{PAGENAME}}}}{{
#if:
| <!-- skip -->
| [[Category:{{
#if: {{SUBJECTSPACE}}
| {{SUBJECTSPACE}}
| Article
}} documentation]]
}}
|<!-- if not on a /doc subpage, do nothing -->
}}}}
</noinclude>
<!-- EDIT TEMPLATE DOCUMENTATION BELOW THIS LINE -->
<!-- EDIT TEMPLATE DOCUMENTATION BELOW THIS LINE -->


Line 125: Line 88:
</div>
</div>


<includeonly>;</includeonly><noinclude>==</noinclude>Template set<noinclude>==</noinclude>
==Template set==
* &#123;{[[Template:Image label begin|Image label begin]]|image=Example.png|width=400|float=right}}
* {{tlx|Image label begin|image{{=}}Example.png|width{{=}}400|float{{=}}right}}
** {{tl|Image label start}}
** {{tl|Image label start}}
* &#123;{[[Template:Image label|Image label]]|x=0.25|y=0.75|scale=400|text=&#91;[Wikipedia]]}}
* {{tlx|Image label|x{{=}}0.25|y{{=}}0.75|scale{{=}}400|text{{=}}&#91;[Wikipedia]]}}
* &#123;{[[Template:Image label small|Image label small]]|x=0.25|y=0.75|scale=400|text=&#91;[Wikipedia]]}}
* {{tlx|Image label small|x{{=}}0.25|y{{=}}0.75|scale{{=}}400|text{{=}}&#91;[Wikipedia]]}}
* {{tl|Image label end}}
* {{tl|Image label end}}


<includeonly>;</includeonly><noinclude>==</noinclude>Tool<noinclude>==</noinclude>
==Tool==
* [http://mujibab.googlepages.com/labelledimageeditor Labelled Image Editor]
* [http://mujibab.googlepages.com/labelledimageeditor Labelled Image Editor]


==Sample labelled images==
<includeonly>;</includeonly><noinclude>==</noinclude>Sample labelled images<noinclude>==</noinclude>
{{collapse top|title = list}}
{{Silent|
<div style="font-size: 8pt;">
{{Col-begin}}
{{Col-begin}}
{{Col-1-of-3}}
{{Col-1-of-3}}
Line 222: Line 184:
* {{tl|Yugoslavia Labelled Map}}
* {{tl|Yugoslavia Labelled Map}}
{{Col-end}}
{{Col-end}}
{{collapse bottom}}
Silent ends|}}
</div>

Revision as of 16:12, 29 June 2010

Template:Image label begin/doc (edit talk links history)


This template's documentation is transcluded from en:Template:Image label begin/doc [edit].

Template:Tmbox

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.

How to use

Consider this example, adapted from Template:Australia Labelled Map:

{{Image label begin|image=Australia location map recolored.png|width=400|float=none
  |alt=Australia map. Western Australia in the west third with capital Perth, Northern Territory in the north center with capital Darwin, Queensland in the northeast with capital Brisbane, South Australia in the south with capital Adelaide, New South Wales in the northern southeast with capital Sydney, and Victoria in the far southeast with capital Melbourne. Tasmania, with capital Hobart, is off the coast of Victoria, across the Bass Strait. The Indian Ocean is to the west and northwest, the South Pacific Ocean to the east, the Southern Ocean to the south, and the Tasman Sea to the southeast. The Great Australian Bight to the south and the Gulf of Carpentaria to the north are the major bays. The Timor and Arafura Seas are off the north coast, and the Great Barrier Reef guards the northeast coast from the Coral Sea.}}
{{Image label small|x=0.26|y=0.345|scale=400|text=[[Western Australia|Western<br/>Australia]]}}
{{Image label small|x=0.46|y=0.20|scale=400|text=[[Northern Territory|Northern<br/>Territory]]}}
{{Image label small|x=0.505|y=0.4025|scale=400|text=[[South Australia|South<br/>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, 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

link

Specifies where the image should link to. If File: (the default), the image links to its file page. If empty, the image does not link to anything; this is appropriate for purely decorative images.

alt

Specifies text to be used in the image's "alt" attribute. If |link= is empty, this should be empty; if |link= is File: or is not given, this should describe the image; if |link= points to some other page this should describe the action that will be taken if you click on the image. See Wikipedia:Alternative text for images.

caption

Specifies text to be used in the image's "title" attribute. In certain browsers, this text will appear in a tooltip when the mouse pointer is rolled over it.

Template set

Tool

Sample labelled images

list
Template:Col-1-of-3Template:Col-2-of-3Template:Col-3-of-3