Version 14 (modified by 12 years ago) ( diff ) | ,
---|
Getting Started Documenting with the Wiki
The Repository
The main advantage of Trac is its ability to quickly and easily connect to the code repository. For example, one may provide a link to file contrib/astro/selfgravity/selfgravity.f90
, revision 99, line 37, via source:dev/contrib/astro/selfgravity/selfgravity.f90@99#L37.
As with the previous repository navigation system, the repository may be browsed by clicking the Browse Source button at the top of every page.
Diffs/Changesets
Changesets give the details of what changes between two consecutive revisions. These can be accessed with the search bar at the top of every page by enclosing the changeset number in square brackets. For example, to see what changes were made between revisions 3 and 4, enter [4] in the search field. A link to changeset 50 may be inserted into a wikipage via r50, [50], or changeset:50.
If you wish to do a search for, say, all changes that occured between revisions 20 and 30, you would do this by typing diff:@20:30. Typing this in a wikipage does the same.
Wikipage Creation/Style
See this page for more detailed instruction.
This page was created by entering an appropriate page name (see WikiPageNames for naming conventions) in the search field. Basic criteria are 1) alphabet-only; 2) two upper-case, nonconsecutive letters; 3) first letter must be upper-case.
Created in this way, were it not referenced by WikiStart, this page would be "orphaned," i.e. not linked to by any other page (except the Title Index). An index which lists all the files in the repository, with links to their respective wikipages, would be useful.
In the following examples, the code may precede or follow the displayed result. In places where no explicit code block is provided, WYSIWYG should be assumed. All of these were culled from WikiFormatting.
Page Outline
Trac can automatically generate a page outline (the yellow box at the upper-right) if you insert [[PageOutline]]
at the top of the page. This is by default based on all the headings in the page; documentation is available on WikiMacros.
Headings
Here is a section with a heading.
== Headings == Here is a section with a heading.
The numer of equal signs (1-5) denote the type of section:
Section | |
Subsection | |
= | Subsubsection |
== | Subsubsubsection |
=== | Subsubsubsubsection |
Lines
You can create a horizontal line by using four or more dashes; ----
yields
Font styles
Monospace
(control-character ignoring) is done with three curly braces ( {{{monospace
}}} ). To put in blocks of code, the curly braces must reside on their own lines:
{{{ PROGRAM SelfGravityEvaluation PRINT*,' SELF GRAVITY IS GOOD I AM A COMPUTER I KNOW THESE THINGS.' PRINT*,' P.S. HELLO WORLD.' END PROGRAM SelfGravityEvaluation }}}
yields,
PROGRAM SelfGravityEvaluation PRINT*,' SELF GRAVITY IS GOOD I AM A COMPUTER I KNOW THESE THINGS.' PRINT*,' P.S. HELLO WORLD.' END PROGRAM SelfGravityEvaluation
Note: I believe the above block of code could be syntax-colored if the appropriate package (GNU Enscript) were installed, as described in TracSyntaxColoring.
Italicized or bold text is given by placing it in two (''italic''
) or three ('''bold'''
) single-quotes, respectively:
If someone doesn't believe you, be strong or emphatic when stating that self-gravity is good.
Bold-italic is five-single quotes.
^superscripts^
and ,,subscripts,,
look like this: Gravityself = Excellentthe max
Links
Pages within the wiki can be referenced just with their name, e.g. typing GettingStarted
will be automatically formatted to GettingStarted.
For outside links, or in general if you want to provide text for a link other than the address, this is done with square brackets.
[GettingStarted The page that gets you started.] [http://www.yahoo.com Yahoo!]
yields,
The page that gets you started
Conversely, if you don't want GettingStarted to automatically turn into GettingStarted, prepend the word with an exclamation point:
!GettingStarted
will result in no automatic link.
Math
Mathematical markup is now supported in the wiki (Many thanks to Dave) via a macro that converts latex code to png images.
{{{ #!formula r^{3/2} = \frac{ T^{\gamma-1} }{ G M_\odot} }}}
Yields
Optional keywords (must be specified before the latex code):
#density=100
Density defaults to 100. Larger values produces larger images.
#nomode
Disable the default display mode setting. Use this if you want to include things outside of tex's display mode.
#display
Create a displayed equation (either centered or fleqn style, depending on the fleqn variable in the config file.
#center
Center the equation on the page.
#fleqn
fleqn style equation; indentation is controlled by fleqn_witdh in conf/trac.ini.
#indent [=class name]
places image link in a paragraph <p>…</p> If class name is specified, then it is used to specify a CSS class for the paragraph.
For inline equations, formula(c=\sqrt{a^2+b^2}), use [[formula(c=\sqrt{a^2+b^2})]]
Lists
The starting line of a list must be indented at least one space to work automatically. Numeral lists begin with "1.", alphabetic with "a." or "A.", roman numeral'd with "i." or"I.":
Reasons why self-gravity is good: 1. Because, a. why not? a. Why not, indeed. i. You make a good point. i. Thanks. 1. Don't mention it.
Reasons why self-gravity is good:
- Because
- why not?
- Why not, indeed.
- You make a good point.
- Thanks.
- Don't mention it.
Unordered lists may be created with asterisk characters, also indented one space.
Some miscellaneous points: * A list item. * A list-subitem. * An unrelated point.
Some miscellaneous points:
- A list item.
- A list-subitem.
- An unrelated point.
Tables
||Cell 1||Cell 2||Cell 3|| ||Cell 4||Cell 5||Cell 6||
Cell 1 | Cell 2 | Cell 3 |
Cell 4 | Cell 5 | Cell 6 |
Images
Images may either be local (attached to the wiki) or referenced via a hyperlink.
Local: [[Image(local.png)]]
HTML: [[Image(http://www.domain.org/foo.jpg)]]
They will be displayed at their native resolution unless an additional argument, separated by a comma, is given, giving its size in percent: [[Image(local.png,20%)]]
. Further information about images can be found at WikiMacros.
Blockquote
A blockquote is denoted by two spaces at beginning of the line.
Self-gravity is good. Here is a blockquote to prove it: Self-gravity? Good. See?
Self-gravity is good. Here is a blockquote to prove it:
Self-gravity? Good.
See?