Japanese Version : FormattingRules


Text Formatting Rules

Most text is displayed as it is written.

Use the formatting rules below to decorate texts. For the formatting with plugins, only the most commonly used ones are explained here. See PukiWiki/1.4/Manual/Plugin? for the details of the plugin options.


The input text of PukiWiki? is usually shown in the same way as it was entered. However, you can use the following rules to enhance your texts. The use of HTML tags is forbidden. Instead, special characters can be used to format text. Formatting rules usually apply to a certain part of the text. Such a part of a text is called a text Element.

Elements

First of all, let's describe the "world" of PukiWiki?. PukiWiki? treats text as a set of Elements. An empty line indicates the end of an Element. Elements can contain other Elements. Such contained Elements are called "Child Elements". The element which contains "Child Elements" is called a "Parent Element".

Example:
These two lines:

~This is a paragraph. It is the parent element which contains an emphasized text element.  
''This is emphasized text, which is the child element of the paragraph element.''

Will be formatted like this:

This is a paragraph. It is the parent element which contains an emphasized text element.
This is emphasized text, which is the child element of the paragraph element.

There are two kinds of elements in PukiWiki?: "Block Elements", and "Inline Elements".
Block Elements, as the name suggests, consist of a whole block of text. Inline Elements
only consist of a part of a text block. In essence, the difference between Block Elements and Inline Elements is as follows:

Next, we'll describe the two different kinds of elements in detail.

Block Elements

Paragraph

Inline Elements

PukiWiki? assumes that each new Block is the beginning of a new paragraph, unless you instruct it to format the text differently, by using the formatting codes of other Block Elements.

~Inline Elements

