File: TextFormattingRules

package info (click to toggle)
hiki 0.8.6-1etch1
  • links: PTS
  • area: main
  • in suites: etch
  • size: 1,772 kB
  • ctags: 1,746
  • sloc: ruby: 20,067; lisp: 926; sh: 269; makefile: 10
file content (280 lines) | stat: -rw-r--r-- 6,964 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
{{toc}}

!Note
I still need to do some more editing, but this should be adequate for now.  -- Steve Brumbaugh, 22 November 2004

!Paragraphs
*Consecutive lines are concatenated into a single paragraph.
*Blank lines (ones with only a carriage return or with only spaces and tabs) mark the end of a paragraph.

*Example statement
 For example,
 if I write like this, these lines
 will be formatted as one paragraph.

*Example output

For example,
if I write like this, these lines
will be formatted as one paragraph.

!Links
!!WikiNames
*WikiNames are comprised of two or more words put together; each word begins with an uppercase letter, and is followed by at least one lowercase letter or number.
*Words in which this condition is met become a WikiName, and a link is automatically attached.

*Example statement
 WikiName     - WikiName
 HogeRule1    - WikiName
 NOTWIKINAME  - All of the letters are uppercase, so this is not a WikiName
 WikiNAME     - All of the letters in NAME are uppercase, so this is not a WikiName
 *fooWikiName  - This begins with "foo", which is in all lowercase, so this is not a WikiName

*Example output
**WikiName     - WikiName
**HogeRule1    - WikiName
**NOTWIKINAME  - All of the letters are uppercase, so this is not a WikiName
**WikiNAME     - All of the letters in NAME are uppercase, so this is not a WikiName
**fooWikiName  - This begins with "foo", which is in all lowercase, so this is not a WikiName

!!Linking to other Wiki pages
If a page name is surrounded with two pairs of brackets, it becomes a link to that page.

*Example statement
 For example, if you write [[TextFormattingRules]], it becomes a link to that page.

*Example output

For example, if you write [[TextFormattingRules]], it becomes a link to that page.

!!Linking to an arbitrary URL
If a phrase and URL, separated by a vertical line, are surrounded with two pairs of brackets, it becomes a link to an arbitrary URL.

