User Tools

Site Tools


computing:wikisyntax

This is an old revision of the document!


<languages /> pd_help_page <translate> <!–T:1–> You can format your text by using wiki markup. This consists of normal characters like asterisks, apostrophes or equal signs which have a special function in the wiki, sometimes depending on their position. For example, to format a word in italic, you include it in two pairs of apostrophes like

<nowiki>''this''</nowiki>

.

== Text formatting markup == <!–T:2–> </translate> {| class=“wikitable” ! <translate><!–T:3–> Description</translate> ! width=40% | <translate><!–T:4–> You type</translate> ! width=40% | <translate><!–T:5–> You get</translate>

! colspan=“3” style=“background: #ABE” | <translate><!–T:6–> Character (inline) formatting – applies anywhere</translate>

<translate><!–T:8–> italic</translate> </pre>

<translate><!–T:9–> italic</translate>

'<translate><!–T:11–> bold</translate>' </pre>

'<translate><!–T:12–> bold</translate>'

'<translate><!–T:14–> bold & italic</translate>' </pre>

'<translate><!–T:15–> bold & italic</translate>'

&lt;nowiki&gt;<translate><!–T:20–> no markup</translate>&lt;/nowiki&gt; </pre>

<translate><!–T:155–> no ''markup''</translate>

! colspan=“3” style=“background: #ABE” | <translate><!–T:24–> Section formatting – only at the beginning of the line</translate>

<translate> == Level 2 == <!–T:26–>

=== Level 3 === <!–T:27–>

==== Level 4 ==== <!–T:28–>

===== Level 5 ===== <!–T:29–>

====== Level 6 ====== <!–T:30–> </translate> </pre>


1=<nowiki/> * <translate><!--T:31--> [[<tvar|lv1>Special:MyLanguage/Help_talk:Formatting#Level_1</>|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<nowiki>__NOTOC__</nowiki>).</translate>

<!– using HTML markup to avoid creating new sections –> <translate> <!–T:35–> <h2>Level 2</h2>

<!–T:36–> <h3>Level 3</h3>

<!–T:37–> <h4>Level 4</h4>

<!–T:38–> <h5>Level 5</h5>

<!–T:39–> <h6>Level 6</h6> </translate>

<translate><!–T:41–> Text before</translate>


<translate><!–T:42–> Text after</translate> </pre>

<translate><!–T:43–> Text before</translate>


<translate><!–T:44–> Text after</translate>

<pre> <translate> <!–T:46–> * Start each line * with an asterisk (*). More asterisks give deeper * and deeper levels. * Line breaks <br />don't break levels. * But jumping levels creates empty space. Any other start ends the list. <!–T:160–> * combine bullet list with definition ::- definition creates empty space <!–T:161–> * combine bullet list with definition *:- definition without empty spaces <!–T:162–> *bullet list :- definition :* sublist that doesn't create empty :* spaces after definition </translate> </pre> | <translate> <!–T:47–> * Start each line * with an asterisk (*). More asterisks give deeper * and deeper levels. * Line breaks <br />don't break levels. * But jumping levels creates empty space. Any other start ends the list.

<!–T:163–> * combine bullet list with definition ::- definition creates empty space

<!–T:164–> * combine bullet list with definition *:- definition without empty spaces

<!–T:165–> *bullet list :- definition :* sublist that doesn't create empty :* spaces after definition </translate>

<pre> <translate> <!–T:49–> # Start each line # with a number sign (#). ## More number signs give deeper ### and deeper ### levels. # Line breaks <br />don't break levels. ### But jumping levels creates empty space. # Blank lines

<!–T:50–> # end the list and start another. Any other start also ends the list. </translate> </pre>

<translate> <!–T:51–> # Start each line # with a number sign (#). ## More number signs give deeper ### and deeper ### levels. # Line breaks <br />don't break levels. ### But jumping levels creates empty space. # Blank lines

<!–T:52–> # end the list and start another. Any other start also ends the list. </translate>

<translate> <!–T:54–> ;item 1 : definition 1 ;item 2 : definition 2-1 : definition 2-2 </translate> </pre>

<translate> <!–T:55–> ;item 1 : definition 1 ;item 2 : definition 2-1 : definition 2-2 </translate>

<translate> <!–T:57–> : Single indent :: Double indent ::::: Multiple indent </translate> </pre>


1=<translate><!--T:58--> This workaround may harm accessibility.</translate>

<translate> <!–T:59–> : Single indent :: Double indent ::::: Multiple indent </translate>

<pre> <translate> <!–T:61–> # one # two #* two point one #* two point two # three #; three item one #: three def one # four #: four def one #: this looks like a continuation #: and is often used #: instead <br />of &lt;nowiki><br />&lt;/nowiki> # five ## five sub 1 ### five sub 1 sub 1 ## five sub 2 </translate> </pre>


1=<translate><!--T:62--> The usage of <code>#:</code> and <code>*:</code> for breaking a line within an item may also harm accessibility.</translate>

<translate> <!–T:63–> # one # two #* two point one #* two point two # three #; three item one #: three def one # four #: four def one #: this looks like a continuation #: and is often used #: instead <br />of <br /> # five ## five sub 1 ### five sub 1 sub 1 ## five sub 2 </translate>

<translate> <!–T:65–> Start each line with a space. Text is 'preformatted' and markups 'can' be done. </translate> </pre>


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. Text is 'preformatted' and markups 'can' be done. </translate>

Start with a space in the first column, (before the <tvar|1>&lt;nowiki&gt;</>).

<!–T:70–> Then your block format will be

  maintained.

<!–T:170–> This is good for copying in code blocks: </translate>

def function():

  """<translate><!--T:171--> documentation string</translate>"""
  if True:
      print True
  else:
      print False&lt;/nowiki&gt;

</pre>

<translate><!--T:73--> Start with a space in the first column, (before the &lt;nowiki&gt;). <!--T:74--> Then your block format will be maintained. <!--T:75--> This is good for copying in code blocks: </translate> def function(): """<translate><!--T:172--> documentation string</translate>""" if True: print True else: print False

<translate>

== Paragraphs == <!–T:78–>

<!–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

&lt;br />

.

== HTML tags == <!–T:80–>

<!–T:81–> Some HTML tags are allowed in MediaWiki, for example

&lt;code>

,

&lt;div>

, and

<nowiki><span></nowiki>

. These apply anywhere you insert them. </translate> {| class=“wikitable” ! <translate><!–T:82–> Description</translate> ! width=40% | <translate><!–T:83–> You type</translate> ! width=40% | <translate><!–T:84–> You get</translate>

<ins><translate><!–T:86–> Inserted</translate></ins>

<translate><!–T:87–> or</translate>

<u><translate><!–T:88–> Underline</translate></u> </pre>

<ins><translate><!–T:89–> Inserted</translate></ins>

<translate><!–T:90–> or</translate>

<u><translate><!–T:91–> Underline</translate></u>

<s><translate><!–T:93–> Strike-through</translate></s>

<translate><!–T:94–> or</translate>

<translate><!–T:95–> Deleted</translate>

</pre>

<s><translate><!–T:96–> Strike-through</translate></s>

<translate><!–T:97–> or</translate>

<translate><!–T:98–> Deleted</translate>

<translate><!--T:100--> Source code</translate>

<translate><!–T:101–> or</translate>

<translate><!--T:157--> Fixed width text</translate>

</pre>

<translate><!--T:154--> Source code</translate>

<translate><!–T:102–> or</translate>

<translate><!--T:103--> Fixed width text</translate>

<translate><!–T:105–> Text before</translate> <blockquote><translate><!–T:106–> Blockquote</translate></blockquote> <translate><!–T:107–> Text after</translate> </pre>

<translate><!–T:108–> Text before</translate> <blockquote><translate><!–T:109–> Blockquote</translate></blockquote> <translate><!–T:110–> Text after</translate>

1=The q element '''must not''' be used in place of quotation marks that do not represent quotes; for example, it is inappropriate to use the q element for marking up sarcastic statements.<ref>[https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-q-element HTML Living Standard—The &lt;'''q'''&gt; element]</ref>

<!–T:112–> <!– This is a comment –> Comments are visible only in the edit zone. </translate></pre>

<translate> <!–T:113–> <!– This is a comment –> Comments are visible only in the edit zone. </translate>

<pre><translate> <!–T:115–> Text is 'preformatted' and markups 'cannot' be done&lt;/pre> </translate></pre>


1=<translate><!--T:116--> For marking up of preformatted text, check the "Preformatted text" entry at the end of the previous table.</translate>

<pre><translate> <!–T:117–> Text is 'preformatted' and markups 'cannot' be done </translate></pre>

<pre style=“color: red”><translate> <!–T:119–> Text is 'preformatted' with a style and markups 'cannot' be done &lt;/pre> </translate></pre>


1=<translate><!--T:120--> A CSS style can be named within the <code>style</code> attribute.</translate>

<pre style=“color: red”><translate> <!–T:121–> Text is 'preformatted' with a style and markups 'cannot' be done </translate></pre>

<translate> <!–T:122–> continued:</translate> {| class=“wikitable” | style=“table-layout: fixed; width: 100%” ! <translate><!–T:123–> Description</translate> ! width=40% | <translate><!–T:124–> You type</translate> ! width=40% | <translate><!–T:125–> You get</translate>

<pre> <translate><!–T:127–> This long sentence is used to demonstrate text wrapping. This additional sentence makes the text even longer. This additional sentence makes the text even longer.</translate> &lt;/pre> </pre>

<pre> <translate><!–T:128–> This long sentence is used to demonstrate text wrapping. This additional sentence makes the text even longer. This additional sentence makes the text even longer.</translate> </pre>

<pre style=“white-space: pre;”> <translate><!–T:130–> This long sentence is used to demonstrate text wrapping. This additional sentence makes the text even longer. This additional sentence makes the text even longer.</translate> &lt;/pre> </pre>

<pre style=“white-space: pre;”> <translate><!–T:131–> This long sentence is used to demonstrate text wrapping. This additional sentence makes the text even longer. This additional sentence makes the text even longer.</translate> </pre>

<translate>

== Inserting symbols == <!–T:132–>

<!–T:133–> Symbols and other special characters not available on your keyboard can be inserted in a multitude of ways. Many [http://www.howtogeek.com/210824/how-to-quickly-type-special-characters-on-any-computer-smartphone-or-tablet/ Operating Systems and browsers] allow you to insert special characters through a menu option or Operating System panel. Additionally, you can use the WikiEditor or VisualEditor to insert them into the edit screen.

<!–T:166–> As a last resort, you can use a special sequence of characters. Those sequences are called HTML entities. For example, the following sequence (entity) '&amp;rarr;' when inserted will be shown as <ins>right arrow</ins> HTML symbol &rarr; and '&amp;mdash;' when inserted will be shown as an <ins>em dash</ins> HTML symbol &mdash;. </translate>


1=<translate><!--T:134--> Hover over any character to find out the symbol that it produces. Some symbols not available in the current font will appear as empty squares.</translate>

{| class=“wikitable” align=center width=100% ! colspan=32 | HTML symbol entities

{| class=“wikitable” ! <translate><!–T:135–> Description</translate> ! width=40% | <translate><!–T:136–> You type</translate> ! width=40% | <translate><!–T:137–> You get</translate>

class=mw-code

:::'&copy;'

class=mw-code

:::'&delta;'

class=mw-code

:::'&euro;'

<translate> <!–T:141–> See the list of all HTML entities on the Wikipedia article List of HTML entities. Additionally, MediaWiki supports two non-standard entity reference sequences:

&amp;רלמ;

and

&amp;رلم;

which are both considered equivalent to

&amp;rlm;

which is a right-to-left mark. (Used when combining right to left languages with left to right languages in the same page.)

== HTML tags and symbol entities displayed themselves (with and without interpreting them) == <!–T:142–> </translate> :

&amp;amp;euro;

&nbsp;&rarr; '&amp;euro;'

:

&lt;span style="color: red; text-decoration: line-through;"><translate><!--T:143--> Typo to be corrected</translate>&lt;/span>

&nbsp;&rarr; '<span style=“color: red; text-decoration: line-through;”><translate><!–T:144–> Typo to be corrected</translate></span>'

:

<translate><!--T:156--> <nowiki>&amp;lt;span style="color: red; text-decoration: line-through;">Typo to be corrected</span></nowiki></translate>

&nbsp;&rarr; '&lt;span style=“color: red; text-decoration: line-through;”><translate><!–T:145–> Typo to be corrected</translate>&lt;/span>' <translate> === Nowiki for HTML === <!–T:146–> </translate> «nowiki />nowiki /> <translate><!–T:147–> can prohibit (HTML) tags:</translate> * <<nowiki />pre> &nbsp;&rarr; «nowiki/>pre> <translate><!–T:148–> But not &amp; symbol escapes:</translate> * &«nowiki />nowiki />amp; &nbsp;&rarr; &amp; <translate><!–T:149–> To print &amp; symbol escapes as text, use “

&amp;amp;

” to replace the “&” character (eg. type “

&amp;amp;nbsp;

”, which results in “

&amp;nbsp;

”).

== Other formatting == <!–T:150–>

<!–T:151–> Beyond the text formatting markup shown hereinbefore, here are some other formatting references: </translate>

* Help:Links|nsp=0 * Help:Lists|nsp=0 * Help:Images|nsp=0 <translate> <!–T:158–> * References – see citephp>Special:MyLanguage/Extension:Cite/Cite.php</>|Extension:Cite/Cite.php * tables>Special:MyLanguage/Help:Tables</>|Tables

<!–T:153–> You can find more references at help-contents>Special:MyLanguage/Help:Contents</>|Help:Contents. </translate> Formatting

computing/wikisyntax.1565333629.txt.gz · Last modified: 2019/08/09 06:53 by oemb1905