Template:Space

विकिपिडिया नं
Jump to navigation Jump to search

 

Documentation icon Template documentation[view] [edit] [history] [purge]

Purpose[सम्पादन]

This template inserts the specified number of non-breaking spaces (1 to 30) passed in parameter 1, as a string of " " characters repeated.

Usage[सम्पादन]

Using {{space}} (shortcut redirect: {{s}} ) can be used inline to create alignment between adjacent text lines, or to space out titles, etc. Like {{indent}}, it takes a numeric argument nn (up to 30) after the pipe and provides that many consecutive spaces. Indent differs only in that it automatically begins a newline, then spaces over nn spaces.

Examples[सम्पादन]

{{space|7}}, {{indent|2}}, etc.

The templates {{space}} and {{indent}} are limited to adding 30 spaces, and have a cost in pre-expansion template size, because their logic contains 30 sets of the counted spaces.

Better results, for indenting large sections, can frequently be gained by using template {{nowrap}} aka {{j}} to join text which should not wrap. Inserting leading white-space can also be denoted by using the HTML formatting <div style="margin-left: XXem;">...</div>, where "XX" is a numeric em value. Since browser design philosophy is to trim consecutive spaces, check the results also in different zoom settings, and on more than one browser if possible. One type is the Internet Explorer browser family.

History[सम्पादन]

Formerly, for six years, this template inserted strings of em-spaces or alternating non-breaking spaces "&nbsp;" mixed with regular spaces " ". However, it was changed on 17 October 2011, to insert only continuous strings of non-breaking spaces, as in "&nbsp;&nbsp;&nbsp;&nbsp;...". To insert a single wrappable (breaking) space, put "&#32;" or use the template {{sp}}. To insert multiple wrapping spaces, use the interwiki template {{in5|17}}, to put 17 spaces which can wrap on narrowed windows.

See also[सम्पादन]

  • {{Sp}} – produces a single (breakable) space, for use in template substitution
  • {{Pad}} – to indent a single line
  • {{in5}} – to insert 1–50 wrappable spaces, to auto-reduce the spacing on narrowed windows