Help:Formatting

From Saintapedia
(Redirected from Column)
Jump to navigation Jump to search
Help
Getting Started
Picking a UsernameTeach Yourself Wiki
Policies and guidelines
Saintapedia:Copyrights
The Saintapedia Interface
Left NavigationToolbox Discussion/Talk PageEdit & HistorySearchLog in & Create an Account
Editing Saintapedia
Creating a new pageCreating your user page • Editors (Visual/Enhanced) • Editing toolbarCheat SheetMagic wordsTable of Contents
Links
Internal linkExternal linkInterWiki linkCategory link Reference links
Images and Media
File Upload Guidelines for SaintapediaHow to upload new versions of filesImage mapNaming Conventions for FilesUpload documents
Tracking Changes
Recent Edits on SaintapediaArticle historyReverting to an earlier versionWatchlistHow to add a page to your watchlist
Asking Questions
Using talk pagesHelp:CommentStreams
Resources and Lists
Categories InfoboxHelp:Templates
Account settings and maintenance
Change your preferences Confirm your email address
Technical information
The MediaWiki softwareParser functions
All topics
view · talk · edit

Most formatting changes can be made using VisualEditor. The much of the information below is aimed at those using enhanced editor, primarily editing the wikitext rather than using the Editing Toolbar. The wikitext consists of normal characters like asterisks, single quotes 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 single quotes like ''this''.

For a more detailed explanation of formatting options, see Wikipedia:Manual of StyleWikipedia Logo.png.

Text formatting markup

Description You type You get
character (inline) formatting – applies anywhere
Italic text ''italic''

italic

Bold text '''bold''' bold
Bold and italic '''''bold & italic''''' bold & italic
Strike text <strike>strike text</strike> strike text
Show wiki text <nowiki>show '''wikitext'''</nowiki>
VS.

apply '''wiki text'''

show '''wiki text'''
VS.

apply wiki text

No space after link [[Acronym S]]&lt;nowiki/&gt;& [[Acronym T]] & [[Acronym U]]

Acronym S& Acronym T & Acronym U

section formatting – only at the beginning of the line
Headings of different levels
== Heading / Level 2 ==

=== Sub-heading 1 / Level 3 ===

==== Sub-heading 2 / Level 4 ====

===== Sub-heading 3 / Level 5 =====

====== Sub-heading 4 / Level 6 ======

[[#ref_

^]]
Heading / Level 2
Sub-heading 1 / Level 3
Sub-heading 2 / Level 4
Sub-heading 3 / Level 5
Sub-heading 4 / Level 6
Horizontal rule
Text above
----
Text below

Text above


Text below

Bullet list
* Start each line
* with an asterisk (*).
** More asterisks gives deeper
*** and deeper levels.
* Line breaks
don't break levels. *** But jumping levels creates empty space. Any other start ends the list.
  • Start each line
  • with an asterisk (*).
    • More asterisks gives deeper
      • and deeper levels.
  • Line breaks
    don't break levels.
      • But jumping levels creates empty space.

Any other start ends the list.

