]> CyberLeo.Net >> Repos - SourceForge/phpwiki.git/blob - pgsrc/Help%2FTextFormattingRules
Wikicreole syntax
[SourceForge/phpwiki.git] / pgsrc / Help%2FTextFormattingRules
1 Date: Thu,  2 Apr 2009 11:38:26 +0000
2 Mime-Version: 1.0 (Produced by PhpWiki 1.3.14-20080124)
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 === Escape Character
83
84 The tilde '~~' is the //Escape Character//:
85 * A single tilde '~~' followed by nothing gets rendered as a single tilde. => ~
86 * Two tilde '~~~~' get rendered as a single tilde. => ~~
87 * A single tilde before a link ('~~http~:~/~/foo.bar') prevents linking.  => ~http://foo.bar
88 * Two tildes before a link ('~~~~http~:~/~/foo.bar') produce a tilde followed by the hyperlinked URL.  => ~~http://foo.bar
89 * A tilde inside an URL gets removed, unless it's formatted inside square brackets.
90 * Two tildes inside an URL (without brackets) become a single tilde.  => [[http://foo.bar/~user]] or http://foo.bar/~~user
91
92 === Special Characters
93
94 All special non-whitespace HTML characters are displayed as-is. Exceptions below.
95
96 Special non-ASCII or non-latin characters are printed as-is only if supported
97 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.
98
99 E.g. These japanese euc-jp chars '&#12363;&#12425; &#26032;&#35215;&#12506;&#12540;&#12472;' 
100 on this <<SystemInfo CHARSET>> wiki.
101
102 And with the plugin: <<RawHtml &#12363;&#12425; &#26032;&#35215;&#12506;&#12540;&#12472;>>
103
104 And this is how it should look: [[http://phpwiki.sourceforge.net/demo/images/chars-releasenotes-japanese.png]]
105
106 == Paragraphs
107
108 * Don't indent paragraphs
109 * Words wrap and fill as needed
110 * Use blank lines as separators
111 * Four or more minus signs make a horizontal rule
112 * "##~\~\##", "##~%%%##" or "##~<br>##" makes a linebreak (in headings and lists too)
113
114 == Lists
115
116 === Unordered lists
117
118 Recommended syntax (Wikicreole):
119 * asterisk for first level
120 * double asterisk for second level, etc.
121
122 Be sure to **put a space after the asterisk**.
123
124 You can also use indented asterisk for second level (indent at least two spaces).
125
126 === Ordered lists
127
128 Recommended syntax (Wikicreole):
129 * ##~### for first level
130 * double ##~### for second level, etc.
131
132 Be sure to **put a space after the hash sign**.
133
134 You can also use indented ##~### for second level (indent at least two spaces).
135
136 === Definition lists
137
138 {{{
139 Term:
140   definition
141 }}}
142
143 gives
144
145 Term:
146   definition
147
148 === Remark
149
150 Items may contain multiple paragraphs and other multi-lined content, just indent the items
151
152 == Headings
153
154 === Wikicreole syntax (recommended)
155
156 * '~=~=' at the start of a line makes a large heading (h2)
157 * '~=~=~=' at the start of a line makes a medium heading (h3)
158 * '~=~=~=~=' at the start of a line makes a small heading (h4)
159 * '~=~=~=~=~=' at the start of a line makes a smaller heading (h5)
160 * '~=~=~=~=~=~=' at the start of a line makes a tiny heading (h6)
161
162 === Classic Phpwiki syntax
163
164 * '##!!!##' at the start of a line makes a large heading (h2)
165 * '##!!##' at the start of a line makes a medium heading (h3)
166 * '##!##' at the start of a line makes a small heading (h4)
167
168 == Preformatted text
169
170 Place the preformatted text between three opening curly brackets and three closing curly brackets:
171
172 <verbatim>
173 {{{
174 Preformatted text. ~WikiLinks do not work.
175 }}}
176 </verbatim>
177
178 gives
179
180 {{{
181 Preformatted text. WikiLinks do not work.
182 }}}
183
184 If you want Wiki interaction, place preformatted lines inside ##~<pre>##:
185
186 {{{
187 <pre>
188 Preformatted text. WikiLinks still work.
189 </pre>
190 }}}
191
192 gives
193
194 <pre>
195 Preformatted text. WikiLinks still work.
196 </pre>
197
198 == Indented Paragraphs
199
200 Two or more whitespaces signal indented text. Indents may be nested.
201
202     This is an indented block of text.
203
204       This block is even more indented.
205
206 E-mail style block-quoting is supported as well:
207 {{{
208 > This is block-quoted text.
209 }}}
210 renders as
211
212 > This is block-quoted text.
213
214 == References
215
216 * Hyperlinks to other pages within the Wiki are made by placing the
217   page name in double square brackets: [[this is a page link]].
218   Single brackets or WikiWords will also work.
219 * Hyperlinks to external pages are done like this: [[http://www.wcsb.org/]]
220 * You can name the links by providing a name, a pipe (##|##) and then the hyperlink or pagename:
221   [[http://phpwiki.sourceforge.net/|PhpWiki home page]], [[HomePage|the front page]]
222 * You can suppress linking to URIs by preceding the word with a '##~~##', e.g. ~NotLinkedAsWikiName, ~http~://not.linked.to/
223 * Also, the old way of linking URL's is still supported: precede URLs
224   with "##~http:##", "##~ftp:##" or "##~mailto:##" to
225   create links automatically as in: http://c2.com/
226 * URLs ending with ##.png##, ##.gif##, or ##.jpg## are inlined if in square brackets, by themselves:
227   [[http://phpwiki.sourceforge.net/demo/themes/default/images/png.png]]
228 * In-page #[[hyperlinks]] are made by placing a named anchor and referring to the anchor in a hyperlink:
229 ** Named anchors:
230 *** ##~#~[~[foo]]##: An anchor around the text "foo" with id "foo".
231 *** ##~#~[~[|foo]]##: An empty anchor with id "foo".
232 *** ##~#~[~[howdy|foo]]##: An anchor around the text "howdy" with id "foo".
233 ** References to name anchors are made thusly:\\##~[~[~#~#hyperlinks]]##, ##~[~[~OtherPage#foo]]##, ##~[~[~OtherPage#foo|named]]##.
234 * Semantic links are named links like: is_a::WikiPage and attributes like size:-4000.
235 * A pagelink within square brackets starting with ":" is not backlinked.
236
237 == Images ==
238
239 An inline image is created with curly brackets.
240 An alternate text can be put after a pipe. If there is none, an empty alternate text will be created.
241
242 {{{
243 {{myimage.png}}
244 }}}
245
246 {{{
247 {{myimage.png|this is my image}}
248 }}}
249
250 == Tables
251
252 === Wikicreole tables
253
254 All cells are separated by single pipes.
255 Leading spaces are permitted before the first cell of a row and trailing spaces are permitted at the end of a line.
256 The ending pipe is optional.
257
258 You can embed links, bold, italics, line breaks, and nowiki in table cells.
259
260 Equal sign directly following pipe defines a header.
261 Headers can be arranged horizontally or vertically.
262
263 {{{
264 |=Heading Col 1 |=Heading Col 2         |
265 |Cell 1.1       |Two lines\\in Cell 1.2 |
266 |Cell 2.1       |Cell 2.2               |
267 }}}
268
269 will give:
270
271 |=Heading Col 1 |=Heading Col 2         |
272 |Cell 1.1       |Two lines\\in Cell 1.2 |
273 |Cell 2.1       |Cell 2.2               |
274
275 === Mediawiki tables
276
277 See [[Help:MediawikiTablePlugin]].
278
279 === Definition list style tables
280
281 Definition list style tables are written just like definition lists,
282 except that you replace the trailing colon on the term with a "pipe" (##|##).
283
284 {{{
285 Term 1 |
286    Definition 1 begins here.
287    Term 1.1 |
288       Definition 1.1
289    Term 1.2 |
290       Definition 1.2
291    This is part of definition 1.
292 Term 2 |
293    Here's definition 2.
294 }}}
295
296 will give:
297
298 Term 1 |
299    Definition 1 begins here.
300    Term 1.1 |
301       Definition 1.1
302    Term 1.2 |
303       Definition 1.2
304    This is part of definition 1.
305 Term 2 |
306    Here's definition 2.
307
308 == HTML Mark-Up Language
309
310 * Some in-line markup is allowed through the use of HTML tags:
311   <b>b</b>, <big>big</big>, <i>i</i>, <small>small</small>,
312   <tt>tt</tt>, <em>em</em>, <strong>strong</strong>,
313   <abbr>abbr</abbr>, <acronym>acronym</acronym>, <cite>cite</cite>,
314   <code>code</code>, <dfn>dfn</dfn>, <kbd>kbd</kbd>,
315   <samp>samp</samp>, <var>var</var>, <sup>sup</sup> and <sub>sub</sub>
316 * < and > are themselves
317 * The & characters will not work
318
319 == Creating various kinds of special links
320
321 See [[Help:MagicPhpWikiURLs]] for gory details on how to write various kind
322 of wiki maintenance and other special links.
323
324 == Inserting plugins
325
326 Several plugins permit embedding additional functionality to Wiki pages. For example,
327 {{{
328 <<BackLinks page=HomePage info=hits>>
329 }}}
330 gives
331 <<BackLinks page=HomePage info=hits>>
332
333 For more information on plugins see [[Help:WikiPlugin]], and [[PluginManager]] for a list of all plugins.
334
335 <noinclude>
336 ----
337 [[PhpWikiDocumentation]]
338 </noinclude>