HelpOnMoinWikiSyntax

来自公开记录
跳到导航 跳到搜索

Moin Wiki Syntax

<<()>>

This page aims to introduce the most important elements of MoinMoin's syntax at a glance, showing first the markup verbatim and then how it is rendered by the wiki engine. Additionally, you'll find links to the relative help pages. Please note that some of the features depend on your configuration.

Headings and table of contents

see: HelpOnHeadlines

Table of contents:
<<TableOfContents()>>

Table of contents (up to 2nd level headings only):
<<TableOfContents(2)>>

= heading 1st level =
== heading 2nd level ==
=== heading 3rd level ===
==== heading 4th level ====
===== heading 5th level =====
====== no heading 6th level ======


#!wiki dashed
Table of contents:
<<TableOfContents()>>

Table of contents (up to 2nd level headings only):
<<TableOfContents(2)>>

= heading 1st level =
== heading 2nd level ==
=== heading 3rd level ===
==== heading 4th level ====
===== heading 5th level =====
====== no heading 6th level ======


Text Formatting

see: HelpOnFormatting

Markup
`italic`
`bold`
|`monospace`
`code`
`underline`
`superscript`
`subscript`
`smaller`
`larger`
`stroke`

Hyperlinks

see: HelpOnLinking

Internal Links

Markup
`FrontPage`
`FrontPage`
`HelpOnEditing/SubPages`
`/SubPage`
`../SiblingPage`
`named link`
`[[[#anchorname|description]]]`
`PageName#anchorname`
`description`
`[[[Media:HelpOnMoinWikiSyntax$filename.txt]]`

External Links

Markup
`http://moinmo.in/`
`[[1]]`
`[Wiki]`
`[[2]]`
`模板:Http://static.moinmo.in/logos/moinmoin.png`
`[[3]]`
`MeatBall:InterWiki`
`[[[MeatBall]]:InterWiki|InterWiki page on MeatBall]]`
`link to filename.txt`
`user@example.com`

Avoid or Limit Automatic Linking

Markup
`Wiki'Name`
|WikiName
`WikiName`
`WikiName's`
|[[WikiName]]s
|`http://www.example.com`
`[[4]]notlinked`

Drawings

see: HelpOnDrawings

TWikiDraw

模板:Drawing:myexample

AnyWikiDraw

模板:Drawing:myexample.adraw

Blockquotes and Indentations

 indented text
  text indented to the 2nd level


#!wiki dashed
 indented text
  text indented to the 2nd level


Lists

see: HelpOnLists

Unordered Lists

 * item 1

 * item 2 (preceding white space)
  * item 2.1
   * item 2.1.1
 * item 3
  . item 3.1 (bulletless)
 . item 4 (bulletless)
  * item 4.1
   . item 4.1.1 (bulletless)


#!wiki dashed
 * item 1

 * item 2 (preceding white space)
  * item 2.1
   * item 2.1.1
 * item 3
  . item 3.1 (bulletless)
 . item 4 (bulletless)
  * item 4.1
   . item 4.1.1 (bulletless)


Ordered Lists

with Numbers

 1. item 1
   1. item 1.1
   1. item 1.2
 1. item 2


#!wiki dashed
 1. item 1
   1. item 1.1
   1. item 1.2
 1. item 2

with Roman Numbers

 I. item 1
   i. item 1.1
   i. item 1.2
 I. item 2


#!wiki dashed
 I. item 1
   i. item 1.1
   i. item 1.2
 I. item 2


with Letters

 A. item A
   a. item A. a)
   a. item A. b)
 A. item B


#!wiki dashed
 A. item A
   a. item A. a)
   a. item A. b)
 A. item B

Definition Lists

 term:: definition
 object::
 :: description 1
 :: description 2


#!wiki dashed
 term:: definition
 object::
 :: description 1
 :: description 2


Horizontal Rules

see: HelpOnRules

----
-----
------
-------
--------
---------
----------


#!wiki dashed
----
-----
------
-------
--------
---------
----------


Tables

see: HelpOnTables

Tables

||'''A'''||'''B'''||'''C'''||
||1      ||2      ||3      ||


