Template:Escape template list: Difference between revisions
ArrowHead294 (talk | contribs) mNo edit summary |
ArrowHead294 (talk | contribs) mNo edit summary |
||
(65 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
{| class="wikitable" style="text-align: center; <noinclude>margin: auto auto auto auto;</noinclude>" | |||
{| class="wikitable" style="text-align: center;" | |||
<includeonly> | <includeonly> | ||
|+ style="font-size: 105%;" | |+ style="font-size: 105%;" | Template calls for escaping characters | ||
</includeonly> | </includeonly> | ||
|- style="white-space: nowrap;" | |||
! Template call<includeonly>*</includeonly> !! Output<includeonly>**</includeonly> !! HTML alternative<includeonly>***</includeonly> | |||
|- | |- | ||
| {{tlx|!|plaincode}} '''(m)''' || <nowiki>|</nowiki> || {{plaincode|&#124;}} or {{tlx|pipe|plaincode}} | |||
|- | |- | ||
| | | {{tlx|{{=}}|plaincode}} '''(m)''' || <nowiki>=</nowiki> || {{plaincode|&#61;}} | ||
|- | |- | ||
| | | {{tlx|!!|plaincode}} || <nowiki>||</nowiki> || {{plaincode|&#124;&#124;}} | ||
|- | |- | ||
| {{tlx|! | | {{tlx|!(|plaincode}} || <nowiki>[</nowiki> || {{plaincode|&#91;}} or {{tlx|lbrack|plaincode}} | ||
|- | |- | ||
| {{tlx|! | | {{tlx|)!|plaincode}} || <nowiki>]</nowiki> || {{plaincode|&#93;}} or {{tlx|rbrack|plaincode}} | ||
|- | |- | ||
| {{tlx| | | {{tlx|!((|plaincode}} || <nowiki>[[</nowiki> || {{plaincode|&#91;&#91;}} | ||
|- | |- | ||
| {{tlx|! | | {{tlx|))!|plaincode}} || <nowiki>]]</nowiki> || {{plaincode|&#93;&#93;}} | ||
|- | |- | ||
| {{tlx| | | {{tlx|(|plaincode}} || <nowiki>{</nowiki> || {{plaincode|&#123;}} | ||
|- | |- | ||
| {{tlx| | | {{tlx|)|plaincode}} || <nowiki>}</nowiki> || {{plaincode|&#125;}} | ||
|- | |- | ||
| {{tlx| | | {{tlx|((|plaincode}} || <nowiki>{{</nowiki> || {{plaincode|&#123;&#123;}} | ||
|- | |- | ||
| {{tlx| | | {{tlx|))|plaincode}} || <nowiki>}}</nowiki> || {{plaincode|&#125;&#125;}} | ||
|- | |- | ||
| {{tlx| | | {{tlx|(((|plaincode}} || <nowiki>{{{</nowiki> || {{plaincode|&#123;&#123;&#123;}} | ||
|- | |- | ||
| {{tlx| | | {{tlx|)))|plaincode}} || <nowiki>}}}</nowiki> || {{plaincode|&#125;&#125;&#125;}} | ||
|- | |- | ||
| {{tlx| | | {{tlx|(!|plaincode}} || <nowiki>{|</nowiki> || {{plaincode|&#123;&#124;}} | ||
|- | |- | ||
| {{tlx| | | {{tlx|!+|plaincode}} || <nowiki>|+</nowiki> || {{plaincode|&#124;&#43;}} | ||
|- | |- | ||
| {{tlx|! | | {{tlx|!-|plaincode}} || <nowiki>|-</nowiki> || {{plaincode|&#124;&#45;}} | ||
|- | |- | ||
| {{tlx|! | | {{tlx|!)|plaincode}} || <nowiki>|}</nowiki> || {{plaincode|&#124;&#125;}} | ||
|- | |- | ||
| {{tlx| | | {{tlx|'|plaincode}} || ' || {{plaincode|&#39;}} | ||
|- | |- | ||
| {{tlx| | | {{tlx|colon|plaincode}} || <nowiki>:</nowiki> || {{plaincode|&#58;}} | ||
|- | |- | ||
| {{tlx| | | {{tlx|^(|plaincode}} || < || {{plaincode|&#60;}} or {{plaincode|&lt;}} | ||
|- | |- | ||
| {{tlx|^ | | {{tlx|)^|plaincode}} || > || {{plaincode|&#62;}} or {{plaincode|&gt;}} | ||
|- | |- | ||
| {{tlx| | | {{tlx|**|plaincode}} || <nowiki>*</nowiki> || {{plaincode|&#42;}} | ||
<includeonly> | <includeonly> | ||
| | {{Navbar table|cols=3|Template:Escape template list}} | ||
| | </includeonly> | ||
|} | |||
<includeonly> | |||
<nowiki />* '''m''' for [[mw:Help:Magic words|magic word]] | |||
<nowiki />** Delayed interpretation as Wiki markup | |||
<nowiki />*** Never interpreted as Wiki markup | |||
</includeonly> | </includeonly><noinclude> | ||
{{documentation}} | |||
{{ | |||
[[Category:Character templates]] | [[Category:Character templates]] | ||
[[Category:Tables]] | |||
</noinclude> | </noinclude> |
Latest revision as of 13:52, 7 May 2025
Template call | Output | HTML alternative |
---|---|---|
{{!}} (m) |
| | | or {{pipe}}
|
{{=}} (m) |
= | =
|
{{!!}} |
|| | ||
|
{{!(}} |
[ | [ or {{lbrack}}
|
{{)!}} |
] | ] or {{rbrack}}
|
{{!((}} |
[[ | [[
|
{{))!}} |
]] | ]]
|
{{(}} |
{ | {
|
{{)}} |
} | }
|
{{((}} |
{{ | {{
|
{{))}} |
}} | }}
|
{{(((}} |
{{{ | {{{
|
{{)))}} |
}}} | }}}
|
{{(!}} |
{| | {|
|
{{!+}} |
|+ | |+
|
{{!-}} |
|- | |-
|
{{!)}} |
|} | |}
|
{{'}} |
' | '
|
{{colon}} |
: | :
|
{{^(}} |
< | < or <
|
{{)^}} |
> | > or >
|
{{**}} |
* | *
|
Certain characters and character sequences have special meanings in Wiki markup. Sometimes, they need to be escaped, and these templates are used to do so.
Escaping these characters using templates simply delays their interpretation as Wiki markup, but if you type them using HTML entities or wrap them in <nowiki>
tags, they will never be interpreted as markup.
Note: These escape templates should only be used when absolutely necessary, as overuse of such templates can make pages hard to read and edit in the source editor.
Usage
These templates are used to escape special character sequences, so that they are interpreted later than they would otherwise be. They are most useful when trying to include tables within other tables or templates.
The following example shows an instance of including a Wikitable within another Wikitable. This markup:
{| class="wikitable" style="text-align: center;" |+ style="font-size: 105%;" | Caption text |- ! Header text !! Header text |- | Example 1 || Example 2 |- | Example 3 || Example 4 |- | colspan="2" |{{(!}}
class{{=}}
"wikitable" style{{=}}
"text-align: center;"{{!+}}
style{{=}}
"font-size: 105%;"{{!}}
Caption text{{!-}}
! Header text !! Header text{{!-}}
{{!}}
Example 5{{!!}}
Example 6{{!-}}
{{!}}
Example 7{{!!}}
Example 8{{!)}}
|}
gives:
Header text | Header text | ||||||
---|---|---|---|---|---|---|---|
Example 1 | Example 2 | ||||||
Example 3 | Example 4 | ||||||
|