Help:Formatting

From SufiWiki
(Difference between revisions)
Jump to: navigation, search
(Created page with "AMWiki utilizes the same syntax as Mediawiki, and you can format your text using wiki markup. This consists of normal characters like asterisks, single quotes or equation marks w...")
 
m
 
(7 intermediate revisions by one user not shown)
Line 1: Line 1:
AMWiki utilizes the same syntax as Mediawiki, and you can format your text using wiki markup. This consists of normal characters like asterisks, single quotes or equation marks 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 single quotes like <code><nowiki>''this''</nowiki></code>.
+
You can format your text using wiki markup. This 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 <code><nowiki>''this''</nowiki></code>.
  
 
== Text formatting markup ==
 
== Text formatting markup ==
  
{| {{prettytable}}
+
{| class="wikitable"
! Description !! You type !! You get
+
! Description
 +
! width=40% | You type
 +
! width=40% | You get
 
|-
 
|-
 
! colspan="3" style="background:#ABE" | character (inline) formatting – ''applies anywhere''
 
! colspan="3" style="background:#ABE" | character (inline) formatting – ''applies anywhere''
 
|-
 
|-
|Italic text
+
| Italic text
| <code><nowiki>''italic''</nowiki></code>
+
| <pre>
|''italic''
+
''italic''
 +
</pre>
 +
|
 +
''italic''
 
|-
 
|-
 
| Bold text
 
| Bold text
| <code><nowiki>'''bold'''</nowiki></code>
+
| <pre>
|'''bold'''
+
'''bold'''
 +
</pre>
 +
|
 +
'''bold'''
 
|-
 
|-
 
| Bold and italic
 
| Bold and italic
| <code><nowiki>'''''bold & italic'''''</nowiki></code>
+
| <pre>
|'''''bold & italic'''''
+
'''''bold & italic'''''
 +
</pre>
 +
|
 +
'''''bold & italic'''''
 
|-
 
|-
|Escape wiki markup
+
| Escape wiki markup
| <code><nowiki><nowiki>no ''markup''&lt;/nowiki></nowiki></code>
+
| <pre>
|<nowiki>no ''markup''</nowiki>
+
&lt;nowiki>no ''markup''</nowiki&gt;
 +
</pre>
 +
|
 +
<nowiki>no ''markup''</nowiki>
 
|-
 
|-
 
! colspan="3" style="background:#ABE" | section formatting – ''only at the beginning of the line''
 
! colspan="3" style="background:#ABE" | section formatting – ''only at the beginning of the line''
 
|-
 
|-
|Headings of different levels  
+
| Headings of different levels  
| <pre>=level 1=
+
| <pre>
==level 2==
+
== Level 2 ==
===level 3===
+
=== Level 3 ===
====level 4====
+
==== Level 4 ====
=====level 5=====
+
===== Level 5 =====
======level 6======</pre>
+
====== Level 6 ======
An article with 4 or more headings automatically creates a [[wikipedia:Wikipedia:Section#Table of contents (TOC)|table of contents]].
+
</pre>
 +
----
 +
{{note|
 +
*Skip Level 1, it is page name level.
 +
*An article with 4 or more headings automatically creates a Table of contents.
 +
}}
 +
|
  
|<!-- hack to prevent TOC viewing for h1 - h6 elements: their style is hardcopied here -->
+
== Level 2 ==
<div style="font-size: 188%; margin: 0; padding-top: .5em; padding-bottom: .17em; border-bottom: 1px solid #aaa">Level 1</div>
+
=== Level 3 ===
<div style="font-size: 150%; margin: 0; padding-top: .5em; padding-bottom: .17em; border-bottom: 1px solid #aaa">Level 2</div>
+
==== Level 4 ====
<div style="font-size: 132%; font-weight: bold">Level 3</div><!--
+
===== Level 5 =====
--><b>Level 4</b><!--
+
====== Level 6 ======
--><div style="font-size: 86%; font-weight: bold">Level 5</div><!--
+
--><b style="font-size: 80%">Level 6</b>
+
 
|-
 
|-
|Horizontal rule
+
| Horizontal rule
| <code>----</code>
+
| <pre>
 +
Text above
 +
----
 +
Text below
 +
</pre>
 
|
 
|
 +
Text above
 
----
 
----
 +
Text below
 
|-
 
|-
|Bullet list
+
| Bullet list
 
|
 
|
 
<pre>
 
<pre>
* one
+
* Start each line
* two
+
* with an asterisk (*).
* three
+
** More asterisks gives deeper
** three point one
+
*** and deeper levels.
** three point two
+
* Line breaks<br />don't break levels.
 +
*** But jumping levels creates empty space.
 +
Any other start ends the list.
 
</pre>
 
</pre>
Inserting a blank line will end the first list and start another.
 
 
|
 
|
* one
+
* Start each line
* two
+
* with an asterisk (*).
* three
+
** More asterisks gives deeper
** three point one
+
*** and deeper levels.
** three point two
+
* Line breaks<br />don't break levels.
 +
*** But jumping levels creates empty space.
 +
Any other start ends the list.
 
|-
 
|-
|Numbered list
+
| Numbered list
 
|
 
|
 
<pre>
 
<pre>
# one
+
# Start each line
# two<br />spanning more lines<br />doesn't break numbering
+
# with a number sign (#).
# three
+
## More number signs gives deeper
## three point one
+
### and deeper
## three point two
+
### levels.
 +
# Line breaks<br />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.
 
</pre>
 
</pre>
 
|
 
|
# one
+
# Start each line
# two<br />spanning more lines<br />doesn't break numbering
+
# with a number sign (#).
# three
+
## More number signs gives deeper
## three point one
+
### and deeper
## three point two
+
### levels.
 +
# Line breaks<br />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.
 
|-
 
|-
|Definition list
+
| Definition list
|<pre>
+
| <pre>
 
;item 1
 
;item 1
 
: definition 1
 
: definition 1
Line 97: Line 138:
 
|-
 
|-
 
| Adopting definition list to indent text
 
| Adopting definition list to indent text
|
+
| <pre>
<pre>: Single indent
+
: Single indent
 
:: Double indent
 
:: Double indent
::::: Multiple indent</pre>
+
::::: Multiple indent
This workaround may be controversial from the viewpoint of accessibility.
+
</pre>
 +
----
 +
{{note|This workaround may be controversial from the viewpoint of accessibility.}}
 
|
 
|
 
: Single indent
 
: Single indent
Line 119: Line 162:
 
# four
 
# four
 
#: four def one
 
#: four def one
#: this rather looks like the continuation of # four
+
#: this looks like a continuation
#: and thus often used instead of <br />
+
#: and is often used
 +
#: instead<br />of &lt;nowiki><br />&lt;/nowiki>
 
# five
 
# five
 
## five sub 1
 
## five sub 1
 
### five sub 1 sub 1
 
### five sub 1 sub 1
 
## five sub 2
 
## five sub 2
 
;item 1
 
:* definition 1-1
 
:* definition 1-2
 
:
 
;item 2
 
:# definition 2-1
 
:# definition 2-2
 
 
</pre>
 
</pre>
The usage of <code>#:</code> and <code>*:</code> for breaking a line within an item may also be controversial.
+
----
 +
{{note|The usage of <code>#:</code> and <code>*:</code> for breaking a line within an item may also be controversial.}}
 
|
 
|
 
# one
 
# one
Line 145: Line 182:
 
# four
 
# four
 
#: four def one
 
#: four def one
#: this rather looks like the continuation of <code># four</code>
+
#: this looks like a continuation
#: often used instead of <code>&lt;br /></code>
+
#: and is often used
 +
#: instead<br />of <nowiki><br /></nowiki>
 
# five
 
# five
 
## five sub 1
 
## five sub 1
 
### five sub 1 sub 1
 
### five sub 1 sub 1
 
## five sub 2
 
## five sub 2
;item 1
 
:* definition 1-1
 
:* definition 1-2
 
:
 
;item 2
 
:# definition 2-1
 
:# definition 2-2
 
 
|-
 
|-
|-
+
| Preformatted text{{anchor|pre}}
|Preformatted text
+
| <pre>
 +
Start each line with a space.
 +
Text is '''preformatted''' and
 +
''markups'' '''''can''''' be done
 +
</pre>
 +
----
 +
{{note|This way of preformatting only applies to section formatting. Character formatting markups are still effective.}}
 
|
 
|
<pre>
+
  Start each line with a space.
  preformatted text is done with
+
  Text is '''preformatted''' and
  a '''space''' at the
+
  ''markups'' '''''can''''' be done
  ''beginning'' of the line
+
|-
 +
| Preformatted text blocks
 +
| <pre> <nowiki><nowiki>Start with a space in the first column,
 +
(before the <nowiki>).
 +
 
 +
Then your block format will be
 +
    maintained.
 +
 +
This is good for copying in code blocks:
 +
 
 +
def function():
 +
    """documentation string"""
 +
 
 +
    if True:
 +
        print True
 +
    else:
 +
        print False</nowiki></nowiki>
 
</pre>
 
</pre>
This way of preformatting only applies to section formatting, and character formatting markups are still effective.
 
 
|
 
|
  preformatted text is done with
+
  <nowiki>Start with a space in the first column.
a '''space''' at the  
+
(before the <nowiki>).
''beginning'' of the line
+
 
 +
Then your block format will be
 +
    maintained.
 +
 
 +
This is good for copying in code blocks:
 +
 
 +
def function():
 +
    """documentation string"""
 +
 
 +
    if True:
 +
        print True
 +
    else:
 +
        print False </nowiki>
 
|}
 
|}
  
 
== Paragraphs ==
 
== Paragraphs ==
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 tags <code>&lt;br /></code>.
+
SufiWiki 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 tags <code>&lt;br /></code>.
  
== HTML ==
+
== HTML tags ==
Some [[wikipedia:HTML|HTML]] tags are allowed in MediaWiki, for example <code>&lt;code></code>, <code>&lt;div></code>, <code><nowiki><span></nowiki></code> and <code><nowiki><font></nowiki></code>. These apply anywhere you insert them.
+
Some [[wikipedia:HTML|HTML]] tags are allowed in SufiWiki, for example <code>&lt;code></code>, <code>&lt;div></code>, <code><nowiki><span></nowiki></code> and <code><nowiki><font></nowiki></code>. These apply anywhere you insert them.
  
{| {{prettytable}}
+
{| class="wikitable"
!Description
+
! Description
!You type
+
! width=40% | You type
!You get
+
! width=40% | You get
 +
|-
 +
| Underline
 +
| <pre>
 +
<u>Underline</u>
 +
</pre>
 +
|
 +
<u>Underline</u>
 
|-
 
|-
 
| Strikethrough
 
| Strikethrough
| <code>&lt;del>Strikethrough&lt;/del></code> or <code>&lt;s>Strikethrough&lt;/s></code>
+
| <pre>
|<del>Strikethrough</del>
+
<del>Strikethrough</del>
|- style="white-space:nowrap"
+
 
| Underline text
+
or
| <code>&lt;u>Underline&lt;/u></code>
+
 
|<u>Underline</u>
+
<s>Strikethrough</s>
|- style="white-space:nowrap"
+
</pre>
|Fixed width text
+
|
| <code>&lt;tt>Fixed width text&lt;/tt></code> or <code>&lt;code>source code&lt;/code></code>
+
<del>Strikethrough</del>
| <tt>Fixed width text</tt> or <code>source code</code>
+
 
 +
or
 +
 
 +
<s>Strikethrough</s>
 
|-
 
|-
|Blockquotes
+
| Fixed width text
| <code>
+
| <pre>
text text text text text text text text text text text text
+
<code>Source code</code>
text text text text text text text text text text text text
+
 
&lt;blockquote> quote quote quote quote quote quote &lt;/blockquote>
+
or
text text text text text text text text text text text text
+
 
</code>
+
<tt>Fixed width text</tt>
| text text text text text text text text text text text text text text text text text text text text text text text text <blockquote> quote quote quote quote quote quote </blockquote> text text text text text text text text text text text text
+
</pre>
 +
|
 +
<code>Source code</code>
 +
 
 +
or
 +
 
 +
<tt>Fixed width text</tt>
 
|-
 
|-
|Comment
+
| Blockquotes
| <code>&lt;!-- This is a comment --></code>
+
| <pre>
Text can only be viewed in the edit window.
+
text above
 +
text above
 +
<blockquote>blockquote</blockquote>
 +
text below
 +
text below
 +
</pre>
 
|
 
|
<!-- This is a real invisible comment -->
+
text above
 +
text above
 +
<blockquote>blockquote</blockquote>
 +
text below
 +
text below
 
|-
 
|-
|Completely preformatted text
+
| Comment
 +
| <pre>
 +
<!-- This is a comment -->
 +
Comments are only visible
 +
in the edit window.
 +
</pre>
 
|
 
|
<code><nowiki><pre>this way, all markups are '''ignored'''</pre></nowiki></code>
+
<!-- This is a comment -->
 +
Comments are only visible
 +
in the edit window.
 +
|-
 +
| Completely preformatted text
 +
| <pre>
 +
<pre> Text is '''preformatted''' and
 +
''markups'' '''''cannot''''' be done&lt;/pre>
 +
</pre>
 +
----
 +
{{note|For marking up of preformatted text, check the "Preformatted text" entry at the bottom of the previous table.}}
 
|
 
|
<pre> this way, all markups are '''ignored'''.</pre>
+
<pre> Text is '''preformatted''' and
 +
''markups'' '''''cannot''''' be done</pre>
 +
</pre>
 
|-
 
|-
|'''Customized''' preformatted text
+
| '''Customized''' preformatted text
 +
| <pre>
 +
<pre style="color:red">
 +
Text is '''preformatted'''
 +
with a style and
 +
''markups'' '''''cannot''''' be done
 +
&lt;/pre>
 +
</pre>
 +
----
 +
{{note|A CSS style can be named within the <code>style</code> property.}}
 
|
 
|
<code><nowiki><pre style="CSS text">this way, all markups are '''ignored''' and formatted with a CSS text</pre></nowiki></code>
+
<pre style="color:red">
|
+
Text is '''preformatted'''
<pre style="white-space:pre-wrap;white-space:-moz-pre-wrap;white-space:-pre-wrap;white-space:-o-pre-wrap;word-wrap:break-word;overflow:auto;">
+
with a style and
this way for instance, all '''ignored''' markups take into account the navigator size, by automatically adding some carriage returns dynamically to it.</pre>
+
''markups'' '''''cannot''''' be done
 +
</pre>
 
|}
 
|}
  
Line 232: Line 348:
 
* [[Help:Images|Images]]
 
* [[Help:Images|Images]]
 
* [[Help:Tables|Tables]]
 
* [[Help:Tables|Tables]]
* [[Help:Templates|Templates]]
 
 
  
 
[[Category:Help|Formatting]]
 
[[Category:Help|Formatting]]

Latest revision as of 17:22, 13 March 2011

You can format your text using wiki markup. This 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''.

Contents

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

Escape wiki markup
<nowiki>no ''markup''</nowiki>

no ''markup''

section formatting – only at the beginning of the line
Headings of different levels
== Level 2 ==
=== Level 3 ===
==== Level 4 ====
===== Level 5 =====
====== Level 6 ======

Note:
  • Skip Level 1, it is page name level.
  • An article with 4 or more headings automatically creates a Table of contents.

Level 2

Level 3

Level 4

Level 5
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<br />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<br />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
Adopting definition list to indent text
: Single indent
:: Double indent
::::: Multiple indent

Note: This workaround may be controversial from the viewpoint of accessibility.
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<br />of <nowiki><br /></nowiki>
# five
## five sub 1
### five sub 1 sub 1
## five sub 2

Note: 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''' and
 ''markups'' '''''can''''' be done

Note: This way of preformatting only applies to section formatting. Character formatting markups are still effective.
Start each line with a space.
Text is preformatted and
markups can be done
Preformatted text blocks
 <nowiki>Start with a space in the first column,
(before the <nowiki>).

Then your block format will be
    maintained.
 
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 column.
(before the <nowiki>).

Then your block format will be
    maintained.

This is good for copying in code blocks:

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

    if True:
        print True
    else:
        print False 

Paragraphs

SufiWiki 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 tags <br />.

HTML tags

Some HTML tags are allowed in SufiWiki, for example <code>, <div>, <span> and <font>. These apply anywhere you insert them.

Description You type You get
Underline
<u>Underline</u>

Underline

Strikethrough
<del>Strikethrough</del>

or

<s>Strikethrough</s>

Strikethrough

or

Strikethrough

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>

Note: For marking up of preformatted text, check the "Preformatted text" entry at the bottom of the previous table.
 Text is '''preformatted''' and
''markups'' '''''cannot''''' be done

</pre>

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

Note: A CSS style can be named within the style property.
Text is '''preformatted'''
with a style and
''markups'' '''''cannot''''' be done

Other formatting

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

Personal tools
Namespaces
Variants
Actions
 
Navigation
AWLIYA
TARIQA
SUFI GLOSSARY
Toolbox
Share Article