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