Difference between revisions of "Template:nbsp"
m (-named param - be {1}.) |
m (Protected "Template:nbsp": Excessive vandalism ([Edit=Allow only administrators] (indefinite) [Move=Allow only administrators] (indefinite))) |
||
(13 intermediate revisions by 10 users not shown) | |||
Line 1: | Line 1: | ||
− | <includeonly>{{# | + | <includeonly>{{padright: |{{#expr: 6*{{{1|1}}}}}| }}</includeonly><noinclude>{{documentation|Template:space/doc}}</noinclude> |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + |
Latest revision as of 11:00, 30 September 2023
This high-risk template has been protected from editing to prevent vandalism. Please discuss any changes on the talk page. |
Handles space characters.
{{space|number}} - outputs number of space characters
{{space as|text}} - outputs as many space characters as there are characters in text. Useful for indentation of templatized code.
{{trim|text}} - trims both leading and trailing whitespace
{{sep}} - inserts a tiny non-breaking space between characters to avoid overlapping of e.g. italicized characters. Example: II vs I I.
{{nbsp|number (optional)}} - inserts number of non-breaking space characters (HTML: ). Without the argument inserts one such space.
{{nbspt|number (optional)}} - same space characters generator as {{nbsp}} but in monospace
(teletype
) font.
{{void}} - as-if inserts an empty space which might be necessary to prevent HTML generation when wiki-media processor should act. One example is foo<Ref> in which the <Ref> part provokes an HTML engine to generate a references list. To suppress that, this code could be written as {{c|foo<{{void}}Ref>}}
.
{{br}} - behaves similar to <br> HTML tag, except that the wrap occurs only if the string does not fit as one line in an enclosing box. Useful in tables to optionally split long identifiers.
Example. Let the identifier __cpp_lib_allocator_traits_is_always_equal
be tagged as
-
{{tt|__cpp_lib_allocator_}}{{br}}{{tt|traits_is_always_equal}}
.
Then the rendering of the boxes containing it may result in:
__cpp_lib_allocator_ traits_is_always_equal
|
__cpp_lib_allocator_ traits_is_always_equal
|
The above documentation is transcluded from Template:space/doc. (edit | history) Subpages of this template. |