A line that starts with "~" indicates the beginning of a new paragraph. "~" also enables you escape the special characters (~。「-。「+。「:。「>。「|。「#。「//) that are normally used as "Formatting Characters". Normally, these characters indicate the beginning of another kind of Element. Thus, the only way to put the special characters as a normal text at the beginning of a Paragraph is by putting a "~" in front of them.

Quotation

>Inline Element

A ">" character indicates the beginning of Quotation. Quotation has 3 indentation levels, indicated by: ">", ">>", and ">>>".

List

-Inline Element

At the beginning of a line,"-" indicates the beginning of an Unordered List. Unordered lists have three levels, namely:"-", "--", and "---".

:Item|Item's Definition

Definition List is a line starting with ":" and separated by "|" in the middle. There are three indentation levels for Definition List: ":", "::", and ":::".

You may omit the Item or the Definition. You may give multiple definitions to an item by writing a sequence of Definition List and omitting the Item after the first one.

Preformatted Texts

"White Space" at the beginning of a line indicates the beginning of Preformatted Text. Line breaks are not automatically inserted in Preformatted Text.

Table

|Inline Element|Inline Element|

Inline Elements that are separated by "|", will be formatted as a Table. Remember that there needs to be a "|" character as well before the first Element of the table.

AAABBBCCCDDD

CSV Style Table

,Inline Element,Inline Element,。ト

Inline Elements that are separated by ","(comma), will be formatted as a Table. Note that you must write "," before the first Element of the CSV Style Table.

aaaaaaaaabbbbbbbccccccc
leftcenterright
<-- colspantest

Heading

*Inline Element

A line that starts wit an "*" character becomes a Heading Element. There are three levels of heading Elements, namely: "*", "**",and "***".

Table of Contents

#contents

"#contents" at the beginning of the line creates Table of Contents based on the Headings. Generally, "#contents" are written on the top part of the page.

LEFT-CENTERED-RIGHT

LEFT:Inline Element
CENTER:Inline Element
RIGHT:Inline Element

Writing "LEFT:", "CENTER:", or "RIGHT:" at the beginning of the line aligns the Inline Element.

Horizontal Rule

----

Four or more "-" placed at the beginning of a line are shown as a horizontal rule.

Line Break

#br

"#br" placed at the beginning of a line makes a line break in a block element or between block elements. *1。」

Embedding Files and Images

#ref(file name)
#ref(URL of the file)

You can attach a file by writing #ref(file name) at the beginning of a line.
You can place a hypertext link by writing #ref(URL of the file) at the beginning of a line.
If the file attached or linked is an image, the image is displayed.

Disabling text wraparound

#clear 

#clear placed at the beginning of the line cancels the text wraparound set in #ref. Wraparound is always cancelled at the end of the texts even without #clear.

Form

#comment

"#comment" at the beginning of the line embeds a form to post comments.

#pcomment

"#pcomment" at the beginning of the line embeds a form to post comments. Unlike "#comment", posted comments are recorded on a seperate page. Also, responses to a comment is displayed as tree structure.

#article

"#article" at the beginning of the line embeds a simple forum.

#vote(Option1,Option2,...)

"#vote" at the beginning of the line embeds a simple form for voting.

Inline Elements

Strings

Strings

Strings are an Inline Element.

Line Breaks

Inline Element~

Writing "~" at the end of the line inserts End of Line a line break. End of Line is a line break within a Block Element.

&br;

Writing &br; breaks the line. Unlike "~" at the end of the line, Line Break may be used within the Item of Definition List, Item of a Table, or in the parameter of Block Elements starting with "#".

Emphasis

''Inline Element''

Enclosing Inline Element with '' puts emphasis on the element (Bold font).

'''Inline Element'''

Enclosing Inline Element with ''' puts emphasis on the element (Italics).

Font Size

&size(Size){Inline Elements};

&size sets the size of inline elements in pixels (px).

Font Color

&color(color){Inline Elements};

&color sets the color of inline elements.

Line Strikethrough

%%Inline Elements%%

Inline elements enclosed with %% makes texts with strikethrough.

Footnote

((Inline Elements))

Inline elements enclosed with (( and )) makes a footnote. A link to the footnote is created in the text. Footnotes cannot be nested.

Embedded Files and Images

&ref(File Name);
&ref(URL);

&ref makes a link to an attachment file or a URL. If the attachment is an image file, the image is displayed.

Ruby

&ruby(ruby string){Inline Elements};

&ruby makes a ruby (short runs of text alongside the base text) for inline elements. In a browser does not support a ruby, it is displayed as texts surrounded by ( ).

Anchor

&aname(anchor name);
&aname(anchor name){Inline Elements};

&aname; makes an anchor for a link.

Counter

&counter;
&counter(options);

&counter; makes a counter that displays the number of accesses to the page.

Online Viewers

&online;

&online; displays the number of current accesses.

Version

&version;

&version displays the version of PukiWiki?.

WikiName?

WikiName

WikiName? stands for two or more Capitalized Words joined together without spaces, muti-byte characters, symbols, and numbers.

BracketName?

[[BracketName]]

A string enclosed with [[ and ]] makes BracketName?, which is another link style in Pukiwiki.

InterWiki?

[[InterWikiName:PageName]]

By seperating a BracketName? with : , you can create an InterWiki? block, which is another link style in Pukiwiki. The former part must contain an InterWikiName which is defined at InterWikiName which contains a list of defined InterWikiName. (What does this mean? It's not very clear.) The latter part must contain a WikiName? or a BracketName? without [[ and ]].

Link

[[Link Name:URL]]

By seperating a BracketName? with : , you can creat a Link block, which is yet another link style in Pukiwiki. The former part can contain a certain string which is used for the displayed name of a link. The latter part must contain a URL.

http://...
https://...
ftp://...
news://...
mailto:...

Alias

[[Alias>PageName]]

By seperating a BracketName? with > , you can creat an Alias, which is another link style in Pukiwiki. The former part can contain a certain string which is used for a name of a link. The latter part must contain a WikiName? or a BracketName? styled string without [[ and ]].

Alias enables you to make a link to a page in Pukiwiki with a different name.

You can also use an "anchor" to direct you to a certain part of a page. When you use an anchor as an internal link, you can omit a PageName?.:|

[[Alias>PageName#anchor]]
[[Alias>#anchor]]

Entity

*Page Name Entity

&page;

&page; is converted to the name of current editing page.

*Date Entity

&date;
&time;
&now;

&date; is converted to the current date.

&time; is converted to the current time.

&now; is converted to the current date and time.

*Character Entities

In addition to the character entities defined in SGML (e.g., &copy;, &reg;, etc.), the following entities can be used.

&#38;heart;
&#38;smile;
&#38;bigsmile;
&#38;huh;
&#38;oh;
&#38;wink;
&#38;sad;
&#38;worried;

*Numeric Entity

&#Decimal-number;
&#xHexadecimal-number;

By writing a decimal number between &# and ; or a hexadecimal number between &#x and ;, a Unicode character can be displayed. You may use this inline element to insert characters which you cannot directly type with your keyboard.

Take a look at the examples in the following table:

Special entityCodeComments
&#19990;You can use characters from all over the world!
&#8734;We could go on like this forever...
Ω&#937;But here it must end.

Others

Commnet line

// Comments

A line beginning with // is a comment. It is not displayed on the wiki page.


Prohibition

Block Elementcan contain other block elementscan be contained by other block elements
Paragraphnoyes
Prefpmattednoyes
Headingsnono
Tablenoyes
Table(CSV)noyes
List(unordered)yes*yes
List(ordered)yes*yes
Quoteyes*²yes
Horizontal Linenoyes
LEFT:/CENTER:/RIGHT:noyes
#refnoyes
#contentsnoyes*³
#commentnoyes*³
#pcommentnoyes*³
#articlenoyes*³
#vote(choice1,choice2,...)noyes*³

* As long as the beginning of Child Element is Inline Element or Paragraph,
you can insert a Block Element to the next line. (Please refer to "Nesting Element" for an example.)

*²When Quotation is a Child Element of another Quotation, you need to increase the inentation level by 1.

*³ Due to pukiwiki's default setting of left margin, this is not recommended.


Compare Link Styles

Here is a section to explain the differences between WikiName?, BracketName?, InterWiki?, Link, and Alias.

WikiName? and BracketName?

As you know by now, all of them are used in Pukiwiki to make a link to a page.
And the difference betweem them is whether or not you can use spaces, multibyte-characters, symbols, and numbers. Thus, a BracketName? would be a better choice if you want to avoid the typical WikiName? capitalized link style. Usually, all Capitalized strings will be shown as a link. However, you can disable WikiNames? in pukiwiki.ini.php if you think they are annoying.

InterWiki?, Link, and Alias

These styles are very similar, so they might be confusing. But each of them has it's own purpose. If you understand the differences, they are all very useful.

First let's focus on their grammatical styles.

[[pukiwiki:Use PukiWiki]]..........[a]
[[whatever u like:http://pukiwiki.sourceforge.jp/?Use%20PukiWiki]]...[b]
[[Another Name>Text Formatting Rule]]......[c]

[a] is an InterWiki? styled link. And [b] is a Link styled link.
Finaly, both of them will direct us the same page: http://pukiwiki.sourceforge.jp/?Use%20PukiWiki .
This is so, because pukiwi is defined in the InterWikiName as followins:

[http://pukiwiki.sourceforge.jp/? pukiwiki] utf8

Thus InterWiki? combines two pieces of information. The first piece is a URL defined in InterWikiName, and the other is the information provided by the right side attribute.
InterWikiName is a kind of short cut. You can define any URL for an InterWikiName.

For example, when you create an link to external/internal wiki page, it is annoying to have to type the whole URL each time you want to use it. In this case, as an alternative, you can define an InterWikiName.

As you can see, [c] is a Alias styled link. You can use it to display a different link text for a link to a page in PukiWiki?.

In conclusion, the most important difference you need to understand is
Which side is which?

Link StyleLeft SideRight Side
InterWiki?InterWikiName(Defined URL)Additional URL
LinkLink textReal URL
AliasLink textReal URL(WikiName?/BracketName?)


Nesting Elements

Paragraph Element-Emphasize Element

~This is the paragraph, which is the parent element that contains the emphasized. 
''This is the emphasized text that is the child element of the paragraph element.''

This is the paragraph, which is the parent element that contains the emphasized.
This is the emphasized text that is the child element of the paragraph element.

Quotation Element-List Element

Level[0]
>Quotation Level[1]AAA
>Quotation Level[1]BBB
>>Quotation Level[2]AAA
>>Quotation Level[2]BBB
>>>Quotation Level[3]
-Child Element-List Level[1]
|TABLE|ELEMENT|NEXT|to|inline|element|in list|
--Child Element-List Level[2]
&br;Line Break in a Element
---Child Element-List Level[3]
--Child Element-List Level[2]
---Child Element-List Level[3]
>Quotation Level[1]
>>Quotation Level[2]
<<Get out of the Quotation Level2 Element
>>>Quotation Level[3]AAA
>>>Quotation Level[3]BBB
-Child Element-List Level[1]
--Child Element-List Level[2]
---Child Element-List Level[3]

Level[0]

Quotation Level[1]AAA

Quotation Level[1]BBB

Quotation Level[2]AAA

Quotation Level[2]BBB

Quotation Level[3]

  • Child Element-List Level[1]
    TABLEELEMENTNEXTtothe Inlineelementin a list
    • Child Element-List Level[2]

      Line Break in a Element
      • Child Element-List Level[3]
    • Child Element-List Level[2]
      • Child Element-List Level[3]

        Quotation Level[1]

        Quotation Level[2]

        Get out of the Quotation Level2 Element

        Quotation Level[3]AAA

        Quotation Level[3]BBB

        • Child Element-List Level[1]
          • Child Element-List Level[2]
            • Child Element-List Level[3]

(The texts below are for the discussion in the translation team. Don't worry if it's written in Japanese:)


Translation patterns

:CategoryDev/Document?

PukiWiki/1.4/ナコノユハクス?

../Text Formatting Rule?

Japanese Version : PukiWiki/1.4/ナコノユハクス/FormattingRules?


Inline Elements

In the following table you can see how to use the inline text elements of PukiWiki?

Format exampleFormatting codeComment
Emphasised text''Emphasised text''Put the text between two single quotes.
Italic text'''Italic text'''Put the text between three single quotes.
Text with
a break
Text with &br; a break
Text in font size 24&size(24){Text in font size 24};
Purple text&color(purple){Purple text};
Colored text&color(#123456){Colored text};
Red text with yellow backbround&color(red,yellow){Red text with yellow background};
Strikethrough text%%Strikethrough text%%
*2((This is the footnote's text))This inserts a footnote with the given text at the bottom of the page.
filewww.example.com&ref(http://www.example.com);This inserts a reference.
&aname(Anchor);This inserts an invisible anchor for hyperlinking.
677&counter;This inserts a counter. What does it count, in fact?
1&online;What does this do, in fact?
1.4.7&version;I guess this inserts the current version number of PukiWiki? itself?
WikiName?WikiNameThis create a link to another pages on the same Pukiwiki site.
BracketName?[[BracketName]]This creates a link to another page on a same Pukiwiki site.
External link[[External link:http://www.example.com]]This creates links to pages on other web sites.
InterWikiLink:page name[[InterWikiLink:page name]]This creates a link to another Wiki, right?
Paragraph~Paragraph
Inline text
Inline text
Inline text&br;Inline text&br; is replaced with a line break.
Inline text~
#plug-in
Inline text~
#plug-in
The ~, followed by a line break works as an escape character that disables the # character, which normally activates a plugin.


Block Elements

In what follows, examples for the block elements will be given.
First, you will see the example as it should be entered into PukiWiki?,and
next is the result you'll get.

Preformatted text

 Preformatted text. There is a space in front of this text.
Preformatted text. There is a space in front of this text. 


Headings

*Heading level 1
**Heading level 2
***Heading level 3

There are no examples of how the heading looks like here,
because they would disturb the structure of this document.
But take a look at the headings above and below to see how
it might look.

Paragraphs and the tilde as and escape character

~Paragraph
~*This will not be displayed as a heading

Paragraph

*This will not be displayed as a heading

Line break escape example~
#comment (disables first letter formatting rule, which is used to activate plug-ins.)

Line break escape example

#comment (disables first letter formatting rule, which is used to activate plug-ins.)

Quotes

>Quote Level 1
>>Quote Level 2
>>>Quote Level 3

Quote Level 1

Quote Level 2

Quote Level 3

Unordered lists

-Unordered list level 1
--Unordered list level 2
---Unordered list level 3

Ordered lists

+Ordered list level 1
++Ordered list level 2
+++Ordered list level 3
  1. Ordered list level 1
    1. Ordered list level 2
      1. Ordered list level 3

Definition lists

:Definition|Description
Definition
Description

Comments

A comment is hidden here: 
//Comment

A comment is hidden here:

Horizontal Rule

----

Table

Simple

|aaa|bbb|ccc|
|111|222|333|
aaabbbccc
111222333

Advanced

|RIGHT:100|CENTER:|SIZE(20)|c -------------- format definition line
|~Header|Header2|Header3|h ----------------- header line
|CENTER:lowspan|COLOR(red):bbb|ccc|
|~|222|COLOR(#ff0000):BGCOLOR(yellow):333|
|footer|>|CENTER:colspan|f ----------------- footer line
HeaderHeader2Header3
footercolspan
lowspanbbbccc
222333

CSV Table

,aaa,bbb,ccc
,111,222,333
aaabbbccc
111222333

Special entities :

Special entityCodeComments
[heart]&heart;
©&copy;
®&reg;
&trade;
²&sup2;
³&sup3;
 &nbsp;You may not be able to see it,
but there is a non-breaking space in the first column.
It prevents a line from being broken at that point.
&#10;You can define any unicode character up to #32000 using this code. Please note that you need a font that supports the character, or you will not be able to see it.
&#19990;You can use characters from all over the world!
&#9794;It is a man's world.
&#9792;But it would be nothing without a woman.
&#8734;We could go on like this forever...
Ω&#937;But here it must end.


Nesting Elements

Paragraph Element-Emphasize Element

~This is the paragraph, which is the parent element that contains emphasized text. 
''This is the emphasized text, that is the child element of the paragraph element.''

This is the paragraph, which is the parent element that contains emphasized text.
This is the emphasized text, that is the child element of the paragraph element.

Quotation Element-List Element

Level[0]
>Quotation Level[1]AAA
~Quotation Level[1]BBB
>>Quotation Level[2]AAA
~Quotation Level[2]BBB
>>>Quotation Level[3]
-Child Element-List Level[1]
|TABLE|ELEMENT|NEXT|to|the Inline|element|in a list|
--Child Element-List Level[2]
&br;Line Break in a Element
---Child Element-List Level[3]
--Child Element-List Level[2]
---Child Element-List Level[3]
<<Quotation Level[1]
>>Quotation Level[2]
<<Get out of the Quotation Level2 Element
>>>Quotation Level[3]AAA
>>>Quotation Level[3]BBB
-Child Element-List Level[1]
--Child Element-List Level[2]
---Child Element-List Level[3]

Level[0]

Quotation Level[1]AAA

Quotation Level[1]BBB

Quotation Level[2]AAA

Quotation Level[2]BBB

Quotation Level[3]

  • Child Element-List Level[1]
    TABLEELEMENTNEXTtothe Inlineelementin a list
    • Child Element-List Level[2]

      Line Break in a Element
      • Child Element-List Level[3]
    • Child Element-List Level[2]
      • Child Element-List Level[3]

Quotation Level[1]

Quotation Level[2]

Get out of the Quotation Level2 Element

Quotation Level[3]AAA

Quotation Level[3]BBB

  • Child Element-List Level[1]
    • Child Element-List Level[2]
      • Child Element-List Level[3]

This section needs to be brushed up.


*1 #br placed right after an empty line next to a block element makes a line break that separates blocks. #br placed right after a block element makes a line break inside that block element. Unlike a line break in a wiki text, #br preserves the format of the line following it.
*2 This is the footnote's text

well-yokodai.org is managed by housemates using wiki since 2007. mail : well.yokodai at gmail.com
  [edit this site] ハヤスク ナ犢 コケハャ ・ミ・テ・ッ・「・テ・ラ ナコノユ ハ」タス フセチーハムケケ ・・。シ・ノ   ソキオャ ーヘ テアクク。コ コヌスェケケソキ ハヤスク   ・リ・・ラ コヌスェケケソキ、ホRSS