Template:Escape template list/doc: Difference between revisions

ArrowHead294 (talk | contribs)
mNo edit summary
ArrowHead294 (talk | contribs)
mNo edit summary
 
(9 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{docheadwiki}}
{{dochead}}{{wikipedia}}
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 <code>&lt;nowiki&gt;</code> 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 ===
=== 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.
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:
The following example shows an instance of including a Wikitable within another Wikitable. This markup:


<pre>
<pre<includeonly />>
{| class="wikitable" style="text-align: center;"
<nowiki>{| class="wikitable" style="text-align: center;"
|+ style="font-size: 105%;" | Caption text
|+ style="font-size: 105%;" | Caption text
|-
|-
Line 16: Line 21:
| Example 3 || Example 4
| Example 3 || Example 4
|-
|-
| colspan="2" |
| colspan="2" | </nowiki>{{tlx|(!|plaincode}} class{{tlx|{{=}}|plaincode}}"wikitable" style{{tlx|{{=}}|plaincode}}"text-align: center;"
{{(!}} class{{=}}"wikitable" style{{=}}"text-align: center;"
{{tlx|!+|plaincode}} style{{tlx|{{=}}|plaincode}}"font-size: 105%;" {{tlx|!|plaincode}} Caption text
{{!+}} style="font-size: 105%;" {{!}} Caption text
{{tlx|!-|plaincode}}
{{!-}}
! Header text !! Header text
! Header text !! Header text
{{!-}}
{{tlx|!-|plaincode}}
{{!}} Example 5 {{!!}} Example 6
{{tlx|!|plaincode}} Example 5 {{tlx|!!|plaincode}} Example 6
{{!-}}
{{tlx|!-|plaincode}}
{{!}} Example 7 {{!!}} Example 8
{{tlx|!|plaincode}} Example 7 {{tlx|!!|plaincode}} Example 8
{{!)}}
{{tlx|!)|plaincode}}
|}
<nowiki>|}</nowiki>
</pre>
</pre>


Line 40: Line 44:
| Example 3 || Example 4
| Example 3 || Example 4
|-
|-
| colspan="2" |
| colspan="2" | {{(!}} class{{=}}"wikitable" style{{=}}"text-align: center;"
{{(!}} class{{=}}"wikitable" style{{=}}"text-align: center;"
{{!+}} style{{=}}"font-size: 105%;" {{!}} Caption text
{{!+}} style="font-size: 105%;" {{!}} Caption text
{{!-}}
{{!-}}
! Header text !! Header text
! Header text !! Header text