Difference between revisions of "Template:Example/doc"
From EVE University Wiki
(Created page with "<noinclude>{{main|Template:Example}}</noinclude> As the name suggests, this template produces a colored box, which is used when you want to give an example on a page. You can ...") |
m (Add the actual syntax.) |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | + | ; Description | |
− | As the name suggests, this template produces a colored box, which is used when you want to give an example on a page. You can use common wiki-formatting ( | + | : As the name suggests, this template produces a colored box, which is used when you want to give an example on a page. You can use common wiki-formatting (e.g. bold, links) if you wish. The formatting of this template is kept subtle on purpose, so as not to interfere too much with the general flow of a page (if you want a stronger emphasis for your text, you can use <code>{{Tl|Note box}}</code> or even <code>{{Tl|Important note box}}</code>). |
− | + | ; Dependencies | |
+ | :; Uses | ||
+ | :: {{T|Color box}} | ||
− | === | + | ; Syntax |
+ | : {{T|Example|content|3= width= width}} | ||
+ | :; Parameters | ||
+ | ::; content : The note text inside the box. All wiki-formatting (bold, text color, links, etc) work as normal. If the text you would like to use include an equals sign (<code>=</code>), you need to explicitly declare your text as a numbered parameter (i.e. put <code>1=</code> before your text), otherwise the template will display nothing. | ||
+ | ::; width : Sets the width of the box. It's recommended to set this as a percentage (of the paragraph width), so <code>50%</code> will produce a text box half as wide as the surrounding paragraph. If omitted, the text box will be as wide as the surrounding paragraph. When width is set to less than <code>100%</code>, the box will be centered. | ||
− | + | ; Examples | |
− | {{ | + | {{Code|<nowiki>{{Example|An example to ''illustrate'' my article with a link to the [[Venture]].}}</nowiki>}} gives ... |
+ | {{Example|An example to ''illustrate'' my article with a link to the [[Venture]].}} | ||
− | |||
− | |||
− | + | {{Code|<nowiki>{{Example|How not to put the formula 2+2=4 into an example.}}</nowiki>}} gives ... | |
− | {{ | + | {{Example|How not to put the formula 2+2=4 into an example.}} |
− | |||
− | |||
− | |||
− | <includeonly>[[Category: | + | {{Code|<nowiki>{{Example|1= How to put the formula 2+2=4 into an example.}}</nowiki>}} gives ... |
+ | {{Example|1= How to put the formula 2+2=4 into an example.}} | ||
+ | |||
+ | |||
+ | ; See also | ||
+ | * {{T|Note box}} and {{T|Important note box}} , designed for general notes and warnings on pages. | ||
+ | * {{T|Color box}} , the general template for creating colored boxes with text in them. | ||
+ | |||
+ | <includeonly>[[Category:Formatting templates]]</includeonly> | ||
<noinclude>[[Category:Template documentation]]</noinclude> | <noinclude>[[Category:Template documentation]]</noinclude> |
Latest revision as of 12:24, 14 March 2024
- Description
- As the name suggests, this template produces a colored box, which is used when you want to give an example on a page. You can use common wiki-formatting (e.g. bold, links) if you wish. The formatting of this template is kept subtle on purpose, so as not to interfere too much with the general flow of a page (if you want a stronger emphasis for your text, you can use
or even{{Note box}}
).{{Important note box}}
- Dependencies
-
- Uses
- {{Color box}}
- Syntax
- {{Example|<content>|<width= width>}}
- Parameters
-
- content
- The note text inside the box. All wiki-formatting (bold, text color, links, etc) work as normal. If the text you would like to use include an equals sign (
=
), you need to explicitly declare your text as a numbered parameter (i.e. put1=
before your text), otherwise the template will display nothing. - width
- Sets the width of the box. It's recommended to set this as a percentage (of the paragraph width), so
50%
will produce a text box half as wide as the surrounding paragraph. If omitted, the text box will be as wide as the surrounding paragraph. When width is set to less than100%
, the box will be centered.
- Examples
{{Example|An example to ''illustrate'' my article with a link to the [[Venture]].}} |
gives ...
{{Example|How not to put the formula 2+2=4 into an example.}} |
gives ...
{{Example|1= How to put the formula 2+2=4 into an example.}} |
gives ...
- See also
- {{Note box}} and {{Important note box}} , designed for general notes and warnings on pages.
- {{Color box}} , the general template for creating colored boxes with text in them.