Note: This website is archived. For up-to-date information about D projects and development, please visit wiki.dlang.org.

Changes from Version 1 of WikiFormatting

Show
Ignore:
Author:
trac (IP: 127.0.0.1)
Timestamp:
11/23/05 04:00:36 (12 years ago)
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • WikiFormatting

    v0 v1  
     1= WikiFormatting = 
     2[[TracGuideToc]] 
     3 
     4Wiki markup is a core feature in Trac, tightly integrating all the other parts of Trac into a flexible and powerful whole. 
     5 
     6Trac 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, 
     7especially [http://moinmoin.wikiwikiweb.de/ MoinMoin].  
     8 
     9 
     10This page demonstrates the formatting syntax available anywhere WikiFormatting is allowed. 
     11 
     12 
     13== Font styles == 
     14 
     15The Trac wiki supports the following font styles: 
     16{{{ 
     17 * '''bold''' 
     18 * ''italic'' 
     19 * '''''bold italic''''' 
     20 * __underline__ 
     21 * {{{monospace}}} or `monospace` 
     22 * ~~strike-through~~ 
     23 * ^superscript^  
     24 * ,,subscript,,. 
     25}}} 
     26 
     27Display: 
     28 * '''bold''' 
     29 * ''italic'' 
     30 * '''''bold italic''''' 
     31 * __underline__ 
     32 * {{{monospace}}} or `monospace` 
     33 * ~~strike-through~~ 
     34 * ^superscript^  
     35 * ,,subscript,,. 
     36 
     37 
     38 
     39== Heading == 
     40 
     41You can create heading by starting a line with one up to five ''equal'' "=" characters 
     42followed by a single space and the headline text. The line should end with a space  
     43followed by the same number of ''equal'' characters.  
     44 
     45Example: 
     46{{{ 
     47= Heading = 
     48== Subheading == 
     49=== About ''this'' === 
     50}}} 
     51 
     52Display: 
     53= Heading = 
     54== Subheading == 
     55=== About ''this'' === 
     56 
     57 
     58== Paragraphs == 
     59 
     60A new text paragraph is created whenever two blocks of text are separated 
     61by one or more empty lines. 
     62 
     63A forced line break can also be inserted, using: 
     64{{{ 
     65Line 1[[BR]]Line 2 
     66}}} 
     67Display: 
     68 
     69Line 1[[BR]]Line 2 
     70 
     71  Text paragraphs can be indented by starting the lines with two or more spaces. 
     72 
     73 
     74== Lists == 
     75 
     76The wiki supports both ordered/numbered and unordered lists. 
     77There must be a space preceding the star "*" or number "1.", or nothing will happen. 
     78 
     79Example: 
     80{{{ 
     81 * Item 1 
     82   * Item 1.1 
     83 * Item 2 
     84 
     85 1. Item 1 
     86   1. Item 1.1 
     87 1. Item 2 
     88}}} 
     89 
     90Display: 
     91 * Item 1 
     92   * Item 1.1 
     93 * Item 2 
     94 
     95 1. Item 1 
     96   1. Item 1.1 
     97 1. Item 2 
     98 
     99 
     100== Definition lists == 
     101 
     102The wiki also supports definition lists. 
     103 
     104Example: 
     105{{{ 
     106 llama:: 
     107   some kind of mammal, with hair 
     108 ppython:: 
     109   some kind of reptile, without hair 
     110   (can you spot the typo?) 
     111}}} 
     112 
     113Display: 
     114 llama:: 
     115   some kind of mammal, with hair 
     116 ppython:: 
     117   some kind of reptile, without hair 
     118   (can you spot the typo?) 
     119 
     120Note that you need a space in front of the defined term. 
     121 
     122 
     123== Preformatted text == 
     124 
     125Block quotes, preformatted text, are suitable for source code snippets, notes and examples. Use three ''curly braces'' wrapped around the text to define a block quote. 
     126   
     127Example: 
     128{{{ 
     129 {{{ 
     130  def HelloWorld() 
     131      print "Hello World" 
     132 }}} 
     133}}} 
     134 
     135Display: 
     136{{{ 
     137 def HelloWorld() 
     138     print "Hello World" 
     139}}} 
     140 
     141 
     142== Tables == 
     143 
     144Simple tables can be created like this: 
     145{{{ 
     146||Cell 1||Cell 2||Cell 3|| 
     147||Cell 4||Cell 5||Cell 6|| 
     148}}} 
     149 
     150Display: 
     151||Cell 1||Cell 2||Cell 3|| 
     152||Cell 4||Cell 5||Cell 6|| 
     153 
     154Note that more complex tables can be created using 
     155[wiki:WikiRestructuredText#BiggerReSTExample reStructuredText]. 
     156 
     157== Links == 
     158 
     159Hyperlinks are automatically created for WikiPageNames and urls.  
     160!WikiPageLinks can be disabled by 
     161prepending an exclamation mark "!" character, such as {{{!WikiPageLink}}}. 
     162 
     163Example: 
     164{{{ 
     165 TitleIndex, http://www.edgewall.com/, !NotAlink 
     166}}} 
     167 
     168Display: 
     169 TitleIndex, http://www.edgewall.com/, !NotAlink 
     170 
     171Links can be given a more descriptive title by writing the link followed by 
     172a space and a title and all this inside square brackets.  
     173If the descriptive title is omitted, then the explicit prefix is disguarded, 
     174unless the link is an external link. This can be useful for wiki pages 
     175not adhering to the WikiPageNames convention. 
     176 
     177Like this: 
     178{{{ 
     179 * [http://www.edgewall.com/ Edgewall Software] 
     180 * [wiki:TitleIndex Title Index] 
     181 * [wiki:ISO9000] 
     182}}} 
     183 
     184Display: 
     185 * [http://www.edgewall.com/ Edgewall Software] 
     186 * [wiki:TitleIndex Title Index] 
     187 * [wiki:ISO9000] 
     188 
     189 
     190=== Trac Links === 
     191 
     192Wiki pages can link directly to other parts of the Trac system. 
     193Pages can refer to tickets, reports, changesets, milestones, source files and 
     194other Wiki pages using the following notation: 
     195{{{ 
     196 * Tickets: #1 or ticket:1 
     197 * Reports: {1} or report:1 
     198 * Changesets: r1, [1] or changeset:1 
     199 * Revision Logs: r1:3, [1:3] or log:branches/0.9-stable#1:3 
     200 * Wiki pages: CamelCase or wiki:CamelCase 
     201 * Milestones: milestone:1.0 or milestone:"End-of-days Release" 
     202 * Files: source:trunk/COPYING 
     203 * A specific file revision: source:/trunk/COPYING#200 
     204 * A filename with embedded space: source:"/trunk/README FIRST" 
     205}}} 
     206 
     207Display: 
     208 * Tickets: #1 or ticket:1 
     209 * Reports: {1} or report:1 
     210 * Changesets: r1, [1] or changeset:1 
     211 * Revision Logs: r1:3, [1:3] or log:branches/0.8-stable#1000:2000 
     212 * Wiki pages: CamelCase or wiki:CamelCase 
     213 * Milestones: milestone:1.0 or milestone:"End-of-days Release" 
     214 * Files: source:trunk/COPYING 
     215 * A specific file revision: source:/trunk/COPYING#200 
     216 * A filename with embedded space: source:"/trunk/README FIRST" 
     217 
     218See TracLinks for more in-depth information. 
     219 
     220 
     221== Escaping Links and WikiPageNames == 
     222 
     223You may avoid making hyperlinks out of TracLinks by preceding an expression with a single "!" (exclamation mark). 
     224 
     225{{{ 
     226 !NoHyperLink 
     227 !#42 is not a link 
     228}}} 
     229 
     230Display: 
     231 !NoHyperLink 
     232 !#42 is not a link 
     233 
     234 
     235== Images == 
     236 
     237Urls ending with `.png`, `.gif` or `.jpg` are automatically interpreted as image links, and converted to `<img>` tags. 
     238 
     239Example: 
     240{{{ 
     241http://www.edgewall.com/gfx/trac_example_image.png 
     242}}} 
     243 
     244Display: 
     245 
     246http://www.edgewall.com/gfx/trac_example_image.png 
     247 
     248 
     249== Macros == 
     250 
     251Macros are ''custom functions'' to insert dynamic content in a page.  
     252See WikiMacros for usage. 
     253 
     254Example: 
     255{{{ 
     256 [[Timestamp]] 
     257}}} 
     258 
     259Display: 
     260 [[Timestamp]] 
     261 
     262 
     263== Processors == 
     264 
     265Trac supports alternative markup formats using WikiProcessors.  
     266For example, processors are used to write pages in  
     267[wiki:WikiRestructuredText reStructuredText] or [wiki:WikiHtml HTML].  
     268 
     269See WikiProcessors for more information. 
     270 
     271'''Example 1:''' 
     272{{{ 
     273#!html 
     274<pre class="wiki">{{{ 
     275#!html 
     276&lt;h1 style="text-align: right; color: blue"&gt;HTML Test&lt;/h1&gt; 
     277}}}</pre> 
     278}}} 
     279 
     280Display: 
     281{{{ 
     282#!html 
     283<h1 style="text-align: right; color: blue">HTML Test</h1> 
     284}}} 
     285 
     286'''Example 2:''' 
     287{{{ 
     288#!html 
     289<pre class="wiki">{{{ 
     290#!python 
     291class Test: 
     292    def __init__(self): 
     293        print "Hello World" 
     294if __name__ == '__main__': 
     295   Test() 
     296}}}</pre> 
     297}}} 
     298 
     299Display: 
     300{{{ 
     301#!python 
     302class Test: 
     303    def __init__(self): 
     304        print "Hello World" 
     305if __name__ == '__main__': 
     306   Test() 
     307}}} 
     308 
     309 
     310== Miscellaneous == 
     311 
     312Four or more dashes will be replaced by a horizontal line (<HR>) 
     313 
     314Example: 
     315{{{ 
     316 ---- 
     317}}} 
     318 
     319Display: 
     320---- 
     321 
     322 
     323---- 
     324 
     325See also: TracLinks, TracGuide, WikiHtml, WikiMacros, WikiProcessors, TracSyntaxColoring. 
     326 
     327----