|
|
Line 29: |
Line 29: |
| '''''<translate><!--T:15--> bold & italic</translate>''''' | | '''''<translate><!--T:15--> bold & italic</translate>''''' |
| |- style="visibility: collapse;" | | |- style="visibility: collapse;" |
| | colspan="3" | {{Anchor|nowiki|<nowiki>|.3Cnowiki.3E}} | | | colspan="3" | |
| |- | | |- |
| | <translate><!--T:19--> Escape wiki markup</translate> | | | <translate><!--T:19--> Escape wiki markup</translate> |
| | {{#tag:syntaxhighlight|
| |
| <!-- This can't use <syntaxhighlight><nowiki>, as that breaks the <translate> tag -->
| |
| {{^(}}nowiki{{)^}}<translate nowrap><!--T:20--> no [[wiki]] ''markup''</translate>{{^(}}/nowiki{{)^}}
| |
| | lang = "html"
| |
| }}
| |
| | | | | |
| <translate><!--T:155--> <nowiki>no [[wiki]] ''markup''</nowiki></translate> | | <translate><!--T:155--> <nowiki>no [[wiki]] ''markup''</nowiki></translate> |
Line 57: |
Line 52: |
| </pre> | | </pre> |
| ---- | | ---- |
| {{note|1=<nowiki/>
| |
| * <translate><!--T:31--> [[<tvar name=lv1>Special:MyLanguage/Help_talk:Formatting#Level_1</tvar>|Skip Level 1]], it is page name level.</translate>
| |
| * <translate><!--T:32--> Do not put any text on the same line after the ending equal signs.</translate>
| |
| * <translate><!--T:33--> An article with 4 or more headings automatically creates a [[wikipedia:Help:Section#Table of contents (TOC)|table of contents]] (unless setting the magic word <tvar name=1><code><nowiki>__NOTOC__</nowiki></code></tvar>).</translate>
| |
| }}
| |
| | | | | |
| <!-- using HTML markup to avoid creating new sections --> | | <!-- using HTML markup to avoid creating new sections --> |
Line 208: |
Line 198: |
| </translate> | | </translate> |
| </pre> | | </pre> |
| {{note|1=<translate><!--T:176--> At the end of the line, if the line begins with a semicolon (;), any inserted colon (:) will not be displayed.</translate> <translate><!--T:177--> If you want for the colon to be displayed, escape it by writing <tvar name=1><code>&#58;</code></tvar>.</translate>}}
| |
| | | | | |
| <translate> | | <translate> |
Line 229: |
Line 218: |
| </pre> | | </pre> |
| ---- | | ---- |
| {{Note|1=<translate><!--T:58--> This workaround may harm accessibility.</translate>}}
| |
| | | | | |
| <translate> | | <translate> |
Line 261: |
Line 249: |
| </syntaxhighlight> | | </syntaxhighlight> |
| ---- | | ---- |
| {{note|1=<translate><!--T:62--> The usage of <tvar name=1><code>#:</code></tvar> and <tvar name=2><code>*:</code></tvar> for breaking a line within an item may also harm accessibility.</translate>}}
| |
| | | | | |
| <translate> | | <translate> |
Line 290: |
Line 277: |
| </pre> | | </pre> |
| ---- | | ---- |
| {{note|1=<translate><!--T:66--> This way of preformatting only applies to section formatting. Character formatting markups are still effective.</translate>}}
| |
| | | | | |
| <translate><!--T:67--> Start each line with a space.</translate> | | <translate><!--T:67--> Start each line with a space.</translate> |
| <translate><!--T:181--> Text is '''preformatted''' and</translate> | | <translate><!--T:181--> Text is '''preformatted''' and</translate> |
| <translate><!--T:182--> ''markups'' '''''can''''' be done.</translate> | | <translate><!--T:182--> ''markups'' '''''can''''' be done.</translate> |
| |-
| |
| | <translate><!--T:68--> Preformatted text blocks</translate>
| |
| | <pre> <nowiki><translate nowrap><!--T:69-->
| |
| Start with a space in the first column,
| |
| (before the <tvar name=1><nowiki></tvar>).
| |
|
| |
| <!--T:70-->
| |
| Then your block format will be
| |
| maintained.
| |
|
| |
| <!--T:170-->
| |
| This is good for copying in code blocks:
| |
| </translate>
| |
|
| |
| def function():
| |
| """<translate nowrap><!--T:171--> documentation string</translate>"""
| |
|
| |
| if True:
| |
| print True
| |
| else:
| |
| print False</nowiki>
| |
| </pre>
| |
| |
| |
| {{#tag:nowiki|<translate nowrap><!--T:73-->
| |
| Start with a space in the first column,
| |
| (before the <nowiki>).
| |
|
| |
| <!--T:74-->
| |
| Then your block format will be
| |
| maintained.
| |
|
| |
| <!--T:75-->
| |
| This is good for copying in code blocks:
| |
| </translate>
| |
|
| |
| def function():
| |
| """<translate nowrap><!--T:172--> documentation string</translate>"""
| |
|
| |
| if True:
| |
| print True
| |
| else:
| |
| print False
| |
| }}
| |
| |} | | |} |
|
| |
|
Line 344: |
Line 287: |
|
| |
|
| <!--T:79--> | | <!--T:79--> |
| MediaWiki ignores single line breaks. To start a new paragraph, leave an empty line. You can force a line break within a paragraph with the HTML tag <tvar name=1>{{tag|br|single}}</tvar>. | | MediaWiki ignores single line breaks. To start a new paragraph, leave an empty line. You can force a line break within a paragraph with the HTML tag <nowiki><br /></nowiki>. |
| </translate> | | </translate> |
|
| |
|