Numbered list
# Start each line
# with a number sign (#).
## More number signs gives deeper
### and deeper
### levels.
# Line breaks
don't break levels. ### But jumping levels creates empty space. # Blank lines # end the list and start another. Any other start also ends the list.
  1. Start each line
  2. with a number sign (#).
    1. More number signs gives deeper
      1. and deeper
      2. levels.
  3. Line breaks
    don't break levels.
      1. But jumping levels creates empty space.
  4. Blank lines
  1. end the list and start another.

Any other start also ends the list.

Definition list
;item 1: definition 1
;item 2
: definition 2-1
: definition 2-2
item 1
definition 1
item 2
definition 2-1
definition 2-2
Indent text
: Single indent
:: Double indent
::::: Multiple indent

^

Single indent
Double indent
Multiple indent
Mixture of different types of list
# 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
of <nowiki>
</nowiki> # five ## five sub 1 ### five sub 1 sub 1 ## five sub 2

<span class="citation wikicite" id="endnote_The usage of #: and *: for breaking a line within an item may also be controversial.">[[#ref_The usage of #: and *: for breaking a line within an item may also be controversial.|^]]

  1. one
  2. two
    • two point one
    • two point two
  3. three
    three item one
    three def one
  4. four
    four def one
    this looks like a continuation
    and is often used
    instead
    of <br/>
  5. five
    1. five sub 1
      1. five sub 1 sub 1
    2. five sub 2
Preformatted text
 Start each line with a space.
 Text is '''preformatted,''' but
 ''character formatting markups'' '''''can''''' be done. 

^

Start each line with a space.
Text is preformatted, but
character formatting markups can be done.
Preformatted text blocks
 <nowiki>Start with a space in the first row
(before a <nowiki>), and your block format will be
    maintained without needing spaces 
       at the start of every line.
 
This is good for copying in code blocks:

def function():
    """documentation string"""

    if True:
        print True
    else:
        print False</nowiki>
Start with a space in the first row
           (before a <nowiki>), and your block format will be
               maintained without needing spaces 
                  at the start of every line.
            
           This is good for copying in code blocks:
           
           def function():
               """documentation string"""
           
               if True:
                   print True
               else:
                   print False
Editor comments
<!-- Comment text only appears when you are editing the page. -->
Comments are visible only in edit mode.
{{comment|You can also put comments in wiki markup using the {{comment}} template.}}

Comments are visible only in edit mode.

Paragraphs

MediaWiki ignores single line breaks. To start a new paragraph,

  • In VisualEditor, just use the Enter key one time
  • In Enhanced editor, leave an empty line between text (use the Enter key two times). You can force a line break within a paragraph with the HTML tag <br/>, which is an option on it's Editing toolbar.

Lists

These details relate to editors using Enhanced editor. Both Editing toolbars have options for many of the lists For a more detailed coverage of this topic, see Help:Lists.

Description You type You get
No extra lines between items
White rose
Yellow rose
Pink rose
Red rose

White rose Yellow rose Pink rose Red rose

Extra lines between items
White rose

Yellow rose

Pink rose

Red rose 

White rose

Yellow rose

Pink rose

Red rose

Bulleted list
* White rose
* Yellow rose
* Pink rose
* Red rose 
  • White rose
  • Yellow rose
  • Pink rose
  • Red rose
Numbered list
# White rose
# Yellow rose
# Pink rose
# Red rose 
  1. White rose
  2. Yellow rose
  3. Pink rose
  4. Red rose
Line breaks (Accessibility problems - See Unbulleted vertical lists for other options)
White rose<br />
Yellow rose<br />
Pink rose<br />
U.S. Department of Energy

White rose
Yellow rose
Pink rose
U.S. Department of Energy

Unbulleted list
{{unbulleted list
| White rose
| Yellow rose
| Pink rose
| Red rose
}}
  • White rose
  • Yellow rose
  • Pink rose
  • Red rose

Inserting symbols

Symbols and other special characters not available on your keyboard can be inserted through

  • Special character insertion (VisualEditor)
  • Special Characters (Enhanced editor) or
  • a special sequence of characters called HTML entities. For example, the following sequence (entity) &rarr; when inserted will be shown as right arrow HTML symbol → and &mdash; when inserted will be shown as an em dash HTML symbol —

^

HTML symbol entities
Á á Â â ´ Æ æ À à Α α & Å å Ã ã Ä ä Β β ¦ Ç ç ¸ ¢
Χ χ ˆ © ¤ ° Δ δ ÷ É é Ê ê È è Ε ε Η η
Ð ð Ë ë ƒ ½ ¼ ¾ Γ γ > Í í Î î ¡ Ì ì Ι ι
¿ Ï ï Κ κ Λ λ « < ¯ µ · Μ μ  
¬ Ñ ñ Ν ν Ó ó Ô ô Œ œ Ò ò Ω ω Ο ο ª º Ø ø Õ õ Ö
ö Φ φ Π π ϖ ± £ Ψ ψ " » ® Ρ ρ
Š š § ­ Σ σ ς ¹ ² ³ ß Τ τ Θ θ ϑ Þ þ ˜
× Ú ú Û û Ù ù ¨ ϒ Υ υ Ü ü Ξ ξ Ý ý ¥ ÿ Ÿ Ζ ζ
Examples
Description You type You get
Copyright symbol &amp;copy; ©
Greek delta letter symbol &amp;Delta; Δ
Euro currency symbol &amp;euro;

See the list of all HTML entities on the Wikipedia article List of HTML entitiesWikipedia Logo.png. Additionally, MediaWiki supports two non-standard entity reference sequences: &רלמ; and &رلم; which are both considered equivalent to &rlm; which is a right-to-left markWikipedia Logo.png. (Used when combining right to left languages with left to right languages in the same page.)

Columns

The {{col-begin}}, {{col-break}} and {{col-end}} templates control columns of text on a page:

{{col-begin}}: starts a table (followed by {{col-break}} for 1st column)
{{col-break}}: triggers the start of each column
{{col-end}}: ends the multi-column table.

See Template:Column templates for more details.

{{Div col}}, together with {{div col end}}, is used to make a list into columns. It automatically breaks each column into an equal space, meaning, for instance, it isn't necessary to work out the halfway point between two columns. The template also offers options to set a smaller (90%) font-size (|small=yes), place vertical lines ("rules") between the columns (|rules=) and to add other custom styling (|style=).

See Template:Div col/doc for more information. Template:Columns-list is an alternative.

Table of Contents

File:Table of Contents.png
Screenshot of an article's Table of Contents

For each page with more than three headings, a table of contents (TOC) is automatically generated from the section headings. By default, it appears below the lead section, however it can be manually positioned at another location on the page. By default it also includes all section heading levels. This can be changed as well by limiting the depth of the table of contents.

Collapsing

Collapsable

<div id="mw-customcollapsible-0" class="mw-collapsible mw-notcollapsed"> </div>

Collapse by default

<div id="mw-customcollapsible-0" class="mw-collapsible mw-collapsed"> </div>

Callout

The {{Callout}} template is used as a way of emphasizing a piece of text that comes from an email announcement or other vehicle, which is not intended to be altered because it reflects official communication. When used, the text should include enough detail to understand who it came from and when. This is especially used on Inside Saintapedia.

Example

{{Callout|title=hi|text=blah, blah, blah}}

hi
blah, blah, blah

Tab templates

Common formatting issues

There are many common formatting issues that can be easily resolved.

Box around text

This formatting should be appear as normal text.

If you add a space in front, a box is put around the text.

Other formatting

Beyond the text formatting markup shown above, here are some other formatting references:

You can find more references at Help:Contents.

HTML tags

Some HTML tags are allowed in MediaWiki, for example <code>, <div>, <span> and <font> when using Enhanced editor. These apply anywhere you insert them.

Description You type You get
Inserted
(Displays as underline in most browsers.)
<ins>Inserted</ins>

or

<span style="text-decoration: underline;">Underline</span>

Inserted

or

Underline

Deleted
(Displays as strikethrough in most browsers.)
<del>Deleted</del>

or

<span style="text-decoration:line-through;">Deleted</span>

Deleted

or

Deleted

Fixed width text
<code>Source code</code>

or

<tt>Fixed width text</tt>

Source code

or

Fixed width text

Blockquotes
text above
text above
<blockquote>blockquote</blockquote>
text below
text below

text above text above

blockquote

text below text below

Comment
<!-- This is a comment -->
Comments are only visible
in the edit window.

Comments are only visible in the edit window.

Completely preformatted text
<pre> Text is '''preformatted''' and
''markups'' '''''cannot''''' be done</pre>

^

 Text is '''preformatted''' and
''markups'' '''''cannot''''' be done
Customized preformatted text
<pre style="color:red">
Text is '''preformatted'''
with a style and
''markups'' '''''cannot''''' be done
</pre>

<span class="citation wikicite" id="endnote_A CSS style can be named within the style property.">[[#ref_A CSS style can be named within the style property.|^]]

Text is '''preformatted'''
with a style and
''markups'' '''''cannot''''' be done
Customized preformatted text with text wrap according to screen width
<pre style="white-space: pre-wrap; 
white-space: -moz-pre-wrap;
white-space: -pre-wrap;
white-space: -o-pre-wrap; 
word-wrap: break-word">
This longer sentence is used to demonstrate text wrapping.
</pre>
This longer sentence is used to demonstrate text wrapping.
Preformatted text with text wrap according to screen width
<code>
This longer sentence is used to demonstrate text wrapping.
</code>

This longer sentence is used to demonstrate text wrapping.

HTML tags and symbol entities displayed themselves (with and without interpreting them)

&amp;euro;  → &euro;
<span style="color: red; text-decoration: line-through;">Typo to be corrected</span>  → Typo to be corrected
&lt;span style="color: red; text-decoration: line-through;">Typo to be corrected&lt;/span>  → <span style="color: red; text-decoration: line-through;">Typo to be corrected</span>

Nowiki for HTML

<nowiki /> can prohibit (HTML) tags:

  • <<nowiki />pre>  → <pre>

But not & symbol escapes:

  • &<nowiki />amp;  → &

Related