]> CyberLeo.Net >> Repos - SourceForge/phpwiki.git/blob - pgsrc/Help%2FTextFormattingRules
Wikicreole syntax
[SourceForge/phpwiki.git] / pgsrc / Help%2FTextFormattingRules
1 Date: Thu,  9 Dec 2010 14:51:45 +0000
2 Mime-Version: 1.0 (Produced by PhpWiki 1.4.0RC1)
3 X-Rcs-Id: $Id$
4 Content-Type: application/x-phpwiki;
5   pagename=Help%2FTextFormattingRules;
6   flags=PAGE_LOCKED;
7   markup=2;
8   charset=UTF-8
9 Content-Transfer-Encoding: binary
10
11 <<CreateToc with_toclink||=1 position=right >>
12
13 == Synopsis ==
14
15 **Emphasis:** ##~/~/## for //italics//, ##~*~*## for **bold**, ##~*~*~/~/...~/~/~*~*## for **//both//**, ##~#~### for ##fixed width##. \\
16 **Lists:** ##~*## for bullet lists, ##~### for numbered lists; use multiple ##~*## or ##~### for nested lists. \\
17 **Headings:** "##~=~=##", "##~=~=~=##", "##~=~=~=~=##", etc. make headings. \\
18 **Preformatted text:** Enclose text in ##~{~{~{...~}~}~}## or ##~<pre>~</pre>##. \\
19 **Indented text:** Indent the paragraph with whitespaces. \\
20 **References:** use double square brackets for a ##~[~[page link~]~]## or URL ##~[~[~http:~//cool.wiki.int/~]~]##. \\
21 **References:** use pipe ##~|## to name the links: ##~[~[page link~|some text~]~]## or ##~[~[~http:~//cool.wiki.int/~|some text~]~]##. \\
22 **Preventing linking:** Prefix with "##~~##": ##~~~DoNotHyperlink##. \\
23 **Misc:** "##~\~\##" makes a linebreak, "##~----##" makes a horizontal rule. \\
24 **Allowed HTML tags:** <b>b</b> <big>big</big> <i>i</i>
25 <small>small</small> ##tt## <em>em</em> <strong>strong</strong>
26 <s>s</s> <strike>strike</strike>
27 <abbr>abbr</abbr> <acronym>acronym</acronym> <cite>cite</cite>
28 <code>code</code> <dfn>dfn</dfn> <kbd>kbd</kbd> <samp>samp</samp>
29 <var>var</var> <sup>sup</sup> <sub>sub</sub> \\
30 **More:** [[Help:TextFormattingRules#Tables|tables]], [[Help:TextFormattingRules#Images|images]],
31 [[Help:CreateTocPlugin|table of contents]], [[Help:TextFormattingRules#Inserting_plugins|plugins]]
32
33 More explanations: [[Help:TextFormattingRules]]
34
35 == Character Formatting ==
36
37 === Emphasis ===
38
39 * Use a double slash (##~/~/##) for emphasis (usually //italics//)
40 * Use a double asterisk (##~*~*##) for strong emphasis (usually **bold**)
41 * Mix them at will: **//bold italics//**
42 * //Emphasis// can be used //multiple// times within a paragraph, but **cannot** cross paragraph boundaries:
43
44 // this
45
46 will not work//
47
48 === Monospace ===
49
50 Monospace text is made using two hashes:
51
52 {{{
53 This sentence contains ##monospace text##.
54 }}}
55
56 This sentence contains ##monospace text##.
57
58 === Superscript ===
59
60 Superscript text is made using two carets:
61
62 {{{
63 The XX^^th^^ century.
64 }}}
65
66 The XX^^th^^ century.
67
68 === Subscript ===
69
70 Subscript text is made using two commas:
71
72 {{{
73 Water is H,,2,,O.
74 }}}
75
76 Water is H,,2,,O.
77
78 === Fonts ===
79
80 There's no syntax for font tags.
81
82 === Color Text ===
83
84 Is it possible to write text in color.
85
86 {{{
87 %color=green% green text %% and back to normal
88 }}}
89 will give:
90 %%%
91 %color=green% green text %% and back to normal
92
93 The easiest way to do it is to use the COLOR button in the Edit Toolbar.
94 The text will be in green by default. You can then change the color.
95
96 Allowed colors are:
97 * an HTML color number (# followed by 3 or 6 digits),
98 * the following predefined color names:
99 {| class="bordered"
100 |-
101 | %color=aqua% aqua %%
102 | bgcolor="#565c5e" | %color=beige% beige %%
103 | %color=black% black %%
104 | %color=blue% blue %%
105 | %color=brown% brown %%
106 | %color=chocolate% chocolate %%
107 | %color=cyan% cyan %%
108 | %color=fuchsia% fuchsia %%
109 | %color=gold% gold %%
110 | %color=gray% gray %%
111 |-
112 | %color=green% green %%
113 | bgcolor="#565c5e" | %color=ivory% ivory %%
114 | %color=indigo% indigo %%
115 | %color=lime% lime %%
116 | %color=magenta% magenta %%
117 | %color=maroon% maroon %%
118 | %color=navy% navy %%
119 | %color=olive% olive %%
120 | %color=orange% orange %%
121 | %color=pink% pink %%
122 |-
123 | %color=purple% purple %%
124 | %color=red% red %%
125 | %color=salmon% salmon %%
126 | %color=silver% silver %%
127 | bgcolor="#565c5e" | %color=snow% snow %%
128 | %color=teal% teal %%
129 | %color=turquoise% turquoise %%
130 | %color=violet% violet %%
131 | bgcolor="#565c5e" | %color=white% white %%
132 | %color=yellow% yellow %%
133 |}
134
135 Note: you can put the headers in color, but only if you do not have a table of content. For now, the table of content is incompatible with color headers.
136
137 === Escape Character ===
138
139 The tilde '~~' is the //Escape Character//:
140 * A single tilde '~~' followed by nothing gets rendered as a single tilde. => ~
141 * Two tilde '~~~~' get rendered as a single tilde. => ~~
142 * A single tilde before a link ('~~http~:~/~/foo.bar') prevents linking.  => ~http://foo.bar
143 * Two tildes before a link ('~~~~http~:~/~/foo.bar') produce a tilde followed by the hyperlinked URL.  => ~~http://foo.bar
144 * A tilde inside an URL gets removed, unless it's formatted inside square brackets.
145 * Two tildes inside an URL (without brackets) become a single tilde.  => [[http://foo.bar/~user]] or http://foo.bar/~~user
146
147 === Special Characters ===
148
149 All special non-whitespace HTML characters are displayed as-is. Exceptions below.
150
151 Special non-ASCII or non-latin characters are printed as-is only if supported
152 by the native wiki CHARSET. Add such characters on a non-supported CHARSET with the [[Help:RawHtmlPlugin]] if it is enabled by the Admin and e.g. the ##&#num;## syntax.
153
154 E.g. These Japanese chars '&#12363;&#12425; &#26032;&#35215;&#12506;&#12540;&#12472;'
155 on this <<SystemInfo CHARSET>> wiki.
156
157 And with the plugin: <<RawHtml &#12363;&#12425; &#26032;&#35215;&#12506;&#12540;&#12472;>>
158
159 And this is how it should look: [[http://phpwiki.sourceforge.net/demo/images/chars-releasenotes-japanese.png]]
160
161 == Paragraphs ==
162
163 * Don't indent paragraphs
164 * Words wrap and fill as needed
165 * Use blank lines as separators
166 * Four or more minus signs make a horizontal rule
167 * "##~\~\##", "##~%%%##" or "##~<br>##" makes a linebreak (in headings and lists too)
168
169 == Lists ==
170
171 === Unordered lists ===
172
173 Recommended syntax (Wikicreole):
174 * asterisk for first level
175 * double asterisk for second level, etc.
176
177 Be sure to **put a space after the asterisk**.
178
179 You can also use indented asterisk for second level (indent at least two spaces).
180
181 === Ordered lists ===
182
183 Recommended syntax (Wikicreole):
184 * ##~### for first level
185 * double ##~### for second level, etc.
186
187 Be sure to **put a space after the hash sign**.
188
189 You can also use indented ##~### for second level (indent at least two spaces).
190
191 === Definition lists ===
192
193 {{{
194 Term:
195   definition
196 }}}
197
198 gives
199
200 Term:
201   definition
202
203 === Remark ===
204
205 Items may contain multiple paragraphs and other multi-lined content, just indent the items
206
207 == Headings ==
208
209 === Wikicreole syntax (recommended) ===
210
211 * '~=~=' at the start of a line makes a large heading (h2)
212 * '~=~=~=' at the start of a line makes a medium heading (h3)
213 * '~=~=~=~=' at the start of a line makes a small heading (h4)
214 * '~=~=~=~=~=' at the start of a line makes a smaller heading (h5)
215 * '~=~=~=~=~=~=' at the start of a line makes a tiny heading (h6)
216
217 === Classic Phpwiki syntax ===
218
219 * '##!!!##' at the start of a line makes a large heading (h2)
220 * '##!!##' at the start of a line makes a medium heading (h3)
221 * '##!##' at the start of a line makes a small heading (h4)
222
223 == Preformatted text ==
224
225 Place the preformatted text between three opening curly brackets and three closing curly brackets:
226
227 <verbatim>
228 {{{
229 Preformatted text. ~WikiLinks do not work.
230 }}}
231 </verbatim>
232
233 gives
234
235 {{{
236 Preformatted text. WikiLinks do not work.
237 }}}
238
239 If you want Wiki interaction, place preformatted lines inside ##~<pre>##:
240
241 {{{
242 <pre>
243 Preformatted text. WikiLinks still work.
244 </pre>
245 }}}
246
247 gives
248
249 <pre>
250 Preformatted text. WikiLinks still work.
251 </pre>
252
253 == Indented Paragraphs ==
254
255 Two or more whitespaces signal indented text. Indents may be nested.
256
257     This is an indented block of text.
258
259       This block is even more indented.
260
261 E-mail style block-quoting is supported as well:
262 {{{
263 > This is block-quoted text.
264 }}}
265 renders as
266
267 > This is block-quoted text.
268
269 == References ==
270
271 * Hyperlinks to other pages within the Wiki are made by placing the
272   page name in double square brackets: [[this is a page link]].
273   Single brackets or WikiWords will also work.
274 * Hyperlinks to external pages are done like this: [[http://www.wcsb.org/]]
275 * You can name the links by providing a name, a pipe (##|##) and then the hyperlink or pagename:
276   [[http://phpwiki.sourceforge.net/|PhpWiki home page]], [[HomePage|the front page]]
277 * You can suppress linking to URIs by preceding the word with a '##~~##', e.g. ~NotLinkedAsWikiName, ~http~://not.linked.to/
278 * Also, the old way of linking URL's is still supported: precede URLs
279   with "##~http:##", "##~ftp:##" or "##~mailto:##" to
280   create links automatically as in: http://c2.com/
281 * URLs ending with ##.png##, ##.gif##, or ##.jpg## are inlined if in square brackets, by themselves:
282   [[http://phpwiki.sourceforge.net/demo/themes/default/images/png.png]]
283 * In-page #[[hyperlinks]] are made by placing a named anchor and referring to the anchor in a hyperlink:
284 ** Named anchors:
285 *** ##~#~[~[foo]]##: An anchor around the text "foo" with id "foo".
286 *** ##~#~[~[|foo]]##: An empty anchor with id "foo".
287 *** ##~#~[~[howdy|foo]]##: An anchor around the text "howdy" with id "foo".
288 ** References to name anchors are made thusly:\\##~[~[~#hyperlinks]]##, ##~[~[~OtherPage#foo]]##, ##~[~[~OtherPage#foo|named]]##.
289 * Semantic links are named links like: is_a::WikiPage and attributes like size:-4000.
290 * A pagelink within square brackets starting with ":" is not backlinked.
291
292 == Images ==
293
294 An inline image is created with curly brackets.
295 An alternate text can be put after a pipe. If there is none, an empty alternate text will be created.
296
297 {{{
298 {{myimage.png}}
299 {{myimage.png|this is the alt text for my image}}
300 [[some link|{{myimage.png}}]] - if you click on the image, will goto "some link"
301 [[some link|{{myimage.png|alt text}}]] - same with alternative
302 [[http://example.com/|{{myimage.png}}]] - same as above: picture links to url
303 [[http://example.com/|{{myimage.png|alt text}}]] - same with alternative
304 }}}
305
306 == Tables ==
307
308 === Wikicreole tables ===
309
310 All cells are separated by single pipes.
311 Leading spaces are permitted before the first cell of a row and trailing spaces are permitted at the end of a line.
312 The ending pipe is optional.
313
314 You can embed links, bold, italics, line breaks, and nowiki in table cells.
315
316 Equal sign directly following pipe defines a header.
317 Headers can be arranged horizontally or vertically.
318
319 {{{
320 |=Heading Col 1 |=Heading Col 2         |
321 |Cell 1.1       |Two lines\\in Cell 1.2 |
322 |Cell 2.1       |Cell 2.2               |
323 }}}
324
325 will give:
326
327 |=Heading Col 1 |=Heading Col 2         |
328 |Cell 1.1       |Two lines\\in Cell 1.2 |
329 |Cell 2.1       |Cell 2.2               |
330
331 === Mediawiki tables ===
332
333 See [[Help:MediawikiTablePlugin]].
334
335 === Definition list style tables ===
336
337 Definition list style tables are written just like definition lists,
338 except that you replace the trailing colon on the term with a "pipe" (##|##).
339
340 {{{
341 Term 1 |
342    Definition 1 begins here.
343    Term 1.1 |
344       Definition 1.1
345    Term 1.2 |
346       Definition 1.2
347    This is part of definition 1.
348 Term 2 |
349    Here's definition 2.
350 }}}
351
352 will give:
353
354 Term 1 |
355    Definition 1 begins here.
356    Term 1.1 |
357       Definition 1.1
358    Term 1.2 |
359       Definition 1.2
360    This is part of definition 1.
361 Term 2 |
362    Here's definition 2.
363
364 == HTML Mark-Up Language ==
365
366 * Some in-line markup is allowed through the use of HTML tags:
367   <b>b</b>, <big>big</big>, <i>i</i>, <small>small</small>,
368   <tt>tt</tt>, <em>em</em>, <strong>strong</strong>,
369   <abbr>abbr</abbr>, <acronym>acronym</acronym>, <cite>cite</cite>,
370   <code>code</code>, <dfn>dfn</dfn>, <kbd>kbd</kbd>,
371   <samp>samp</samp>, <var>var</var>, <sup>sup</sup> and <sub>sub</sub>
372 * < and > are themselves
373 * The & characters will not work
374
375 == Creating various kinds of special links ==
376
377 See [[Help:MagicPhpWikiURLs]] for gory details on how to write various kind
378 of wiki maintenance and other special links.
379
380 == Inserting plugins ==
381
382 Several plugins permit embedding additional functionality to Wiki pages. For example,
383 {{{
384 <<BackLinks page=HomePage info=hits>>
385 }}}
386 gives
387 <<BackLinks page=HomePage info=hits>>
388
389 For more information on plugins see [[Help:WikiPlugin]], and [[PluginManager]] for a list of all plugins.
390
391 <noinclude>
392 ----
393 [[PhpWikiDocumentation]]
394 </noinclude>