Difference between revisions of "Template:Indent/doc"
imported>Wikid77 (restored text about Template:In in same universal family) |
imported>Plastikspork |
||
| Line 1: | Line 1: | ||
{{Documentation subpage}} | {{Documentation subpage}} | ||
<!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE --> | <!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE --> | ||
| − | The indenter [[Template:indent]] performs a newline and indents by a specified number of spaces. However, the spaces are not all the same size, but rather a mixture of [[en]]-size & [[em]]-size spaces that have been tested to work on a wide range of browsers. | + | The indenter [[Template:indent]] performs a newline and indents by a specified number of spaces. However, the spaces are not all the same size, but rather a mixture of [[en]]-size & [[em]]-size spaces that have been tested to work on a wide range of browsers. |
__TOC__ | __TOC__ | ||
| Line 8: | Line 8: | ||
'''Usage:''' <nowiki>{{</nowiki>indent|''# of spaces''}} | '''Usage:''' <nowiki>{{</nowiki>indent|''# of spaces''}} | ||
| − | * Indents up to 30 spaces. | + | * Indents up to 30 spaces. |
* Indent differs from {{tl|space}} only in that it automatically begins a wrapped-newline, then spaces over ''n'' spaces, whereas {{tl|space}} spaces over ''n'' in the same (current) line. | * Indent differs from {{tl|space}} only in that it automatically begins a wrapped-newline, then spaces over ''n'' spaces, whereas {{tl|space}} spaces over ''n'' in the same (current) line. | ||
| Line 40: | Line 40: | ||
Note that if the prior line is already colon-shifted text, then using "{{tl2|indent|5}}" generates a blank line first, so instead, use "{{tl2|space|5}}" (or such) after a colon-shifted line. | Note that if the prior line is already colon-shifted text, then using "{{tl2|indent|5}}" generates a blank line first, so instead, use "{{tl2|space|5}}" (or such) after a colon-shifted line. | ||
| − | |||
| − | |||
| − | |||
==History== | ==History== | ||
| Line 51: | Line 48: | ||
* {{tl|space}} - skips similar spacing mix of en-size & em-size spaces. | * {{tl|space}} - skips similar spacing mix of en-size & em-size spaces. | ||
* {{tl|spaces}} - uses non-breaking spaces. | * {{tl|spaces}} - uses non-breaking spaces. | ||
| − | |||
<includeonly><!-- CATEGORIES AND INTERWIKIS HERE, THANKS --> | <includeonly><!-- CATEGORIES AND INTERWIKIS HERE, THANKS --> | ||
Revision as of 16:51, 5 September 2009
| File:Edit-copy green.svg | This is a documentation subpage for Template:Indent. It contains usage information, categories and other content that is not part of the original template page. |
The indenter Template:indent performs a newline and indents by a specified number of spaces. However, the spaces are not all the same size, but rather a mixture of en-size & em-size spaces that have been tested to work on a wide range of browsers.
Contents
Usage
The indentation spacing generated by Template:indent will match the alignment of a colon-shift (":") by using {{indent|5}}, or to match "::" then align by {{indent|10}}.
Usage: {{indent|# of spaces}}
- Indents up to 30 spaces.
- Indent differs from {{space}} only in that it automatically begins a wrapped-newline, then spaces over n spaces, whereas {{space}} spaces over n in the same (current) line.
Examples
The following are detailed examples, also comparing to the equivalent indentation generated if a colon-shift ":" were used instead.
Example 1 - Indenting by 5:
Some text.{{indent|5}}Some more text.
Results:
Some text.
Some more text.
Example 2 - Alignment with ":" or "::" indentations:
: Line of colon-shifted text.
{{indent|5}}Line of indent-5-shifted text.
<br> Line of br-6-nbsp-shifted text.
<br> Line of br-5-nbsp-shifted text.
<br> Line of br-5-nbsp-true-shifted text.
:: Line of 2-colon-shifted text.
{{space|10}}Line of space-10-shifted text.
Results:
- Line of colon-shifted text.
Line of indent-5-shifted text.
Line of br-6-nbsp-shifted text.
Line of br-5-nbsp-shifted text.
Line of br-5-nbsp-true-shifted text.
- Line of 2-colon-shifted text.
Template:SpaceLine of space-10-shifted text.
Note that if the prior line is already colon-shifted text, then using "{{indent|5}}" generates a blank line first, so instead, use "{{space|5}}" (or such) after a colon-shifted line.
History
This template originated on the sister project Wikisource—(home page)
- —and was subsequently ported to English Wikipedia at 21:27, 26 May 2006 (UTC).
See also
- {{space}} - skips similar spacing mix of en-size & em-size spaces.
- {{spaces}} - uses non-breaking spaces.