Help:Images
From Crankshaft Coalition Wiki
m (Reverted edits by 171.21.80.212 (Talk) to last revision by 130.83.160.141) |
m (Add category) |
||
Line 4: | Line 4: | ||
== Syntax == | == Syntax == | ||
The full syntax for displaying an image is: | The full syntax for displaying an image is: | ||
− | [[ | + | [[Image:{file_name}|{options}]] |
Where options can be zero or more of the following, separated by pipes: | Where options can be zero or more of the following, separated by pipes: | ||
* ''border'', ''frame'', ''thumb'', or ''frameless'': Controls how the image is formatted | * ''border'', ''frame'', ''thumb'', or ''frameless'': Controls how the image is formatted | ||
Line 13: | Line 13: | ||
** ''Note that the image will always retain its aspect ratio.'' | ** ''Note that the image will always retain its aspect ratio.'' | ||
* ''link={destination}'': Allows to link to an arbitrary title, URL or just nowhere ([[rev:41727|1.14+]]) | * ''link={destination}'': Allows to link to an arbitrary title, URL or just nowhere ([[rev:41727|1.14+]]) | ||
− | ** ''link= '': Will display an image without link, e.g. <code><nowiki>[[</nowiki> | + | ** ''link= '': Will display an image without link, e.g. <code><nowiki>[[</nowiki>Image:Name.jpg|20px|link=Help:Images]]</code> → [[Image:Name.jpg|20px|link=Help:Images]]. |
** ''Note that ''link'' cannot be used in conjunction with ''thumb'' as thumb is always meant to link to the larger version of the image. In addition, ''link'' cannot be used with ''frame''.'' | ** ''Note that ''link'' cannot be used in conjunction with ''thumb'' as thumb is always meant to link to the larger version of the image. In addition, ''link'' cannot be used with ''frame''.'' | ||
* ''alt={alternative text}'': For changing the alternative text (''alt=""'') of an image ([[rev:41837|1.14+]]) | * ''alt={alternative text}'': For changing the alternative text (''alt=""'') of an image ([[rev:41837|1.14+]]) | ||
Line 70: | Line 70: | ||
results in (the text is underlined to show the result more clearly) | results in (the text is underlined to show the result more clearly) | ||
− | <u>text text [[ | + | <u>text text [[Image:Example.jpg|20px]] |
− | text text [[ | + | text text [[Image:Example.jpg|20px|baseline]] |
− | text text [[ | + | text text [[Image:Example.jpg|20px|sub]] |
− | text text [[ | + | text text [[Image:Example.jpg|20px|super]] |
− | text text [[ | + | text text [[Image:Example.jpg|20px|text-top]] |
− | text text [[ | + | text text [[Image:Example.jpg|20px|middle]] |
− | text text [[ | + | text text [[Image:Example.jpg|20px|bottom]] |
− | text text [[ | + | text text [[Image:Example.jpg|20px|text-bottom]]</u> |
− | == Size and | + | == Size and frame == |
Among different formats, the effect of the size parameter may be different, as shown below. | Among different formats, the effect of the size parameter may be different, as shown below. | ||
Line 114: | Line 114: | ||
for example: | for example: | ||
<nowiki><gallery></nowiki> | <nowiki><gallery></nowiki> | ||
− | + | Image:Example.jpg|Item 1 | |
− | + | Image:Example.jpg|a link to <nowiki>[[</nowiki>Help:Contents]] | |
− | + | Image:Example.jpg | |
− | + | Image:Example.jpg | |
− | + | Image:Example.jpg| <nowiki>''italic caption''</nowiki> | |
− | + | Image:Example.jpg|on page "<nowiki>{{</nowiki>PAGENAME}}" | |
</gallery> | </gallery> | ||
is formatted as: | is formatted as: | ||
<gallery> | <gallery> | ||
− | + | Image:Example.jpg|Item 1 | |
− | + | Image:Example.jpg|a link to [[Help:Contents]] | |
− | + | Image:Example.jpg | |
− | + | Image:Example.jpg | |
− | + | Image:Example.jpg|''italic caption'' | |
− | + | Image:Example.jpg|on page "{{PAGENAME}}" | |
</gallery> | </gallery> | ||
Line 136: | Line 136: | ||
{images} | {images} | ||
</gallery></pre> | </gallery></pre> | ||
− | * <code>caption={caption}</code>: sets a caption | + | * <code>caption="{caption}"</code>: (caption text in parentheses) sets a caption centered atop the gallery. |
* <code>widths={width}px</code>: sets the widths of the images. | * <code>widths={width}px</code>: sets the widths of the images. | ||
* <code>heights={heights}px</code>: sets the (max) heights of the images. | * <code>heights={heights}px</code>: sets the (max) heights of the images. | ||
* <code>perrow={integer}</code>: sets the number of images per row. | * <code>perrow={integer}</code>: sets the number of images per row. | ||
+ | |||
+ | '''EXAMPLE:''' | ||
+ | |||
+ | <nowiki><gallery widths=200px caption="Tools/Supplies"></nowiki> | ||
+ | |||
+ | <nowiki>File:SOLDERING EQUIPMENT 001.jpg|Selection of soldering equipment</nowiki> | ||
+ | |||
+ | <nowiki>File:Rosin flux 002.jpg|Rosin flux suitable for electrical work</nowiki> | ||
+ | |||
+ | <nowiki>File:TERMINAL AND WIRE STRIPPER TOOLS 002.jpg|Wire cutters, crimpers, strippers</nowiki> | ||
+ | |||
+ | <nowiki></gallery></nowiki> | ||
+ | |||
+ | '''will be displayed as:''' | ||
+ | <gallery widths=200px caption="Tools/Supplies"> | ||
+ | File:SOLDERING EQUIPMENT 001.jpg|Selection of soldering equipment | ||
+ | File:Rosin flux 002.jpg|Rosin flux suitable for electrical work | ||
+ | File:TERMINAL AND WIRE STRIPPER TOOLS 002.jpg|Wire cutters, crimpers, strippers | ||
+ | </gallery> | ||
== Links == | == Links == | ||
Line 185: | Line 204: | ||
<pre>http://url.for/some/image.png</pre> | <pre>http://url.for/some/image.png</pre> | ||
− | |||
[[Category:Help|Images]] | [[Category:Help|Images]] | ||
+ | [[Category: Wiki information]] |