Support

Support Options

Submit a Support Ticket

 
You are here: Home » Topics » Help: Wiki Formatting » Compare

Help: Wiki Formatting

Version 4
by Sam Wilson
Version 5
by Sam Wilson

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.
+
The wiki supports both ordered/numbered and unordered lists. Note that a space is required before the initial asterisk or number sign.
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 == Definition Lists ==
109
110 The wiki also supports definition lists.
111
112 Example:
113
114 {{{
115 llama::
116 some kind of mammal, with hair
117 ppython::
118 some kind of reptile, without hair
119 (can you spot the typo?)
120 }}}
121
122 Display:
123
124 llama::
125 some kind of mammal, with hair
126 ppython::
127 some kind of reptile, without hair
128 (can you spot the typo?)
129
130
131 Note that you need a space in front of the defined term.
132
133 == Preformatted Text ==
134
135 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.
136
137 Example:
138
139 {{{
140 {{{
141 def HelloWorld():
142 print "Hello World"
143 }}}
144 }}}
145
146 Display:
147
148 {{{
149 def HelloWorld():
150 print "Hello World"
151 }}}
152
153 Note that this type of formatting can also be used to display html with minor changes in the syntax.
154 See [Help:WikiHtml] for details.
155
156 == Tables ==
157
158 Simple tables can be created like this:
159
160 {{{
161 ||Cell 1||Cell 2||Cell 3||
162 ||Cell 4||Cell 5||Cell 6||
163 }}}
164
165 Display:
166
167 ||Cell 1||Cell 2||Cell 3||
168 ||Cell 4||Cell 5||Cell 6||
169
170
171 == Links ==
172
173 Hyperlinks are automatically created for WikiPageNames and URLs. !WikiPageLinks can be disabled by prepending an exclamation mark "!" character, such as {{{!WikiPageLink}}}.
174
175 Example:
176
177 {{{
178 MainPage, http://www.edgewall.com/, !NotAlink
179 }}}
180
181 Display:
182
183 MainPage, http://www.edgewall.com/, !NotAlink
184
185 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.
186
187 Example:
188
189 {{{
190 * [http://www.edgewall.com/ Edgewall Software]
191 * [MainPage Main Page]
192 * [Help:WikiMacros]
193 }}}
194
195 Display:
196
197 * [http://www.edgewall.com/ Edgewall Software]
198 * [MainPage Main Page]
199 * [Help:WikiMacros]
200
201 == Escaping Links and WikiPageNames ==
202
203 You may avoid making hyperlinks out of TracLinks by preceding an expression with a single "!" (exclamation mark).
204
205 Example:
206
207 {{{
208 !NoHyperLink
209 }}}
210
211 Display:
212
213 !NoHyperLink
214
215 == Images ==
216
217 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)]]`.
218
219 In addition to the current page, it is possible to refer to other resources:
220
221 * `[[Image(picture.gif)]]` (simplest)
222 * `[[Image(picture.gif, 120px)]]` (give it a specific width)
223 * `[[Image(picture.gif, align-right)]]` (add the CSS class "align-right" to the image)
224 * `[[Image(picture.gif, nolink)]]` (unlinked)
225 * `[[Image(picture.gif, align=right)]]` (align by attribute)
226
227 See [Help:WikiMacros Help: Wiki Macros] for further documentation on the `[[Image()]]` macro.
228
229 == Macros ==
230
231 Macros are ''custom functions'' to insert dynamic content in a page.
232
233 Example:
234
235 {{{
236 [[Timestamp]]
237 }}}
238
239 Display:
240
241 [[Timestamp]]
242
243 See [Help:WikiMacros Wiki Macros] for more information, and a list of installed macros.
244
245 == Miscellaneous ==
246
247 Four or more dashes will be replaced by a horizontal line.
248
249 Example:
250
251 {{{
252 ----
253 }}}
254
255 Display:
256
257 ----