trac-ticketlinks / trac / wiki / default-pages / WikiFormatting

   1
   2
   3
   4
   5
   6
   7
   8
   9
  10
  11
  12
  13
  14
  15
  16
  17
  18
  19
  20
  21
  22
  23
  24
  25
  26
  27
  28
  29
  30
  31
  32
  33
  34
  35
  36
  37
  38
  39
  40
  41
  42
  43
  44
  45
  46
  47
  48
  49
  50
  51
  52
  53
  54
  55
  56
  57
  58
  59
  60
  61
  62
  63
  64
  65
  66
  67
  68
  69
  70
  71
  72
  73
  74
  75
  76
  77
  78
  79
  80
  81
  82
  83
  84
  85
  86
  87
  88
  89
  90
  91
  92
  93
  94
  95
  96
  97
  98
  99
 100
 101
 102
 103
 104
 105
 106
 107
 108
 109
 110
 111
 112
 113
 114
 115
 116
 117
 118
 119
 120
 121
 122
 123
 124
 125
 126
 127
 128
 129
 130
 131
 132
 133
 134
 135
 136
 137
 138
 139
 140
 141
 142
 143
 144
 145
 146
 147
 148
 149
 150
 151
 152
 153
 154
 155
 156
 157
 158
 159
 160
 161
 162
 163
 164
 165
 166
 167
 168
 169
 170
 171
 172
 173
 174
 175
 176
 177
 178
 179
 180
 181
 182
 183
 184
 185
 186
 187
 188
 189
 190
 191
 192
 193
 194
 195
 196
 197
 198
 199
 200
 201
 202
 203
 204
 205
 206
 207
 208
 209
 210
 211
 212
 213
 214
 215
 216
 217
 218
 219
 220
 221
 222
 223
 224
 225
 226
 227
 228
 229
 230
 231
 232
 233
 234
 235
 236
 237
 238
 239
 240
 241
 242
 243
 244
 245
 246
 247
 248
 249
 250
 251
 252
 253
 254
 255
 256
 257
 258
 259
 260
 261
 262
 263
 264
 265
 266
 267
 268
 269
 270
 271
 272
 273
 274
 275
 276
 277
 278
 279
 280
 281
 282
 283
 284
 285
 286
 287
 288
 289
 290
 291
 292
 293
 294
 295
 296
 297
 298
 299
 300
 301
 302
 303
 304
 305
 306
 307
 308
 309
 310
 311
 312
 313
 314
 315
 316
 317
 318
 319
 320
 321
 322
 323
 324
 325
 326
 327
 328
 329
 330
 331
 332
 333
 334
 335
 336
 337
 338
 339
 340
 341
 342
 343
 344
 345
 346
 347
 348
 349
 350
 351
 352
 353
 354
 355
 356
 357
 358
 359
 360
 361
 362
 363
 364
 365
 366
 367
 368
 369
 370
 371
 372
 373
 374
 375
 376
 377
 378
 379
 380
 381
 382
 383
 384
 385
 386
 387
 388
 389
 390
 391
 392
 393
 394
 395
 396
 397
 398
 399
 400
 401
 402
 403
 404
 405
 406
 407
 408
 409
 410
 411
 412
 413
 414
 415
 416
 417
 418
 419
 420
 421
 422
 423
 424
 425
 426
 427
 428
 429
 430
 431
 432
 433
 434
 435
 436
 437
 438
 439
 440
 441
 442
 443
 444
 445
 446
 447
 448
 449
 450
 451
 452
 453
 454
 455
 456
 457
 458
 459
 460
 461
 462
 463
 464
 465
 466
 467
 468
 469
 470
 471
 472
 473
 474
 475
 476
 477
 478
 479
 480
 481
 482
 483
 484
 485
 486
 487
 488
 489
 490
 491
 492
 493
 494
 495
 496
 497
 498
 499
 500
 501
 502
 503
 504
 505
 506
 507
 508
 509
 510
 511
 512
 513
 514
 515
 516
 517
 518
 519
 520
 521
 522
 523
 524
 525
 526
 527
 528
 529
 530
 531
 532
 533
 534
 535
 536
 537
 538
 539
 540
 541
 542
 543
 544
 545
 546
 547
 548
 549
 550
 551
 552
 553
 554
 555
 556
 557
 558
 559
 560
 561
 562
 563
 564
 565
 566
 567
 568
 569
 570
 571
 572
 573
 574
 575
 576
 577
 578
 579
 580
 581
 582
 583
 584
 585
 586
 587
 588
 589
 590
 591
 592
 593
 594
 595
 596
 597
 598
 599
 600
 601
 602
 603
 604
 605
 606
 607
 608
 609
 610
 611
 612
 613
 614
 615
 616
 617
 618
 619
 620
 621
 622
 623
 624
 625
 626
 627
 628
 629
 630
 631
 632
 633
 634
 635
 636
 637
 638
 639
 640
 641
 642
 643
 644
 645
 646
 647
 648
 649
 650
 651
 652
 653
 654
 655
 656
 657
 658
 659
 660
 661
 662
 663
 664
 665
 666
 667
 668
 669
 670
 671
 672
 673
 674
 675
 676
 677
 678
 679
 680
 681
 682
 683
 684
 685
 686
 687
 688
 689
 690
 691
 692
 693
 694
 695
 696
 697
 698
 699
 700
 701
 702
 703
 704
 705
 706
 707
 708
 709
 710
 711
 712
 713
 714
 715
 716
 717
 718
 719
 720
 721
 722
 723
 724
 725
 726
 727
 728
 729
 730
 731
 732
 733
 734
 735
 736
 737
 738
 739
 740
 741
 742
 743
 744
 745
 746
 747
 748
 749
 750
 751
 752
 753
 754
 755
 756
 757
 758
 759
 760
 761
 762
 763
 764
 765
 766
 767
 768
 769
 770
 771
 772
 773
 774
 775
 776
 777
 778
 779
 780
 781
 782
 783
 784
 785
 786
 787
 788
 789
 790
 791
 792
 793
 794
 795
 796
 797
 798
 799
 800
 801
 802
 803
 804
 805
 806
 807
 808
 809
 810
 811
 812
 813
 814
 815
 816
 817
 818
 819
 820
 821
 822
 823
 824
 825
 826
 827
 828
 829
 830
 831
 832
 833
 834
 835
 836
 837
 838
 839
 840
 841
 842
 843
 844
 845
 846
 847
 848
 849
 850
 851
 852
 853
 854
 855
 856
 857
 858
 859
 860
 861
 862
 863
 864
 865
 866
 867
 868
 869
 870
 871
 872
 873
 874
 875
 876
 877
 878
 879
 880
 881
 882
 883
 884
 885
 886
 887
 888
 889
 890
 891
 892
 893
 894
 895
 896
 897
 898
 899
 900
 901
 902
 903
 904
 905
 906
 907
 908
 909
 910
 911
 912
 913
 914
 915
 916
 917
 918
 919
 920
 921
 922
 923
 924
 925
 926
 927
 928
 929
 930
 931
 932
 933
 934
 935
 936
 937
 938
 939
 940
 941
 942
 943
 944
 945
 946
 947
 948
 949
 950
 951
 952
 953
 954
 955
 956
 957
 958
 959
 960
 961
 962
 963
 964
 965
 966
 967
 968
 969
 970
 971
 972
 973
 974
 975
 976
 977
 978
 979
 980
 981
 982
 983
 984
 985
 986
 987
 988
 989
 990
 991
 992
 993
 994
 995
 996
 997
 998
 999
