Project

General

Profile

RedmineTextFormatting » History » Revision 51

Revision 50 (Jean-Philippe Lang, 2011-01-25 18:35) → Revision 51/127 (Graham King, 2011-01-25 19:41)

h1. Wiki formatting 

 {{>TOC}} 

 h2. Links 

 h3. Redmine links 

 Redmine allows hyperlinking between issues, changesets and wiki pages from anywhere wiki formatting is used. 

 * Link to an issue: *!#124* (displays #124, link is striked-through if the issue is closed) 
 * Link to a changeset: *!r758* (displays r758) 
 * Link to a changeset with a non-numeric hash: *commit:c6f4d0fd* (displays c6f4d0fd).    Added in r1236. 

 Wiki links: 

 * *[[Guide]]* displays a link to the page named 'Guide': [[Guide]] 
 * *[[Guide|User manual]]* displays a link to the same page but with a different text: [[Guide|User manual]] 
 * *[[Guide#User-guide|User guide]]* displays a link to the header on the same page with a different text: [[Guide#User-guide|User guide]] 

 You can also link to pages of another project's an other project wiki: 

 * *[[sandbox:some page]]* displays a link to the page named 'Some page' of the Sandbox wiki 
 * *[[sandbox:]]* displays a link to the Sandbox wiki main page 

 Wiki links are displayed in red if the page doesn't exist yet, eg: [[Nonexistent page]]. 

 Links to others resources: 

 * Documents: 

   * *!document#17* (link to document with id 17) 
   * *!document:Greetings* (link to the document with title "Greetings") 
   * *!document:"Some document"* (double quotes can be used when document title contains spaces) 
   * *!document:some_project:"Some document"* (link to a document in a different project) 

 * Versions: 

   * *!version#3* (link to version with id 3) 
   * *!version:1.0.0* (link to version named "1.0.0") 
   * *!version:"1.0 beta 2"* 

 * Projects: 

   * *project#<id>* (link to project with <id>) 
   * *!project:<identifier>* 
   * *!project:<name>* 

 * Attachments: 
  
   * *!attachment:file.zip* (link to the attachment of the current object named file.zip) 
   * For now, attachments of the current object can be referenced only (if you're on an issue, it's possible to reference attachments of this issue only) 

 * Repository files 

   * *!source:some/file*             -- Link to the file located at /some/file in the project's repository 
   * *!source:some/file@52*          -- Link to the file's revision 52 
   * *!source:some/file#L120*        -- Link to line 120 of the file 
   * *!source:some/file@52#L120*     -- Link to line 120 of the file's revision 52 
   * *!source:"some file@52#L120"* -- Double quotes can be used when the URL contains spaces 
   * *!export:some/file*             -- Force the download of the file 

 Escaping: 

 * You can prevent Redmine links from being parsed by preceding them with an exclamation mark: ! 

 h3. External links 

 HTTP URLs and email addresses are automatically turned into clickable links:  
 * *http&#58;//www.redmine.org* -- External link to the redmine website: http://www.redmine.org 
 * *someone&#64;foo.bar* -- Link to an email address: someone@foo.bar 

 HTTP URLs and an email addresses can also use different text than the link itself: 
 * *"Redmine web site"&#58;http&#58;//www.redmine.org* -- External link with different text: "Redmine web site":http://www.redmine.org 
 * *"Email someone"&#58;mailto&#58;someone&#64;foo.bar* -- Email link with different text: "Email someone":mailto:someone@foo.bar 

 More complex email instructions can be added to an email link.    A default subject, default body and CC information can be defined.    Note that spaces in any of these fields need to be replaced with the code %20. 
 * *"Email webmaster and admin"&#58;mailto&#58;webmaster&#64;foo.bar?cc=admin&#64;foo.bar* -- Email to webmaster, CC admin:    "Email webmaster and admin":mailto:webmaster@foo.bar?cc=admin@foo.bar 
 * *"Email someone for help"&#58;mailto&#58;someone&#64;foo.bar?subject=Website%20Help* -- Email link with the subject "Website Help": "Email someone for help":mailto:someone@foo.bar?subject=Website%20Help 
 * *"Email someone for help"&#58;mailto&#58;someone&#64;foo.bar?subject=Website%20Help&body=My%20problem%20is%20* -- Email link with the subject "Website Help" and a default body: "Email someone for help":mailto:someone@foo.bar?subject=Website%20Help&body=My%20problem%20is%20 

 h2. Text formatting 

 For things such as headlines, bold, tables, lists, Redmine supports Textile syntax.    See http://www.textism.com/tools/textile/ for information on using any of these features.    A few samples are included below, but the engine is capable of much more of that. 

 h3. Acronym 

 <pre> 
 JPL(Jean-Philippe Lang) 
 </pre> 

 Display: 

 JPL(Jean-Philippe Lang) 

 h3. Font style 

 <pre><code>* *bold* 
 * _italic_ 
 * *_bold italic_* 
 * +underline+ 
 * -strike-through- 
 * Plain ^superscript^ 
 * Plain ~subscript~ 
 </code></pre> 

 Display: 

  * *bold* 
  * _italic_ 
  * *_bold italic_* 
  * +underline+ 
  * -strike-through- 
  * Plain ^superscript^ 
  * Plain ~subscript~ 

 h3. Inline images 

 * *&#33;image_url&#33;* displays an image located at image_url (textile syntax) 
 * *&#33;>image_url&#33;* right floating image 

 If you have an image attached to your wiki page, it can be displayed inline using its filename: *&#33;attached_image.png&#33;* 

 h3. Headings 

 <pre><code>h1. Heading 
 h2. Subheading 
 h3. Subheading 
 </code></pre> 

 h3. Paragraphs 

 <pre><code>p>. right aligned 
 p=. centered 
 </code></pre> 

 p=. This is centered paragraph. 

 h3. Predefined 

 To escape wiki syntax 
 <pre> <pre> *Your text won't become bold* </pre> </pre> 
 Display: 

 <pre> *Your text won't become bold* </pre> 

 h3. Blockquotes 

 Start the paragraph with *bq.* 

 <pre><code>bq. Rails is a full-stack framework for developing database-backed web applications according to the Model-View-Control pattern. 
 To go live, all you need to add is a database and a web server. 
 </code></pre> 

 Display: 

 bq. Rails is a full-stack framework for developing database-backed web applications according to the Model-View-Control pattern. 
 To go live, all you need to add is a database and a web server. 

 h3. Unordered lists 

 <pre> 
 * Item 1 
 * Item 2 
 ** Item 21 
 ** Item 22 
 * Item 3 
 </pre> 

 displays: 

 * Item 1 
 * Item 2 
 ** Item 21 
 ** Item 22 
 * Item 3 

 h3. Ordered lists 

 <pre> 
 # Item 1 
 # Item 2 
 # Item 3 
 ## Item 3.1 
 ## Item 3.2 
 </pre> 

 displays: 

 # Item 1 
 # Item 2 
 # Item 3 
 ## Item 3.1 
 ## Item 3.2 

 h3. Tables 

 <pre> 
 |_.UserID|_.Name|_.Group| 
 |\3=.IT| 
 |1|Artur Pirozhkov|/2.Users| 
 |2|Vasya Rogov| 
 |3|John Smith|Admin| 
 </pre> 

 Display: 

 |_.UserID|_.Name|_.Group| 
 |\3=.IT| 
 |1|Artur Pirozhkov|/2.Users| 
 |2|Vasya Rogov| 
 |3|John Smith|Admin| 

 h3. Table of content 

 <pre><code>{{toc}} => left aligned toc 
 {{>toc}} => right aligned toc 
 </code></pre> 

 h2. Macros 

 Redmine has the following builtin macros: 

 {{macro_list}} 


 h2. Code highlighting 

 Code highlighting highlightment relies on "CodeRay":http://coderay.rubychan.de/, a fast syntax highlighting library written completely in Ruby. It currently supports C, C++, CSS, Delphi, Diff, Groovy, HTML, Java, Javascript, JSON, Nitro-XHTML, PHP, Python, RHTML, Ruby, Scheme, SQL, XML and YAML code. c, html, javascript, rhtml, ruby, scheme, xml languages. 

 You can highlight code in your wiki page using this syntax: 

 <pre><code><pre><code class="ruby"> 
   Place your code here. 
 </code></pre> 
 </code></pre> 

 Example: 

 <pre><code class="ruby"> 
 # The Greeter class 
 class Greeter 
   def initialize(name) 
     @name = name.capitalize 
   end 
 
   def salute 
     puts "Hello #{@name}!" 
   end 
 end 
 </code></pre>