Template:Escape template list: Difference between revisions
ArrowHead294 (talk | contribs) mNo edit summary |
ArrowHead294 (talk | contribs) mNo edit summary |
||
(5 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
{| class="wikitable" style="text-align: center;" | {| class="wikitable" style="text-align: center; <noinclude>margin: auto auto auto auto;</noinclude>" | ||
<includeonly> | <includeonly> | ||
|+ style="font-size: 105%;" | Template calls for escaping characters | |+ style="font-size: 105%;" | Template calls for escaping characters | ||
Line 6: | Line 6: | ||
! Template call<includeonly>*</includeonly> !! Output<includeonly>**</includeonly> !! HTML alternative<includeonly>***</includeonly> | ! Template call<includeonly>*</includeonly> !! Output<includeonly>**</includeonly> !! HTML alternative<includeonly>***</includeonly> | ||
|- | |- | ||
| {{tlx|!|plaincode}} '''(m)''' || | | {{tlx|!|plaincode}} '''(m)''' || <nowiki>|</nowiki> || {{plaincode|&#124;}} or {{tlx|pipe|plaincode}} | ||
|- | |- | ||
| {{tlx|{{=}}|plaincode}} || | | {{tlx|{{=}}|plaincode}} '''(m)''' || <nowiki>=</nowiki> || {{plaincode|&#61;}} | ||
|- | |- | ||
| {{tlx|!!|plaincode}} || | | {{tlx|!!|plaincode}} || <nowiki>||</nowiki> || {{plaincode|&#124;&#124;}} | ||
|- | |- | ||
| {{tlx|!(|plaincode}} || | | {{tlx|!(|plaincode}} || <nowiki>[</nowiki> || {{plaincode|&#91;}} or {{tlx|lbrack|plaincode}} | ||
|- | |- | ||
| {{tlx|)!|plaincode}} || | | {{tlx|)!|plaincode}} || <nowiki>]</nowiki> || {{plaincode|&#93;}} or {{tlx|rbrack|plaincode}} | ||
|- | |- | ||
| {{tlx|!((|plaincode}} || | | {{tlx|!((|plaincode}} || <nowiki>[[</nowiki> || {{plaincode|&#91;&#91;}} | ||
|- | |- | ||
| {{tlx|))!|plaincode}} || | | {{tlx|))!|plaincode}} || <nowiki>]]</nowiki> || {{plaincode|&#93;&#93;}} | ||
|- | |- | ||
| {{tlx|(|plaincode}} || | | {{tlx|(|plaincode}} || <nowiki>{</nowiki> || {{plaincode|&#123;}} | ||
|- | |- | ||
| {{tlx|)|plaincode}} || | | {{tlx|)|plaincode}} || <nowiki>}</nowiki> || {{plaincode|&#125;}} | ||
|- | |- | ||
| {{tlx|((|plaincode}} || | | {{tlx|((|plaincode}} || <nowiki>{{</nowiki> || {{plaincode|&#123;&#123;}} | ||
|- | |- | ||
| {{tlx|))|plaincode}} || | | {{tlx|))|plaincode}} || <nowiki>}}</nowiki> || {{plaincode|&#125;&#125;}} | ||
|- | |- | ||
| {{tlx|(((|plaincode}} || | | {{tlx|(((|plaincode}} || <nowiki>{{{</nowiki> || {{plaincode|&#123;&#123;&#123;}} | ||
|- | |- | ||
| {{tlx|)))|plaincode}} || | | {{tlx|)))|plaincode}} || <nowiki>}}}</nowiki> || {{plaincode|&#125;&#125;&#125;}} | ||
|- | |- | ||
| {{tlx|(!|plaincode}} || | | {{tlx|(!|plaincode}} || <nowiki>{|</nowiki> || {{plaincode|&#123;&#124;}} | ||
|- | |- | ||
| {{tlx|!+|plaincode}} || | | {{tlx|!+|plaincode}} || <nowiki>|+</nowiki> || {{plaincode|&#124;&#43;}} | ||
|- | |- | ||
| {{tlx|!-|plaincode}} || | | {{tlx|!-|plaincode}} || <nowiki>|-</nowiki> || {{plaincode|&#124;&#45;}} | ||
|- | |- | ||
| {{tlx|!)|plaincode}} || | | {{tlx|!)|plaincode}} || <nowiki>|}</nowiki> || {{plaincode|&#124;&#125;}} | ||
|- | |- | ||
| {{tlx|'|plaincode}} || ' || {{plaincode|&#39;}} | | {{tlx|'|plaincode}} || ' || {{plaincode|&#39;}} | ||
|- | |- | ||
| {{tlx|colon|plaincode}} || <nowiki>:</nowiki> || {{plaincode|&#58;}} | |||
| {{tlx|colon|plaincode}} || | |||
|- | |- | ||
| {{tlx|^(|plaincode}} || < || {{plaincode|&#60;}} or {{plaincode|&lt;}} | | {{tlx|^(|plaincode}} || < || {{plaincode|&#60;}} or {{plaincode|&lt;}} | ||
Line 52: | Line 48: | ||
| {{tlx|)^|plaincode}} || > || {{plaincode|&#62;}} or {{plaincode|&gt;}} | | {{tlx|)^|plaincode}} || > || {{plaincode|&#62;}} or {{plaincode|&gt;}} | ||
|- | |- | ||
| {{tlx|**|plaincode}} || | | {{tlx|**|plaincode}} || <nowiki>*</nowiki> || {{plaincode|&#42;}} | ||
<includeonly> | <includeonly> | ||
{{Navbar table|cols=3|Template:Escape template list}} | {{Navbar table|cols=3|Template:Escape template list}} |
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 | ||||||
|