1000
1001
1002
1003
1004
1005
1006
= WikiFormatting =
[[TracGuideToc]]

Wiki markup is a core feature in Trac, tightly integrating all the other parts of Trac into a flexible and powerful whole.

Trac 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://moinmo.in/ MoinMoin] and [trac:WikiCreole].


This page will give you an in-depth explanation of the wiki markup available anywhere WikiFormatting is allowed.

The ''Cheat sheet'' below gives you a quick overview for the most common syntax, each link in the ''Category'' column will lead you to the more detailed explanation later in this page.

A few other wiki pages present the advanced features of the Trac wiki markup in more depth: 
 - TracLinks covers all the possible ways to refer precisely to any Trac resource or parts thereof,
 - WikiPageNames talks about the various names a wiki page can take, CamelCase or not
 - WikiMacros lists the macros available for generating dynamic content,
 - WikiProcessors and WikiHtml details how parts of the wiki text can be processed in special ways


== Cheat sheet ==

||= '''Category''' =||= '''Wiki Markup''' =||= '''Display''' =||
|-----------------------------------------------------------
{{{#!th rowspan=3
[#FontStyles Font Styles]
}}}
|| `'''bold'''`, `''italic''`, `'''''Wikipedia style'''''` || \
|| '''bold''', ''italic'', '''''Wikipedia style''''' ||
|| {{{`monospaced and ''nowiki''`}}} || \
|| `monospaced and ''nowiki''` ||
|| `**bold**`, `//italic//`, `**//!WikiCreole style//**` || \
|| **bold**, //italic//, **//!WikiCreole style//** ||
|-----------------------------------------------------------
||= [#Headings Headings] =||\
{{{#!td 
 {{{
 == Level 2 ==
 === Level 3 ^([#hn note])^
 }}}
}}}
{{{#!td style="padding-left: 2em"
== Level 2 ==
=== Level 3 ^([#hn note])^
}}}
|-----------------------------------------------------------
||= [#Paragraphs Paragraphs]  =||\
{{{#!td
 {{{
 First paragraph
 on multiple lines.

 Second paragraph.
 }}}
}}}
{{{#!td
First paragraph
on multiple lines.

Second paragraph.
}}}
|-----------------------------------------------------------
||= [#Lists Lists] =||\
{{{#!td
 {{{
 * bullets list
   on multiple lines
   1. nested list
     a. different numbering 
        styles
 }}}
}}}
{{{#!td
* bullets list
  on multiple lines
  1. nested list
    a. different numbering
       styles
}}}
|-----------------------------------------------------------
{{{#!th
[#DefinitionLists Definition Lists]
}}}
{{{#!td
 {{{
  term:: definition on
         multiple lines
 }}}
}}}
{{{#!td
 term:: definition on
        multiple lines
}}}
|-----------------------------------------------------------
||= [#PreformattedText Preformatted Text] =||\
{{{#!td
 {{{
 {{{
 multiple lines, ''no wiki''
       white space respected
 }}}
 }}}
}}}
{{{#!td
 {{{
 multiple lines, ''no wiki''
       white space respected
 }}}
}}}
|-----------------------------------------------------------
||= [#Blockquotes Blockquotes] =||\
{{{#!td
 {{{
   if there's some leading
   space the text is quoted
 }}}
}}}
{{{#!td
 if there's some leading
 space the text is quoted
}}}
|-----------------------------------------------------------
||= [#DiscussionCitations Discussion Citations] =||\
{{{#!td
 {{{
 >> ... (I said)
 > (he replied)
 }}}
}}}
{{{#!td
>>... (I said)
> (he replied)
}}}
|-----------------------------------------------------------
||= [#Tables Tables] =||\
{{{#!td
 {{{
 ||= Table Header =|| Cell ||
 ||||  (details below)  ||
 }}}
}}}
{{{#!td
||= Table Header =|| Cell ||
||||  (details below)  ||
}}}
|-----------------------------------------------------------
{{{#!th rowspan=2
[#Links Links]
}}}
|| `http://trac.edgewall.org` ||\
|| http://trac.edgewall.org ||
|| `WikiFormatting (CamelCase)` ||\
|| WikiFormatting (CamelCase) ||
|-----------------------------------------------------------
{{{#!th rowspan=5
[#TracLinks TracLinks]
}}}
|| `wiki:WikiFormatting`, `wiki:"WikiFormatting"` ||\
|| wiki:WikiFormatting, wiki:"WikiFormatting" ||
|| `#1 (ticket)`, `[1] (changeset)`, `{1} (report)` ||\
|| #1 (ticket), [1] (changeset), {1} (report) ||
|| `ticket:1, ticket:1#comment:1` ||\
|| ticket:1, ticket:1#comment:1 ||
|| `Ticket [ticket:1]`, `[ticket:1 ticket one]` ||\
|| Ticket [ticket:1], [ticket:1 ticket one] ||
|| `Ticket [[ticket:1]]`, `[[ticket:1|ticket one]]` ||\
|| Ticket [[ticket:1]], [[ticket:1|ticket one]] ||
|-----------------------------------------------------------
{{{#!th rowspan=2 
[#SettingAnchors Setting Anchors]
}}}
|| `[=#point1 (1)] First...` ||\
|| [=#point1 (1)] First... ||
|| `see [#point1 (1)]` ||\
|| see [#point1 (1)] ||
|-----------------------------------------------------------
{{{#!th rowspan=3
[#Escaping Escaping Markup]
}}}
|| `!'' doubled quotes` ||\
|| !'' doubled quotes ||
|| `!wiki:WikiFormatting`, `!WikiFormatting` ||\
|| !wiki:WikiFormatting, !WikiFormatting ||
|| `{{{-}}} curly brackets` ||\
|| {{{-}}} curly brackets ||
|-----------------------------------------------------------
||= [#Images Images] =|| `[[Image(`''link''`)]]` || [[Image(htdocs:../common/trac_logo_mini.png)]] ||
|-----------------------------------------------------------
{{{#!th rowspan=2
[#Macros Macros]
}}}
|| `[[MacroList(*)]]` ||  ''(short list of all available macros)''  ||
|| `[[Image?]]` ||  ''(help for the Image macro)''  ||
|-----------------------------------------------------------
||= [#Processors Processors] =||\
{{{#!td
 {{{
 {{{
 #!div style="font-size: 80%"
 Code highlighting:
   {{{#!python
   hello = lambda: "world"
   }}}
 }}}
 }}}
}}}
{{{#!td style="padding-left: 2em"
 {{{
 #!div style="font-size: 80%"
 Code highlighting:
   {{{#!python 
   hello = lambda: "world"
   }}}
 }}}
}}}
|-----------------------------------------------------------
||= [#Comments Comments] =||\
{{{#!td
 {{{
 {{{#!comment
 Note to Editors: ...
 }}}
 }}}
}}}
{{{#!td style="padding-left: 2em"
 {{{#!comment
 Note to Editors: ...
 }}}
}}}
|-----------------------------------------------------------
||= [#Miscellaneous Miscellaneous] =||\
{{{#!td
 {{{
 Line [[br]] break 
 Line \\ break
 ----
 }}}
}}}
{{{#!td style="padding-left: 2em"
Line [[br]] break
Line \\ break
----
}}}


== Font Styles ==

The Trac wiki supports the following font styles:
||= Wiki Markup =||= Display =||
{{{#!td
  {{{
   * '''bold''', 
     ''' triple quotes !''' 
     can be bold too if prefixed by ! ''', 
   * ''italic''
   * '''''bold italic''''' or ''italic and
     ''' italic bold ''' ''
   * __underline__
   * {{{monospace}}} or `monospace`
     (hence `{{{` or {{{`}}} quoting)
   * ~~strike-through~~
   * ^superscript^ 
   * ,,subscript,,
   * **also bold**, //italic as well//, 
     and **'' bold italic **'' //(since 0.12)//
  }}}
}}}
{{{#!td
 * '''bold''', 
   ''' triple quotes !''' 
   can be bold too if prefixed by ! ''', 
 * ''italic''
 * '''''bold italic''''' or ''italic and
   ''' italic bold ''' ''
 * __underline__
 * {{{monospace}}} or `monospace`
   (hence `{{{` or {{{`}}} quoting)
 * ~~strike-through~~
 * ^superscript^ 
 * ,,subscript,,
 * **also bold**, //italic as well//, 
   and **'' bold italic **'' //(since 0.12)//
}}}

Notes:
 * `{{{...}}}` 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.
 * {{{ ! }}} 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.
 * all the font styles marks have to be used in opening/closing pairs, 
   and they must nest properly (in particular, an `''` italic can't be paired 
   with a `//` one, and `'''` can't be paired with `**`)


== Headings ==

You can create heading by starting a line with one up to six ''equal'' characters ("=")
followed by a single space and the headline text. 

[=#hn]
The headline text can be followed by the same number of "=" characters, but this is no longer mandatory.

Finally, the heading might optionally be followed by an explicit id. If not, an implicit but nevertheless readable id will be generated.

||= Wiki Markup =||= Display =||
{{{#!td
  {{{
  = Heading =
  == Subheading
  === About ''this'' ===
  === Explicit id === #using-explicit-id-in-heading
  == Subheading #sub2
}}}
}}}
{{{#!td style="padding: 1em;"
  {{{
  #!div
  = Heading =
  == Subheading
  === About ''this'' ===
  === Explicit id === #using-explicit-id-in-heading
  == Subheading #sub2
  }}}
}}}

== Paragraphs ==

A new text paragraph is created whenever two blocks of text are separated by one or more empty lines.

A forced line break can also be inserted, using:
||= Wiki Markup =||= Display =||
{{{#!td
  {{{
  Line 1[[BR]]Line 2
  }}}
  {{{
  Paragraph
  one

  Paragraph 
  two
  }}}
}}}
{{{#!td
  Line 1[[BR]]Line 2

  Paragraph 
  one

  Paragraph 
  two
}}}

== Lists ==

The wiki supports both ordered/numbered and unordered lists.

Example:
||= Wiki Markup =||= Display =||
{{{#!td
  {{{
   * Item 1
     * Item 1.1
        * Item 1.1.1   
        * Item 1.1.2
        * Item 1.1.3
     * Item 1.2
   * Item 2
  - items can start at the beginning of a line
    and they can span multiple lines
    - be careful though to continue the line 
    with the appropriate indentation, otherwise
  that will start a new paragraph...
  
   1. Item 1
     a. Item 1.a
     a. Item 1.b
        i. Item 1.b.i
        i. Item 1.b.ii
   1. Item 2
  And numbered lists can also be restarted
  with an explicit number:
   3. Item 3
  }}}
}}}
{{{#!td
 * Item 1
   * Item 1.1
      * Item 1.1.1   
      * Item 1.1.2
      * Item 1.1.3
   * Item 1.2
 * Item 2
- items can start at the beginning of a line
  and they can span multiple lines
  - be careful though to continue the line 
  with the appropriate indentation, otherwise
that will start a new paragraph...

 1. Item 1
   a. Item 1.a
   a. Item 1.b
      i. Item 1.b.i
      i. Item 1.b.ii
 1. Item 2
And numbered lists can also be restarted with an explicit number:
 3. Item 3
}}}


== Definition Lists ==

The wiki also supports definition lists.

||= Wiki Markup =||= Display =||
{{{#!td
  {{{
   llama::
     some kind of mammal, with hair
   ppython::
     some kind of reptile, without hair
     (can you spot the typo?)
  }}}
}}}
{{{#!td
 llama::
   some kind of mammal, with hair
 ppython::
   some kind of reptile, without hair
   (can you spot the typo?)
}}}

Note that you need a space in front of the defined term.


== Preformatted Text ==

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.
  
||= Wiki Markup =||= Display =||
{{{#!td
  {{{
  {{{
  def HelloWorld():
      print '''Hello World'''
  }}}
  }}}
}}}
{{{#!td
  {{{
  def HelloWorld():
      print '''Hello World'''
  }}}
}}}

Note that this kind of block is also used for selecting lines that should be processed through WikiProcessors.

== Blockquotes ==

In order to mark a paragraph as blockquote, indent that paragraph with two spaces.

||= Wiki Markup =||= Display =||
{{{#!td
{{{
Paragraph
  This text is a quote from someone else.
}}}
}}}
{{{#!td
Paragraph
  This text is a quote from someone else.
}}}

== Discussion Citations ==

To delineate a citation in an ongoing discussion thread, such as the ticket comment area, e-mail-like citation marks (">", ">>", etc.) may be used.  

||= Wiki Markup =||= Display =||
{{{#!td
  {{{
  >> Someone's original text
  > Someone else's reply text
  >  - which can be any kind of Wiki markup
  My reply text
  }}}
}}}
{{{#!td
>> Someone's original text
> Someone else's reply text
>  - which can be any kind of Wiki markup
My reply text
}}}


== Tables ==
=== Simple Tables ===
Simple tables can be created like this:
||= Wiki Markup =||= Display =||
{{{#!td
  {{{
  ||Cell 1||Cell 2||Cell 3||
  ||Cell 4||Cell 5||Cell 6||
  }}}
}}}
{{{#!td style="padding: 2em;"
||Cell 1||Cell 2||Cell 3||
||Cell 4||Cell 5||Cell 6||
}}}

Cell headings can be specified by wrapping the content in a pair of '=' characters.
Note that the '=' characters have to stick to the cell separators, like this:
||= Wiki Markup =||= Display =||
{{{#!td
  {{{
  ||        ||= stable =||= latest =||
  ||= 0.10 =||  0.10.5  || 0.10.6dev||
  ||= 0.11 =||  0.11.6  || 0.11.7dev||
  }}}
}}}
{{{#!td style="padding: 2em;"
||        ||= stable =||= latest =||
||= 0.10 =||  0.10.5  || 0.10.6dev||
||= 0.11 =||  0.11.6  || 0.11.7dev||
}}}

Finally, specifying an empty cell means that the next non empty cell will span the empty cells. For example:
||= Wiki Markup =||= Display =||
{{{#!td
  {{{
  || 1 || 2 || 3 ||
  |||| 1-2 || 3 ||
  || 1 |||| 2-3 ||
  |||||| 1-2-3 ||
  }}}
}}}
{{{#!td style="padding: 2em;"
|| 1 || 2 || 3 ||
|||| 1-2 || 3 ||
|| 1 |||| 2-3 ||
|||||| 1-2-3 ||
}}}

Note that if the content of a cell "sticks" to one side of the cell and only one, then the text will be aligned on that side. Example:
||= Wiki Markup =||= Display =||
{{{#!td
  {{{
  ||=Text =||= Numbers =||
  ||left align    ||        1.0||
  ||  center      ||        4.5||
  ||      right align||     4.5||
  || default alignment ||   2.5||
  ||default||         2.5||
  ||  default ||      2.5||
  || default ||       2.5||
  }}}
}}}
{{{#!td style="padding: 2em;"
||=Text =||= Numbers =||
||left align    ||        1.0||
||  center      ||        4.5||
||      right align||     4.5||
|| default alignment ||   2.5||
||default||         2.5||
||  default ||      2.5||
|| default ||       2.5||
}}}

If contrary to the example above, the cells in your table contain more text, it might be convenient to spread a table row over multiple lines of markup. The `\` character placed at the end of a line after a cell separator tells Trac to not start a new row for the cells on the next line.

||= Wiki Markup =||
{{{#!td
  {{{
  || this is column 1 [http://trac.edgewall.org/newticket new ticket] || \
  || this is column 2 [http://trac.edgewall.org/roadmap the road ahead] || \
  || that's column 3 and last one ||
  }}}
}}}
|-------------
||= Display =||
{{{#!td style="padding: 2em;"
|| this is column 1 [http://trac.edgewall.org/newticket new ticket] || \
|| this is column 2 [http://trac.edgewall.org/roadmap the road ahead] || \
|| that's column 3 and last one ||
}}}

=== Complex Tables ===

If the possibilities offered by the simple "pipe"-based markup for tables described above are not enough for your needs, you can create more elaborated tables by using [#Processors-example-tables WikiProcessor based tables].


== Links ==

Hyperlinks are automatically created for WikiPageNames and URLs. !WikiPageLinks can be disabled by prepending an exclamation mark "!" character, such as {{{!WikiPageLink}}}.

||= Wiki Markup =||= Display =||
{{{#!td
  {{{
  TitleIndex, http://www.edgewall.com/, !NotAlink
  }}}
}}}
{{{#!td
TitleIndex, http://www.edgewall.com/, !NotAlink
}}}

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.

||= Wiki Markup =||= Display =||
{{{#!td
  {{{
   * [http://www.edgewall.com Edgewall Software]
   * [wiki:TitleIndex Title Index] 
   * [wiki:TitleIndex] 
   * [wiki:ISO9000]
  }}}
}}}
{{{#!td
   * [http://www.edgewall.com Edgewall Software]
   * [wiki:TitleIndex Title Index] 
   * [wiki:TitleIndex] 
   * [wiki:ISO9000]
}}}

Following the [trac:WikiCreole] trend, the descriptive title can also be specified by writing the link followed by a pipe ('|') and a title and all this inside //double// square brackets. 

{{{#!td
  {{{
   * [[http://www.edgewall.com|Edgewall Software]]
   * [[wiki:TitleIndex|Title Index]]
     or even [[TitleIndex|Title Index]]
   * [[wiki:TitleIndex]]
     ''' but not ![[TitleIndex]]! '''
   * [[ISO9000]]
  }}}
}}}
{{{#!td
   * [[http://www.edgewall.com|Edgewall Software]]
   * [[wiki:TitleIndex|Title Index]]
     or even [[TitleIndex|Title Index]]
   * [[wiki:TitleIndex]]
     ''' but not ![[TitleIndex]]! '''
   * [[ISO9000]]
}}}

'''Note''': the [trac:WikiCreole] style for links is quick to type and
certainly looks familiar as it's the one used on Wikipedia and in many
other wikis. Unfortunately it conflicts with the syntax for [#Macros macros].
So in the rare case when you need to refer to a page which is named after
a macro (typical examples being TitleIndex, InterTrac and InterWiki), 
by writing `[[TitleIndex]]` you will actually call the macro instead of linking
to the page.

== Trac Links ==

Wiki pages can link directly to other parts of the Trac system. Pages can refer to tickets, reports, changesets, milestones, source files and other Wiki pages using the following notations:

||= Wiki Markup =||= Display =||
{{{#!td
  {{{
   * Tickets: #1 or ticket:1
   * Reports: {1} or report:1
   * Changesets: r1, [1] or changeset:1
   * ...
   * targeting other Trac instances, 
     so called InterTrac links:
     - Tickets: #Trac1 or Trac:ticket:1
     - Changesets: [Trac1] or Trac:changeset:1
  }}}
}}}
{{{#!td
 * Tickets: #1 or ticket:1
 * Reports: {1} or report:1
 * Changesets: r1, [1] or changeset:1
 * ... 
 * targeting other Trac instances, 
   so called InterTrac links:
   - Tickets: #Trac1 or Trac:ticket:1
   - Changesets: [Trac1] or Trac:changeset:1
}}}

There are many more flavors of Trac links, see TracLinks for more in-depth information and a reference for all the default link resolvers.


== Setting Anchors ==

An anchor, or more correctly speaking, an [http://www.w3.org/TR/REC-html40/struct/links.html#h-12.2.1 anchor name] can be added explicitly at any place in the Wiki page, in order to uniquely identify a position in the document:

{{{
[=#point1]
}}}

This syntax was chosen to match the format for explicitly naming the header id [#Headings documented above]. For example:
{{{
== Long title == #title
}}}

It's also very close to the syntax for the corresponding link to that anchor:
{{{
[#point1]
}}}

Optionally, a label can be given to the anchor:
{{{
[[=#point1 '''Point 1''']]
}}}

||= Wiki Markup =||= Display =||
|----------------------------------
{{{#!td
  {{{
  [#point2 jump to the second point]

  ...

  Point2:  [=#point2] Jump here
  }}}
}}}
{{{#!td
  [#point2 jump to the second point]

  ...

  Point2:  [=#point2] Jump here
}}}

For more complex anchors (e.g. when a custom title is wanted), one can use the Span macro, e.g. `[[span(id=point2, class=wikianchor, title=Point 2, ^(2)^)]]`.


== Escaping Links, WikiPageNames and other Markup == #Escaping

You may avoid making hyperlinks out of TracLinks by preceding an expression with a single "!" (exclamation mark).

||= Wiki Markup =||= Display =||
{{{#!td
  {{{
   !NoHyperLink
   !#42 is not a link
  }}}
  {{{
Various forms of escaping for list markup:
 `-` escaped minus sign \\
 ``1. escaped number  \\
 {{{*}}} escaped asterisk sign
  }}}
}}}
{{{#!td
 !NoHyperLink
 !#42 is not a link

Various forms of escaping for list markup:
 `-` escaped minus sign \\
 ``1. escaped number  \\
 {{{*}}} escaped asterisk sign
}}}

== Images ==

Urls ending with `.png`, `.gif` or `.jpg` are no longer automatically interpreted as image links, and converted to `<img>` tags.

You now have to use the ![[Image]] macro. 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)]]`.

In addition to the current page, it is possible to refer to other resources:
 * `[[Image(wiki:WikiFormatting:picture.gif)]]` (referring to attachment on another page)
 * `[[Image(ticket:1:picture.gif)]]` (file attached to a ticket)
 * `[[Image(htdocs:picture.gif)]]` (referring to a file inside the [TracEnvironment environment] `htdocs` directory)
 * `[[Image(source:/trunk/trac/htdocs/trac_logo_mini.png)]]` (a file in repository)

||= Wiki Markup =||= Display =||
{{{#!td
  {{{
  [[Image(htdocs:../common/trac_logo_mini.png)]]
  }}}
}}}
{{{#!td
[[Image(htdocs:../common/trac_logo_mini.png)]]
}}}

See WikiMacros for further documentation on the `[[Image()]]` macro, which has several useful options (`title=`, `link=`, etc.)


== Macros ==

Macros are ''custom functions'' to insert dynamic content in a page.

||= Wiki Markup =||= Display =||
{{{#!td
  {{{
  [[RecentChanges(Trac,3)]]
  }}}
}}}
{{{#!td style="padding-left: 2em"
[[RecentChanges(Trac,3)]]
}}}

See WikiMacros for more information, and a list of installed macros.

The detailed help for a specific macro can also be obtained more directly by appending a "?" to the macro name.

||= Wiki Markup =||= Display =||
{{{#!td
  {{{
  [[MacroList?]]
  }}}
}}}
{{{#!td style="padding-left: 2em"
[[MacroList?]]
}}}


== Processors ==

Trac supports alternative markup formats using WikiProcessors. For example, processors are used to write pages in 
[wiki:WikiRestructuredText reStructuredText] or [wiki:WikiHtml HTML]. 

||= Wiki Markup =||= Display =||
|--------------------------------------------------------
{{{#!td align="center" colspan=2 style="border: 0px; font-size: 90%"

   [=#Processors-example-html Example 1:] HTML

}}}
|--------------------------------------------------------
{{{#!td style="border: 0px"
  {{{
  {{{
  #!html
  <h1 style="text-align: right; color: blue">
   HTML Test
  </h1>
  }}}
  }}}
}}}
{{{#!td valign="top"  style="border: 0px"

{{{
#!html
<h1 style="text-align: right; color: blue">HTML Test</h1>
}}}

}}}
|--------------------------------------------------------
{{{#!td align="center" colspan=2 style="border: 0px; font-size: 90%"

   [=#Processors-example-highlight Example 2:] Code Highlighting

}}}
|--------------------------------------------------------
{{{#!td style="border: 0px"
  {{{
  {{{
  #!python
  class Test:
  
      def __init__(self):
          print "Hello World"
  if __name__ == '__main__':
     Test()
  }}}
  }}}
}}}
{{{
#!td valign="top"  style="border: 0px"

{{{
#!python
class Test:
    def __init__(self):
        print "Hello World"
if __name__ == '__main__':
   Test()
}}}

}}}
|--------------------------------------------------------
{{{#!td align="center" colspan=2 style="border: 0px; font-size: 90%"

       [=#Processors-example-tables Example 3:] Complex Tables

}}}
|--------------------------------------------------------
{{{#!td style="border: 0px"
  {{{
  {{{#!th rowspan=4 align=justify
  With the `#td` and `#th` processors,
  table cells can contain any content:
  }}}
  |----------------
  {{{#!td
    - lists
    - embedded tables
    - simple multiline content
  }}}
  |----------------
  {{{#!td
  As processors can be easily nested, 
  so can be tables:
    {{{#!th
    Example:
    }}}
    {{{#!td style="background: #eef"
    || must be at the third level now... ||
    }}}
  }}}
  |----------------
  {{{#!td
  Even when you don't have complex markup,
  this form of table cells can be convenient
  to write content on multiple lines.
  }}}
  }}}
}}}
{{{
#!td  valign="top"  style="border: 0px"

  {{{#!th rowspan=4 align=justify
  With the `#td` and `#th` processors,
  table cells can contain any content:
  }}}
  |----------------
  {{{#!td
    - lists
    - embedded tables
    - simple multiline content
  }}}
  |----------------
  {{{#!td
  As processors can be easily nested, 
  so can be tables:
    {{{#!th
    Example:
    }}}
    {{{#!td style="background: #eef"
    || must be at the third level now... ||
    }}}
  }}}
  |----------------
  {{{#!td
  Even when you don't have complex markup,
  this form of table cells can be convenient
  to write content on multiple lines.
  }}}

}}}

See WikiProcessors for more information.


== Comments ==

Comments can be added to the plain text. These will not be rendered and will not display in any other format than plain text.

||= Wiki Markup =||= Display =||
{{{#!td
  {{{
  Nothing to
  {{{
  #!comment
  Your comment for editors here
  }}}
  see ;-)
  }}}
}}}
{{{#!td
  Nothing to
  {{{
  #!comment
  Your comment for editors here
  }}}
  see ;-)
}}}

== Miscellaneous ==

An horizontal line can be used to separated different parts of your page:

||= Wiki Markup =||= Display =||
{{{#!td
  {{{
  Four or more dashes will be replaced 
  by an horizontal line (<HR>)
  ----
  See?
  }}}
}}}
{{{#!td
Four or more dashes will be replaced
by an horizontal line (<HR>)
----
See?
}}}
|----------------------------------
{{{#!td
  {{{
  "macro" style [[br]] line break
  }}}
}}}
{{{#!td
"macro" style [[br]] line break
}}}
|----------------------------------
{{{#!td
  {{{
  !WikiCreole style \\ line\\break
  }}}
}}}
{{{#!td
!WikiCreole style \\ line\\break
}}}
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.