Difference between revisions of "Wikitext"

(Created page with "==What is Wikitext?== Wikitext is a simplified markup language that is used to format and structuretext and other data. While HTML is the most common markup language for web p...")
 
(Tag: 2017 source edit)
 

Contents

1 What is

Wikitext

?
  • 2 How do I use Wikitext?
  • 3 Examples of Wikitext
  • 4 External resources
  • What

    is

    Wikitext?[edit | edit source]Wikitext is

    a simplified markup language that is used to format and

    structuretext

    structure text and other data.

    While HTML is the most common markup language for web pages, Wikitext is used in wiki systems. Like HTML, it uses tags to mark parts of

    tags

    text or other data.

    How do I use Wikitext?[edit | edit source]

    When you edit a page, you can switch between

    Visual

    visual editing and source editing

    :

    using the editor toolbar.

    Screenshot: Visual Editor switch edit mode

    Wikitext can be entered in source editing mode. When you are in visual editing mode, VisualEditor inserts Wikitext "behind the scenes". If VisualEditor doesn't format elements on a page correctly, you can always switch to source editing to correct the issues directly in Wikitext.

    Examples of Wikitext[edit | edit source]

    Here are some typical examples of Wikitext:

    Formatting

    Text formatting[edit | edit source]

    • This is '''bold'''
    • This is ''italic''
    • This is <u>underlined</u>

    Structuring[edit | edit source]

    • This is a ==
    Section
    • Heading==
    • This is an *unordered list
    item (first level)Links / Embedding:
    • element
    • Table:
    Table:
    header 1 header 2
    row 1, cell 1 row 1, cell 2
    row 2, cell 1 row 2, cell 2
    [[
    •                                 {| class="wikitable"
      |-
      !header 1
      !header 2
      |-
      |row 1, cell 1
      |row 1, cell 2
      |-
      |row 2, cell 1
      |row 2, cell 2
      |}
      
                                  


    Links / Embedded files[edit | edit source]

    Insert a link:

    Link to internal wiki page

                            [[Wikipage|Label]]
    [[Pancake|Best
                        
    pancake
                             Pancake]]
                        
    - this creates a link to the page "Pancake" with the link description "Best pancake". see also the Mediawiki help page for links:
                            
    
                        

    Link to external website

                            [url label]
    [https://
                        
    www
                            wikipedia.
                        
    mediawiki.org/wiki/Help:Links and
  • and the help section about external links to internal pages https://www.mediawiki.org/wiki/Help:Links#External_links_to_internal_pages
  • links with parameters / links that open in a new tab: <span Images[[File:Someimage
                            org Wikipedia]
    
                        

    'Link with parameters

                            <span class="plainlinks">[{{fullurl:{{FULLPAGENAME}}|action=edit}} Edit this page]</span>
    
                        
    Embed an image:

    This link opens the referenced page in edit mode in a new tab.

    Embed image/file


    • [[Datei:image-or-pdf-name.png]] -
    This embeds the image someimage.png on the page.
  • embedding only happens when a link points to the "File" namespace
  • the wiki checks if preview/thumbnail can be created automatically
    • - - Image/PDF is embedded on page
      • the wiki checks, if a preview can be generated (e.g.
    image formats like
      • , for "png", "jpeg", "gif", "svg") and
    then
      • embeds
    a
      • the preview
    into the page
      • otherwise, a link
    will be created
      • to the
    wikipage in the "File" namespace (aka "
      • file description page
    ")Embed a file: [[Media:SomePDF.pdf]]
      • is created
        • can be embedded: PDF, Tiff (
    needs
        • with extension)
        • cannot be embedded: Microsoft Office
    and
        • - und Libre Office
    files
        • -Dateien; Shell-
    Scripts
        • Skripte, ...
    • [[Media:image-or-pdf--name.png]] - - - - Links to image / PDF
    • [[:Datei:image-or-pdf--name.png]] - - - Links to file description page

    Magic words[edit | edit source]

    Magic words are strings of text that Mediawiki associates with a return value or function. Examples are:

    "Behavior switch", aka "Double underscore", e.g.
    Type of Wikitext Example
    Special character &atilde; → ã

    &ccedil; → ç

    UTF-8 is possible

    Comment <!-- unnoticed -->
    No "wiki translation" <nowiki> and </pre>
    Table of contents __TOC__
  • "Variables", e.g. {{FULLPAGENAME}}
  • "Tags", e.g. <gallery>
  • "ParserFunctions", e.g. {{#ifeq:x|y|true|false}}
  • External resources[edit | edit source]

    For a more complete list of all Wikitext tags, you can refer to the Wikimedia page https://
    and __NOTOC__
    Signature --~~~
    Redirect #REDIRECT [[targetpage]]
    Template {{template name}}

    Related info

    .
    ==What is Wikitext?==
                
                Wikitext <section begin="training-intro" /><div class="training">
                
                Wikitext is a simplified markup language that is used to format and structuretext structure text and other data. <section end="training-intro" /><section end="training-intro" />
                
                
                
                
            While HTML is the most common markup language for web pages, Wikitext is used in wiki systems. Like HTML, it uses tags to mark parts of tagstext or other data.
            
            
            
            ==How do I use Wikitext?==
            
            When you edit a page, you can switch between Visualvisual editing and source editing:
                
                
             using the editor toolbar.
                
                
            [[File:Manual:editing.png|alt=Screenshot: Visual Editor switch edit mode|center]]
            
            
            
            Wikitext can be entered in source editing mode. When you are in visual editing mode, VisualEditor inserts Wikitext "behind the scenes". If VisualEditor doesn't format elements on a page correctly, you can always switch to source editing to correct the issues directly in Wikitext.<br />
            
            
            
            ==Examples of Wikitext==
            
            Here are some typical examples of Wikitext:
            
            
            
                
                ===<span class="mw-headline" id="Formatting">Formatting</span>===
                
                
                
                
            <section begin="training" />
                
                ===Text formatting===
                
                
                <section begin="training-slide1" />
                
                
                
                
            *This is <code><nowiki>'''bold'''</nowiki></code>
            
            *This is <code><nowiki>''italic''</nowiki></code>
            
            *This is <code><nowiki><u>underlined</u></nowiki></code>
                
                
                
                ===<span class="mw-headline" id="Structuring">Structuring</span>===
                
                
                
                
            <section end="training-slide1" />
                
                
                
                ===Structuring===
                
                
                <section begin="training-slide2" />
                
                
                
                
            *This is a <code>==Section Heading==</code>
            
            *This is an  <code>*unordered list item (first level)</code>
                
                *Table: Table:
                
                
                
                 {| class="wikitable"
                
                 |-
                
                 !header 1
                
                 !header 2
                
                 |-
                
                 element</code>
                
                *Table:<syntaxhighlight lang="text">
                
                {| class="wikitable"
                
                |-
                
                !header 1
                
                !header 2
                
                |-
                
                
            |row 1, cell 1
            
            
             |row 1, cell 2
            
            
             |-
                
                 |-
                
                
            |row 2, cell 1
            
            
             |row 2, cell 2
            
            
             |}
                
                
                
                ===<span class="mw-headline" id="Linking_.2F_Embedding">Links / Embedding:</span>===
                
                
                
                *'''Insert a link:''' <code><nowiki>[[Pancake|Best pancake]]</nowiki></code> - this creates a link to the page "Pancake" with the link description "Best pancake".
                
                **see also the Mediawiki help page for links:  https://www.mediawiki.org/wiki/Help:Links and
                
                **and the help section about external links to internal pages https://www.mediawiki.org/wiki/Help:Links#External_links_to_internal_pages
                
                **links with parameters / links that open in a new tab:  <code><nowiki>|}</syntaxhighlight><section end="training-slide2" />
                
                
                
                
                
                ===Links / Embedded files===
                
                
                <section begin="training-slide3" />
                
                
                
                '''Link to internal wiki page'''
                
                
                <syntaxhighlight lang="text">
                
                [[Wikipage|Label]]
                
                [[Pancake|Best Pancake]]
                
                
                </syntaxhighlight>
                
                '''Link to external website'''
                
                
                <syntaxhighlight lang="text">
                
                [url label]
                
                [https://wikipedia.org Wikipedia]
                
                
                </syntaxhighlight>
                
                '''Link with parameters''
                
                
                <syntaxhighlight lang="text">
                
                
            <span class="plainlinks">[{{fullurl:{{FULLPAGENAME}}|action=edit}} Edit this page]</nowiki><nowiki></span></nowiki></code>
                
                *'''Embed an image:''' <code>Images<nowiki>[[File:Someimage.png]]</nowiki></code> - This embeds the image ''someimage.png'' on the page.
                
                **embedding only happens when a link points to the "File" namespace
                
                **the wiki checks if preview/thumbnail can be created automatically (e.g. image formats like 
                
                
                </syntaxhighlight>
                
                This link opens the referenced page in edit mode in a new tab.
                
                
                <section end="training-slide3" />
                
                
                
                '''Embed image/file'''
                
                
                
                
                <br />
                
                
                <section begin="training-slide4" />
                
                
                
                *<code>[['''Datei:'''<nowiki>image-or-pdf-name.png]]</nowiki></code> - - - '''Image/PDF is embedded on page'''<section end="training-slide4" />
                
                **the wiki checks, if a preview can be generated (e.g., for "png", "jpeg", "gif", "svg") and then embeds athe preview
            
            
            into the page
                
                **otherwise a link will be created to the wikipage in the "File" namespace (aka "file description page")
                
                
                
                *'''Embed a file:''' <code><nowiki>[[Media:SomePDF.pdf]]</nowiki></code>
                
                **can  **otherwise, a link to the file description page is created
                
                ***can be embedded: PDF, Tiff (needswith extension)
            
            ***cannot be embedded: Microsoft Office and- und Libre Office files-Dateien; Shell-Scripts, ...
                
                
                
                ===<span class="mw-headline" id="MagicWords">Magic words</span>===
                
                [[MagicWords|Magic words]] are strings of text that  Mediawiki associates with a return value or function. Examples are:
                
                
                
                *"Behavior switch", aka "Double underscore", e.g. <code><nowiki>__TOC__</nowiki></code>
                
                *"Variables", e.g. <code><nowiki>{{FULLPAGENAME}}</nowiki></code>
                
                *"Tags", e.g. <code><nowiki><gallery></nowiki></code>
                
                *"ParserFunctions", e.g. <code><nowiki>{{#ifeq:x|y|true|false}}</nowiki></code>
                
                
                
                == External resources ==
                
                For a more complete list of all Wikitext tags, you can refer to the Wikimedia page Skripte, ...<section begin="training-slide4" />
                
                *<code>[['''Media:'''<nowiki>image-or-pdf--name.png]]</nowiki></code> - - - - '''Links to image / PDF'''
                
                *<code>[[''':Datei:'''<nowiki>image-or-pdf--name.png]]</nowiki></code> - - - '''Links to file description page'''
                
                
                <section end="training-slide4" /></div>
                
                
                <section end="training" />
                
                
                
                ===Magic words===
                
                {| class="contenttable"
                
                !Type of Wikitext
                
                !Example
                
                |-
                
                |Special character
                
                |'''<code>&amp;atilde;</code>  &rarr; &atilde;'''
                
                '''<code>&amp;ccedil;</code> &rarr; &ccedil;'''
                
                
                
                UTF-8 is possible
                
                |-
                
                |Comment
                
                |<code>'''<nowiki><!-- unnoticed --></nowiki>'''</code>
                
                |-
                
                |No "wiki translation"
                
                |<code>'''&lt;nowiki'''&gt;</code> and <code>'''</pre'''></code>
                
                |-
                
                |Table of contents
                
                |<code>'''<nowiki>__TOC__</nowiki>'''</code> and <code>'''<nowiki>__NOTOC__</nowiki>'''</code>
                
                |-
                
                |Signature
                
                |<code>'''<nowiki>--~~~</nowiki>'''</code>
                
                |-
                
                |Redirect
                
                |<code>'''<nowiki>#REDIRECT [[targetpage]]</nowiki>'''</code>
                
                |-
                
                |Template
                
                |<code>'''<nowiki>{{template name}}</nowiki>'''</code>
                
                |}
                
                
                <section end="wikitextTraining" />
                
                {{Box Links-en
                
                |Topic1=[https://meta.wikimedia.org/wiki/Help:Wikitext_examples.
                
                
                <br />  meta.wikimedia.org/wiki/Help:Wikitext_examples]
                
                |Topic2=[[MagicWords|Magic words]]}}
                
                
                
                [[en:{{FULLPAGENAME}}]]
                
                [[de:Wikitext]]
                
                [[Category:Training]]
                
                [[Category:Term]]
                
                [[Category:Concept]]
    (47 intermediate revisions by 3 users not shown)
    Line 1: Line 1:
    ==What is Wikitext?==
    +
    <section begin="training-intro" /><div class="training">
    Wikitext is a simplified markup language that is used to format and structuretext and other data. While HTML is the most common markup language for web pages, Wikitext is used in wiki systems. Like HTML, it uses tags to mark parts of tags or other data.
    +
    Wikitext is a simplified markup language that is used to format and structure text and other data. <section end="training-intro" /><section end="training-intro" />
     +
     
     +
    While HTML is the most common markup language for web pages, Wikitext is used in wiki systems. Like HTML, it uses tags to mark parts of text or other data.
      
     
    ==How do I use Wikitext?==
     
    ==How do I use Wikitext?==
    When you edit a page, you can switch between Visual editing and source editing:
    +
    When you edit a page, you can switch between visual editing and source editing using the editor toolbar.
     
    [[File:Manual:editing.png|alt=Screenshot: Visual Editor switch edit mode|center]]
     
    [[File:Manual:editing.png|alt=Screenshot: Visual Editor switch edit mode|center]]
      
    Line 10: Line 12:
     
    ==Examples of Wikitext==
     
    ==Examples of Wikitext==
     
    Here are some typical examples of Wikitext:
     
    Here are some typical examples of Wikitext:
     
    +
    <section begin="training" />
    ===<span class="mw-headline" id="Formatting">Formatting</span>===
    +
    ===Text formatting===
     +
    <section begin="training-slide1" />
      
     
    *This is <code><nowiki>'''bold'''</nowiki></code>
     
    *This is <code><nowiki>'''bold'''</nowiki></code>
     
    *This is <code><nowiki>''italic''</nowiki></code>
     
    *This is <code><nowiki>''italic''</nowiki></code>
    *This is <code><nowiki><u>underlined</u></nowiki></code>
    +
    *This is <code><nowiki><u>underlined</u></nowiki></code><section end="training-slide1" />
     +
     
     +
    ===Structuring===
     +
    <section begin="training-slide2" />
     +
     
     +
    *This is a <code>==Heading==</code>
     +
    *This is an <code>*unordered list element</code>
     +
    *Table:<syntaxhighlight lang="text">
     +
    {| class="wikitable"
     +
    |-
     +
    !header 1
     +
    !header 2
     +
    |-
     +
    |row 1, cell 1
     +
    |row 1, cell 2
     +
    |-
     +
    |row 2, cell 1
     +
    |row 2, cell 2
     +
    |}</syntaxhighlight><section end="training-slide2" />
      
    ===<span class="mw-headline" id="Structuring">Structuring</span>===
     
      
    *This is a <code>==Section Heading==</code>
    +
    ===Links / Embedded files===
    *This is an  <code>*unordered list item (first level)</code>
    +
    <section begin="training-slide3" />
    *Table: Table:
     
      
    {| class="wikitable"
    +
    '''Link to internal wiki page'''
    |-
    +
    <syntaxhighlight lang="text">
    !header 1
    +
    [[Wikipage|Label]]
    !header 2
    +
    [[Pancake|Best Pancake]]
    |-
    +
    </syntaxhighlight>
    |row 1, cell 1
    +
    '''Link to external website'''
    |row 1, cell 2
    +
    <syntaxhighlight lang="text">
    |-
    +
    [url label]
    |row 2, cell 1
    +
    [https://wikipedia.org Wikipedia]
    |row 2, cell 2
    +
    </syntaxhighlight>
    |}
    +
    '''Link with parameters''
     +
    <syntaxhighlight lang="text">
     +
    <span class="plainlinks">[{{fullurl:{{FULLPAGENAME}}|action=edit}} Edit this page]</span>
     +
    </syntaxhighlight>
     +
    This link opens the referenced page in edit mode in a new tab.
     +
    <section end="training-slide3" />
      
    ===<span class="mw-headline" id="Linking_.2F_Embedding">Links / Embedding:</span>===
    +
    '''Embed image/file'''
      
    *'''Insert a link:''' <code><nowiki>[[Pancake|Best pancake]]</nowiki></code> - this creates a link to the page "Pancake" with the link description "Best pancake".
    +
    <br />
    **see also the Mediawiki help page for links:  https://www.mediawiki.org/wiki/Help:Links and
    +
    <section begin="training-slide4" />
    **and the help section about external links to internal pages https://www.mediawiki.org/wiki/Help:Links#External_links_to_internal_pages
     
    **links with parameters / links that open in a new tab:  <code><nowiki><span class="plainlinks">[{{fullurl:{{FULLPAGENAME}}|action=edit}} Edit this page]</nowiki><nowiki></span></nowiki></code>
     
    *'''Embed an image:''' <code>Images<nowiki>[[File:Someimage.png]]</nowiki></code> - This embeds the image ''someimage.png'' on the page.
     
    **embedding only happens when a link points to the "File" namespace
     
    **the wiki checks if preview/thumbnail can be created automatically (e.g. image formats like "png", "jpeg", "gif", "svg") and then embeds a preview into the page
     
    **otherwise a link will be created to the wikipage in the "File" namespace (aka "file description page")
     
      
    *'''Embed a file:''' <code><nowiki>[[Media:SomePDF.pdf]]</nowiki></code>
    +
    *<code>[['''Datei:'''<nowiki>image-or-pdf-name.png]]</nowiki></code> - - - '''Image/PDF is embedded on page'''<section end="training-slide4" />
    **can be embedded: PDF, Tiff (needs extension)
    +
    **the wiki checks, if a preview can be generated (e.g., for "png", "jpeg", "gif", "svg") and embeds the preview
    **cannot be embedded: Microsoft Office and Libre Office files; Shell-Scripts, ...
    +
    **otherwise, a link to the file description page is created
     +
    ***can be embedded: PDF, Tiff (with extension)
     +
    ***cannot be embedded: Microsoft Office- und Libre Office-Dateien; Shell-Skripte, ...<section begin="training-slide4" />
     +
    *<code>[['''Media:'''<nowiki>image-or-pdf--name.png]]</nowiki></code> - - - - '''Links to image / PDF'''
     +
    *<code>[[''':Datei:'''<nowiki>image-or-pdf--name.png]]</nowiki></code> - - - '''Links to file description page'''
     +
    <section end="training-slide4" /></div>
     +
    <section end="training" />
      
    ===<span class="mw-headline" id="MagicWords">Magic words</span>===
    +
    ===Magic words===
    [[MagicWords|Magic words]] are strings of text that  Mediawiki associates with a return value or function. Examples are:
    +
    {| class="contenttable"
     +
    !Type of Wikitext
     +
    !Example
     +
    |-
     +
    |Special character
     +
    |'''<code>&amp;atilde;</code> &rarr; &atilde;'''
     +
    '''<code>&amp;ccedil;</code> &rarr; &ccedil;'''
      
    *"Behavior switch", aka "Double underscore", e.g. <code><nowiki>__TOC__</nowiki></code>
    +
    UTF-8 is possible
    *"Variables", e.g. <code><nowiki>{{FULLPAGENAME}}</nowiki></code>
    +
    |-
    *"Tags", e.g. <code><nowiki><gallery></nowiki></code>
    +
    |Comment
    *"ParserFunctions", e.g. <code><nowiki>{{#ifeq:x|y|true|false}}</nowiki></code>
    +
    |<code>'''<nowiki><!-- unnoticed --></nowiki>'''</code>
     +
    |-
     +
    |No "wiki translation"
     +
    |<code>'''&lt;nowiki'''&gt;</code> and <code>'''</pre'''></code>
     +
    |-
     +
    |Table of contents
     +
    |<code>'''<nowiki>__TOC__</nowiki>'''</code> and <code>'''<nowiki>__NOTOC__</nowiki>'''</code>
     +
    |-
     +
    |Signature
     +
    |<code>'''<nowiki>--~~~</nowiki>'''</code>
     +
    |-
     +
    |Redirect
     +
    |<code>'''<nowiki>#REDIRECT [[targetpage]]</nowiki>'''</code>
     +
    |-
     +
    |Template
     +
    |<code>'''<nowiki>{{template name}}</nowiki>'''</code>
     +
    |}
     +
    <section end="wikitextTraining" />
     +
    {{Box Links-en
     +
    |Topic1=[https://meta.wikimedia.org/wiki/Help:Wikitext_examples  meta.wikimedia.org/wiki/Help:Wikitext_examples]
     +
    |Topic2=[[MagicWords|Magic words]]}}
      
    == External resources ==
    +
    [[en:{{FULLPAGENAME}}]]
    For a more complete list of all Wikitext tags, you can refer to the Wikimedia page https://meta.wikimedia.org/wiki/Help:Wikitext_examples.
    +
    [[de:Wikitext]]
    <br />
    +
    [[Category:Training]]
     +
    [[Category:Term]]
     +
    [[Category:Concept]]

    Attachments

    Discussions