Help: Wiki Formatting

Version 7
by (unknown)
Version 13
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 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
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 -
Note that you need a space in front of the defined term.
152
153 == Preformatted Text ==
154
155 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.
156
157 Example:
158
159 {{{
160 {{{
161 def HelloWorld():
162 print "Hello World"
163 }}}
164 }}}
165
166 Display:
167
168 {{{
169 def HelloWorld():
170 print "Hello World"
171 }}}
172
173 Note that this type of formatting can also be used to display html with minor changes in the syntax.
174 See [Help:WikiHtml] for details.
175
176 == Tables ==
177
178 Simple tables can be created like this:
179
180 {{{
181 ||Cell 1||Cell 2||Cell 3||
182 ||Cell 4||Cell 5||Cell 6||
183 }}}
184
185 Display:
186
187 ||Cell 1||Cell 2||Cell 3||
188 ||Cell 4||Cell 5||Cell 6||
189
190 -
For a blank cell, use   as the content to ensure that the cell displays properly.
191
192 == Links ==
193
194 Hyperlinks are automatically created for WikiPageNames and URLs. !WikiPageLinks can be disabled by prepending an exclamation mark "!" character, such as {{{!WikiPageLink}}}.
195
196 Example:
197
198 {{{
199 MainPage, http://www.edgewall.com/, !NotAlink
200 }}}
201
202 Display:
203
204 MainPage, http://www.edgewall.com/, !NotAlink
205
206 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.
207
208 Example:
209
210 {{{
211 * [http://www.edgewall.com/ Edgewall Software]
212 * [MainPage Main Page]
213 * [Help:WikiMacros]
214 }}}
215
216 Display:
217
218 * [http://www.edgewall.com/ Edgewall Software]
219 * [MainPage Main Page]
220 * [Help:WikiMacros]
221
222 == Escaping Links and WikiPageNames ==
223
224 You may avoid making hyperlinks out of TracLinks by preceding an expression with a single "!" (exclamation mark).
225
226 Example:
227
228 {{{
229 !NoHyperLink
230 }}}
231
232 Display:
233
234 !NoHyperLink
235
236 == Images ==
237
238 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)]]`.
239
240 In addition to the current page, it is possible to refer to other resources:
241
242 * `[[Image(picture.gif)]]` (simplest)
243 * `[[Image(picture.gif, 120px)]]` (give it a specific width)
244 * `[[Image(picture.gif, align-right)]]` (add the CSS class "align-right" to the image)
245 * `[[Image(picture.gif, nolink)]]` (unlinked)
246 * `[[Image(picture.gif, align=right)]]` (align by attribute)
247
248 See [Help:WikiMacros Help: Wiki Macros] for further documentation on the `[[Image()]]` macro.
249
250 == Macros ==
251
252 Macros are ''custom functions'' to insert dynamic content in a page.
253
254 Example:
255
256 {{{
257 [[Timestamp]]
258 }}}
259
260 Display:
261
262 [[Timestamp]]
263
264 See [Help:WikiMacros Wiki Macros] for more information, and a list of installed macros.
265
266 == Miscellaneous ==
267
268 Four or more dashes will be replaced by a horizontal line.
269
270 Example:
271
272 {{{
273 ----
274 }}}
275
276 Display:
277
278 ----