Project

General

Profile

RedmineTextFormatting » History » Revision 6

Revision 5 (Jean-Philippe Lang, 2008-01-12 11:50) → Revision 6/127 (Jean-Philippe Lang, 2008-01-18 19:10)

h1. Wiki formatting 

 {{>TOC}} 

 Redmine supports "Textile":http://hobix.com/textile/ syntax for wikis and almost anything that has a text description (issues, news, messages, changesets...). 

 h2. Links 

 h3. Redmine links 

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

 h3. Links to issues and changesets 

 * Link to an issue: *#1* #1 
 * Link to a changeset: *!r758* (displays r758) r5 

 h3. Wiki links: 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]] 

 You can also link to pages of 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]]. 

 h3. Links to others resources (0.6.devel.1064 and above): 

 * 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) 

 * 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"* 

 * 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) 

 Escaping (0.6.devel.1064 and above): 

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

 h3. External links external URL 

 HTTP URLs and email addresses are automatically turned into clickable links:  

 <pre> 
 http://www.redmine.org, someone@foo.bar 
 </pre> 

 displays: http://www.redmine.org, someone@foo.bar 

 If you want to display a specific text instead of the URL, you can use the standard textile syntax: 

 <pre> 
 "Redmine web site":http://www.redmine.org 
 </pre> 

 displays: "Redmine web site":http://www.redmine.org 

 h2. Text formatting 

 h3. Font style 

 <pre><code>* *bold* 
 * _italic_ 
 * _*bold italic*_ 
 * +underline+ 
 * -strike-through- 
 </code></pre> 

 Display: 

  * *bold* 
  * _italic_ 
  * _*bold italic*_ 
  * +underline+ 
  * -strike-through- 

 h2. 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. 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. Table of content 

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

 h2. Code highlighting 

 Code highlightment relies on "CodeRay":http://coderay.rubychan.de/, a fast syntax highlighting library written completely in Ruby. It currently supports 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 you code here. 
 </code></pre> 
 </pre></code> 

 Example: 

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