*Example statement
 Links like [[Yahoo!|http://www.yahoo.com/]] are also possible.

*Example output

Links like [[Yahoo!|http://www.yahoo.com/]] are also possible.

In this case, if the URL ends with jpg., .jpeg, .png, or .gif, the image is displayed on the page.  (The specified phrase becomes the ALT text for that image.)

*Example statement
 [[Four-leaf clover|http://jp.rubyist.net/theme/clover/clover_h1.png]]

*Example output

[[Four-leaf clover|http://jp.rubyist.net/theme/clover/clover_h1.png]]

Text in a paragraph that looks like a URL will automatically become a link.

*Example statement
 Hiki's home page is http://hikiwiki.org/en/ (English).

*Example output

Hiki's home page is http://hikiwiki.org/en/ (English).

!!InterWiki
InterWiki is supported using [[Tiki:Tiki]].  To add a server, edit InterWikiName.

*Example statement
 *[[ruby-talk:1]]
 *[[Google:ruby wiki]]

*Example output
**[[ruby-talk:1]]
**[[Google:ruby wiki]]

!Preformatted text
*Lines beginning with spaces or tabs will be treated as preformatted text.

*Example output
 require 'cgi'
 
 cgi = CGI::new
 cgi.header
 
 puts <<EOS
 <html>
   <head>
     <title>Hello!</title>
   </head>
   <body>
   <p>Hello!</p>
   </body>
 </html>
 EOS

!Text decoration
*Text surrounded by sets of two single quotes ('') is emphasized.
*Text surrounded by sets of three single quotes (''') is strongly emphasized.
*Text surrounded by sets of double equal signs (===) is struck out.

*Example statement
 If you write like this, it becomes ''emphasized''.
 And if you write like this, it becomes '''strongly emphasized'''.
 ==This is dull, but== And struck-out text is supported, too!

*Example output

If you write like this, it becomes ''emphasized''.
And if you write like this, it becomes '''strongly emphasized'''.
==This is dull, but== And struck-out text is supported, too!

!Headings
* Lines with exclamation marks at the beginning become headings.
* One can use up to five exclamation marks; they will be converted to <h2> to <h6> tags.

*Example statement
 !Heading1
 !!Heading2
 !!!Heading3
 !!!!Heading4
 !!!!!Heading5

*Example output
!Heading1
!!Heading2
!!!Heading3
!!!!Heading4
!!!!!Heading5

!Horizontal lines
Four hyphens at the beginning of the line (----) become a horizontal rule.

*Example statement

 A B C D E
 ----
 F G H I J

*Example output

A B C D E
----
F G H I J

!Lists
* Lines beginning with asterisks become list items.
* It is possible to use up to three asterisks; it is also possible to create nested lists.
* Lines beginning with a # become numbered lists.

*Example statement
 *Item 1
 **Item 1.1
 **Item 1.2
 ***Item 1.2.1
 ***Item 1.2.2
 ***Item 1.2.3
 **Item 1.3
 **Item 1.4
 *Item 2

 #Item 1
 #Item 2
 ##Item 2.1
 ##Item 2.2
 ##Item 2.3
 #Item 3
 ##Item 3.1
 ###Item 3.1.1
 ###Item 3.1.2

*Example output

*Item 1
**Item 1.1
**Item 1.2
***Item 1.2.1
***Item 1.2.2
***Item 1.2.3
**Item 1.3
**Item 1.4
*Item 2

#Item 1
#Item 2
##Item 2.1
##Item 2.2
##Item 2.3
#Item 3
##Item 3.1
###Item 3.1.1
###Item 3.1.2

!Quotations
Lines beginning with two double quotes become quotations.

*Example statement
 ""This is a quotation.
 ""This is another quote.
 ""This is a continued quote.  When there are consecutive quotations,
 ""they are displayed as one quote,
 ""like this.

*Example output
""This is a quotation.
""This is another quote.
""This is a continued quote.  When there are consecutive quotations,
""they are displayed as one quote,
""like this.

!Definitions
Lines beginning with a colon and have a phrase and explanation separated by another colon will become a definition.

*Example statement

 :ringo:apple
 :gorira:gorilla
 :rakuda:camel

*Example output
:ringo:apple
:gorira:gorilla
:rakuda:camel


! Tables
Tables begin with two vertical bars.
Leading `!' in a cell means that it is a heading cell.
To concatenate columns or rows, put `>'(columns) or `^'(rows) at
head of the cell.

* Example statement
 ||!row heading \ column heading||!column A||!column B||!column C||!>column D-E (horizontal concatenation)
 ||!row 1||A1||B1||^C1-C2 (vertical concatenation)||D1||E1
 ||!row 2||A2||B2||^>D2-E2-D3-E3 (vertical and horizontal concatenation)
 ||!row 3||>>A3-C3 (horizontal concatenation)

* Example output
||!row heading \ column heading||!column A||!column B||!column C||!>column D-E (horizontal concatenation)
||!row 1||A1||B1||^C1-C2 (vertical concatenation)||D1||E1
||!row 2||A2||B2||^>D2-E2-D3-E3 (vertical and horizontal concatenation)
||!row 3||>>A3-C3 (horizontal concatenation)


! Comments
Lines starting with `//' becomes a comment line.
Comment lines is not outputted.

* Example statement
  // This is a comment line.

* Example output (not displayed)
// This is a comment line.


!Plugins
One can use a plugin by surrounding text with two pairs of brackets.
Multiple lines parameter is supported.
When a line contains plugin only, it is becomes a block plugin,
which is not surrounded by <p> ... </p>.

*Example statement
 {{recent(3)}}

* Example statement of multiple lines
 {{pre('
 ...
 ')}}