Template:Escape template list/doc: Difference between revisions
ArrowHead294 (talk | contribs) mNo edit summary |
ArrowHead294 (talk | contribs) m →Usage |
||
Line 31: | Line 31: | ||
{{tlx|!|plaincode}} Example 7 {{tlx|!!|plaincode}} Example 8 | {{tlx|!|plaincode}} Example 7 {{tlx|!!|plaincode}} Example 8 | ||
{{tlx|!)|plaincode}} | {{tlx|!)|plaincode}} | ||
|} | |}</nowiki> | ||
</pre> | </pre> | ||
Revision as of 00:39, 26 January 2025
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.
For example, to include a table within another table:
{| 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{{!)}}
|}</nowiki>
gives:
Header text | Header text | ||||||
---|---|---|---|---|---|---|---|
Example 1 | Example 2 | ||||||
Example 3 | Example 4 | ||||||
|