Help: Wiki Formatting

Version 8
by (unknown)
Version 9
by (unknown)

Deletions or items before changed

Additions or items after changed

1 = Wiki Formatting =
2
3 Wiki markup is a core feature for Topic pages, tightly integrating all the other parts of Trac into a flexible and powerful whole.
4
5 -
cdmHUB has a built in small and powerful wiki rendering engine. This wiki engine implements an ever growing subset of the commands from other popular Wikis.
+
nanoHUB has a built in small and powerful wiki rendering engine. This wiki engine implements an ever growing subset of the commands from other popular Wikis, especially [http://moinmoin.wikiwikiweb.de/ MoinMoin].
6
7 This page demonstrates the formatting syntax available anywhere [Help:WikiFormatting Wiki Formatting] is allowed.
8
9 == Font Styles ==
10
11 The pages supports the following font styles:
12 +
13 {{{
14 * '''bold''', '''!''' can be bold too''', and '''! '''
15 * ''italic''
16 * '''''bold italic'''''
17 * __underline__
18 * {{{monospace}}} or `monospace`
19 * ~~strike-through~~
20 * ^superscript^
21 * ,,subscript,,
22 }}}
23
24 Display:
25 +
26 * '''bold''', '''!''' can be bold too''', and '''! '''
27 * ''italic''
28 * '''''bold italic'''''
29 * __underline__
30 * {{{monospace}}} or `monospace`
31 * ~~strike-through~~
32 * ^superscript^
33 * ,,subscript,,
34
35 Notes:
36 +
37 * `{{{...}}}` and {{{`...`}}} commands not only select a monospace font, but also treat their content as verbatim text, meaning that no further wiki processing is done on this text.
38 * ` ! ` tells wiki parser to not take the following characters as wiki format, so pay attention to put a space after !, e.g. when ending bold.
39
40 == Headings ==
41
42 You can create heading by starting a line with one up to five ''equal'' characters ("=") followed by a single space and the headline text. The line should end with a space followed by the same number of ''='' characters. The heading might optionally be followed by an explicit id. If not, an implicit but nevertheless readable id will be generated.
43
44 Example:
45 +
46 {{{
47 = Heading =
48 == Subheading ==
49 === About ''this'' ===
50 === Explicit id === #using-explicit-id-in-heading
51 }}}
52
53 Display:
54 +
55 = Heading =
56 == Subheading ==
57 === About ''this'' ===
58 === Explicit id === #using-explicit-id-in-heading
59
60 == Paragraphs ==
61
62 A new text paragraph is created whenever two blocks of text are separated by one or more empty lines.
63
64 A forced line break can also be inserted, using:
65 +
66 {{{
67 Line 1[[BR]]Line 2
68 }}}
69 +
70 Display:
71
72 Line 1[[BR]]Line 2
73
74 == Lists ==
75
76 The wiki supports both ordered/numbered and unordered lists.
77
78 Example:
79 +
80 {{{
81 * Item 1
82 * Item 1.1
83 * Item 2
84
85 # Item 1
86 # Item 1.a
87 # Item 1.b
88 # Item 1.b.i
89 -
# Item 1.b.ii
+
# Item 1.b.ii
90 # Item 2
91 }}}
92
93 Display:
94 +
95 * Item 1
96 * Item 1.1
97 * Item 2
98
99 # Item 1
100 # Item 1.a
101 # Item 1.b
102 # Item 1.b.i
103 # Item 1.b.ii
104 # Item 2
105
106 Note that there must be one or more spaces preceding the list item markers, otherwise the list will be treated as a normal paragraph.
107 +
108 +
For multi-line content within a listed item, the content must be indented the same number of spaces as the initial list line content. That is, if it takes 3 characters to start a list "(space)#(space)Content", the multi-line content must be indented 3 spaces.
109 +
110 +
Example:
111 +
112 +
{{{
113 +
* One
114 +
* Two[[br]]
115 +
Multi-line content
116 +
* Three
117 +
}}}
118 +
119 +
* One
120 +
* Two[[br]]
121 +
Multi-line content
122 +
* Three
123
124 == Definition Lists ==
125
126 -
The wiki also supports definition lists.
+
The wiki also supports definition lists. Definition terms start with '''one''' space " " and end with double colons. Definitions must be on the line immediately following the term and start with '''two to three''' spaces.
127
128 Example:
129 +
130 {{{
131 +
A line with no beginning spaces.
132 +
133 llama::
134 some kind of mammal, with hair
135 ppython::
136 some kind of reptile, without hair
137 (can you spot the typo?)
138 }}}
139
140 Display:
141 +
142 +
A line with no beginning spaces.
143 +
144 llama::
145 some kind of mammal, with hair
146 ppython::
147 some kind of reptile, without hair
148 (can you spot the typo?)
149 +
150
151 == Preformatted Text ==
152
153 Block containing preformatted text are suitable for source code snippets, notes and examples. Use three ''curly braces'' wrapped around the text to define a block quote. The curly braces need to be on a separate line.
154
155 Example:
156 +
157 {{{
158 {{{
159 def HelloWorld():
160 print "Hello World"
161 }}}
162 }}}
163
164 Display:
165 +
166 {{{
167 def HelloWorld():
168 print "Hello World"
169 }}}
170
171 -
== Blockquotes ==
+
Note that this type of formatting can also be used to display html with minor changes in the syntax.
172 -
+
See [Help:WikiHtml] for details.
173 -
In order to mark a paragraph as blockquote, indent that paragraph with two spaces.
+
174 -
+
175 -
Example:
+
176 -
{{{
+
177 -
This text is a quote from someone else.
+
178 -
}}}
+
179 -
+
180 -
Display:
+
181 -
This text is a quote from someone else.
+
182
183 == Tables ==
184
185 Simple tables can be created like this:
186 +
187 {{{
188 ||Cell 1||Cell 2||Cell 3||
189 ||Cell 4||Cell 5||Cell 6||
190 }}}
191
192 Display:
193
194 ||Cell 1||Cell 2||Cell 3||
195 ||Cell 4||Cell 5||Cell 6||
196 +
197
198 == Links ==
199
200 Hyperlinks are automatically created for WikiPageNames and URLs. !WikiPageLinks can be disabled by prepending an exclamation mark "!" character, such as {{{!WikiPageLink}}}.
201
202 Example:
203 +
204 {{{
205 MainPage, http://www.edgewall.com/, !NotAlink
206 }}}
207
208 Display:
209 +
210 MainPage, http://www.edgewall.com/, !NotAlink
211
212 Links can be given a more descriptive title by writing the link followed by a space and a title and all this inside square brackets. If the descriptive title is omitted, then the explicit prefix is discarded, unless the link is an external link. This can be useful for wiki pages not adhering to the WikiPageNames convention.
213
214 Example:
215 +
216 {{{
217 * [http://www.edgewall.com/ Edgewall Software]
218 * [MainPage Main Page]
219 * [Help:WikiMacros]
220 }}}
221
222 Display:
223 +
224 * [http://www.edgewall.com/ Edgewall Software]
225 * [MainPage Main Page]
226 * [Help:WikiMacros]
227
228 == Escaping Links and WikiPageNames ==
229
230 You may avoid making hyperlinks out of TracLinks by preceding an expression with a single "!" (exclamation mark).
231
232 Example:
233 +
234 {{{
235 -
!NoHyperLink
+
!NoHyperLink
236 -
!#42 is not a link
+
237 }}}
238
239 Display:
240 -
!NoHyperLink
+
241 -
!#42 is not a link
+
!NoHyperLink
242
243 == Images ==
244
245 The simplest way to include an image is to upload it as attachment to the current page, and put the filename in a macro call like `[[Image(picture.gif)]]`.
246
247 In addition to the current page, it is possible to refer to other resources:
248
249 * `[[Image(picture.gif)]]` (simplest)
250 * `[[Image(picture.gif, 120px)]]` (give it a specific width)
251 -
* `[[Image(picture.gif, right)]]` (align by keyword)
+
* `[[Image(picture.gif, align-right)]]` (add the CSS class "align-right" to the image)
252 * `[[Image(picture.gif, nolink)]]` (unlinked)
253 * `[[Image(picture.gif, align=right)]]` (align by attribute)
254
255 See [Help:WikiMacros Help: Wiki Macros] for further documentation on the `[[Image()]]` macro.
256
257 == Macros ==
258
259 Macros are ''custom functions'' to insert dynamic content in a page.
260
261 Example:
262 +
263 {{{
264 -
[[Timestamp]]
+
[[Timestamp]]
265 }}}
266
267 Display:
268 -
[[Timestamp]]
+
269 +
[[Timestamp]]
270
271 See [Help:WikiMacros Wiki Macros] for more information, and a list of installed macros.
272
273 == Miscellaneous ==
274
275 Four or more dashes will be replaced by a horizontal line.
276
277 Example:
278 +
279 {{{
280 ----
281 }}}
282
283 Display:
284 +
285 ----