#!wiki dashed
||'''A'''||'''B'''||'''C'''||
||1      ||2      ||3      ||

Cell Width

||minimal width ||<99%>maximal width ||


#!wiki dashed
||minimal width ||<99%>maximal width ||


Spanning Rows and Columns

||<|2> cell spanning 2 rows ||cell in the 2nd column ||
||cell in the 2nd column of the 2nd row ||
||<-2> cell spanning 2 columns ||
||||use empty cells as a shorthand ||


#!wiki dashed
||<|2> cell spanning 2 rows ||cell in the 2nd column ||
||cell in the 2nd column of the 2nd row ||
||<-2> cell spanning 2 columns ||
||||use empty cells as a shorthand ||


Alignment of Cell Contents

||<^|3> top (combined) ||<:99%> center (combined) ||<v|3> bottom (combined) ||
||<)> right ||
||<(> left ||


#!wiki dashed
||<^|3> top (combined) ||<:99%> center (combined) ||<v|3> bottom (combined) ||
||<)> right ||
||<(> left ||


Coloured Table Cells

||<#0000FF> blue ||<#00FF00> green    ||<#FF0000> red    ||
||<#00FFFF> cyan ||<#FF00FF> magenta  ||<#FFFF00> yellow ||


#!wiki dashed
||<#0000FF> blue ||<#00FF00> green    ||<#FF0000> red    ||
||<#00FFFF> cyan ||<#FF00FF> magenta  ||<#FFFF00> yellow ||


HTML-like Options for Tables

||A ||<rowspan="2"> like <|2> ||
||<bgcolor="#00FF00"> like <#00FF00> ||
||<colspan="2"> like <-2>||


#!wiki dashed
||A ||<rowspan="2"> like <|2> ||
||<bgcolor="#00FF00"> like <#00FF00> ||
||<colspan="2"> like <-2>||


Macros and Variables

Macros

see: HelpOnMacros

  • <<Anchor(anchorname)>>`<<Anchor(anchorname)>>` inserts a link anchor `anchorname`
  • `<
    >` inserts a hard line break
  • `<<FootNote(Note)>>` inserts a footnote saying `Note`
  • `<<Include(HelpOnMacros/Include)>>` inserts the contents of the page `HelpOnMacros/Include` inline
  • `<<MailTo(user AT example DOT com)>>` obfuscates the email address `user@example.com` to users not logged in

Variables

see: HelpOnVariables

  • `@SIG@` inserts your login name and timestamp of modification
  • `@TIME@` inserts date and time of modification

Smileys and Icons

see: HelpOnSmileys <<ShowSmileys>>

Parsers

see: HelpOnParsers

Verbatim Display

{
{{{
def hello():
    print "Hello World!"

</nowiki>

}


def hello():
    print "Hello World!"


Syntax Highlighting

{
{{{#!highlight python
def hello():
    print "Hello World!"

</nowiki>

}


#!highlight python
def hello():
    print "Hello World!"


Using the wiki parser with css classes

{
{{{#!wiki red/solid
This is wiki markup in a '''div''' with __css__ `class="red solid"`.

</nowiki>

}


#!wiki red/solid
This is wiki markup in a '''div''' with __css__ `class="red solid"`.


Admonitions

see: HelpOnAdmonitions


{
{{{#!wiki caution
'''Don't overuse admonitions'''

Admonitions should be used with care. A page riddled with admonitions will look restless and will be harder to follow than a page where admonitions are used sparingly.

</nowiki>

}


#!wiki caution
'''Don't overuse admonitions'''

Admonitions should be used with care. A page riddled with admonitions will look restless and will be harder to follow than a page where admonitions are used sparingly.


Comments

see: HelpOnComments


Click on "Comments" in edit bar to toggle the /* comments */ visibility.


#!wiki dashed
Click on "Comments" in edit bar to toggle the /* comments */ visibility.


{
{{{#!wiki comment/dashed
This is a wiki parser section with class "comment dashed" (see HelpOnParsers).

Its visibility gets toggled the same way.

</nowiki>

}


#!wiki comment/dashed
This is a wiki parser section with class "comment dashed" (see HelpOnParsers).

Its visibility gets toggled the same way.