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