]> CyberLeo.Net >> Repos - SourceForge/phpwiki.git/blob - pgsrc/Help%2FTextFormattingRules
We are in 2013
[SourceForge/phpwiki.git] / pgsrc / Help%2FTextFormattingRules
1 Date: Wed, 19 Dec 2012 13:19:04 +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 == Paragraphs ==
159
160 * Don't indent paragraphs
161 * Words wrap and fill as needed
162 * Use blank lines as separators
163 * Four or more minus signs make a horizontal rule
164 * "##~\~\##", "##~%%%##" or "##~<br>##" makes a linebreak (in headings and lists too)
165
166 == Lists ==
167
168 === Unordered lists ===
169
170 Recommended syntax (Wikicreole):
171 * asterisk for first level
172 * double asterisk for second level, etc.
173
174 Be sure to **put a space after the asterisk**.
175
176 You can also use indented asterisk for second level (indent at least two spaces).
177
178 === Ordered lists ===
179
180 Recommended syntax (Wikicreole):
181 * ##~### for first level
182 * double ##~### for second level, etc.
183
184 Be sure to **put a space after the hash sign**.
185
186 You can also use indented ##~### for second level (indent at least two spaces).
187
188 === Definition lists ===
189
190 {{{
191 Term:
192   definition
193 }}}
194
195 gives
196
197 Term:
198   definition
199
200 === Remark ===
201
202 Items may contain multiple paragraphs and other multi-lined content, just indent the items
203
204 == Headings ==
205
206 === Wikicreole syntax (recommended) ===
207
208 * '~=~=' at the start of a line makes a large heading (h2)
209 * '~=~=~=' at the start of a line makes a medium heading (h3)
210 * '~=~=~=~=' at the start of a line makes a small heading (h4)
211 * '~=~=~=~=~=' at the start of a line makes a smaller heading (h5)
212 * '~=~=~=~=~=~=' at the start of a line makes a tiny heading (h6)
213
214 === Classic Phpwiki syntax ===
215
216 * '##!!!##' at the start of a line makes a large heading (h2)
217 * '##!!##' at the start of a line makes a medium heading (h3)
218 * '##!##' at the start of a line makes a small heading (h4)
219
220 == Preformatted text ==
221
222 Place the preformatted text between three opening curly brackets and three closing curly brackets:
223
224 <verbatim>
225 {{{
226 Preformatted text. ~WikiLinks do not work.
227 }}}
228 </verbatim>
229
230 gives
231
232 {{{
233 Preformatted text. WikiLinks do not work.
234 }}}
235
236 If you want Wiki interaction, place preformatted lines inside ##~<pre>##:
237
238 {{{
239 <pre>
240 Preformatted text. WikiLinks still work.
241 </pre>
242 }}}
243
244 gives
245
246 <pre>
247 Preformatted text. WikiLinks still work.
248 </pre>
249
250 == Indented Paragraphs ==
251
252 Two or more whitespaces signal indented text. Indents may be nested.
253
254     This is an indented block of text.
255
256       This block is even more indented.
257
258 E-mail style block-quoting is supported as well:
259 {{{
260 > This is block-quoted text.
261 }}}
262 renders as
263
264 > This is block-quoted text.
265
266 == References ==
267
268 * Hyperlinks to other pages within the Wiki are made by placing the
269   page name in double square brackets: [[this is a page link]].
270   Single brackets or WikiWords will also work.
271 * Hyperlinks to external pages are done like this: [[http://www.wcsb.org/]]
272 * You can name the links by providing a name, a pipe (##|##) and then the hyperlink or pagename:
273   [[http://phpwiki.sourceforge.net/|PhpWiki home page]], [[HomePage|the front page]]
274 * You can suppress linking to URIs by preceding the word with a '##~~##', e.g. ~NotLinkedAsWikiName, ~http~://not.linked.to/
275 * Also, the old way of linking URL's is still supported: precede URLs
276   with "##~http:##", "##~ftp:##" or "##~mailto:##" to
277   create links automatically as in: http://c2.com/
278 * URLs ending with ##.png##, ##.gif##, or ##.jpg## are inlined if in square brackets, by themselves:
279   [[http://phpwiki.svn.sourceforge.net/viewvc/phpwiki/trunk/themes/default/images/png.png]]
280 * In-page #[[hyperlinks]] are made by placing a named anchor and referring to the anchor in a hyperlink:
281 ** Named anchors:
282 *** ##~#~[~[foo]]##: An anchor around the text "foo" with id "foo".
283 *** ##~#~[~[|foo]]##: An empty anchor with id "foo".
284 *** ##~#~[~[howdy|foo]]##: An anchor around the text "howdy" with id "foo".
285 ** References to name anchors are made thusly:\\##~[~[~#hyperlinks]]##, ##~[~[~OtherPage#foo]]##, ##~[~[~OtherPage#foo|named]]##.
286 * Semantic links are named links like: is_a::WikiPage and attributes like size:-4000.
287 * A pagelink within square brackets starting with ":" is not backlinked.
288
289 == Images ==
290
291 An inline image is created with curly brackets.
292 An alternate text can be put after a pipe. If there is none, an empty alternate text will be created.
293
294 {{{
295 {{myimage.png}}
296 {{myimage.png|this is the alt text for my image}}
297 [[some link|{{myimage.png}}]] - if you click on the image, will goto "some link"
298 [[some link|{{myimage.png|alt text}}]] - same with alternative
299 [[http://example.com/|{{myimage.png}}]] - same as above: picture links to url
300 [[http://example.com/|{{myimage.png|alt text}}]] - same with alternative
301 }}}
302
303 == Tables ==
304
305 === Wikicreole tables ===
306
307 All cells are separated by single pipes.
308 Leading spaces are permitted before the first cell of a row and trailing spaces are permitted at the end of a line.
309 The ending pipe is optional.
310
311 You can embed links, bold, italics, line breaks, and nowiki in table cells.
312
313 Equal sign directly following pipe defines a header.
314 Headers can be arranged horizontally or vertically.
315
316 {{{
317 |=Heading Col 1 |=Heading Col 2         |
318 |Cell 1.1       |Two lines\\in Cell 1.2 |
319 |Cell 2.1       |Cell 2.2               |
320 }}}
321
322 will give:
323
324 |=Heading Col 1 |=Heading Col 2         |
325 |Cell 1.1       |Two lines\\in Cell 1.2 |
326 |Cell 2.1       |Cell 2.2               |
327
328 === Mediawiki tables ===
329
330 See [[Help:MediawikiTablePlugin]].
331
332 === Definition list style tables ===
333
334 Definition list style tables are written just like definition lists,
335 except that you replace the trailing colon on the term with a "pipe" (##|##).
336
337 {{{
338 Term 1 |
339    Definition 1 begins here.
340    Term 1.1 |
341       Definition 1.1
342    Term 1.2 |
343       Definition 1.2
344    This is part of definition 1.
345 Term 2 |
346    Here's definition 2.
347 }}}
348
349 will give:
350
351 Term 1 |
352    Definition 1 begins here.
353    Term 1.1 |
354       Definition 1.1
355    Term 1.2 |
356       Definition 1.2
357    This is part of definition 1.
358 Term 2 |
359    Here's definition 2.
360
361 == HTML Mark-Up Language ==
362
363 * Some in-line markup is allowed through the use of HTML tags:
364   <b>b</b>, <big>big</big>, <i>i</i>, <small>small</small>,
365   <tt>tt</tt>, <em>em</em>, <strong>strong</strong>,
366   <abbr>abbr</abbr>, <acronym>acronym</acronym>, <cite>cite</cite>,
367   <code>code</code>, <dfn>dfn</dfn>, <kbd>kbd</kbd>,
368   <samp>samp</samp>, <var>var</var>, <sup>sup</sup> and <sub>sub</sub>
369 * < and > are themselves
370 * The & characters will not work
371
372 == Creating various kinds of special links ==
373
374 See [[Help:MagicPhpWikiURLs]] for gory details on how to write various kind
375 of wiki maintenance and other special links.
376
377 == Inserting plugins ==
378
379 Several plugins permit embedding additional functionality to Wiki pages. For example,
380 {{{
381 <<BackLinks page=HomePage info=hits>>
382 }}}
383 gives
384 <<BackLinks page=HomePage info=hits>>
385
386 For more information on plugins see [[Help:WikiPlugin]], and [[PluginManager]] for a list of all plugins.
387
388 <noinclude>
389 ----
390 [[PhpWikiDocumentation]]
391 </noinclude>